From f275783adc6dde3f2da86c811d770b85516d7a40 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 3 May 2023 17:56:48 +0200 Subject: [PATCH 1/4] docs: add missed line to the readme template --- template/README.mustache | 1 + 1 file changed, 1 insertion(+) diff --git a/template/README.mustache b/template/README.mustache index 54f8dfb..a63b890 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -107,6 +107,7 @@ func main() { > ```shell > cd example && FINGERPRINT_API_KEY=SECRET_API_KEY VISITOR_ID=VISITOR_ID_EXAMPLE go run visits/GetVisits_APIKey.go > ``` +> If your subscription region is not the “Global/US” region, you need to switch the region in the `GetVisits_APIKey.go` and `GetEvent_APIKey.go` source files first. ### Region If your subscription is in region other than US, you need to change the region in the configuration: From 2d071a9adfc46dd71381368e8f1e554e4f5e9e94 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 3 May 2023 17:58:17 +0200 Subject: [PATCH 2/4] fix: update schema, add test for undescribed fields case --- generate.go | 1 + res/fingerprint-server-api.yaml | 63 +++++--------- test/GetEvent_test.go | 41 +++++++++ test/mocks/get_event_extra_fields.json | 86 +++++++++++++++++++ .../mocks/visits_too_many_requests_error.json | 4 +- 5 files changed, 151 insertions(+), 44 deletions(-) create mode 100644 test/mocks/get_event_extra_fields.json diff --git a/generate.go b/generate.go index 6c28af5..31facfe 100644 --- a/generate.go +++ b/generate.go @@ -130,6 +130,7 @@ func getExamples() { "visits_limit_500.json", "webhook.json", "get_event.json", + "get_event_extra_fields.json", "get_event_403_error.json", "get_event_404_error.json", "get_event_botd_failed_error.json", diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index ff8a956..f502b1d 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -3004,8 +3004,10 @@ paths: schema: $ref: '#/components/schemas/ErrorVisits403' examples: - forbidden: - value: '{"error": "Forbidden (HTTP 403)"}' + example: + summary: Forbidden + value: + error: Forbidden (HTTP 403) '429': description: Too Many Requests headers: @@ -3021,12 +3023,11 @@ paths: application/json: schema: $ref: '#/components/schemas/ManyRequestsResponse' - examples: - example: - summary: Example too many requests error response - value: - error: - message: too many requests + examples: + example: + summary: Example too many requests error response + value: + error: too many requests /webhook: trace: tags: @@ -3035,6 +3036,9 @@ paths: Fake path to describe webhook format. More information about webhooks can be found in the [documentation](https://dev.fingerprint.com/docs/webhooks) + responses: + default: + description: Dummy for the schema callbacks: webhook: webhook: @@ -3047,7 +3051,6 @@ paths: content: application/json: schema: - type: object $ref: '#/components/schemas/WebhookVisit' example: value: @@ -3099,6 +3102,9 @@ paths: lastSeenAt: global: '2022-03-16T11:28:34.023Z' subscription: null + responses: + default: + description: The server doesn't validate the answer. components: securitySchemes: ApiKeyHeader: @@ -3174,14 +3180,8 @@ components: type: boolean firstSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-05-05T18:28:54.535Z' - subscription: '2022-06-09T22:58:05.576Z' lastSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-06-09T22:58:35.795Z' - subscription: null additionalProperties: false required: - browserDetails @@ -3345,14 +3345,8 @@ components: type: boolean firstSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-05-05T18:28:54.535Z' - subscription: '2022-06-09T22:58:05.576Z' lastSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-06-09T22:58:35.795Z' - subscription: null additionalProperties: false required: - visitorId @@ -3419,14 +3413,8 @@ components: type: boolean firstSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-05-05T18:28:54.535Z' - subscription: '2022-06-09T22:58:05.576Z' lastSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-06-09T22:58:35.795Z' - subscription: null required: - browserDetails - confidence @@ -3502,14 +3490,19 @@ components: type: string nullable: true format: date-time + example: '2022-05-05T18:28:54.535Z' subscription: type: string nullable: true format: date-time + example: '2022-06-09T22:58:05.576Z' required: - global - subscription title: SeenAt + example: + global: '2022-05-05T18:28:54.535Z' + subscription: null IPLocation: type: object additionalProperties: false @@ -3547,14 +3540,8 @@ components: example: Prague country: $ref: '#/components/schemas/Location' - example: - code: US - name: United States continent: $ref: '#/components/schemas/Location' - example: - code: NA - name: North America subdivisions: type: array items: @@ -3663,14 +3650,8 @@ components: type: boolean firstSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-05-05T18:28:54.535Z' - subscription: '2022-06-09T22:58:05.576Z' lastSeenAt: $ref: '#/components/schemas/SeenAt' - example: - global: '2022-06-09T22:58:35.795Z' - subscription: null visitorId: type: string additionalProperties: false @@ -3753,8 +3734,6 @@ components: example: https://example.com/login bot: $ref: '#/components/schemas/BotdDetectionResult' - example: - result: notDetected required: - bot - url @@ -3776,6 +3755,8 @@ components: - notDetected - good - bad + example: + result: notDetected required: - result BotdError: diff --git a/test/GetEvent_test.go b/test/GetEvent_test.go index 93e18f6..d95b39a 100644 --- a/test/GetEvent_test.go +++ b/test/GetEvent_test.go @@ -54,6 +54,47 @@ func TestReturnsEvent(t *testing.T) { assert.Equal(t, res, mockResponse) } +func TestReturnsEventWithUnexpectedFields(t *testing.T) { + mockResponse := GetMockEventResponse("../test/mocks/get_event_extra_fields.json") + + ts := httptest.NewServer(http.HandlerFunc(func( + w http.ResponseWriter, + r *http.Request, + ) { + configFile := config.ReadConfig("../config.json") + integrationInfo := r.URL.Query().Get("ii") + assert.Equal(t, integrationInfo, fmt.Sprintf("fingerprint-pro-server-go-sdk/%s", configFile.PackageVersion)) + assert.Equal(t, r.URL.Path, "/events/123") + + apiKey := r.Header.Get("Auth-Api-Key") + assert.Equal(t, apiKey, "api_key") + + w.Header().Set("Content-Type", "application/json") + + err := json.NewEncoder(w).Encode(mockResponse) + + if err != nil { + log.Fatal(err) + } + })) + defer ts.Close() + + cfg := sdk.NewConfiguration() + cfg.ChangeBasePath(ts.URL) + + client := sdk.NewAPIClient(cfg) + + ctx := context.WithValue(context.Background(), sdk.ContextAPIKey, sdk.APIKey{ + Key: "api_key", + }) + + res, _, err := client.FingerprintApi.GetEvent(ctx, "123") + + assert.NoError(t, err) + assert.NotNil(t, res) + assert.Equal(t, res, mockResponse) +} + func TestReturnsBotdTooManyRequestsError(t *testing.T) { mockResponse := GetMockEventResponse("../test/mocks/get_event_botd_too_many_requests_error.json") diff --git a/test/mocks/get_event_extra_fields.json b/test/mocks/get_event_extra_fields.json new file mode 100644 index 0000000..03e50c0 --- /dev/null +++ b/test/mocks/get_event_extra_fields.json @@ -0,0 +1,86 @@ +{ + "products": { + "identification": { + "data": { + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "0KSh65EnVoB85JBmloQK", + "incognito": true, + "linkedId": "somelinkedId", + "time": "2019-05-21T16:40:13Z", + "timestamp": 1582299576512, + "url": "https://www.example.com/login", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "subdivisions": [ + { + "isoCode": "63", + "name": "North Rhine-Westphalia" + } + ] + }, + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "74", + "browserFullVersion": "74.0.3729", + "os": "Windows", + "osVersion": "7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." + }, + "confidence": { + "score": 0.97 + }, + "visitorFound": true, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": "2022-03-16T11:28:34.023Z", + "subscription": null + } + } + }, + "botd": { + "data": { + "bot": { + "result": "notDetected" + }, + "url": "https://www.example.com/login", + "ip": "61.127.217.15", + "time": "2019-05-21T16:40:13Z" + } + }, + "product3": { + "data": { + "result": false + } + }, + "product4": { + "data": { + "result": true, + "details": { + "detail1": true, + "detail2": "detail description", + "detail3": 42 + } + } + } + } +} diff --git a/test/mocks/visits_too_many_requests_error.json b/test/mocks/visits_too_many_requests_error.json index 11ec5a0..00d00f2 100644 --- a/test/mocks/visits_too_many_requests_error.json +++ b/test/mocks/visits_too_many_requests_error.json @@ -1,5 +1,3 @@ { - "error": { - "message": "too many requests" - } + "error": "too many requests" } From 8a7b0c3705bd3ae310b2278048868699e3137b99 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 10 May 2023 09:20:06 +0200 Subject: [PATCH 3/4] feat: update schema and add more signals --- README.md | 32 +- docs/BotdDetectionResult.md | 1 + docs/BotdResult.md | 2 + docs/IpBlockListResult.md | 10 + docs/IpBlockListResultDetails.md | 10 + docs/IpInfoResult.md | 10 + docs/IpInfoResultV4.md | 10 + docs/IpInfoResultV6.md | 10 + docs/{BotdError.md => ProductError.md} | 2 +- docs/ProductsResponse.md | 9 + docs/ProductsResponseBotd.md | 2 +- docs/SignalResponseEmulator.md | 9 + docs/SignalResponseEmulator1.md | 10 + docs/SignalResponseEmulatorData.md | 9 + docs/SignalResponseIncognito.md | 10 + docs/SignalResponseIncognitoData.md | 9 + docs/SignalResponseIpBlocklist.md | 9 + docs/SignalResponseIpBlocklist1.md | 10 + docs/SignalResponseIpInfo.md | 9 + docs/SignalResponseIpInfo1.md | 10 + docs/SignalResponseProxy.md | 9 + docs/SignalResponseProxy1.md | 10 + docs/SignalResponseProxyData.md | 9 + docs/SignalResponseRootApps.md | 9 + docs/SignalResponseRootApps1.md | 10 + docs/SignalResponseRootAppsData.md | 9 + docs/SignalResponseTampering.md | 9 + docs/SignalResponseTampering1.md | 10 + docs/SignalResponseTor.md | 9 + docs/SignalResponseTor1.md | 10 + docs/SignalResponseTorData.md | 9 + docs/SignalResponseVpn.md | 9 + docs/SignalResponseVpn1.md | 10 + docs/TamperingResult.md | 10 + docs/VpnResult.md | 10 + docs/VpnResultMethods.md | 10 + docs/WebhookVisit.md | 12 +- generate.go | 1 + res/fingerprint-server-api.yaml | 480 +++++++++++++++++- sdk/model_botd_detection_result.go | 1 + sdk/model_botd_result.go | 6 +- sdk/model_error_response.go | 14 - sdk/model_error_response_error.go | 15 - sdk/model_ip_block_list_result.go | 16 + sdk/model_ip_block_list_result_details.go | 17 + sdk/model_ip_info_result.go | 16 + sdk/model_ip_info_result_v4.go | 15 + sdk/model_ip_info_result_v6.go | 15 + ...l_botd_error.go => model_product_error.go} | 2 +- sdk/model_products_response.go | 9 + sdk/model_products_response_botd.go | 4 +- sdk/model_signal_response_emulator.go | 14 + sdk/model_signal_response_emulator_1.go | 15 + sdk/model_signal_response_emulator_data.go | 15 + sdk/model_signal_response_incognito.go | 15 + sdk/model_signal_response_incognito_data.go | 15 + sdk/model_signal_response_ip_blocklist.go | 14 + sdk/model_signal_response_ip_blocklist_1.go | 15 + sdk/model_signal_response_ip_info.go | 14 + sdk/model_signal_response_ip_info_1.go | 15 + sdk/model_signal_response_proxy.go | 14 + sdk/model_signal_response_proxy_1.go | 15 + sdk/model_signal_response_proxy_data.go | 15 + sdk/model_signal_response_root_apps.go | 14 + sdk/model_signal_response_root_apps_1.go | 15 + sdk/model_signal_response_root_apps_data.go | 15 + sdk/model_signal_response_tampering.go | 14 + sdk/model_signal_response_tampering_1.go | 15 + sdk/model_signal_response_tor.go | 14 + sdk/model_signal_response_tor_1.go | 15 + sdk/model_signal_response_tor_data.go | 15 + sdk/model_signal_response_vpn.go | 14 + sdk/model_signal_response_vpn_1.go | 15 + sdk/model_st_seen_at.go | 19 - sdk/model_tampering_result.go | 17 + sdk/model_vpn_result.go | 16 + sdk/model_vpn_result_methods.go | 17 + sdk/model_webhook_visit.go | 22 +- test/GetEvent_test.go | 41 ++ test/mocks/get_event_all_errors.json | 70 +++ 80 files changed, 1411 insertions(+), 71 deletions(-) create mode 100644 docs/IpBlockListResult.md create mode 100644 docs/IpBlockListResultDetails.md create mode 100644 docs/IpInfoResult.md create mode 100644 docs/IpInfoResultV4.md create mode 100644 docs/IpInfoResultV6.md rename docs/{BotdError.md => ProductError.md} (97%) create mode 100644 docs/SignalResponseEmulator.md create mode 100644 docs/SignalResponseEmulator1.md create mode 100644 docs/SignalResponseEmulatorData.md create mode 100644 docs/SignalResponseIncognito.md create mode 100644 docs/SignalResponseIncognitoData.md create mode 100644 docs/SignalResponseIpBlocklist.md create mode 100644 docs/SignalResponseIpBlocklist1.md create mode 100644 docs/SignalResponseIpInfo.md create mode 100644 docs/SignalResponseIpInfo1.md create mode 100644 docs/SignalResponseProxy.md create mode 100644 docs/SignalResponseProxy1.md create mode 100644 docs/SignalResponseProxyData.md create mode 100644 docs/SignalResponseRootApps.md create mode 100644 docs/SignalResponseRootApps1.md create mode 100644 docs/SignalResponseRootAppsData.md create mode 100644 docs/SignalResponseTampering.md create mode 100644 docs/SignalResponseTampering1.md create mode 100644 docs/SignalResponseTor.md create mode 100644 docs/SignalResponseTor1.md create mode 100644 docs/SignalResponseTorData.md create mode 100644 docs/SignalResponseVpn.md create mode 100644 docs/SignalResponseVpn1.md create mode 100644 docs/TamperingResult.md create mode 100644 docs/VpnResult.md create mode 100644 docs/VpnResultMethods.md delete mode 100644 sdk/model_error_response.go delete mode 100644 sdk/model_error_response_error.go create mode 100644 sdk/model_ip_block_list_result.go create mode 100644 sdk/model_ip_block_list_result_details.go create mode 100644 sdk/model_ip_info_result.go create mode 100644 sdk/model_ip_info_result_v4.go create mode 100644 sdk/model_ip_info_result_v6.go rename sdk/{model_botd_error.go => model_product_error.go} (95%) create mode 100644 sdk/model_signal_response_emulator.go create mode 100644 sdk/model_signal_response_emulator_1.go create mode 100644 sdk/model_signal_response_emulator_data.go create mode 100644 sdk/model_signal_response_incognito.go create mode 100644 sdk/model_signal_response_incognito_data.go create mode 100644 sdk/model_signal_response_ip_blocklist.go create mode 100644 sdk/model_signal_response_ip_blocklist_1.go create mode 100644 sdk/model_signal_response_ip_info.go create mode 100644 sdk/model_signal_response_ip_info_1.go create mode 100644 sdk/model_signal_response_proxy.go create mode 100644 sdk/model_signal_response_proxy_1.go create mode 100644 sdk/model_signal_response_proxy_data.go create mode 100644 sdk/model_signal_response_root_apps.go create mode 100644 sdk/model_signal_response_root_apps_1.go create mode 100644 sdk/model_signal_response_root_apps_data.go create mode 100644 sdk/model_signal_response_tampering.go create mode 100644 sdk/model_signal_response_tampering_1.go create mode 100644 sdk/model_signal_response_tor.go create mode 100644 sdk/model_signal_response_tor_1.go create mode 100644 sdk/model_signal_response_tor_data.go create mode 100644 sdk/model_signal_response_vpn.go create mode 100644 sdk/model_signal_response_vpn_1.go delete mode 100644 sdk/model_st_seen_at.go create mode 100644 sdk/model_tampering_result.go create mode 100644 sdk/model_vpn_result.go create mode 100644 sdk/model_vpn_result_methods.go create mode 100644 test/mocks/get_event_all_errors.json diff --git a/README.md b/README.md index 4eb9fde..ac8ac49 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - [BotdDetectionResult](docs/BotdDetectionResult.md) - - [BotdError](docs/BotdError.md) - [BotdResult](docs/BotdResult.md) - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) @@ -139,10 +138,16 @@ Class | Method | HTTP request | Description - [ErrorVisits403](docs/ErrorVisits403.md) - [EventResponse](docs/EventResponse.md) - [IdentificationError](docs/IdentificationError.md) + - [IpBlockListResult](docs/IpBlockListResult.md) + - [IpBlockListResultDetails](docs/IpBlockListResultDetails.md) + - [IpInfoResult](docs/IpInfoResult.md) + - [IpInfoResultV4](docs/IpInfoResultV4.md) + - [IpInfoResultV6](docs/IpInfoResultV6.md) - [IpLocation](docs/IpLocation.md) - [IpLocationCity](docs/IpLocationCity.md) - [Location](docs/Location.md) - [ManyRequestsResponse](docs/ManyRequestsResponse.md) + - [ProductError](docs/ProductError.md) - [ProductsResponse](docs/ProductsResponse.md) - [ProductsResponseBotd](docs/ProductsResponseBotd.md) - [ProductsResponseIdentification](docs/ProductsResponseIdentification.md) @@ -150,8 +155,33 @@ Class | Method | HTTP request | Description - [Response](docs/Response.md) - [ResponseVisits](docs/ResponseVisits.md) - [SeenAt](docs/SeenAt.md) + - [SignalResponseEmulator](docs/SignalResponseEmulator.md) + - [SignalResponseEmulator1](docs/SignalResponseEmulator1.md) + - [SignalResponseEmulatorData](docs/SignalResponseEmulatorData.md) + - [SignalResponseIncognito](docs/SignalResponseIncognito.md) + - [SignalResponseIncognitoData](docs/SignalResponseIncognitoData.md) + - [SignalResponseIpBlocklist](docs/SignalResponseIpBlocklist.md) + - [SignalResponseIpBlocklist1](docs/SignalResponseIpBlocklist1.md) + - [SignalResponseIpInfo](docs/SignalResponseIpInfo.md) + - [SignalResponseIpInfo1](docs/SignalResponseIpInfo1.md) + - [SignalResponseProxy](docs/SignalResponseProxy.md) + - [SignalResponseProxy1](docs/SignalResponseProxy1.md) + - [SignalResponseProxyData](docs/SignalResponseProxyData.md) + - [SignalResponseRootApps](docs/SignalResponseRootApps.md) + - [SignalResponseRootApps1](docs/SignalResponseRootApps1.md) + - [SignalResponseRootAppsData](docs/SignalResponseRootAppsData.md) + - [SignalResponseTampering](docs/SignalResponseTampering.md) + - [SignalResponseTampering1](docs/SignalResponseTampering1.md) + - [SignalResponseTor](docs/SignalResponseTor.md) + - [SignalResponseTor1](docs/SignalResponseTor1.md) + - [SignalResponseTorData](docs/SignalResponseTorData.md) + - [SignalResponseVpn](docs/SignalResponseVpn.md) + - [SignalResponseVpn1](docs/SignalResponseVpn1.md) - [Subdivision](docs/Subdivision.md) + - [TamperingResult](docs/TamperingResult.md) - [Visit](docs/Visit.md) + - [VpnResult](docs/VpnResult.md) + - [VpnResultMethods](docs/VpnResultMethods.md) - [WebhookVisit](docs/WebhookVisit.md) ## Documentation For Authorization diff --git a/docs/BotdDetectionResult.md b/docs/BotdDetectionResult.md index 50ea632..f76c361 100644 --- a/docs/BotdDetectionResult.md +++ b/docs/BotdDetectionResult.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Result** | **string** | Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on | [default to null] +**Type_** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BotdResult.md b/docs/BotdResult.md index 50c666e..3a94811 100644 --- a/docs/BotdResult.md +++ b/docs/BotdResult.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes **Ip** | **string** | IP address of the requesting browser or bot. | [default to null] **Time** | [**time.Time**](time.Time.md) | Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible | [default to null] **Url** | **string** | Page URL from which identification request was sent. | [default to null] +**UserAgent** | **string** | | [optional] [default to null] +**RequestId** | **string** | | [optional] [default to null] **Bot** | [***BotdDetectionResult**](BotdDetectionResult.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IpBlockListResult.md b/docs/IpBlockListResult.md new file mode 100644 index 0000000..9a14adc --- /dev/null +++ b/docs/IpBlockListResult.md @@ -0,0 +1,10 @@ +# IpBlockListResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. | [optional] [default to null] +**Details** | [***IpBlockListResultDetails**](IpBlockListResult_details.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IpBlockListResultDetails.md b/docs/IpBlockListResultDetails.md new file mode 100644 index 0000000..cf34a8f --- /dev/null +++ b/docs/IpBlockListResultDetails.md @@ -0,0 +1,10 @@ +# IpBlockListResultDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailSpam** | **bool** | IP address was part of a known email spam attack (SMTP). | [optional] [default to null] +**AttackSource** | **bool** | IP address was part of a known network attack (SSH/HTTPS). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IpInfoResult.md b/docs/IpInfoResult.md new file mode 100644 index 0000000..7025c54 --- /dev/null +++ b/docs/IpInfoResult.md @@ -0,0 +1,10 @@ +# IpInfoResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**V4** | [***IpInfoResultV4**](IpInfoResult_v4.md) | | [optional] [default to null] +**V6** | [***IpInfoResultV6**](IpInfoResult_v6.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IpInfoResultV4.md b/docs/IpInfoResultV4.md new file mode 100644 index 0000000..2eb38d4 --- /dev/null +++ b/docs/IpInfoResultV4.md @@ -0,0 +1,10 @@ +# IpInfoResultV4 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | | [optional] [default to null] +**Geolocation** | [***IpLocation**](IPLocation.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IpInfoResultV6.md b/docs/IpInfoResultV6.md new file mode 100644 index 0000000..f63a183 --- /dev/null +++ b/docs/IpInfoResultV6.md @@ -0,0 +1,10 @@ +# IpInfoResultV6 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | | [optional] [default to null] +**Geolocation** | [***IpLocation**](IPLocation.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/BotdError.md b/docs/ProductError.md similarity index 97% rename from docs/BotdError.md rename to docs/ProductError.md index 3f60c8c..79c08e7 100644 --- a/docs/BotdError.md +++ b/docs/ProductError.md @@ -1,4 +1,4 @@ -# BotdError +# ProductError ## Properties Name | Type | Description | Notes diff --git a/docs/ProductsResponse.md b/docs/ProductsResponse.md index 4a5f847..074153a 100644 --- a/docs/ProductsResponse.md +++ b/docs/ProductsResponse.md @@ -5,6 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Identification** | [***ProductsResponseIdentification**](ProductsResponseIdentification.md) | | [optional] [default to null] **Botd** | [***ProductsResponseBotd**](ProductsResponseBotd.md) | | [optional] [default to null] +**IpInfo** | [***SignalResponseIpInfo1**](SignalResponseIpInfo_1.md) | | [optional] [default to null] +**Incognito** | [***SignalResponseIncognito**](SignalResponseIncognito.md) | | [optional] [default to null] +**RootApps** | [***SignalResponseRootApps1**](SignalResponseRootApps_1.md) | | [optional] [default to null] +**Emulator** | [***SignalResponseEmulator1**](SignalResponseEmulator_1.md) | | [optional] [default to null] +**IpBlocklist** | [***SignalResponseIpBlocklist1**](SignalResponseIpBlocklist_1.md) | | [optional] [default to null] +**Tor** | [***SignalResponseTor1**](SignalResponseTor_1.md) | | [optional] [default to null] +**Vpn** | [***SignalResponseVpn1**](SignalResponseVpn_1.md) | | [optional] [default to null] +**Proxy** | [***SignalResponseProxy1**](SignalResponseProxy_1.md) | | [optional] [default to null] +**Tampering** | [***SignalResponseTampering1**](SignalResponseTampering_1.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProductsResponseBotd.md b/docs/ProductsResponseBotd.md index 03954e3..954398a 100644 --- a/docs/ProductsResponseBotd.md +++ b/docs/ProductsResponseBotd.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***BotdResult**](BotdResult.md) | | [optional] [default to null] -**Error_** | [***BotdError**](BotdError.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseEmulator.md b/docs/SignalResponseEmulator.md new file mode 100644 index 0000000..b6564a1 --- /dev/null +++ b/docs/SignalResponseEmulator.md @@ -0,0 +1,9 @@ +# SignalResponseEmulator + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseEmulatorData**](SignalResponseEmulator_data.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseEmulator1.md b/docs/SignalResponseEmulator1.md new file mode 100644 index 0000000..1cbaac3 --- /dev/null +++ b/docs/SignalResponseEmulator1.md @@ -0,0 +1,10 @@ +# SignalResponseEmulator1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseEmulatorData**](SignalResponseEmulator_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseEmulatorData.md b/docs/SignalResponseEmulatorData.md new file mode 100644 index 0000000..ff998bc --- /dev/null +++ b/docs/SignalResponseEmulatorData.md @@ -0,0 +1,9 @@ +# SignalResponseEmulatorData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will be empty for a browser/iOS event. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseIncognito.md b/docs/SignalResponseIncognito.md new file mode 100644 index 0000000..2c4c82e --- /dev/null +++ b/docs/SignalResponseIncognito.md @@ -0,0 +1,10 @@ +# SignalResponseIncognito + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseIncognitoData**](SignalResponseIncognito_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseIncognitoData.md b/docs/SignalResponseIncognitoData.md new file mode 100644 index 0000000..d4087ce --- /dev/null +++ b/docs/SignalResponseIncognitoData.md @@ -0,0 +1,9 @@ +# SignalResponseIncognitoData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | `true` if we detected incognito mode used in the browser, `false` otherwise. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseIpBlocklist.md b/docs/SignalResponseIpBlocklist.md new file mode 100644 index 0000000..d9c954f --- /dev/null +++ b/docs/SignalResponseIpBlocklist.md @@ -0,0 +1,9 @@ +# SignalResponseIpBlocklist + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***IpBlockListResult**](IpBlockListResult.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseIpBlocklist1.md b/docs/SignalResponseIpBlocklist1.md new file mode 100644 index 0000000..b0605d2 --- /dev/null +++ b/docs/SignalResponseIpBlocklist1.md @@ -0,0 +1,10 @@ +# SignalResponseIpBlocklist1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***IpBlockListResult**](IpBlockListResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseIpInfo.md b/docs/SignalResponseIpInfo.md new file mode 100644 index 0000000..1435e9a --- /dev/null +++ b/docs/SignalResponseIpInfo.md @@ -0,0 +1,9 @@ +# SignalResponseIpInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***IpInfoResult**](IpInfoResult.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseIpInfo1.md b/docs/SignalResponseIpInfo1.md new file mode 100644 index 0000000..546d691 --- /dev/null +++ b/docs/SignalResponseIpInfo1.md @@ -0,0 +1,10 @@ +# SignalResponseIpInfo1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***IpInfoResult**](IpInfoResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseProxy.md b/docs/SignalResponseProxy.md new file mode 100644 index 0000000..9790882 --- /dev/null +++ b/docs/SignalResponseProxy.md @@ -0,0 +1,9 @@ +# SignalResponseProxy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseProxyData**](SignalResponseProxy_data.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseProxy1.md b/docs/SignalResponseProxy1.md new file mode 100644 index 0000000..89483e6 --- /dev/null +++ b/docs/SignalResponseProxy1.md @@ -0,0 +1,10 @@ +# SignalResponseProxy1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseProxyData**](SignalResponseProxy_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseProxyData.md b/docs/SignalResponseProxyData.md new file mode 100644 index 0000000..efc6947 --- /dev/null +++ b/docs/SignalResponseProxyData.md @@ -0,0 +1,9 @@ +# SignalResponseProxyData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseRootApps.md b/docs/SignalResponseRootApps.md new file mode 100644 index 0000000..40bc583 --- /dev/null +++ b/docs/SignalResponseRootApps.md @@ -0,0 +1,9 @@ +# SignalResponseRootApps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseRootAppsData**](SignalResponseRootApps_data.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseRootApps1.md b/docs/SignalResponseRootApps1.md new file mode 100644 index 0000000..fd0781c --- /dev/null +++ b/docs/SignalResponseRootApps1.md @@ -0,0 +1,10 @@ +# SignalResponseRootApps1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseRootAppsData**](SignalResponseRootApps_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseRootAppsData.md b/docs/SignalResponseRootAppsData.md new file mode 100644 index 0000000..f9981a9 --- /dev/null +++ b/docs/SignalResponseRootAppsData.md @@ -0,0 +1,9 @@ +# SignalResponseRootAppsData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will be empty for a browser/iOS event. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseTampering.md b/docs/SignalResponseTampering.md new file mode 100644 index 0000000..52a93ea --- /dev/null +++ b/docs/SignalResponseTampering.md @@ -0,0 +1,9 @@ +# SignalResponseTampering + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***TamperingResult**](TamperingResult.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseTampering1.md b/docs/SignalResponseTampering1.md new file mode 100644 index 0000000..914f67f --- /dev/null +++ b/docs/SignalResponseTampering1.md @@ -0,0 +1,10 @@ +# SignalResponseTampering1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***TamperingResult**](TamperingResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseTor.md b/docs/SignalResponseTor.md new file mode 100644 index 0000000..752a5dd --- /dev/null +++ b/docs/SignalResponseTor.md @@ -0,0 +1,9 @@ +# SignalResponseTor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseTorData**](SignalResponseTor_data.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseTor1.md b/docs/SignalResponseTor1.md new file mode 100644 index 0000000..9c8e5f8 --- /dev/null +++ b/docs/SignalResponseTor1.md @@ -0,0 +1,10 @@ +# SignalResponseTor1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SignalResponseTorData**](SignalResponseTor_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseTorData.md b/docs/SignalResponseTorData.md new file mode 100644 index 0000000..d23d487 --- /dev/null +++ b/docs/SignalResponseTorData.md @@ -0,0 +1,9 @@ +# SignalResponseTorData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | `true` if the request IP address is a known tor exit node, `false` otherwise. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseVpn.md b/docs/SignalResponseVpn.md new file mode 100644 index 0000000..dcfe34c --- /dev/null +++ b/docs/SignalResponseVpn.md @@ -0,0 +1,9 @@ +# SignalResponseVpn + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***VpnResult**](VpnResult.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseVpn1.md b/docs/SignalResponseVpn1.md new file mode 100644 index 0000000..13668c6 --- /dev/null +++ b/docs/SignalResponseVpn1.md @@ -0,0 +1,10 @@ +# SignalResponseVpn1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***VpnResult**](VpnResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/TamperingResult.md b/docs/TamperingResult.md new file mode 100644 index 0000000..739cc6b --- /dev/null +++ b/docs/TamperingResult.md @@ -0,0 +1,10 @@ +# TamperingResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | Flag indicating whether browser tampering was detected according to our internal thresholds. | [optional] [default to null] +**AnomalyScore** | **float64** | Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/VpnResult.md b/docs/VpnResult.md new file mode 100644 index 0000000..5731c5b --- /dev/null +++ b/docs/VpnResult.md @@ -0,0 +1,10 @@ +# VpnResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | VPN or other anonymising service has been used when sending the request. | [optional] [default to null] +**Methods** | [***VpnResultMethods**](VpnResult_methods.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/VpnResultMethods.md b/docs/VpnResultMethods.md new file mode 100644 index 0000000..6cfdc7b --- /dev/null +++ b/docs/VpnResultMethods.md @@ -0,0 +1,10 @@ +# VpnResultMethods + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TimezoneMismatch** | **bool** | User's browser timezone doesn't match the timezone from which the request was originally made. | [optional] [default to null] +**PublicVPN** | **bool** | Request IP address is owned and used by a public VPN service provider. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/WebhookVisit.md b/docs/WebhookVisit.md index 0d34a76..431cdb2 100644 --- a/docs/WebhookVisit.md +++ b/docs/WebhookVisit.md @@ -5,9 +5,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **VisitorId** | **string** | | [default to null] **ClientReferrer** | **string** | | [optional] [default to null] +**UserAgent** | **string** | | [optional] [default to null] +**Bot** | [***BotdDetectionResult**](BotdDetectionResult.md) | | [optional] [default to null] +**IpInfo** | [***SignalResponseIpInfo**](SignalResponseIpInfo.md) | | [optional] [default to null] +**Incognito** | **bool** | Flag if user used incognito session. | [default to null] +**RootApps** | [***SignalResponseRootApps**](SignalResponseRootApps.md) | | [optional] [default to null] +**Emulator** | [***SignalResponseEmulator**](SignalResponseEmulator.md) | | [optional] [default to null] +**IpBlocklist** | [***SignalResponseIpBlocklist**](SignalResponseIpBlocklist.md) | | [optional] [default to null] +**Tor** | [***SignalResponseTor**](SignalResponseTor.md) | | [optional] [default to null] +**Vpn** | [***SignalResponseVpn**](SignalResponseVpn.md) | | [optional] [default to null] +**Proxy** | [***SignalResponseProxy**](SignalResponseProxy.md) | | [optional] [default to null] +**Tampering** | [***SignalResponseTampering**](SignalResponseTampering.md) | | [optional] [default to null] **RequestId** | **string** | Unique identifier of the user's identification request. | [default to null] **BrowserDetails** | [***BrowserDetails**](BrowserDetails.md) | | [default to null] -**Incognito** | **bool** | Flag if user used incognito session. | [default to null] **Ip** | **string** | | [default to null] **IpLocation** | [***IpLocation**](IPLocation.md) | | [default to null] **Timestamp** | **int64** | Timestamp of the event with millisecond precision in Unix time. | [default to null] diff --git a/generate.go b/generate.go index 31facfe..3749f72 100644 --- a/generate.go +++ b/generate.go @@ -130,6 +130,7 @@ func getExamples() { "visits_limit_500.json", "webhook.json", "get_event.json", + "get_event_all_errors.json", "get_event_extra_fields.json", "get_event_403_error.json", "get_event_404_error.json", diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index f502b1d..4f83f6f 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -102,10 +102,111 @@ paths: botd: data: bot: - result: notDetected + result: bad + type: selenium url: https://www.example.com/login ip: 61.127.217.15 time: '2019-05-21T16:40:13Z' + ipInfo: + data: + v4: + address: 94.142.239.124 + geolocation: + accuracyRadius: 20 + latitude: 50.05 + longitude: 14.4 + postalCode: 150 00 + timezone: Europe/Prague + city: + name: Prague + country: + code: CZ + name: Czechia + continent: + code: EU + name: Europe + subdivisions: + - isoCode: '10' + name: Hlavni mesto Praha + incognito: + data: + result: false + rootApps: + data: + result: false + emulator: + data: + result: false + ipBlocklist: + data: + result: false + details: + emailSpam: false + attackSource: false + tor: + data: + result: false + vpn: + data: + result: false + methods: + timezoneMismatch: false + publicVPN: false + proxy: + data: + result: false + tampering: + data: + result: false + anomalyScore: 0 + allErrorsResponse: + summary: Example response with all failed signals + value: + products: + identification: + error: + code: Failed + message: failed + botd: + error: + code: Failed + message: internal server error + ipInfo: + error: + code: Failed + message: internal server error + incognito: + error: + code: Failed + message: internal server error + rootApps: + error: + code: Failed + message: internal server error + emulator: + error: + code: Failed + message: internal server error + ipBlocklist: + error: + code: Failed + message: internal server error + tor: + error: + code: Failed + message: internal server error + vpn: + error: + code: Failed + message: internal server error + proxy: + error: + code: Failed + message: internal server error + tampering: + error: + code: Failed + message: internal server error withBotdError: summary: Example error response with BotD error value: @@ -3102,6 +3203,61 @@ paths: lastSeenAt: global: '2022-03-16T11:28:34.023Z' subscription: null + bot: + result: bad + type: selenium + userAgent: >- + (Macintosh; Intel Mac OS X 10_14_3) + Chrome/73.0.3683.86 + ipInfo: + data: + v4: + address: 94.142.239.124 + geolocation: + accuracyRadius: 20 + latitude: 50.05 + longitude: 14.4 + postalCode: 150 00 + timezone: Europe/Prague + city: + name: Prague + country: + code: CZ + name: Czechia + continent: + code: EU + name: Europe + subdivisions: + - isoCode: '10' + name: Hlavni mesto Praha + rootApps: + data: + result: false + emulator: + data: + result: false + ipBlocklist: + data: + result: false + details: + emailSpam: false + attackSource: false + tor: + data: + result: false + vpn: + data: + result: false + methods: + timezoneMismatch: false + publicVPN: false + proxy: + data: + result: false + tampering: + data: + result: false + anomalyScore: 0 responses: default: description: The server doesn't validate the answer. @@ -3295,17 +3451,111 @@ components: properties: visitorId: type: string + example: 3HNey93AkBW6CRbxV6xP clientReferrer: type: string + example: https://google.com?search=banking+services + userAgent: + type: string + example: >- + Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 + (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 + bot: + $ref: '#/components/schemas/BotdDetectionResult' + ipInfo: + title: SignalResponseIpInfo + type: object + properties: + data: + $ref: '#/components/schemas/IpInfoResult' + incognito: + description: Flag if user used incognito session. + type: boolean + rootApps: + title: SignalResponseRootApps + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + Android specific root management apps detection. There are 2 + values: • `true` - Root Management Apps detected (e.g. + Magisk) • `false` - No Root Management Apps detected + + Available only for events from Android client. The field + will be empty for a browser/iOS event. + example: false + emulator: + title: SignalResponseEmulator + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + Android specific emulator detection. There are 2 values: • + `true` - Emulated environment detected (e.g. launch inside + of AVD) • `false` - No signs of emulated environment + detected + + Available only for events from Android client. The field + will be empty for a browser/iOS event. + example: false + ipBlocklist: + title: SignalResponseIpBlocklist + type: object + properties: + data: + $ref: '#/components/schemas/IpBlockListResult' + tor: + title: SignalResponseTor + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + `true` if the request IP address is a known tor exit node, + `false` otherwise. + example: false + vpn: + title: SignalResponseVpn + type: object + properties: + data: + $ref: '#/components/schemas/VpnResult' + proxy: + title: SignalResponseProxy + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + `true` if the request IP address is used by a public proxy + provider, `false` otherwise. + example: false + tampering: + title: SignalResponseTampering + type: object + properties: + data: + $ref: '#/components/schemas/TamperingResult' requestId: description: Unique identifier of the user's identification request. type: string example: 1654815516083.OX6kx8 browserDetails: $ref: '#/components/schemas/BrowserDetails' - incognito: - description: Flag if user used incognito session. - type: boolean ip: type: string format: ipv4 @@ -3679,7 +3929,123 @@ components: data: $ref: '#/components/schemas/BotdResult' error: - $ref: '#/components/schemas/BotdError' + $ref: '#/components/schemas/ProductError' + ipInfo: + title: SignalResponseIpInfo + type: object + properties: + data: + $ref: '#/components/schemas/IpInfoResult' + error: + $ref: '#/components/schemas/ProductError' + incognito: + title: SignalResponseIncognito + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + `true` if we detected incognito mode used in the browser, + `false` otherwise. + example: false + error: + $ref: '#/components/schemas/ProductError' + rootApps: + title: SignalResponseRootApps + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + Android specific root management apps detection. There are 2 + values: • `true` - Root Management Apps detected (e.g. + Magisk) • `false` - No Root Management Apps detected + + Available only for events from Android client. The field + will be empty for a browser/iOS event. + example: false + error: + $ref: '#/components/schemas/ProductError' + emulator: + title: SignalResponseEmulator + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + Android specific emulator detection. There are 2 values: • + `true` - Emulated environment detected (e.g. launch inside + of AVD) • `false` - No signs of emulated environment + detected + + Available only for events from Android client. The field + will be empty for a browser/iOS event. + example: false + error: + $ref: '#/components/schemas/ProductError' + ipBlocklist: + title: SignalResponseIpBlocklist + type: object + properties: + data: + $ref: '#/components/schemas/IpBlockListResult' + error: + $ref: '#/components/schemas/ProductError' + tor: + title: SignalResponseTor + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + `true` if the request IP address is a known tor exit node, + `false` otherwise. + example: false + error: + $ref: '#/components/schemas/ProductError' + vpn: + title: SignalResponseVpn + type: object + properties: + data: + $ref: '#/components/schemas/VpnResult' + error: + $ref: '#/components/schemas/ProductError' + proxy: + title: SignalResponseProxy + type: object + properties: + data: + type: object + properties: + result: + type: boolean + description: > + `true` if the request IP address is used by a public proxy + provider, `false` otherwise. + example: false + error: + $ref: '#/components/schemas/ProductError' + tampering: + title: SignalResponseTampering + type: object + properties: + data: + $ref: '#/components/schemas/TamperingResult' + error: + $ref: '#/components/schemas/ProductError' EventResponse: description: >- Contains event from activated products - Fingerprint Pro or Bot @@ -3732,6 +4098,14 @@ components: type: string format: uri-reference example: https://example.com/login + userAgent: + type: string + example: >- + Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 + (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 + requestId: + type: string + example: 1681392853693.lRiBBD bot: $ref: '#/components/schemas/BotdDetectionResult' required: @@ -3755,13 +4129,103 @@ components: - notDetected - good - bad - example: - result: notDetected + example: bad + type: + type: string + example: selenium required: - result - BotdError: + IpInfoResult: type: object + description: >- + Details about the request IP address. Has separate fields for v4 and v6 + IP address versions. additionalProperties: false + properties: + v4: + type: object + additionalProperties: false + properties: + address: + type: string + format: ipv4 + example: 94.142.239.124 + geolocation: + $ref: '#/components/schemas/IPLocation' + v6: + type: object + additionalProperties: false + properties: + address: + type: string + format: ipv6 + example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 + geolocation: + $ref: '#/components/schemas/IPLocation' + IpBlockListResult: + type: object + properties: + result: + type: boolean + description: > + `true` if request IP address is part of any database that we use to + search for known malicious actors, `false` otherwise. + example: false + details: + type: object + properties: + emailSpam: + type: boolean + description: IP address was part of a known email spam attack (SMTP). + example: false + attackSource: + type: boolean + description: IP address was part of a known network attack (SSH/HTTPS). + example: false + VpnResult: + type: object + properties: + result: + type: boolean + description: >- + VPN or other anonymising service has been used when sending the + request. + example: false + methods: + type: object + properties: + timezoneMismatch: + type: boolean + description: >- + User's browser timezone doesn't match the timezone from which + the request was originally made. + example: false + publicVPN: + type: boolean + description: >- + Request IP address is owned and used by a public VPN service + provider. + example: false + TamperingResult: + type: object + properties: + result: + type: boolean + description: >- + Flag indicating whether browser tampering was detected according to + our internal thresholds. + example: false + anomalyScore: + type: number + description: >- + Confidence score (`0.0 - 1.0`) for the tampering detection. Values + above `0.5` suggest that we're reasonably sure there was a tampering + attempt. Values below `0.5` are genuine browsers. + example: 0 + minimum: 0 + maximum: 1 + ProductError: + type: object properties: code: type: string diff --git a/sdk/model_botd_detection_result.go b/sdk/model_botd_detection_result.go index f4d946f..065c16b 100644 --- a/sdk/model_botd_detection_result.go +++ b/sdk/model_botd_detection_result.go @@ -13,4 +13,5 @@ package sdk type BotdDetectionResult struct { // Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on Result string `json:"result"` + Type_ string `json:"type,omitempty"` } diff --git a/sdk/model_botd_result.go b/sdk/model_botd_result.go index f318034..fc07e58 100644 --- a/sdk/model_botd_result.go +++ b/sdk/model_botd_result.go @@ -20,6 +20,8 @@ type BotdResult struct { // Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible Time *time.Time `json:"time"` // Page URL from which identification request was sent. - Url string `json:"url"` - Bot *BotdDetectionResult `json:"bot"` + Url string `json:"url"` + UserAgent string `json:"userAgent,omitempty"` + RequestId string `json:"requestId,omitempty"` + Bot *BotdDetectionResult `json:"bot"` } diff --git a/sdk/model_error_response.go b/sdk/model_error_response.go deleted file mode 100644 index 1f0fa7a..0000000 --- a/sdk/model_error_response.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Fingerprint Pro Server API - * - * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. - * - * API version: 3 - * Contact: support@fingerprint.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package sdk - -type ErrorResponse struct { - Error_ *ErrorResponseError `json:"error,omitempty"` -} diff --git a/sdk/model_error_response_error.go b/sdk/model_error_response_error.go deleted file mode 100644 index 59126f0..0000000 --- a/sdk/model_error_response_error.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Fingerprint Pro Server API - * - * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. - * - * API version: 3 - * Contact: support@fingerprint.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package sdk - -type ErrorResponseError struct { - Code string `json:"code,omitempty"` - Message string `json:"message,omitempty"` -} diff --git a/sdk/model_ip_block_list_result.go b/sdk/model_ip_block_list_result.go new file mode 100644 index 0000000..d36e788 --- /dev/null +++ b/sdk/model_ip_block_list_result.go @@ -0,0 +1,16 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type IpBlockListResult struct { + // `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. + Result bool `json:"result,omitempty"` + Details *IpBlockListResultDetails `json:"details,omitempty"` +} diff --git a/sdk/model_ip_block_list_result_details.go b/sdk/model_ip_block_list_result_details.go new file mode 100644 index 0000000..d774ed3 --- /dev/null +++ b/sdk/model_ip_block_list_result_details.go @@ -0,0 +1,17 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type IpBlockListResultDetails struct { + // IP address was part of a known email spam attack (SMTP). + EmailSpam bool `json:"emailSpam,omitempty"` + // IP address was part of a known network attack (SSH/HTTPS). + AttackSource bool `json:"attackSource,omitempty"` +} diff --git a/sdk/model_ip_info_result.go b/sdk/model_ip_info_result.go new file mode 100644 index 0000000..4f6de39 --- /dev/null +++ b/sdk/model_ip_info_result.go @@ -0,0 +1,16 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +// Details about the request IP address. Has separate fields for v4 and v6 IP address versions. +type IpInfoResult struct { + V4 *IpInfoResultV4 `json:"v4,omitempty"` + V6 *IpInfoResultV6 `json:"v6,omitempty"` +} diff --git a/sdk/model_ip_info_result_v4.go b/sdk/model_ip_info_result_v4.go new file mode 100644 index 0000000..acd8aa5 --- /dev/null +++ b/sdk/model_ip_info_result_v4.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type IpInfoResultV4 struct { + Address string `json:"address,omitempty"` + Geolocation *IpLocation `json:"geolocation,omitempty"` +} diff --git a/sdk/model_ip_info_result_v6.go b/sdk/model_ip_info_result_v6.go new file mode 100644 index 0000000..a2cb723 --- /dev/null +++ b/sdk/model_ip_info_result_v6.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type IpInfoResultV6 struct { + Address string `json:"address,omitempty"` + Geolocation *IpLocation `json:"geolocation,omitempty"` +} diff --git a/sdk/model_botd_error.go b/sdk/model_product_error.go similarity index 95% rename from sdk/model_botd_error.go rename to sdk/model_product_error.go index 32ca9d9..770f583 100644 --- a/sdk/model_botd_error.go +++ b/sdk/model_product_error.go @@ -9,7 +9,7 @@ */ package sdk -type BotdError struct { +type ProductError struct { // Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error Code string `json:"code"` Message string `json:"message"` diff --git a/sdk/model_products_response.go b/sdk/model_products_response.go index c40658a..753f4d4 100644 --- a/sdk/model_products_response.go +++ b/sdk/model_products_response.go @@ -13,4 +13,13 @@ package sdk type ProductsResponse struct { Identification *ProductsResponseIdentification `json:"identification,omitempty"` Botd *ProductsResponseBotd `json:"botd,omitempty"` + IpInfo *SignalResponseIpInfo1 `json:"ipInfo,omitempty"` + Incognito *SignalResponseIncognito `json:"incognito,omitempty"` + RootApps *SignalResponseRootApps1 `json:"rootApps,omitempty"` + Emulator *SignalResponseEmulator1 `json:"emulator,omitempty"` + IpBlocklist *SignalResponseIpBlocklist1 `json:"ipBlocklist,omitempty"` + Tor *SignalResponseTor1 `json:"tor,omitempty"` + Vpn *SignalResponseVpn1 `json:"vpn,omitempty"` + Proxy *SignalResponseProxy1 `json:"proxy,omitempty"` + Tampering *SignalResponseTampering1 `json:"tampering,omitempty"` } diff --git a/sdk/model_products_response_botd.go b/sdk/model_products_response_botd.go index 25c91aa..fb77a08 100644 --- a/sdk/model_products_response_botd.go +++ b/sdk/model_products_response_botd.go @@ -10,6 +10,6 @@ package sdk type ProductsResponseBotd struct { - Data *BotdResult `json:"data,omitempty"` - Error_ *BotdError `json:"error,omitempty"` + Data *BotdResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_emulator.go b/sdk/model_signal_response_emulator.go new file mode 100644 index 0000000..573af59 --- /dev/null +++ b/sdk/model_signal_response_emulator.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseEmulator struct { + Data *SignalResponseEmulatorData `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_emulator_1.go b/sdk/model_signal_response_emulator_1.go new file mode 100644 index 0000000..fb35571 --- /dev/null +++ b/sdk/model_signal_response_emulator_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseEmulator1 struct { + Data *SignalResponseEmulatorData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_emulator_data.go b/sdk/model_signal_response_emulator_data.go new file mode 100644 index 0000000..a64ba7f --- /dev/null +++ b/sdk/model_signal_response_emulator_data.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseEmulatorData struct { + // Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will be empty for a browser/iOS event. + Result bool `json:"result,omitempty"` +} diff --git a/sdk/model_signal_response_incognito.go b/sdk/model_signal_response_incognito.go new file mode 100644 index 0000000..6f9569a --- /dev/null +++ b/sdk/model_signal_response_incognito.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseIncognito struct { + Data *SignalResponseIncognitoData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_incognito_data.go b/sdk/model_signal_response_incognito_data.go new file mode 100644 index 0000000..ebd3479 --- /dev/null +++ b/sdk/model_signal_response_incognito_data.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseIncognitoData struct { + // `true` if we detected incognito mode used in the browser, `false` otherwise. + Result bool `json:"result,omitempty"` +} diff --git a/sdk/model_signal_response_ip_blocklist.go b/sdk/model_signal_response_ip_blocklist.go new file mode 100644 index 0000000..6a47533 --- /dev/null +++ b/sdk/model_signal_response_ip_blocklist.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseIpBlocklist struct { + Data *IpBlockListResult `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_ip_blocklist_1.go b/sdk/model_signal_response_ip_blocklist_1.go new file mode 100644 index 0000000..6cfc06f --- /dev/null +++ b/sdk/model_signal_response_ip_blocklist_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseIpBlocklist1 struct { + Data *IpBlockListResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_ip_info.go b/sdk/model_signal_response_ip_info.go new file mode 100644 index 0000000..d73cc73 --- /dev/null +++ b/sdk/model_signal_response_ip_info.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseIpInfo struct { + Data *IpInfoResult `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_ip_info_1.go b/sdk/model_signal_response_ip_info_1.go new file mode 100644 index 0000000..319e5ec --- /dev/null +++ b/sdk/model_signal_response_ip_info_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseIpInfo1 struct { + Data *IpInfoResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_proxy.go b/sdk/model_signal_response_proxy.go new file mode 100644 index 0000000..2581c8a --- /dev/null +++ b/sdk/model_signal_response_proxy.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseProxy struct { + Data *SignalResponseProxyData `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_proxy_1.go b/sdk/model_signal_response_proxy_1.go new file mode 100644 index 0000000..e766d2a --- /dev/null +++ b/sdk/model_signal_response_proxy_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseProxy1 struct { + Data *SignalResponseProxyData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_proxy_data.go b/sdk/model_signal_response_proxy_data.go new file mode 100644 index 0000000..15366ce --- /dev/null +++ b/sdk/model_signal_response_proxy_data.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseProxyData struct { + // `true` if the request IP address is used by a public proxy provider, `false` otherwise. + Result bool `json:"result,omitempty"` +} diff --git a/sdk/model_signal_response_root_apps.go b/sdk/model_signal_response_root_apps.go new file mode 100644 index 0000000..ff4cf58 --- /dev/null +++ b/sdk/model_signal_response_root_apps.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseRootApps struct { + Data *SignalResponseRootAppsData `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_root_apps_1.go b/sdk/model_signal_response_root_apps_1.go new file mode 100644 index 0000000..561b247 --- /dev/null +++ b/sdk/model_signal_response_root_apps_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseRootApps1 struct { + Data *SignalResponseRootAppsData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_root_apps_data.go b/sdk/model_signal_response_root_apps_data.go new file mode 100644 index 0000000..968253a --- /dev/null +++ b/sdk/model_signal_response_root_apps_data.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseRootAppsData struct { + // Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will be empty for a browser/iOS event. + Result bool `json:"result,omitempty"` +} diff --git a/sdk/model_signal_response_tampering.go b/sdk/model_signal_response_tampering.go new file mode 100644 index 0000000..f866172 --- /dev/null +++ b/sdk/model_signal_response_tampering.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseTampering struct { + Data *TamperingResult `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_tampering_1.go b/sdk/model_signal_response_tampering_1.go new file mode 100644 index 0000000..578685a --- /dev/null +++ b/sdk/model_signal_response_tampering_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseTampering1 struct { + Data *TamperingResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_tor.go b/sdk/model_signal_response_tor.go new file mode 100644 index 0000000..d75ceb0 --- /dev/null +++ b/sdk/model_signal_response_tor.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseTor struct { + Data *SignalResponseTorData `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_tor_1.go b/sdk/model_signal_response_tor_1.go new file mode 100644 index 0000000..cc52eaa --- /dev/null +++ b/sdk/model_signal_response_tor_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseTor1 struct { + Data *SignalResponseTorData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_signal_response_tor_data.go b/sdk/model_signal_response_tor_data.go new file mode 100644 index 0000000..342ad0b --- /dev/null +++ b/sdk/model_signal_response_tor_data.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseTorData struct { + // `true` if the request IP address is a known tor exit node, `false` otherwise. + Result bool `json:"result,omitempty"` +} diff --git a/sdk/model_signal_response_vpn.go b/sdk/model_signal_response_vpn.go new file mode 100644 index 0000000..ff333a9 --- /dev/null +++ b/sdk/model_signal_response_vpn.go @@ -0,0 +1,14 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseVpn struct { + Data *VpnResult `json:"data,omitempty"` +} diff --git a/sdk/model_signal_response_vpn_1.go b/sdk/model_signal_response_vpn_1.go new file mode 100644 index 0000000..bf3aaec --- /dev/null +++ b/sdk/model_signal_response_vpn_1.go @@ -0,0 +1,15 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type SignalResponseVpn1 struct { + Data *VpnResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` +} diff --git a/sdk/model_st_seen_at.go b/sdk/model_st_seen_at.go deleted file mode 100644 index 93abfbc..0000000 --- a/sdk/model_st_seen_at.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Fingerprint Pro Server API - * - * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. - * - * API version: 3 - * Contact: support@fingerprint.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package sdk - -import ( - "time" -) - -type StSeenAt struct { - Global *time.Time `json:"global"` - Subscription *time.Time `json:"subscription"` -} diff --git a/sdk/model_tampering_result.go b/sdk/model_tampering_result.go new file mode 100644 index 0000000..299b53a --- /dev/null +++ b/sdk/model_tampering_result.go @@ -0,0 +1,17 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type TamperingResult struct { + // Flag indicating whether browser tampering was detected according to our internal thresholds. + Result bool `json:"result,omitempty"` + // Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. + AnomalyScore float64 `json:"anomalyScore,omitempty"` +} diff --git a/sdk/model_vpn_result.go b/sdk/model_vpn_result.go new file mode 100644 index 0000000..a689d63 --- /dev/null +++ b/sdk/model_vpn_result.go @@ -0,0 +1,16 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type VpnResult struct { + // VPN or other anonymising service has been used when sending the request. + Result bool `json:"result,omitempty"` + Methods *VpnResultMethods `json:"methods,omitempty"` +} diff --git a/sdk/model_vpn_result_methods.go b/sdk/model_vpn_result_methods.go new file mode 100644 index 0000000..a7583fd --- /dev/null +++ b/sdk/model_vpn_result_methods.go @@ -0,0 +1,17 @@ +/* + * Fingerprint Pro Server API + * + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. + * + * API version: 3 + * Contact: support@fingerprint.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package sdk + +type VpnResultMethods struct { + // User's browser timezone doesn't match the timezone from which the request was originally made. + TimezoneMismatch bool `json:"timezoneMismatch,omitempty"` + // Request IP address is owned and used by a public VPN service provider. + PublicVPN bool `json:"publicVPN,omitempty"` +} diff --git a/sdk/model_webhook_visit.go b/sdk/model_webhook_visit.go index 17f25f1..d247b7b 100644 --- a/sdk/model_webhook_visit.go +++ b/sdk/model_webhook_visit.go @@ -14,15 +14,25 @@ import ( ) type WebhookVisit struct { - VisitorId string `json:"visitorId"` - ClientReferrer string `json:"clientReferrer,omitempty"` + VisitorId string `json:"visitorId"` + ClientReferrer string `json:"clientReferrer,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Bot *BotdDetectionResult `json:"bot,omitempty"` + IpInfo *SignalResponseIpInfo `json:"ipInfo,omitempty"` + // Flag if user used incognito session. + Incognito bool `json:"incognito"` + RootApps *SignalResponseRootApps `json:"rootApps,omitempty"` + Emulator *SignalResponseEmulator `json:"emulator,omitempty"` + IpBlocklist *SignalResponseIpBlocklist `json:"ipBlocklist,omitempty"` + Tor *SignalResponseTor `json:"tor,omitempty"` + Vpn *SignalResponseVpn `json:"vpn,omitempty"` + Proxy *SignalResponseProxy `json:"proxy,omitempty"` + Tampering *SignalResponseTampering `json:"tampering,omitempty"` // Unique identifier of the user's identification request. RequestId string `json:"requestId"` BrowserDetails *BrowserDetails `json:"browserDetails"` - // Flag if user used incognito session. - Incognito bool `json:"incognito"` - Ip string `json:"ip"` - IpLocation *IpLocation `json:"ipLocation"` + Ip string `json:"ip"` + IpLocation *IpLocation `json:"ipLocation"` // Timestamp of the event with millisecond precision in Unix time. Timestamp int64 `json:"timestamp"` // Time expressed according to ISO 8601 in UTC format. diff --git a/test/GetEvent_test.go b/test/GetEvent_test.go index d95b39a..21091db 100644 --- a/test/GetEvent_test.go +++ b/test/GetEvent_test.go @@ -54,6 +54,47 @@ func TestReturnsEvent(t *testing.T) { assert.Equal(t, res, mockResponse) } +func TestReturnsEventWithErrorsInAllSignals(t *testing.T) { + mockResponse := GetMockEventResponse("../test/mocks/get_event_all_errors.json") + + ts := httptest.NewServer(http.HandlerFunc(func( + w http.ResponseWriter, + r *http.Request, + ) { + configFile := config.ReadConfig("../config.json") + integrationInfo := r.URL.Query().Get("ii") + assert.Equal(t, integrationInfo, fmt.Sprintf("fingerprint-pro-server-go-sdk/%s", configFile.PackageVersion)) + assert.Equal(t, r.URL.Path, "/events/123") + + apiKey := r.Header.Get("Auth-Api-Key") + assert.Equal(t, apiKey, "api_key") + + w.Header().Set("Content-Type", "application/json") + + err := json.NewEncoder(w).Encode(mockResponse) + + if err != nil { + log.Fatal(err) + } + })) + defer ts.Close() + + cfg := sdk.NewConfiguration() + cfg.ChangeBasePath(ts.URL) + + client := sdk.NewAPIClient(cfg) + + ctx := context.WithValue(context.Background(), sdk.ContextAPIKey, sdk.APIKey{ + Key: "api_key", + }) + + res, _, err := client.FingerprintApi.GetEvent(ctx, "123") + + assert.NoError(t, err) + assert.NotNil(t, res) + assert.Equal(t, res, mockResponse) +} + func TestReturnsEventWithUnexpectedFields(t *testing.T) { mockResponse := GetMockEventResponse("../test/mocks/get_event_extra_fields.json") diff --git a/test/mocks/get_event_all_errors.json b/test/mocks/get_event_all_errors.json new file mode 100644 index 0000000..8966391 --- /dev/null +++ b/test/mocks/get_event_all_errors.json @@ -0,0 +1,70 @@ +{ + "products": { + "identification": { + "error": { + "code": "Failed", + "message": "failed" + } + }, + "botd": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "ipInfo": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "incognito": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "rootApps": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "emulator": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "ipBlocklist": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "tor": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "vpn": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "proxy": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "tampering": { + "error": { + "code": "Failed", + "message": "internal server error" + } + } + } +} From 54f2085449eb172ca8db511f2ad62051640101fd Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 10 May 2023 18:51:52 +0200 Subject: [PATCH 4/4] fix: update schema with correct Webhook Signals description --- README.md | 12 +- docs/ProductsResponse.md | 16 +- docs/SignalResponseEmulator.md | 1 + docs/SignalResponseEmulator1.md | 10 - docs/SignalResponseEmulatorData.md | 2 +- docs/SignalResponseIpBlocklist.md | 1 + docs/SignalResponseIpBlocklist1.md | 10 - docs/SignalResponseIpInfo.md | 1 + docs/SignalResponseProxy.md | 1 + docs/SignalResponseProxy1.md | 10 - docs/SignalResponseRootApps.md | 1 + docs/SignalResponseRootApps1.md | 10 - docs/SignalResponseRootAppsData.md | 2 +- docs/SignalResponseTampering.md | 1 + docs/SignalResponseTampering1.md | 10 - docs/SignalResponseTor.md | 1 + docs/SignalResponseTor1.md | 10 - docs/SignalResponseVpn.md | 1 + docs/WebhookSignalResponseEmulator.md | 9 + ...Info1.md => WebhookSignalResponseProxy.md} | 5 +- docs/WebhookSignalResponseRootApps.md | 9 + ...nseVpn1.md => WebhookSignalResponseTor.md} | 5 +- docs/WebhookVisit.md | 16 +- res/fingerprint-server-api.yaml | 183 +++++++----------- sdk/model_products_response.go | 16 +- sdk/model_signal_response_emulator.go | 3 +- sdk/model_signal_response_emulator_data.go | 2 +- sdk/model_signal_response_ip_blocklist.go | 3 +- sdk/model_signal_response_ip_info.go | 3 +- sdk/model_signal_response_proxy.go | 3 +- sdk/model_signal_response_root_apps.go | 3 +- sdk/model_signal_response_root_apps_1.go | 15 -- sdk/model_signal_response_root_apps_data.go | 2 +- sdk/model_signal_response_tampering.go | 3 +- sdk/model_signal_response_tampering_1.go | 15 -- sdk/model_signal_response_tor.go | 3 +- sdk/model_signal_response_tor_1.go | 15 -- sdk/model_signal_response_vpn.go | 3 +- sdk/model_signal_response_vpn_1.go | 15 -- ...model_webhook_signal_response_emulator.go} | 6 +- ...=> model_webhook_signal_response_proxy.go} | 6 +- ...odel_webhook_signal_response_root_apps.go} | 6 +- ...o => model_webhook_signal_response_tor.go} | 6 +- sdk/model_webhook_visit.go | 26 +-- test/mocks/get_event.json | 83 +++++++- test/mocks/webhook.json | 64 ++++++ 46 files changed, 322 insertions(+), 306 deletions(-) delete mode 100644 docs/SignalResponseEmulator1.md delete mode 100644 docs/SignalResponseIpBlocklist1.md delete mode 100644 docs/SignalResponseProxy1.md delete mode 100644 docs/SignalResponseRootApps1.md delete mode 100644 docs/SignalResponseTampering1.md delete mode 100644 docs/SignalResponseTor1.md create mode 100644 docs/WebhookSignalResponseEmulator.md rename docs/{SignalResponseIpInfo1.md => WebhookSignalResponseProxy.md} (58%) create mode 100644 docs/WebhookSignalResponseRootApps.md rename docs/{SignalResponseVpn1.md => WebhookSignalResponseTor.md} (60%) delete mode 100644 sdk/model_signal_response_root_apps_1.go delete mode 100644 sdk/model_signal_response_tampering_1.go delete mode 100644 sdk/model_signal_response_tor_1.go delete mode 100644 sdk/model_signal_response_vpn_1.go rename sdk/{model_signal_response_proxy_1.go => model_webhook_signal_response_emulator.go} (52%) rename sdk/{model_signal_response_ip_blocklist_1.go => model_webhook_signal_response_proxy.go} (70%) rename sdk/{model_signal_response_ip_info_1.go => model_webhook_signal_response_root_apps.go} (52%) rename sdk/{model_signal_response_emulator_1.go => model_webhook_signal_response_tor.go} (71%) diff --git a/README.md b/README.md index ac8ac49..edaffc5 100644 --- a/README.md +++ b/README.md @@ -156,32 +156,28 @@ Class | Method | HTTP request | Description - [ResponseVisits](docs/ResponseVisits.md) - [SeenAt](docs/SeenAt.md) - [SignalResponseEmulator](docs/SignalResponseEmulator.md) - - [SignalResponseEmulator1](docs/SignalResponseEmulator1.md) - [SignalResponseEmulatorData](docs/SignalResponseEmulatorData.md) - [SignalResponseIncognito](docs/SignalResponseIncognito.md) - [SignalResponseIncognitoData](docs/SignalResponseIncognitoData.md) - [SignalResponseIpBlocklist](docs/SignalResponseIpBlocklist.md) - - [SignalResponseIpBlocklist1](docs/SignalResponseIpBlocklist1.md) - [SignalResponseIpInfo](docs/SignalResponseIpInfo.md) - - [SignalResponseIpInfo1](docs/SignalResponseIpInfo1.md) - [SignalResponseProxy](docs/SignalResponseProxy.md) - - [SignalResponseProxy1](docs/SignalResponseProxy1.md) - [SignalResponseProxyData](docs/SignalResponseProxyData.md) - [SignalResponseRootApps](docs/SignalResponseRootApps.md) - - [SignalResponseRootApps1](docs/SignalResponseRootApps1.md) - [SignalResponseRootAppsData](docs/SignalResponseRootAppsData.md) - [SignalResponseTampering](docs/SignalResponseTampering.md) - - [SignalResponseTampering1](docs/SignalResponseTampering1.md) - [SignalResponseTor](docs/SignalResponseTor.md) - - [SignalResponseTor1](docs/SignalResponseTor1.md) - [SignalResponseTorData](docs/SignalResponseTorData.md) - [SignalResponseVpn](docs/SignalResponseVpn.md) - - [SignalResponseVpn1](docs/SignalResponseVpn1.md) - [Subdivision](docs/Subdivision.md) - [TamperingResult](docs/TamperingResult.md) - [Visit](docs/Visit.md) - [VpnResult](docs/VpnResult.md) - [VpnResultMethods](docs/VpnResultMethods.md) + - [WebhookSignalResponseEmulator](docs/WebhookSignalResponseEmulator.md) + - [WebhookSignalResponseProxy](docs/WebhookSignalResponseProxy.md) + - [WebhookSignalResponseRootApps](docs/WebhookSignalResponseRootApps.md) + - [WebhookSignalResponseTor](docs/WebhookSignalResponseTor.md) - [WebhookVisit](docs/WebhookVisit.md) ## Documentation For Authorization diff --git a/docs/ProductsResponse.md b/docs/ProductsResponse.md index 074153a..408dc22 100644 --- a/docs/ProductsResponse.md +++ b/docs/ProductsResponse.md @@ -5,15 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Identification** | [***ProductsResponseIdentification**](ProductsResponseIdentification.md) | | [optional] [default to null] **Botd** | [***ProductsResponseBotd**](ProductsResponseBotd.md) | | [optional] [default to null] -**IpInfo** | [***SignalResponseIpInfo1**](SignalResponseIpInfo_1.md) | | [optional] [default to null] +**IpInfo** | [***SignalResponseIpInfo**](SignalResponseIpInfo.md) | | [optional] [default to null] **Incognito** | [***SignalResponseIncognito**](SignalResponseIncognito.md) | | [optional] [default to null] -**RootApps** | [***SignalResponseRootApps1**](SignalResponseRootApps_1.md) | | [optional] [default to null] -**Emulator** | [***SignalResponseEmulator1**](SignalResponseEmulator_1.md) | | [optional] [default to null] -**IpBlocklist** | [***SignalResponseIpBlocklist1**](SignalResponseIpBlocklist_1.md) | | [optional] [default to null] -**Tor** | [***SignalResponseTor1**](SignalResponseTor_1.md) | | [optional] [default to null] -**Vpn** | [***SignalResponseVpn1**](SignalResponseVpn_1.md) | | [optional] [default to null] -**Proxy** | [***SignalResponseProxy1**](SignalResponseProxy_1.md) | | [optional] [default to null] -**Tampering** | [***SignalResponseTampering1**](SignalResponseTampering_1.md) | | [optional] [default to null] +**RootApps** | [***SignalResponseRootApps**](SignalResponseRootApps.md) | | [optional] [default to null] +**Emulator** | [***SignalResponseEmulator**](SignalResponseEmulator.md) | | [optional] [default to null] +**IpBlocklist** | [***SignalResponseIpBlocklist**](SignalResponseIpBlocklist.md) | | [optional] [default to null] +**Tor** | [***SignalResponseTor**](SignalResponseTor.md) | | [optional] [default to null] +**Vpn** | [***SignalResponseVpn**](SignalResponseVpn.md) | | [optional] [default to null] +**Proxy** | [***SignalResponseProxy**](SignalResponseProxy.md) | | [optional] [default to null] +**Tampering** | [***SignalResponseTampering**](SignalResponseTampering.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseEmulator.md b/docs/SignalResponseEmulator.md index b6564a1..74db5d8 100644 --- a/docs/SignalResponseEmulator.md +++ b/docs/SignalResponseEmulator.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***SignalResponseEmulatorData**](SignalResponseEmulator_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseEmulator1.md b/docs/SignalResponseEmulator1.md deleted file mode 100644 index 1cbaac3..0000000 --- a/docs/SignalResponseEmulator1.md +++ /dev/null @@ -1,10 +0,0 @@ -# SignalResponseEmulator1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [***SignalResponseEmulatorData**](SignalResponseEmulator_data.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/SignalResponseEmulatorData.md b/docs/SignalResponseEmulatorData.md index ff998bc..60c9077 100644 --- a/docs/SignalResponseEmulatorData.md +++ b/docs/SignalResponseEmulatorData.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Result** | **bool** | Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will be empty for a browser/iOS event. | [optional] [default to null] +**Result** | **bool** | Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseIpBlocklist.md b/docs/SignalResponseIpBlocklist.md index d9c954f..08b69d4 100644 --- a/docs/SignalResponseIpBlocklist.md +++ b/docs/SignalResponseIpBlocklist.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***IpBlockListResult**](IpBlockListResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseIpBlocklist1.md b/docs/SignalResponseIpBlocklist1.md deleted file mode 100644 index b0605d2..0000000 --- a/docs/SignalResponseIpBlocklist1.md +++ /dev/null @@ -1,10 +0,0 @@ -# SignalResponseIpBlocklist1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [***IpBlockListResult**](IpBlockListResult.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/SignalResponseIpInfo.md b/docs/SignalResponseIpInfo.md index 1435e9a..1c7a569 100644 --- a/docs/SignalResponseIpInfo.md +++ b/docs/SignalResponseIpInfo.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***IpInfoResult**](IpInfoResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseProxy.md b/docs/SignalResponseProxy.md index 9790882..7af3db9 100644 --- a/docs/SignalResponseProxy.md +++ b/docs/SignalResponseProxy.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***SignalResponseProxyData**](SignalResponseProxy_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseProxy1.md b/docs/SignalResponseProxy1.md deleted file mode 100644 index 89483e6..0000000 --- a/docs/SignalResponseProxy1.md +++ /dev/null @@ -1,10 +0,0 @@ -# SignalResponseProxy1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [***SignalResponseProxyData**](SignalResponseProxy_data.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/SignalResponseRootApps.md b/docs/SignalResponseRootApps.md index 40bc583..cad935c 100644 --- a/docs/SignalResponseRootApps.md +++ b/docs/SignalResponseRootApps.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***SignalResponseRootAppsData**](SignalResponseRootApps_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseRootApps1.md b/docs/SignalResponseRootApps1.md deleted file mode 100644 index fd0781c..0000000 --- a/docs/SignalResponseRootApps1.md +++ /dev/null @@ -1,10 +0,0 @@ -# SignalResponseRootApps1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [***SignalResponseRootAppsData**](SignalResponseRootApps_data.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/SignalResponseRootAppsData.md b/docs/SignalResponseRootAppsData.md index f9981a9..26cd616 100644 --- a/docs/SignalResponseRootAppsData.md +++ b/docs/SignalResponseRootAppsData.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Result** | **bool** | Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will be empty for a browser/iOS event. | [optional] [default to null] +**Result** | **bool** | Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseTampering.md b/docs/SignalResponseTampering.md index 52a93ea..2a4ab59 100644 --- a/docs/SignalResponseTampering.md +++ b/docs/SignalResponseTampering.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***TamperingResult**](TamperingResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseTampering1.md b/docs/SignalResponseTampering1.md deleted file mode 100644 index 914f67f..0000000 --- a/docs/SignalResponseTampering1.md +++ /dev/null @@ -1,10 +0,0 @@ -# SignalResponseTampering1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [***TamperingResult**](TamperingResult.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/SignalResponseTor.md b/docs/SignalResponseTor.md index 752a5dd..4562225 100644 --- a/docs/SignalResponseTor.md +++ b/docs/SignalResponseTor.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***SignalResponseTorData**](SignalResponseTor_data.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalResponseTor1.md b/docs/SignalResponseTor1.md deleted file mode 100644 index 9c8e5f8..0000000 --- a/docs/SignalResponseTor1.md +++ /dev/null @@ -1,10 +0,0 @@ -# SignalResponseTor1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [***SignalResponseTorData**](SignalResponseTor_data.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/SignalResponseVpn.md b/docs/SignalResponseVpn.md index dcfe34c..59f53be 100644 --- a/docs/SignalResponseVpn.md +++ b/docs/SignalResponseVpn.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [***VpnResult**](VpnResult.md) | | [optional] [default to null] +**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookSignalResponseEmulator.md b/docs/WebhookSignalResponseEmulator.md new file mode 100644 index 0000000..06231bf --- /dev/null +++ b/docs/WebhookSignalResponseEmulator.md @@ -0,0 +1,9 @@ +# WebhookSignalResponseEmulator + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseIpInfo1.md b/docs/WebhookSignalResponseProxy.md similarity index 58% rename from docs/SignalResponseIpInfo1.md rename to docs/WebhookSignalResponseProxy.md index 546d691..0017678 100644 --- a/docs/SignalResponseIpInfo1.md +++ b/docs/WebhookSignalResponseProxy.md @@ -1,10 +1,9 @@ -# SignalResponseIpInfo1 +# WebhookSignalResponseProxy ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [***IpInfoResult**](IpInfoResult.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] +**Result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookSignalResponseRootApps.md b/docs/WebhookSignalResponseRootApps.md new file mode 100644 index 0000000..697884c --- /dev/null +++ b/docs/WebhookSignalResponseRootApps.md @@ -0,0 +1,9 @@ +# WebhookSignalResponseRootApps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **bool** | Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SignalResponseVpn1.md b/docs/WebhookSignalResponseTor.md similarity index 60% rename from docs/SignalResponseVpn1.md rename to docs/WebhookSignalResponseTor.md index 13668c6..700847e 100644 --- a/docs/SignalResponseVpn1.md +++ b/docs/WebhookSignalResponseTor.md @@ -1,10 +1,9 @@ -# SignalResponseVpn1 +# WebhookSignalResponseTor ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [***VpnResult**](VpnResult.md) | | [optional] [default to null] -**Error_** | [***ProductError**](ProductError.md) | | [optional] [default to null] +**Result** | **bool** | `true` if the request IP address is a known tor exit node, `false` otherwise. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookVisit.md b/docs/WebhookVisit.md index 431cdb2..039b02b 100644 --- a/docs/WebhookVisit.md +++ b/docs/WebhookVisit.md @@ -7,15 +7,15 @@ Name | Type | Description | Notes **ClientReferrer** | **string** | | [optional] [default to null] **UserAgent** | **string** | | [optional] [default to null] **Bot** | [***BotdDetectionResult**](BotdDetectionResult.md) | | [optional] [default to null] -**IpInfo** | [***SignalResponseIpInfo**](SignalResponseIpInfo.md) | | [optional] [default to null] +**IpInfo** | [***IpInfoResult**](IpInfoResult.md) | | [optional] [default to null] **Incognito** | **bool** | Flag if user used incognito session. | [default to null] -**RootApps** | [***SignalResponseRootApps**](SignalResponseRootApps.md) | | [optional] [default to null] -**Emulator** | [***SignalResponseEmulator**](SignalResponseEmulator.md) | | [optional] [default to null] -**IpBlocklist** | [***SignalResponseIpBlocklist**](SignalResponseIpBlocklist.md) | | [optional] [default to null] -**Tor** | [***SignalResponseTor**](SignalResponseTor.md) | | [optional] [default to null] -**Vpn** | [***SignalResponseVpn**](SignalResponseVpn.md) | | [optional] [default to null] -**Proxy** | [***SignalResponseProxy**](SignalResponseProxy.md) | | [optional] [default to null] -**Tampering** | [***SignalResponseTampering**](SignalResponseTampering.md) | | [optional] [default to null] +**RootApps** | [***WebhookSignalResponseRootApps**](WebhookSignalResponseRootApps.md) | | [optional] [default to null] +**Emulator** | [***WebhookSignalResponseEmulator**](WebhookSignalResponseEmulator.md) | | [optional] [default to null] +**IpBlocklist** | [***IpBlockListResult**](IpBlockListResult.md) | | [optional] [default to null] +**Tor** | [***WebhookSignalResponseTor**](WebhookSignalResponseTor.md) | | [optional] [default to null] +**Vpn** | [***VpnResult**](VpnResult.md) | | [optional] [default to null] +**Proxy** | [***WebhookSignalResponseProxy**](WebhookSignalResponseProxy.md) | | [optional] [default to null] +**Tampering** | [***TamperingResult**](TamperingResult.md) | | [optional] [default to null] **RequestId** | **string** | Unique identifier of the user's identification request. | [default to null] **BrowserDetails** | [***BrowserDetails**](BrowserDetails.md) | | [default to null] **Ip** | **string** | | [default to null] diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 4f83f6f..4873ffb 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -3210,54 +3210,46 @@ paths: (Macintosh; Intel Mac OS X 10_14_3) Chrome/73.0.3683.86 ipInfo: - data: - v4: - address: 94.142.239.124 - geolocation: - accuracyRadius: 20 - latitude: 50.05 - longitude: 14.4 - postalCode: 150 00 - timezone: Europe/Prague - city: - name: Prague - country: - code: CZ - name: Czechia - continent: - code: EU - name: Europe - subdivisions: - - isoCode: '10' - name: Hlavni mesto Praha + v4: + address: 94.142.239.124 + geolocation: + accuracyRadius: 20 + latitude: 50.05 + longitude: 14.4 + postalCode: 150 00 + timezone: Europe/Prague + city: + name: Prague + country: + code: CZ + name: Czechia + continent: + code: EU + name: Europe + subdivisions: + - isoCode: '10' + name: Hlavni mesto Praha rootApps: - data: - result: false + result: false emulator: - data: - result: false + result: false ipBlocklist: - data: - result: false - details: - emailSpam: false - attackSource: false + result: false + details: + emailSpam: false + attackSource: false tor: - data: - result: false + result: false vpn: - data: - result: false - methods: - timezoneMismatch: false - publicVPN: false + result: false + methods: + timezoneMismatch: false + publicVPN: false proxy: - data: - result: false + result: false tampering: - data: - result: false - anomalyScore: 0 + result: false + anomalyScore: 0 responses: default: description: The server doesn't validate the answer. @@ -3463,93 +3455,64 @@ components: bot: $ref: '#/components/schemas/BotdDetectionResult' ipInfo: - title: SignalResponseIpInfo - type: object - properties: - data: - $ref: '#/components/schemas/IpInfoResult' + $ref: '#/components/schemas/IpInfoResult' incognito: description: Flag if user used incognito session. type: boolean rootApps: - title: SignalResponseRootApps + title: WebhookSignalResponseRootApps type: object properties: - data: - type: object - properties: - result: - type: boolean - description: > - Android specific root management apps detection. There are 2 - values: • `true` - Root Management Apps detected (e.g. - Magisk) • `false` - No Root Management Apps detected + result: + type: boolean + description: > + Android specific root management apps detection. There are 2 + values: • `true` - Root Management Apps detected (e.g. Magisk) • + `false` - No Root Management Apps detected - Available only for events from Android client. The field - will be empty for a browser/iOS event. - example: false + Available only for events from Android client. The field will + not be present for a browser or iOS event. + example: false emulator: - title: SignalResponseEmulator + title: WebhookSignalResponseEmulator type: object properties: - data: - type: object - properties: - result: - type: boolean - description: > - Android specific emulator detection. There are 2 values: • - `true` - Emulated environment detected (e.g. launch inside - of AVD) • `false` - No signs of emulated environment - detected + result: + type: boolean + description: > + Android specific emulator detection. There are 2 values: • + `true` - Emulated environment detected (e.g. launch inside of + AVD) • `false` - No signs of emulated environment detected - Available only for events from Android client. The field - will be empty for a browser/iOS event. - example: false + Available only for events from Android client. The field will + not be present for a browser or iOS event. + example: false ipBlocklist: - title: SignalResponseIpBlocklist - type: object - properties: - data: - $ref: '#/components/schemas/IpBlockListResult' + $ref: '#/components/schemas/IpBlockListResult' tor: - title: SignalResponseTor + title: WebhookSignalResponseTor type: object properties: - data: - type: object - properties: - result: - type: boolean - description: > - `true` if the request IP address is a known tor exit node, - `false` otherwise. - example: false + result: + type: boolean + description: > + `true` if the request IP address is a known tor exit node, + `false` otherwise. + example: false vpn: - title: SignalResponseVpn - type: object - properties: - data: - $ref: '#/components/schemas/VpnResult' + $ref: '#/components/schemas/VpnResult' proxy: - title: SignalResponseProxy + title: WebhookSignalResponseProxy type: object properties: - data: - type: object - properties: - result: - type: boolean - description: > - `true` if the request IP address is used by a public proxy - provider, `false` otherwise. - example: false + result: + type: boolean + description: > + `true` if the request IP address is used by a public proxy + provider, `false` otherwise. + example: false tampering: - title: SignalResponseTampering - type: object - properties: - data: - $ref: '#/components/schemas/TamperingResult' + $ref: '#/components/schemas/TamperingResult' requestId: description: Unique identifier of the user's identification request. type: string @@ -3968,7 +3931,7 @@ components: Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field - will be empty for a browser/iOS event. + will not be present for a browser or iOS event. example: false error: $ref: '#/components/schemas/ProductError' @@ -3988,7 +3951,7 @@ components: detected Available only for events from Android client. The field - will be empty for a browser/iOS event. + will not be present for a browser or iOS event. example: false error: $ref: '#/components/schemas/ProductError' diff --git a/sdk/model_products_response.go b/sdk/model_products_response.go index 753f4d4..ea2ffd2 100644 --- a/sdk/model_products_response.go +++ b/sdk/model_products_response.go @@ -13,13 +13,13 @@ package sdk type ProductsResponse struct { Identification *ProductsResponseIdentification `json:"identification,omitempty"` Botd *ProductsResponseBotd `json:"botd,omitempty"` - IpInfo *SignalResponseIpInfo1 `json:"ipInfo,omitempty"` + IpInfo *SignalResponseIpInfo `json:"ipInfo,omitempty"` Incognito *SignalResponseIncognito `json:"incognito,omitempty"` - RootApps *SignalResponseRootApps1 `json:"rootApps,omitempty"` - Emulator *SignalResponseEmulator1 `json:"emulator,omitempty"` - IpBlocklist *SignalResponseIpBlocklist1 `json:"ipBlocklist,omitempty"` - Tor *SignalResponseTor1 `json:"tor,omitempty"` - Vpn *SignalResponseVpn1 `json:"vpn,omitempty"` - Proxy *SignalResponseProxy1 `json:"proxy,omitempty"` - Tampering *SignalResponseTampering1 `json:"tampering,omitempty"` + RootApps *SignalResponseRootApps `json:"rootApps,omitempty"` + Emulator *SignalResponseEmulator `json:"emulator,omitempty"` + IpBlocklist *SignalResponseIpBlocklist `json:"ipBlocklist,omitempty"` + Tor *SignalResponseTor `json:"tor,omitempty"` + Vpn *SignalResponseVpn `json:"vpn,omitempty"` + Proxy *SignalResponseProxy `json:"proxy,omitempty"` + Tampering *SignalResponseTampering `json:"tampering,omitempty"` } diff --git a/sdk/model_signal_response_emulator.go b/sdk/model_signal_response_emulator.go index 573af59..4decd98 100644 --- a/sdk/model_signal_response_emulator.go +++ b/sdk/model_signal_response_emulator.go @@ -10,5 +10,6 @@ package sdk type SignalResponseEmulator struct { - Data *SignalResponseEmulatorData `json:"data,omitempty"` + Data *SignalResponseEmulatorData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_emulator_data.go b/sdk/model_signal_response_emulator_data.go index a64ba7f..ecd009c 100644 --- a/sdk/model_signal_response_emulator_data.go +++ b/sdk/model_signal_response_emulator_data.go @@ -10,6 +10,6 @@ package sdk type SignalResponseEmulatorData struct { - // Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will be empty for a browser/iOS event. + // Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will not be present for a browser or iOS event. Result bool `json:"result,omitempty"` } diff --git a/sdk/model_signal_response_ip_blocklist.go b/sdk/model_signal_response_ip_blocklist.go index 6a47533..2e512e0 100644 --- a/sdk/model_signal_response_ip_blocklist.go +++ b/sdk/model_signal_response_ip_blocklist.go @@ -10,5 +10,6 @@ package sdk type SignalResponseIpBlocklist struct { - Data *IpBlockListResult `json:"data,omitempty"` + Data *IpBlockListResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_ip_info.go b/sdk/model_signal_response_ip_info.go index d73cc73..08a2d44 100644 --- a/sdk/model_signal_response_ip_info.go +++ b/sdk/model_signal_response_ip_info.go @@ -10,5 +10,6 @@ package sdk type SignalResponseIpInfo struct { - Data *IpInfoResult `json:"data,omitempty"` + Data *IpInfoResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_proxy.go b/sdk/model_signal_response_proxy.go index 2581c8a..27cec0e 100644 --- a/sdk/model_signal_response_proxy.go +++ b/sdk/model_signal_response_proxy.go @@ -10,5 +10,6 @@ package sdk type SignalResponseProxy struct { - Data *SignalResponseProxyData `json:"data,omitempty"` + Data *SignalResponseProxyData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_root_apps.go b/sdk/model_signal_response_root_apps.go index ff4cf58..664c527 100644 --- a/sdk/model_signal_response_root_apps.go +++ b/sdk/model_signal_response_root_apps.go @@ -10,5 +10,6 @@ package sdk type SignalResponseRootApps struct { - Data *SignalResponseRootAppsData `json:"data,omitempty"` + Data *SignalResponseRootAppsData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_root_apps_1.go b/sdk/model_signal_response_root_apps_1.go deleted file mode 100644 index 561b247..0000000 --- a/sdk/model_signal_response_root_apps_1.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Fingerprint Pro Server API - * - * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. - * - * API version: 3 - * Contact: support@fingerprint.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package sdk - -type SignalResponseRootApps1 struct { - Data *SignalResponseRootAppsData `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` -} diff --git a/sdk/model_signal_response_root_apps_data.go b/sdk/model_signal_response_root_apps_data.go index 968253a..9ac01c7 100644 --- a/sdk/model_signal_response_root_apps_data.go +++ b/sdk/model_signal_response_root_apps_data.go @@ -10,6 +10,6 @@ package sdk type SignalResponseRootAppsData struct { - // Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will be empty for a browser/iOS event. + // Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will not be present for a browser or iOS event. Result bool `json:"result,omitempty"` } diff --git a/sdk/model_signal_response_tampering.go b/sdk/model_signal_response_tampering.go index f866172..9164b6e 100644 --- a/sdk/model_signal_response_tampering.go +++ b/sdk/model_signal_response_tampering.go @@ -10,5 +10,6 @@ package sdk type SignalResponseTampering struct { - Data *TamperingResult `json:"data,omitempty"` + Data *TamperingResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_tampering_1.go b/sdk/model_signal_response_tampering_1.go deleted file mode 100644 index 578685a..0000000 --- a/sdk/model_signal_response_tampering_1.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Fingerprint Pro Server API - * - * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. - * - * API version: 3 - * Contact: support@fingerprint.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package sdk - -type SignalResponseTampering1 struct { - Data *TamperingResult `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` -} diff --git a/sdk/model_signal_response_tor.go b/sdk/model_signal_response_tor.go index d75ceb0..7209109 100644 --- a/sdk/model_signal_response_tor.go +++ b/sdk/model_signal_response_tor.go @@ -10,5 +10,6 @@ package sdk type SignalResponseTor struct { - Data *SignalResponseTorData `json:"data,omitempty"` + Data *SignalResponseTorData `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_tor_1.go b/sdk/model_signal_response_tor_1.go deleted file mode 100644 index cc52eaa..0000000 --- a/sdk/model_signal_response_tor_1.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Fingerprint Pro Server API - * - * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. - * - * API version: 3 - * Contact: support@fingerprint.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package sdk - -type SignalResponseTor1 struct { - Data *SignalResponseTorData `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` -} diff --git a/sdk/model_signal_response_vpn.go b/sdk/model_signal_response_vpn.go index ff333a9..0054409 100644 --- a/sdk/model_signal_response_vpn.go +++ b/sdk/model_signal_response_vpn.go @@ -10,5 +10,6 @@ package sdk type SignalResponseVpn struct { - Data *VpnResult `json:"data,omitempty"` + Data *VpnResult `json:"data,omitempty"` + Error_ *ProductError `json:"error,omitempty"` } diff --git a/sdk/model_signal_response_vpn_1.go b/sdk/model_signal_response_vpn_1.go deleted file mode 100644 index bf3aaec..0000000 --- a/sdk/model_signal_response_vpn_1.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Fingerprint Pro Server API - * - * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. - * - * API version: 3 - * Contact: support@fingerprint.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package sdk - -type SignalResponseVpn1 struct { - Data *VpnResult `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` -} diff --git a/sdk/model_signal_response_proxy_1.go b/sdk/model_webhook_signal_response_emulator.go similarity index 52% rename from sdk/model_signal_response_proxy_1.go rename to sdk/model_webhook_signal_response_emulator.go index e766d2a..74c4c48 100644 --- a/sdk/model_signal_response_proxy_1.go +++ b/sdk/model_webhook_signal_response_emulator.go @@ -9,7 +9,7 @@ */ package sdk -type SignalResponseProxy1 struct { - Data *SignalResponseProxyData `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` +type WebhookSignalResponseEmulator struct { + // Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will not be present for a browser or iOS event. + Result bool `json:"result,omitempty"` } diff --git a/sdk/model_signal_response_ip_blocklist_1.go b/sdk/model_webhook_signal_response_proxy.go similarity index 70% rename from sdk/model_signal_response_ip_blocklist_1.go rename to sdk/model_webhook_signal_response_proxy.go index 6cfc06f..ac70faf 100644 --- a/sdk/model_signal_response_ip_blocklist_1.go +++ b/sdk/model_webhook_signal_response_proxy.go @@ -9,7 +9,7 @@ */ package sdk -type SignalResponseIpBlocklist1 struct { - Data *IpBlockListResult `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` +type WebhookSignalResponseProxy struct { + // `true` if the request IP address is used by a public proxy provider, `false` otherwise. + Result bool `json:"result,omitempty"` } diff --git a/sdk/model_signal_response_ip_info_1.go b/sdk/model_webhook_signal_response_root_apps.go similarity index 52% rename from sdk/model_signal_response_ip_info_1.go rename to sdk/model_webhook_signal_response_root_apps.go index 319e5ec..3759948 100644 --- a/sdk/model_signal_response_ip_info_1.go +++ b/sdk/model_webhook_signal_response_root_apps.go @@ -9,7 +9,7 @@ */ package sdk -type SignalResponseIpInfo1 struct { - Data *IpInfoResult `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` +type WebhookSignalResponseRootApps struct { + // Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will not be present for a browser or iOS event. + Result bool `json:"result,omitempty"` } diff --git a/sdk/model_signal_response_emulator_1.go b/sdk/model_webhook_signal_response_tor.go similarity index 71% rename from sdk/model_signal_response_emulator_1.go rename to sdk/model_webhook_signal_response_tor.go index fb35571..99c4de0 100644 --- a/sdk/model_signal_response_emulator_1.go +++ b/sdk/model_webhook_signal_response_tor.go @@ -9,7 +9,7 @@ */ package sdk -type SignalResponseEmulator1 struct { - Data *SignalResponseEmulatorData `json:"data,omitempty"` - Error_ *ProductError `json:"error,omitempty"` +type WebhookSignalResponseTor struct { + // `true` if the request IP address is a known tor exit node, `false` otherwise. + Result bool `json:"result,omitempty"` } diff --git a/sdk/model_webhook_visit.go b/sdk/model_webhook_visit.go index d247b7b..cf6807e 100644 --- a/sdk/model_webhook_visit.go +++ b/sdk/model_webhook_visit.go @@ -14,20 +14,20 @@ import ( ) type WebhookVisit struct { - VisitorId string `json:"visitorId"` - ClientReferrer string `json:"clientReferrer,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Bot *BotdDetectionResult `json:"bot,omitempty"` - IpInfo *SignalResponseIpInfo `json:"ipInfo,omitempty"` + VisitorId string `json:"visitorId"` + ClientReferrer string `json:"clientReferrer,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Bot *BotdDetectionResult `json:"bot,omitempty"` + IpInfo *IpInfoResult `json:"ipInfo,omitempty"` // Flag if user used incognito session. - Incognito bool `json:"incognito"` - RootApps *SignalResponseRootApps `json:"rootApps,omitempty"` - Emulator *SignalResponseEmulator `json:"emulator,omitempty"` - IpBlocklist *SignalResponseIpBlocklist `json:"ipBlocklist,omitempty"` - Tor *SignalResponseTor `json:"tor,omitempty"` - Vpn *SignalResponseVpn `json:"vpn,omitempty"` - Proxy *SignalResponseProxy `json:"proxy,omitempty"` - Tampering *SignalResponseTampering `json:"tampering,omitempty"` + Incognito bool `json:"incognito"` + RootApps *WebhookSignalResponseRootApps `json:"rootApps,omitempty"` + Emulator *WebhookSignalResponseEmulator `json:"emulator,omitempty"` + IpBlocklist *IpBlockListResult `json:"ipBlocklist,omitempty"` + Tor *WebhookSignalResponseTor `json:"tor,omitempty"` + Vpn *VpnResult `json:"vpn,omitempty"` + Proxy *WebhookSignalResponseProxy `json:"proxy,omitempty"` + Tampering *TamperingResult `json:"tampering,omitempty"` // Unique identifier of the user's identification request. RequestId string `json:"requestId"` BrowserDetails *BrowserDetails `json:"browserDetails"` diff --git a/test/mocks/get_event.json b/test/mocks/get_event.json index 4e1eccd..924545c 100644 --- a/test/mocks/get_event.json +++ b/test/mocks/get_event.json @@ -60,12 +60,93 @@ "botd": { "data": { "bot": { - "result": "notDetected" + "result": "bad", + "type": "selenium" }, "url": "https://www.example.com/login", "ip": "61.127.217.15", "time": "2019-05-21T16:40:13Z" } + }, + "ipInfo": { + "data": { + "v4": { + "address": "94.142.239.124", + "geolocation": { + "accuracyRadius": 20, + "latitude": 50.05, + "longitude": 14.4, + "postalCode": "150 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + } + } + } + }, + "incognito": { + "data": { + "result": false + } + }, + "rootApps": { + "data": { + "result": false + } + }, + "emulator": { + "data": { + "result": false + } + }, + "ipBlocklist": { + "data": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + } + }, + "tor": { + "data": { + "result": false + } + }, + "vpn": { + "data": { + "result": false, + "methods": { + "timezoneMismatch": false, + "publicVPN": false + } + } + }, + "proxy": { + "data": { + "result": false + } + }, + "tampering": { + "data": { + "result": false, + "anomalyScore": 0 + } } } } diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index ddc2c58..e5103a1 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -56,5 +56,69 @@ "lastSeenAt": { "global": "2022-03-16T11:28:34.023Z", "subscription": null + }, + "bot": { + "result": "bad", + "type": "selenium" + }, + "userAgent": "(Macintosh; Intel Mac OS X 10_14_3) Chrome/73.0.3683.86", + "ipInfo": { + "v4": { + "address": "94.142.239.124", + "geolocation": { + "accuracyRadius": 20, + "latitude": 50.05, + "longitude": 14.4, + "postalCode": "150 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + } + } + }, + "rootApps": { + "result": false + }, + "emulator": { + "result": false + }, + "ipBlocklist": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + }, + "tor": { + "result": false + }, + "vpn": { + "result": false, + "methods": { + "timezoneMismatch": false, + "publicVPN": false + } + }, + "proxy": { + "result": false + }, + "tampering": { + "result": false, + "anomalyScore": 0 } }