From 8e91fa92524de7be3d5ed75b4e0d819827360e24 Mon Sep 17 00:00:00 2001 From: erayaydin Date: Fri, 31 Jul 2026 15:22:28 +0000 Subject: [PATCH 1/6] feat: sync OpenAPI schema to v3.5.1 --- .changeset/active-call.md | 5 + .../automation-intelligence-edge-tag.md | 5 + .changeset/fix-start-end-types.md | 5 + .changeset/keyboard-layout-hash.md | 5 + .../raw-device-attributes-battery-charging.md | 5 + .../search-error-responses-events-search.md | 5 + .changeset/search-error-responses-events.md | 5 + .schema-version | 2 +- docs/Api/FingerprintApi.md | 28 ++-- docs/Model/Event.md | 5 +- docs/Model/RawDeviceAttributes.md | 6 +- docs/Model/SearchEventsBotInfo.md | 2 +- docs/Model/Velocity.md | 4 +- docs/Model/VelocityData.md | 2 +- res/fingerprint-server-api.yaml | 158 +++++++++++++----- src/Api/FingerprintApi.php | 101 +++++++---- src/Model/Event.php | 35 +++- src/Model/RawDeviceAttributes.php | 62 ++++++- src/Model/SearchEventsBotInfo.php | 4 +- src/Model/Velocity.php | 6 +- src/Model/VelocityData.php | 2 +- test/mocks/errors/400_edge_ip_required.json | 6 + test/mocks/errors/400_edge_unknown_field.json | 6 + .../errors/400_request_read_timeout.json | 6 + test/mocks/errors/413_payload_too_large.json | 6 + .../errors/429_too_many_search_requests.json | 6 + .../errors/504_search_timeout_exceeded.json | 6 + test/mocks/events/get_event_200.json | 134 ++++++++------- .../get_event_200_with_unknown_field.json | 16 +- test/mocks/events/get_event_ruleset_200.json | 16 +- .../events/get_event_with_bot_info_200.json | 136 ++++++++------- .../mocks/events/get_event_with_edge_200.json | 50 ++++++ .../events/search/get_event_search_200.json | 18 +- 33 files changed, 616 insertions(+), 242 deletions(-) create mode 100644 .changeset/active-call.md create mode 100644 .changeset/automation-intelligence-edge-tag.md create mode 100644 .changeset/fix-start-end-types.md create mode 100644 .changeset/keyboard-layout-hash.md create mode 100644 .changeset/raw-device-attributes-battery-charging.md create mode 100644 .changeset/search-error-responses-events-search.md create mode 100644 .changeset/search-error-responses-events.md create mode 100644 test/mocks/errors/400_edge_ip_required.json create mode 100644 test/mocks/errors/400_edge_unknown_field.json create mode 100644 test/mocks/errors/400_request_read_timeout.json create mode 100644 test/mocks/errors/413_payload_too_large.json create mode 100644 test/mocks/errors/429_too_many_search_requests.json create mode 100644 test/mocks/errors/504_search_timeout_exceeded.json create mode 100644 test/mocks/events/get_event_with_edge_200.json diff --git a/.changeset/active-call.md b/.changeset/active-call.md new file mode 100644 index 00000000..a288e9de --- /dev/null +++ b/.changeset/active-call.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events**: Add `active_call` smart signal to `Event` diff --git a/.changeset/automation-intelligence-edge-tag.md b/.changeset/automation-intelligence-edge-tag.md new file mode 100644 index 00000000..634d2226 --- /dev/null +++ b/.changeset/automation-intelligence-edge-tag.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +Add `Edge` tag to the Automation Intelligence API endpoint diff --git a/.changeset/fix-start-end-types.md b/.changeset/fix-start-end-types.md new file mode 100644 index 00000000..1ded6ccb --- /dev/null +++ b/.changeset/fix-start-end-types.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**events**: Fix types for `start`/`start_date_time` and `end`/`end_date_time` in normalized schema \ No newline at end of file diff --git a/.changeset/keyboard-layout-hash.md b/.changeset/keyboard-layout-hash.md new file mode 100644 index 00000000..b95c28a1 --- /dev/null +++ b/.changeset/keyboard-layout-hash.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events**: Add `keyboard_layout_hash` to `RawDeviceAttributes` diff --git a/.changeset/raw-device-attributes-battery-charging.md b/.changeset/raw-device-attributes-battery-charging.md new file mode 100644 index 00000000..a7735ae9 --- /dev/null +++ b/.changeset/raw-device-attributes-battery-charging.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events**: Add `battery_charging` field to `RawDeviceAttributes` diff --git a/.changeset/search-error-responses-events-search.md b/.changeset/search-error-responses-events-search.md new file mode 100644 index 00000000..3b7d8648 --- /dev/null +++ b/.changeset/search-error-responses-events-search.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events-search**: Add 429 and 504 error responses to Search Events endpoint diff --git a/.changeset/search-error-responses-events.md b/.changeset/search-error-responses-events.md new file mode 100644 index 00000000..dd6a3e46 --- /dev/null +++ b/.changeset/search-error-responses-events.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events**: Add 504 error response to Get Event endpoint diff --git a/.schema-version b/.schema-version index 5e05a378..684a941c 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v3.4.2 \ No newline at end of file +v3.5.1 \ No newline at end of file diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index 4975de7e..50b2226e 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -230,7 +230,7 @@ $pagination_key = S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQ $visitor_id = Ibk1527CUFmcnjLwIs4A9; // string | Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). $high_recall_id = Ibk1527CUFmcnjLwIs4A9; // string | The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). $bot = \Fingerprint\ServerSdk\Model\SearchEventsBot::GOOD; // \Fingerprint\ServerSdk\Model\SearchEventsBot | Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. -$bot_info = new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsBotInfo(); // \Fingerprint\ServerSdk\Model\SearchEventsBotInfo | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. +$bot_info = new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsBotInfo(); // \Fingerprint\ServerSdk\Model\SearchEventsBotInfo | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. $bot_info_category = array(new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\BotInfoCategory()); // \Fingerprint\ServerSdk\Model\BotInfoCategory[] | Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. $bot_info_identity = array(new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\BotInfoIdentity()); // \Fingerprint\ServerSdk\Model\BotInfoIdentity[] | Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. $bot_info_confidence = array(new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\BotInfoConfidence()); // \Fingerprint\ServerSdk\Model\BotInfoConfidence[] | Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. @@ -243,19 +243,19 @@ $url = https://example.com/login; // string | Filter events by the URL (`url` pr $bundle_id = com.example.app; // string | Filter events by the Bundle ID (iOS) associated with the event. $package_name = com.example.app; // string | Filter events by the Package Name (Android) associated with the event. $origin = https://example.com; // string | Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) -$start = 1767225600000; // int|\DateTime | Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. -$end = 1769903999000; // int|\DateTime | Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value or RFC3339 timestamp). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. +$start = 2026-01-01T00:00:00Z; // \DateTime|int | Include events that happened after the provided `start` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to 7 days ago. Setting `start` does not change the default `end` date of `now` — adjust it separately if needed. +$end = 2026-01-31T23:59:59Z; // \DateTime|int | Include events that happened before the provided `end` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to now. Setting `end` does not change the default `start` date of `7 days ago` — adjust it separately if needed. $reverse = True; // bool | When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). $suspect = True; // bool | Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > 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. $vpn = True; // bool | Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. $virtual_machine = True; // bool | Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. -$tampering = True; // bool | Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. -$anti_detect_browser = True; // bool | Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. +$tampering = True; // bool | Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. +$anti_detect_browser = True; // bool | Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering_details.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. $incognito = True; // bool | Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. $privacy_settings = True; // bool | Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. $jailbroken = True; // bool | Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. $frida = True; // bool | Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. -$factory_reset = True; // bool | Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. +$factory_reset = True; // bool | Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset_timestamp` property populated are included. Events without a `factory_reset_timestamp` Smart Signal result are left out of the response. $cloned_app = True; // bool | Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. $emulator = True; // bool | Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. $root_apps = True; // bool | Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. @@ -275,7 +275,7 @@ $total_hits = 100; // int | When set, the response will include a `total_hits` p $tor_node = True; // bool | Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. $incremental_identification_status = \Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus::COMPLETED(); // \Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus | Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. $simulator = True; // bool | Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. -$source = array(new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsSource()); // \Fingerprint\ServerSdk\Model\SearchEventsSource[] | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. +$source = array(new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsSource()); // \Fingerprint\ServerSdk\Model\SearchEventsSource[] | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. try { $result = $apiInstance->searchEvents($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $bot_info, $bot_info_category, $bot_info_identity, $bot_info_confidence, $bot_info_provider, $bot_info_name, $ip_address, $asn, $linked_id, $url, $bundle_id, $package_name, $origin, $start, $end, $reverse, $suspect, $vpn, $virtual_machine, $tampering, $anti_detect_browser, $incognito, $privacy_settings, $jailbroken, $frida, $factory_reset, $cloned_app, $emulator, $root_apps, $vpn_confidence, $min_suspect_score, $developer_tools, $location_spoofing, $mitm_attack, $rare_device, $rare_device_percentile_bucket, $proxy, $sdk_version, $sdk_platform, $environment, $proximity_id, $total_hits, $tor_node, $incremental_identification_status, $simulator, $source); @@ -297,7 +297,7 @@ try { | **visitor_id** | **string** | Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). | [optional] | | **high_recall_id** | **string** | The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). | [optional] | | **bot** | [**\Fingerprint\ServerSdk\Model\SearchEventsBot**](../Model/.md) | Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. | [optional] | -| **bot_info** | [**\Fingerprint\ServerSdk\Model\SearchEventsBotInfo**](../Model/.md) | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. | [optional] | +| **bot_info** | [**\Fingerprint\ServerSdk\Model\SearchEventsBotInfo**](../Model/.md) | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. | [optional] | | **bot_info_category** | [**\Fingerprint\ServerSdk\Model\BotInfoCategory[]**](../Model/\Fingerprint\ServerSdk\Model\BotInfoCategory.md) | Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. | [optional] | | **bot_info_identity** | [**\Fingerprint\ServerSdk\Model\BotInfoIdentity[]**](../Model/\Fingerprint\ServerSdk\Model\BotInfoIdentity.md) | Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. | [optional] | | **bot_info_confidence** | [**\Fingerprint\ServerSdk\Model\BotInfoConfidence[]**](../Model/\Fingerprint\ServerSdk\Model\BotInfoConfidence.md) | Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. | [optional] | @@ -310,19 +310,19 @@ try { | **bundle_id** | **string** | Filter events by the Bundle ID (iOS) associated with the event. | [optional] | | **package_name** | **string** | Filter events by the Package Name (Android) associated with the event. | [optional] | | **origin** | **string** | Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) | [optional] | -| **start** | **int\|\DateTime** | Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. | [optional] | -| **end** | **int\|\DateTime** | Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value or RFC3339 timestamp). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. | [optional] | +| **start** | **\DateTime\|int** | Include events that happened after the provided `start` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to 7 days ago. Setting `start` does not change the default `end` date of `now` — adjust it separately if needed. | [optional] | +| **end** | **\DateTime\|int** | Include events that happened before the provided `end` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to now. Setting `end` does not change the default `start` date of `7 days ago` — adjust it separately if needed. | [optional] | | **reverse** | **bool** | When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). | [optional] | | **suspect** | **bool** | Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > 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** | **bool** | Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. | [optional] | | **virtual_machine** | **bool** | Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. | [optional] | -| **tampering** | **bool** | Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. | [optional] | -| **anti_detect_browser** | **bool** | Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. | [optional] | +| **tampering** | **bool** | Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. | [optional] | +| **anti_detect_browser** | **bool** | Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering_details.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. | [optional] | | **incognito** | **bool** | Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. | [optional] | | **privacy_settings** | **bool** | Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. | [optional] | | **jailbroken** | **bool** | Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. | [optional] | | **frida** | **bool** | Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. | [optional] | -| **factory_reset** | **bool** | Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. | [optional] | +| **factory_reset** | **bool** | Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset_timestamp` property populated are included. Events without a `factory_reset_timestamp` Smart Signal result are left out of the response. | [optional] | | **cloned_app** | **bool** | Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. | [optional] | | **emulator** | **bool** | Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. | [optional] | | **root_apps** | **bool** | Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. | [optional] | @@ -342,7 +342,7 @@ try { | **tor_node** | **bool** | Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. | [optional] | | **incremental_identification_status** | [**\Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus**](../Model/.md) | Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. | [optional] | | **simulator** | **bool** | Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. | [optional] | -| **source** | [**\Fingerprint\ServerSdk\Model\SearchEventsSource[]**](../Model/\Fingerprint\ServerSdk\Model\SearchEventsSource.md) | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. | [optional] | +| **source** | [**\Fingerprint\ServerSdk\Model\SearchEventsSource[]**](../Model/\Fingerprint\ServerSdk\Model\SearchEventsSource.md) | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. | [optional] | ### Return type diff --git a/docs/Model/Event.md b/docs/Model/Event.md index f31a95d1..bed1abb8 100644 --- a/docs/Model/Event.md +++ b/docs/Model/Event.md @@ -1,6 +1,6 @@ # Event Class -Contains results from Fingerprint Identification and all active Smart Signals. +Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. ## Properties @@ -28,6 +28,7 @@ Name | Type | Description | Notes **client_referrer** | **string** | Client Referrer field corresponds to the `document.referrer` field gathered during an identification request. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark). | [optional] **browser_details** | [**\Fingerprint\ServerSdk\Model\BrowserDetails**](BrowserDetails.md) | | [optional] **proximity** | [**\Fingerprint\ServerSdk\Model\Proximity**](Proximity.md) | | [optional] +**active_call** | **bool** | Indicates whether the mobile device had an active call (cellular or VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and Android. | [optional] **bot** | [**\Fingerprint\ServerSdk\Model\BotResult**](BotResult.md) | | [optional] **bot_type** | **string** | Additional classification of the bot type if detected. | [optional] **bot_info** | [**\Fingerprint\ServerSdk\Model\BotInfo**](BotInfo.md) | | [optional] @@ -62,7 +63,7 @@ Name | Type | Description | Notes **vpn_confidence** | [**\Fingerprint\ServerSdk\Model\VpnConfidence**](VpnConfidence.md) | | [optional] **vpn_ml_score** | **float** | Machine learning–based VPN score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `vpn` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] **vpn_origin_timezone** | **string** | Local timezone which is used in timezone_mismatch method. | [optional] -**vpn_origin_country** | **string** | Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). | [optional] +**vpn_origin_country** | **string** | Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. | [optional] **vpn_methods** | [**\Fingerprint\ServerSdk\Model\VpnMethods**](VpnMethods.md) | | [optional] **high_activity_device** | **bool** | Flag indicating if the request came from a high-activity visitor. | [optional] **rare_device** | **bool** | `true` if the device is considered rare based on its combination of hardware and software attributes. A device is classified as rare if it falls within the top 99.9 percentile (lowest-frequency segment) of observed traffic, or if its configuration has not been previously seen (`not_seen`). > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] diff --git a/docs/Model/RawDeviceAttributes.md b/docs/Model/RawDeviceAttributes.md index 06e86806..3aaa96e0 100644 --- a/docs/Model/RawDeviceAttributes.md +++ b/docs/Model/RawDeviceAttributes.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **font_preferences** | [**\Fingerprint\ServerSdk\Model\FontPreferences**](FontPreferences.md) | | [optional] **emoji** | [**\Fingerprint\ServerSdk\Model\Emoji**](Emoji.md) | | [optional] **fonts** | **string[]** | List of fonts detected on the device. | [optional] -**device_memory** | **int** | Rounded amount of RAM in gigabytes. | [optional] +**device_memory** | **int** | Rounded amount of RAM in gigabytes. Available for browsers, Android, and iOS devices. | [optional] **timezone** | **string** | Timezone identifier detected on the client. | [optional] **canvas** | [**\Fingerprint\ServerSdk\Model\Canvas**](Canvas.md) | | [optional] **languages** | **string[][]** | Navigator languages reported by the agent including fallbacks. Each inner array represents ordered language preferences reported by different APIs. Available for browsers, iOS, and Android devices. | [optional] @@ -36,7 +36,9 @@ Name | Type | Description | Notes **device_manufacturer** | **string** | Device manufacturer string. Available only for Android and iOS devices. | [optional] **font_hash** | **string** | Unique identifier for the user’s installed fonts. | [optional] **timezone_offset** | **string** | UTC offset in \"±HH:MM\" format derived from the detected IANA timezone. | [optional] -**battery_level** | **int** | Battery charge level as a percentage (0-100). Available only for Android and iOS devices. | [optional] +**battery_level** | **int** | Battery charge level as a percentage (0-100). Available for Android, iOS, and web devices. On web, only available in Chromium-based browsers. | [optional] +**battery_charging** | **bool** | When `true`, the device is currently charging. Available only for web devices on Chromium-based browsers. | [optional] **battery_low_power_mode** | **bool** | Whether the device's low power mode is enabled. Available only for Android and iOS devices. | [optional] +**keyboard_layout_hash** | **string** | Unique identifier for the user's keyboard layout. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) \ No newline at end of file diff --git a/docs/Model/SearchEventsBotInfo.md b/docs/Model/SearchEventsBotInfo.md index 550728f9..eec28440 100644 --- a/docs/Model/SearchEventsBotInfo.md +++ b/docs/Model/SearchEventsBotInfo.md @@ -2,7 +2,7 @@ Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - - `none` - events where no bot was detected. + - `none` - events where no bot was detected, and no `bot_info` was present. ## Values diff --git a/docs/Model/Velocity.md b/docs/Model/Velocity.md index 8ffed528..45aecc83 100644 --- a/docs/Model/Velocity.md +++ b/docs/Model/Velocity.md @@ -11,10 +11,10 @@ intervals: 5 minutes, 1 hour, and 24 hours as follows: - Number of distinct IP addresses associated with the provided linked Id. - Number of distinct visitor Ids associated with the provided linked Id. -The `24h` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, +The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted if the number of `events` for the visitor Id in the last 24 -hours (`events.['24h']`) is higher than 20.000. +hours (`events.['24_hours']`) is higher than 20.000. All will not necessarily be returned in a response, some may be omitted if the associated event does not have the required data, such as a linked_id. diff --git a/docs/Model/VelocityData.md b/docs/Model/VelocityData.md index b0362d4c..ef990f68 100644 --- a/docs/Model/VelocityData.md +++ b/docs/Model/VelocityData.md @@ -9,6 +9,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_5_minutes** | **int** | Count for the last 5 minutes of velocity data, from the time of the event. | **_1_hour** | **int** | Count for the last 1 hour of velocity data, from the time of the event. | -**_24_hours** | **int** | The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted if the number of `events` for the visitor Id in the last 24 hours (`events.['24_hours']`) is higher than 20.000. | [optional] +**_24_hours** | **int** | Count for the last 24 hours of velocity data, from the time of the event. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) \ No newline at end of file diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 2786e851..2bac3291 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -104,7 +104,12 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' '429': - description: Too Many Requests. The request is throttled. + description: > + Too Many Requests. The request is throttled. + + To protect service stability during rare periods of extreme load, we + may return HTTP 429 responses with message `too many search + requests` even if you are within your assigned rate limits. content: application/json: schema: @@ -115,6 +120,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + '504': + description: >- + Gateway Timeout. Search execution exceeded the allowed timeout + window. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' patch: tags: - Fingerprint @@ -350,7 +363,7 @@ paths: description: | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - - `none` - events where no bot was detected. + - `none` - events where no bot was detected, and no `bot_info` was present. - name: bot_info_category in: query style: form @@ -526,47 +539,48 @@ paths: in: query schema: oneOf: - - type: integer - format: int64 - examples: - - 1767225600000 - example: 1767225600000 - type: string format: date-time examples: - '2026-01-01T00:00:00Z' example: '2026-01-01T00:00:00Z' + - type: integer + format: int64 + examples: + - 1767225600000 + example: 1767225600000 examples: - '2026-01-01T00:00:00Z' example: '2026-01-01T00:00:00Z' description: > - Include events that happened after this point (with timestamp - greater than or equal the provided `start` Unix milliseconds value - or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does - not change `end`'s default of `now` — adjust it separately if - needed. + Include events that happened after the provided `start` date + formatted as an RFC3339 timestamp. For backward compatibility, a + Unix milliseconds timestamp is also accepted. Defaults to 7 days + ago. Setting `start` does not change the default `end` date of `now` + — adjust it separately if needed. - name: end in: query schema: oneOf: - - type: integer - format: int64 - examples: - - 1769903999000 - example: 1769903999000 - type: string format: date-time examples: - '2026-01-31T23:59:59Z' example: '2026-01-31T23:59:59Z' + - type: integer + format: int64 + examples: + - 1769903999000 + example: 1769903999000 examples: - '2026-01-31T23:59:59Z' example: '2026-01-31T23:59:59Z' description: > - Include events that happened before this point (with timestamp less - than or equal the provided `end` Unix milliseconds value or RFC3339 - timestamp). Defaults to now. Setting `end` does not change `start`'s - default of `7 days ago` — adjust it separately if needed. + Include events that happened before the provided `end` date + formatted as an RFC3339 timestamp. For backward compatibility, a + Unix milliseconds timestamp is also accepted. Defaults to now. + Setting `end` does not change the default `start` date of `7 days + ago` — adjust it separately if needed. - name: reverse in: query schema: @@ -613,10 +627,9 @@ paths: description: > Filter events by Browser Tampering Detection result. - > Note: When using this parameter, only events with the - `tampering.result` property set to `true` or `false` are returned. - Events without a `tampering` Smart Signal result are left out of the - response. + > Note: When using this parameter, only events with the `tampering` + property set to `true` or `false` are returned. Events without a + `tampering` Smart Signal result are left out of the response. - name: anti_detect_browser in: query schema: @@ -625,9 +638,9 @@ paths: Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the - `tampering.anti_detect_browser` property set to `true` or `false` - are returned. Events without a `tampering` Smart Signal result are - left out of the response. + `tampering_details.anti_detect_browser` property set to `true` or + `false` are returned. Events without a `tampering` Smart Signal + result are left out of the response. - name: incognito in: query schema: @@ -677,8 +690,9 @@ paths: Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a - `factory_reset` time. Events without a `factory_reset` Smart Signal - result are left out of the response. + `factory_reset_timestamp` property populated are included. Events + without a `factory_reset_timestamp` Smart Signal result are left out + of the response. - name: cloned_app in: query schema: @@ -941,6 +955,11 @@ paths: Intelligence (Edge) events are returned. + To retrieve all events regardless of source, you must make two + requests. One with the `source` parameter set to `edge`, and another + with the `source` parameter omitted. + + > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. @@ -973,12 +992,31 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + '429': + description: > + Too Many Requests. The request is throttled. + + To protect service stability during rare periods of extreme load, we + may return HTTP 429 responses with message `too many search + requests` even if you are within your assigned rate limits. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' '500': description: Workspace error. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + '504': + description: >- + Gateway Timeout. Search execution exceeded the allowed timeout + window. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' /visitors/{visitor_id}: delete: tags: @@ -1197,7 +1235,7 @@ components: provider_url: type: string examples: - - https://fingerprint.com + - https://chatgpt.com description: The URL of the bot provider's website. name: type: string @@ -1963,6 +2001,12 @@ components: true device location lies within the mapped proximity zone. * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone. * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone. + ActiveCall: + type: boolean + description: > + Indicates whether the mobile device had an active call (cellular or + VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and + Android. BotResult: type: string enum: @@ -1977,7 +2021,7 @@ components: BotType: type: string examples: - - fingerprint_agent + - chatgpt_agent description: | Additional classification of the bot type if detected. ClonedApp: @@ -2371,11 +2415,8 @@ components: examples: - 5 description: > - The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, - `distinct_country`, `distinct_ip_by_linked_id` and - `distinct_visitor_id_by_linked_id` will be omitted if the number of - `events` for the visitor Id in the last 24 hours - (`events.['24_hours']`) is higher than 20.000. + Count for the last 24 hours of velocity data, from the time of the + event. Velocity: type: object description: > @@ -2402,7 +2443,7 @@ components: - Number of distinct visitor Ids associated with the provided linked Id. - The `24h` interval of `distinct_ip`, `distinct_linked_id`, + The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will @@ -2410,7 +2451,7 @@ components: if the number of `events` for the visitor Id in the last 24 - hours (`events.['24h']`) is higher than 20.000. + hours (`events.['24_hours']`) is higher than 20.000. All will not necessarily be returned in a response, some may be omitted @@ -2478,8 +2519,8 @@ components: examples: - DE description: > - Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 - format or unknown). + Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= + 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. HighActivity: type: boolean description: Flag indicating if the request came from a high-activity visitor. @@ -2622,7 +2663,9 @@ components: minimum: 0 examples: - 8 - description: Rounded amount of RAM in gigabytes. + description: >- + Rounded amount of RAM in gigabytes. Available for browsers, Android, and + iOS devices. Timezone: type: string examples: @@ -2884,13 +2927,23 @@ components: examples: - 75 description: >- - Battery charge level as a percentage (0-100). Available only for Android - and iOS devices. + Battery charge level as a percentage (0-100). Available for Android, + iOS, and web devices. On web, only available in Chromium-based browsers. + BatteryCharging: + type: boolean + description: >- + When `true`, the device is currently charging. Available only for web + devices on Chromium-based browsers. BatteryLowPowerMode: type: boolean description: >- Whether the device's low power mode is enabled. Available only for Android and iOS devices. + KeyboardLayoutHash: + type: string + examples: + - 3f33b68235d36b8821147349f1161379 + description: Unique identifier for the user's keyboard layout. RawDeviceAttributes: type: object description: > @@ -2959,8 +3012,12 @@ components: $ref: '#/components/schemas/TimezoneOffset' battery_level: $ref: '#/components/schemas/BatteryLevel' + battery_charging: + $ref: '#/components/schemas/BatteryCharging' battery_low_power_mode: $ref: '#/components/schemas/BatteryLowPowerMode' + keyboard_layout_hash: + $ref: '#/components/schemas/KeyboardLayoutHash' Labels: type: array items: @@ -2992,7 +3049,11 @@ components: type: object description: >- Contains results from Fingerprint Identification and all active Smart - Signals. + Signals. Some Smart Signals are only supported for certain device types, + these fields will be omitted for events not generated from the supported + devices. Consult the [Smart Signals + reference](https://docs.fingerprint.com/docs/smart-signals-reference) + for more details. required: - event_id - timestamp @@ -3117,6 +3178,11 @@ components: - android - ios - browser + active_call: + $ref: '#/components/schemas/ActiveCall' + x-platforms: + - android + - ios bot: $ref: '#/components/schemas/BotResult' x-platforms: @@ -3395,7 +3461,7 @@ components: description: | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - - `none` - events where no bot was detected. + - `none` - events where no bot was detected, and no `bot_info` was present. SearchEventsVpnConfidence: type: string enum: diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index b109b340..6d680a82 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -540,7 +540,7 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @param string|null $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). (optional) * @param string|null $high_recall_id The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). (optional) * @param SearchEventsBot|null $bot Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. (optional) - * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. (optional) + * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. (optional) * @param BotInfoCategory[]|null $bot_info_category Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoIdentity[]|null $bot_info_identity Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoConfidence[]|null $bot_info_confidence Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. (optional) @@ -553,19 +553,19 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @param string|null $bundle_id Filter events by the Bundle ID (iOS) associated with the event. (optional) * @param string|null $package_name Filter events by the Package Name (Android) associated with the event. (optional) * @param string|null $origin Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) (optional) - * @param int|\DateTime|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|\DateTime|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value or RFC3339 timestamp). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $start Include events that happened after the provided `start` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to 7 days ago. Setting `start` does not change the default `end` date of `now` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $end Include events that happened before the provided `end` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to now. Setting `end` does not change the default `start` date of `7 days ago` — adjust it separately if needed. (optional) * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). (optional) * @param bool|null $suspect Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > 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) * @param bool|null $vpn Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. (optional) * @param bool|null $virtual_machine Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. (optional) - * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) - * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering_details.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) * @param bool|null $incognito Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. (optional) * @param bool|null $privacy_settings Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. (optional) * @param bool|null $jailbroken Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. (optional) * @param bool|null $frida Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. (optional) - * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. (optional) + * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset_timestamp` property populated are included. Events without a `factory_reset_timestamp` Smart Signal result are left out of the response. (optional) * @param bool|null $cloned_app Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. (optional) * @param bool|null $emulator Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. (optional) * @param bool|null $root_apps Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. (optional) @@ -585,7 +585,7 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -611,7 +611,7 @@ public function searchEvents(?int $limit = null, ?string $pagination_key = null, * @param string|null $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). (optional) * @param string|null $high_recall_id The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). (optional) * @param SearchEventsBot|null $bot Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. (optional) - * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. (optional) + * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. (optional) * @param BotInfoCategory[]|null $bot_info_category Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoIdentity[]|null $bot_info_identity Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoConfidence[]|null $bot_info_confidence Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. (optional) @@ -624,19 +624,19 @@ public function searchEvents(?int $limit = null, ?string $pagination_key = null, * @param string|null $bundle_id Filter events by the Bundle ID (iOS) associated with the event. (optional) * @param string|null $package_name Filter events by the Package Name (Android) associated with the event. (optional) * @param string|null $origin Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) (optional) - * @param int|\DateTime|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|\DateTime|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value or RFC3339 timestamp). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $start Include events that happened after the provided `start` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to 7 days ago. Setting `start` does not change the default `end` date of `now` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $end Include events that happened before the provided `end` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to now. Setting `end` does not change the default `start` date of `7 days ago` — adjust it separately if needed. (optional) * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). (optional) * @param bool|null $suspect Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > 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) * @param bool|null $vpn Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. (optional) * @param bool|null $virtual_machine Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. (optional) - * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) - * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering_details.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) * @param bool|null $incognito Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. (optional) * @param bool|null $privacy_settings Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. (optional) * @param bool|null $jailbroken Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. (optional) * @param bool|null $frida Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. (optional) - * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. (optional) + * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset_timestamp` property populated are included. Events without a `factory_reset_timestamp` Smart Signal result are left out of the response. (optional) * @param bool|null $cloned_app Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. (optional) * @param bool|null $emulator Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. (optional) * @param bool|null $root_apps Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. (optional) @@ -656,7 +656,7 @@ public function searchEvents(?int $limit = null, ?string $pagination_key = null, * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -726,7 +726,7 @@ public function searchEventsWithHttpInfo(?int $limit = null, ?string $pagination * @param string|null $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). (optional) * @param string|null $high_recall_id The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). (optional) * @param SearchEventsBot|null $bot Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. (optional) - * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. (optional) + * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. (optional) * @param BotInfoCategory[]|null $bot_info_category Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoIdentity[]|null $bot_info_identity Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoConfidence[]|null $bot_info_confidence Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. (optional) @@ -739,19 +739,19 @@ public function searchEventsWithHttpInfo(?int $limit = null, ?string $pagination * @param string|null $bundle_id Filter events by the Bundle ID (iOS) associated with the event. (optional) * @param string|null $package_name Filter events by the Package Name (Android) associated with the event. (optional) * @param string|null $origin Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) (optional) - * @param int|\DateTime|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|\DateTime|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value or RFC3339 timestamp). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $start Include events that happened after the provided `start` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to 7 days ago. Setting `start` does not change the default `end` date of `now` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $end Include events that happened before the provided `end` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to now. Setting `end` does not change the default `start` date of `7 days ago` — adjust it separately if needed. (optional) * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). (optional) * @param bool|null $suspect Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > 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) * @param bool|null $vpn Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. (optional) * @param bool|null $virtual_machine Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. (optional) - * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) - * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering_details.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) * @param bool|null $incognito Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. (optional) * @param bool|null $privacy_settings Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. (optional) * @param bool|null $jailbroken Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. (optional) * @param bool|null $frida Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. (optional) - * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. (optional) + * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset_timestamp` property populated are included. Events without a `factory_reset_timestamp` Smart Signal result are left out of the response. (optional) * @param bool|null $cloned_app Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. (optional) * @param bool|null $emulator Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. (optional) * @param bool|null $root_apps Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. (optional) @@ -771,7 +771,7 @@ public function searchEventsWithHttpInfo(?int $limit = null, ?string $pagination * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -799,7 +799,7 @@ function ($response) { * @param string|null $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). (optional) * @param string|null $high_recall_id The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). (optional) * @param SearchEventsBot|null $bot Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. (optional) - * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. (optional) + * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. (optional) * @param BotInfoCategory[]|null $bot_info_category Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoIdentity[]|null $bot_info_identity Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoConfidence[]|null $bot_info_confidence Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. (optional) @@ -812,19 +812,19 @@ function ($response) { * @param string|null $bundle_id Filter events by the Bundle ID (iOS) associated with the event. (optional) * @param string|null $package_name Filter events by the Package Name (Android) associated with the event. (optional) * @param string|null $origin Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) (optional) - * @param int|\DateTime|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|\DateTime|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value or RFC3339 timestamp). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $start Include events that happened after the provided `start` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to 7 days ago. Setting `start` does not change the default `end` date of `now` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $end Include events that happened before the provided `end` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to now. Setting `end` does not change the default `start` date of `7 days ago` — adjust it separately if needed. (optional) * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). (optional) * @param bool|null $suspect Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > 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) * @param bool|null $vpn Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. (optional) * @param bool|null $virtual_machine Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. (optional) - * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) - * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering_details.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) * @param bool|null $incognito Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. (optional) * @param bool|null $privacy_settings Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. (optional) * @param bool|null $jailbroken Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. (optional) * @param bool|null $frida Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. (optional) - * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. (optional) + * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset_timestamp` property populated are included. Events without a `factory_reset_timestamp` Smart Signal result are left out of the response. (optional) * @param bool|null $cloned_app Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. (optional) * @param bool|null $emulator Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. (optional) * @param bool|null $root_apps Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. (optional) @@ -844,7 +844,7 @@ function ($response) { * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -904,7 +904,7 @@ function ($e) { * @param string|null $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). (optional) * @param string|null $high_recall_id The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). (optional) * @param SearchEventsBot|null $bot Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. (optional) - * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. (optional) + * @param SearchEventsBotInfo|null $bot_info Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. (optional) * @param BotInfoCategory[]|null $bot_info_category Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoIdentity[]|null $bot_info_identity Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param BotInfoConfidence[]|null $bot_info_confidence Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. (optional) @@ -917,19 +917,19 @@ function ($e) { * @param string|null $bundle_id Filter events by the Bundle ID (iOS) associated with the event. (optional) * @param string|null $package_name Filter events by the Package Name (Android) associated with the event. (optional) * @param string|null $origin Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) (optional) - * @param int|\DateTime|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value or RFC3339 timestamp). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|\DateTime|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value or RFC3339 timestamp). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $start Include events that happened after the provided `start` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to 7 days ago. Setting `start` does not change the default `end` date of `now` — adjust it separately if needed. (optional) + * @param \DateTime|int|null $end Include events that happened before the provided `end` date formatted as an RFC3339 timestamp. For backward compatibility, a Unix milliseconds timestamp is also accepted. Defaults to now. Setting `end` does not change the default `start` date of `7 days ago` — adjust it separately if needed. (optional) * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). (optional) * @param bool|null $suspect Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > 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) * @param bool|null $vpn Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. (optional) * @param bool|null $virtual_machine Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. (optional) - * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) - * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $tampering Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) + * @param bool|null $anti_detect_browser Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering_details.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. (optional) * @param bool|null $incognito Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. (optional) * @param bool|null $privacy_settings Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. (optional) * @param bool|null $jailbroken Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. (optional) * @param bool|null $frida Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. (optional) - * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. (optional) + * @param bool|null $factory_reset Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset_timestamp` property populated are included. Events without a `factory_reset_timestamp` Smart Signal result are left out of the response. (optional) * @param bool|null $cloned_app Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. (optional) * @param bool|null $emulator Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. (optional) * @param bool|null $root_apps Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. (optional) @@ -949,7 +949,7 @@ function ($e) { * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -1148,7 +1148,7 @@ public function searchEventsRequest(?int $limit = null, ?string $pagination_key $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $start, 'start', - 'int|\DateTime', + '\DateTime|int', 'form', true, false @@ -1157,7 +1157,7 @@ public function searchEventsRequest(?int $limit = null, ?string $pagination_key $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $end, 'end', - 'int|\DateTime', + '\DateTime|int', 'form', true, false @@ -1832,6 +1832,15 @@ private function handleGetEventError(ApiException $e): never ); $e->setErrorDetails($data); + throw $e; + + case 504: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + throw $e; } } @@ -1897,6 +1906,15 @@ private function handleSearchEventsError(ApiException $e): never throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + + throw $e; + case 500: $data = ObjectSerializer::deserialize( $content, @@ -1904,6 +1922,15 @@ private function handleSearchEventsError(ApiException $e): never ); $e->setErrorDetails($data); + throw $e; + + case 504: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + throw $e; } } diff --git a/src/Model/Event.php b/src/Model/Event.php index d4bb41c4..f52aebe1 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -32,11 +32,11 @@ use Fingerprint\ServerSdk\ObjectSerializer; /** - * Contains results from Fingerprint Identification and all active Smart Signals. + * Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. * * @category Class * - * @description Contains results from Fingerprint Identification and all active Smart Signals. + * @description Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. * * @author Fingerprint * @@ -85,6 +85,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'client_referrer' => 'string', 'browser_details' => '\Fingerprint\ServerSdk\Model\BrowserDetails', 'proximity' => '\Fingerprint\ServerSdk\Model\Proximity', + 'active_call' => 'bool', 'bot' => '\Fingerprint\ServerSdk\Model\BotResult', 'bot_type' => 'string', 'bot_info' => '\Fingerprint\ServerSdk\Model\BotInfo', @@ -160,6 +161,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'client_referrer' => null, 'browser_details' => null, 'proximity' => null, + 'active_call' => null, 'bot' => null, 'bot_type' => null, 'bot_info' => null, @@ -231,6 +233,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'client_referrer' => false, 'browser_details' => false, 'proximity' => false, + 'active_call' => false, 'bot' => false, 'bot_type' => false, 'bot_info' => false, @@ -310,6 +313,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'client_referrer' => 'client_referrer', 'browser_details' => 'browser_details', 'proximity' => 'proximity', + 'active_call' => 'active_call', 'bot' => 'bot', 'bot_type' => 'bot_type', 'bot_info' => 'bot_info', @@ -381,6 +385,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'client_referrer' => 'setClientReferrer', 'browser_details' => 'setBrowserDetails', 'proximity' => 'setProximity', + 'active_call' => 'setActiveCall', 'bot' => 'setBot', 'bot_type' => 'setBotType', 'bot_info' => 'setBotInfo', @@ -452,6 +457,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'client_referrer' => 'getClientReferrer', 'browser_details' => 'getBrowserDetails', 'proximity' => 'getProximity', + 'active_call' => 'getActiveCall', 'bot' => 'getBot', 'bot_type' => 'getBotType', 'bot_info' => 'getBotInfo', @@ -532,6 +538,7 @@ public function __construct(?array $data = null) $this->setIfExists('client_referrer', $data ?? [], null); $this->setIfExists('browser_details', $data ?? [], null); $this->setIfExists('proximity', $data ?? [], null); + $this->setIfExists('active_call', $data ?? [], null); $this->setIfExists('bot', $data ?? [], null); $this->setIfExists('bot_type', $data ?? [], null); $this->setIfExists('bot_info', $data ?? [], null); @@ -1205,6 +1212,28 @@ public function setProximity(Proximity $proximity): self return $this; } + /** + * Gets active_call. + * + */ + public function getActiveCall(): ?bool + { + return $this->container['active_call']; + } + + /** + * Sets active_call. + * + * @param bool $active_call Indicates whether the mobile device had an active call (cellular or VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and Android. + * + */ + public function setActiveCall(bool $active_call): self + { + $this->container['active_call'] = $active_call; + + return $this; + } + /** * Gets bot. * @@ -1993,7 +2022,7 @@ public function getVpnOriginCountry(): ?string /** * Sets vpn_origin_country. * - * @param string $vpn_origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). + * @param string $vpn_origin_country Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. * */ public function setVpnOriginCountry(string $vpn_origin_country): self diff --git a/src/Model/RawDeviceAttributes.php b/src/Model/RawDeviceAttributes.php index 6982cc1c..c923bd73 100644 --- a/src/Model/RawDeviceAttributes.php +++ b/src/Model/RawDeviceAttributes.php @@ -93,7 +93,9 @@ class RawDeviceAttributes implements ModelInterface, \ArrayAccess, \JsonSerializ 'font_hash' => 'string', 'timezone_offset' => 'string', 'battery_level' => 'int', + 'battery_charging' => 'bool', 'battery_low_power_mode' => 'bool', + 'keyboard_layout_hash' => 'string', ]; /** @@ -136,7 +138,9 @@ class RawDeviceAttributes implements ModelInterface, \ArrayAccess, \JsonSerializ 'font_hash' => null, 'timezone_offset' => null, 'battery_level' => 'int32', + 'battery_charging' => null, 'battery_low_power_mode' => null, + 'keyboard_layout_hash' => null, ]; /** @@ -175,7 +179,9 @@ class RawDeviceAttributes implements ModelInterface, \ArrayAccess, \JsonSerializ 'font_hash' => false, 'timezone_offset' => false, 'battery_level' => false, + 'battery_charging' => false, 'battery_low_power_mode' => false, + 'keyboard_layout_hash' => false, ]; /** @@ -222,7 +228,9 @@ class RawDeviceAttributes implements ModelInterface, \ArrayAccess, \JsonSerializ 'font_hash' => 'font_hash', 'timezone_offset' => 'timezone_offset', 'battery_level' => 'battery_level', + 'battery_charging' => 'battery_charging', 'battery_low_power_mode' => 'battery_low_power_mode', + 'keyboard_layout_hash' => 'keyboard_layout_hash', ]; /** @@ -261,7 +269,9 @@ class RawDeviceAttributes implements ModelInterface, \ArrayAccess, \JsonSerializ 'font_hash' => 'setFontHash', 'timezone_offset' => 'setTimezoneOffset', 'battery_level' => 'setBatteryLevel', + 'battery_charging' => 'setBatteryCharging', 'battery_low_power_mode' => 'setBatteryLowPowerMode', + 'keyboard_layout_hash' => 'setKeyboardLayoutHash', ]; /** @@ -300,7 +310,9 @@ class RawDeviceAttributes implements ModelInterface, \ArrayAccess, \JsonSerializ 'font_hash' => 'getFontHash', 'timezone_offset' => 'getTimezoneOffset', 'battery_level' => 'getBatteryLevel', + 'battery_charging' => 'getBatteryCharging', 'battery_low_power_mode' => 'getBatteryLowPowerMode', + 'keyboard_layout_hash' => 'getKeyboardLayoutHash', ]; /** @@ -348,7 +360,9 @@ public function __construct(?array $data = null) $this->setIfExists('font_hash', $data ?? [], null); $this->setIfExists('timezone_offset', $data ?? [], null); $this->setIfExists('battery_level', $data ?? [], null); + $this->setIfExists('battery_charging', $data ?? [], null); $this->setIfExists('battery_low_power_mode', $data ?? [], null); + $this->setIfExists('keyboard_layout_hash', $data ?? [], null); } /** @@ -557,7 +571,7 @@ public function getDeviceMemory(): ?int /** * Sets device_memory. * - * @param int $device_memory rounded amount of RAM in gigabytes + * @param int $device_memory Rounded amount of RAM in gigabytes. Available for browsers, Android, and iOS devices. * */ public function setDeviceMemory(int $device_memory): self @@ -1142,7 +1156,7 @@ public function getBatteryLevel(): ?int /** * Sets battery_level. * - * @param int $battery_level Battery charge level as a percentage (0-100). Available only for Android and iOS devices. + * @param int $battery_level Battery charge level as a percentage (0-100). Available for Android, iOS, and web devices. On web, only available in Chromium-based browsers. * */ public function setBatteryLevel(int $battery_level): self @@ -1159,6 +1173,28 @@ public function setBatteryLevel(int $battery_level): self return $this; } + /** + * Gets battery_charging. + * + */ + public function getBatteryCharging(): ?bool + { + return $this->container['battery_charging']; + } + + /** + * Sets battery_charging. + * + * @param bool $battery_charging When `true`, the device is currently charging. Available only for web devices on Chromium-based browsers. + * + */ + public function setBatteryCharging(bool $battery_charging): self + { + $this->container['battery_charging'] = $battery_charging; + + return $this; + } + /** * Gets battery_low_power_mode. * @@ -1181,6 +1217,28 @@ public function setBatteryLowPowerMode(bool $battery_low_power_mode): self return $this; } + /** + * Gets keyboard_layout_hash. + * + */ + public function getKeyboardLayoutHash(): ?string + { + return $this->container['keyboard_layout_hash']; + } + + /** + * Sets keyboard_layout_hash. + * + * @param string $keyboard_layout_hash unique identifier for the user's keyboard layout + * + */ + public function setKeyboardLayoutHash(string $keyboard_layout_hash): self + { + $this->container['keyboard_layout_hash'] = $keyboard_layout_hash; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/SearchEventsBotInfo.php b/src/Model/SearchEventsBotInfo.php index a8fb834d..b3b63b9c 100644 --- a/src/Model/SearchEventsBotInfo.php +++ b/src/Model/SearchEventsBotInfo.php @@ -32,11 +32,11 @@ /** * Filter events by their Bot Info result, specifically: * - `all` - events where any kind of bot was detected. - * - `none` - events where no bot was detected. + * - `none` - events where no bot was detected, and no `bot_info` was present. * * @category Enum * - * @description Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. + * @description Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. * * @author Fingerprint * diff --git a/src/Model/Velocity.php b/src/Model/Velocity.php index f47ff3ea..cab25294 100644 --- a/src/Model/Velocity.php +++ b/src/Model/Velocity.php @@ -43,17 +43,17 @@ * - Number of distinct IP addresses associated with the provided linked Id. * - Number of distinct visitor Ids associated with the provided linked Id. * - * The `24h` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, + * The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, * `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted * if the number of `events` for the visitor Id in the last 24 - * hours (`events.['24h']`) is higher than 20.000. + * hours (`events.['24_hours']`) is higher than 20.000. * * All will not necessarily be returned in a response, some may be omitted if the * associated event does not have the required data, such as a linked_id. * * @category Class * - * @description Sums key data points for a specific `visitor_id`, `ip_address` and `linked_id` at three distinct time intervals: 5 minutes, 1 hour, and 24 hours as follows: - Number of distinct IP addresses associated to the visitor Id. - Number of distinct linked Ids associated with the visitor Id. - Number of distinct countries associated with the visitor Id. - Number of identification events associated with the visitor Id. - Number of identification events associated with the detected IP address. - Number of distinct IP addresses associated with the provided linked Id. - Number of distinct visitor Ids associated with the provided linked Id. The `24h` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted if the number of `events` for the visitor Id in the last 24 hours (`events.['24h']`) is higher than 20.000. All will not necessarily be returned in a response, some may be omitted if the associated event does not have the required data, such as a linked_id. + * @description Sums key data points for a specific `visitor_id`, `ip_address` and `linked_id` at three distinct time intervals: 5 minutes, 1 hour, and 24 hours as follows: - Number of distinct IP addresses associated to the visitor Id. - Number of distinct linked Ids associated with the visitor Id. - Number of distinct countries associated with the visitor Id. - Number of identification events associated with the visitor Id. - Number of identification events associated with the detected IP address. - Number of distinct IP addresses associated with the provided linked Id. - Number of distinct visitor Ids associated with the provided linked Id. The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted if the number of `events` for the visitor Id in the last 24 hours (`events.['24_hours']`) is higher than 20.000. All will not necessarily be returned in a response, some may be omitted if the associated event does not have the required data, such as a linked_id. * * @author Fingerprint * diff --git a/src/Model/VelocityData.php b/src/Model/VelocityData.php index 594fa4da..381fa717 100644 --- a/src/Model/VelocityData.php +++ b/src/Model/VelocityData.php @@ -325,7 +325,7 @@ public function get24Hours(): ?int /** * Sets _24_hours. * - * @param int $_24_hours The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted if the number of `events` for the visitor Id in the last 24 hours (`events.['24_hours']`) is higher than 20.000. + * @param int $_24_hours count for the last 24 hours of velocity data, from the time of the event * */ public function set24Hours(int $_24_hours): self diff --git a/test/mocks/errors/400_edge_ip_required.json b/test/mocks/errors/400_edge_ip_required.json new file mode 100644 index 00000000..8f055f8f --- /dev/null +++ b/test/mocks/errors/400_edge_ip_required.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "request_cannot_be_parsed", + "message": "at least one of ipv4_address or ipv6_address is required" + } +} diff --git a/test/mocks/errors/400_edge_unknown_field.json b/test/mocks/errors/400_edge_unknown_field.json new file mode 100644 index 00000000..c0a153ef --- /dev/null +++ b/test/mocks/errors/400_edge_unknown_field.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "request_cannot_be_parsed", + "message": "request body contains an unknown field \"unknown\"" + } +} \ No newline at end of file diff --git a/test/mocks/errors/400_request_read_timeout.json b/test/mocks/errors/400_request_read_timeout.json new file mode 100644 index 00000000..89daaca8 --- /dev/null +++ b/test/mocks/errors/400_request_read_timeout.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "request_read_timeout", + "message": "request read timeout" + } +} \ No newline at end of file diff --git a/test/mocks/errors/413_payload_too_large.json b/test/mocks/errors/413_payload_too_large.json new file mode 100644 index 00000000..00a1c6f9 --- /dev/null +++ b/test/mocks/errors/413_payload_too_large.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "payload_too_large", + "message": "payload too large" + } +} diff --git a/test/mocks/errors/429_too_many_search_requests.json b/test/mocks/errors/429_too_many_search_requests.json new file mode 100644 index 00000000..bc42b32a --- /dev/null +++ b/test/mocks/errors/429_too_many_search_requests.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "too_many_requests", + "message": "too many search requests" + } +} diff --git a/test/mocks/errors/504_search_timeout_exceeded.json b/test/mocks/errors/504_search_timeout_exceeded.json new file mode 100644 index 00000000..cc5fcbd7 --- /dev/null +++ b/test/mocks/errors/504_search_timeout_exceeded.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "failed", + "message": "gateway timeout" + } +} diff --git a/test/mocks/events/get_event_200.json b/test/mocks/events/get_event_200.json index d2922970..8c40bcd6 100644 --- a/test/mocks/events/get_event_200.json +++ b/test/mocks/events/get_event_200.json @@ -152,6 +152,11 @@ "1_hour": 1, "24_hours": 1 }, + "distinct_linked_id": { + "5_minutes": 1, + "1_hour": 5, + "24_hours": 5 + }, "distinct_country": { "5_minutes": 1, "1_hour": 2, @@ -200,103 +205,112 @@ "math": "5f030fa7d2e5f9f757bfaf81642eb1a6", "vendor": "Google Inc.", "plugins": [ - { - "description": "Portable Document Format", - "mimeTypes": [ - { - "suffixes": "pdf", - "type": "application/pdf" - }, - { - "suffixes": "pdf", - "type": "text/pdf" - } - ], - "name": "PDF Viewer" - } + { + "description": "Portable Document Format", + "mimeTypes": [ + { + "suffixes": "pdf", + "type": "application/pdf" + }, + { + "suffixes": "pdf", + "type": "text/pdf" + } + ], + "name": "PDF Viewer" + } ], "webgl_extensions": { - "context_attributes": "6b1ed336830d2bc96442a9d76373252a", - "extension_parameters": "86a8abb36f0cb30b5946dec0c761d042", - "extensions": "57233d7b10f89fcd1ff95e3837ccd72d", - "parameters": "ea118c48e308bc4b0677118bbb3019ec", - "shader_precisions": "f223dfbcd580cf142da156d93790eb83", - "unsupported_extensions": [] + "context_attributes": "6b1ed336830d2bc96442a9d76373252a", + "extension_parameters": "86a8abb36f0cb30b5946dec0c761d042", + "extensions": "57233d7b10f89fcd1ff95e3837ccd72d", + "parameters": "ea118c48e308bc4b0677118bbb3019ec", + "shader_precisions": "f223dfbcd580cf142da156d93790eb83", + "unsupported_extensions": [] }, "cookies_enabled": true, "webgl_basics": { - "renderer": "WebKit WebGL", - "renderer_unmasked": "ANGLE (Apple, ANGLE Metal Renderer: Apple M4, Unspecified Version)", - "shading_language_version": "WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)", - "vendor": "WebKit", - "vendor_unmasked": "Google Inc. (Apple)", - "version": "WebGL 1.0 (OpenGL ES 2.0 Chromium)" + "renderer": "WebKit WebGL", + "renderer_unmasked": "ANGLE (Apple, ANGLE Metal Renderer: Apple M4, Unspecified Version)", + "shading_language_version": "WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)", + "vendor": "WebKit", + "vendor_unmasked": "Google Inc. (Apple)", + "version": "WebGL 1.0 (OpenGL ES 2.0 Chromium)" }, "canvas": { - "geometry": "db3c1462576a399a03ae93d0ab9eb5c4", - "text": "70c3d3f7eb4408dc37a6bf8af1c51029", - "winding": true + "geometry": "db3c1462576a399a03ae93d0ab9eb5c4", + "text": "70c3d3f7eb4408dc37a6bf8af1c51029", + "winding": true }, "hardware_concurrency": 10, "languages": [ - [ - "en-US" - ] + [ + "en-US" + ] ], "color_depth": 24, "fonts": [ - "Arial Unicode MS", - "Gill Sans", - "Helvetica Neue", - "Menlo" + "Arial Unicode MS", + "Gill Sans", + "Helvetica Neue", + "Menlo" ], "indexed_db": true, "touch_support": { - "max_touch_points": 0, - "touch_event": false, - "touch_start": false + "max_touch_points": 0, + "touch_event": false, + "touch_start": false }, "device_memory": 8, "oscpu": "Windows NT 6.1; Win64; x64", "architecture": 127, "screen_resolution": [ - 1920, - 1080 + 1920, + 1080 ], "timezone": "America/Sao_Paulo", "emoji": { - "bottom": 32, - "font": "Times", - "height": 18, - "left": 8, - "right": 1608, - "top": 14, - "width": 1600, - "x": 8, - "y": 14 + "bottom": 32, + "font": "Times", + "height": 18, + "left": 8, + "right": 1608, + "top": 14, + "width": 1600, + "x": 8, + "y": 14 }, "font_preferences": { - "apple": 147.5625, - "default": 147.5625, - "min": 9.234375, - "mono": 133.0625, - "sans": 144.015625, - "serif": 147.5625, - "system": 146.09375 + "apple": 147.5625, + "default": 147.5625, + "min": 9.234375, + "mono": 133.0625, + "sans": 144.015625, + "serif": 147.5625, + "system": 146.09375 }, "platform": "MacIntel", "local_storage": true, "session_storage": true, "date_time_locale": "en-US", - "audio": 124.04347745512496 + "audio": 124.04347745512496, + "keyboard_layout_hash": "691e3845c85c202a1514b6fd7ef17065", + "battery_charging": true, + "battery_level": 80, + "battery_low_power_mode": true, + "timezone_offset": "-03:00", + "font_hash": "bb4d842593877975d45017c603ff5994", + "device_manufacturer": "samsung", + "device_model": "SM-S921U" }, "rare_device": false, "rare_device_percentile_bucket": " Date: Tue, 4 Aug 2026 12:54:43 +0200 Subject: [PATCH 2/6] test: add handling and tests for 504 Gateway Timeout error --- test/Api/FingerprintApiTest.php | 81 +++++++++++++++++++++++++++++++++ test/MockHelper.php | 6 +++ 2 files changed, 87 insertions(+) diff --git a/test/Api/FingerprintApiTest.php b/test/Api/FingerprintApiTest.php index 7f691695..ee6e7598 100644 --- a/test/Api/FingerprintApiTest.php +++ b/test/Api/FingerprintApiTest.php @@ -374,6 +374,33 @@ public function testGetEvent500Error() } } + /** + * Verifies getEvent throws 504 + * + * @throws GuzzleException + * @throws \DateMalformedStringException + */ + public function testGetEvent504Error() + { + $this->mockHandler->append(MockHelper::getMockResponse(MockHelper::OPERATION_ERROR_504_GATEWAY_TIMEOUT)); + + $this->expectException(ApiException::class); + $this->expectExceptionCode(504); + + try { + $this->api->getEvent(MockHelper::MOCK_EVENT_ID); + } catch (ApiException $e) { + $this->assertEquals(ErrorResponse::class, get_class($e->getErrorDetails())); + + /** @var ErrorResponse $errorDetails */ + $errorDetails = $e->getErrorDetails(); + $this->assertEquals(ErrorCode::FAILED, $errorDetails->getError()->getCode()); + $this->assertEquals('gateway timeout', $errorDetails->getError()->getMessage()); + + throw $e; + } + } + /** * Verifies updateEvent sends correct request body and method. * @@ -924,6 +951,33 @@ public function testSearchEvents403WrongRegion() } } + /** + * Verifies searchEvents throws 429 too many requests + * + * @throws GuzzleException + * @throws \DateMalformedStringException + */ + public function testSearchEvents429Error() + { + $this->mockHandler->append(MockHelper::getMockResponse(MockHelper::OPERATION_ERROR_429_TOO_MANY_REQUESTS)); + + $this->expectException(ApiException::class); + $this->expectExceptionCode(429); + + try { + $this->api->searchEvents(); + } catch (ApiException $e) { + $this->assertEquals(ErrorResponse::class, get_class($e->getErrorDetails())); + + /** @var ErrorResponse $errorDetails */ + $errorDetails = $e->getErrorDetails(); + $this->assertEquals(ErrorCode::TOO_MANY_REQUESTS, $errorDetails->getError()->getCode()); + $this->assertEquals('too many requests', $errorDetails->getError()->getMessage()); + + throw $e; + } + } + /** * Verifies searchEvents throws 500 for internal error. * @@ -951,6 +1005,33 @@ public function testSearchEvents500Error() } } + /** + * Verifies searchEvents throws 504 + * + * @throws GuzzleException + * @throws \DateMalformedStringException + */ + public function testSearchEvents504Error() + { + $this->mockHandler->append(MockHelper::getMockResponse(MockHelper::OPERATION_ERROR_504_GATEWAY_TIMEOUT)); + + $this->expectException(ApiException::class); + $this->expectExceptionCode(504); + + try { + $this->api->searchEvents(); + } catch (ApiException $e) { + $this->assertEquals(ErrorResponse::class, get_class($e->getErrorDetails())); + + /** @var ErrorResponse $errorDetails */ + $errorDetails = $e->getErrorDetails(); + $this->assertEquals(ErrorCode::FAILED, $errorDetails->getError()->getCode()); + $this->assertEquals('gateway timeout', $errorDetails->getError()->getMessage()); + + throw $e; + } + } + /** * Verifies deleteVisitorData sends correct request. * diff --git a/test/MockHelper.php b/test/MockHelper.php index 9971bc48..59a27961 100644 --- a/test/MockHelper.php +++ b/test/MockHelper.php @@ -54,6 +54,8 @@ final class MockHelper public const OPERATION_ERROR_500_INTERNAL_SERVER_ERROR = 'OPERATION_ERROR_500_INTERNAL_SERVER_ERROR'; + public const OPERATION_ERROR_504_GATEWAY_TIMEOUT = 'OPERATION_ERROR_504_GATEWAY_TIMEOUT'; + /** * Mock response map: operationId => [file, status, extra_headers]. */ @@ -130,6 +132,10 @@ final class MockHelper 'file' => ['errors', '500_internal_server_error.json'], 'status' => 500, ], + self::OPERATION_ERROR_504_GATEWAY_TIMEOUT => [ + 'file' => ['errors', '504_search_timeout_exceeded.json'], + 'status' => 504, + ] ]; public static function getMockResponse(string $operationId): Response From d3d08fc4eb849074492ce0994b3b210445a5f087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20=C5=BBydek?= Date: Tue, 4 Aug 2026 12:55:59 +0200 Subject: [PATCH 3/6] style: format --- test/Api/FingerprintApiTest.php | 6 +++--- test/MockHelper.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Api/FingerprintApiTest.php b/test/Api/FingerprintApiTest.php index ee6e7598..c1b9bd30 100644 --- a/test/Api/FingerprintApiTest.php +++ b/test/Api/FingerprintApiTest.php @@ -375,7 +375,7 @@ public function testGetEvent500Error() } /** - * Verifies getEvent throws 504 + * Verifies getEvent throws 504. * * @throws GuzzleException * @throws \DateMalformedStringException @@ -952,7 +952,7 @@ public function testSearchEvents403WrongRegion() } /** - * Verifies searchEvents throws 429 too many requests + * Verifies searchEvents throws 429 too many requests. * * @throws GuzzleException * @throws \DateMalformedStringException @@ -1006,7 +1006,7 @@ public function testSearchEvents500Error() } /** - * Verifies searchEvents throws 504 + * Verifies searchEvents throws 504. * * @throws GuzzleException * @throws \DateMalformedStringException diff --git a/test/MockHelper.php b/test/MockHelper.php index 59a27961..21ce5166 100644 --- a/test/MockHelper.php +++ b/test/MockHelper.php @@ -135,7 +135,7 @@ final class MockHelper self::OPERATION_ERROR_504_GATEWAY_TIMEOUT => [ 'file' => ['errors', '504_search_timeout_exceeded.json'], 'status' => 504, - ] + ], ]; public static function getMockResponse(string $operationId): Response From 435697195346f4fc544f4c0cd3dc52149be00558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Tue, 4 Aug 2026 19:32:12 +0300 Subject: [PATCH 4/6] chore: remove unnecessary changeset files --- .changeset/automation-intelligence-edge-tag.md | 5 ----- .changeset/search-error-responses-events-search.md | 5 ----- .changeset/search-error-responses-events.md | 5 ----- 3 files changed, 15 deletions(-) delete mode 100644 .changeset/automation-intelligence-edge-tag.md delete mode 100644 .changeset/search-error-responses-events-search.md delete mode 100644 .changeset/search-error-responses-events.md diff --git a/.changeset/automation-intelligence-edge-tag.md b/.changeset/automation-intelligence-edge-tag.md deleted file mode 100644 index 634d2226..00000000 --- a/.changeset/automation-intelligence-edge-tag.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fingerprint/php-sdk': minor ---- - -Add `Edge` tag to the Automation Intelligence API endpoint diff --git a/.changeset/search-error-responses-events-search.md b/.changeset/search-error-responses-events-search.md deleted file mode 100644 index 3b7d8648..00000000 --- a/.changeset/search-error-responses-events-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fingerprint/php-sdk': minor ---- - -**events-search**: Add 429 and 504 error responses to Search Events endpoint diff --git a/.changeset/search-error-responses-events.md b/.changeset/search-error-responses-events.md deleted file mode 100644 index dd6a3e46..00000000 --- a/.changeset/search-error-responses-events.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fingerprint/php-sdk': minor ---- - -**events**: Add 504 error response to Get Event endpoint From ba83921a4ce10ca4f26fd712788a685519a88312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Tue, 4 Aug 2026 19:34:02 +0300 Subject: [PATCH 5/6] chore: remove unnecessary mock files --- test/mocks/errors/400_edge_ip_required.json | 6 --- test/mocks/errors/400_edge_unknown_field.json | 6 --- .../errors/400_request_read_timeout.json | 6 --- test/mocks/errors/413_payload_too_large.json | 6 --- .../errors/429_too_many_search_requests.json | 6 --- .../errors/504_search_timeout_exceeded.json | 6 --- .../mocks/events/get_event_with_edge_200.json | 50 ------------------- 7 files changed, 86 deletions(-) delete mode 100644 test/mocks/errors/400_edge_ip_required.json delete mode 100644 test/mocks/errors/400_edge_unknown_field.json delete mode 100644 test/mocks/errors/400_request_read_timeout.json delete mode 100644 test/mocks/errors/413_payload_too_large.json delete mode 100644 test/mocks/errors/429_too_many_search_requests.json delete mode 100644 test/mocks/errors/504_search_timeout_exceeded.json delete mode 100644 test/mocks/events/get_event_with_edge_200.json diff --git a/test/mocks/errors/400_edge_ip_required.json b/test/mocks/errors/400_edge_ip_required.json deleted file mode 100644 index 8f055f8f..00000000 --- a/test/mocks/errors/400_edge_ip_required.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "request_cannot_be_parsed", - "message": "at least one of ipv4_address or ipv6_address is required" - } -} diff --git a/test/mocks/errors/400_edge_unknown_field.json b/test/mocks/errors/400_edge_unknown_field.json deleted file mode 100644 index c0a153ef..00000000 --- a/test/mocks/errors/400_edge_unknown_field.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "request_cannot_be_parsed", - "message": "request body contains an unknown field \"unknown\"" - } -} \ No newline at end of file diff --git a/test/mocks/errors/400_request_read_timeout.json b/test/mocks/errors/400_request_read_timeout.json deleted file mode 100644 index 89daaca8..00000000 --- a/test/mocks/errors/400_request_read_timeout.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "request_read_timeout", - "message": "request read timeout" - } -} \ No newline at end of file diff --git a/test/mocks/errors/413_payload_too_large.json b/test/mocks/errors/413_payload_too_large.json deleted file mode 100644 index 00a1c6f9..00000000 --- a/test/mocks/errors/413_payload_too_large.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "payload_too_large", - "message": "payload too large" - } -} diff --git a/test/mocks/errors/429_too_many_search_requests.json b/test/mocks/errors/429_too_many_search_requests.json deleted file mode 100644 index bc42b32a..00000000 --- a/test/mocks/errors/429_too_many_search_requests.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "too_many_requests", - "message": "too many search requests" - } -} diff --git a/test/mocks/errors/504_search_timeout_exceeded.json b/test/mocks/errors/504_search_timeout_exceeded.json deleted file mode 100644 index cc5fcbd7..00000000 --- a/test/mocks/errors/504_search_timeout_exceeded.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "failed", - "message": "gateway timeout" - } -} diff --git a/test/mocks/events/get_event_with_edge_200.json b/test/mocks/events/get_event_with_edge_200.json deleted file mode 100644 index 6eb071f6..00000000 --- a/test/mocks/events/get_event_with_edge_200.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "event_id": "1758130560902.8tRtrH", - "timestamp": 1758130560902, - "url": "https://example.com/login?foo=bar", - "bot_info": { - "category": "ai_agent", - "provider": "OpenAI", - "provider_url": "https://openai.com", - "name": "ChatGPT Agent", - "identity": "signed", - "confidence": "high" - }, - "ip_info": { - "v4": { - "address": "104.210.139.192", - "geolocation": { - "accuracy_radius": 20, - "latitude": 29.42412, - "longitude": -98.49363, - "postal_code": "78205", - "timezone": "America/Chicago", - "city_name": "San Antonio", - "country_code": "US", - "country_name": "United States", - "continent_code": "NA", - "continent_name": "North America", - "subdivisions": [ - { - "iso_code": "TX", - "name": "Texas" - } - ] - }, - "asn": "8075", - "asn_name": "Microsoft Corporation", - "asn_network": "104.208.0.0/13", - "asn_type": "hosting", - "datacenter_result": true, - "datacenter_name": "Microsoft Azure" - } - }, - "proxy": false, - "proxy_confidence": "high", - "vpn": false, - "vpn_confidence": "medium", - "vpn_methods": { - "public_vpn": false, - "relay": false - } -} \ No newline at end of file From 2f2c50d106daab7b803f5bf0610ed2037921e292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Tue, 4 Aug 2026 19:38:43 +0300 Subject: [PATCH 6/6] test: cover active_call and battery/keyboard --- test/Api/FingerprintApiTest.php | 6 ++++++ test/Model/EventAllPropertiesTest.php | 7 +++++++ test/Model/RawDeviceAttributesTest.php | 6 ++++++ test/mocks/errors/504_search_timeout_exceeded.json | 6 ++++++ 4 files changed, 25 insertions(+) create mode 100644 test/mocks/errors/504_search_timeout_exceeded.json diff --git a/test/Api/FingerprintApiTest.php b/test/Api/FingerprintApiTest.php index c1b9bd30..b6329071 100644 --- a/test/Api/FingerprintApiTest.php +++ b/test/Api/FingerprintApiTest.php @@ -1607,6 +1607,8 @@ private function assertEvent(Event $event, \stdClass $actual): void $this->assertEquals($actualProximity->precision_radius, $proximity->getPrecisionRadius()); $this->assertEquals($actualProximity->confidence, $proximity->getConfidence()); + $this->assertEquals($actual->active_call, $event->getActiveCall()); + $this->assertEquals(BotResult::NOT_DETECTED, $event->getBot()); $this->assertEquals(null, $event->getBotType()); $this->assertEquals(null, $event->getBotInfo()); @@ -1637,6 +1639,10 @@ private function assertEvent(Event $event, \stdClass $actual): void $this->assertEquals('db3c1462576a399a03ae93d0ab9eb5c4', $rawDeviceAttributes->getCanvas()->getGeometry()); $this->assertEquals('24', $rawDeviceAttributes->getColorDepth()); $this->assertTrue($rawDeviceAttributes->getCookiesEnabled()); + $this->assertEquals(80, $rawDeviceAttributes->getBatteryLevel()); + $this->assertTrue($rawDeviceAttributes->getBatteryCharging()); + $this->assertTrue($rawDeviceAttributes->getBatteryLowPowerMode()); + $this->assertEquals('691e3845c85c202a1514b6fd7ef17065', $rawDeviceAttributes->getKeyboardLayoutHash()); $labels = $event->getLabels(); $actualLabels = $actual->labels; diff --git a/test/Model/EventAllPropertiesTest.php b/test/Model/EventAllPropertiesTest.php index 0f8caca9..dddeb68b 100644 --- a/test/Model/EventAllPropertiesTest.php +++ b/test/Model/EventAllPropertiesTest.php @@ -407,6 +407,13 @@ public function testSetProximity(): void $this->assertSame($proximity, $event->getProximity()); } + public function testSetActiveCall(): void + { + $event = new Event(['event_id' => 'e', 'timestamp' => 1]); + $event->setActiveCall(true); + $this->assertTrue($event->getActiveCall()); + } + public function testSetTamperingConfidence(): void { $event = new Event(['event_id' => 'e', 'timestamp' => 1]); diff --git a/test/Model/RawDeviceAttributesTest.php b/test/Model/RawDeviceAttributesTest.php index 0cf9822b..d83a4145 100644 --- a/test/Model/RawDeviceAttributesTest.php +++ b/test/Model/RawDeviceAttributesTest.php @@ -122,6 +122,12 @@ public function testAllGettersAndSetters(): void $model->setBatteryLowPowerMode(false); $this->assertFalse($model->getBatteryLowPowerMode()); + + $model->setBatteryCharging(true); + $this->assertTrue($model->getBatteryCharging()); + + $model->setKeyboardLayoutHash('691e3845c85c202a1514b6fd7ef17065'); + $this->assertSame('691e3845c85c202a1514b6fd7ef17065', $model->getKeyboardLayoutHash()); } public function testDeviceMemoryLowerBoundValidation(): void diff --git a/test/mocks/errors/504_search_timeout_exceeded.json b/test/mocks/errors/504_search_timeout_exceeded.json new file mode 100644 index 00000000..cc5fcbd7 --- /dev/null +++ b/test/mocks/errors/504_search_timeout_exceeded.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "failed", + "message": "gateway timeout" + } +}