From 4e2baafe8cbaad13bb72d46ab9f227053eba28ed Mon Sep 17 00:00:00 2001 From: Orkuncakilkaya Date: Mon, 1 Sep 2025 11:30:23 +0000 Subject: [PATCH 01/10] feat: sync OpenAPI schema to v2.11.0 --- .changeset/cute-buses-attend.md | 5 + .changeset/fast-hotels-hunt.md | 5 + .changeset/pre.json | 8 + .changeset/quick-kiwis-visit.md | 5 + .schema-version | 2 +- README.md | 2 + docs/FingerprintApi.md | 18 +- docs/Identification.md | 3 +- docs/SupplementaryID.md | 13 ++ docs/Webhook.md | 3 +- docs/WebhookSupplementaryIDs.md | 12 ++ fingerprint_pro_server_api_sdk/__init__.py | 2 + .../api/fingerprint_api.py | 36 ++++ .../models/__init__.py | 2 + .../models/identification.py | 39 +++- .../models/supplementary_id.py | 174 ++++++++++++++++++ .../models/webhook.py | 38 +++- .../models/webhook_supplementary_i_ds.py | 99 ++++++++++ res/fingerprint-server-api.yaml | 117 +++++++++++- test/mocks/webhook.json | 34 +++- 20 files changed, 597 insertions(+), 20 deletions(-) create mode 100644 .changeset/cute-buses-attend.md create mode 100644 .changeset/fast-hotels-hunt.md create mode 100644 .changeset/pre.json create mode 100644 .changeset/quick-kiwis-visit.md create mode 100644 docs/SupplementaryID.md create mode 100644 docs/WebhookSupplementaryIDs.md create mode 100644 fingerprint_pro_server_api_sdk/models/supplementary_id.py create mode 100644 fingerprint_pro_server_api_sdk/models/webhook_supplementary_i_ds.py diff --git a/.changeset/cute-buses-attend.md b/.changeset/cute-buses-attend.md new file mode 100644 index 00000000..69111bb2 --- /dev/null +++ b/.changeset/cute-buses-attend.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +**events-search**: Event search now supports a new set of filter parameters: `developer_tools`, `location_spoofing`, `mitm_attack`, `proxy`, `sdk_version`, `sdk_platform`, `environment` \ No newline at end of file diff --git a/.changeset/fast-hotels-hunt.md b/.changeset/fast-hotels-hunt.md new file mode 100644 index 00000000..e033ee4b --- /dev/null +++ b/.changeset/fast-hotels-hunt.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +**webhook**: Add `supplementaryIds` property to the Webhooks schema. \ No newline at end of file diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..c58ce929 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,8 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "fingerprint-pro-server-api-python-sdk": "8.10.0" + }, + "changesets": [] +} diff --git a/.changeset/quick-kiwis-visit.md b/.changeset/quick-kiwis-visit.md new file mode 100644 index 00000000..03d71d27 --- /dev/null +++ b/.changeset/quick-kiwis-visit.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +Add `environmentId` property to `identification` \ No newline at end of file diff --git a/.schema-version b/.schema-version index f161b5d8..805579f3 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -2.10.0 \ No newline at end of file +v2.11.0 \ No newline at end of file diff --git a/README.md b/README.md index 12152720..26b8f978 100644 --- a/README.md +++ b/README.md @@ -369,6 +369,7 @@ Class | Method | HTTP request | Description - [SDK](docs/SDK.md) - [SearchEventsResponse](docs/SearchEventsResponse.md) - [SearchEventsResponseEvents](docs/SearchEventsResponseEvents.md) + - [SupplementaryID](docs/SupplementaryID.md) - [SuspectScore](docs/SuspectScore.md) - [Tag](docs/Tag.md) - [Tampering](docs/Tampering.md) @@ -399,6 +400,7 @@ Class | Method | HTTP request | Description - [WebhookRawDeviceAttributes](docs/WebhookRawDeviceAttributes.md) - [WebhookRemoteControl](docs/WebhookRemoteControl.md) - [WebhookRootApps](docs/WebhookRootApps.md) + - [WebhookSupplementaryIDs](docs/WebhookSupplementaryIDs.md) - [WebhookSuspectScore](docs/WebhookSuspectScore.md) - [WebhookTampering](docs/WebhookTampering.md) - [WebhookTor](docs/WebhookTor.md) diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index bad70df0..fb697f26 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) +> 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) Get events via search @@ -265,10 +265,17 @@ vpn_confidence = 'vpn_confidence_example' # str | Filter events by VPN Detection min_suspect_score = 3.4 # float | Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. (optional) ip_blocklist = true # bool | Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. (optional) datacenter = true # bool | Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. (optional) +developer_tools = true # bool | Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `products.developerTools.data.result` property set to `true` or `false` are returned. Events without a `products.developerTools` Smart Signal result are left out of the response. (optional) +location_spoofing = true # bool | Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `products.locationSpoofing.data.result` property set to `true` or `false` are returned. Events without a `products.locationSpoofing` Smart Signal result are left out of the response. (optional) +mitm_attack = true # bool | Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `products.mitmAttack.data.result` property set to `true` or `false` are returned. Events without a `products.mitmAttack` Smart Signal result are left out of the response. (optional) +proxy = true # bool | Filter events by Proxy detection result. > Note: When using this parameter, only events with the `products.proxy.data.result` property set to `true` or `false` are returned. Events without a `products.proxy` Smart Signal result are left out of the response. (optional) +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) 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) + 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) print(api_response) except ApiException as e: print("Exception when calling FingerprintApi->search_events: %s\n" % e) @@ -304,6 +311,13 @@ Name | Type | Description | Notes **min_suspect_score** | **float**| Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. | [optional] **ip_blocklist** | **bool**| Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. | [optional] **datacenter** | **bool**| Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. | [optional] + **developer_tools** | **bool**| Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `products.developerTools.data.result` property set to `true` or `false` are returned. Events without a `products.developerTools` Smart Signal result are left out of the response. | [optional] + **location_spoofing** | **bool**| Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `products.locationSpoofing.data.result` property set to `true` or `false` are returned. Events without a `products.locationSpoofing` Smart Signal result are left out of the response. | [optional] + **mitm_attack** | **bool**| Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `products.mitmAttack.data.result` property set to `true` or `false` are returned. Events without a `products.mitmAttack` Smart Signal result are left out of the response. | [optional] + **proxy** | **bool**| Filter events by Proxy detection result. > Note: When using this parameter, only events with the `products.proxy.data.result` property set to `true` or `false` are returned. Events without a `products.proxy` Smart Signal result are left out of the response. | [optional] + **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] ### Return type diff --git a/docs/Identification.md b/docs/Identification.md index c3b36de5..8a65a670 100644 --- a/docs/Identification.md +++ b/docs/Identification.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**visitor_id** | **str** | String of 20 characters that uniquely identifies the visitor's browser. | +**visitor_id** | **str** | String of 20 characters that uniquely identifies the visitor's browser or mobile device. | **request_id** | **str** | Unique identifier of the user's request. | **browser_details** | [**BrowserDetails**](BrowserDetails.md) | | **incognito** | **bool** | Flag if user used incognito session. | @@ -22,6 +22,7 @@ Name | Type | Description | Notes **components** | [**RawDeviceAttributes**](RawDeviceAttributes.md) | | [optional] **replayed** | **bool** | `true` if we determined that this payload was replayed, `false` otherwise. | **sdk** | [**SDK**](SDK.md) | | [optional] +**environment_id** | **str** | Environment ID associated with the event | [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/SupplementaryID.md b/docs/SupplementaryID.md new file mode 100644 index 00000000..a1cffed4 --- /dev/null +++ b/docs/SupplementaryID.md @@ -0,0 +1,13 @@ +# SupplementaryID + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visitor_id** | **str** | String of 20 characters that uniquely identifies the visitor's browser or mobile device. | [optional] +**visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | [optional] +**confidence** | [**IdentificationConfidence**](IdentificationConfidence.md) | | [optional] +**first_seen_at** | [**IdentificationSeenAt**](IdentificationSeenAt.md) | | [optional] +**last_seen_at** | [**IdentificationSeenAt**](IdentificationSeenAt.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/Webhook.md b/docs/Webhook.md index 03444b3a..94528d05 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | **ip_location** | [**DeprecatedGeolocation**](DeprecatedGeolocation.md) | | [optional] **linked_id** | **str** | A customer-provided id that was sent with the request. | [optional] -**visitor_id** | **str** | String of 20 characters that uniquely identifies the visitor's browser. | [optional] +**visitor_id** | **str** | String of 20 characters that uniquely identifies the visitor's browser or mobile device. | [optional] **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | [optional] **confidence** | [**IdentificationConfidence**](IdentificationConfidence.md) | | [optional] **first_seen_at** | [**IdentificationSeenAt**](IdentificationSeenAt.md) | | [optional] @@ -47,6 +47,7 @@ Name | Type | Description | Notes **mitm_attack** | [**WebhookMitMAttack**](WebhookMitMAttack.md) | | [optional] **replayed** | **bool** | `true` if we determined that this payload was replayed, `false` otherwise. | [optional] **sdk** | [**SDK**](SDK.md) | | +**supplementary_ids** | [**WebhookSupplementaryIDs**](WebhookSupplementaryIDs.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/WebhookSupplementaryIDs.md b/docs/WebhookSupplementaryIDs.md new file mode 100644 index 00000000..a1185291 --- /dev/null +++ b/docs/WebhookSupplementaryIDs.md @@ -0,0 +1,12 @@ +# WebhookSupplementaryIDs +Other identities that have been established for a given Visitor. + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**standard** | [**SupplementaryID**](SupplementaryID.md) | | +**high_recall** | [**SupplementaryID**](SupplementaryID.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/fingerprint_pro_server_api_sdk/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index 47cf278c..7cfcc3ee 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -97,6 +97,7 @@ from fingerprint_pro_server_api_sdk.models.sdk import SDK from fingerprint_pro_server_api_sdk.models.search_events_response import SearchEventsResponse from fingerprint_pro_server_api_sdk.models.search_events_response_events import SearchEventsResponseEvents +from fingerprint_pro_server_api_sdk.models.supplementary_id import SupplementaryID from fingerprint_pro_server_api_sdk.models.suspect_score import SuspectScore from fingerprint_pro_server_api_sdk.models.tag import Tag from fingerprint_pro_server_api_sdk.models.tampering import Tampering @@ -127,6 +128,7 @@ 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 from fingerprint_pro_server_api_sdk.models.webhook_root_apps import WebhookRootApps +from fingerprint_pro_server_api_sdk.models.webhook_supplementary_i_ds import WebhookSupplementaryIDs from fingerprint_pro_server_api_sdk.models.webhook_suspect_score import WebhookSuspectScore from fingerprint_pro_server_api_sdk.models.webhook_tampering import WebhookTampering from fingerprint_pro_server_api_sdk.models.webhook_tor import WebhookTor diff --git a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py index 74951329..bb34cd79 100644 --- a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py +++ b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py @@ -532,6 +532,13 @@ def search_events(self, limit: int, **kwargs) -> Union[SearchEventsResponse, Asy :param min_suspect_score: Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. :param ip_blocklist: Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. :param datacenter: Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. + :param developer_tools: Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `products.developerTools.data.result` property set to `true` or `false` are returned. Events without a `products.developerTools` Smart Signal result are left out of the response. + :param location_spoofing: Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `products.locationSpoofing.data.result` property set to `true` or `false` are returned. Events without a `products.locationSpoofing` Smart Signal result are left out of the response. + :param mitm_attack: Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `products.mitmAttack.data.result` property set to `true` or `false` are returned. Events without a `products.mitmAttack` Smart Signal result are left out of the response. + :param proxy: Filter events by Proxy detection result. > Note: When using this parameter, only events with the `products.proxy.data.result` property set to `true` or `false` are returned. Events without a `products.proxy` Smart Signal result are left out of the response. + :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. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -579,6 +586,13 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 :param float min_suspect_score: Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. :param bool ip_blocklist: Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. :param bool datacenter: Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. + :param bool developer_tools: Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `products.developerTools.data.result` property set to `true` or `false` are returned. Events without a `products.developerTools` Smart Signal result are left out of the response. + :param bool location_spoofing: Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `products.locationSpoofing.data.result` property set to `true` or `false` are returned. Events without a `products.locationSpoofing` Smart Signal result are left out of the response. + :param bool mitm_attack: Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `products.mitmAttack.data.result` property set to `true` or `false` are returned. Events without a `products.mitmAttack` Smart Signal result are left out of the response. + :param bool proxy: Filter events by Proxy detection result. > Note: When using this parameter, only events with the `products.proxy.data.result` property set to `true` or `false` are returned. Events without a `products.proxy` Smart Signal result are left out of the response. + :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. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -611,6 +625,13 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 'min_suspect_score', 'ip_blocklist', 'datacenter', + 'developer_tools', + 'location_spoofing', + 'mitm_attack', + 'proxy', + 'sdk_version', + 'sdk_platform', + 'environment', 'async_req', '_return_http_data_only', '_preload_content', @@ -686,6 +707,21 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 query_params.append(('ip_blocklist', params['ip_blocklist'])) # noqa: E501 if 'datacenter' in params: query_params.append(('datacenter', params['datacenter'])) # noqa: E501 + if 'developer_tools' in params: + query_params.append(('developer_tools', params['developer_tools'])) # noqa: E501 + if 'location_spoofing' in params: + query_params.append(('location_spoofing', params['location_spoofing'])) # noqa: E501 + if 'mitm_attack' in params: + query_params.append(('mitm_attack', params['mitm_attack'])) # noqa: E501 + if 'proxy' in params: + query_params.append(('proxy', params['proxy'])) # noqa: E501 + if 'sdk_version' in params: + query_params.append(('sdk_version', params['sdk_version'])) # noqa: E501 + if 'sdk_platform' in params: + query_params.append(('sdk_platform', params['sdk_platform'])) # noqa: E501 + if 'environment' in params: + query_params.append(('environment', params['environment'])) # noqa: E501 + collection_formats['environment'] = 'multi' # 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 baf07646..5a7a8d1e 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -89,6 +89,7 @@ from fingerprint_pro_server_api_sdk.models.sdk import SDK from fingerprint_pro_server_api_sdk.models.search_events_response import SearchEventsResponse from fingerprint_pro_server_api_sdk.models.search_events_response_events import SearchEventsResponseEvents +from fingerprint_pro_server_api_sdk.models.supplementary_id import SupplementaryID from fingerprint_pro_server_api_sdk.models.suspect_score import SuspectScore from fingerprint_pro_server_api_sdk.models.tag import Tag from fingerprint_pro_server_api_sdk.models.tampering import Tampering @@ -119,6 +120,7 @@ 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 from fingerprint_pro_server_api_sdk.models.webhook_root_apps import WebhookRootApps +from fingerprint_pro_server_api_sdk.models.webhook_supplementary_i_ds import WebhookSupplementaryIDs from fingerprint_pro_server_api_sdk.models.webhook_suspect_score import WebhookSuspectScore from fingerprint_pro_server_api_sdk.models.webhook_tampering import WebhookTampering from fingerprint_pro_server_api_sdk.models.webhook_tor import WebhookTor diff --git a/fingerprint_pro_server_api_sdk/models/identification.py b/fingerprint_pro_server_api_sdk/models/identification.py index 2410c24e..9ff2b908 100644 --- a/fingerprint_pro_server_api_sdk/models/identification.py +++ b/fingerprint_pro_server_api_sdk/models/identification.py @@ -55,7 +55,8 @@ class Identification(BaseModel): 'last_seen_at': 'IdentificationSeenAt', 'components': 'RawDeviceAttributes', 'replayed': 'bool', - 'sdk': 'SDK' + 'sdk': 'SDK', + 'environment_id': 'str' } nullable_map = { @@ -77,7 +78,8 @@ class Identification(BaseModel): 'last_seen_at': False, 'components': False, 'replayed': False, - 'sdk': False + 'sdk': False, + 'environment_id': False } attribute_map = { @@ -99,10 +101,11 @@ class Identification(BaseModel): 'last_seen_at': 'lastSeenAt', 'components': 'components', 'replayed': 'replayed', - 'sdk': 'sdk' + 'sdk': 'sdk', + 'environment_id': 'environmentId' } - def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, suspect=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None, replayed=None, sdk=None): # noqa: E501 + def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, suspect=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None, replayed=None, sdk=None, environment_id=None): # noqa: E501 """Identification - a model defined in Swagger""" # noqa: E501 self._visitor_id = None self._request_id = None @@ -123,6 +126,7 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog self._components = None self._replayed = None self._sdk = None + self._environment_id = None self.discriminator = None self.visitor_id = visitor_id self.request_id = request_id @@ -149,12 +153,14 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog self.replayed = replayed if sdk is not None: self.sdk = sdk + if environment_id is not None: + self.environment_id = environment_id @property def visitor_id(self) -> str: """Gets the visitor_id of this Identification. # noqa: E501 - String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501 + String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 :return: The visitor_id of this Identification. # noqa: E501 """ @@ -164,7 +170,7 @@ def visitor_id(self) -> str: def visitor_id(self, visitor_id: str): """Sets the visitor_id of this Identification. - String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501 + String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 :param visitor_id: The visitor_id of this Identification. # noqa: E501 """ @@ -559,3 +565,24 @@ def sdk(self, sdk: Optional[SDK]): self._sdk = sdk + @property + def environment_id(self) -> Optional[str]: + """Gets the environment_id of this Identification. # noqa: E501 + + Environment ID associated with the event # noqa: E501 + + :return: The environment_id of this Identification. # noqa: E501 + """ + return self._environment_id + + @environment_id.setter + def environment_id(self, environment_id: Optional[str]): + """Sets the environment_id of this Identification. + + Environment ID associated with the event # noqa: E501 + + :param environment_id: The environment_id of this Identification. # noqa: E501 + """ + + self._environment_id = environment_id + diff --git a/fingerprint_pro_server_api_sdk/models/supplementary_id.py b/fingerprint_pro_server_api_sdk/models/supplementary_id.py new file mode 100644 index 00000000..8b463f4d --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/supplementary_id.py @@ -0,0 +1,174 @@ +# 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.identification_confidence import IdentificationConfidence +from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt +from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt + + +class SupplementaryID(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 = { + 'visitor_id': 'str', + 'visitor_found': 'bool', + 'confidence': 'IdentificationConfidence', + 'first_seen_at': 'IdentificationSeenAt', + 'last_seen_at': 'IdentificationSeenAt' + } + + nullable_map = { + 'visitor_id': False, + 'visitor_found': False, + 'confidence': False, + 'first_seen_at': False, + 'last_seen_at': False + } + + attribute_map = { + 'visitor_id': 'visitorId', + 'visitor_found': 'visitorFound', + 'confidence': 'confidence', + 'first_seen_at': 'firstSeenAt', + 'last_seen_at': 'lastSeenAt' + } + + def __init__(self, visitor_id=None, visitor_found=None, confidence=None, first_seen_at=None, last_seen_at=None): # noqa: E501 + """SupplementaryID - a model defined in Swagger""" # noqa: E501 + self._visitor_id = None + self._visitor_found = None + self._confidence = None + self._first_seen_at = None + self._last_seen_at = None + self.discriminator = None + if visitor_id is not None: + self.visitor_id = visitor_id + if visitor_found is not None: + self.visitor_found = visitor_found + if confidence is not None: + self.confidence = confidence + if first_seen_at is not None: + self.first_seen_at = first_seen_at + if last_seen_at is not None: + self.last_seen_at = last_seen_at + + @property + def visitor_id(self) -> Optional[str]: + """Gets the visitor_id of this SupplementaryID. # noqa: E501 + + String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 + + :return: The visitor_id of this SupplementaryID. # noqa: E501 + """ + return self._visitor_id + + @visitor_id.setter + def visitor_id(self, visitor_id: Optional[str]): + """Sets the visitor_id of this SupplementaryID. + + String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 + + :param visitor_id: The visitor_id of this SupplementaryID. # noqa: E501 + """ + + self._visitor_id = visitor_id + + @property + def visitor_found(self) -> Optional[bool]: + """Gets the visitor_found of this SupplementaryID. # noqa: E501 + + Attribute represents if a visitor had been identified before. # noqa: E501 + + :return: The visitor_found of this SupplementaryID. # noqa: E501 + """ + return self._visitor_found + + @visitor_found.setter + def visitor_found(self, visitor_found: Optional[bool]): + """Sets the visitor_found of this SupplementaryID. + + Attribute represents if a visitor had been identified before. # noqa: E501 + + :param visitor_found: The visitor_found of this SupplementaryID. # noqa: E501 + """ + + self._visitor_found = visitor_found + + @property + def confidence(self) -> Optional[IdentificationConfidence]: + """Gets the confidence of this SupplementaryID. # noqa: E501 + + + :return: The confidence of this SupplementaryID. # noqa: E501 + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: Optional[IdentificationConfidence]): + """Sets the confidence of this SupplementaryID. + + + :param confidence: The confidence of this SupplementaryID. # noqa: E501 + """ + + self._confidence = confidence + + @property + def first_seen_at(self) -> Optional[IdentificationSeenAt]: + """Gets the first_seen_at of this SupplementaryID. # noqa: E501 + + + :return: The first_seen_at of this SupplementaryID. # noqa: E501 + """ + return self._first_seen_at + + @first_seen_at.setter + def first_seen_at(self, first_seen_at: Optional[IdentificationSeenAt]): + """Sets the first_seen_at of this SupplementaryID. + + + :param first_seen_at: The first_seen_at of this SupplementaryID. # noqa: E501 + """ + + self._first_seen_at = first_seen_at + + @property + def last_seen_at(self) -> Optional[IdentificationSeenAt]: + """Gets the last_seen_at of this SupplementaryID. # noqa: E501 + + + :return: The last_seen_at of this SupplementaryID. # noqa: E501 + """ + return self._last_seen_at + + @last_seen_at.setter + def last_seen_at(self, last_seen_at: Optional[IdentificationSeenAt]): + """Sets the last_seen_at of this SupplementaryID. + + + :param last_seen_at: The last_seen_at of this SupplementaryID. # noqa: E501 + """ + + self._last_seen_at = last_seen_at + diff --git a/fingerprint_pro_server_api_sdk/models/webhook.py b/fingerprint_pro_server_api_sdk/models/webhook.py index 294179b8..c8b9735e 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook.py +++ b/fingerprint_pro_server_api_sdk/models/webhook.py @@ -45,6 +45,7 @@ from fingerprint_pro_server_api_sdk.models.webhook_developer_tools import WebhookDeveloperTools 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 class Webhook(BaseModel): @@ -103,7 +104,8 @@ class Webhook(BaseModel): 'developer_tools': 'WebhookDeveloperTools', 'mitm_attack': 'WebhookMitMAttack', 'replayed': 'bool', - 'sdk': 'SDK' + 'sdk': 'SDK', + 'supplementary_ids': 'WebhookSupplementaryIDs' } nullable_map = { @@ -150,7 +152,8 @@ class Webhook(BaseModel): 'developer_tools': False, 'mitm_attack': False, 'replayed': False, - 'sdk': False + 'sdk': False, + 'supplementary_ids': False } attribute_map = { @@ -197,10 +200,11 @@ class Webhook(BaseModel): 'developer_tools': 'developerTools', 'mitm_attack': 'mitmAttack', 'replayed': 'replayed', - 'sdk': 'sdk' + 'sdk': 'sdk', + 'supplementary_ids': 'supplementaryIds' } - 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): # 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): # noqa: E501 """Webhook - a model defined in Swagger""" # noqa: E501 self._request_id = None self._url = None @@ -246,6 +250,7 @@ def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag= self._mitm_attack = None self._replayed = None self._sdk = None + self._supplementary_ids = None self.discriminator = None self.request_id = request_id self.url = url @@ -329,6 +334,8 @@ def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag= if replayed is not None: self.replayed = replayed self.sdk = sdk + if supplementary_ids is not None: + self.supplementary_ids = supplementary_ids @property def request_id(self) -> str: @@ -529,7 +536,7 @@ def linked_id(self, linked_id: Optional[str]): def visitor_id(self) -> Optional[str]: """Gets the visitor_id of this Webhook. # noqa: E501 - String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501 + String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 :return: The visitor_id of this Webhook. # noqa: E501 """ @@ -539,7 +546,7 @@ def visitor_id(self) -> Optional[str]: def visitor_id(self, visitor_id: Optional[str]): """Sets the visitor_id of this Webhook. - String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501 + String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 :param visitor_id: The visitor_id of this Webhook. # noqa: E501 """ @@ -1200,3 +1207,22 @@ def sdk(self, sdk: SDK): self._sdk = sdk + @property + def supplementary_ids(self) -> Optional[WebhookSupplementaryIDs]: + """Gets the supplementary_ids of this Webhook. # noqa: E501 + + + :return: The supplementary_ids of this Webhook. # noqa: E501 + """ + return self._supplementary_ids + + @supplementary_ids.setter + def supplementary_ids(self, supplementary_ids: Optional[WebhookSupplementaryIDs]): + """Sets the supplementary_ids of this Webhook. + + + :param supplementary_ids: The supplementary_ids of this Webhook. # noqa: E501 + """ + + self._supplementary_ids = supplementary_ids + diff --git a/fingerprint_pro_server_api_sdk/models/webhook_supplementary_i_ds.py b/fingerprint_pro_server_api_sdk/models/webhook_supplementary_i_ds.py new file mode 100644 index 00000000..f3ce3aad --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/webhook_supplementary_i_ds.py @@ -0,0 +1,99 @@ +# 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.supplementary_id import SupplementaryID +from fingerprint_pro_server_api_sdk.models.supplementary_id import SupplementaryID + + +class WebhookSupplementaryIDs(BaseModel): + """ + Other identities that have been established for a given Visitor. + + 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 = { + 'standard': 'SupplementaryID', + 'high_recall': 'SupplementaryID' + } + + nullable_map = { + 'standard': False, + 'high_recall': False + } + + attribute_map = { + 'standard': 'standard', + 'high_recall': 'highRecall' + } + + def __init__(self, standard=None, high_recall=None): # noqa: E501 + """WebhookSupplementaryIDs - a model defined in Swagger""" # noqa: E501 + self._standard = None + self._high_recall = None + self.discriminator = None + self.standard = standard + self.high_recall = high_recall + + @property + def standard(self) -> SupplementaryID: + """Gets the standard of this WebhookSupplementaryIDs. # noqa: E501 + + + :return: The standard of this WebhookSupplementaryIDs. # noqa: E501 + """ + return self._standard + + @standard.setter + def standard(self, standard: SupplementaryID): + """Sets the standard of this WebhookSupplementaryIDs. + + + :param standard: The standard of this WebhookSupplementaryIDs. # noqa: E501 + """ + if standard is None: + raise ValueError("Invalid value for `standard`, must not be `None`") # noqa: E501 + + self._standard = standard + + @property + def high_recall(self) -> SupplementaryID: + """Gets the high_recall of this WebhookSupplementaryIDs. # noqa: E501 + + + :return: The high_recall of this WebhookSupplementaryIDs. # noqa: E501 + """ + return self._high_recall + + @high_recall.setter + def high_recall(self, high_recall: SupplementaryID): + """Sets the high_recall of this WebhookSupplementaryIDs. + + + :param high_recall: The high_recall of this WebhookSupplementaryIDs. # noqa: E501 + """ + if high_recall is None: + raise ValueError("Invalid value for `high_recall`, must not be `None`") # noqa: E501 + + self._high_recall = high_recall + diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 2608c719..a8f78f70 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -471,6 +471,85 @@ paths: `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. + - name: developer_tools + in: query + schema: + type: boolean + description: > + Filter events by Developer Tools detection result. + + > Note: When using this parameter, only events with the + `products.developerTools.data.result` property set to `true` or + `false` are returned. Events without a `products.developerTools` + Smart Signal result are left out of the response. + - name: location_spoofing + in: query + schema: + type: boolean + description: > + Filter events by Location Spoofing detection result. + + > Note: When using this parameter, only events with the + `products.locationSpoofing.data.result` property set to `true` or + `false` are returned. Events without a `products.locationSpoofing` + Smart Signal result are left out of the response. + - name: mitm_attack + in: query + schema: + type: boolean + description: > + Filter events by MITM (Man-in-the-Middle) Attack detection result. + + > Note: When using this parameter, only events with the + `products.mitmAttack.data.result` property set to `true` or `false` + are returned. Events without a `products.mitmAttack` Smart Signal + result are left out of the response. + - name: proxy + in: query + schema: + type: boolean + description: > + Filter events by Proxy detection result. + + > Note: When using this parameter, only events with the + `products.proxy.data.result` property set to `true` or `false` are + returned. Events without a `products.proxy` Smart Signal result are + left out of the response. + - name: sdk_version + in: query + schema: + type: string + description: > + Filter events by a specific SDK version associated with the + identification event. Example: `3.11.14` + - name: sdk_platform + in: query + schema: + type: string + enum: + - js + - android + - ios + description: > + Filter events by the SDK Platform associated with the identification + event. + + `js` - JavaScript agent (Web). + + `ios` - Apple iOS based devices. + + `android` - Android based devices. + - name: environment + in: query + description: | + Filter for events by providing one or more environment IDs. + required: false + schema: + type: array + items: + type: string + style: form + explode: true responses: '200': description: Events matching the filter(s). @@ -1094,7 +1173,7 @@ components: type: string description: >- String of 20 characters that uniquely identifies the visitor's - browser. + browser or mobile device. requestId: type: string description: Unique identifier of the user's request. @@ -1153,6 +1232,9 @@ components: otherwise. sdk: $ref: '#/components/schemas/SDK' + environmentId: + type: string + description: Environment ID associated with the event ErrorCode: type: string enum: @@ -2634,6 +2716,35 @@ components: See [MitM Attack Detection](https://dev.fingerprint.com/docs/smart-signals-overview#mitm-attack-detection) to learn more about this Smart Signal. + SupplementaryID: + type: object + additionalProperties: false + properties: + visitorId: + type: string + description: >- + String of 20 characters that uniquely identifies the visitor's + browser or mobile device. + visitorFound: + type: boolean + description: Attribute represents if a visitor had been identified before. + confidence: + $ref: '#/components/schemas/IdentificationConfidence' + firstSeenAt: + $ref: '#/components/schemas/IdentificationSeenAt' + lastSeenAt: + $ref: '#/components/schemas/IdentificationSeenAt' + WebhookSupplementaryIDs: + type: object + description: Other identities that have been established for a given Visitor. + required: + - standard + - highRecall + properties: + standard: + $ref: '#/components/schemas/SupplementaryID' + highRecall: + $ref: '#/components/schemas/SupplementaryID' Webhook: type: object required: @@ -2680,7 +2791,7 @@ components: type: string description: >- String of 20 characters that uniquely identifies the visitor's - browser. + browser or mobile device. visitorFound: type: boolean description: Attribute represents if a visitor had been identified before. @@ -2754,3 +2865,5 @@ components: otherwise. sdk: $ref: '#/components/schemas/SDK' + supplementaryIds: + $ref: '#/components/schemas/WebhookSupplementaryIDs' diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 8a8aa947..d750430e 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -252,5 +252,37 @@ "platform": "js", "version": "3.11.10" }, - "replayed": false + "replayed": false, + "supplementaryIds": { + "standard": { + "visitorId": "3HNey93AkBW6CRbxV6xP", + "visitorFound": true, + "confidence": { + "score": 0.97 + }, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": "2022-03-16T11:28:34.023Z", + "subscription": "2022-03-16T11:28:34.023Z" + } + }, + "highRecall": { + "visitorId": "3HNey93AkBW6CRbxV6xP", + "visitorFound": true, + "confidence": { + "score": 0.97 + }, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": "2022-03-16T11:28:34.023Z", + "subscription": "2022-03-16T11:28:34.023Z" + } + } + } } From 0778a2061a557ef36657e91d5e4082c36ea2970b Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 2 Sep 2025 13:34:52 +0300 Subject: [PATCH 02/10] test: handle new search event tests --- test/test_fingerprint_api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index ff5e5a53..89f29ae7 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -722,6 +722,13 @@ def test_search_events_all_params(self): 'incognito': True, 'ip_blocklist': True, 'datacenter': True, + 'developer_tools': True, + 'location_spoofing': True, + 'mitm_attack': True, + 'proxy': True, + 'sdk_version': 'testSdkVersion', + 'sdk_platform': 'testSdkPlatform', + 'environment': ["env1", "env2"] } expected_fields = [self.integration_info] + list(params.items()) From be63ecab46fe46ce8b90ce170c64e237e0298c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Tue, 2 Sep 2025 15:12:11 +0300 Subject: [PATCH 03/10] docs: fix boolean casing in generated example --- docs/FingerprintApi.md | 40 +++++++++++++++++++-------------------- template/api_doc.mustache | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index fb697f26..416a4b1c 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -247,28 +247,28 @@ ip_address = 'ip_address_example' # str | Filter events by IP address range. The linked_id = 'linked_id_example' # str | Filter events by your custom identifier. You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example, session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) start = 789 # int | Filter events with a timestamp greater than the start time, in Unix time (milliseconds). (optional) end = 789 # int | Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). (optional) -reverse = true # bool | Sort events in reverse timestamp order. (optional) -suspect = true # bool | Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. (optional) -vpn = true # bool | Filter events by VPN Detection result. > Note: When using this parameter, only events with the `products.vpn.data.result` property set to `true` or `false` are returned. Events without a `products.vpn` Smart Signal result are left out of the response. (optional) -virtual_machine = true # bool | Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `products.virtualMachine.data.result` property set to `true` or `false` are returned. Events without a `products.virtualMachine` Smart Signal result are left out of the response. (optional) -tampering = true # bool | Filter events by Tampering Detection result. > Note: When using this parameter, only events with the `products.tampering.data.result` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. (optional) -anti_detect_browser = true # bool | Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `products.tampering.data.antiDetectBrowser` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. (optional) -incognito = true # bool | Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `products.incognito.data.result` property set to `true` or `false` are returned. Events without a `products.incognito` Smart Signal result are left out of the response. (optional) -privacy_settings = true # bool | Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `products.privacySettings.data.result` property set to `true` or `false` are returned. Events without a `products.privacySettings` Smart Signal result are left out of the response. (optional) -jailbroken = true # bool | Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `products.jailbroken.data.result` property set to `true` or `false` are returned. Events without a `products.jailbroken` Smart Signal result are left out of the response. (optional) -frida = true # bool | Filter events by Frida Detection result. > Note: When using this parameter, only events with the `products.frida.data.result` property set to `true` or `false` are returned. Events without a `products.frida` Smart Signal result are left out of the response. (optional) -factory_reset = true # bool | Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with the `products.factoryReset.data.result` property set to `true` or `false` are returned. Events without a `products.factoryReset` Smart Signal result are left out of the response. (optional) -cloned_app = true # bool | Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `products.clonedApp.data.result` property set to `true` or `false` are returned. Events without a `products.clonedApp` Smart Signal result are left out of the response. (optional) -emulator = true # bool | Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `products.emulator.data.result` property set to `true` or `false` are returned. Events without a `products.emulator` Smart Signal result are left out of the response. (optional) -root_apps = true # bool | Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `products.rootApps.data.result` property set to `true` or `false` are returned. Events without a `products.rootApps` Smart Signal result are left out of the response. (optional) +reverse = True # bool | Sort events in reverse timestamp order. (optional) +suspect = True # bool | Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. (optional) +vpn = True # bool | Filter events by VPN Detection result. > Note: When using this parameter, only events with the `products.vpn.data.result` property set to `true` or `false` are returned. Events without a `products.vpn` Smart Signal result are left out of the response. (optional) +virtual_machine = True # bool | Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `products.virtualMachine.data.result` property set to `true` or `false` are returned. Events without a `products.virtualMachine` Smart Signal result are left out of the response. (optional) +tampering = True # bool | Filter events by Tampering Detection result. > Note: When using this parameter, only events with the `products.tampering.data.result` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. (optional) +anti_detect_browser = True # bool | Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `products.tampering.data.antiDetectBrowser` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. (optional) +incognito = True # bool | Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `products.incognito.data.result` property set to `true` or `false` are returned. Events without a `products.incognito` Smart Signal result are left out of the response. (optional) +privacy_settings = True # bool | Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `products.privacySettings.data.result` property set to `true` or `false` are returned. Events without a `products.privacySettings` Smart Signal result are left out of the response. (optional) +jailbroken = True # bool | Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `products.jailbroken.data.result` property set to `true` or `false` are returned. Events without a `products.jailbroken` Smart Signal result are left out of the response. (optional) +frida = True # bool | Filter events by Frida Detection result. > Note: When using this parameter, only events with the `products.frida.data.result` property set to `true` or `false` are returned. Events without a `products.frida` Smart Signal result are left out of the response. (optional) +factory_reset = True # bool | Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with the `products.factoryReset.data.result` property set to `true` or `false` are returned. Events without a `products.factoryReset` Smart Signal result are left out of the response. (optional) +cloned_app = True # bool | Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `products.clonedApp.data.result` property set to `true` or `false` are returned. Events without a `products.clonedApp` Smart Signal result are left out of the response. (optional) +emulator = True # bool | Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `products.emulator.data.result` property set to `true` or `false` are returned. Events without a `products.emulator` Smart Signal result are left out of the response. (optional) +root_apps = True # bool | Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `products.rootApps.data.result` property set to `true` or `false` are returned. Events without a `products.rootApps` Smart Signal result are left out of the response. (optional) vpn_confidence = 'vpn_confidence_example' # str | Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `products.vpn.data.confidence` property set to a valid value are returned. Events without a `products.vpn` Smart Signal result are left out of the response. (optional) min_suspect_score = 3.4 # float | Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. (optional) -ip_blocklist = true # bool | Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. (optional) -datacenter = true # bool | Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. (optional) -developer_tools = true # bool | Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `products.developerTools.data.result` property set to `true` or `false` are returned. Events without a `products.developerTools` Smart Signal result are left out of the response. (optional) -location_spoofing = true # bool | Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `products.locationSpoofing.data.result` property set to `true` or `false` are returned. Events without a `products.locationSpoofing` Smart Signal result are left out of the response. (optional) -mitm_attack = true # bool | Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `products.mitmAttack.data.result` property set to `true` or `false` are returned. Events without a `products.mitmAttack` Smart Signal result are left out of the response. (optional) -proxy = true # bool | Filter events by Proxy detection result. > Note: When using this parameter, only events with the `products.proxy.data.result` property set to `true` or `false` are returned. Events without a `products.proxy` Smart Signal result are left out of the response. (optional) +ip_blocklist = True # bool | Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. (optional) +datacenter = True # bool | Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. (optional) +developer_tools = True # bool | Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `products.developerTools.data.result` property set to `true` or `false` are returned. Events without a `products.developerTools` Smart Signal result are left out of the response. (optional) +location_spoofing = True # bool | Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `products.locationSpoofing.data.result` property set to `true` or `false` are returned. Events without a `products.locationSpoofing` Smart Signal result are left out of the response. (optional) +mitm_attack = True # bool | Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `products.mitmAttack.data.result` property set to `true` or `false` are returned. Events without a `products.mitmAttack` Smart Signal result are left out of the response. (optional) +proxy = True # bool | Filter events by Proxy detection result. > Note: When using this parameter, only events with the `products.proxy.data.result` property set to `true` or `false` are returned. Events without a `products.proxy` Smart Signal result are left out of the response. (optional) 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) diff --git a/template/api_doc.mustache b/template/api_doc.mustache index f3f2a003..d26382e5 100644 --- a/template/api_doc.mustache +++ b/template/api_doc.mustache @@ -29,7 +29,7 @@ configuration = {{{packageName}}}.Configuration(api_key="SECRET_API_KEY") # create an instance of the API class api_instance = {{{packageName}}}.FingerprintApi(configuration) -{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{#allParams}}{{paramName}} = {{#isBoolean}}{{#example}}True{{/example}}{{^example}}False{{/example}}{{/isBoolean}}{{^isBoolean}}{{{example}}}{{/isBoolean}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} try: From a89c6b7be543be293a25be05347b4d5427ea9852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Wed, 3 Sep 2025 14:19:39 +0300 Subject: [PATCH 04/10] test: add kwargs comparison for testing requests --- test/test_fingerprint_api.py | 37 +++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index 89f29ae7..06676d51 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -22,6 +22,7 @@ from fingerprint_pro_server_api_sdk.api.fingerprint_api import FingerprintApi # noqa: E501 from fingerprint_pro_server_api_sdk.rest import KnownApiException, ApiException from urllib.parse import urlencode +from collections import Counter API_KEY = 'private_key' @@ -88,22 +89,40 @@ def expect_request(self, *args, **kwargs): def get_mock_from_path(path): return path.split('/')[-1] + @staticmethod + def _flatten(fields): + flatten = [] + for k, obj in fields: + if isinstance(obj, list): + flatten.extend((k, v) for v in obj) + else: + flatten.append((k, obj)) + return flatten + def request(self, *args, **kwargs): self._tc.assertTrue(len(self._reqs) > 0) - r = self._reqs.pop(0) + (request_method, request_url), request_config = self._reqs.pop(0) status = 200 - if r[1].get('status') is not None: - status = r[1].get('status') - r[1].pop('status') + if request_config.get('status') is not None: + status = request_config.get('status') + request_config.pop('status') - if r[1].get('method') != 'GET': - request_path = r[0][1].split('?')[0] + if request_config.get('method') != 'GET': + request_path = request_url.split('?')[0] else: - request_path = r[0][1] + request_path = request_url self._tc.maxDiff = None - self._tc.assertEqual(r[0], args) - self._tc.assertCountEqual(r[1], kwargs) + self._tc.assertEqual(request_method, args[0]) + self._tc.assertEqual(request_url, args[1]) + + self._tc.assertEqual(set(request_config.keys()), set(kwargs.keys())) + for k in request_config.keys() - { 'fields' }: + self._tc.assertEqual(request_config[k], kwargs[k], msg=f"Mismatch on request key: '{k}'") + + expected_fields = MockPoolManager._flatten(request_config.get('fields')) + actual_fields = MockPoolManager._flatten(kwargs.get('fields')) + self._tc.assertEqual(Counter(expected_fields), Counter(actual_fields), msg="fields on request do not match") # TODO Add support for more complex paths? mock_file_by_first_argument = MockPoolManager.get_mock_from_path(request_path) From 7935db8a347fd0fa3dd08db43c382cd7a1c3b826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Wed, 3 Sep 2025 14:28:14 +0300 Subject: [PATCH 05/10] test: add default value for getting fields --- test/test_fingerprint_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index 06676d51..d15ca979 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -120,8 +120,8 @@ def request(self, *args, **kwargs): for k in request_config.keys() - { 'fields' }: self._tc.assertEqual(request_config[k], kwargs[k], msg=f"Mismatch on request key: '{k}'") - expected_fields = MockPoolManager._flatten(request_config.get('fields')) - actual_fields = MockPoolManager._flatten(kwargs.get('fields')) + expected_fields = MockPoolManager._flatten(request_config.get('fields', [])) + actual_fields = MockPoolManager._flatten(kwargs.get('fields', [])) self._tc.assertEqual(Counter(expected_fields), Counter(actual_fields), msg="fields on request do not match") # TODO Add support for more complex paths? From dba8914ff7533e30443b1621845987e20799332a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Wed, 3 Sep 2025 14:31:59 +0300 Subject: [PATCH 06/10] test: fix request config access on mocking request --- test/test_fingerprint_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index d15ca979..f9108cf5 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -140,12 +140,12 @@ def request(self, *args, **kwargs): try: if mock_file_by_first_argument == 'related-visitors': # Extract file name from visitor_id param - mock_file_by_first_argument = r[1]['fields'][1][1] + mock_file_by_first_argument = request_config['fields'][1][1] if mock_file_by_first_argument == 'search': if status == 200: mock_file_by_first_argument = MOCK_SEARCH_EVENTS_200 else: - mock_file_by_first_argument = r[1]['fields'][2][1] + mock_file_by_first_argument = request_config['fields'][2][1] path = './test/mocks/' + mock_file_by_first_argument From 10d0b14cdddefdcf7ff7a602e0a94f06cbb33e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Thu, 4 Sep 2025 14:31:22 +0300 Subject: [PATCH 07/10] test: assert unordered fields via Counter Removes flatten function and use Counter to assert unordered fields on request --- test/test_fingerprint_api.py | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index f9108cf5..8789c3c7 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -89,16 +89,6 @@ def expect_request(self, *args, **kwargs): def get_mock_from_path(path): return path.split('/')[-1] - @staticmethod - def _flatten(fields): - flatten = [] - for k, obj in fields: - if isinstance(obj, list): - flatten.extend((k, v) for v in obj) - else: - flatten.append((k, obj)) - return flatten - def request(self, *args, **kwargs): self._tc.assertTrue(len(self._reqs) > 0) (request_method, request_url), request_config = self._reqs.pop(0) @@ -117,12 +107,7 @@ def request(self, *args, **kwargs): self._tc.assertEqual(request_url, args[1]) self._tc.assertEqual(set(request_config.keys()), set(kwargs.keys())) - for k in request_config.keys() - { 'fields' }: - self._tc.assertEqual(request_config[k], kwargs[k], msg=f"Mismatch on request key: '{k}'") - - expected_fields = MockPoolManager._flatten(request_config.get('fields', [])) - actual_fields = MockPoolManager._flatten(kwargs.get('fields', [])) - self._tc.assertEqual(Counter(expected_fields), Counter(actual_fields), msg="fields on request do not match") + self._tc.assertEqual(Counter(kwargs['fields']), Counter(request_config['fields'])) # TODO Add support for more complex paths? mock_file_by_first_argument = MockPoolManager.get_mock_from_path(request_path) @@ -715,7 +700,7 @@ def test_search_events_only_limit(self): def test_search_events_all_params(self): """Test that search events returns 200 with all params""" - params = { + base_params = { 'limit': 100, 'visitor_id': MOCK_SEARCH_EVENTS_200, 'bot': 'good', @@ -747,10 +732,13 @@ def test_search_events_all_params(self): 'proxy': True, 'sdk_version': 'testSdkVersion', 'sdk_platform': 'testSdkPlatform', - 'environment': ["env1", "env2"] } + multivalue_params = [ + ('environment', 'env1'), + ('environment', 'env2'), + ] - expected_fields = [self.integration_info] + list(params.items()) + expected_fields = [self.integration_info] + list(base_params.items()) + multivalue_params mock_pool = MockPoolManager(self) self.api.api_client.rest_client.pool_manager = mock_pool @@ -763,7 +751,11 @@ def test_search_events_all_params(self): timeout=None ) - response = self.api.search_events(**params) + multi = {} + for k, v in multivalue_params: + multi.setdefault(k, []).append(v) + + response = self.api.search_events(**base_params, **multi) self.assertIsInstance(response, SearchEventsResponse) event_response = response.events[0] From 4d16200b7f01e41a64eddfd12b6d4bbab069a5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Thu, 4 Sep 2025 14:35:12 +0300 Subject: [PATCH 08/10] test: add fields guard to request check --- test/test_fingerprint_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index 8789c3c7..b71286b0 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -107,7 +107,8 @@ def request(self, *args, **kwargs): self._tc.assertEqual(request_url, args[1]) self._tc.assertEqual(set(request_config.keys()), set(kwargs.keys())) - self._tc.assertEqual(Counter(kwargs['fields']), Counter(request_config['fields'])) + if 'fields' in kwargs and 'fields' in request_config: + self._tc.assertEqual(Counter(kwargs['fields']), Counter(request_config['fields'])) # TODO Add support for more complex paths? mock_file_by_first_argument = MockPoolManager.get_mock_from_path(request_path) From d19c14700011f1f0892047001e90dfebfc0a49a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Thu, 4 Sep 2025 14:59:33 +0300 Subject: [PATCH 09/10] test: use base_params to trigger SDK func --- test/test_fingerprint_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index b71286b0..ef314992 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -752,11 +752,10 @@ def test_search_events_all_params(self): timeout=None ) - multi = {} for k, v in multivalue_params: - multi.setdefault(k, []).append(v) + base_params.setdefault(k, []).append(v) - response = self.api.search_events(**base_params, **multi) + response = self.api.search_events(**base_params) self.assertIsInstance(response, SearchEventsResponse) event_response = response.events[0] From 3de9bfa28ed61c01ca5c25eb2fc8af9308f47ddc Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Thu, 4 Sep 2025 14:11:37 +0200 Subject: [PATCH 10/10] test: simplify `test_search_events_all_params` test --- test/test_fingerprint_api.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index ef314992..5ba47e5d 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -734,12 +734,16 @@ def test_search_events_all_params(self): 'sdk_version': 'testSdkVersion', 'sdk_platform': 'testSdkPlatform', } - multivalue_params = [ + + params = base_params.copy() + params.update({'environment': ['env1', 'env2']}) + + multivalue_expected_params = [ ('environment', 'env1'), ('environment', 'env2'), ] - expected_fields = [self.integration_info] + list(base_params.items()) + multivalue_params + expected_fields = [self.integration_info] + list(base_params.items()) + multivalue_expected_params mock_pool = MockPoolManager(self) self.api.api_client.rest_client.pool_manager = mock_pool @@ -752,10 +756,7 @@ def test_search_events_all_params(self): timeout=None ) - for k, v in multivalue_params: - base_params.setdefault(k, []).append(v) - - response = self.api.search_events(**base_params) + response = self.api.search_events(**params) self.assertIsInstance(response, SearchEventsResponse) event_response = response.events[0]