From 8b24e3b39b28d4c774e50f42e1648f5bfd804f11 Mon Sep 17 00:00:00 2001 From: Orkuncakilkaya Date: Thu, 4 Sep 2025 12:26:47 +0000 Subject: [PATCH 1/2] feat: sync OpenAPI schema to v2.12.0 --- .changeset/proud-feet-attack.md | 5 + .schema-version | 2 +- README.md | 3 + docs/FingerprintApi.md | 8 +- docs/ProductProximity.md | 10 ++ docs/Products.md | 1 + docs/Proximity.md | 14 ++ docs/Webhook.md | 1 + docs/WebhookProximity.md | 14 ++ fingerprint_pro_server_api_sdk/__init__.py | 3 + .../api/fingerprint_api.py | 10 ++ .../models/__init__.py | 3 + .../models/product_proximity.py | 94 ++++++++++++ .../models/products.py | 34 ++++- .../models/proximity.py | 135 ++++++++++++++++++ .../models/webhook.py | 34 ++++- .../models/webhook_proximity.py | 135 ++++++++++++++++++ res/fingerprint-server-api.yaml | 125 ++++++++++++++++ test/mocks/get_event_200.json | 7 + test/mocks/get_event_200_all_errors.json | 6 + .../get_event_200_with_broken_format.json | 7 + .../get_event_200_with_unknown_field.json | 7 + test/mocks/get_event_search_200.json | 7 + test/mocks/webhook.json | 5 + 24 files changed, 659 insertions(+), 11 deletions(-) create mode 100644 .changeset/proud-feet-attack.md create mode 100644 docs/ProductProximity.md create mode 100644 docs/Proximity.md create mode 100644 docs/WebhookProximity.md create mode 100644 fingerprint_pro_server_api_sdk/models/product_proximity.py create mode 100644 fingerprint_pro_server_api_sdk/models/proximity.py create mode 100644 fingerprint_pro_server_api_sdk/models/webhook_proximity.py diff --git a/.changeset/proud-feet-attack.md b/.changeset/proud-feet-attack.md new file mode 100644 index 00000000..b01697ed --- /dev/null +++ b/.changeset/proud-feet-attack.md @@ -0,0 +1,5 @@ +--- +"fingerprint-pro-server-api-python-sdk": minor +--- + +Add `proximity` signal that represents a fixed geographical zone in a discrete global grid within which the device is observed. diff --git a/.schema-version b/.schema-version index 805579f3..a5db00c8 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.11.0 \ No newline at end of file +v2.12.0 \ No newline at end of file diff --git a/README.md b/README.md index 26b8f978..b8c23b52 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,7 @@ Class | Method | HTTP request | Description - [ProductLocationSpoofing](docs/ProductLocationSpoofing.md) - [ProductMitMAttack](docs/ProductMitMAttack.md) - [ProductPrivacySettings](docs/ProductPrivacySettings.md) + - [ProductProximity](docs/ProductProximity.md) - [ProductProxy](docs/ProductProxy.md) - [ProductRawDeviceAttributes](docs/ProductRawDeviceAttributes.md) - [ProductRemoteControl](docs/ProductRemoteControl.md) @@ -356,6 +357,7 @@ Class | Method | HTTP request | Description - [ProductVelocity](docs/ProductVelocity.md) - [ProductVirtualMachine](docs/ProductVirtualMachine.md) - [Products](docs/Products.md) + - [Proximity](docs/Proximity.md) - [Proxy](docs/Proxy.md) - [ProxyConfidence](docs/ProxyConfidence.md) - [ProxyDetails](docs/ProxyDetails.md) @@ -396,6 +398,7 @@ Class | Method | HTTP request | Description - [WebhookLocationSpoofing](docs/WebhookLocationSpoofing.md) - [WebhookMitMAttack](docs/WebhookMitMAttack.md) - [WebhookPrivacySettings](docs/WebhookPrivacySettings.md) + - [WebhookProximity](docs/WebhookProximity.md) - [WebhookProxy](docs/WebhookProxy.md) - [WebhookRawDeviceAttributes](docs/WebhookRawDeviceAttributes.md) - [WebhookRemoteControl](docs/WebhookRemoteControl.md) diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 416a4b1c..d1533514 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -221,7 +221,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **search_events** -> SearchEventsResponse search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, ip_blocklist=ip_blocklist, datacenter=datacenter, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment) +> SearchEventsResponse search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, ip_blocklist=ip_blocklist, datacenter=datacenter, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, proximity_precision_radius=proximity_precision_radius) Get events via search @@ -272,10 +272,12 @@ proxy = True # bool | Filter events by Proxy detection result. > Note: When usin sdk_version = 'sdk_version_example' # str | Filter events by a specific SDK version associated with the identification event. Example: `3.11.14` (optional) sdk_platform = 'sdk_platform_example' # str | Filter events by the SDK Platform associated with the identification event. `js` - JavaScript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. (optional) environment = ['environment_example'] # list[str] | Filter for events by providing one or more environment IDs. (optional) +proximity_id = 'proximity_id_example' # str | Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `products.proximity.id` property matching the provided ID are returned. Events without a `products.proximity` result are left out of the response. (optional) +proximity_precision_radius = 56 # int | Filter events by Proximity Radius. > Note: When using this parameter, only events with the `products.proximity.precisionRadius` property set to a valid value are returned. Events without a `products.proximity` result are left out of the response. (optional) try: # Get events via search - api_response = api_instance.search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, ip_blocklist=ip_blocklist, datacenter=datacenter, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment) + api_response = api_instance.search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, ip_blocklist=ip_blocklist, datacenter=datacenter, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, proximity_precision_radius=proximity_precision_radius) print(api_response) except ApiException as e: print("Exception when calling FingerprintApi->search_events: %s\n" % e) @@ -318,6 +320,8 @@ Name | Type | Description | Notes **sdk_version** | **str**| Filter events by a specific SDK version associated with the identification event. Example: `3.11.14` | [optional] **sdk_platform** | **str**| Filter events by the SDK Platform associated with the identification event. `js` - JavaScript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. | [optional] **environment** | [**list[str]**](str.md)| Filter for events by providing one or more environment IDs. | [optional] + **proximity_id** | **str**| Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `products.proximity.id` property matching the provided ID are returned. Events without a `products.proximity` result are left out of the response. | [optional] + **proximity_precision_radius** | **int**| Filter events by Proximity Radius. > Note: When using this parameter, only events with the `products.proximity.precisionRadius` property set to a valid value are returned. Events without a `products.proximity` result are left out of the response. | [optional] ### Return type diff --git a/docs/ProductProximity.md b/docs/ProductProximity.md new file mode 100644 index 00000000..9b32c827 --- /dev/null +++ b/docs/ProductProximity.md @@ -0,0 +1,10 @@ +# ProductProximity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Proximity**](Proximity.md) | | [optional] +**error** | [**Error**](Error.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/Products.md b/docs/Products.md index 1c38353a..428c28be 100644 --- a/docs/Products.md +++ b/docs/Products.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **velocity** | [**ProductVelocity**](ProductVelocity.md) | | [optional] **developer_tools** | [**ProductDeveloperTools**](ProductDeveloperTools.md) | | [optional] **mitm_attack** | [**ProductMitMAttack**](ProductMitMAttack.md) | | [optional] +**proximity** | [**ProductProximity**](ProductProximity.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/Proximity.md b/docs/Proximity.md new file mode 100644 index 00000000..dddb7c76 --- /dev/null +++ b/docs/Proximity.md @@ -0,0 +1,14 @@ +# Proximity +Proximity ID represents a fixed geographical zone in a discrete global grid within which the device is observed. + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | A stable privacy-preserving identifier for a given proximity zone. | +**precision_radius** | **int** | The radius of the proximity zone’s precision level, in meters. | +**confidence** | **float** | A value between `0` and `1` representing the likelihood that the true device location lies within the mapped proximity zone. * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. | + +[[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/Webhook.md b/docs/Webhook.md index 94528d05..7b1051de 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -48,6 +48,7 @@ Name | Type | Description | Notes **replayed** | **bool** | `true` if we determined that this payload was replayed, `false` otherwise. | [optional] **sdk** | [**SDK**](SDK.md) | | **supplementary_ids** | [**WebhookSupplementaryIDs**](WebhookSupplementaryIDs.md) | | [optional] +**proximity** | [**WebhookProximity**](WebhookProximity.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/WebhookProximity.md b/docs/WebhookProximity.md new file mode 100644 index 00000000..8637f9d4 --- /dev/null +++ b/docs/WebhookProximity.md @@ -0,0 +1,14 @@ +# WebhookProximity +Proximity ID represents a fixed geographical zone in a discrete global grid within which the device is observed. + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | A stable privacy-preserving identifier for a given proximity zone. | +**precision_radius** | **int** | The radius of the proximity zone’s precision level, in meters. | +**confidence** | **float** | A value between `0` and `1` representing the likelihood that the true device location lies within the mapped proximity zone. * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. | + +[[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 7cfcc3ee..2544358c 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -73,6 +73,7 @@ from fingerprint_pro_server_api_sdk.models.product_location_spoofing import ProductLocationSpoofing from fingerprint_pro_server_api_sdk.models.product_mit_m_attack import ProductMitMAttack from fingerprint_pro_server_api_sdk.models.product_privacy_settings import ProductPrivacySettings +from fingerprint_pro_server_api_sdk.models.product_proximity import ProductProximity from fingerprint_pro_server_api_sdk.models.product_proxy import ProductProxy from fingerprint_pro_server_api_sdk.models.product_raw_device_attributes import ProductRawDeviceAttributes from fingerprint_pro_server_api_sdk.models.product_remote_control import ProductRemoteControl @@ -84,6 +85,7 @@ from fingerprint_pro_server_api_sdk.models.product_velocity import ProductVelocity 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.proximity import Proximity 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 @@ -124,6 +126,7 @@ from fingerprint_pro_server_api_sdk.models.webhook_location_spoofing import WebhookLocationSpoofing from fingerprint_pro_server_api_sdk.models.webhook_mit_m_attack import WebhookMitMAttack from fingerprint_pro_server_api_sdk.models.webhook_privacy_settings import WebhookPrivacySettings +from fingerprint_pro_server_api_sdk.models.webhook_proximity import WebhookProximity from fingerprint_pro_server_api_sdk.models.webhook_proxy import WebhookProxy from fingerprint_pro_server_api_sdk.models.webhook_raw_device_attributes import WebhookRawDeviceAttributes from fingerprint_pro_server_api_sdk.models.webhook_remote_control import WebhookRemoteControl diff --git a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py index bb34cd79..d208f3f4 100644 --- a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py +++ b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py @@ -539,6 +539,8 @@ def search_events(self, limit: int, **kwargs) -> Union[SearchEventsResponse, Asy :param sdk_version: Filter events by a specific SDK version associated with the identification event. Example: `3.11.14` :param sdk_platform: Filter events by the SDK Platform associated with the identification event. `js` - JavaScript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. :param environment: Filter for events by providing one or more environment IDs. + :param proximity_id: Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `products.proximity.id` property matching the provided ID are returned. Events without a `products.proximity` result are left out of the response. + :param proximity_precision_radius: Filter events by Proximity Radius. > Note: When using this parameter, only events with the `products.proximity.precisionRadius` property set to a valid value are returned. Events without a `products.proximity` result are left out of the response. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -593,6 +595,8 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 :param str sdk_version: Filter events by a specific SDK version associated with the identification event. Example: `3.11.14` :param str sdk_platform: Filter events by the SDK Platform associated with the identification event. `js` - JavaScript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. :param list[str] environment: Filter for events by providing one or more environment IDs. + :param str proximity_id: Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `products.proximity.id` property matching the provided ID are returned. Events without a `products.proximity` result are left out of the response. + :param int proximity_precision_radius: Filter events by Proximity Radius. > Note: When using this parameter, only events with the `products.proximity.precisionRadius` property set to a valid value are returned. Events without a `products.proximity` result are left out of the response. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -632,6 +636,8 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 'sdk_version', 'sdk_platform', 'environment', + 'proximity_id', + 'proximity_precision_radius', 'async_req', '_return_http_data_only', '_preload_content', @@ -722,6 +728,10 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 if 'environment' in params: query_params.append(('environment', params['environment'])) # noqa: E501 collection_formats['environment'] = 'multi' # noqa: E501 + if 'proximity_id' in params: + query_params.append(('proximity_id', params['proximity_id'])) # noqa: E501 + if 'proximity_precision_radius' in params: + query_params.append(('proximity_precision_radius', params['proximity_precision_radius'])) # noqa: E501 header_params = {} diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index 5a7a8d1e..18963bc1 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -65,6 +65,7 @@ from fingerprint_pro_server_api_sdk.models.product_location_spoofing import ProductLocationSpoofing from fingerprint_pro_server_api_sdk.models.product_mit_m_attack import ProductMitMAttack from fingerprint_pro_server_api_sdk.models.product_privacy_settings import ProductPrivacySettings +from fingerprint_pro_server_api_sdk.models.product_proximity import ProductProximity from fingerprint_pro_server_api_sdk.models.product_proxy import ProductProxy from fingerprint_pro_server_api_sdk.models.product_raw_device_attributes import ProductRawDeviceAttributes from fingerprint_pro_server_api_sdk.models.product_remote_control import ProductRemoteControl @@ -76,6 +77,7 @@ from fingerprint_pro_server_api_sdk.models.product_velocity import ProductVelocity 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.proximity import Proximity 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 @@ -116,6 +118,7 @@ from fingerprint_pro_server_api_sdk.models.webhook_location_spoofing import WebhookLocationSpoofing from fingerprint_pro_server_api_sdk.models.webhook_mit_m_attack import WebhookMitMAttack from fingerprint_pro_server_api_sdk.models.webhook_privacy_settings import WebhookPrivacySettings +from fingerprint_pro_server_api_sdk.models.webhook_proximity import WebhookProximity from fingerprint_pro_server_api_sdk.models.webhook_proxy import WebhookProxy from fingerprint_pro_server_api_sdk.models.webhook_raw_device_attributes import WebhookRawDeviceAttributes from fingerprint_pro_server_api_sdk.models.webhook_remote_control import WebhookRemoteControl diff --git a/fingerprint_pro_server_api_sdk/models/product_proximity.py b/fingerprint_pro_server_api_sdk/models/product_proximity.py new file mode 100644 index 00000000..4ccb8d90 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/product_proximity.py @@ -0,0 +1,94 @@ +# 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 fingerprint_pro_server_api_sdk.models.proximity import Proximity +from fingerprint_pro_server_api_sdk.models.error import Error + + +class ProductProximity(BaseModel): + """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 = { + 'data': 'Proximity', + 'error': 'Error' + } + + nullable_map = { + 'data': False, + 'error': False + } + + attribute_map = { + 'data': 'data', + 'error': 'error' + } + + def __init__(self, data=None, error=None): # noqa: E501 + """ProductProximity - a model defined in Swagger""" # noqa: E501 + self._data = None + self._error = None + self.discriminator = None + if data is not None: + self.data = data + if error is not None: + self.error = error + + @property + def data(self) -> Optional[Proximity]: + """Gets the data of this ProductProximity. # noqa: E501 + + + :return: The data of this ProductProximity. # noqa: E501 + """ + return self._data + + @data.setter + def data(self, data: Optional[Proximity]): + """Sets the data of this ProductProximity. + + + :param data: The data of this ProductProximity. # noqa: E501 + """ + + self._data = data + + @property + def error(self) -> Optional[Error]: + """Gets the error of this ProductProximity. # noqa: E501 + + + :return: The error of this ProductProximity. # noqa: E501 + """ + return self._error + + @error.setter + def error(self, error: Optional[Error]): + """Sets the error of this ProductProximity. + + + :param error: The error of this ProductProximity. # noqa: E501 + """ + + self._error = error + diff --git a/fingerprint_pro_server_api_sdk/models/products.py b/fingerprint_pro_server_api_sdk/models/products.py index 76a995b0..ecb3f2c5 100644 --- a/fingerprint_pro_server_api_sdk/models/products.py +++ b/fingerprint_pro_server_api_sdk/models/products.py @@ -38,6 +38,7 @@ from fingerprint_pro_server_api_sdk.models.product_velocity import ProductVelocity from fingerprint_pro_server_api_sdk.models.product_developer_tools import ProductDeveloperTools from fingerprint_pro_server_api_sdk.models.product_mit_m_attack import ProductMitMAttack +from fingerprint_pro_server_api_sdk.models.product_proximity import ProductProximity class Products(BaseModel): @@ -80,7 +81,8 @@ class Products(BaseModel): 'remote_control': 'ProductRemoteControl', 'velocity': 'ProductVelocity', 'developer_tools': 'ProductDeveloperTools', - 'mitm_attack': 'ProductMitMAttack' + 'mitm_attack': 'ProductMitMAttack', + 'proximity': 'ProductProximity' } nullable_map = { @@ -108,7 +110,8 @@ class Products(BaseModel): 'remote_control': False, 'velocity': False, 'developer_tools': False, - 'mitm_attack': False + 'mitm_attack': False, + 'proximity': False } attribute_map = { @@ -136,10 +139,11 @@ class Products(BaseModel): 'remote_control': 'remoteControl', 'velocity': 'velocity', 'developer_tools': 'developerTools', - 'mitm_attack': 'mitmAttack' + 'mitm_attack': 'mitmAttack', + 'proximity': 'proximity' } - def __init__(self, identification=None, botd=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, incognito=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None): # noqa: E501 + def __init__(self, identification=None, botd=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, incognito=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None, proximity=None): # noqa: E501 """Products - a model defined in Swagger""" # noqa: E501 self._identification = None self._botd = None @@ -166,6 +170,7 @@ def __init__(self, identification=None, botd=None, root_apps=None, emulator=None self._velocity = None self._developer_tools = None self._mitm_attack = None + self._proximity = None self.discriminator = None if identification is not None: self.identification = identification @@ -217,6 +222,8 @@ def __init__(self, identification=None, botd=None, root_apps=None, emulator=None self.developer_tools = developer_tools if mitm_attack is not None: self.mitm_attack = mitm_attack + if proximity is not None: + self.proximity = proximity @property def identification(self) -> Optional[ProductIdentification]: @@ -693,3 +700,22 @@ def mitm_attack(self, mitm_attack: Optional[ProductMitMAttack]): self._mitm_attack = mitm_attack + @property + def proximity(self) -> Optional[ProductProximity]: + """Gets the proximity of this Products. # noqa: E501 + + + :return: The proximity of this Products. # noqa: E501 + """ + return self._proximity + + @proximity.setter + def proximity(self, proximity: Optional[ProductProximity]): + """Sets the proximity of this Products. + + + :param proximity: The proximity of this Products. # noqa: E501 + """ + + self._proximity = proximity + diff --git a/fingerprint_pro_server_api_sdk/models/proximity.py b/fingerprint_pro_server_api_sdk/models/proximity.py new file mode 100644 index 00000000..4e5deca4 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/proximity.py @@ -0,0 +1,135 @@ +# 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 Proximity(BaseModel): + """ + Proximity ID represents a fixed geographical zone in a discrete global grid within which the device is observed. + + 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 = { + 'id': 'str', + 'precision_radius': 'int', + 'confidence': 'float' + } + + nullable_map = { + 'id': False, + 'precision_radius': False, + 'confidence': False + } + + attribute_map = { + 'id': 'id', + 'precision_radius': 'precisionRadius', + 'confidence': 'confidence' + } + + def __init__(self, id=None, precision_radius=None, confidence=None): # noqa: E501 + """Proximity - a model defined in Swagger""" # noqa: E501 + self._id = None + self._precision_radius = None + self._confidence = None + self.discriminator = None + self.id = id + self.precision_radius = precision_radius + self.confidence = confidence + + @property + def id(self) -> str: + """Gets the id of this Proximity. # noqa: E501 + + A stable privacy-preserving identifier for a given proximity zone. # noqa: E501 + + :return: The id of this Proximity. # noqa: E501 + """ + return self._id + + @id.setter + def id(self, id: str): + """Sets the id of this Proximity. + + A stable privacy-preserving identifier for a given proximity zone. # noqa: E501 + + :param id: The id of this Proximity. # noqa: E501 + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def precision_radius(self) -> int: + """Gets the precision_radius of this Proximity. # noqa: E501 + + The radius of the proximity zone’s precision level, in meters. # noqa: E501 + + :return: The precision_radius of this Proximity. # noqa: E501 + """ + return self._precision_radius + + @precision_radius.setter + def precision_radius(self, precision_radius: int): + """Sets the precision_radius of this Proximity. + + The radius of the proximity zone’s precision level, in meters. # noqa: E501 + + :param precision_radius: The precision_radius of this Proximity. # noqa: E501 + """ + if precision_radius is None: + raise ValueError("Invalid value for `precision_radius`, must not be `None`") # noqa: E501 + allowed_values = [10, 25, 65, 175, 450, 1200, 3300, 8500, 22500] # noqa: E501 + if (precision_radius not in allowed_values): + raise ValueError( + "Invalid value for `precision_radius` ({0}), must be one of {1}" # noqa: E501 + .format(precision_radius, allowed_values) + ) + + self._precision_radius = precision_radius + + @property + def confidence(self) -> float: + """Gets the confidence of this Proximity. # noqa: E501 + + A value between `0` and `1` representing the likelihood that the true device location lies within the mapped proximity zone. * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. # noqa: E501 + + :return: The confidence of this Proximity. # noqa: E501 + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: float): + """Sets the confidence of this Proximity. + + A value between `0` and `1` representing the likelihood that the true device location lies within the mapped proximity zone. * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. # noqa: E501 + + :param confidence: The confidence of this Proximity. # 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/webhook.py b/fingerprint_pro_server_api_sdk/models/webhook.py index c8b9735e..b0a7da6f 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook.py +++ b/fingerprint_pro_server_api_sdk/models/webhook.py @@ -46,6 +46,7 @@ from fingerprint_pro_server_api_sdk.models.webhook_mit_m_attack import WebhookMitMAttack from fingerprint_pro_server_api_sdk.models.sdk import SDK from fingerprint_pro_server_api_sdk.models.webhook_supplementary_i_ds import WebhookSupplementaryIDs +from fingerprint_pro_server_api_sdk.models.webhook_proximity import WebhookProximity class Webhook(BaseModel): @@ -105,7 +106,8 @@ class Webhook(BaseModel): 'mitm_attack': 'WebhookMitMAttack', 'replayed': 'bool', 'sdk': 'SDK', - 'supplementary_ids': 'WebhookSupplementaryIDs' + 'supplementary_ids': 'WebhookSupplementaryIDs', + 'proximity': 'WebhookProximity' } nullable_map = { @@ -153,7 +155,8 @@ class Webhook(BaseModel): 'mitm_attack': False, 'replayed': False, 'sdk': False, - 'supplementary_ids': False + 'supplementary_ids': False, + 'proximity': False } attribute_map = { @@ -201,10 +204,11 @@ class Webhook(BaseModel): 'mitm_attack': 'mitmAttack', 'replayed': 'replayed', 'sdk': 'sdk', - 'supplementary_ids': 'supplementaryIds' + 'supplementary_ids': 'supplementaryIds', + 'proximity': 'proximity' } - def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag=None, time=None, timestamp=None, ip_location=None, linked_id=None, visitor_id=None, visitor_found=None, confidence=None, first_seen_at=None, last_seen_at=None, browser_details=None, incognito=None, client_referrer=None, components=None, bot=None, user_agent=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None, replayed=None, sdk=None, supplementary_ids=None): # noqa: E501 + def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag=None, time=None, timestamp=None, ip_location=None, linked_id=None, visitor_id=None, visitor_found=None, confidence=None, first_seen_at=None, last_seen_at=None, browser_details=None, incognito=None, client_referrer=None, components=None, bot=None, user_agent=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None, replayed=None, sdk=None, supplementary_ids=None, proximity=None): # noqa: E501 """Webhook - a model defined in Swagger""" # noqa: E501 self._request_id = None self._url = None @@ -251,6 +255,7 @@ def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag= self._replayed = None self._sdk = None self._supplementary_ids = None + self._proximity = None self.discriminator = None self.request_id = request_id self.url = url @@ -336,6 +341,8 @@ def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag= self.sdk = sdk if supplementary_ids is not None: self.supplementary_ids = supplementary_ids + if proximity is not None: + self.proximity = proximity @property def request_id(self) -> str: @@ -1226,3 +1233,22 @@ def supplementary_ids(self, supplementary_ids: Optional[WebhookSupplementaryIDs] self._supplementary_ids = supplementary_ids + @property + def proximity(self) -> Optional[WebhookProximity]: + """Gets the proximity of this Webhook. # noqa: E501 + + + :return: The proximity of this Webhook. # noqa: E501 + """ + return self._proximity + + @proximity.setter + def proximity(self, proximity: Optional[WebhookProximity]): + """Sets the proximity of this Webhook. + + + :param proximity: The proximity of this Webhook. # noqa: E501 + """ + + self._proximity = proximity + diff --git a/fingerprint_pro_server_api_sdk/models/webhook_proximity.py b/fingerprint_pro_server_api_sdk/models/webhook_proximity.py new file mode 100644 index 00000000..861b6391 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/webhook_proximity.py @@ -0,0 +1,135 @@ +# 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 WebhookProximity(BaseModel): + """ + Proximity ID represents a fixed geographical zone in a discrete global grid within which the device is observed. + + 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 = { + 'id': 'str', + 'precision_radius': 'int', + 'confidence': 'float' + } + + nullable_map = { + 'id': False, + 'precision_radius': False, + 'confidence': False + } + + attribute_map = { + 'id': 'id', + 'precision_radius': 'precisionRadius', + 'confidence': 'confidence' + } + + def __init__(self, id=None, precision_radius=None, confidence=None): # noqa: E501 + """WebhookProximity - a model defined in Swagger""" # noqa: E501 + self._id = None + self._precision_radius = None + self._confidence = None + self.discriminator = None + self.id = id + self.precision_radius = precision_radius + self.confidence = confidence + + @property + def id(self) -> str: + """Gets the id of this WebhookProximity. # noqa: E501 + + A stable privacy-preserving identifier for a given proximity zone. # noqa: E501 + + :return: The id of this WebhookProximity. # noqa: E501 + """ + return self._id + + @id.setter + def id(self, id: str): + """Sets the id of this WebhookProximity. + + A stable privacy-preserving identifier for a given proximity zone. # noqa: E501 + + :param id: The id of this WebhookProximity. # noqa: E501 + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def precision_radius(self) -> int: + """Gets the precision_radius of this WebhookProximity. # noqa: E501 + + The radius of the proximity zone’s precision level, in meters. # noqa: E501 + + :return: The precision_radius of this WebhookProximity. # noqa: E501 + """ + return self._precision_radius + + @precision_radius.setter + def precision_radius(self, precision_radius: int): + """Sets the precision_radius of this WebhookProximity. + + The radius of the proximity zone’s precision level, in meters. # noqa: E501 + + :param precision_radius: The precision_radius of this WebhookProximity. # noqa: E501 + """ + if precision_radius is None: + raise ValueError("Invalid value for `precision_radius`, must not be `None`") # noqa: E501 + allowed_values = [10, 25, 65, 175, 450, 1200, 3300, 8500, 22500] # noqa: E501 + if (precision_radius not in allowed_values): + raise ValueError( + "Invalid value for `precision_radius` ({0}), must be one of {1}" # noqa: E501 + .format(precision_radius, allowed_values) + ) + + self._precision_radius = precision_radius + + @property + def confidence(self) -> float: + """Gets the confidence of this WebhookProximity. # noqa: E501 + + A value between `0` and `1` representing the likelihood that the true device location lies within the mapped proximity zone. * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. # noqa: E501 + + :return: The confidence of this WebhookProximity. # noqa: E501 + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: float): + """Sets the confidence of this WebhookProximity. + + A value between `0` and `1` representing the likelihood that the true device location lies within the mapped proximity zone. * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. # noqa: E501 + + :param confidence: The confidence of this WebhookProximity. # noqa: E501 + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + + self._confidence = confidence + diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index a8f78f70..71a4fa75 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -550,6 +550,39 @@ paths: type: string style: form explode: true + - name: proximity_id + in: query + schema: + type: string + description: > + Filter events by the most precise Proximity ID provided by default. + + > Note: When using this parameter, only events with the + `products.proximity.id` property matching the provided ID are + returned. Events without a `products.proximity` result are left out + of the response. + - name: proximity_precision_radius + in: query + schema: + type: integer + format: int32 + enum: + - 10 + - 25 + - 65 + - 175 + - 450 + - 1200 + - 3300 + - 8500 + - 22500 + description: > + Filter events by Proximity Radius. + + > Note: When using this parameter, only events with the + `products.proximity.precisionRadius` property set to a valid value + are returned. Events without a `products.proximity` result are left + out of the response. responses: '200': description: Events matching the filter(s). @@ -2150,6 +2183,54 @@ components: $ref: '#/components/schemas/MitMAttack' error: $ref: '#/components/schemas/Error' + Proximity: + type: object + description: > + Proximity ID represents a fixed geographical zone in a discrete global + grid within which the device is observed. + additionalProperties: false + required: + - id + - precisionRadius + - confidence + properties: + id: + type: string + description: | + A stable privacy-preserving identifier for a given proximity zone. + precisionRadius: + type: integer + format: int32 + enum: + - 10 + - 25 + - 65 + - 175 + - 450 + - 1200 + - 3300 + - 8500 + - 22500 + description: | + The radius of the proximity zone’s precision level, in meters. + confidence: + type: number + format: float + minimum: 0 + maximum: 1 + description: > + A value between `0` and `1` representing the likelihood that the + true device location lies within the mapped proximity zone. + * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. + * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. + ProductProximity: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/Proximity' + error: + $ref: '#/components/schemas/Error' Products: type: object description: >- @@ -2207,6 +2288,8 @@ components: $ref: '#/components/schemas/ProductDeveloperTools' mitmAttack: $ref: '#/components/schemas/ProductMitMAttack' + proximity: + $ref: '#/components/schemas/ProductProximity' EventsGetResponse: type: object description: >- @@ -2745,6 +2828,46 @@ components: $ref: '#/components/schemas/SupplementaryID' highRecall: $ref: '#/components/schemas/SupplementaryID' + WebhookProximity: + type: object + description: > + Proximity ID represents a fixed geographical zone in a discrete global + grid within which the device is observed. + additionalProperties: false + required: + - id + - precisionRadius + - confidence + properties: + id: + type: string + description: | + A stable privacy-preserving identifier for a given proximity zone. + precisionRadius: + type: integer + format: int32 + enum: + - 10 + - 25 + - 65 + - 175 + - 450 + - 1200 + - 3300 + - 8500 + - 22500 + description: | + The radius of the proximity zone’s precision level, in meters. + confidence: + type: number + format: float + minimum: 0 + maximum: 1 + description: > + A value between `0` and `1` representing the likelihood that the + true device location lies within the mapped proximity zone. + * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. + * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. Webhook: type: object required: @@ -2867,3 +2990,5 @@ components: $ref: '#/components/schemas/SDK' supplementaryIds: $ref: '#/components/schemas/WebhookSupplementaryIDs' + proximity: + $ref: '#/components/schemas/WebhookProximity' diff --git a/test/mocks/get_event_200.json b/test/mocks/get_event_200.json index 4379fbbd..7560b9a6 100644 --- a/test/mocks/get_event_200.json +++ b/test/mocks/get_event_200.json @@ -342,6 +342,13 @@ "data": { "result": false } + }, + "proximity": { + "data": { + "id": "w1aTfd4MCvl", + "precisionRadius": 10, + "confidence": 0.95 + } } } } diff --git a/test/mocks/get_event_200_all_errors.json b/test/mocks/get_event_200_all_errors.json index 6e53e7cd..15ea2037 100644 --- a/test/mocks/get_event_200_all_errors.json +++ b/test/mocks/get_event_200_all_errors.json @@ -153,6 +153,12 @@ "code": "Failed", "message": "internal server error" } + }, + "proximity": { + "error": { + "code": "Failed", + "message": "internal server error" + } } } } diff --git a/test/mocks/get_event_200_with_broken_format.json b/test/mocks/get_event_200_with_broken_format.json index f665f107..58081140 100644 --- a/test/mocks/get_event_200_with_broken_format.json +++ b/test/mocks/get_event_200_with_broken_format.json @@ -289,6 +289,13 @@ "data": { "result": false } + }, + "proximity": { + "data": { + "id": "w1aTfd4MCvl", + "precisionRadius": 10, + "confidence": 0.95 + } } } } diff --git a/test/mocks/get_event_200_with_unknown_field.json b/test/mocks/get_event_200_with_unknown_field.json index 4853073f..6af6ad63 100644 --- a/test/mocks/get_event_200_with_unknown_field.json +++ b/test/mocks/get_event_200_with_unknown_field.json @@ -287,6 +287,13 @@ "data": { "result": false } + }, + "proximity": { + "data": { + "id": "w1aTfd4MCvl", + "precisionRadius": 10, + "confidence": 0.95 + } } } } diff --git a/test/mocks/get_event_search_200.json b/test/mocks/get_event_search_200.json index b54cece9..27b7848d 100644 --- a/test/mocks/get_event_search_200.json +++ b/test/mocks/get_event_search_200.json @@ -340,6 +340,13 @@ "data": { "result": false } + }, + "proximity": { + "data": { + "id": "w1aTfd4MCvl", + "precisionRadius": 10, + "confidence": 0.95 + } } }} ], diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index d750430e..1180fcdc 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -284,5 +284,10 @@ "subscription": "2022-03-16T11:28:34.023Z" } } + }, + "proximity": { + "id": "w1aTfd4MCvl", + "precisionRadius": 10, + "confidence": 0.95 } } From 8c53762749d616c7a34c1e47bc13a11754ea0a33 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 5 Sep 2025 13:24:32 +0300 Subject: [PATCH 2/2] test: cover new proximity filters --- test/test_fingerprint_api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index 5ba47e5d..bb519c17 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -733,6 +733,8 @@ def test_search_events_all_params(self): 'proxy': True, 'sdk_version': 'testSdkVersion', 'sdk_platform': 'testSdkPlatform', + 'proximity_id': 'testProximityId', + 'proximity_precision_radius': 10, } params = base_params.copy()