From 32ae9b2fe9ec37519876e21555fb3c508605f03d Mon Sep 17 00:00:00 2001 From: ilfa Date: Tue, 19 Aug 2025 10:38:33 +0000 Subject: [PATCH] feat: sync OpenAPI schema to 2.10.0 --- .changeset/thick-toys-visit.md | 5 + .schema-version | 2 +- README.md | 1 + docs/Proxy.md | 1 + docs/ProxyDetails.md | 12 ++ docs/WebhookProxy.md | 1 + fingerprint_pro_server_api_sdk/__init__.py | 1 + .../models/__init__.py | 1 + .../models/proxy.py | 34 +++++- .../models/proxy_details.py | 107 ++++++++++++++++++ .../models/webhook_proxy.py | 34 +++++- res/fingerprint-server-api.yaml | 29 +++++ test/mocks/get_event_200.json | 8 +- .../get_event_200_with_broken_format.json | 8 +- test/mocks/get_event_search_200.json | 6 +- test/mocks/webhook.json | 8 +- 16 files changed, 242 insertions(+), 16 deletions(-) create mode 100644 .changeset/thick-toys-visit.md create mode 100644 docs/ProxyDetails.md create mode 100644 fingerprint_pro_server_api_sdk/models/proxy_details.py diff --git a/.changeset/thick-toys-visit.md b/.changeset/thick-toys-visit.md new file mode 100644 index 00000000..fce1e82e --- /dev/null +++ b/.changeset/thick-toys-visit.md @@ -0,0 +1,5 @@ +--- +"fingerprint-pro-server-api-python-sdk": minor +--- + +Add `details` object to the `proxy` signal. This field includes the `type` of the detected proxy (`residential` or `data_center`) and the `lastSeenAt` timestamp of when an IP was last observed to show proxy-like behavior. diff --git a/.schema-version b/.schema-version index ed51b084..f161b5d8 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.9.0 \ No newline at end of file +2.10.0 \ No newline at end of file diff --git a/README.md b/README.md index 2e5f184b..70edf5c0 100644 --- a/README.md +++ b/README.md @@ -358,6 +358,7 @@ Class | Method | HTTP request | Description - [Products](docs/Products.md) - [Proxy](docs/Proxy.md) - [ProxyConfidence](docs/ProxyConfidence.md) + - [ProxyDetails](docs/ProxyDetails.md) - [RawDeviceAttribute](docs/RawDeviceAttribute.md) - [RawDeviceAttributeError](docs/RawDeviceAttributeError.md) - [RawDeviceAttributes](docs/RawDeviceAttributes.md) diff --git a/docs/Proxy.md b/docs/Proxy.md index 443253bb..6b194376 100644 --- a/docs/Proxy.md +++ b/docs/Proxy.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | **confidence** | [**ProxyConfidence**](ProxyConfidence.md) | | +**details** | [**ProxyDetails**](ProxyDetails.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/docs/ProxyDetails.md b/docs/ProxyDetails.md new file mode 100644 index 00000000..cd06b640 --- /dev/null +++ b/docs/ProxyDetails.md @@ -0,0 +1,12 @@ +# ProxyDetails +Proxy detection details (present if proxy is detected) + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**proxy_type** | **str** | Residential proxies use real user IP addresses to appear as legitimate traffic, while data center proxies are public proxies hosted in data centers | +**last_seen_at** | **datetime** | ISO 8601 formatted timestamp in UTC with hourly resolution of when this IP was last seen as a proxy when available. | [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/docs/WebhookProxy.md b/docs/WebhookProxy.md index ef8e30e1..a6516094 100644 --- a/docs/WebhookProxy.md +++ b/docs/WebhookProxy.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] +**details** | [**ProxyDetails**](ProxyDetails.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 af66811d..47cf278c 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -86,6 +86,7 @@ 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.proxy_details import ProxyDetails 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 9138dc0d..baf07646 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -78,6 +78,7 @@ 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.proxy_details import ProxyDetails 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 0cd2b98f..80fe0e71 100644 --- a/fingerprint_pro_server_api_sdk/models/proxy.py +++ b/fingerprint_pro_server_api_sdk/models/proxy.py @@ -14,6 +14,7 @@ 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 +from fingerprint_pro_server_api_sdk.models.proxy_details import ProxyDetails class Proxy(BaseModel): @@ -30,26 +31,32 @@ class Proxy(BaseModel): """ swagger_types = { 'result': 'bool', - 'confidence': 'ProxyConfidence' + 'confidence': 'ProxyConfidence', + 'details': 'ProxyDetails' } nullable_map = { 'result': False, - 'confidence': False + 'confidence': False, + 'details': False } attribute_map = { 'result': 'result', - 'confidence': 'confidence' + 'confidence': 'confidence', + 'details': 'details' } - def __init__(self, result=None, confidence=None): # noqa: E501 + def __init__(self, result=None, confidence=None, details=None): # noqa: E501 """Proxy - a model defined in Swagger""" # noqa: E501 self._result = None self._confidence = None + self._details = None self.discriminator = None self.result = result self.confidence = confidence + if details is not None: + self.details = details @property def result(self) -> bool: @@ -95,3 +102,22 @@ def confidence(self, confidence: ProxyConfidence): self._confidence = confidence + @property + def details(self) -> Optional[ProxyDetails]: + """Gets the details of this Proxy. # noqa: E501 + + + :return: The details of this Proxy. # noqa: E501 + """ + return self._details + + @details.setter + def details(self, details: Optional[ProxyDetails]): + """Sets the details of this Proxy. + + + :param details: The details of this Proxy. # noqa: E501 + """ + + self._details = details + diff --git a/fingerprint_pro_server_api_sdk/models/proxy_details.py b/fingerprint_pro_server_api_sdk/models/proxy_details.py new file mode 100644 index 00000000..5b2b3c54 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/proxy_details.py @@ -0,0 +1,107 @@ +# 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 +from datetime import datetime + + +class ProxyDetails(BaseModel): + """ + Proxy detection details (present if proxy is detected) + + NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + 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 = { + 'proxy_type': 'str', + 'last_seen_at': 'datetime' + } + + nullable_map = { + 'proxy_type': False, + 'last_seen_at': False + } + + attribute_map = { + 'proxy_type': 'proxyType', + 'last_seen_at': 'lastSeenAt' + } + + def __init__(self, proxy_type=None, last_seen_at=None): # noqa: E501 + """ProxyDetails - a model defined in Swagger""" # noqa: E501 + self._proxy_type = None + self._last_seen_at = None + self.discriminator = None + self.proxy_type = proxy_type + if last_seen_at is not None: + self.last_seen_at = last_seen_at + + @property + def proxy_type(self) -> str: + """Gets the proxy_type of this ProxyDetails. # noqa: E501 + + Residential proxies use real user IP addresses to appear as legitimate traffic, while data center proxies are public proxies hosted in data centers # noqa: E501 + + :return: The proxy_type of this ProxyDetails. # noqa: E501 + """ + return self._proxy_type + + @proxy_type.setter + def proxy_type(self, proxy_type: str): + """Sets the proxy_type of this ProxyDetails. + + Residential proxies use real user IP addresses to appear as legitimate traffic, while data center proxies are public proxies hosted in data centers # noqa: E501 + + :param proxy_type: The proxy_type of this ProxyDetails. # noqa: E501 + """ + if proxy_type is None: + raise ValueError("Invalid value for `proxy_type`, must not be `None`") # noqa: E501 + allowed_values = ["residential", "data_center"] # noqa: E501 + if (proxy_type not in allowed_values): + raise ValueError( + "Invalid value for `proxy_type` ({0}), must be one of {1}" # noqa: E501 + .format(proxy_type, allowed_values) + ) + + self._proxy_type = proxy_type + + @property + def last_seen_at(self) -> Optional[datetime]: + """Gets the last_seen_at of this ProxyDetails. # noqa: E501 + + ISO 8601 formatted timestamp in UTC with hourly resolution of when this IP was last seen as a proxy when available. # noqa: E501 + + :return: The last_seen_at of this ProxyDetails. # noqa: E501 + """ + return self._last_seen_at + + @last_seen_at.setter + def last_seen_at(self, last_seen_at: Optional[datetime]): + """Sets the last_seen_at of this ProxyDetails. + + ISO 8601 formatted timestamp in UTC with hourly resolution of when this IP was last seen as a proxy when available. # noqa: E501 + + :param last_seen_at: The last_seen_at of this ProxyDetails. # noqa: E501 + """ + + self._last_seen_at = last_seen_at + diff --git a/fingerprint_pro_server_api_sdk/models/webhook_proxy.py b/fingerprint_pro_server_api_sdk/models/webhook_proxy.py index f4b36c0e..1da39f73 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook_proxy.py +++ b/fingerprint_pro_server_api_sdk/models/webhook_proxy.py @@ -14,6 +14,7 @@ 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 +from fingerprint_pro_server_api_sdk.models.proxy_details import ProxyDetails class WebhookProxy(BaseModel): @@ -30,28 +31,34 @@ class WebhookProxy(BaseModel): """ swagger_types = { 'result': 'bool', - 'confidence': 'ProxyConfidence' + 'confidence': 'ProxyConfidence', + 'details': 'ProxyDetails' } nullable_map = { 'result': False, - 'confidence': False + 'confidence': False, + 'details': False } attribute_map = { 'result': 'result', - 'confidence': 'confidence' + 'confidence': 'confidence', + 'details': 'details' } - def __init__(self, result=None, confidence=None): # noqa: E501 + def __init__(self, result=None, confidence=None, details=None): # noqa: E501 """WebhookProxy - a model defined in Swagger""" # noqa: E501 self._result = None self._confidence = None + self._details = None self.discriminator = None if result is not None: self.result = result if confidence is not None: self.confidence = confidence + if details is not None: + self.details = details @property def result(self) -> Optional[bool]: @@ -93,3 +100,22 @@ def confidence(self, confidence: Optional[ProxyConfidence]): self._confidence = confidence + @property + def details(self) -> Optional[ProxyDetails]: + """Gets the details of this WebhookProxy. # noqa: E501 + + + :return: The details of this WebhookProxy. # noqa: E501 + """ + return self._details + + @details.setter + def details(self, details: Optional[ProxyDetails]): + """Sets the details of this WebhookProxy. + + + :param details: The details of this WebhookProxy. # noqa: E501 + """ + + self._details = details + diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index a18ca18c..2608c719 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -1580,6 +1580,31 @@ components: 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". + ProxyDetails: + type: object + nullable: true + additionalProperties: false + description: Proxy detection details (present if proxy is detected) + required: + - proxyType + properties: + proxyType: + type: string + enum: + - residential + - data_center + description: > + Residential proxies use real user IP addresses to appear as + legitimate traffic, + + while data center proxies are public proxies hosted in data centers + lastSeenAt: + type: string + format: date-time + x-ogen-time-format: 2006-01-02T15:00:00.000Z + description: | + ISO 8601 formatted timestamp in UTC with hourly resolution + of when this IP was last seen as a proxy when available. Proxy: type: object additionalProperties: false @@ -1594,6 +1619,8 @@ components: known recent residential proxy confidence: $ref: '#/components/schemas/ProxyConfidence' + details: + $ref: '#/components/schemas/ProxyDetails' ProductProxy: type: object additionalProperties: false @@ -2355,6 +2382,8 @@ components: known recent residential proxy confidence: $ref: '#/components/schemas/ProxyConfidence' + details: + $ref: '#/components/schemas/ProxyDetails' WebhookTampering: type: object additionalProperties: false diff --git a/test/mocks/get_event_200.json b/test/mocks/get_event_200.json index a4cd83d3..4379fbbd 100644 --- a/test/mocks/get_event_200.json +++ b/test/mocks/get_event_200.json @@ -192,8 +192,12 @@ }, "proxy": { "data": { - "result": false, - "confidence": "high" + "result": true, + "confidence": "high", + "details": { + "proxyType": "residential", + "lastSeenAt": "2025-08-12T13:00:00Z" + } } }, "incognito": { diff --git a/test/mocks/get_event_200_with_broken_format.json b/test/mocks/get_event_200_with_broken_format.json index dd726c43..f665f107 100644 --- a/test/mocks/get_event_200_with_broken_format.json +++ b/test/mocks/get_event_200_with_broken_format.json @@ -187,8 +187,12 @@ }, "proxy": { "data": { - "result": false, - "confidence": "high" + "result": true, + "confidence": "high", + "details": { + "proxyType": "residential", + "lastSeenAt": "2025-08-12T13:00:00Z" + } } }, "incognito": { diff --git a/test/mocks/get_event_search_200.json b/test/mocks/get_event_search_200.json index 0f3ca053..b54cece9 100644 --- a/test/mocks/get_event_search_200.json +++ b/test/mocks/get_event_search_200.json @@ -191,7 +191,11 @@ "proxy": { "data": { "result": false, - "confidence": "high" + "confidence": "high", + "details": { + "proxyType": "residential", + "lastSeenAt": "2025-08-12T13:00:00Z" + } } }, "incognito": { diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 3eeffb35..8a8aa947 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -130,8 +130,12 @@ } }, "proxy": { - "result": false, - "confidence": "high" + "result": true, + "confidence": "high", + "details": { + "proxyType": "residential", + "lastSeenAt": "2025-08-12T13:00:00Z" + } }, "tampering": { "result": false,