diff --git a/.changeset/beige-places-drop.md b/.changeset/beige-places-drop.md new file mode 100644 index 00000000..90909013 --- /dev/null +++ b/.changeset/beige-places-drop.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**events**: Clarify availability of proxy and VM ML score signals \ No newline at end of file diff --git a/.changeset/blue-roses-film.md b/.changeset/blue-roses-film.md new file mode 100644 index 00000000..67a8a3c7 --- /dev/null +++ b/.changeset/blue-roses-film.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**events**: Clarify semantics of `incremental_identification_status` \ No newline at end of file diff --git a/.changeset/curvy-rice-chew.md b/.changeset/curvy-rice-chew.md new file mode 100644 index 00000000..d6c0cc24 --- /dev/null +++ b/.changeset/curvy-rice-chew.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**visitors**: Clarify rate limits for `deleteVisitorData` operation \ No newline at end of file diff --git a/.changeset/cute-pumas-pull.md b/.changeset/cute-pumas-pull.md new file mode 100644 index 00000000..a01e936f --- /dev/null +++ b/.changeset/cute-pumas-pull.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events-search**: Add `start_date_time` and `end_date_time` RFC3339 timestamp filters \ No newline at end of file diff --git a/.changeset/developer-tools-android-v4.md b/.changeset/developer-tools-android-v4.md new file mode 100644 index 00000000..167eeaf4 --- /dev/null +++ b/.changeset/developer-tools-android-v4.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events**: Add Android platform support to `developer_tools` smart signal diff --git a/.changeset/fancy-spiders-flash.md b/.changeset/fancy-spiders-flash.md new file mode 100644 index 00000000..17077d01 --- /dev/null +++ b/.changeset/fancy-spiders-flash.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events**: Add `labels` to `Event` \ No newline at end of file diff --git a/.changeset/fix-backed-enum-build-query.md b/.changeset/fix-backed-enum-build-query.md new file mode 100644 index 00000000..ceb5966a --- /dev/null +++ b/.changeset/fix-backed-enum-build-query.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**search-events**: Fix `BackedEnum` query parameters causing "Object could not be converted to string" error in `buildQuery` diff --git a/.changeset/loud-donuts-lead.md b/.changeset/loud-donuts-lead.md new file mode 100644 index 00000000..b8499d19 --- /dev/null +++ b/.changeset/loud-donuts-lead.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**events-search**: Clarify availability of `rare_device` and `rare_device_percentile_bucket` query parameters \ No newline at end of file diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..f6f2e02e --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,8 @@ +{ + "mode": "pre", + "tag": "develop", + "initialVersions": { + "@fingerprint/php-sdk": "7.1.0" + }, + "changesets": [] +} diff --git a/.changeset/quick-cows-battle.md b/.changeset/quick-cows-battle.md new file mode 100644 index 00000000..f740ed30 --- /dev/null +++ b/.changeset/quick-cows-battle.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events**: Add iOS platform support to `developer_tools` \ No newline at end of file diff --git a/.changeset/wet-socks-fold.md b/.changeset/wet-socks-fold.md new file mode 100644 index 00000000..35a9dca3 --- /dev/null +++ b/.changeset/wet-socks-fold.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**events-search**: Fix `pagination_key` example \ No newline at end of file diff --git a/.changeset/witty-lions-worry.md b/.changeset/witty-lions-worry.md new file mode 100644 index 00000000..56cfd797 --- /dev/null +++ b/.changeset/witty-lions-worry.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events-search**: Add `bot_info` filter parameters \ No newline at end of file diff --git a/.changeset/yellow-ducks-spend.md b/.changeset/yellow-ducks-spend.md new file mode 100644 index 00000000..4864049c --- /dev/null +++ b/.changeset/yellow-ducks-spend.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +**events-search**: Add `unknown` value to `BotInfoCategory` \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 29c95816..143eb0a6 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,6 +2,9 @@ README.md composer.json docs/Api/FingerprintApi.md docs/Model/BotInfo.md +docs/Model/BotInfoCategory.md +docs/Model/BotInfoConfidence.md +docs/Model/BotInfoIdentity.md docs/Model/BotResult.md docs/Model/BrowserDetails.md docs/Model/Canvas.md @@ -27,6 +30,7 @@ docs/Model/IdentificationConfidence.md docs/Model/IncrementalIdentificationStatus.md docs/Model/Integration.md docs/Model/IntegrationSubintegration.md +docs/Model/LabelsInner.md docs/Model/PluginsInner.md docs/Model/PluginsInnerMimeTypesInner.md docs/Model/Proximity.md @@ -39,9 +43,12 @@ docs/Model/RuleActionHeaderField.md docs/Model/RuleActionType.md docs/Model/SDK.md docs/Model/SearchEventsBot.md +docs/Model/SearchEventsBotInfo.md +docs/Model/SearchEventsEndParameter.md docs/Model/SearchEventsIncrementalIdentificationStatus.md docs/Model/SearchEventsRareDevicePercentileBucket.md docs/Model/SearchEventsSdkPlatform.md +docs/Model/SearchEventsStartParameter.md docs/Model/SearchEventsVpnConfidence.md docs/Model/SupplementaryIDHighRecall.md docs/Model/TamperingConfidence.md @@ -61,6 +68,9 @@ src/Api/FingerprintApi.php src/ApiException.php src/Configuration.php src/Model/BotInfo.php +src/Model/BotInfoCategory.php +src/Model/BotInfoConfidence.php +src/Model/BotInfoIdentity.php src/Model/BotResult.php src/Model/BrowserDetails.php src/Model/Canvas.php @@ -86,6 +96,7 @@ src/Model/IdentificationConfidence.php src/Model/IncrementalIdentificationStatus.php src/Model/Integration.php src/Model/IntegrationSubintegration.php +src/Model/LabelsInner.php src/Model/ModelInterface.php src/Model/PluginsInner.php src/Model/PluginsInnerMimeTypesInner.php @@ -99,9 +110,12 @@ src/Model/RuleActionHeaderField.php src/Model/RuleActionType.php src/Model/SDK.php src/Model/SearchEventsBot.php +src/Model/SearchEventsBotInfo.php +src/Model/SearchEventsEndParameter.php src/Model/SearchEventsIncrementalIdentificationStatus.php src/Model/SearchEventsRareDevicePercentileBucket.php src/Model/SearchEventsSdkPlatform.php +src/Model/SearchEventsStartParameter.php src/Model/SearchEventsVpnConfidence.php src/Model/SupplementaryIDHighRecall.php src/Model/TamperingConfidence.php diff --git a/.schema-version b/.schema-version index aa6c8967..56e50151 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v3.2.0 \ No newline at end of file +v3.3.1 \ No newline at end of file diff --git a/README.md b/README.md index a0a12cdb..6a956dd7 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ if(!$isValidWebhookSign) { Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*FingerprintApi* | [**deleteVisitorData**](docs/Api/FingerprintApi.md#deletevisitordata) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID +*FingerprintApi* | [**deleteVisitorData**](docs/Api/FingerprintApi.md#deletevisitordata) | **DELETE** /visitors/{visitor_id} | Delete a visitor ID *FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{event_id} | Get an event by event ID *FingerprintApi* | [**searchEvents**](docs/Api/FingerprintApi.md#searchevents) | **GET** /events | Search events *FingerprintApi* | [**updateEvent**](docs/Api/FingerprintApi.md#updateevent) | **PATCH** /events/{event_id} | Update an event @@ -229,6 +229,9 @@ Class | Method | HTTP request | Description ## Documentation for Models - [BotInfo](docs/Model/BotInfo.md) + - [BotInfoCategory](docs/Model/BotInfoCategory.md) + - [BotInfoConfidence](docs/Model/BotInfoConfidence.md) + - [BotInfoIdentity](docs/Model/BotInfoIdentity.md) - [BotResult](docs/Model/BotResult.md) - [BrowserDetails](docs/Model/BrowserDetails.md) - [Canvas](docs/Model/Canvas.md) @@ -254,6 +257,7 @@ Class | Method | HTTP request | Description - [IncrementalIdentificationStatus](docs/Model/IncrementalIdentificationStatus.md) - [Integration](docs/Model/Integration.md) - [IntegrationSubintegration](docs/Model/IntegrationSubintegration.md) + - [LabelsInner](docs/Model/LabelsInner.md) - [PluginsInner](docs/Model/PluginsInner.md) - [PluginsInnerMimeTypesInner](docs/Model/PluginsInnerMimeTypesInner.md) - [Proximity](docs/Model/Proximity.md) @@ -266,6 +270,7 @@ Class | Method | HTTP request | Description - [RuleActionType](docs/Model/RuleActionType.md) - [SDK](docs/Model/SDK.md) - [SearchEventsBot](docs/Model/SearchEventsBot.md) + - [SearchEventsBotInfo](docs/Model/SearchEventsBotInfo.md) - [SearchEventsIncrementalIdentificationStatus](docs/Model/SearchEventsIncrementalIdentificationStatus.md) - [SearchEventsRareDevicePercentileBucket](docs/Model/SearchEventsRareDevicePercentileBucket.md) - [SearchEventsSdkPlatform](docs/Model/SearchEventsSdkPlatform.md) diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index da83b705..dcf2aeba 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -6,7 +6,7 @@ All URIs are relative to *https://api.fpjs.io/v4* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**deleteVisitorData()**](FingerprintApi.md#deleteVisitorData) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID | +| [**deleteVisitorData()**](FingerprintApi.md#deleteVisitorData) | **DELETE** /visitors/{visitor_id} | Delete a visitor ID | | [**getEvent()**](FingerprintApi.md#getEvent) | **GET** /events/{event_id} | Get an event by event ID | | [**searchEvents()**](FingerprintApi.md#searchEvents) | **GET** /events | Search events | | [**updateEvent()**](FingerprintApi.md#updateEvent) | **PATCH** /events/{event_id} | Update an event | @@ -15,31 +15,35 @@ All URIs are relative to *https://api.fpjs.io/v4* # **deleteVisitorData** > deleteVisitorData($visitor_id) -Delete data by visitor ID +Delete a visitor ID -Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. +Use this API to request the deletion of all data associated with a specific visitor ID. -### Which data is deleted? -- Browser (or device) properties -- Identification requests made from this browser (or device) +Upon a request to delete data for a visitor ID, +- The data collected from the corresponding browser (or device) will be deleted asynchronously, typically within a few minutes. This data will no longer be available to identify this browser (or device). When the same browser (or device) revisits, it will receive a new visitor ID. +- The identification events made from this browser (or device) in the past 10 days are typically deleted within 24 hrs. +- The identification events made from this browser (or device) outside of the 10 days will be purged as per your [data retention period](https://docs.fingerprint.com/docs/regions#data-retention). -#### Browser (or device) properties -- Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. -- Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Workspace](https://docs.fingerprint.com/docs/glossary#fingerprint-workspace). +The following timeline illustrates which events are deleted and which remain after a DELETE API request: +``` +Day 1: First visit from browser A. (Assigned visitor ID: VID1000) +Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) +Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) +Day 14: Delete VID1000 +Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) +Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days of deleting VID1000 and will have been deleted) +Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 days of deleting VID1000 and is still available) +``` + +### Availability +This API is available only for Enterprise plans **upon request**. If you are interested, please [contact our support team](https://fingerprint.com/support/). -#### Identification requests made from this browser (or device) -- Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://docs.fingerprint.com/docs/regions#data-retention). -- Upon request to delete, the identification requests that were made by this browser - - Within the past 10 days are deleted within 24 hrs. - - Outside of 10 days are allowed to purge as per your data retention period. +### Rate limits and daily quota +The rate limits and daily quota for this API **differ** from those for our other API. -### Corollary -After requesting to delete a visitor ID, -- If the same browser (or device) requests to identify, it will receive a different visitor ID. -- If you request [`/v4/events` API](https://docs.fingerprint.com/reference/server-api-v4-get-event) with an `event_id` that was made outside of the 10 days, you will still receive a valid response. +The maximum number of DELETE requests that can be made in an hour cannot exceed 30 RPH, and the maximum number that can be made in a day cannot exceed 500 RPD. -### Interested? -Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. +You can request an increase to these limits by contacting [our support team](https://fingerprint.com/support/). ### Example @@ -168,7 +172,7 @@ try { [[Back to README]](../../README.md) # **searchEvents** -> \Fingerprint\ServerSdk\Model\EventSearch searchEvents($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $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) +> \Fingerprint\ServerSdk\Model\EventSearch 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) Search events @@ -222,10 +226,16 @@ $apiInstance = new FingerprintApi( ); $limit = 10; // int | Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. -$pagination_key = 'pagination_key_example'; // string | Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` +$pagination_key = 'pagination_key_example'; // string | Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` $visitor_id = 'visitor_id_example'; // 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 = 'high_recall_id_example'; // 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_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. +$bot_info_provider = array('bot_info_provider_example'); // string[] | Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. +$bot_info_name = array('bot_info_name_example'); // string[] | Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. $ip_address = 'ip_address_example'; // string | Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 $asn = 'asn_example'; // string | Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. $linked_id = 'linked_id_example'; // string | Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. @@ -233,9 +243,9 @@ $url = 'url_example'; // string | Filter events by the URL (`url` property) asso $bundle_id = 'bundle_id_example'; // string | Filter events by the Bundle ID (iOS) associated with the event. $package_name = 'package_name_example'; // string | Filter events by the Package Name (Android) associated with the event. $origin = 'origin_example'; // 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 | Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. -$end = 1769903999000; // int | Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. -$reverse = True; // bool | When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). +$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. +$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. @@ -254,8 +264,8 @@ $min_suspect_score = 3.4; // float | Filter events with Suspect Score result abo $developer_tools = True; // bool | Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. $location_spoofing = True; // bool | Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. $mitm_attack = True; // bool | Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. -$rare_device = True; // bool | Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. -$rare_device_percentile_bucket = new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsRareDevicePercentileBucket(); // \Fingerprint\ServerSdk\Model\SearchEventsRareDevicePercentileBucket | Filter events by Device Rarity percentile bucket. ` Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > 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/). +$rare_device_percentile_bucket = new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsRareDevicePercentileBucket(); // \Fingerprint\ServerSdk\Model\SearchEventsRareDevicePercentileBucket | Filter events by Device Rarity percentile bucket. ` 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/). $proxy = True; // bool | Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. $sdk_version = 'sdk_version_example'; // string | Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` $sdk_platform = \Fingerprint\ServerSdk\Model\SearchEventsSdkPlatform::JS; // \Fingerprint\ServerSdk\Model\SearchEventsSdkPlatform | Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. @@ -267,7 +277,7 @@ $incremental_identification_status = \Fingerprint\ServerSdk\Model\SearchEventsIn $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. try { - $result = $apiInstance->searchEvents($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $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); + $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); var_dump($result); } catch (ApiException $e) { $errorDetails = $e->getErrorDetails()->getErrorDetails(); @@ -282,10 +292,16 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **limit** | **int** | Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. | [optional] [default to 10] | -| **pagination_key** | **string** | Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` | [optional] | +| **pagination_key** | **string** | Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` | [optional] | | **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_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] | +| **bot_info_provider** | [**string[]**](../Model/string.md) | Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. | [optional] | +| **bot_info_name** | [**string[]**](../Model/string.md) | Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. | [optional] | | **ip_address** | **string** | Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 | [optional] | | **asn** | **string** | Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. | [optional] | | **linked_id** | **string** | Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] | @@ -293,9 +309,9 @@ 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** | Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. | [optional] | -| **end** | **int** | Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. | [optional] | -| **reverse** | **bool** | When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). | [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] | +| **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] | @@ -314,8 +330,8 @@ try { | **developer_tools** | **bool** | Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. | [optional] | | **location_spoofing** | **bool** | Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. | [optional] | | **mitm_attack** | **bool** | Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. | [optional] | -| **rare_device** | **bool** | Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. | [optional] | -| **rare_device_percentile_bucket** | [**\Fingerprint\ServerSdk\Model\SearchEventsRareDevicePercentileBucket**](../Model/.md) | Filter events by Device Rarity percentile bucket. ` Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > 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] | +| **rare_device_percentile_bucket** | [**\Fingerprint\ServerSdk\Model\SearchEventsRareDevicePercentileBucket**](../Model/.md) | Filter events by Device Rarity percentile bucket. ` 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] | | **proxy** | **bool** | Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. | [optional] | | **sdk_version** | **string** | Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` | [optional] | | **sdk_platform** | [**\Fingerprint\ServerSdk\Model\SearchEventsSdkPlatform**](../Model/.md) | Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. | [optional] | diff --git a/docs/Model/BotInfo.md b/docs/Model/BotInfo.md index f7fd8f51..b399c928 100644 --- a/docs/Model/BotInfo.md +++ b/docs/Model/BotInfo.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **provider** | **string** | The organization or company operating the bot. | **provider_url** | **string** | The URL of the bot provider's website. | [optional] **name** | **string** | The specific name or identifier of the bot. | -**identity** | **string** | The verification status of the bot's identity: * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider. * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider’s customers. * `spoofed` - bot that claims a public identity but fails verification. * `unknown` - bot that does not publish a verifiable identity. | +**identity** | **string** | The verification status of the bot's identity: * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider. * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider's customers. * `spoofed` - bot that claims a public identity but fails verification. * `unknown` - bot that does not publish a verifiable identity. | **confidence** | **string** | Confidence level of the bot identification. | [[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/BotInfoCategory.md b/docs/Model/BotInfoCategory.md new file mode 100644 index 00000000..b02805ae --- /dev/null +++ b/docs/Model/BotInfoCategory.md @@ -0,0 +1,27 @@ +# BotInfoCategory Enum + +The type and purpose of the bot. + + +## Values + +| Name | Value | Description | +| --- | --- | --- | +ADVERTISING_AND_MARKETING | 'advertising_and_marketing' | | +AGGREGATOR | 'aggregator' | | +AI_AGENT | 'ai_agent' | | +AI_ASSISTANT | 'ai_assistant' | | +AI_BROWSER | 'ai_browser' | | +AI_CRAWLER | 'ai_crawler' | | +AI_SEARCH | 'ai_search' | | +BROWSER_AUTOMATION | 'browser_automation' | | +ECOMMERCE | 'ecommerce' | | +MONITORING_AND_ANALYTICS | 'monitoring_and_analytics' | | +OTHER | 'other' | | +SCRAPING | 'scraping' | | +SECURITY | 'security' | | +SEARCH_ENGINE_CRAWLER | 'search_engine_crawler' | | +SEARCH_ENGINE_OPTIMIZATION | 'search_engine_optimization' | | +UNKNOWN | 'unknown' | | + +[[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/BotInfoConfidence.md b/docs/Model/BotInfoConfidence.md new file mode 100644 index 00000000..693ecb8f --- /dev/null +++ b/docs/Model/BotInfoConfidence.md @@ -0,0 +1,13 @@ +# BotInfoConfidence Enum + +Confidence level of the bot identification. + +## Values + +| Name | Value | Description | +| --- | --- | --- | +LOW | 'low' | | +MEDIUM | 'medium' | | +HIGH | 'high' | | + +[[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/BotInfoIdentity.md b/docs/Model/BotInfoIdentity.md new file mode 100644 index 00000000..e8466b2c --- /dev/null +++ b/docs/Model/BotInfoIdentity.md @@ -0,0 +1,19 @@ +# BotInfoIdentity Enum + +The verification status of the bot's identity: + * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider. + * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider's customers. + * `spoofed` - bot that claims a public identity but fails verification. + * `unknown` - bot that does not publish a verifiable identity. + + +## Values + +| Name | Value | Description | +| --- | --- | --- | +VERIFIED | 'verified' | | +SIGNED | 'signed' | | +SPOOFED | 'spoofed' | | +UNKNOWN | 'unknown' | | + +[[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/Event.md b/docs/Model/Event.md index 76c475de..26a6ba1f 100644 --- a/docs/Model/Event.md +++ b/docs/Model/Event.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes **bot_type** | **string** | Additional classification of the bot type if detected. | [optional] **bot_info** | [**\Fingerprint\ServerSdk\Model\BotInfo**](BotInfo.md) | | [optional] **cloned_app** | **bool** | Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android. | [optional] -**developer_tools** | **bool** | `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. | [optional] +**developer_tools** | **bool** | `true` if the browser has DevTools open (Chrome, Firefox) or the Android/iOS device has Developer Tools enabled, `false` otherwise. | [optional] **emulator** | **bool** | Android specific emulator detection. There are 2 values: * `true` - Emulated environment detected (e.g. launch inside of AVD). * `false` - No signs of emulated environment detected or the client is not Android. | [optional] **factory_reset_timestamp** | **int** | The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC) as a value of 0. See [Factory Reset Detection](https://docs.fingerprint.com/docs/smart-signals-reference#factory-reset-detection) to learn more about this Smart Signal. | [optional] **frida** | **bool** | [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device. | [optional] @@ -38,7 +38,7 @@ Name | Type | Description | Notes **proxy** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional] **proxy_confidence** | [**\Fingerprint\ServerSdk\Model\ProxyConfidence**](ProxyConfidence.md) | | [optional] **proxy_details** | [**\Fingerprint\ServerSdk\Model\ProxyDetails**](ProxyDetails.md) | | [optional] -**proxy_ml_score** | **float** | Machine learning–based proxy 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 `proxy` detection result | [optional] +**proxy_ml_score** | **float** | Machine learning–based proxy 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 `proxy` 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] **incognito** | **bool** | `true` if we detected incognito mode used in the browser, `false` otherwise. | [optional] **jailbroken** | **bool** | iOS specific jailbreak detection. There are 2 values: * `true` - Jailbreak detected. * `false` - No signs of jailbreak or the client is not iOS. | [optional] **location_spoofing** | **bool** | Flag indicating whether the request came from a mobile device with location spoofing enabled. | [optional] @@ -54,7 +54,7 @@ Name | Type | Description | Notes **tampering_details** | [**\Fingerprint\ServerSdk\Model\TamperingDetails**](TamperingDetails.md) | | [optional] **velocity** | [**\Fingerprint\ServerSdk\Model\Velocity**](Velocity.md) | | [optional] **virtual_machine** | **bool** | `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. | [optional] -**virtual_machine_ml_score** | **float** | Machine learning–based virtual machine 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 `virtual_machine` detection result | [optional] +**virtual_machine_ml_score** | **float** | Machine learning–based virtual machine 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 `virtual_machine` 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** | **bool** | VPN or other anonymizing service has been used when sending the request. | [optional] **vpn_confidence** | [**\Fingerprint\ServerSdk\Model\VpnConfidence**](VpnConfidence.md) | | [optional] **vpn_origin_timezone** | **string** | Local timezone which is used in timezone_mismatch method. | [optional] @@ -64,5 +64,6 @@ Name | Type | Description | Notes **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] **rare_device_percentile_bucket** | [**\Fingerprint\ServerSdk\Model\RareDevicePercentileBucket**](RareDevicePercentileBucket.md) | | [optional] **raw_device_attributes** | [**\Fingerprint\ServerSdk\Model\RawDeviceAttributes**](RawDeviceAttributes.md) | | [optional] +**labels** | [**\Fingerprint\ServerSdk\Model\LabelsInner[]**](LabelsInner.md) | Each label returns a prediction (true or false) for a specific use case (label field) based on a machine learning score. The machine learning score is determined by a model trained on customer data for that use case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [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/IdentificationConfidence.md b/docs/Model/IdentificationConfidence.md index 4d78e410..f60c1d0b 100644 --- a/docs/Model/IdentificationConfidence.md +++ b/docs/Model/IdentificationConfidence.md @@ -1,11 +1,13 @@ # IdentificationConfidence Class +The confidence score represents the probability of a false-positive identification. To learn more, visit [Confidence Score](https://docs.fingerprint.com/docs/identification-accuracy-and-confidence#confidence-score). Please note that the confidence score is not yet supported for [High Recall ID](https://docs.fingerprint.com/docs/supplementary-identifiers-highrecall). + ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**score** | **float** | The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. | -**version** | **string** | The version name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. | [optional] +**score** | **float** | A floating-point number between 0 and 1 that represents the probability of a false-positive identification. For High Recall ID, this value is 0. | +**version** | **string** | The version name of the method used to calculate the confidence score. For High Recall ID, this value is \"Not Supported\". | [optional] **comment** | **string** | | [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/IncrementalIdentificationStatus.md b/docs/Model/IncrementalIdentificationStatus.md index 198ea80b..5c257e1a 100644 --- a/docs/Model/IncrementalIdentificationStatus.md +++ b/docs/Model/IncrementalIdentificationStatus.md @@ -1,8 +1,8 @@ # IncrementalIdentificationStatus Enum Only included for requests using incremental identification. -- `partially_completed` - the event did not receive the second "update" request. -- `completed` - the event was updated and all information is available. +- `partially_completed` - Indicates this event corresponds to a 'minimal' request. Smart Signals, even if included in your plan, are not computed; hence, their values must be ignored. +- `completed` - Indicates this event corresponds to a 'complete' request. Smart Signals, if included in your plan, are computed; hence, their values are valid and relevant. ## Values diff --git a/docs/Model/LabelsInner.md b/docs/Model/LabelsInner.md new file mode 100644 index 00000000..a7c8ec01 --- /dev/null +++ b/docs/Model/LabelsInner.md @@ -0,0 +1,11 @@ +# LabelsInner Class + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **string** | | +**prediction** | **bool** | | [optional] +**ml_score** | **float** | | [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 new file mode 100644 index 00000000..550728f9 --- /dev/null +++ b/docs/Model/SearchEventsBotInfo.md @@ -0,0 +1,15 @@ +# SearchEventsBotInfo Enum + +Filter events by their Bot Info result, specifically: + - `all` - events where any kind of bot was detected. + - `none` - events where no bot was detected. + + +## Values + +| Name | Value | Description | +| --- | --- | --- | +ALL | 'all' | | +NONE | 'none' | | + +[[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/SearchEventsEndParameter.md b/docs/Model/SearchEventsEndParameter.md new file mode 100644 index 00000000..8de4e088 --- /dev/null +++ b/docs/Model/SearchEventsEndParameter.md @@ -0,0 +1,4 @@ +# SearchEventsEndParameter Class + + +[[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/SearchEventsRareDevicePercentileBucket.md b/docs/Model/SearchEventsRareDevicePercentileBucket.md index 82754130..33e1132e 100644 --- a/docs/Model/SearchEventsRareDevicePercentileBucket.md +++ b/docs/Model/SearchEventsRareDevicePercentileBucket.md @@ -8,6 +8,8 @@ Filter events by Device Rarity percentile bucket. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. +> 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/). + ## Values diff --git a/docs/Model/SearchEventsStartParameter.md b/docs/Model/SearchEventsStartParameter.md new file mode 100644 index 00000000..41f7cbbb --- /dev/null +++ b/docs/Model/SearchEventsStartParameter.md @@ -0,0 +1,4 @@ +# SearchEventsStartParameter Class + + +[[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 9ac62608..ffd5ee8f 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -270,7 +270,7 @@ paths: `pagination_key` parameter to get the next page of results: - 1. First request, returning most recent 200 events: `GET + 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: @@ -317,6 +317,99 @@ paths: > 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. + - name: bot_info + in: query + schema: + $ref: '#/components/schemas/SearchEventsBotInfo' + 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. + - name: bot_info_category + in: query + style: form + schema: + type: array + items: + $ref: '#/components/schemas/BotInfoCategory' + description: > + 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. + - name: bot_info_identity + in: query + style: form + schema: + type: array + items: + $ref: '#/components/schemas/BotInfoIdentity' + description: > + 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. + - name: bot_info_confidence + in: query + style: form + schema: + type: array + items: + $ref: '#/components/schemas/BotInfoConfidence' + description: > + 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. + - name: bot_info_provider + in: query + style: form + schema: + type: array + items: + type: string + description: > + Filter events by their Bot Info Provider. The provider must match + exactly, partial or wildcard matching is not supported. + + + Multiple Providers can be provided using the repeated keys syntax. + For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will + match events with a Bot Info Provider of `OpenAI` or `AWS`. Other + notations like comma-separated or bracket notation are not + supported. + - name: bot_info_name + in: query + style: form + schema: + type: array + items: + type: string + description: > + Filter events by their Bot Info Name. The name must match exactly, + partial or wildcard matching is not supported. + + + Multiple Names can be provided using the repeated keys syntax. For + example, + `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, + will match events with a Bot Info Name of `ChatGPT Agent` or + `Bedrock AgentCore`. Other notations like comma-separated or bracket + notation are not supported. - name: ip_address in: query schema: @@ -379,32 +472,41 @@ paths: - name: start in: query schema: - type: integer - format: int64 - example: 1767225600000 + oneOf: + - type: integer + format: int64 + example: 1767225600000 + - type: string + format: date-time + 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). - Defaults to 7 days ago. Setting `start` does not change `end`'s - default of `now` — adjust it separately if needed. + 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. - name: end in: query schema: - type: integer - format: int64 - example: 1769903999000 + oneOf: + - type: integer + format: int64 + example: 1769903999000 + - type: string + format: date-time + 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). Defaults - to now. Setting `end` does not change `start`'s default of `7 days - ago` — adjust it separately if needed. + 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. - name: reverse in: query schema: type: boolean description: > When `true`, sort events oldest first (ascending timestamp order). - Default is newest first (descending timestamp order). + Defaults to `false` (newest first, descending timestamp order). - name: suspect in: query schema: @@ -613,18 +715,34 @@ paths: `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. + + + > 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/). - name: rare_device_percentile_bucket in: query schema: $ref: '#/components/schemas/SearchEventsRareDevicePercentileBucket' - description: | + description: > Filter events by Device Rarity percentile bucket. + ` 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/). - name: proxy in: query schema: @@ -758,59 +876,71 @@ paths: tags: - Fingerprint operationId: deleteVisitorData - summary: Delete data by visitor ID + summary: Delete a visitor ID description: > - Request deleting all data associated with the specified visitor ID. This - API is useful for compliance with privacy regulations. + Use this API to request the deletion of all data associated with a + specific visitor ID. + + + Upon a request to delete data for a visitor ID, + + - The data collected from the corresponding browser (or device) will be + deleted asynchronously, typically within a few minutes. This data will + no longer be available to identify this browser (or device). When the + same browser (or device) revisits, it will receive a new visitor ID. + + - The identification events made from this browser (or device) in the + past 10 days are typically deleted within 24 hrs. + + - The identification events made from this browser (or device) outside + of the 10 days will be purged as per your [data retention + period](https://docs.fingerprint.com/docs/regions#data-retention). + + The following timeline illustrates which events are deleted and which + remain after a DELETE API request: - ### Which data is deleted? + ``` - - Browser (or device) properties + Day 1: First visit from browser A. (Assigned visitor ID: VID1000) - - Identification requests made from this browser (or device) + Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) + Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) - #### Browser (or device) properties + Day 14: Delete VID1000 - - Represents the data that Fingerprint collected from this specific - browser (or device) and everything inferred and derived from it. + Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) - - Upon request to delete, this data is deleted asynchronously (typically - within a few minutes) and it will no longer be used to identify this - browser (or device) for your [Fingerprint - Workspace](https://docs.fingerprint.com/docs/glossary#fingerprint-workspace). + Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days + of deleting VID1000 and will have been deleted) + Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 + days of deleting VID1000 and is still available) - #### Identification requests made from this browser (or device) + ``` - - Fingerprint stores the identification requests made from a browser (or - device) for up to 30 (or 90) days depending on your plan. To learn more, - see [Data - Retention](https://docs.fingerprint.com/docs/regions#data-retention). - - Upon request to delete, the identification requests that were made by - this browser - - Within the past 10 days are deleted within 24 hrs. - - Outside of 10 days are allowed to purge as per your data retention period. + ### Availability + + This API is available only for Enterprise plans **upon request**. If you + are interested, please [contact our support + team](https://fingerprint.com/support/). - ### Corollary - After requesting to delete a visitor ID, + ### Rate limits and daily quota - - If the same browser (or device) requests to identify, it will receive - a different visitor ID. + The rate limits and daily quota for this API **differ** from those for + our other API. - - If you request [`/v4/events` - API](https://docs.fingerprint.com/reference/server-api-v4-get-event) - with an `event_id` that was made outside of the 10 days, you will still - receive a valid response. + The maximum number of DELETE requests that can be made in an hour cannot + exceed 30 RPH, and the maximum number that can be made in a day cannot + exceed 500 RPD. - ### Interested? - Please [contact our support team](https://fingerprint.com/support/) to - enable it for you. Otherwise, you will receive a 403. + You can request an increase to these limits by contacting [our support + team](https://fingerprint.com/support/). parameters: - name: visitor_id in: path @@ -875,10 +1005,13 @@ components: description: > Only included for requests using incremental identification. - - `partially_completed` - the event did not receive the second "update" - request. + - `partially_completed` - Indicates this event corresponds to a + 'minimal' request. Smart Signals, even if included in your plan, are not + computed; hence, their values must be ignored. - - `completed` - the event was updated and all information is available. + - `completed` - Indicates this event corresponds to a 'complete' + request. Smart Signals, if included in your plan, are computed; hence, + their values are valid and relevant. enum: - partially_completed - completed @@ -944,6 +1077,13 @@ components: otherwise. IdentificationConfidence: type: object + description: >- + The confidence score represents the probability of a false-positive + identification. To learn more, visit [Confidence + Score](https://docs.fingerprint.com/docs/identification-accuracy-and-confidence#confidence-score). + Please note that the confidence score is not yet supported for [High + Recall + ID](https://docs.fingerprint.com/docs/supplementary-identifiers-highrecall). required: - score properties: @@ -953,14 +1093,14 @@ components: minimum: 0 maximum: 1 description: >- - The confidence score is a floating-point number between 0 and 1 that - represents the probability of accurate identification. + A floating-point number between 0 and 1 that represents the + probability of a false-positive identification. For High Recall ID, + this value is 0. version: type: string description: >- - The version name of the method used to calculate the Confidence - score. This field is only present for customers who opted in to an - alternative calculation method. + The version name of the method used to calculate the confidence + score. For High Recall ID, this value is "Not Supported". comment: type: string Identification: @@ -1146,6 +1286,47 @@ components: type: string description: | Additional classification of the bot type if detected. + BotInfoCategory: + type: string + enum: + - advertising_and_marketing + - aggregator + - ai_agent + - ai_assistant + - ai_browser + - ai_crawler + - ai_search + - browser_automation + - ecommerce + - monitoring_and_analytics + - other + - scraping + - security + - search_engine_crawler + - search_engine_optimization + - unknown + description: | + The type and purpose of the bot. + BotInfoIdentity: + type: string + enum: + - verified + - signed + - spoofed + - unknown + description: | + The verification status of the bot's identity: + * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider. + * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider's customers. + * `spoofed` - bot that claims a public identity but fails verification. + * `unknown` - bot that does not publish a verifiable identity. + BotInfoConfidence: + type: string + enum: + - low + - medium + - high + description: Confidence level of the bot identification. BotInfo: type: object description: Extended bot information. @@ -1158,7 +1339,8 @@ components: properties: category: type: string - description: The type and purpose of the bot. + description: | + The type and purpose of the bot. provider: type: string description: The organization or company operating the bot. @@ -1178,7 +1360,7 @@ components: description: | The verification status of the bot's identity: * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider. - * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider’s customers. + * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider's customers. * `spoofed` - bot that claims a public identity but fails verification. * `unknown` - bot that does not publish a verifiable identity. confidence: @@ -1202,8 +1384,8 @@ components: DeveloperTools: type: boolean description: > - `true` if the browser is Chrome with DevTools open or Firefox with - Developer Tools open, `false` otherwise. + `true` if the browser has DevTools open (Chrome, Firefox) or the + Android/iOS device has Developer Tools enabled, `false` otherwise. Emulator: type: boolean description: > @@ -1402,7 +1584,9 @@ components: Machine learning–based proxy 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 - `proxy` detection result + `proxy` 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/). Incognito: type: boolean description: > @@ -1762,10 +1946,13 @@ components: minimum: 0 maximum: 1 description: > - Machine learning–based virtual machine score, represented as a + Machine learning–based virtual machine 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 `virtual_machine` detection result + the positive `virtual_machine` 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/). Vpn: type: boolean description: | @@ -2194,6 +2381,29 @@ components: $ref: '#/components/schemas/FontHash' timezone_offset: $ref: '#/components/schemas/TimezoneOffset' + Labels: + type: array + items: + type: object + required: + - label + properties: + label: + type: string + prediction: + type: boolean + ml_score: + type: number + format: double + minimum: 0 + maximum: 1 + description: > + Each label returns a prediction (true or false) for a specific use case + (label field) based on a machine learning score. The machine learning + score is determined by a model trained on customer data for that use + case. This field is in the beta phase and only available to select + customers. If you are interested, please [contact our support + team](https://fingerprint.com/support/). Event: type: object description: >- @@ -2324,6 +2534,8 @@ components: $ref: '#/components/schemas/DeveloperTools' x-platforms: - browser + - android + - ios emulator: $ref: '#/components/schemas/Emulator' x-platforms: @@ -2494,9 +2706,15 @@ components: raw_device_attributes: $ref: '#/components/schemas/RawDeviceAttributes' x-platforms: - - android + - browser - ios + - android + labels: + $ref: '#/components/schemas/Labels' + x-platforms: - browser + - ios + - android ErrorCode: type: string enum: @@ -2645,6 +2863,15 @@ components: > 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. + SearchEventsBotInfo: + type: string + enum: + - all + - none + 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. SearchEventsVpnConfidence: type: string enum: @@ -2672,14 +2899,25 @@ components: - p99.5-p99.9 - p99.9+ - not_seen - description: | + description: > Filter events by Device Rarity percentile bucket. + ` 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/). SearchEventsSdkPlatform: type: string enum: diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index a6ee5258..0cf54cf8 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -31,10 +31,14 @@ use Fingerprint\ServerSdk\ApiException; use Fingerprint\ServerSdk\Configuration; +use Fingerprint\ServerSdk\Model\BotInfoCategory; +use Fingerprint\ServerSdk\Model\BotInfoConfidence; +use Fingerprint\ServerSdk\Model\BotInfoIdentity; use Fingerprint\ServerSdk\Model\Event; use Fingerprint\ServerSdk\Model\EventSearch; use Fingerprint\ServerSdk\Model\EventUpdate; use Fingerprint\ServerSdk\Model\SearchEventsBot; +use Fingerprint\ServerSdk\Model\SearchEventsBotInfo; use Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus; use Fingerprint\ServerSdk\Model\SearchEventsRareDevicePercentileBucket; use Fingerprint\ServerSdk\Model\SearchEventsSdkPlatform; @@ -103,7 +107,7 @@ public function getConfig(): Configuration /** * Operation deleteVisitorData. * - * Delete data by visitor ID + * Delete a visitor ID * * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) * @@ -122,7 +126,7 @@ public function deleteVisitorData(string $visitor_id): void /** * Operation deleteVisitorDataWithHttpInfo. * - * Delete data by visitor ID + * Delete a visitor ID * * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) * @@ -183,7 +187,7 @@ public function deleteVisitorDataWithHttpInfo(string $visitor_id): array /** * Operation deleteVisitorDataAsync. * - * Delete data by visitor ID + * Delete a visitor ID * * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) * @@ -206,7 +210,7 @@ function ($response) { /** * Operation deleteVisitorDataAsyncWithHttpInfo. * - * Delete data by visitor ID + * Delete a visitor ID * * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) * @@ -487,10 +491,16 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * Search events * * @param int $limit Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. (optional, default to 10) - * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) + * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) * @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 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) + * @param string[]|null $bot_info_provider Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. (optional) + * @param string[]|null $bot_info_name Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param string|null $ip_address Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 (optional) * @param string|null $asn Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. (optional) * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) @@ -498,9 +508,9 @@ 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|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) - * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). (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 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) @@ -519,8 +529,8 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @param bool|null $developer_tools Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. (optional) * @param bool|null $location_spoofing Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. (optional) * @param bool|null $mitm_attack Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. (optional) - * @param bool|null $rare_device Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. (optional) - * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > 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) + * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` 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) * @param bool|null $proxy Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. (optional) * @param string|null $sdk_version Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` (optional) * @param SearchEventsSdkPlatform|null $sdk_platform Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. (optional) @@ -538,9 +548,9 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @throws GuzzleException * @throws \DateMalformedStringException */ - public function searchEvents(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, ?int $start = null, ?int $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): EventSearch + public function searchEvents(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?SearchEventsBotInfo $bot_info = null, ?array $bot_info_category = null, ?array $bot_info_identity = null, ?array $bot_info_confidence = null, ?array $bot_info_provider = null, ?array $bot_info_name = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, \DateTime|int|null $start = null, \DateTime|int|null $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): EventSearch { - list($response) = $this->searchEventsWithHttpInfo($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $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); + list($response) = $this->searchEventsWithHttpInfo($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); return $response; } @@ -551,10 +561,16 @@ public function searchEvents(int $limit = 10, ?string $pagination_key = null, ?s * Search events * * @param int $limit Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. (optional, default to 10) - * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) + * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) * @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 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) + * @param string[]|null $bot_info_provider Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. (optional) + * @param string[]|null $bot_info_name Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param string|null $ip_address Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 (optional) * @param string|null $asn Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. (optional) * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) @@ -562,9 +578,9 @@ public function searchEvents(int $limit = 10, ?string $pagination_key = null, ?s * @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|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) - * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). (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 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) @@ -583,8 +599,8 @@ public function searchEvents(int $limit = 10, ?string $pagination_key = null, ?s * @param bool|null $developer_tools Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. (optional) * @param bool|null $location_spoofing Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. (optional) * @param bool|null $mitm_attack Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. (optional) - * @param bool|null $rare_device Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. (optional) - * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > 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) + * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` 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) * @param bool|null $proxy Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. (optional) * @param string|null $sdk_version Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` (optional) * @param SearchEventsSdkPlatform|null $sdk_platform Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. (optional) @@ -604,9 +620,9 @@ public function searchEvents(int $limit = 10, ?string $pagination_key = null, ?s * @throws GuzzleException * @throws \DateMalformedStringException */ - public function searchEventsWithHttpInfo(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, ?int $start = null, ?int $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): array + public function searchEventsWithHttpInfo(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?SearchEventsBotInfo $bot_info = null, ?array $bot_info_category = null, ?array $bot_info_identity = null, ?array $bot_info_confidence = null, ?array $bot_info_provider = null, ?array $bot_info_name = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, \DateTime|int|null $start = null, \DateTime|int|null $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): array { - $request = $this->searchEventsRequest($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $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); + $request = $this->searchEventsRequest($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); try { $options = $this->createHttpClientOption(); @@ -659,10 +675,16 @@ public function searchEventsWithHttpInfo(int $limit = 10, ?string $pagination_ke * Search events * * @param int $limit Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. (optional, default to 10) - * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) + * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) * @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 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) + * @param string[]|null $bot_info_provider Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. (optional) + * @param string[]|null $bot_info_name Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param string|null $ip_address Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 (optional) * @param string|null $asn Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. (optional) * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) @@ -670,9 +692,9 @@ public function searchEventsWithHttpInfo(int $limit = 10, ?string $pagination_ke * @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|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) - * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). (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 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) @@ -691,8 +713,8 @@ public function searchEventsWithHttpInfo(int $limit = 10, ?string $pagination_ke * @param bool|null $developer_tools Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. (optional) * @param bool|null $location_spoofing Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. (optional) * @param bool|null $mitm_attack Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. (optional) - * @param bool|null $rare_device Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. (optional) - * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > 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) + * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` 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) * @param bool|null $proxy Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. (optional) * @param string|null $sdk_version Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` (optional) * @param SearchEventsSdkPlatform|null $sdk_platform Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. (optional) @@ -709,9 +731,9 @@ public function searchEventsWithHttpInfo(int $limit = 10, ?string $pagination_ke * * @throws \InvalidArgumentException */ - public function searchEventsAsync(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, ?int $start = null, ?int $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): PromiseInterface + public function searchEventsAsync(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?SearchEventsBotInfo $bot_info = null, ?array $bot_info_category = null, ?array $bot_info_identity = null, ?array $bot_info_confidence = null, ?array $bot_info_provider = null, ?array $bot_info_name = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, \DateTime|int|null $start = null, \DateTime|int|null $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): PromiseInterface { - return $this->searchEventsAsyncWithHttpInfo($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $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) + return $this->searchEventsAsyncWithHttpInfo($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) ->then( function ($response) { return $response[0]; @@ -725,10 +747,16 @@ function ($response) { * Search events * * @param int $limit Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. (optional, default to 10) - * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) + * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) * @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 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) + * @param string[]|null $bot_info_provider Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. (optional) + * @param string[]|null $bot_info_name Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param string|null $ip_address Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 (optional) * @param string|null $asn Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. (optional) * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) @@ -736,9 +764,9 @@ 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|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) - * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). (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 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) @@ -757,8 +785,8 @@ function ($response) { * @param bool|null $developer_tools Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. (optional) * @param bool|null $location_spoofing Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. (optional) * @param bool|null $mitm_attack Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. (optional) - * @param bool|null $rare_device Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. (optional) - * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > 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) + * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` 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) * @param bool|null $proxy Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. (optional) * @param string|null $sdk_version Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` (optional) * @param SearchEventsSdkPlatform|null $sdk_platform Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. (optional) @@ -775,9 +803,9 @@ function ($response) { * * @throws \InvalidArgumentException */ - public function searchEventsAsyncWithHttpInfo(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, ?int $start = null, ?int $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): PromiseInterface + public function searchEventsAsyncWithHttpInfo(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?SearchEventsBotInfo $bot_info = null, ?array $bot_info_category = null, ?array $bot_info_identity = null, ?array $bot_info_confidence = null, ?array $bot_info_provider = null, ?array $bot_info_name = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, \DateTime|int|null $start = null, \DateTime|int|null $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): PromiseInterface { - $request = $this->searchEventsRequest($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $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); + $request = $this->searchEventsRequest($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); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -801,10 +829,16 @@ function ($e) { * Create request for operation 'searchEvents'. * * @param int $limit Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. (optional, default to 10) - * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) + * @param string|null $pagination_key Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` (optional) * @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 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) + * @param string[]|null $bot_info_provider Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. (optional) + * @param string[]|null $bot_info_name Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. (optional) * @param string|null $ip_address Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 (optional) * @param string|null $asn Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. (optional) * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) @@ -812,9 +846,9 @@ 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|null $start Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. (optional) - * @param int|null $end Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. (optional) - * @param bool|null $reverse When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). (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 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) @@ -833,8 +867,8 @@ function ($e) { * @param bool|null $developer_tools Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. (optional) * @param bool|null $location_spoofing Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. (optional) * @param bool|null $mitm_attack Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. (optional) - * @param bool|null $rare_device Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. (optional) - * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > 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) + * @param SearchEventsRareDevicePercentileBucket|null $rare_device_percentile_bucket Filter events by Device Rarity percentile bucket. ` 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) * @param bool|null $proxy Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. (optional) * @param string|null $sdk_version Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` (optional) * @param SearchEventsSdkPlatform|null $sdk_platform Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. (optional) @@ -851,7 +885,7 @@ function ($e) { * * @throws \InvalidArgumentException */ - public function searchEventsRequest(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, ?int $start = null, ?int $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): Request + public function searchEventsRequest(int $limit = 10, ?string $pagination_key = null, ?string $visitor_id = null, ?string $high_recall_id = null, ?SearchEventsBot $bot = null, ?SearchEventsBotInfo $bot_info = null, ?array $bot_info_category = null, ?array $bot_info_identity = null, ?array $bot_info_confidence = null, ?array $bot_info_provider = null, ?array $bot_info_name = null, ?string $ip_address = null, ?string $asn = null, ?string $linked_id = null, ?string $url = null, ?string $bundle_id = null, ?string $package_name = null, ?string $origin = null, \DateTime|int|null $start = null, \DateTime|int|null $end = null, ?bool $reverse = null, ?bool $suspect = null, ?bool $vpn = null, ?bool $virtual_machine = null, ?bool $tampering = null, ?bool $anti_detect_browser = null, ?bool $incognito = null, ?bool $privacy_settings = null, ?bool $jailbroken = null, ?bool $frida = null, ?bool $factory_reset = null, ?bool $cloned_app = null, ?bool $emulator = null, ?bool $root_apps = null, ?SearchEventsVpnConfidence $vpn_confidence = null, ?float $min_suspect_score = null, ?bool $developer_tools = null, ?bool $location_spoofing = null, ?bool $mitm_attack = null, ?bool $rare_device = null, ?SearchEventsRareDevicePercentileBucket $rare_device_percentile_bucket = null, ?bool $proxy = null, ?string $sdk_version = null, ?SearchEventsSdkPlatform $sdk_platform = null, ?array $environment = null, ?string $proximity_id = null, ?int $total_hits = null, ?bool $tor_node = null, ?SearchEventsIncrementalIdentificationStatus $incremental_identification_status = null, ?bool $simulator = null): Request { if (null !== $limit && $limit > 100) { throw new \InvalidArgumentException('invalid value for "$limit" when calling FingerprintApi.searchEvents, must be smaller than or equal to 100.'); @@ -919,6 +953,60 @@ public function searchEventsRequest(int $limit = 10, ?string $pagination_key = n false ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bot_info, + 'bot_info', + 'SearchEventsBotInfo', + 'form', + true, + false + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bot_info_category, + 'bot_info_category', + 'array', + 'form', + true, + false + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bot_info_identity, + 'bot_info_identity', + 'array', + 'form', + true, + false + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bot_info_confidence, + 'bot_info_confidence', + 'array', + 'form', + true, + false + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bot_info_provider, + 'bot_info_provider', + 'array', + 'form', + true, + false + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bot_info_name, + 'bot_info_name', + 'array', + 'form', + true, + false + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $ip_address, 'ip_address', @@ -985,7 +1073,7 @@ public function searchEventsRequest(int $limit = 10, ?string $pagination_key = n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $start, 'start', - 'integer', + 'int|\DateTime', 'form', true, false @@ -994,7 +1082,7 @@ public function searchEventsRequest(int $limit = 10, ?string $pagination_key = n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $end, 'end', - 'integer', + 'int|\DateTime', 'form', true, false diff --git a/src/Model/BotInfo.php b/src/Model/BotInfo.php index 9625332f..3c672157 100644 --- a/src/Model/BotInfo.php +++ b/src/Model/BotInfo.php @@ -453,7 +453,7 @@ public function getIdentity(): ?string /** * Sets identity. * - * @param string $identity The verification status of the bot's identity: * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider. * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider’s customers. * `spoofed` - bot that claims a public identity but fails verification. * `unknown` - bot that does not publish a verifiable identity. + * @param string $identity The verification status of the bot's identity: * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider. * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider's customers. * `spoofed` - bot that claims a public identity but fails verification. * `unknown` - bot that does not publish a verifiable identity. * */ public function setIdentity(string $identity): self diff --git a/src/Model/BotInfoCategory.php b/src/Model/BotInfoCategory.php new file mode 100644 index 00000000..7493cc22 --- /dev/null +++ b/src/Model/BotInfoCategory.php @@ -0,0 +1,64 @@ + 'bool', 'rare_device_percentile_bucket' => '\Fingerprint\ServerSdk\Model\RareDevicePercentileBucket', 'raw_device_attributes' => '\Fingerprint\ServerSdk\Model\RawDeviceAttributes', + 'labels' => '\Fingerprint\ServerSdk\Model\LabelsInner[]', ]; /** @@ -191,6 +192,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'rare_device' => null, 'rare_device_percentile_bucket' => null, 'raw_device_attributes' => null, + 'labels' => null, ]; /** @@ -257,6 +259,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'rare_device' => false, 'rare_device_percentile_bucket' => false, 'raw_device_attributes' => false, + 'labels' => false, ]; /** @@ -331,6 +334,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'rare_device' => 'rare_device', 'rare_device_percentile_bucket' => 'rare_device_percentile_bucket', 'raw_device_attributes' => 'raw_device_attributes', + 'labels' => 'labels', ]; /** @@ -397,6 +401,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'rare_device' => 'setRareDevice', 'rare_device_percentile_bucket' => 'setRareDevicePercentileBucket', 'raw_device_attributes' => 'setRawDeviceAttributes', + 'labels' => 'setLabels', ]; /** @@ -463,6 +468,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'rare_device' => 'getRareDevice', 'rare_device_percentile_bucket' => 'getRareDevicePercentileBucket', 'raw_device_attributes' => 'getRawDeviceAttributes', + 'labels' => 'getLabels', ]; /** @@ -538,6 +544,7 @@ public function __construct(?array $data = null) $this->setIfExists('rare_device', $data ?? [], null); $this->setIfExists('rare_device_percentile_bucket', $data ?? [], null); $this->setIfExists('raw_device_attributes', $data ?? [], null); + $this->setIfExists('labels', $data ?? [], null); } /** @@ -1196,7 +1203,7 @@ public function getDeveloperTools(): ?bool /** * Sets developer_tools. * - * @param bool $developer_tools `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise + * @param bool $developer_tools `true` if the browser has DevTools open (Chrome, Firefox) or the Android/iOS device has Developer Tools enabled, `false` otherwise * */ public function setDeveloperTools(bool $developer_tools): self @@ -1394,7 +1401,7 @@ public function getProxyMlScore(): ?float /** * Sets proxy_ml_score. * - * @param float $proxy_ml_score Machine learning–based proxy 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 `proxy` detection result + * @param float $proxy_ml_score Machine learning–based proxy 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 `proxy` 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/). * */ public function setProxyMlScore(float $proxy_ml_score): self @@ -1760,7 +1767,7 @@ public function getVirtualMachineMlScore(): ?float /** * Sets virtual_machine_ml_score. * - * @param float $virtual_machine_ml_score Machine learning–based virtual machine 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 `virtual_machine` detection result + * @param float $virtual_machine_ml_score Machine learning–based virtual machine 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 `virtual_machine` 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/). * */ public function setVirtualMachineMlScore(float $virtual_machine_ml_score): self @@ -1975,6 +1982,29 @@ public function setRawDeviceAttributes(RawDeviceAttributes $raw_device_attribute return $this; } + /** + * Gets labels. + * + * @return LabelsInner[]|null + */ + public function getLabels(): ?array + { + return $this->container['labels']; + } + + /** + * Sets labels. + * + * @param LabelsInner[] $labels Each label returns a prediction (true or false) for a specific use case (label field) based on a machine learning score. The machine learning score is determined by a model trained on customer data for that use case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). + * + */ + public function setLabels(array $labels): self + { + $this->container['labels'] = $labels; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/IdentificationConfidence.php b/src/Model/IdentificationConfidence.php index 5142a353..41f14a58 100644 --- a/src/Model/IdentificationConfidence.php +++ b/src/Model/IdentificationConfidence.php @@ -32,10 +32,12 @@ use Fingerprint\ServerSdk\ObjectSerializer; /** - * IdentificationConfidence Class. + * The confidence score represents the probability of a false-positive identification. To learn more, visit [Confidence Score](https://docs.fingerprint.com/docs/identification-accuracy-and-confidence#confidence-score). Please note that the confidence score is not yet supported for [High Recall ID](https://docs.fingerprint.com/docs/supplementary-identifiers-highrecall). * * @category Class * + * @description The confidence score represents the probability of a false-positive identification. To learn more, visit [Confidence Score](https://docs.fingerprint.com/docs/identification-accuracy-and-confidence#confidence-score). Please note that the confidence score is not yet supported for [High Recall ID](https://docs.fingerprint.com/docs/supplementary-identifiers-highrecall). + * * @author Fingerprint * * @see https://fingerprint.com @@ -283,7 +285,7 @@ public function getScore(): ?float /** * Sets score. * - * @param float $score the confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification + * @param float $score A floating-point number between 0 and 1 that represents the probability of a false-positive identification. For High Recall ID, this value is 0. * */ public function setScore(float $score): self @@ -312,7 +314,7 @@ public function getVersion(): ?string /** * Sets version. * - * @param string $version The version name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. + * @param string $version The version name of the method used to calculate the confidence score. For High Recall ID, this value is \"Not Supported\". * */ public function setVersion(string $version): self diff --git a/src/Model/IncrementalIdentificationStatus.php b/src/Model/IncrementalIdentificationStatus.php index 9993db05..bccdaf58 100644 --- a/src/Model/IncrementalIdentificationStatus.php +++ b/src/Model/IncrementalIdentificationStatus.php @@ -31,12 +31,12 @@ /** * Only included for requests using incremental identification. - * - `partially_completed` - the event did not receive the second "update" request. - * - `completed` - the event was updated and all information is available. + * - `partially_completed` - Indicates this event corresponds to a 'minimal' request. Smart Signals, even if included in your plan, are not computed; hence, their values must be ignored. + * - `completed` - Indicates this event corresponds to a 'complete' request. Smart Signals, if included in your plan, are computed; hence, their values are valid and relevant. * * @category Enum * - * @description Only included for requests using incremental identification. - `partially_completed` - the event did not receive the second \"update\" request. - `completed` - the event was updated and all information is available. + * @description Only included for requests using incremental identification. - `partially_completed` - Indicates this event corresponds to a 'minimal' request. Smart Signals, even if included in your plan, are not computed; hence, their values must be ignored. - `completed` - Indicates this event corresponds to a 'complete' request. Smart Signals, if included in your plan, are computed; hence, their values are valid and relevant. * * @author Fingerprint * diff --git a/src/Model/LabelsInner.php b/src/Model/LabelsInner.php new file mode 100644 index 00000000..5d6dbf53 --- /dev/null +++ b/src/Model/LabelsInner.php @@ -0,0 +1,466 @@ + + * + * @noinspection GrazieInspection + * @noinspection RedundantSuppression + */ +class LabelsInner implements ModelInterface, \ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + */ + protected static string $openAPIModelName = 'Labels_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $openAPITypes = [ + 'label' => 'string', + 'prediction' => 'bool', + 'ml_score' => 'float', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ + protected static array $openAPIFormats = [ + 'label' => null, + 'prediction' => null, + 'ml_score' => 'double', + ]; + + /** + * Array of nullable properties. Used for (de)serialization. + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'label' => false, + 'prediction' => false, + 'ml_score' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here. + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'label' => 'label', + 'prediction' => 'prediction', + 'ml_score' => 'ml_score', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'label' => 'setLabel', + 'prediction' => 'setPrediction', + 'ml_score' => 'setMlScore', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'label' => 'getLabel', + 'prediction' => 'getPrediction', + 'ml_score' => 'getMlScore', + ]; + + /** + * Associative array for storing property values. + */ + protected array $container = []; + + /** + * Constructor. + * + * @param array|null $data Associated array of property values + * initializing the model + * + * @noinspection DuplicatedCode + */ + public function __construct(?array $data = null) + { + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('prediction', $data ?? [], null); + $this->setIfExists('ml_score', $data ?? [], null); + } + + /** + * Gets the string presentation of the object. + * + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Checks if a property is nullable. + * + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['label']) { + $invalidProperties[] = "'label' can't be null"; + } + if (!is_null($this->container['ml_score']) && ($this->container['ml_score'] > 1)) { + $invalidProperties[] = "invalid value for 'ml_score', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['ml_score']) && ($this->container['ml_score'] < 0)) { + $invalidProperties[] = "invalid value for 'ml_score', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets label. + * + */ + public function getLabel(): ?string + { + return $this->container['label']; + } + + /** + * Sets label. + * + * @param string $label label + * + */ + public function setLabel(string $label): self + { + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets prediction. + * + */ + public function getPrediction(): ?bool + { + return $this->container['prediction']; + } + + /** + * Sets prediction. + * + * @param bool $prediction prediction + * + */ + public function setPrediction(bool $prediction): self + { + $this->container['prediction'] = $prediction; + + return $this; + } + + /** + * Gets ml_score. + * + */ + public function getMlScore(): ?float + { + return $this->container['ml_score']; + } + + /** + * Sets ml_score. + * + * @param float $ml_score ml_score + * + */ + public function setMlScore(float $ml_score): self + { + if ($ml_score > 1) { + throw new \InvalidArgumentException('invalid value for $ml_score when calling LabelsInner., must be smaller than or equal to 1.'); + } + if ($ml_score < 0) { + throw new \InvalidArgumentException('invalid value for $ml_score when calling LabelsInner., must be bigger than or equal to 0.'); + } + + $this->container['ml_score'] = $ml_score; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[\ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets a header-safe presentation of the object. + * + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of nullable properties. + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null. + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null. + * + * @param bool[] $openAPINullablesSetToNull + * + * @codeCoverageIgnore + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array. + * + * @noinspection PhpSameParameterValueInspection + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; // @codeCoverageIgnore + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } +} diff --git a/src/Model/SearchEventsBotInfo.php b/src/Model/SearchEventsBotInfo.php new file mode 100644 index 00000000..80238a0e --- /dev/null +++ b/src/Model/SearchEventsBotInfo.php @@ -0,0 +1,52 @@ + + * + * @noinspection GrazieInspection + * @noinspection RedundantSuppression + */ +class SearchEventsEndParameter implements ModelInterface, \ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + */ + protected static string $openAPIModelName = 'searchEvents_end_parameter'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $openAPITypes = []; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ + protected static array $openAPIFormats = []; + + /** + * Array of nullable properties. Used for (de)serialization. + * + * @var bool[] + */ + protected static array $openAPINullables = []; + + /** + * If a nullable field gets set to null, insert it here. + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = []; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = []; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = []; + + /** + * Associative array for storing property values. + */ + protected array $container = []; + + /** + * Constructor. + * + * @param array|null $data Associated array of property values + * initializing the model + * + * @noinspection DuplicatedCode + */ + public function __construct(?array $data = null) {} + + /** + * Gets the string presentation of the object. + * + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Checks if a property is nullable. + * + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[\ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets a header-safe presentation of the object. + * + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of nullable properties. + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null. + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null. + * + * @param bool[] $openAPINullablesSetToNull + * + * @codeCoverageIgnore + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array. + * + * @noinspection PhpSameParameterValueInspection + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; // @codeCoverageIgnore + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } +} diff --git a/src/Model/SearchEventsRareDevicePercentileBucket.php b/src/Model/SearchEventsRareDevicePercentileBucket.php index ac101c76..2153e04e 100644 --- a/src/Model/SearchEventsRareDevicePercentileBucket.php +++ b/src/Model/SearchEventsRareDevicePercentileBucket.php @@ -38,9 +38,11 @@ * `p99.9+` - device is in the top 0.1% (rarest). * `not_seen` - device configuration has never been observed before. * + * > 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/). + * * @category Enum * - * @description Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. + * @description Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. > 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/). * * @author Fingerprint * diff --git a/src/Model/SearchEventsStartParameter.php b/src/Model/SearchEventsStartParameter.php new file mode 100644 index 00000000..748c253e --- /dev/null +++ b/src/Model/SearchEventsStartParameter.php @@ -0,0 +1,351 @@ + + * + * @noinspection GrazieInspection + * @noinspection RedundantSuppression + */ +class SearchEventsStartParameter implements ModelInterface, \ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + */ + protected static string $openAPIModelName = 'searchEvents_start_parameter'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $openAPITypes = []; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ + protected static array $openAPIFormats = []; + + /** + * Array of nullable properties. Used for (de)serialization. + * + * @var bool[] + */ + protected static array $openAPINullables = []; + + /** + * If a nullable field gets set to null, insert it here. + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = []; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = []; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = []; + + /** + * Associative array for storing property values. + */ + protected array $container = []; + + /** + * Constructor. + * + * @param array|null $data Associated array of property values + * initializing the model + * + * @noinspection DuplicatedCode + */ + public function __construct(?array $data = null) {} + + /** + * Gets the string presentation of the object. + * + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Checks if a property is nullable. + * + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[\ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets a header-safe presentation of the object. + * + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of nullable properties. + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null. + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null. + * + * @param bool[] $openAPINullablesSetToNull + * + * @codeCoverageIgnore + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array. + * + * @noinspection PhpSameParameterValueInspection + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; // @codeCoverageIgnore + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } +} diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 701dcfa4..0ea5f651 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -513,6 +513,9 @@ public static function buildQuery(array $params, bool|int $encoding = PHP_QUERY_ if (!is_array($v)) { $qs .= $k; $v = is_bool($v) ? $castBool($v) : $v; + if ($v instanceof \BackedEnum) { + $v = $v->value; + } if (null !== $v) { $qs .= '='.$encoder((string) $v); } @@ -521,6 +524,9 @@ public static function buildQuery(array $params, bool|int $encoding = PHP_QUERY_ foreach ($v as $vv) { $qs .= $k; $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv instanceof \BackedEnum) { + $vv = $vv->value; + } if (null !== $vv) { $qs .= '='.$encoder((string) $vv); } diff --git a/template/ObjectSerializer.mustache b/template/ObjectSerializer.mustache index ec8b362c..745a7caa 100644 --- a/template/ObjectSerializer.mustache +++ b/template/ObjectSerializer.mustache @@ -523,6 +523,9 @@ class ObjectSerializer if (!is_array($v)) { $qs .= $k; $v = is_bool($v) ? $castBool($v) : $v; + if ($v instanceof \BackedEnum) { + $v = $v->value; + } if ($v !== null) { $qs .= '='.$encoder((string) $v); } @@ -531,6 +534,9 @@ class ObjectSerializer foreach ($v as $vv) { $qs .= $k; $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv instanceof \BackedEnum) { + $vv = $vv->value; + } if ($vv !== null) { $qs .= '='.$encoder((string) $vv); } diff --git a/test/Api/FingerprintApiTest.php b/test/Api/FingerprintApiTest.php index 07c75112..cf565d3d 100644 --- a/test/Api/FingerprintApiTest.php +++ b/test/Api/FingerprintApiTest.php @@ -5,6 +5,7 @@ use Fingerprint\ServerSdk\Api\FingerprintApi; use Fingerprint\ServerSdk\ApiException; use Fingerprint\ServerSdk\Configuration; +use Fingerprint\ServerSdk\Model\BotInfoConfidence; use Fingerprint\ServerSdk\Model\BotResult; use Fingerprint\ServerSdk\Model\ErrorCode; use Fingerprint\ServerSdk\Model\ErrorResponse; @@ -17,6 +18,7 @@ use Fingerprint\ServerSdk\Model\RuleActionType; use Fingerprint\ServerSdk\Model\SDK; use Fingerprint\ServerSdk\Model\SearchEventsBot; +use Fingerprint\ServerSdk\Model\SearchEventsBotInfo; use Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus; use Fingerprint\ServerSdk\Model\SearchEventsSdkPlatform; use Fingerprint\ServerSdk\Model\SearchEventsVpnConfidence; @@ -658,12 +660,19 @@ public function testSearchEventsWithPartialParams() */ public function testSearchEventsWithAllParams() { + $startDate = new \DateTime('2020-01-01 00:00:00'); + $endDate = new \DateTime('2020-01-02 00:00:00'); + $expected = [ 'limit' => 15, 'pagination_key' => 'pagination', 'visitor_id' => MockHelper::MOCK_VISITOR_ID, 'high_recall_id' => 'high_recall_id', 'bot' => [SearchEventsBot::GOOD, 'good'], + 'bot_info' => [SearchEventsBotInfo::ALL, 'all'], + 'bot_info_confidence' => [[BotInfoConfidence::HIGH, BotInfoConfidence::MEDIUM], ['high', 'medium']], + 'bot_info_provider' => [['google', 'openai'], ['google', 'openai']], + 'bot_info_name' => [['gemini', 'chatgpt'], ['gemini', 'chatgpt']], 'ip_address' => '127.0.0.1/16', 'asn' => 'asn', 'linked_id' => 'linked_id', @@ -671,8 +680,8 @@ public function testSearchEventsWithAllParams() 'bundle_id' => 'bundle_id', 'package_name' => 'package_name', 'origin' => 'origin', - 'start' => (new \DateTime('2020-01-01 00:00:00'))->getTimestamp(), - 'end' => (new \DateTime('2020-01-02 00:00:00'))->getTimestamp(), + 'start' => [$startDate, $startDate->format(\DateTimeInterface::RFC3339)], + 'end' => $endDate->getTimestamp(), 'reverse' => true, 'suspect' => true, 'vpn' => true, @@ -730,6 +739,10 @@ public function testSearchEventsWithAllParams() visitor_id: $expected['visitor_id'], high_recall_id: $expected['high_recall_id'], bot: $expected['bot'][0], + bot_info: $expected['bot_info'][0], + bot_info_confidence: $expected['bot_info_confidence'][0], + bot_info_provider: $expected['bot_info_provider'][0], + bot_info_name: $expected['bot_info_name'][0], ip_address: $expected['ip_address'], asn: $expected['asn'], linked_id: $expected['linked_id'], @@ -737,7 +750,7 @@ public function testSearchEventsWithAllParams() bundle_id: $expected['bundle_id'], package_name: $expected['package_name'], origin: $expected['origin'], - start: $expected['start'], + start: $expected['start'][0], end: $expected['end'], reverse: $expected['reverse'], suspect: $expected['suspect'], @@ -1316,5 +1329,15 @@ private function assertEvent(Event $event, \stdClass $actual): void $this->assertEquals('db3c1462576a399a03ae93d0ab9eb5c4', $rawDeviceAttributes->getCanvas()->getGeometry()); $this->assertEquals('24', $rawDeviceAttributes->getColorDepth()); $this->assertTrue($rawDeviceAttributes->getCookiesEnabled()); + + $labels = $event->getLabels(); + $actualLabels = $actual->labels; + $totalLabel = count($labels); + $this->assertCount($totalLabel, $labels); + for ($i = 0; $i < $totalLabel; ++$i) { + $this->assertEquals($actualLabels[$i]->label, $labels[$i]->getLabel()); + $this->assertEquals($actualLabels[$i]->prediction, $labels[$i]->getPrediction()); + $this->assertEquals($actualLabels[$i]->ml_score, $labels[$i]->getMlScore()); + } } } diff --git a/test/Model/BotInfoCategoryTest.php b/test/Model/BotInfoCategoryTest.php new file mode 100644 index 00000000..c9531625 --- /dev/null +++ b/test/Model/BotInfoCategoryTest.php @@ -0,0 +1,81 @@ +assertSame('q=a b+c', ObjectSerializer::buildQuery($params, false)); } + /** + * buildQuery should extract the value from a BackedEnum scalar parameter. + */ + public function testBuildQueryBackedEnumScalar(): void + { + $params = ['confidence' => BotInfoConfidence::HIGH]; + + $this->assertSame('confidence=high', ObjectSerializer::buildQuery($params)); + } + + /** + * buildQuery should extract the value from BackedEnum items inside an array parameter. + */ + public function testBuildQueryBackedEnumArray(): void + { + $params = ['confidence' => [BotInfoConfidence::HIGH, BotInfoConfidence::MEDIUM]]; + + $this->assertSame('confidence=high&confidence=medium', ObjectSerializer::buildQuery($params)); + } + /** * buildQuery should throw InvalidArgumentException for an invalid encoding type. */ diff --git a/test/mocks/events/get_event_200.json b/test/mocks/events/get_event_200.json index f7b20849..ee1978a2 100644 --- a/test/mocks/events/get_event_200.json +++ b/test/mocks/events/get_event_200.json @@ -27,14 +27,14 @@ "last_seen_at": 1708102555327 }, "supplementary_id_high_recall": { - "visitor_id": "3HNey93AkBW6CRbxV6xP", + "visitor_id": "0jnGMkPYXX37DqVa4ZIO3f_hr", "visitor_found": true, "confidence": { - "score": 0.97, - "version": "1.1" + "score": 0, + "version": "Not Supported" }, - "first_seen_at": 1708102555327, - "last_seen_at": 1708102555327 + "first_seen_at": 1778086556130, + "last_seen_at": 1778604975494 }, "proximity": { "id": "w1aTfd4MCvl", @@ -286,5 +286,12 @@ "audio": 124.04347745512496 }, "rare_device": false, - "rare_device_percentile_bucket": "