From cff0ef77d21758844f7b9ff466df78aa7ecba51e Mon Sep 17 00:00:00 2001 From: ilfa Date: Mon, 25 Nov 2024 16:33:06 +0000 Subject: [PATCH] feat: update OpenAPI schema --- .changeset/deep-sides-grow.md | 5 + .changeset/forty-seas-prove.md | 5 + .changeset/orange-poets-drive.md | 5 + .changeset/shy-worms-wish.md | 5 + .schema-version | 2 +- docs/FactoryReset.md | 2 +- docs/Identification.md | 1 + docs/VPNMethods.md | 1 + docs/WebhookFactoryReset.md | 2 +- .../models/factory_reset.py | 4 +- .../models/identification.py | 28 +- .../models/vpn_methods.py | 33 +- .../models/webhook_factory_reset.py | 4 +- res/fingerprint-server-api.yaml | 29 +- test/mocks/errors/400_bot_type_invalid.json | 6 + test/mocks/errors/400_end_time_invalid.json | 6 + test/mocks/errors/400_ip_address_invalid.json | 6 + test/mocks/errors/400_limit_invalid.json | 6 + test/mocks/errors/400_linked_id_invalid.json | 6 + .../errors/400_pagination_key_invalid.json | 6 + test/mocks/errors/400_reverse_invalid.json | 6 + test/mocks/errors/400_start_time_invalid.json | 6 + test/mocks/get_event_200.json | 3 +- test/mocks/get_event_search_200.json | 341 ++++++++++++++++++ test/mocks/webhook.json | 3 +- 25 files changed, 506 insertions(+), 15 deletions(-) create mode 100644 .changeset/deep-sides-grow.md create mode 100644 .changeset/forty-seas-prove.md create mode 100644 .changeset/orange-poets-drive.md create mode 100644 .changeset/shy-worms-wish.md create mode 100644 test/mocks/errors/400_bot_type_invalid.json create mode 100644 test/mocks/errors/400_end_time_invalid.json create mode 100644 test/mocks/errors/400_ip_address_invalid.json create mode 100644 test/mocks/errors/400_limit_invalid.json create mode 100644 test/mocks/errors/400_linked_id_invalid.json create mode 100644 test/mocks/errors/400_pagination_key_invalid.json create mode 100644 test/mocks/errors/400_reverse_invalid.json create mode 100644 test/mocks/errors/400_start_time_invalid.json create mode 100644 test/mocks/get_event_search_200.json diff --git a/.changeset/deep-sides-grow.md b/.changeset/deep-sides-grow.md new file mode 100644 index 00000000..1b3af5fa --- /dev/null +++ b/.changeset/deep-sides-grow.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': patch +--- + +Fix errors examples `403_feature_not_enabled` and `403_subscription_not_active`. \ No newline at end of file diff --git a/.changeset/forty-seas-prove.md b/.changeset/forty-seas-prove.md new file mode 100644 index 00000000..b2e8f0e8 --- /dev/null +++ b/.changeset/forty-seas-prove.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +Add `relay` detection method to the VPN Detection Smart Signal diff --git a/.changeset/orange-poets-drive.md b/.changeset/orange-poets-drive.md new file mode 100644 index 00000000..0c1a1fd8 --- /dev/null +++ b/.changeset/orange-poets-drive.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +**events**: Add a `suspect` field to the `identification` product schema \ No newline at end of file diff --git a/.changeset/shy-worms-wish.md b/.changeset/shy-worms-wish.md new file mode 100644 index 00000000..cfe5206b --- /dev/null +++ b/.changeset/shy-worms-wish.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +Remove `ipv4` format from `ip` field in `Botd`, `Identification`, `Visit` and `Webhook` models. \ No newline at end of file diff --git a/.schema-version b/.schema-version index 6eaf8943..cf2dc0bc 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.0.0 \ No newline at end of file +v2.2.0 \ No newline at end of file diff --git a/docs/FactoryReset.md b/docs/FactoryReset.md index b58cefde..a9db9469 100644 --- a/docs/FactoryReset.md +++ b/docs/FactoryReset.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **datetime** | Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. | -**timestamp** | **int** | This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. | +**timestamp** | **int** | This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. | [[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/Identification.md b/docs/Identification.md index 0027abb7..6efeaa50 100644 --- a/docs/Identification.md +++ b/docs/Identification.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **ip** | **str** | IP address of the requesting browser or bot. | **ip_location** | [**DeprecatedGeolocation**](DeprecatedGeolocation.md) | | [optional] **linked_id** | **str** | A customer-provided id that was sent with the request. | [optional] +**suspect** | **bool** | Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). | [optional] **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | **time** | **datetime** | Time expressed according to ISO 8601 in UTC format, 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. | **url** | **str** | Page URL from which the request was sent. | diff --git a/docs/VPNMethods.md b/docs/VPNMethods.md index 8d5245d9..e2981041 100644 --- a/docs/VPNMethods.md +++ b/docs/VPNMethods.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. | **auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | **os_mismatch** | **bool** | The browser runs on a different operating system than the operating system inferred from the request network signature. | +**relay** | **bool** | Request IP address belongs to a relay service provider, indicating the use of relay services like [Apple Private relay](https://support.apple.com/en-us/102602) or [Cloudflare Warp](https://developers.cloudflare.com/warp-client/). * Like VPNs, relay services anonymize the visitor's true IP address. * Unlike traditional VPNs, relay services don't let visitors spoof their location by choosing an exit node in a different country. This field allows you to differentiate VPN users and relay service users in your fraud prevention logic. | [[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/WebhookFactoryReset.md b/docs/WebhookFactoryReset.md index 12ba8618..b4fcb010 100644 --- a/docs/WebhookFactoryReset.md +++ b/docs/WebhookFactoryReset.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **datetime** | Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. | [optional] -**timestamp** | **int** | This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. | [optional] +**timestamp** | **int** | This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. | [optional] [[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/fingerprint_pro_server_api_sdk/models/factory_reset.py b/fingerprint_pro_server_api_sdk/models/factory_reset.py index 9636834e..4e11f4f8 100644 --- a/fingerprint_pro_server_api_sdk/models/factory_reset.py +++ b/fingerprint_pro_server_api_sdk/models/factory_reset.py @@ -73,7 +73,7 @@ def time(self, time: datetime): def timestamp(self) -> int: """Gets the timestamp of this FactoryReset. # noqa: E501 - This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 + This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 :return: The timestamp of this FactoryReset. # noqa: E501 """ @@ -83,7 +83,7 @@ def timestamp(self) -> int: def timestamp(self, timestamp: int): """Sets the timestamp of this FactoryReset. - This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 + This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 :param timestamp: The timestamp of this FactoryReset. # noqa: E501 """ diff --git a/fingerprint_pro_server_api_sdk/models/identification.py b/fingerprint_pro_server_api_sdk/models/identification.py index 0b0f87a2..370fbbda 100644 --- a/fingerprint_pro_server_api_sdk/models/identification.py +++ b/fingerprint_pro_server_api_sdk/models/identification.py @@ -43,6 +43,7 @@ class Identification(BaseModel): 'ip': 'str', 'ip_location': 'DeprecatedGeolocation', 'linked_id': 'str', + 'suspect': 'bool', 'timestamp': 'int', 'time': 'datetime', 'url': 'str', @@ -62,6 +63,7 @@ class Identification(BaseModel): 'ip': 'ip', 'ip_location': 'ipLocation', 'linked_id': 'linkedId', + 'suspect': 'suspect', 'timestamp': 'timestamp', 'time': 'time', 'url': 'url', @@ -73,7 +75,7 @@ class Identification(BaseModel): 'components': 'components' } - def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None): # noqa: E501 + def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, suspect=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None): # noqa: E501 """Identification - a model defined in Swagger""" # noqa: E501 self._visitor_id = None self._request_id = None @@ -82,6 +84,7 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog self._ip = None self._ip_location = None self._linked_id = None + self._suspect = None self._timestamp = None self._time = None self._url = None @@ -101,6 +104,8 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog self.ip_location = ip_location if linked_id is not None: self.linked_id = linked_id + if suspect is not None: + self.suspect = suspect self.timestamp = timestamp self.time = time self.url = url @@ -266,6 +271,27 @@ def linked_id(self, linked_id: Optional[str]): self._linked_id = linked_id + @property + def suspect(self) -> Optional[bool]: + """Gets the suspect of this Identification. # noqa: E501 + + Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). # noqa: E501 + + :return: The suspect of this Identification. # noqa: E501 + """ + return self._suspect + + @suspect.setter + def suspect(self, suspect: Optional[bool]): + """Sets the suspect of this Identification. + + Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). # noqa: E501 + + :param suspect: The suspect of this Identification. # noqa: E501 + """ + + self._suspect = suspect + @property def timestamp(self) -> int: """Gets the timestamp of this Identification. # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/models/vpn_methods.py b/fingerprint_pro_server_api_sdk/models/vpn_methods.py index 12c0b95a..b5a8cdd4 100644 --- a/fingerprint_pro_server_api_sdk/models/vpn_methods.py +++ b/fingerprint_pro_server_api_sdk/models/vpn_methods.py @@ -31,27 +31,31 @@ class VPNMethods(BaseModel): 'timezone_mismatch': 'bool', 'public_vpn': 'bool', 'auxiliary_mobile': 'bool', - 'os_mismatch': 'bool' + 'os_mismatch': 'bool', + 'relay': 'bool' } attribute_map = { 'timezone_mismatch': 'timezoneMismatch', 'public_vpn': 'publicVPN', 'auxiliary_mobile': 'auxiliaryMobile', - 'os_mismatch': 'osMismatch' + 'os_mismatch': 'osMismatch', + 'relay': 'relay' } - def __init__(self, timezone_mismatch=None, public_vpn=None, auxiliary_mobile=None, os_mismatch=None): # noqa: E501 + def __init__(self, timezone_mismatch=None, public_vpn=None, auxiliary_mobile=None, os_mismatch=None, relay=None): # noqa: E501 """VPNMethods - a model defined in Swagger""" # noqa: E501 self._timezone_mismatch = None self._public_vpn = None self._auxiliary_mobile = None self._os_mismatch = None + self._relay = None self.discriminator = None self.timezone_mismatch = timezone_mismatch self.public_vpn = public_vpn self.auxiliary_mobile = auxiliary_mobile self.os_mismatch = os_mismatch + self.relay = relay @property def timezone_mismatch(self) -> bool: @@ -145,3 +149,26 @@ def os_mismatch(self, os_mismatch: bool): self._os_mismatch = os_mismatch + @property + def relay(self) -> bool: + """Gets the relay of this VPNMethods. # noqa: E501 + + Request IP address belongs to a relay service provider, indicating the use of relay services like [Apple Private relay](https://support.apple.com/en-us/102602) or [Cloudflare Warp](https://developers.cloudflare.com/warp-client/). * Like VPNs, relay services anonymize the visitor's true IP address. * Unlike traditional VPNs, relay services don't let visitors spoof their location by choosing an exit node in a different country. This field allows you to differentiate VPN users and relay service users in your fraud prevention logic. # noqa: E501 + + :return: The relay of this VPNMethods. # noqa: E501 + """ + return self._relay + + @relay.setter + def relay(self, relay: bool): + """Sets the relay of this VPNMethods. + + Request IP address belongs to a relay service provider, indicating the use of relay services like [Apple Private relay](https://support.apple.com/en-us/102602) or [Cloudflare Warp](https://developers.cloudflare.com/warp-client/). * Like VPNs, relay services anonymize the visitor's true IP address. * Unlike traditional VPNs, relay services don't let visitors spoof their location by choosing an exit node in a different country. This field allows you to differentiate VPN users and relay service users in your fraud prevention logic. # noqa: E501 + + :param relay: The relay of this VPNMethods. # noqa: E501 + """ + if relay is None: + raise ValueError("Invalid value for `relay`, must not be `None`") # noqa: E501 + + self._relay = relay + diff --git a/fingerprint_pro_server_api_sdk/models/webhook_factory_reset.py b/fingerprint_pro_server_api_sdk/models/webhook_factory_reset.py index c0c8d92a..d0c874ed 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook_factory_reset.py +++ b/fingerprint_pro_server_api_sdk/models/webhook_factory_reset.py @@ -73,7 +73,7 @@ def time(self, time: Optional[datetime]): def timestamp(self) -> Optional[int]: """Gets the timestamp of this WebhookFactoryReset. # noqa: E501 - This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 + This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 :return: The timestamp of this WebhookFactoryReset. # noqa: E501 """ @@ -83,7 +83,7 @@ def timestamp(self) -> Optional[int]: def timestamp(self, timestamp: Optional[int]): """Sets the timestamp of this WebhookFactoryReset. - This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 + This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. # noqa: E501 :param timestamp: The timestamp of this WebhookFactoryReset. # noqa: E501 """ diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index fc8d487f..b5eaa9df 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -527,6 +527,7 @@ paths: publicVPN: false auxiliaryMobile: false osMismatch: false + relay: false proxy: result: false tampering: @@ -848,6 +849,12 @@ components: linkedId: type: string description: A customer-provided id that was sent with the request. + suspect: + description: >- + Field is `true` if you have previously set the `suspect` flag for + this event using the [Server API Update event + endpoint](https://dev.fingerprint.com/reference/updateevent). + type: boolean timestamp: description: Timestamp of the event with millisecond precision in Unix time. type: integer @@ -1218,6 +1225,7 @@ components: - publicVPN - auxiliaryMobile - osMismatch + - relay properties: timezoneMismatch: type: boolean @@ -1239,6 +1247,23 @@ components: description: >- The browser runs on a different operating system than the operating system inferred from the request network signature. + relay: + type: boolean + description: > + Request IP address belongs to a relay service provider, indicating + the use of relay services like [Apple Private + relay](https://support.apple.com/en-us/102602) or [Cloudflare + Warp](https://developers.cloudflare.com/warp-client/). + + + * Like VPNs, relay services anonymize the visitor's true IP address. + + * Unlike traditional VPNs, relay services don't let visitors spoof + their location by choosing an exit node in a different country. + + + This field allows you to differentiate VPN users and relay service + users in your fraud prevention logic. VPN: type: object additionalProperties: false @@ -1400,7 +1425,7 @@ components: field. The time of the most recent factory reset that happened on the - **mobile device** is expressed as Unix epoch time. + **mobile device** is expressed as Unix epoch time. ProductFactoryReset: type: object additionalProperties: false @@ -2022,7 +2047,7 @@ components: field. The time of the most recent factory reset that happened on the - **mobile device** is expressed as Unix epoch time. + **mobile device** is expressed as Unix epoch time. WebhookJailbroken: type: object additionalProperties: false diff --git a/test/mocks/errors/400_bot_type_invalid.json b/test/mocks/errors/400_bot_type_invalid.json new file mode 100644 index 00000000..8dd65266 --- /dev/null +++ b/test/mocks/errors/400_bot_type_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid bot type" + } +} diff --git a/test/mocks/errors/400_end_time_invalid.json b/test/mocks/errors/400_end_time_invalid.json new file mode 100644 index 00000000..88654093 --- /dev/null +++ b/test/mocks/errors/400_end_time_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid end time" + } +} \ No newline at end of file diff --git a/test/mocks/errors/400_ip_address_invalid.json b/test/mocks/errors/400_ip_address_invalid.json new file mode 100644 index 00000000..5969bab6 --- /dev/null +++ b/test/mocks/errors/400_ip_address_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid ip address" + } +} \ No newline at end of file diff --git a/test/mocks/errors/400_limit_invalid.json b/test/mocks/errors/400_limit_invalid.json new file mode 100644 index 00000000..46297eb4 --- /dev/null +++ b/test/mocks/errors/400_limit_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid limit" + } +} diff --git a/test/mocks/errors/400_linked_id_invalid.json b/test/mocks/errors/400_linked_id_invalid.json new file mode 100644 index 00000000..72de54e0 --- /dev/null +++ b/test/mocks/errors/400_linked_id_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "linked_id can't be greater than 256 characters long" + } +} diff --git a/test/mocks/errors/400_pagination_key_invalid.json b/test/mocks/errors/400_pagination_key_invalid.json new file mode 100644 index 00000000..df559f9a --- /dev/null +++ b/test/mocks/errors/400_pagination_key_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid pagination key" + } +} diff --git a/test/mocks/errors/400_reverse_invalid.json b/test/mocks/errors/400_reverse_invalid.json new file mode 100644 index 00000000..540800fa --- /dev/null +++ b/test/mocks/errors/400_reverse_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid reverse param" + } +} diff --git a/test/mocks/errors/400_start_time_invalid.json b/test/mocks/errors/400_start_time_invalid.json new file mode 100644 index 00000000..5d93f929 --- /dev/null +++ b/test/mocks/errors/400_start_time_invalid.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid start time" + } +} \ No newline at end of file diff --git a/test/mocks/get_event_200.json b/test/mocks/get_event_200.json index fba76de3..60013c0c 100644 --- a/test/mocks/get_event_200.json +++ b/test/mocks/get_event_200.json @@ -180,7 +180,8 @@ "timezoneMismatch": false, "publicVPN": false, "auxiliaryMobile": false, - "osMismatch": false + "osMismatch": false, + "relay": false } } }, diff --git a/test/mocks/get_event_search_200.json b/test/mocks/get_event_search_200.json new file mode 100644 index 00000000..9d237eb6 --- /dev/null +++ b/test/mocks/get_event_search_200.json @@ -0,0 +1,341 @@ +{ + "events": [ + { + "products": { + "identification": { + "data": { + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "1708102555327.NLOjmg", + "incognito": true, + "linkedId": "somelinkedId", + "tag": {}, + "time": "2019-05-21T16:40:13Z", + "timestamp": 1582299576512, + "url": "https://www.example.com/login?hope{this{works[!", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "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": false, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": null, + "subscription": null + } + } + }, + "botd": { + "data": { + "bot": { + "result": "notDetected" + }, + "url": "https://www.example.com/login?hope{this{works}[!", + "ip": "61.127.217.15", + "time": "2019-05-21T16:40:13Z", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36", + "requestId": "1708102555327.NLOjmg" + } + }, + "rootApps": { + "data": { + "result": false + } + }, + "emulator": { + "data": { + "result": false + } + }, + "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" + } + ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "datacenter": { + "result": true, + "name": "DediPath" + } + }, + "v6": { + "address": "2001:db8:3333:4444:5555:6666:7777:8888", + "geolocation": { + "accuracyRadius": 5, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "10112", + "timezone": "Europe/Berlin", + "city": { + "name": "Berlin" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "BE", + "name": "Land Berlin" + } + ] + }, + "asn": { + "asn": "6805", + "name": "Telefonica Germany", + "network": "2a02:3100::/24" + }, + "datacenter": { + "result": false, + "name": "" + } + } + } + }, + "ipBlocklist": { + "data": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + } + }, + "tor": { + "data": { + "result": false + } + }, + "vpn": { + "data": { + "result": false, + "confidence": "high", + "originTimezone": "Europe/Berlin", + "originCountry": "unknown", + "methods": { + "timezoneMismatch": false, + "publicVPN": false, + "auxiliaryMobile": false, + "osMismatch": false, + "relay": false + } + } + }, + "proxy": { + "data": { + "result": false + } + }, + "incognito": { + "data": { + "result": false + } + }, + "tampering": { + "data": { + "result": false, + "anomalyScore": 0.1955, + "antiDetectBrowser": false + } + }, + "clonedApp": { + "data": { + "result": false + } + }, + "factoryReset": { + "data": { + "time": "1970-01-01T00:00:00Z", + "timestamp": 0 + } + }, + "jailbroken": { + "data": { + "result": false + } + }, + "frida": { + "data": { + "result": false + } + }, + "privacySettings": { + "data": { + "result": false + } + }, + "virtualMachine": { + "data": { + "result": false + } + }, + "rawDeviceAttributes": { + "data": { + "architecture": { + "value": 127 + }, + "audio": { + "value": 35.73832903057337 + }, + "canvas": { + "value": { + "Winding": true, + "Geometry": "4dce9d6017c3e0c052a77252f29f2b1c", + "Text": "dd2474a56ff78c1de3e7a07070ba3b7d" + } + }, + "colorDepth": { + "value": 30 + }, + "colorGamut": { + "value": "p3" + }, + "contrast": { + "value": 0 + }, + "cookiesEnabled": { + "value": true + }, + "cpuClass": {}, + "fonts": { + "value": ["Arial Unicode MS", "Gill Sans", "Helvetica Neue", "Menlo"] + } + } + }, + "highActivity": { + "data": { + "result": false + } + }, + "locationSpoofing": { + "data": { + "result": false + } + }, + "remoteControl": { + "data": { + "result": false + } + }, + "velocity": { + "data": { + "distinctIp": { + "intervals": { + "5m": 1, + "1h": 1, + "24h": 1 + } + }, + "distinctLinkedId": {}, + "distinctCountry": { + "intervals": { + "5m": 1, + "1h": 2, + "24h": 2 + } + }, + "events": { + "intervals": { + "5m": 1, + "1h": 5, + "24h": 5 + } + }, + "ipEvents": { + "intervals": { + "5m": 1, + "1h": 5, + "24h": 5 + } + }, + "distinctIpByLinkedId": { + "intervals": { + "5m": 1, + "1h": 5, + "24h": 5 + } + }, + "distinctVisitorIdByLinkedId": { + "intervals": { + "5m": 1, + "1h": 5, + "24h": 5 + } + } + } + }, + "developerTools": { + "data": { + "result": false + } + } + }} + ], + "paginationKey": "1655373953086" +} diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 2152b842..748d2529 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -125,7 +125,8 @@ "timezoneMismatch": false, "publicVPN": false, "auxiliaryMobile": false, - "osMismatch": false + "osMismatch": false, + "relay": false } }, "proxy": {