Skip to content

Commit e997531

Browse files
authored
Merge pull request #93 from fingerprintjs/feat/open-api-v2.2.0
OpenAPI schema sync
2 parents e6d9558 + e2b5a60 commit e997531

23 files changed

+496
-15
lines changed

.changeset/forty-seas-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-python-sdk': minor
3+
---
4+
5+
Add `relay` detection method to the VPN Detection Smart Signal

.changeset/orange-poets-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-python-sdk': minor
3+
---
4+
5+
**events**: Add a `suspect` field to the `identification` product schema

.schema-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.0.0
1+
v2.2.0

docs/FactoryReset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**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. |
7-
**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. |
7+
**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. |
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/Identification.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**ip** | **str** | IP address of the requesting browser or bot. |
1111
**ip_location** | [**DeprecatedGeolocation**](DeprecatedGeolocation.md) | | [optional]
1212
**linked_id** | **str** | A customer-provided id that was sent with the request. | [optional]
13+
**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]
1314
**timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. |
1415
**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. |
1516
**url** | **str** | Page URL from which the request was sent. |

docs/VPNMethods.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. |
88
**auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. |
99
**os_mismatch** | **bool** | The browser runs on a different operating system than the operating system inferred from the request network signature. |
10+
**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. |
1011

1112
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1213

docs/WebhookFactoryReset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**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]
7-
**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]
7+
**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]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

fingerprint_pro_server_api_sdk/models/factory_reset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def time(self, time: datetime):
7373
def timestamp(self) -> int:
7474
"""Gets the timestamp of this FactoryReset. # noqa: E501
7575
76-
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
76+
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
7777
7878
:return: The timestamp of this FactoryReset. # noqa: E501
7979
"""
@@ -83,7 +83,7 @@ def timestamp(self) -> int:
8383
def timestamp(self, timestamp: int):
8484
"""Sets the timestamp of this FactoryReset.
8585
86-
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
86+
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
8787
8888
:param timestamp: The timestamp of this FactoryReset. # noqa: E501
8989
"""

fingerprint_pro_server_api_sdk/models/identification.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class Identification(BaseModel):
4343
'ip': 'str',
4444
'ip_location': 'DeprecatedGeolocation',
4545
'linked_id': 'str',
46+
'suspect': 'bool',
4647
'timestamp': 'int',
4748
'time': 'datetime',
4849
'url': 'str',
@@ -62,6 +63,7 @@ class Identification(BaseModel):
6263
'ip': 'ip',
6364
'ip_location': 'ipLocation',
6465
'linked_id': 'linkedId',
66+
'suspect': 'suspect',
6567
'timestamp': 'timestamp',
6668
'time': 'time',
6769
'url': 'url',
@@ -73,7 +75,7 @@ class Identification(BaseModel):
7375
'components': 'components'
7476
}
7577

76-
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
78+
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
7779
"""Identification - a model defined in Swagger""" # noqa: E501
7880
self._visitor_id = None
7981
self._request_id = None
@@ -82,6 +84,7 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog
8284
self._ip = None
8385
self._ip_location = None
8486
self._linked_id = None
87+
self._suspect = None
8588
self._timestamp = None
8689
self._time = None
8790
self._url = None
@@ -101,6 +104,8 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog
101104
self.ip_location = ip_location
102105
if linked_id is not None:
103106
self.linked_id = linked_id
107+
if suspect is not None:
108+
self.suspect = suspect
104109
self.timestamp = timestamp
105110
self.time = time
106111
self.url = url
@@ -266,6 +271,27 @@ def linked_id(self, linked_id: Optional[str]):
266271

267272
self._linked_id = linked_id
268273

274+
@property
275+
def suspect(self) -> Optional[bool]:
276+
"""Gets the suspect of this Identification. # noqa: E501
277+
278+
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
279+
280+
:return: The suspect of this Identification. # noqa: E501
281+
"""
282+
return self._suspect
283+
284+
@suspect.setter
285+
def suspect(self, suspect: Optional[bool]):
286+
"""Sets the suspect of this Identification.
287+
288+
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
289+
290+
:param suspect: The suspect of this Identification. # noqa: E501
291+
"""
292+
293+
self._suspect = suspect
294+
269295
@property
270296
def timestamp(self) -> int:
271297
"""Gets the timestamp of this Identification. # noqa: E501

fingerprint_pro_server_api_sdk/models/vpn_methods.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,31 @@ class VPNMethods(BaseModel):
3131
'timezone_mismatch': 'bool',
3232
'public_vpn': 'bool',
3333
'auxiliary_mobile': 'bool',
34-
'os_mismatch': 'bool'
34+
'os_mismatch': 'bool',
35+
'relay': 'bool'
3536
}
3637

3738
attribute_map = {
3839
'timezone_mismatch': 'timezoneMismatch',
3940
'public_vpn': 'publicVPN',
4041
'auxiliary_mobile': 'auxiliaryMobile',
41-
'os_mismatch': 'osMismatch'
42+
'os_mismatch': 'osMismatch',
43+
'relay': 'relay'
4244
}
4345

44-
def __init__(self, timezone_mismatch=None, public_vpn=None, auxiliary_mobile=None, os_mismatch=None): # noqa: E501
46+
def __init__(self, timezone_mismatch=None, public_vpn=None, auxiliary_mobile=None, os_mismatch=None, relay=None): # noqa: E501
4547
"""VPNMethods - a model defined in Swagger""" # noqa: E501
4648
self._timezone_mismatch = None
4749
self._public_vpn = None
4850
self._auxiliary_mobile = None
4951
self._os_mismatch = None
52+
self._relay = None
5053
self.discriminator = None
5154
self.timezone_mismatch = timezone_mismatch
5255
self.public_vpn = public_vpn
5356
self.auxiliary_mobile = auxiliary_mobile
5457
self.os_mismatch = os_mismatch
58+
self.relay = relay
5559

5660
@property
5761
def timezone_mismatch(self) -> bool:
@@ -145,3 +149,26 @@ def os_mismatch(self, os_mismatch: bool):
145149

146150
self._os_mismatch = os_mismatch
147151

152+
@property
153+
def relay(self) -> bool:
154+
"""Gets the relay of this VPNMethods. # noqa: E501
155+
156+
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
157+
158+
:return: The relay of this VPNMethods. # noqa: E501
159+
"""
160+
return self._relay
161+
162+
@relay.setter
163+
def relay(self, relay: bool):
164+
"""Sets the relay of this VPNMethods.
165+
166+
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
167+
168+
:param relay: The relay of this VPNMethods. # noqa: E501
169+
"""
170+
if relay is None:
171+
raise ValueError("Invalid value for `relay`, must not be `None`") # noqa: E501
172+
173+
self._relay = relay
174+

0 commit comments

Comments
 (0)