Skip to content

Commit 14fcdd8

Browse files
authored
Merge pull request #129 from fingerprintjs/feat/open-api-v2.7.0
OpenAPI schema sync (v2.7.0)
2 parents ae9716e + b7d40f1 commit 14fcdd8

17 files changed

+170
-28
lines changed

.changeset/modern-moons-pick.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 `confidence` property to the Proxy detection Smart Signal, which now supports both residential and public web proxies.

.schema-version

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ Class | Method | HTTP request | Description
357357
- [ProductVirtualMachine](docs/ProductVirtualMachine.md)
358358
- [Products](docs/Products.md)
359359
- [Proxy](docs/Proxy.md)
360+
- [ProxyConfidence](docs/ProxyConfidence.md)
360361
- [RawDeviceAttribute](docs/RawDeviceAttribute.md)
361362
- [RawDeviceAttributeError](docs/RawDeviceAttributeError.md)
362363
- [RawDeviceAttributes](docs/RawDeviceAttributes.md)

docs/Proxy.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. |
6+
**result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy |
7+
**confidence** | [**ProxyConfidence**](ProxyConfidence.md) | |
78

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

docs/ProxyConfidence.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ProxyConfidence
2+
Confidence level of the proxy detection.
3+
If a proxy is not detected, confidence is "high".
4+
If it's detected, can be "low", "medium", or "high".
5+
6+

docs/WebhookProxy.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. | [optional]
6+
**result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional]
7+
**confidence** | [**ProxyConfidence**](ProxyConfidence.md) | | [optional]
78

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

fingerprint_pro_server_api_sdk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
from fingerprint_pro_server_api_sdk.models.product_virtual_machine import ProductVirtualMachine
8686
from fingerprint_pro_server_api_sdk.models.products import Products
8787
from fingerprint_pro_server_api_sdk.models.proxy import Proxy
88+
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence
8889
from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute
8990
from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError
9091
from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes

fingerprint_pro_server_api_sdk/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
from fingerprint_pro_server_api_sdk.models.product_virtual_machine import ProductVirtualMachine
7878
from fingerprint_pro_server_api_sdk.models.products import Products
7979
from fingerprint_pro_server_api_sdk.models.proxy import Proxy
80+
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence
8081
from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute
8182
from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError
8283
from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes

fingerprint_pro_server_api_sdk/models/proxy.py

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import re # noqa: F401
1414
from typing import Dict, List, Optional # noqa: F401
1515
from fingerprint_pro_server_api_sdk.base_model import BaseModel
16+
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence
1617

1718

1819
class Proxy(BaseModel):
@@ -28,28 +29,33 @@ class Proxy(BaseModel):
2829
and the value is json key in definition.
2930
"""
3031
swagger_types = {
31-
'result': 'bool'
32+
'result': 'bool',
33+
'confidence': 'ProxyConfidence'
3234
}
3335

3436
nullable_map = {
35-
'result': False
37+
'result': False,
38+
'confidence': False
3639
}
3740

3841
attribute_map = {
39-
'result': 'result'
42+
'result': 'result',
43+
'confidence': 'confidence'
4044
}
4145

42-
def __init__(self, result=None): # noqa: E501
46+
def __init__(self, result=None, confidence=None): # noqa: E501
4347
"""Proxy - a model defined in Swagger""" # noqa: E501
4448
self._result = None
49+
self._confidence = None
4550
self.discriminator = None
4651
self.result = result
52+
self.confidence = confidence
4753

4854
@property
4955
def result(self) -> bool:
5056
"""Gets the result of this Proxy. # noqa: E501
5157
52-
`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
58+
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501
5359
5460
:return: The result of this Proxy. # noqa: E501
5561
"""
@@ -59,7 +65,7 @@ def result(self) -> bool:
5965
def result(self, result: bool):
6066
"""Sets the result of this Proxy.
6167
62-
`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
68+
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501
6369
6470
:param result: The result of this Proxy. # noqa: E501
6571
"""
@@ -68,3 +74,24 @@ def result(self, result: bool):
6874

6975
self._result = result
7076

77+
@property
78+
def confidence(self) -> ProxyConfidence:
79+
"""Gets the confidence of this Proxy. # noqa: E501
80+
81+
82+
:return: The confidence of this Proxy. # noqa: E501
83+
"""
84+
return self._confidence
85+
86+
@confidence.setter
87+
def confidence(self, confidence: ProxyConfidence):
88+
"""Sets the confidence of this Proxy.
89+
90+
91+
:param confidence: The confidence of this Proxy. # noqa: E501
92+
"""
93+
if confidence is None:
94+
raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501
95+
96+
self._confidence = confidence
97+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# coding: utf-8
2+
3+
"""
4+
Fingerprint Server API
5+
6+
Fingerprint Server API allows you to search, update, and delete identification events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. # noqa: E501
7+
8+
OpenAPI spec version: 3
9+
Contact: support@fingerprint.com
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
import re # noqa: F401
14+
from typing import Dict, List, Optional # noqa: F401
15+
from fingerprint_pro_server_api_sdk.base_model import BaseModel
16+
17+
18+
class ProxyConfidence(BaseModel):
19+
"""
20+
Confidence level of the proxy detection. If a proxy is not detected, confidence is \"high\". If it's detected, can be \"low\", \"medium\", or \"high\".
21+
22+
NOTE: This class is auto generated by the swagger code generator program.
23+
24+
Do not edit the class manually.
25+
"""
26+
27+
"""
28+
allowed enum values
29+
"""
30+
LOW = "low"
31+
MEDIUM = "medium"
32+
HIGH = "high"
33+
"""
34+
Attributes:
35+
swagger_types (dict): The key is attribute name
36+
and the value is attribute type.
37+
attribute_map (dict): The key is attribute name
38+
and the value is json key in definition.
39+
"""
40+
swagger_types = {
41+
}
42+
43+
nullable_map = {
44+
}
45+
46+
attribute_map = {
47+
}
48+
49+
def __init__(self): # noqa: E501
50+
"""ProxyConfidence - a model defined in Swagger""" # noqa: E501
51+
self.discriminator = None
52+

fingerprint_pro_server_api_sdk/models/webhook_proxy.py

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import re # noqa: F401
1414
from typing import Dict, List, Optional # noqa: F401
1515
from fingerprint_pro_server_api_sdk.base_model import BaseModel
16+
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence
1617

1718

1819
class WebhookProxy(BaseModel):
@@ -28,29 +29,35 @@ class WebhookProxy(BaseModel):
2829
and the value is json key in definition.
2930
"""
3031
swagger_types = {
31-
'result': 'bool'
32+
'result': 'bool',
33+
'confidence': 'ProxyConfidence'
3234
}
3335

3436
nullable_map = {
35-
'result': False
37+
'result': False,
38+
'confidence': False
3639
}
3740

3841
attribute_map = {
39-
'result': 'result'
42+
'result': 'result',
43+
'confidence': 'confidence'
4044
}
4145

42-
def __init__(self, result=None): # noqa: E501
46+
def __init__(self, result=None, confidence=None): # noqa: E501
4347
"""WebhookProxy - a model defined in Swagger""" # noqa: E501
4448
self._result = None
49+
self._confidence = None
4550
self.discriminator = None
4651
if result is not None:
4752
self.result = result
53+
if confidence is not None:
54+
self.confidence = confidence
4855

4956
@property
5057
def result(self) -> Optional[bool]:
5158
"""Gets the result of this WebhookProxy. # noqa: E501
5259
53-
`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
60+
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501
5461
5562
:return: The result of this WebhookProxy. # noqa: E501
5663
"""
@@ -60,10 +67,29 @@ def result(self) -> Optional[bool]:
6067
def result(self, result: Optional[bool]):
6168
"""Sets the result of this WebhookProxy.
6269
63-
`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
70+
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501
6471
6572
:param result: The result of this WebhookProxy. # noqa: E501
6673
"""
6774

6875
self._result = result
6976

77+
@property
78+
def confidence(self) -> Optional[ProxyConfidence]:
79+
"""Gets the confidence of this WebhookProxy. # noqa: E501
80+
81+
82+
:return: The confidence of this WebhookProxy. # noqa: E501
83+
"""
84+
return self._confidence
85+
86+
@confidence.setter
87+
def confidence(self, confidence: Optional[ProxyConfidence]):
88+
"""Sets the confidence of this WebhookProxy.
89+
90+
91+
:param confidence: The confidence of this WebhookProxy. # noqa: E501
92+
"""
93+
94+
self._confidence = confidence
95+

res/fingerprint-server-api.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ paths:
953953
relay: false
954954
proxy:
955955
result: false
956+
confidence: high
956957
tampering:
957958
result: false
958959
anomalyScore: 0
@@ -1724,17 +1725,30 @@ components:
17241725
$ref: '#/components/schemas/VPN'
17251726
error:
17261727
$ref: '#/components/schemas/Error'
1728+
ProxyConfidence:
1729+
type: string
1730+
enum:
1731+
- low
1732+
- medium
1733+
- high
1734+
description: |
1735+
Confidence level of the proxy detection.
1736+
If a proxy is not detected, confidence is "high".
1737+
If it's detected, can be "low", "medium", or "high".
17271738
Proxy:
17281739
type: object
17291740
additionalProperties: false
17301741
required:
17311742
- result
1743+
- confidence
17321744
properties:
17331745
result:
17341746
type: boolean
17351747
description: >
1736-
`true` if the request IP address is used by a public proxy provider,
1737-
`false` otherwise.
1748+
IP address was used by a public proxy provider or belonged to a
1749+
known recent residential proxy
1750+
confidence:
1751+
$ref: '#/components/schemas/ProxyConfidence'
17381752
ProductProxy:
17391753
type: object
17401754
additionalProperties: false
@@ -2485,8 +2499,10 @@ components:
24852499
result:
24862500
type: boolean
24872501
description: >
2488-
`true` if the request IP address is used by a public proxy provider,
2489-
`false` otherwise.
2502+
IP address was used by a public proxy provider or belonged to a
2503+
known recent residential proxy
2504+
confidence:
2505+
$ref: '#/components/schemas/ProxyConfidence'
24902506
WebhookTampering:
24912507
type: object
24922508
additionalProperties: false

test/mocks/get_event_200.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@
187187
},
188188
"proxy": {
189189
"data": {
190-
"result": false
190+
"result": false,
191+
"confidence": "high"
191192
}
192193
},
193194
"incognito": {
@@ -339,4 +340,4 @@
339340
}
340341
}
341342
}
342-
}
343+
}

test/mocks/get_event_200_with_broken_format.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@
186186
},
187187
"proxy": {
188188
"data": {
189-
"result": false
189+
"result": false,
190+
"confidence": "high"
190191
}
191192
},
192193
"incognito": {
@@ -285,4 +286,4 @@
285286
}
286287
}
287288
}
288-
}
289+
}

test/mocks/get_event_200_with_unknown_field.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@
188188
},
189189
"proxy": {
190190
"data": {
191-
"result": false
191+
"result": false,
192+
"confidence": "high"
192193
}
193194
},
194195
"incognito": {
@@ -287,4 +288,4 @@
287288
}
288289
}
289290
}
290-
}
291+
}

test/mocks/get_event_search_200.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@
189189
},
190190
"proxy": {
191191
"data": {
192-
"result": false
192+
"result": false,
193+
"confidence": "high"
193194
}
194195
},
195196
"incognito": {

0 commit comments

Comments
 (0)