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" + } + } + } +}