From b7d40f12269ad9435246bb07aaff559034c34838 Mon Sep 17 00:00:00 2001 From: ilfa Date: Mon, 2 Jun 2025 16:10:35 +0000 Subject: [PATCH] feat: sync OpenAPI schema to v2.7.0 --- .changeset/modern-moons-pick.md | 5 ++ .schema-version | 2 +- README.md | 1 + docs/Proxy.md | 3 +- docs/ProxyConfidence.md | 6 +++ docs/WebhookProxy.md | 3 +- fingerprint_pro_server_api_sdk/__init__.py | 1 + .../models/__init__.py | 1 + .../models/proxy.py | 39 +++++++++++--- .../models/proxy_confidence.py | 52 +++++++++++++++++++ .../models/webhook_proxy.py | 38 +++++++++++--- res/fingerprint-server-api.yaml | 24 +++++++-- test/mocks/get_event_200.json | 5 +- .../get_event_200_with_broken_format.json | 5 +- .../get_event_200_with_unknown_field.json | 5 +- test/mocks/get_event_search_200.json | 3 +- test/mocks/webhook.json | 5 +- 17 files changed, 170 insertions(+), 28 deletions(-) create mode 100644 .changeset/modern-moons-pick.md create mode 100644 docs/ProxyConfidence.md create mode 100644 fingerprint_pro_server_api_sdk/models/proxy_confidence.py diff --git a/.changeset/modern-moons-pick.md b/.changeset/modern-moons-pick.md new file mode 100644 index 00000000..349f1364 --- /dev/null +++ b/.changeset/modern-moons-pick.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +Add `confidence` property to the Proxy detection Smart Signal, which now supports both residential and public web proxies. \ No newline at end of file diff --git a/.schema-version b/.schema-version index 7433fb30..5c9dc9d0 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.6.0 \ No newline at end of file +v2.7.0 \ No newline at end of file diff --git a/README.md b/README.md index e98a2056..7da40117 100644 --- a/README.md +++ b/README.md @@ -357,6 +357,7 @@ Class | Method | HTTP request | Description - [ProductVirtualMachine](docs/ProductVirtualMachine.md) - [Products](docs/Products.md) - [Proxy](docs/Proxy.md) + - [ProxyConfidence](docs/ProxyConfidence.md) - [RawDeviceAttribute](docs/RawDeviceAttribute.md) - [RawDeviceAttributeError](docs/RawDeviceAttributeError.md) - [RawDeviceAttributes](docs/RawDeviceAttributes.md) diff --git a/docs/Proxy.md b/docs/Proxy.md index 8d117978..443253bb 100644 --- a/docs/Proxy.md +++ b/docs/Proxy.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. | +**result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | +**confidence** | [**ProxyConfidence**](ProxyConfidence.md) | | [[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/ProxyConfidence.md b/docs/ProxyConfidence.md new file mode 100644 index 00000000..9bf10ad9 --- /dev/null +++ b/docs/ProxyConfidence.md @@ -0,0 +1,6 @@ +# ProxyConfidence +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". + + diff --git a/docs/WebhookProxy.md b/docs/WebhookProxy.md index 3db02ac9..ef8e30e1 100644 --- a/docs/WebhookProxy.md +++ b/docs/WebhookProxy.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. | [optional] +**result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional] +**confidence** | [**ProxyConfidence**](ProxyConfidence.md) | | [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/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index fee5ebdd..f94d2363 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -85,6 +85,7 @@ from fingerprint_pro_server_api_sdk.models.product_virtual_machine import ProductVirtualMachine from fingerprint_pro_server_api_sdk.models.products import Products from fingerprint_pro_server_api_sdk.models.proxy import Proxy +from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index 3b8ea7b4..11afb794 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -77,6 +77,7 @@ from fingerprint_pro_server_api_sdk.models.product_virtual_machine import ProductVirtualMachine from fingerprint_pro_server_api_sdk.models.products import Products from fingerprint_pro_server_api_sdk.models.proxy import Proxy +from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes diff --git a/fingerprint_pro_server_api_sdk/models/proxy.py b/fingerprint_pro_server_api_sdk/models/proxy.py index b93a4d1e..0cd2b98f 100644 --- a/fingerprint_pro_server_api_sdk/models/proxy.py +++ b/fingerprint_pro_server_api_sdk/models/proxy.py @@ -13,6 +13,7 @@ import re # noqa: F401 from typing import Dict, List, Optional # noqa: F401 from fingerprint_pro_server_api_sdk.base_model import BaseModel +from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence class Proxy(BaseModel): @@ -28,28 +29,33 @@ class Proxy(BaseModel): and the value is json key in definition. """ swagger_types = { - 'result': 'bool' + 'result': 'bool', + 'confidence': 'ProxyConfidence' } nullable_map = { - 'result': False + 'result': False, + 'confidence': False } attribute_map = { - 'result': 'result' + 'result': 'result', + 'confidence': 'confidence' } - def __init__(self, result=None): # noqa: E501 + def __init__(self, result=None, confidence=None): # noqa: E501 """Proxy - a model defined in Swagger""" # noqa: E501 self._result = None + self._confidence = None self.discriminator = None self.result = result + self.confidence = confidence @property def result(self) -> bool: """Gets the result of this Proxy. # noqa: E501 - `true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501 + IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501 :return: The result of this Proxy. # noqa: E501 """ @@ -59,7 +65,7 @@ def result(self) -> bool: def result(self, result: bool): """Sets the result of this Proxy. - `true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501 + IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501 :param result: The result of this Proxy. # noqa: E501 """ @@ -68,3 +74,24 @@ def result(self, result: bool): self._result = result + @property + def confidence(self) -> ProxyConfidence: + """Gets the confidence of this Proxy. # noqa: E501 + + + :return: The confidence of this Proxy. # noqa: E501 + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: ProxyConfidence): + """Sets the confidence of this Proxy. + + + :param confidence: The confidence of this Proxy. # noqa: E501 + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + + self._confidence = confidence + diff --git a/fingerprint_pro_server_api_sdk/models/proxy_confidence.py b/fingerprint_pro_server_api_sdk/models/proxy_confidence.py new file mode 100644 index 00000000..cfb9866a --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/proxy_confidence.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Fingerprint Server API + + 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 + + OpenAPI spec version: 3 + Contact: support@fingerprint.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import re # noqa: F401 +from typing import Dict, List, Optional # noqa: F401 +from fingerprint_pro_server_api_sdk.base_model import BaseModel + + +class ProxyConfidence(BaseModel): + """ + 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\". + + NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + LOW = "low" + MEDIUM = "medium" + HIGH = "high" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + nullable_map = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """ProxyConfidence - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + diff --git a/fingerprint_pro_server_api_sdk/models/webhook_proxy.py b/fingerprint_pro_server_api_sdk/models/webhook_proxy.py index 732bc76e..f4b36c0e 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook_proxy.py +++ b/fingerprint_pro_server_api_sdk/models/webhook_proxy.py @@ -13,6 +13,7 @@ import re # noqa: F401 from typing import Dict, List, Optional # noqa: F401 from fingerprint_pro_server_api_sdk.base_model import BaseModel +from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence class WebhookProxy(BaseModel): @@ -28,29 +29,35 @@ class WebhookProxy(BaseModel): and the value is json key in definition. """ swagger_types = { - 'result': 'bool' + 'result': 'bool', + 'confidence': 'ProxyConfidence' } nullable_map = { - 'result': False + 'result': False, + 'confidence': False } attribute_map = { - 'result': 'result' + 'result': 'result', + 'confidence': 'confidence' } - def __init__(self, result=None): # noqa: E501 + def __init__(self, result=None, confidence=None): # noqa: E501 """WebhookProxy - a model defined in Swagger""" # noqa: E501 self._result = None + self._confidence = None self.discriminator = None if result is not None: self.result = result + if confidence is not None: + self.confidence = confidence @property def result(self) -> Optional[bool]: """Gets the result of this WebhookProxy. # noqa: E501 - `true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501 + IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501 :return: The result of this WebhookProxy. # noqa: E501 """ @@ -60,10 +67,29 @@ def result(self) -> Optional[bool]: def result(self, result: Optional[bool]): """Sets the result of this WebhookProxy. - `true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501 + IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501 :param result: The result of this WebhookProxy. # noqa: E501 """ self._result = result + @property + def confidence(self) -> Optional[ProxyConfidence]: + """Gets the confidence of this WebhookProxy. # noqa: E501 + + + :return: The confidence of this WebhookProxy. # noqa: E501 + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: Optional[ProxyConfidence]): + """Sets the confidence of this WebhookProxy. + + + :param confidence: The confidence of this WebhookProxy. # noqa: E501 + """ + + self._confidence = confidence + diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index e7bd3ba9..acc13706 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -953,6 +953,7 @@ paths: relay: false proxy: result: false + confidence: high tampering: result: false anomalyScore: 0 @@ -1724,17 +1725,30 @@ components: $ref: '#/components/schemas/VPN' error: $ref: '#/components/schemas/Error' + ProxyConfidence: + type: string + enum: + - low + - medium + - high + description: | + 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". Proxy: type: object additionalProperties: false required: - result + - confidence properties: result: type: boolean description: > - `true` if the request IP address is used by a public proxy provider, - `false` otherwise. + IP address was used by a public proxy provider or belonged to a + known recent residential proxy + confidence: + $ref: '#/components/schemas/ProxyConfidence' ProductProxy: type: object additionalProperties: false @@ -2485,8 +2499,10 @@ components: result: type: boolean description: > - `true` if the request IP address is used by a public proxy provider, - `false` otherwise. + IP address was used by a public proxy provider or belonged to a + known recent residential proxy + confidence: + $ref: '#/components/schemas/ProxyConfidence' WebhookTampering: type: object additionalProperties: false diff --git a/test/mocks/get_event_200.json b/test/mocks/get_event_200.json index e88b5603..f2c2e651 100644 --- a/test/mocks/get_event_200.json +++ b/test/mocks/get_event_200.json @@ -187,7 +187,8 @@ }, "proxy": { "data": { - "result": false + "result": false, + "confidence": "high" } }, "incognito": { @@ -339,4 +340,4 @@ } } } -} +} \ No newline at end of file diff --git a/test/mocks/get_event_200_with_broken_format.json b/test/mocks/get_event_200_with_broken_format.json index 1c4a2119..29962f1c 100644 --- a/test/mocks/get_event_200_with_broken_format.json +++ b/test/mocks/get_event_200_with_broken_format.json @@ -186,7 +186,8 @@ }, "proxy": { "data": { - "result": false + "result": false, + "confidence": "high" } }, "incognito": { @@ -285,4 +286,4 @@ } } } -} +} \ No newline at end of file diff --git a/test/mocks/get_event_200_with_unknown_field.json b/test/mocks/get_event_200_with_unknown_field.json index 39111b39..7f72ea37 100644 --- a/test/mocks/get_event_200_with_unknown_field.json +++ b/test/mocks/get_event_200_with_unknown_field.json @@ -188,7 +188,8 @@ }, "proxy": { "data": { - "result": false + "result": false, + "confidence": "high" } }, "incognito": { @@ -287,4 +288,4 @@ } } } -} +} \ No newline at end of file diff --git a/test/mocks/get_event_search_200.json b/test/mocks/get_event_search_200.json index b90f62c9..ceae5a3d 100644 --- a/test/mocks/get_event_search_200.json +++ b/test/mocks/get_event_search_200.json @@ -189,7 +189,8 @@ }, "proxy": { "data": { - "result": false + "result": false, + "confidence": "high" } }, "incognito": { diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 24c5b528..45dfc1e8 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -130,7 +130,8 @@ } }, "proxy": { - "result": false + "result": false, + "confidence": "high" }, "tampering": { "result": false, @@ -246,4 +247,4 @@ "mitmAttack": { "result": false } -} +} \ No newline at end of file