From 826cb8e1a939994240a2cb5e048451f4aaf02cde Mon Sep 17 00:00:00 2001 From: erayaydin Date: Thu, 24 Apr 2025 14:51:38 +0000 Subject: [PATCH 1/3] feat: sync OpenAPI schema to v2.6.0 --- .changeset/gold-flies-doubt.md | 5 ++++ .changeset/shiny-ghosts-sin.md | 5 ++++ .schema-version | 2 +- docs/FingerprintApi.md | 8 ++++-- .../api/fingerprint_api.py | 10 ++++++++ res/fingerprint-server-api.yaml | 25 ++++++++++++++++++- 6 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 .changeset/gold-flies-doubt.md create mode 100644 .changeset/shiny-ghosts-sin.md diff --git a/.changeset/gold-flies-doubt.md b/.changeset/gold-flies-doubt.md new file mode 100644 index 00000000..c93a3bb2 --- /dev/null +++ b/.changeset/gold-flies-doubt.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': patch +--- + +**events-search**: Fixed `vpn_confidence` query parameter enum value formatting (`high,` -> `high`) diff --git a/.changeset/shiny-ghosts-sin.md b/.changeset/shiny-ghosts-sin.md new file mode 100644 index 00000000..c51856cd --- /dev/null +++ b/.changeset/shiny-ghosts-sin.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +**events-search**: Event search now supports two new filter parameters: `ip_blocklist`, `datacenter` diff --git a/.schema-version b/.schema-version index d80b4a81..7433fb30 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.5.0 \ No newline at end of file +v2.6.0 \ No newline at end of file diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 6e2befe9..bad70df0 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) +> 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) Get events via search @@ -263,10 +263,12 @@ emulator = true # bool | Filter events by Android Emulator Detection result. > 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) 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) + 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) print(api_response) except ApiException as e: print("Exception when calling FingerprintApi->search_events: %s\n" % e) @@ -300,6 +302,8 @@ Name | Type | Description | Notes **root_apps** | **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** | **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** | **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] ### Return type diff --git a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py index 4ee8733f..e209381c 100644 --- a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py +++ b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py @@ -530,6 +530,8 @@ def search_events(self, limit: int, **kwargs) -> Union[SearchEventsResponse, Asy :param root_apps: 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. :param vpn_confidence: 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. :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. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -575,6 +577,8 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 :param bool root_apps: 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. :param str vpn_confidence: 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. :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. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -605,6 +609,8 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 'root_apps', 'vpn_confidence', 'min_suspect_score', + 'ip_blocklist', + 'datacenter', 'async_req', '_return_http_data_only', '_preload_content', @@ -676,6 +682,10 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 query_params.append(('vpn_confidence', params['vpn_confidence'])) # noqa: E501 if 'min_suspect_score' in params: query_params.append(('min_suspect_score', params['min_suspect_score'])) # noqa: E501 + if 'ip_blocklist' in params: + query_params.append(('ip_blocklist', params['ip_blocklist'])) # noqa: E501 + if 'datacenter' in params: + query_params.append(('datacenter', params['datacenter'])) # noqa: E501 header_params = {} diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 3122979f..ff281b24 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -414,7 +414,7 @@ paths: schema: type: string enum: - - high, + - high - medium - low description: > @@ -444,6 +444,29 @@ paths: exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. + - name: ip_blocklist + in: query + schema: + type: boolean + description: > + 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. + - name: datacenter + in: query + schema: + type: boolean + description: > + 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. responses: '200': description: Events matching the filter(s). From 074cac5e408f5b5a6b5e750b788c15a27b80773d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Thu, 24 Apr 2025 20:30:59 +0300 Subject: [PATCH 2/3] test: add test parameters for `ip_blocklist` and `datacenter` filters Expanded the `test_search_events_all_params` test to cover new `ip_blocklist` and `datacenter` query parameters (filters). This improves test coverage. Related-Task: INTER-1220 --- 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 3196c775..49f0c7e1 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -720,6 +720,8 @@ def test_search_events_all_params(self): 'vpn_confidence': 'medium', 'emulator': True, 'incognito': True, + 'ip_blocklist': True, + 'datacenter': True, } expected_fields = [self.integration_info] + list(params.items()) From 8d654dc416a74a8fa531b04d46b2c3eed3997d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Fri, 25 Apr 2025 12:29:39 +0300 Subject: [PATCH 3/3] chore: remove unnecessary changeset about enum value fix Removes unnecessary changeset file. Related-Task: INTER-1220 --- .changeset/gold-flies-doubt.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/gold-flies-doubt.md diff --git a/.changeset/gold-flies-doubt.md b/.changeset/gold-flies-doubt.md deleted file mode 100644 index c93a3bb2..00000000 --- a/.changeset/gold-flies-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'fingerprint-pro-server-api-python-sdk': patch ---- - -**events-search**: Fixed `vpn_confidence` query parameter enum value formatting (`high,` -> `high`)