diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d117e72db..d500a178a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -8,11 +8,14 @@ docs/Model/BotInfoIdentity.md docs/Model/BotResult.md docs/Model/BrowserDetails.md docs/Model/Canvas.md +docs/Model/EdgeRequest.md +docs/Model/EdgeRequestHeadersInner.md docs/Model/Emoji.md docs/Model/Error.md docs/Model/ErrorCode.md docs/Model/ErrorResponse.md docs/Model/Event.md +docs/Model/EventEdge.md docs/Model/EventRuleAction.md docs/Model/EventRuleActionAllow.md docs/Model/EventRuleActionBlock.md @@ -74,11 +77,14 @@ src/Model/BotInfoIdentity.php src/Model/BotResult.php src/Model/BrowserDetails.php src/Model/Canvas.php +src/Model/EdgeRequest.php +src/Model/EdgeRequestHeadersInner.php src/Model/Emoji.php src/Model/Error.php src/Model/ErrorCode.php src/Model/ErrorResponse.php src/Model/Event.php +src/Model/EventEdge.php src/Model/EventRuleAction.php src/Model/EventRuleActionAllow.php src/Model/EventRuleActionBlock.php diff --git a/README.md b/README.md index 5f51185d8..1d86cbe7f 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,7 @@ if(!$isValidWebhookSign) { Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*FingerprintApi* | [**analyzeRequestForAutomationIntelligence**](docs/Api/FingerprintApi.md#analyzerequestforautomationintelligence) | **POST** /edge | Collect Automation Intelligence. *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 @@ -254,11 +255,14 @@ Class | Method | HTTP request | Description - [BotResult](docs/Model/BotResult.md) - [BrowserDetails](docs/Model/BrowserDetails.md) - [Canvas](docs/Model/Canvas.md) + - [EdgeRequest](docs/Model/EdgeRequest.md) + - [EdgeRequestHeadersInner](docs/Model/EdgeRequestHeadersInner.md) - [Emoji](docs/Model/Emoji.md) - [Error](docs/Model/Error.md) - [ErrorCode](docs/Model/ErrorCode.md) - [ErrorResponse](docs/Model/ErrorResponse.md) - [Event](docs/Model/Event.md) + - [EventEdge](docs/Model/EventEdge.md) - [EventRuleAction](docs/Model/EventRuleAction.md) - [EventRuleActionAllow](docs/Model/EventRuleActionAllow.md) - [EventRuleActionBlock](docs/Model/EventRuleActionBlock.md) diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index d53244a9d..71a31d1d3 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -6,12 +6,94 @@ All URIs are relative to *https://api.fpjs.io/v4* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**analyzeRequestForAutomationIntelligence()**](FingerprintApi.md#analyzeRequestForAutomationIntelligence) | **POST** /edge | Collect Automation Intelligence. | | [**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 | +# **analyzeRequestForAutomationIntelligence** +> \Fingerprint\ServerSdk\Model\EventEdge analyzeRequestForAutomationIntelligence($edge_request) + +Collect Automation Intelligence. + +The Automation Intelligence API gives you the tools to determine whether traffic is legitimate and should be accepted by your application. + +This feature is currently in a Public Preview testing phase. All feedback is welcome! If you encounter any issues, please [contact our support team](https://fingerprint.com/support/). + +The API detects automation tools like AI Agents, AI Assistants, AI Browsers, and other bots. Additionally, it provides IP intelligence like geolocation, residential proxy, VPN and data center detection. + +Automation Intelligence is derived from HTTP request metadata that reaches your server. It does not require the use of a JavaScript client-side agent or mobile SDKs to collect device context. + +The API is fast, with average response times of less than 30ms, making it a great fit for edge, pre-origin or middleware contexts. The API is platform-agnostic and can be used with different CDN providers, cloud platforms, or any server backend. + +Because this API doesn’t require the use of a client-side device collection agent, it doesn’t support device identification via `visitor_id` and a few Smart Signals derived from deep device telemetry. + +### Event Retrieval + +Events created by the Automation Intelligence API can be fetched via the [`/v4/events/{event_id}`](https://docs.fingerprint.com/reference/server-api-get-event) API using the `event_id` present in the API response. + +Fetch all Automation Intelligence API events via the [`/v4/events?source=edge`](https://docs.fingerprint.com/reference/server-api-search-events#parameter-source) API. + + +### Example + +```php +analyzeRequestForAutomationIntelligence($edge_request); + var_dump($result); +} catch (ApiException $e) { + $errorDetails = $e->getErrorDetails()->getErrorDetails(); + echo "[{$errorDetails->getCode()}] Exception when calling FingerprintApi->analyzeRequestForAutomationIntelligence: {$errorDetails->getMessage()}" . PHP_EOL; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->analyzeRequestForAutomationIntelligence: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **edge_request** | [**\Fingerprint\ServerSdk\Model\EdgeRequest**](../Model/EdgeRequest.md) | | | + +### Return type + +[**\Fingerprint\ServerSdk\Model\EventEdge**](../Model/EventEdge.md) + +### Authorization + +[bearerAuth](../../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + # **deleteVisitorData** > deleteVisitorData($visitor_id) @@ -67,7 +149,7 @@ $apiInstance = new FingerprintApi( new GuzzleHttp\Client() ); -$visitor_id = Ibk1527CUFmcnjLwIs4A9; // string | The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. +$visitor_id = Ibk1527CUFmcnjLwIs4A9; // string | The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. try { $apiInstance->deleteVisitorData($visitor_id); @@ -83,7 +165,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **visitor_id** | **string** | The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. | | +| **visitor_id** | **string** | The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. | | ### Return type @@ -107,10 +189,12 @@ void (empty response body) Get an event by event ID -Get a detailed analysis of an individual identification event, including Smart Signals. +Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. +Use `source` to tell identification events (`device`) from Automation Intelligence events (`edge`). + ### Example @@ -133,7 +217,7 @@ $apiInstance = new FingerprintApi( new GuzzleHttp\Client() ); -$event_id = 1708102555327.NLOjmg; // string | The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). +$event_id = 1708102555327.NLOjmg; // string | The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). $ruleset_id = D6N9Kbk9HRWrIWGz; // string | The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. try { @@ -151,7 +235,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **event_id** | **string** | The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). | | +| **event_id** | **string** | The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). | | | **ruleset_id** | **string** | The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. | [optional] | ### Return type @@ -172,7 +256,7 @@ try { [[Back to README]](../../README.md) # **searchEvents** -> \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, $source, $active_call) +> \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, $active_call, $source) Search events @@ -227,7 +311,7 @@ $apiInstance = new FingerprintApi( $limit = 10; // int | Maximum number of events to return. Defaults to 10 when omitted. 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 = S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q; // 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=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` -$visitor_id = Ibk1527CUFmcnjLwIs4A9; // string | Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). +$visitor_id = Ibk1527CUFmcnjLwIs4A9; // string | Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). $high_recall_id = Ibk1527CUFmcnjLwIs4A9; // string | The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). $bot = \Fingerprint\ServerSdk\Model\SearchEventsBot::GOOD; // \Fingerprint\ServerSdk\Model\SearchEventsBot | Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. $bot_info = new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsBotInfo(); // \Fingerprint\ServerSdk\Model\SearchEventsBotInfo | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. @@ -238,7 +322,7 @@ $bot_info_provider = array('bot_info_provider_example'); // string[] | Filter ev $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 = 61.127.217.15; // 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 = 12876; // 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 = somelinkedId; // 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. +$linked_id = somelinkedId; // string | Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-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. $url = https://example.com/login; // string | Filter events by the URL (`url` property) associated with the event. $bundle_id = com.example.app; // string | Filter events by the Bundle ID (iOS) associated with the event. $package_name = com.example.app; // string | Filter events by the Package Name (Android) associated with the event. @@ -275,11 +359,11 @@ $total_hits = 100; // int | When set, the response will include a `total_hits` p $tor_node = True; // bool | Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. $incremental_identification_status = \Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus::COMPLETED(); // \Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus | Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. $simulator = True; // bool | Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. -$source = array(new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsSource()); // \Fingerprint\ServerSdk\Model\SearchEventsSource[] | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. $active_call = True; // bool | Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. +$source = array(new \Fingerprint\ServerSdk\Model\\Fingerprint\ServerSdk\Model\SearchEventsSource()); // \Fingerprint\ServerSdk\Model\SearchEventsSource[] | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. try { - $result = $apiInstance->searchEvents($limit, $pagination_key, $visitor_id, $high_recall_id, $bot, $bot_info, $bot_info_category, $bot_info_identity, $bot_info_confidence, $bot_info_provider, $bot_info_name, $ip_address, $asn, $linked_id, $url, $bundle_id, $package_name, $origin, $start, $end, $reverse, $suspect, $vpn, $virtual_machine, $tampering, $anti_detect_browser, $incognito, $privacy_settings, $jailbroken, $frida, $factory_reset, $cloned_app, $emulator, $root_apps, $vpn_confidence, $min_suspect_score, $developer_tools, $location_spoofing, $mitm_attack, $rare_device, $rare_device_percentile_bucket, $proxy, $sdk_version, $sdk_platform, $environment, $proximity_id, $total_hits, $tor_node, $incremental_identification_status, $simulator, $source, $active_call); + $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, $active_call, $source); var_dump($result); } catch (ApiException $e) { $errorDetails = $e->getErrorDetails()->getErrorDetails(); @@ -295,7 +379,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **limit** | **int** | Maximum number of events to return. Defaults to 10 when omitted. 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] | | **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=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` | [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] | +| **visitor_id** | **string** | Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-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, and no `bot_info` was present. | [optional] | @@ -306,7 +390,7 @@ try { | **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] | +| **linked_id** | **string** | Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-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] | | **url** | **string** | Filter events by the URL (`url` property) associated with the event. | [optional] | | **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] | @@ -343,8 +427,8 @@ try { | **tor_node** | **bool** | Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. | [optional] | | **incremental_identification_status** | [**\Fingerprint\ServerSdk\Model\SearchEventsIncrementalIdentificationStatus**](../Model/.md) | Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. | [optional] | | **simulator** | **bool** | Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. | [optional] | -| **source** | [**\Fingerprint\ServerSdk\Model\SearchEventsSource[]**](../Model/\Fingerprint\ServerSdk\Model\SearchEventsSource.md) | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. | [optional] | | **active_call** | **bool** | Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. | [optional] | +| **source** | [**\Fingerprint\ServerSdk\Model\SearchEventsSource[]**](../Model/\Fingerprint\ServerSdk\Model\SearchEventsSource.md) | Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. | [optional] | ### Return type @@ -400,7 +484,7 @@ $apiInstance = new FingerprintApi( new GuzzleHttp\Client() ); -$event_id = 1708102555327.NLOjmg; // string | The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). +$event_id = 1708102555327.NLOjmg; // string | The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). $event_update = new \Fingerprint\ServerSdk\Model\EventUpdate(); // \Fingerprint\ServerSdk\Model\EventUpdate try { @@ -417,7 +501,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **event_id** | **string** | The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). | | +| **event_id** | **string** | The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). | | | **event_update** | [**\Fingerprint\ServerSdk\Model\EventUpdate**](../Model/EventUpdate.md) | | | ### Return type diff --git a/docs/Model/EdgeRequest.md b/docs/Model/EdgeRequest.md new file mode 100644 index 000000000..caa292c06 --- /dev/null +++ b/docs/Model/EdgeRequest.md @@ -0,0 +1,18 @@ +# EdgeRequest Class + +HTTP request metadata (including the HTTP method, headers and IP address) sent by you (your server) to the Fingerprint API for IP and bot analysis. To improve accuracy, retain as much of the original semantics of the HTTP request as possible. For example, preserve the order of the request headers and their capitalization. +At least one of `ipv4_address` or `ipv6_address` must be provided; a request with neither is rejected with a `400` error. If both IPv4 and IPv6 are provided, IP intelligence will be provided for each address. If an IPv4-mapped IPv6 address is provided in the `ipv6_address` request property, the IP intelligence will be provided in the `ipv4_address` property of the response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**headers** | [**\Fingerprint\ServerSdk\Model\EdgeRequestHeadersInner[]**](EdgeRequestHeadersInner.md) | Ordered header entries from the request made to your server. Each entry represents one header line. If one header name appears as multiple lines, send each as a separate item in the array. Headers that contain authentication or session data must still be included, but with their value set to an empty string. This includes headers like `Authorization` and `Cookie`, but may contain more depending on your specific project, for instance `Proxy-Authenticate` or `X-Api-Key`. Omitting the headers entirely changes the shape of the request and can affect detection. Never forward the real secret values. Whenever possible, we recommend preserving header order and capitalization to provide the best accuracy, however it’s not a strict requirement if your runtime does not maintain http header order or canonicalizes header names. | +**method** | **string** | The original HTTP method of the request. If supported in your runtime, preserve the original casing. | +**url** | **string** | Absolute URL of the request, without a \\#fragment suffix. Only HTTP and HTTPS schemes are supported. | +**ipv4_address** | **string** | Client IPv4 address observed by your server. | [optional] +**ipv6_address** | **string** | Client IPv6 address observed by your server. | [optional] +**linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] +**tags** | **array** | A customer-provided value or an object that was sent with the identification request or updated later. | [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/EdgeRequestHeadersInner.md b/docs/Model/EdgeRequestHeadersInner.md new file mode 100644 index 000000000..7cd7217c1 --- /dev/null +++ b/docs/Model/EdgeRequestHeadersInner.md @@ -0,0 +1,10 @@ +# EdgeRequestHeadersInner Class + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Header name as forwarded by your server. Headers must be valid according to RFC 7230 and will be canonicalized according to RFC 9112. | +**value** | **string** | Value of a single forwarded header entry. Be careful to preserve the original encoding and escaping. For example, do not double escape quotes. | + +[[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 a64b4f6d2..4fa715a92 100644 --- a/docs/Model/Event.md +++ b/docs/Model/Event.md @@ -1,6 +1,11 @@ # Event Class -Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. +An identification event (`source: device`) or an Automation Intelligence event (`source: edge`). + +Use `source` to tell them apart. Device events include Identification and device-derived Smart Signals. Edge events do not. + +Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. + ## Properties @@ -8,17 +13,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **event_id** | **string** | Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. | **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | +**linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] +**tags** | **array** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] +**url** | **string** | Page URL from which the request was sent. | [optional] +**bot_info** | [**\Fingerprint\ServerSdk\Model\BotInfo**](BotInfo.md) | | [optional] +**ip_info** | [**\Fingerprint\ServerSdk\Model\IPInfo**](IPInfo.md) | | [optional] +**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] +**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_methods** | [**\Fingerprint\ServerSdk\Model\VpnMethods**](VpnMethods.md) | | [optional] **source** | [**\Fingerprint\ServerSdk\Model\EventSource**](EventSource.md) | | [optional] **incremental_identification_status** | [**\Fingerprint\ServerSdk\Model\IncrementalIdentificationStatus**](IncrementalIdentificationStatus.md) | | [optional] -**linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] **environment_id** | **string** | Environment Id of the event. | [optional] -**suspect** | **bool** | Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). | [optional] +**suspect** | **bool** | Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-update-event). | [optional] **sdk** | [**\Fingerprint\ServerSdk\Model\SDK**](SDK.md) | | [optional] **replayed** | **bool** | `true` if we determined that this payload was replayed, `false` otherwise. | [optional] **identification** | [**\Fingerprint\ServerSdk\Model\Identification**](Identification.md) | | [optional] **supplementary_id_high_recall** | [**\Fingerprint\ServerSdk\Model\SupplementaryIDHighRecall**](SupplementaryIDHighRecall.md) | | [optional] -**tags** | **array** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] -**url** | **string** | Page URL from which the request was sent. | [optional] **bundle_id** | **string** | Bundle Id of the iOS application integrated with the Fingerprint SDK for the event. | [optional] **package_name** | **string** | Package name of the Android application integrated with the Fingerprint SDK for the event. | [optional] **ip_address** | **string** | IP address of the requesting browser or bot. | [optional] @@ -32,17 +45,12 @@ Name | Type | Description | Notes **active_call** | **bool** | Indicates whether the mobile device had an active call (cellular or VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and Android. | [optional] **bot** | [**\Fingerprint\ServerSdk\Model\BotResult**](BotResult.md) | | [optional] **bot_type** | **string** | Additional classification of the bot type if detected. | [optional] -**bot_info** | [**\Fingerprint\ServerSdk\Model\BotInfo**](BotInfo.md) | | [optional] **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 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] **ip_blocklist** | [**\Fingerprint\ServerSdk\Model\IPBlockList**](IPBlockList.md) | | [optional] -**ip_info** | [**\Fingerprint\ServerSdk\Model\IPInfo**](IPInfo.md) | | [optional] -**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. 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] @@ -60,12 +68,9 @@ Name | Type | Description | Notes **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. 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_ml_score** | **float** | Machine learning–based VPN score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `vpn` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] **vpn_origin_timezone** | **string** | Local timezone which is used in timezone_mismatch method. | [optional] **vpn_origin_country** | **string** | Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. | [optional] -**vpn_methods** | [**\Fingerprint\ServerSdk\Model\VpnMethods**](VpnMethods.md) | | [optional] **high_activity_device** | **bool** | Flag indicating if the request came from a high-activity visitor. | [optional] **rare_device** | **bool** | `true` if the device is considered rare based on its combination of hardware and software attributes. A device is classified as rare if it falls within the top 99.9 percentile (lowest-frequency segment) of observed traffic, or if its configuration has not been previously seen (`not_seen`). > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] **rare_device_percentile_bucket** | [**\Fingerprint\ServerSdk\Model\RareDevicePercentileBucket**](RareDevicePercentileBucket.md) | | [optional] diff --git a/docs/Model/EventEdge.md b/docs/Model/EventEdge.md new file mode 100644 index 000000000..6e4984d58 --- /dev/null +++ b/docs/Model/EventEdge.md @@ -0,0 +1,25 @@ +# EventEdge Class + +IP and bot analysis for an event generated by the Automation Intelligence API (`/edge` endpoint). No client-side collection agent is involved, so Identification (`visitor_id`) and device-telemetry-derived Smart Signals are not available. + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_id** | **string** | Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. | +**timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | +**linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] +**tags** | **array** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] +**url** | **string** | Page URL from which the request was sent. | [optional] +**bot_info** | [**\Fingerprint\ServerSdk\Model\BotInfo**](BotInfo.md) | | [optional] +**ip_info** | [**\Fingerprint\ServerSdk\Model\IPInfo**](IPInfo.md) | | +**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] +**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_methods** | [**\Fingerprint\ServerSdk\Model\VpnMethods**](VpnMethods.md) | | [optional] +**source** | [**\Fingerprint\ServerSdk\Model\EventSource**](EventSource.md) | | + +[[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 5e7a37ba8..ea6121587 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -37,6 +37,97 @@ servers: security: - bearerAuth: [] paths: + /edge: + post: + tags: + - Fingerprint + operationId: analyzeRequestForAutomationIntelligence + summary: Collect Automation Intelligence. + description: > + The Automation Intelligence API gives you the tools to determine whether + traffic is legitimate and should be accepted by your application. + + + This feature is currently in a Public Preview testing phase. All + feedback is welcome! If you encounter any issues, please [contact our + support team](https://fingerprint.com/support/). + + + The API detects automation tools like AI Agents, AI Assistants, AI + Browsers, and other bots. Additionally, it provides IP intelligence like + geolocation, residential proxy, VPN and data center detection. + + + Automation Intelligence is derived from HTTP request metadata that + reaches your server. It does not require the use of a JavaScript + client-side agent or mobile SDKs to collect device context. + + + The API is fast, with average response times of less than 30ms, making + it a great fit for edge, pre-origin or middleware contexts. The API is + platform-agnostic and can be used with different CDN providers, cloud + platforms, or any server backend. + + + Because this API doesn’t require the use of a client-side device + collection agent, it doesn’t support device identification via + `visitor_id` and a few Smart Signals derived from deep device telemetry. + + + ### Event Retrieval + + + Events created by the Automation Intelligence API can be fetched via the + [`/v4/events/{event_id}`](https://docs.fingerprint.com/reference/server-api-get-event) + API using the `event_id` present in the API response. + + + Fetch all Automation Intelligence API events via the + [`/v4/events?source=edge`](https://docs.fingerprint.com/reference/server-api-search-events#parameter-source) + API. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EdgeRequest' + responses: + '200': + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/EventEdge' + '400': + description: Bad request. The request payload is not valid. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: Forbidden. Access to this API is denied. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '413': + description: Bad request. The request payload is too large. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too Many Requests. The request is throttled. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Workspace error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' /events/{event_id}: get: tags: @@ -44,12 +135,15 @@ paths: operationId: getEvent summary: Get an event by event ID description: > - Get a detailed analysis of an individual identification event, including - Smart Signals. + Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. + + + Use `source` to tell identification events (`device`) from Automation + Intelligence events (`edge`). parameters: - name: event_id in: path @@ -61,7 +155,7 @@ paths: example: 1708102555327.NLOjmg description: >- The unique - [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) + [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). - name: ruleset_id @@ -165,7 +259,7 @@ paths: example: 1708102555327.NLOjmg description: >- The unique event - [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). + [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). requestBody: required: true content: @@ -317,7 +411,7 @@ paths: example: Ibk1527CUFmcnjLwIs4A9 description: > Unique [visitor - identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) + identifier](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. @@ -492,7 +586,7 @@ paths: You can use [linked - Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) + Ids](https://docs.fingerprint.com/reference/js-agent-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 @@ -940,6 +1034,18 @@ paths: > 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. + - name: active_call + in: query + schema: + type: boolean + description: > + Filter events by Active Call Detection result on mobile devices. + + + > Note: When using this parameter, only events with the + `active_call` property set to `true` or `false` are returned. Events + without an `active_call` Smart Signal result are left out of the + response. - name: source in: query required: false @@ -963,18 +1069,6 @@ paths: > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. - - name: active_call - in: query - schema: - type: boolean - description: > - Filter events by Active Call Detection result on mobile devices. - - - > Note: When using this parameter, only events with the - `active_call` property set to `true` or `false` are returned. Events - without an `active_call` Smart Signal result are left out of the - response. responses: '200': description: Events matching the filter(s). @@ -1110,7 +1204,7 @@ paths: example: Ibk1527CUFmcnjLwIs4A9 description: >- The [visitor - ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) + ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. responses: '200': @@ -1163,6 +1257,138 @@ components: identification request or updated later. additionalProperties: true required: [] + EdgeRequest: + type: object + description: >- + HTTP request metadata (including the HTTP method, headers and IP + address) sent by you (your server) to the Fingerprint API for IP and bot + analysis. To improve accuracy, retain as much of the original semantics + of the HTTP request as possible. For example, preserve the order of the + request headers and their capitalization. + + At least one of `ipv4_address` or `ipv6_address` must be provided; a + request with neither is rejected with a `400` error. If both IPv4 and + IPv6 are provided, IP intelligence will be provided for each address. If + an IPv4-mapped IPv6 address is provided in the `ipv6_address` request + property, the IP intelligence will be provided in the `ipv4_address` + property of the response. + example: + method: GET + url: https://example.com/login + ipv4_address: 34.162.244.71 + headers: + - name: Host + value: example.com + - name: User-Agent + value: Mozilla/5.0 + - name: Authorization + value: '' + required: + - headers + - method + - url + properties: + headers: + type: array + description: > + Ordered header entries from the request made to your server. Each + entry represents one header line. If one header name appears as + multiple lines, send each as a separate item in the array. + + + Headers that contain authentication or session data must still be + included, but with their value set to an empty string. This includes + headers like `Authorization` and `Cookie`, but may contain more + depending on your specific project, for instance + `Proxy-Authenticate` or `X-Api-Key`. Omitting the headers entirely + changes the shape of the request and can affect detection. Never + forward the real secret values. + + + Whenever possible, we recommend preserving header order and + capitalization to provide the best accuracy, however it’s not a + strict requirement if your runtime does not maintain http header + order or canonicalizes header names. + minItems: 1 + items: + type: object + required: + - name + - value + properties: + name: + type: string + examples: + - User-Agent + description: >- + Header name as forwarded by your server. Headers must be valid + according to RFC 7230 and will be canonicalized according to + RFC 9112. + value: + type: string + examples: + - Mozilla/5.0 + description: >- + Value of a single forwarded header entry. Be careful to + preserve the original encoding and escaping. For example, do + not double escape quotes. + examples: + - - name: Host + value: example.com + - name: User-Agent + value: Mozilla/5.0 + - name: Accept-Language + value: en-US,en;q=0.9 + - - name: Host + value: example.com + - name: User-Agent + value: Mozilla/5.0 + - name: Accept-Encoding + value: gzip + - name: Accept-Encoding + value: deflate + method: + type: string + description: >- + The original HTTP method of the request. If supported in your + runtime, preserve the original casing. + examples: + - GET + - POST + - PUT + - PATCH + - DELETE + url: + type: string + description: >- + Absolute URL of the request, without a \#fragment suffix. Only HTTP + and HTTPS schemes are supported. + format: uri + examples: + - http://example.com + - https://example.com/checkout?method=card + ipv4_address: + type: string + description: Client IPv4 address observed by your server. + format: ipv4 + examples: + - 34.162.244.71 + - 3.208.0.3 + - 173.56.0.4 + ipv6_address: + type: string + description: Client IPv6 address observed by your server. + format: ipv6 + examples: + - 2001:4860:4801:10::1 + - 2600:1f42:abcd:5678:9876:fedc:1357:2468 + - 2001:4868:85f:1a2b:3c4d:5e6f:7890:abcd + - ::ffff:22a2:f447 + - ::ffff:34.162.244.71 + linked_id: + $ref: '#/components/schemas/LinkedId' + tags: + $ref: '#/components/schemas/Tags' EventId: type: string examples: @@ -1176,19 +1402,6 @@ components: format: int64 examples: - 1708102555327 - EventSource: - type: string - description: > - Identifies how the event was generated. - - - `device` - the event was generated by the JS agent or a mobile SDK - running on an end-user device. - - - `edge` - the event was generated by the Automation Intelligence API - (`/edge` endpoint), analyzing a request intercepted at the edge. - enum: - - device - - edge Url: type: string examples: @@ -1596,6 +1809,78 @@ components: description: > `true` if the request came from a device running a VPN, `false` otherwise. + EventSource: + type: string + description: > + Identifies how the event was generated. + + - `device` - the event was generated by the JS agent or a mobile SDK + running on an end-user device. + + - `edge` - the event was generated by the Automation Intelligence API + (`/edge` endpoint), analyzing a request intercepted at the edge. + enum: + - device + - edge + EventEdge: + type: object + description: > + IP and bot analysis for an event generated by the Automation + Intelligence API (`/edge` endpoint). No client-side collection agent is + involved, so Identification (`visitor_id`) and device-telemetry-derived + Smart Signals are not available. + properties: + event_id: + $ref: '#/components/schemas/EventId' + x-platforms: + - android + - ios + - browser + timestamp: + $ref: '#/components/schemas/Timestamp' + x-platforms: + - android + - ios + - browser + linked_id: + $ref: '#/components/schemas/LinkedId' + x-platforms: + - android + - ios + - browser + tags: + $ref: '#/components/schemas/Tags' + x-platforms: + - android + - ios + - browser + url: + $ref: '#/components/schemas/Url' + bot_info: + $ref: '#/components/schemas/BotInfo' + ip_info: + $ref: '#/components/schemas/IPInfo' + proxy: + $ref: '#/components/schemas/Proxy' + proxy_confidence: + $ref: '#/components/schemas/ProxyConfidence' + proxy_details: + $ref: '#/components/schemas/ProxyDetails' + vpn: + $ref: '#/components/schemas/Vpn' + vpn_confidence: + $ref: '#/components/schemas/VpnConfidence' + vpn_methods: + $ref: '#/components/schemas/VpnMethods' + source: + allOf: + - $ref: '#/components/schemas/EventSource' + - const: edge + required: + - event_id + - timestamp + - source + - ip_info ErrorCode: type: string enum: @@ -1715,7 +2000,7 @@ components: description: >- Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event - endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). + endpoint](https://docs.fingerprint.com/reference/server-api-update-event). Integration: type: object required: [] @@ -3084,16 +3369,18 @@ components: team](https://fingerprint.com/support/). Event: type: object - description: >- - Contains results from Fingerprint Identification and all active Smart - Signals. Some Smart Signals are only supported for certain device types, - these fields will be omitted for events not generated from the supported - devices. Consult the [Smart Signals + description: > + An identification event (`source: device`) or an Automation Intelligence + event (`source: edge`). + + + Use `source` to tell them apart. Device events include Identification + and device-derived Smart Signals. Edge events do not. + + + Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. - required: - - event_id - - timestamp properties: event_id: $ref: '#/components/schemas/EventId' @@ -3107,22 +3394,78 @@ components: - android - ios - browser - source: - $ref: '#/components/schemas/EventSource' + linked_id: + $ref: '#/components/schemas/LinkedId' x-platforms: - android - ios - browser - incremental_identification_status: - $ref: '#/components/schemas/IncrementalIdentificationStatus' + tags: + $ref: '#/components/schemas/Tags' x-platforms: + - android + - ios - browser - linked_id: - $ref: '#/components/schemas/LinkedId' + url: + $ref: '#/components/schemas/Url' + x-platforms: + - browser + bot_info: + $ref: '#/components/schemas/BotInfo' + x-platforms: + - browser + ip_info: + $ref: '#/components/schemas/IPInfo' + x-platforms: + - android + - ios + - browser + proxy: + $ref: '#/components/schemas/Proxy' + x-platforms: + - android + - ios + - browser + proxy_confidence: + $ref: '#/components/schemas/ProxyConfidence' x-platforms: - android - ios - browser + proxy_details: + $ref: '#/components/schemas/ProxyDetails' + x-platforms: + - android + - ios + - browser + vpn: + $ref: '#/components/schemas/Vpn' + x-platforms: + - android + - ios + - browser + vpn_confidence: + $ref: '#/components/schemas/VpnConfidence' + x-platforms: + - android + - ios + - browser + vpn_methods: + $ref: '#/components/schemas/VpnMethods' + x-platforms: + - android + - ios + - browser + source: + $ref: '#/components/schemas/EventSource' + x-platforms: + - android + - ios + - browser + incremental_identification_status: + $ref: '#/components/schemas/IncrementalIdentificationStatus' + x-platforms: + - browser environment_id: $ref: '#/components/schemas/EnvironmentId' x-platforms: @@ -3159,16 +3502,6 @@ components: - android - ios - browser - tags: - $ref: '#/components/schemas/Tags' - x-platforms: - - android - - ios - - browser - url: - $ref: '#/components/schemas/Url' - x-platforms: - - browser bundle_id: $ref: '#/components/schemas/BundleId' x-platforms: @@ -3234,10 +3567,6 @@ components: $ref: '#/components/schemas/BotType' x-platforms: - browser - bot_info: - $ref: '#/components/schemas/BotInfo' - x-platforms: - - browser cloned_app: $ref: '#/components/schemas/ClonedApp' x-platforms: @@ -3268,30 +3597,6 @@ components: - android - ios - browser - ip_info: - $ref: '#/components/schemas/IPInfo' - x-platforms: - - android - - ios - - browser - proxy: - $ref: '#/components/schemas/Proxy' - x-platforms: - - android - - ios - - browser - proxy_confidence: - $ref: '#/components/schemas/ProxyConfidence' - x-platforms: - - android - - ios - - browser - proxy_details: - $ref: '#/components/schemas/ProxyDetails' - x-platforms: - - android - - ios - - browser proxy_ml_score: $ref: '#/components/schemas/ProxyMLScore' x-platforms: @@ -3372,18 +3677,6 @@ components: $ref: '#/components/schemas/VirtualMachineMLScore' x-platforms: - browser - vpn: - $ref: '#/components/schemas/Vpn' - x-platforms: - - android - - ios - - browser - vpn_confidence: - $ref: '#/components/schemas/VpnConfidence' - x-platforms: - - android - - ios - - browser vpn_ml_score: $ref: '#/components/schemas/VpnMLScore' x-platforms: @@ -3399,12 +3692,6 @@ components: x-platforms: - android - ios - vpn_methods: - $ref: '#/components/schemas/VpnMethods' - x-platforms: - - android - - ios - - browser high_activity_device: $ref: '#/components/schemas/HighActivity' x-platforms: @@ -3431,6 +3718,9 @@ components: - browser - ios - android + required: + - event_id + - timestamp EventUpdate: type: object required: [] diff --git a/scripts/sync.sh b/scripts/sync.sh index 1240424c3..4f0b5c1ff 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -3,7 +3,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/common.sh" defaultBaseUrl="https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi" -schemaUrl="${1:-$defaultBaseUrl/schemas/fingerprint-server-api-v4.yaml}" +# Flattened Event (single object, source optional). start/end stay a date|int oneOf. +schemaUrl="${1:-$defaultBaseUrl/schemas/fingerprint-server-api-v4-flat.yaml}" examplesBaseUrl="${2:-$defaultBaseUrl/examples}" mkdir -p ./res diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 45c127c04..64f4c7e7c 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -34,7 +34,9 @@ use Fingerprint\ServerSdk\Model\BotInfoCategory; use Fingerprint\ServerSdk\Model\BotInfoConfidence; use Fingerprint\ServerSdk\Model\BotInfoIdentity; +use Fingerprint\ServerSdk\Model\EdgeRequest; use Fingerprint\ServerSdk\Model\Event; +use Fingerprint\ServerSdk\Model\EventEdge; use Fingerprint\ServerSdk\Model\EventSearch; use Fingerprint\ServerSdk\Model\EventUpdate; use Fingerprint\ServerSdk\Model\SearchEventsBot; @@ -105,12 +107,219 @@ public function getConfig(): Configuration return $this->config; } + /** + * Operation analyzeRequestForAutomationIntelligence. + * + * Collect Automation Intelligence. + * + * @param EdgeRequest $edge_request edge_request (required) + * + * @noinspection GrazieInspection + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @throws GuzzleException + * @throws \DateMalformedStringException + */ + public function analyzeRequestForAutomationIntelligence(EdgeRequest $edge_request): EventEdge + { + list($response) = $this->analyzeRequestForAutomationIntelligenceWithHttpInfo($edge_request); + + return $response; + } + + /** + * Operation analyzeRequestForAutomationIntelligenceWithHttpInfo. + * + * Collect Automation Intelligence. + * + * @param EdgeRequest $edge_request (required) + * + * @noinspection GrazieInspection + * + * @return array{ EventEdge|null, ResponseInterface } + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @throws GuzzleException + * @throws \DateMalformedStringException + */ + public function analyzeRequestForAutomationIntelligenceWithHttpInfo(EdgeRequest $edge_request): array + { + $request = $this->analyzeRequestForAutomationIntelligenceRequest($edge_request); + + try { + $options = $this->createHttpClientOption(); + + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse(), + $e + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + $e + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response + ); + } + + return $this->handleResponseWithDataType( + '\Fingerprint\ServerSdk\Model\EventEdge', + $request, + $response + ); + } catch (ApiException $e) { + $this->handleAnalyzeRequestForAutomationIntelligenceError($e); + } + } + + /** + * Operation analyzeRequestForAutomationIntelligenceAsync. + * + * Collect Automation Intelligence. + * + * @param EdgeRequest $edge_request (required) + * + * @noinspection GrazieInspection + * + * @return PromiseInterface promise resolving to the deserialized response + * + * @throws \InvalidArgumentException + */ + public function analyzeRequestForAutomationIntelligenceAsync(EdgeRequest $edge_request): PromiseInterface + { + return $this->analyzeRequestForAutomationIntelligenceAsyncWithHttpInfo($edge_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation analyzeRequestForAutomationIntelligenceAsyncWithHttpInfo. + * + * Collect Automation Intelligence. + * + * @param EdgeRequest $edge_request (required) + * + * @noinspection GrazieInspection + * + * @return PromiseInterface promise resolving to an array of deserialized data and the HTTP response + * + * @throws \InvalidArgumentException + */ + public function analyzeRequestForAutomationIntelligenceAsyncWithHttpInfo(EdgeRequest $edge_request): PromiseInterface + { + $request = $this->analyzeRequestForAutomationIntelligenceRequest($edge_request); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $response->getBody()->rewind(); + + return [ + ObjectSerializer::deserialize($content, '\Fingerprint\ServerSdk\Model\EventEdge'), + $response, + ]; + }, + function ($e) { + if ($e instanceof RequestException) { + $e = new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse(), + $e + ); + } elseif ($e instanceof ConnectException) { + $e = new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + $e + ); + } elseif (!$e instanceof ApiException) { + $e = new ApiException( + $e->getMessage(), + (int) $e->getCode(), + null, + $e + ); + } + $this->handleAnalyzeRequestForAutomationIntelligenceError($e); + } + ); + } + + /** + * Create request for operation 'analyzeRequestForAutomationIntelligence'. + * + * @param EdgeRequest $edge_request (required) + * + * @noinspection GrazieInspection + * + * @return Request the prepared HTTP request + * + * @throws \InvalidArgumentException + */ + public function analyzeRequestForAutomationIntelligenceRequest(EdgeRequest $edge_request): Request + { + $resourcePath = '/edge'; + $headers = [ + 'Authorization' => 'Bearer '.$this->config->getApiKey(), + ]; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($edge_request)); + + if ($this->config->getUserAgent()) { + $headers['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + + return new Request( + 'POST', + $this->config->getHost().$resourcePath.($query ? "?$query" : ''), + $headers, + $httpBody + ); + } + /** * Operation deleteVisitorData. * * 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) + * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. (required) * * @noinspection GrazieInspection * @@ -129,7 +338,7 @@ public function deleteVisitorData(string $visitor_id): void * * 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) + * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. (required) * * @noinspection GrazieInspection * @@ -190,7 +399,7 @@ public function deleteVisitorDataWithHttpInfo(string $visitor_id): array * * 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) + * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. (required) * * @noinspection GrazieInspection * @@ -213,7 +422,7 @@ function ($response) { * * 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) + * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. (required) * * @noinspection GrazieInspection * @@ -262,7 +471,7 @@ function ($e) { /** * Create request for operation 'deleteVisitorData'. * - * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) + * @param string $visitor_id The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. (required) * * @noinspection GrazieInspection * @@ -309,7 +518,7 @@ public function deleteVisitorDataRequest(string $visitor_id): Request * * Get an event by event ID * - * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @param string|null $ruleset_id The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. (optional) * * @noinspection GrazieInspection @@ -331,7 +540,7 @@ public function getEvent(string $event_id, ?string $ruleset_id = null): Event * * Get an event by event ID * - * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @param string|null $ruleset_id The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. (optional) * * @noinspection GrazieInspection @@ -397,7 +606,7 @@ public function getEventWithHttpInfo(string $event_id, ?string $ruleset_id = nul * * Get an event by event ID * - * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @param string|null $ruleset_id The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. (optional) * * @noinspection GrazieInspection @@ -421,7 +630,7 @@ function ($response) { * * Get an event by event ID * - * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @param string|null $ruleset_id The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. (optional) * * @noinspection GrazieInspection @@ -477,7 +686,7 @@ function ($e) { /** * Create request for operation 'getEvent'. * - * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * @param string $event_id The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @param string|null $ruleset_id The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. (optional) * * @noinspection GrazieInspection @@ -537,7 +746,7 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * * @param int $limit Maximum number of events to return. Defaults to 10 when omitted. 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) * @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=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` (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 $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-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, and no `bot_info` was present. (optional) @@ -548,7 +757,7 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @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) + * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-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) * @param string|null $url Filter events by the URL (`url` property) associated with the event. (optional) * @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) @@ -585,8 +794,8 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * @param bool|null $active_call Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -595,9 +804,9 @@ public function getEventRequest(string $event_id, ?string $ruleset_id = null): R * @throws GuzzleException * @throws \DateMalformedStringException */ - public function searchEvents(?int $limit = null, ?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 $source = null, ?bool $active_call = null): EventSearch + public function searchEvents(?int $limit = null, ?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, ?bool $active_call = null, ?array $source = null): EventSearch { - 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, $source, $active_call); + 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, $active_call, $source); return $response; } @@ -609,7 +818,7 @@ public function searchEvents(?int $limit = null, ?string $pagination_key = null, * * @param int $limit Maximum number of events to return. Defaults to 10 when omitted. 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) * @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=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` (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 $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-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, and no `bot_info` was present. (optional) @@ -620,7 +829,7 @@ public function searchEvents(?int $limit = null, ?string $pagination_key = null, * @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) + * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-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) * @param string|null $url Filter events by the URL (`url` property) associated with the event. (optional) * @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) @@ -657,8 +866,8 @@ public function searchEvents(?int $limit = null, ?string $pagination_key = null, * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * @param bool|null $active_call Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -669,9 +878,9 @@ public function searchEvents(?int $limit = null, ?string $pagination_key = null, * @throws GuzzleException * @throws \DateMalformedStringException */ - public function searchEventsWithHttpInfo(?int $limit = null, ?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 $source = null, ?bool $active_call = null): array + public function searchEventsWithHttpInfo(?int $limit = null, ?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, ?bool $active_call = null, ?array $source = null): array { - $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, $source, $active_call); + $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, $active_call, $source); try { $options = $this->createHttpClientOption(); @@ -725,7 +934,7 @@ public function searchEventsWithHttpInfo(?int $limit = null, ?string $pagination * * @param int $limit Maximum number of events to return. Defaults to 10 when omitted. 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) * @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=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` (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 $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-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, and no `bot_info` was present. (optional) @@ -736,7 +945,7 @@ public function searchEventsWithHttpInfo(?int $limit = null, ?string $pagination * @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) + * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-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) * @param string|null $url Filter events by the URL (`url` property) associated with the event. (optional) * @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) @@ -773,8 +982,8 @@ public function searchEventsWithHttpInfo(?int $limit = null, ?string $pagination * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * @param bool|null $active_call Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -782,9 +991,9 @@ public function searchEventsWithHttpInfo(?int $limit = null, ?string $pagination * * @throws \InvalidArgumentException */ - public function searchEventsAsync(?int $limit = null, ?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 $source = null, ?bool $active_call = null): PromiseInterface + public function searchEventsAsync(?int $limit = null, ?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, ?bool $active_call = null, ?array $source = null): PromiseInterface { - 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, $source, $active_call) + 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, $active_call, $source) ->then( function ($response) { return $response[0]; @@ -799,7 +1008,7 @@ function ($response) { * * @param int $limit Maximum number of events to return. Defaults to 10 when omitted. 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) * @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=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` (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 $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-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, and no `bot_info` was present. (optional) @@ -810,7 +1019,7 @@ function ($response) { * @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) + * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-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) * @param string|null $url Filter events by the URL (`url` property) associated with the event. (optional) * @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) @@ -847,8 +1056,8 @@ function ($response) { * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * @param bool|null $active_call Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -856,9 +1065,9 @@ function ($response) { * * @throws \InvalidArgumentException */ - public function searchEventsAsyncWithHttpInfo(?int $limit = null, ?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 $source = null, ?bool $active_call = null): PromiseInterface + public function searchEventsAsyncWithHttpInfo(?int $limit = null, ?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, ?bool $active_call = null, ?array $source = null): PromiseInterface { - $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, $source, $active_call); + $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, $active_call, $source); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -905,7 +1114,7 @@ function ($e) { * * @param int $limit Maximum number of events to return. Defaults to 10 when omitted. 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) * @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=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` (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 $visitor_id Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-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, and no `bot_info` was present. (optional) @@ -916,7 +1125,7 @@ function ($e) { * @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) + * @param string|null $linked_id Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-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) * @param string|null $url Filter events by the URL (`url` property) associated with the event. (optional) * @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) @@ -953,8 +1162,8 @@ function ($e) { * @param bool|null $tor_node Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) * @param SearchEventsIncrementalIdentificationStatus|null $incremental_identification_status Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) * @param bool|null $simulator Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) - * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * @param bool|null $active_call Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) + * @param SearchEventsSource[]|null $source Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) * * @noinspection GrazieInspection * @@ -962,7 +1171,7 @@ function ($e) { * * @throws \InvalidArgumentException */ - public function searchEventsRequest(?int $limit = null, ?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 $source = null, ?bool $active_call = null): Request + public function searchEventsRequest(?int $limit = null, ?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, ?bool $active_call = null, ?array $source = 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.'); @@ -1439,18 +1648,18 @@ public function searchEventsRequest(?int $limit = null, ?string $pagination_key ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $source, - 'source', - 'array', + $active_call, + 'active_call', + 'boolean', 'form', true, false ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $active_call, - 'active_call', - 'boolean', + $source, + 'source', + 'array', 'form', true, false @@ -1479,7 +1688,7 @@ public function searchEventsRequest(?int $limit = null, ?string $pagination_key * * Update an event * - * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) + * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). (required) * @param EventUpdate $event_update event_update (required) * * @noinspection GrazieInspection @@ -1499,7 +1708,7 @@ public function updateEvent(string $event_id, EventUpdate $event_update): void * * Update an event * - * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) + * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). (required) * @param EventUpdate $event_update (required) * * @noinspection GrazieInspection @@ -1561,7 +1770,7 @@ public function updateEventWithHttpInfo(string $event_id, EventUpdate $event_upd * * Update an event * - * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) + * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). (required) * @param EventUpdate $event_update (required) * * @noinspection GrazieInspection @@ -1585,7 +1794,7 @@ function ($response) { * * Update an event * - * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) + * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). (required) * @param EventUpdate $event_update (required) * * @noinspection GrazieInspection @@ -1635,7 +1844,7 @@ function ($e) { /** * Create request for operation 'updateEvent'. * - * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) + * @param string $event_id The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). (required) * @param EventUpdate $event_update (required) * * @noinspection GrazieInspection @@ -1709,6 +1918,87 @@ protected function createHttpClientOption(): array return $options; } + /** + * Handle error responses for operation 'analyzeRequestForAutomationIntelligence'. + * + * @param ApiException $e the API exception to handle + * + * @throws ApiException always rethrown after setting error details + * @throws \DateMalformedStringException + * + * @noinspection PhpDuplicateSwitchCaseBodyInspection + * @noinspection RedundantSuppression + */ + private function handleAnalyzeRequestForAutomationIntelligenceError(ApiException $e): never + { + $response = $e->getResponseObject(); + + if (null !== $response) { + $errorCode = $e->getCode(); + + $content = (string) $response->getBody(); + $response->getBody()->rewind(); + + switch ($errorCode) { + case 200: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\EventEdge' + ); + $e->setErrorDetails($data); + + throw $e; + + case 400: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + + throw $e; + + case 403: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + + throw $e; + + case 413: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + + throw $e; + + case 429: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + + throw $e; + + case 500: + $data = ObjectSerializer::deserialize( + $content, + '\Fingerprint\ServerSdk\Model\ErrorResponse' + ); + $e->setErrorDetails($data); + + throw $e; + } + } + + throw $e; + } + /** * Handle error responses for operation 'deleteVisitorData'. * diff --git a/src/Model/EdgeRequest.php b/src/Model/EdgeRequest.php new file mode 100644 index 000000000..0ba498926 --- /dev/null +++ b/src/Model/EdgeRequest.php @@ -0,0 +1,586 @@ + + * + * @noinspection GrazieInspection + * @noinspection RedundantSuppression + */ +class EdgeRequest implements ModelInterface, \ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + */ + protected static string $openAPIModelName = 'EdgeRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $openAPITypes = [ + 'headers' => '\Fingerprint\ServerSdk\Model\EdgeRequestHeadersInner[]', + 'method' => 'string', + 'url' => 'string', + 'ipv4_address' => 'string', + 'ipv6_address' => 'string', + 'linked_id' => 'string', + 'tags' => 'array', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ + protected static array $openAPIFormats = [ + 'headers' => null, + 'method' => null, + 'url' => 'uri', + 'ipv4_address' => 'ipv4', + 'ipv6_address' => 'ipv6', + 'linked_id' => null, + 'tags' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization. + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'headers' => false, + 'method' => false, + 'url' => false, + 'ipv4_address' => false, + 'ipv6_address' => false, + 'linked_id' => false, + 'tags' => 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 = [ + 'headers' => 'headers', + 'method' => 'method', + 'url' => 'url', + 'ipv4_address' => 'ipv4_address', + 'ipv6_address' => 'ipv6_address', + 'linked_id' => 'linked_id', + 'tags' => 'tags', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'headers' => 'setHeaders', + 'method' => 'setMethod', + 'url' => 'setUrl', + 'ipv4_address' => 'setIpv4Address', + 'ipv6_address' => 'setIpv6Address', + 'linked_id' => 'setLinkedId', + 'tags' => 'setTags', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'headers' => 'getHeaders', + 'method' => 'getMethod', + 'url' => 'getUrl', + 'ipv4_address' => 'getIpv4Address', + 'ipv6_address' => 'getIpv6Address', + 'linked_id' => 'getLinkedId', + 'tags' => 'getTags', + ]; + + /** + * 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('headers', $data ?? [], null); + $this->setIfExists('method', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('ipv4_address', $data ?? [], null); + $this->setIfExists('ipv6_address', $data ?? [], null); + $this->setIfExists('linked_id', $data ?? [], null); + $this->setIfExists('tags', $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['headers']) { + $invalidProperties[] = "'headers' can't be null"; + } + if (count($this->container['headers']) < 1) { + $invalidProperties[] = "invalid value for 'headers', number of items must be greater than or equal to 1."; + } + + if (null === $this->container['method']) { + $invalidProperties[] = "'method' can't be null"; + } + if (null === $this->container['url']) { + $invalidProperties[] = "'url' can't be null"; + } + + 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 headers. + * + * @return EdgeRequestHeadersInner[]|null + */ + public function getHeaders(): ?array + { + return $this->container['headers']; + } + + /** + * Sets headers. + * + * @param EdgeRequestHeadersInner[] $headers Ordered header entries from the request made to your server. Each entry represents one header line. If one header name appears as multiple lines, send each as a separate item in the array. Headers that contain authentication or session data must still be included, but with their value set to an empty string. This includes headers like `Authorization` and `Cookie`, but may contain more depending on your specific project, for instance `Proxy-Authenticate` or `X-Api-Key`. Omitting the headers entirely changes the shape of the request and can affect detection. Never forward the real secret values. Whenever possible, we recommend preserving header order and capitalization to provide the best accuracy, however it’s not a strict requirement if your runtime does not maintain http header order or canonicalizes header names. + * + */ + public function setHeaders(array $headers): self + { + if (count($headers) < 1) { + throw new \InvalidArgumentException('invalid length for $headers when calling EdgeRequest., number of items must be greater than or equal to 1.'); + } + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets method. + * + */ + public function getMethod(): ?string + { + return $this->container['method']; + } + + /** + * Sets method. + * + * @param string $method The original HTTP method of the request. If supported in your runtime, preserve the original casing. + * + */ + public function setMethod(string $method): self + { + $this->container['method'] = $method; + + return $this; + } + + /** + * Gets url. + * + */ + public function getUrl(): ?string + { + return $this->container['url']; + } + + /** + * Sets url. + * + * @param string $url Absolute URL of the request, without a \\#fragment suffix. Only HTTP and HTTPS schemes are supported. + * + */ + public function setUrl(string $url): self + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets ipv4_address. + * + */ + public function getIpv4Address(): ?string + { + return $this->container['ipv4_address']; + } + + /** + * Sets ipv4_address. + * + * @param string $ipv4_address client IPv4 address observed by your server + * + */ + public function setIpv4Address(string $ipv4_address): self + { + $this->container['ipv4_address'] = $ipv4_address; + + return $this; + } + + /** + * Gets ipv6_address. + * + */ + public function getIpv6Address(): ?string + { + return $this->container['ipv6_address']; + } + + /** + * Sets ipv6_address. + * + * @param string $ipv6_address client IPv6 address observed by your server + * + */ + public function setIpv6Address(string $ipv6_address): self + { + $this->container['ipv6_address'] = $ipv6_address; + + return $this; + } + + /** + * Gets linked_id. + * + */ + public function getLinkedId(): ?string + { + return $this->container['linked_id']; + } + + /** + * Sets linked_id. + * + * @param string $linked_id a customer-provided id that was sent with the request + * + */ + public function setLinkedId(string $linked_id): self + { + $this->container['linked_id'] = $linked_id; + + return $this; + } + + /** + * Gets tags. + * + * @return array|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags. + * + * @param array $tags a customer-provided value or an object that was sent with the identification request or updated later + * + */ + public function setTags(array $tags): self + { + $this->container['tags'] = $tags; + + 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/EdgeRequestHeadersInner.php b/src/Model/EdgeRequestHeadersInner.php new file mode 100644 index 000000000..88dc705d9 --- /dev/null +++ b/src/Model/EdgeRequestHeadersInner.php @@ -0,0 +1,426 @@ + + * + * @noinspection GrazieInspection + * @noinspection RedundantSuppression + */ +class EdgeRequestHeadersInner implements ModelInterface, \ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + */ + protected static string $openAPIModelName = 'EdgeRequest_headers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $openAPITypes = [ + 'name' => 'string', + 'value' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ + protected static array $openAPIFormats = [ + 'name' => null, + 'value' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization. + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'value' => 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 = [ + 'name' => 'name', + 'value' => 'value', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'name' => 'setName', + 'value' => 'setValue', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'name' => 'getName', + 'value' => 'getValue', + ]; + + /** + * 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('name', $data ?? [], null); + $this->setIfExists('value', $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['name']) { + $invalidProperties[] = "'name' can't be null"; + } + if (null === $this->container['value']) { + $invalidProperties[] = "'value' can't be null"; + } + + 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 name. + * + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name. + * + * @param string $name Header name as forwarded by your server. Headers must be valid according to RFC 7230 and will be canonicalized according to RFC 9112. + * + */ + public function setName(string $name): self + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets value. + * + */ + public function getValue(): ?string + { + return $this->container['value']; + } + + /** + * Sets value. + * + * @param string $value Value of a single forwarded header entry. Be careful to preserve the original encoding and escaping. For example, do not double escape quotes. + * + */ + public function setValue(string $value): self + { + $this->container['value'] = $value; + + 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/Event.php b/src/Model/Event.php index 10fdec8ff..5ec940cbb 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -32,11 +32,15 @@ use Fingerprint\ServerSdk\ObjectSerializer; /** - * Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. + * An identification event (`source: device`) or an Automation Intelligence event (`source: edge`). + * + * Use `source` to tell them apart. Device events include Identification and device-derived Smart Signals. Edge events do not. + * + * Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. * * @category Class * - * @description Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. + * @description An identification event (`source: device`) or an Automation Intelligence event (`source: edge`). Use `source` to tell them apart. Device events include Identification and device-derived Smart Signals. Edge events do not. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. * * @author Fingerprint * @@ -65,17 +69,25 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $openAPITypes = [ 'event_id' => 'string', 'timestamp' => 'int', + 'linked_id' => 'string', + 'tags' => 'array', + 'url' => 'string', + 'bot_info' => '\Fingerprint\ServerSdk\Model\BotInfo', + 'ip_info' => '\Fingerprint\ServerSdk\Model\IPInfo', + 'proxy' => 'bool', + 'proxy_confidence' => '\Fingerprint\ServerSdk\Model\ProxyConfidence', + 'proxy_details' => '\Fingerprint\ServerSdk\Model\ProxyDetails', + 'vpn' => 'bool', + 'vpn_confidence' => '\Fingerprint\ServerSdk\Model\VpnConfidence', + 'vpn_methods' => '\Fingerprint\ServerSdk\Model\VpnMethods', 'source' => '\Fingerprint\ServerSdk\Model\EventSource', 'incremental_identification_status' => '\Fingerprint\ServerSdk\Model\IncrementalIdentificationStatus', - 'linked_id' => 'string', 'environment_id' => 'string', 'suspect' => 'bool', 'sdk' => '\Fingerprint\ServerSdk\Model\SDK', 'replayed' => 'bool', 'identification' => '\Fingerprint\ServerSdk\Model\Identification', 'supplementary_id_high_recall' => '\Fingerprint\ServerSdk\Model\SupplementaryIDHighRecall', - 'tags' => 'array', - 'url' => 'string', 'bundle_id' => 'string', 'package_name' => 'string', 'ip_address' => 'string', @@ -89,17 +101,12 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'active_call' => 'bool', 'bot' => '\Fingerprint\ServerSdk\Model\BotResult', 'bot_type' => 'string', - 'bot_info' => '\Fingerprint\ServerSdk\Model\BotInfo', 'cloned_app' => 'bool', 'developer_tools' => 'bool', 'emulator' => 'bool', 'factory_reset_timestamp' => 'int', 'frida' => 'bool', 'ip_blocklist' => '\Fingerprint\ServerSdk\Model\IPBlockList', - 'ip_info' => '\Fingerprint\ServerSdk\Model\IPInfo', - 'proxy' => 'bool', - 'proxy_confidence' => '\Fingerprint\ServerSdk\Model\ProxyConfidence', - 'proxy_details' => '\Fingerprint\ServerSdk\Model\ProxyDetails', 'proxy_ml_score' => 'float', 'incognito' => 'bool', 'jailbroken' => 'bool', @@ -117,12 +124,9 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'velocity' => '\Fingerprint\ServerSdk\Model\Velocity', 'virtual_machine' => 'bool', 'virtual_machine_ml_score' => 'float', - 'vpn' => 'bool', - 'vpn_confidence' => '\Fingerprint\ServerSdk\Model\VpnConfidence', 'vpn_ml_score' => 'float', 'vpn_origin_timezone' => 'string', 'vpn_origin_country' => 'string', - 'vpn_methods' => '\Fingerprint\ServerSdk\Model\VpnMethods', 'high_activity_device' => 'bool', 'rare_device' => 'bool', 'rare_device_percentile_bucket' => '\Fingerprint\ServerSdk\Model\RareDevicePercentileBucket', @@ -142,17 +146,25 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $openAPIFormats = [ 'event_id' => null, 'timestamp' => 'int64', + 'linked_id' => null, + 'tags' => null, + 'url' => null, + 'bot_info' => null, + 'ip_info' => null, + 'proxy' => null, + 'proxy_confidence' => null, + 'proxy_details' => null, + 'vpn' => null, + 'vpn_confidence' => null, + 'vpn_methods' => null, 'source' => null, 'incremental_identification_status' => null, - 'linked_id' => null, 'environment_id' => null, 'suspect' => null, 'sdk' => null, 'replayed' => null, 'identification' => null, 'supplementary_id_high_recall' => null, - 'tags' => null, - 'url' => null, 'bundle_id' => null, 'package_name' => null, 'ip_address' => null, @@ -166,17 +178,12 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'active_call' => null, 'bot' => null, 'bot_type' => null, - 'bot_info' => null, 'cloned_app' => null, 'developer_tools' => null, 'emulator' => null, 'factory_reset_timestamp' => 'int64', 'frida' => null, 'ip_blocklist' => null, - 'ip_info' => null, - 'proxy' => null, - 'proxy_confidence' => null, - 'proxy_details' => null, 'proxy_ml_score' => 'double', 'incognito' => null, 'jailbroken' => null, @@ -194,12 +201,9 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'velocity' => null, 'virtual_machine' => null, 'virtual_machine_ml_score' => 'double', - 'vpn' => null, - 'vpn_confidence' => null, 'vpn_ml_score' => 'double', 'vpn_origin_timezone' => null, 'vpn_origin_country' => null, - 'vpn_methods' => null, 'high_activity_device' => null, 'rare_device' => null, 'rare_device_percentile_bucket' => null, @@ -215,17 +219,25 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'event_id' => false, 'timestamp' => false, + 'linked_id' => false, + 'tags' => false, + 'url' => false, + 'bot_info' => false, + 'ip_info' => false, + 'proxy' => false, + 'proxy_confidence' => false, + 'proxy_details' => false, + 'vpn' => false, + 'vpn_confidence' => false, + 'vpn_methods' => false, 'source' => false, 'incremental_identification_status' => false, - 'linked_id' => false, 'environment_id' => false, 'suspect' => false, 'sdk' => false, 'replayed' => false, 'identification' => false, 'supplementary_id_high_recall' => false, - 'tags' => false, - 'url' => false, 'bundle_id' => false, 'package_name' => false, 'ip_address' => false, @@ -239,17 +251,12 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'active_call' => false, 'bot' => false, 'bot_type' => false, - 'bot_info' => false, 'cloned_app' => false, 'developer_tools' => false, 'emulator' => false, 'factory_reset_timestamp' => false, 'frida' => false, 'ip_blocklist' => false, - 'ip_info' => false, - 'proxy' => false, - 'proxy_confidence' => false, - 'proxy_details' => false, 'proxy_ml_score' => false, 'incognito' => false, 'jailbroken' => false, @@ -267,12 +274,9 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'velocity' => false, 'virtual_machine' => false, 'virtual_machine_ml_score' => false, - 'vpn' => false, - 'vpn_confidence' => false, 'vpn_ml_score' => false, 'vpn_origin_timezone' => false, 'vpn_origin_country' => false, - 'vpn_methods' => false, 'high_activity_device' => false, 'rare_device' => false, 'rare_device_percentile_bucket' => false, @@ -296,17 +300,25 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $attributeMap = [ 'event_id' => 'event_id', 'timestamp' => 'timestamp', + 'linked_id' => 'linked_id', + 'tags' => 'tags', + 'url' => 'url', + 'bot_info' => 'bot_info', + 'ip_info' => 'ip_info', + 'proxy' => 'proxy', + 'proxy_confidence' => 'proxy_confidence', + 'proxy_details' => 'proxy_details', + 'vpn' => 'vpn', + 'vpn_confidence' => 'vpn_confidence', + 'vpn_methods' => 'vpn_methods', 'source' => 'source', 'incremental_identification_status' => 'incremental_identification_status', - 'linked_id' => 'linked_id', 'environment_id' => 'environment_id', 'suspect' => 'suspect', 'sdk' => 'sdk', 'replayed' => 'replayed', 'identification' => 'identification', 'supplementary_id_high_recall' => 'supplementary_id_high_recall', - 'tags' => 'tags', - 'url' => 'url', 'bundle_id' => 'bundle_id', 'package_name' => 'package_name', 'ip_address' => 'ip_address', @@ -320,17 +332,12 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'active_call' => 'active_call', 'bot' => 'bot', 'bot_type' => 'bot_type', - 'bot_info' => 'bot_info', 'cloned_app' => 'cloned_app', 'developer_tools' => 'developer_tools', 'emulator' => 'emulator', 'factory_reset_timestamp' => 'factory_reset_timestamp', 'frida' => 'frida', 'ip_blocklist' => 'ip_blocklist', - 'ip_info' => 'ip_info', - 'proxy' => 'proxy', - 'proxy_confidence' => 'proxy_confidence', - 'proxy_details' => 'proxy_details', 'proxy_ml_score' => 'proxy_ml_score', 'incognito' => 'incognito', 'jailbroken' => 'jailbroken', @@ -348,12 +355,9 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'velocity' => 'velocity', 'virtual_machine' => 'virtual_machine', 'virtual_machine_ml_score' => 'virtual_machine_ml_score', - 'vpn' => 'vpn', - 'vpn_confidence' => 'vpn_confidence', 'vpn_ml_score' => 'vpn_ml_score', 'vpn_origin_timezone' => 'vpn_origin_timezone', 'vpn_origin_country' => 'vpn_origin_country', - 'vpn_methods' => 'vpn_methods', 'high_activity_device' => 'high_activity_device', 'rare_device' => 'rare_device', 'rare_device_percentile_bucket' => 'rare_device_percentile_bucket', @@ -369,17 +373,25 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $setters = [ 'event_id' => 'setEventId', 'timestamp' => 'setTimestamp', + 'linked_id' => 'setLinkedId', + 'tags' => 'setTags', + 'url' => 'setUrl', + 'bot_info' => 'setBotInfo', + 'ip_info' => 'setIpInfo', + 'proxy' => 'setProxy', + 'proxy_confidence' => 'setProxyConfidence', + 'proxy_details' => 'setProxyDetails', + 'vpn' => 'setVpn', + 'vpn_confidence' => 'setVpnConfidence', + 'vpn_methods' => 'setVpnMethods', 'source' => 'setSource', 'incremental_identification_status' => 'setIncrementalIdentificationStatus', - 'linked_id' => 'setLinkedId', 'environment_id' => 'setEnvironmentId', 'suspect' => 'setSuspect', 'sdk' => 'setSdk', 'replayed' => 'setReplayed', 'identification' => 'setIdentification', 'supplementary_id_high_recall' => 'setSupplementaryIdHighRecall', - 'tags' => 'setTags', - 'url' => 'setUrl', 'bundle_id' => 'setBundleId', 'package_name' => 'setPackageName', 'ip_address' => 'setIpAddress', @@ -393,17 +405,12 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'active_call' => 'setActiveCall', 'bot' => 'setBot', 'bot_type' => 'setBotType', - 'bot_info' => 'setBotInfo', 'cloned_app' => 'setClonedApp', 'developer_tools' => 'setDeveloperTools', 'emulator' => 'setEmulator', 'factory_reset_timestamp' => 'setFactoryResetTimestamp', 'frida' => 'setFrida', 'ip_blocklist' => 'setIpBlocklist', - 'ip_info' => 'setIpInfo', - 'proxy' => 'setProxy', - 'proxy_confidence' => 'setProxyConfidence', - 'proxy_details' => 'setProxyDetails', 'proxy_ml_score' => 'setProxyMlScore', 'incognito' => 'setIncognito', 'jailbroken' => 'setJailbroken', @@ -421,12 +428,9 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'velocity' => 'setVelocity', 'virtual_machine' => 'setVirtualMachine', 'virtual_machine_ml_score' => 'setVirtualMachineMlScore', - 'vpn' => 'setVpn', - 'vpn_confidence' => 'setVpnConfidence', 'vpn_ml_score' => 'setVpnMlScore', 'vpn_origin_timezone' => 'setVpnOriginTimezone', 'vpn_origin_country' => 'setVpnOriginCountry', - 'vpn_methods' => 'setVpnMethods', 'high_activity_device' => 'setHighActivityDevice', 'rare_device' => 'setRareDevice', 'rare_device_percentile_bucket' => 'setRareDevicePercentileBucket', @@ -442,17 +446,25 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $getters = [ 'event_id' => 'getEventId', 'timestamp' => 'getTimestamp', + 'linked_id' => 'getLinkedId', + 'tags' => 'getTags', + 'url' => 'getUrl', + 'bot_info' => 'getBotInfo', + 'ip_info' => 'getIpInfo', + 'proxy' => 'getProxy', + 'proxy_confidence' => 'getProxyConfidence', + 'proxy_details' => 'getProxyDetails', + 'vpn' => 'getVpn', + 'vpn_confidence' => 'getVpnConfidence', + 'vpn_methods' => 'getVpnMethods', 'source' => 'getSource', 'incremental_identification_status' => 'getIncrementalIdentificationStatus', - 'linked_id' => 'getLinkedId', 'environment_id' => 'getEnvironmentId', 'suspect' => 'getSuspect', 'sdk' => 'getSdk', 'replayed' => 'getReplayed', 'identification' => 'getIdentification', 'supplementary_id_high_recall' => 'getSupplementaryIdHighRecall', - 'tags' => 'getTags', - 'url' => 'getUrl', 'bundle_id' => 'getBundleId', 'package_name' => 'getPackageName', 'ip_address' => 'getIpAddress', @@ -466,17 +478,12 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'active_call' => 'getActiveCall', 'bot' => 'getBot', 'bot_type' => 'getBotType', - 'bot_info' => 'getBotInfo', 'cloned_app' => 'getClonedApp', 'developer_tools' => 'getDeveloperTools', 'emulator' => 'getEmulator', 'factory_reset_timestamp' => 'getFactoryResetTimestamp', 'frida' => 'getFrida', 'ip_blocklist' => 'getIpBlocklist', - 'ip_info' => 'getIpInfo', - 'proxy' => 'getProxy', - 'proxy_confidence' => 'getProxyConfidence', - 'proxy_details' => 'getProxyDetails', 'proxy_ml_score' => 'getProxyMlScore', 'incognito' => 'getIncognito', 'jailbroken' => 'getJailbroken', @@ -494,12 +501,9 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable 'velocity' => 'getVelocity', 'virtual_machine' => 'getVirtualMachine', 'virtual_machine_ml_score' => 'getVirtualMachineMlScore', - 'vpn' => 'getVpn', - 'vpn_confidence' => 'getVpnConfidence', 'vpn_ml_score' => 'getVpnMlScore', 'vpn_origin_timezone' => 'getVpnOriginTimezone', 'vpn_origin_country' => 'getVpnOriginCountry', - 'vpn_methods' => 'getVpnMethods', 'high_activity_device' => 'getHighActivityDevice', 'rare_device' => 'getRareDevice', 'rare_device_percentile_bucket' => 'getRareDevicePercentileBucket', @@ -524,17 +528,25 @@ public function __construct(?array $data = null) { $this->setIfExists('event_id', $data ?? [], null); $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('linked_id', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('bot_info', $data ?? [], null); + $this->setIfExists('ip_info', $data ?? [], null); + $this->setIfExists('proxy', $data ?? [], null); + $this->setIfExists('proxy_confidence', $data ?? [], null); + $this->setIfExists('proxy_details', $data ?? [], null); + $this->setIfExists('vpn', $data ?? [], null); + $this->setIfExists('vpn_confidence', $data ?? [], null); + $this->setIfExists('vpn_methods', $data ?? [], null); $this->setIfExists('source', $data ?? [], null); $this->setIfExists('incremental_identification_status', $data ?? [], null); - $this->setIfExists('linked_id', $data ?? [], null); $this->setIfExists('environment_id', $data ?? [], null); $this->setIfExists('suspect', $data ?? [], null); $this->setIfExists('sdk', $data ?? [], null); $this->setIfExists('replayed', $data ?? [], null); $this->setIfExists('identification', $data ?? [], null); $this->setIfExists('supplementary_id_high_recall', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); $this->setIfExists('bundle_id', $data ?? [], null); $this->setIfExists('package_name', $data ?? [], null); $this->setIfExists('ip_address', $data ?? [], null); @@ -548,17 +560,12 @@ public function __construct(?array $data = null) $this->setIfExists('active_call', $data ?? [], null); $this->setIfExists('bot', $data ?? [], null); $this->setIfExists('bot_type', $data ?? [], null); - $this->setIfExists('bot_info', $data ?? [], null); $this->setIfExists('cloned_app', $data ?? [], null); $this->setIfExists('developer_tools', $data ?? [], null); $this->setIfExists('emulator', $data ?? [], null); $this->setIfExists('factory_reset_timestamp', $data ?? [], null); $this->setIfExists('frida', $data ?? [], null); $this->setIfExists('ip_blocklist', $data ?? [], null); - $this->setIfExists('ip_info', $data ?? [], null); - $this->setIfExists('proxy', $data ?? [], null); - $this->setIfExists('proxy_confidence', $data ?? [], null); - $this->setIfExists('proxy_details', $data ?? [], null); $this->setIfExists('proxy_ml_score', $data ?? [], null); $this->setIfExists('incognito', $data ?? [], null); $this->setIfExists('jailbroken', $data ?? [], null); @@ -576,12 +583,9 @@ public function __construct(?array $data = null) $this->setIfExists('velocity', $data ?? [], null); $this->setIfExists('virtual_machine', $data ?? [], null); $this->setIfExists('virtual_machine_ml_score', $data ?? [], null); - $this->setIfExists('vpn', $data ?? [], null); - $this->setIfExists('vpn_confidence', $data ?? [], null); $this->setIfExists('vpn_ml_score', $data ?? [], null); $this->setIfExists('vpn_origin_timezone', $data ?? [], null); $this->setIfExists('vpn_origin_country', $data ?? [], null); - $this->setIfExists('vpn_methods', $data ?? [], null); $this->setIfExists('high_activity_device', $data ?? [], null); $this->setIfExists('rare_device', $data ?? [], null); $this->setIfExists('rare_device_percentile_bucket', $data ?? [], null); @@ -760,20 +764,263 @@ public function setEventId(string $event_id): self * Gets timestamp. * */ - public function getTimestamp(): ?int + public function getTimestamp(): ?int + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp. + * + * @param int $timestamp timestamp of the event with millisecond precision in Unix time + * + */ + public function setTimestamp(int $timestamp): self + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets linked_id. + * + */ + public function getLinkedId(): ?string + { + return $this->container['linked_id']; + } + + /** + * Sets linked_id. + * + * @param string $linked_id a customer-provided id that was sent with the request + * + */ + public function setLinkedId(string $linked_id): self + { + $this->container['linked_id'] = $linked_id; + + return $this; + } + + /** + * Gets tags. + * + * @return array|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags. + * + * @param array $tags a customer-provided value or an object that was sent with the identification request or updated later + * + */ + public function setTags(array $tags): self + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets url. + * + */ + public function getUrl(): ?string + { + return $this->container['url']; + } + + /** + * Sets url. + * + * @param string $url page URL from which the request was sent + * + */ + public function setUrl(string $url): self + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets bot_info. + * + */ + public function getBotInfo(): ?BotInfo + { + return $this->container['bot_info']; + } + + /** + * Sets bot_info. + * + * @param BotInfo $bot_info bot_info + * + */ + public function setBotInfo(BotInfo $bot_info): self + { + $this->container['bot_info'] = $bot_info; + + return $this; + } + + /** + * Gets ip_info. + * + */ + public function getIpInfo(): ?IPInfo + { + return $this->container['ip_info']; + } + + /** + * Sets ip_info. + * + * @param IPInfo $ip_info ip_info + * + */ + public function setIpInfo(IPInfo $ip_info): self + { + $this->container['ip_info'] = $ip_info; + + return $this; + } + + /** + * Gets proxy. + * + */ + public function getProxy(): ?bool + { + return $this->container['proxy']; + } + + /** + * Sets proxy. + * + * @param bool $proxy IP address was used by a public proxy provider or belonged to a known recent residential proxy + * + */ + public function setProxy(bool $proxy): self + { + $this->container['proxy'] = $proxy; + + return $this; + } + + /** + * Gets proxy_confidence. + * + */ + public function getProxyConfidence(): ProxyConfidence|string|null + { + return $this->container['proxy_confidence']; + } + + /** + * Sets proxy_confidence. + * + * @param ProxyConfidence|string $proxy_confidence proxy_confidence + * + */ + public function setProxyConfidence(ProxyConfidence|string $proxy_confidence): self + { + $this->container['proxy_confidence'] = $proxy_confidence; + + return $this; + } + + /** + * Gets proxy_details. + * + */ + public function getProxyDetails(): ?ProxyDetails + { + return $this->container['proxy_details']; + } + + /** + * Sets proxy_details. + * + * @param ProxyDetails $proxy_details proxy_details + * + */ + public function setProxyDetails(ProxyDetails $proxy_details): self + { + $this->container['proxy_details'] = $proxy_details; + + return $this; + } + + /** + * Gets vpn. + * + */ + public function getVpn(): ?bool + { + return $this->container['vpn']; + } + + /** + * Sets vpn. + * + * @param bool $vpn VPN or other anonymizing service has been used when sending the request + * + */ + public function setVpn(bool $vpn): self + { + $this->container['vpn'] = $vpn; + + return $this; + } + + /** + * Gets vpn_confidence. + * + */ + public function getVpnConfidence(): string|VpnConfidence|null + { + return $this->container['vpn_confidence']; + } + + /** + * Sets vpn_confidence. + * + * @param VpnConfidence|string $vpn_confidence vpn_confidence + * + */ + public function setVpnConfidence(string|VpnConfidence $vpn_confidence): self + { + $this->container['vpn_confidence'] = $vpn_confidence; + + return $this; + } + + /** + * Gets vpn_methods. + * + */ + public function getVpnMethods(): ?VpnMethods { - return $this->container['timestamp']; + return $this->container['vpn_methods']; } /** - * Sets timestamp. + * Sets vpn_methods. * - * @param int $timestamp timestamp of the event with millisecond precision in Unix time + * @param VpnMethods $vpn_methods vpn_methods * */ - public function setTimestamp(int $timestamp): self + public function setVpnMethods(VpnMethods $vpn_methods): self { - $this->container['timestamp'] = $timestamp; + $this->container['vpn_methods'] = $vpn_methods; return $this; } @@ -822,28 +1069,6 @@ public function setIncrementalIdentificationStatus(IncrementalIdentificationStat return $this; } - /** - * Gets linked_id. - * - */ - public function getLinkedId(): ?string - { - return $this->container['linked_id']; - } - - /** - * Sets linked_id. - * - * @param string $linked_id a customer-provided id that was sent with the request - * - */ - public function setLinkedId(string $linked_id): self - { - $this->container['linked_id'] = $linked_id; - - return $this; - } - /** * Gets environment_id. * @@ -878,7 +1103,7 @@ public function getSuspect(): ?bool /** * Sets suspect. * - * @param bool $suspect Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). + * @param bool $suspect Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-update-event). * */ public function setSuspect(bool $suspect): self @@ -976,51 +1201,6 @@ public function setSupplementaryIdHighRecall(SupplementaryIDHighRecall $suppleme return $this; } - /** - * Gets tags. - * - * @return array|null - */ - public function getTags(): ?array - { - return $this->container['tags']; - } - - /** - * Sets tags. - * - * @param array $tags a customer-provided value or an object that was sent with the identification request or updated later - * - */ - public function setTags(array $tags): self - { - $this->container['tags'] = $tags; - - return $this; - } - - /** - * Gets url. - * - */ - public function getUrl(): ?string - { - return $this->container['url']; - } - - /** - * Sets url. - * - * @param string $url page URL from which the request was sent - * - */ - public function setUrl(string $url): self - { - $this->container['url'] = $url; - - return $this; - } - /** * Gets bundle_id. * @@ -1307,28 +1487,6 @@ public function setBotType(string $bot_type): self return $this; } - /** - * Gets bot_info. - * - */ - public function getBotInfo(): ?BotInfo - { - return $this->container['bot_info']; - } - - /** - * Sets bot_info. - * - * @param BotInfo $bot_info bot_info - * - */ - public function setBotInfo(BotInfo $bot_info): self - { - $this->container['bot_info'] = $bot_info; - - return $this; - } - /** * Gets cloned_app. * @@ -1461,94 +1619,6 @@ public function setIpBlocklist(IPBlockList $ip_blocklist): self return $this; } - /** - * Gets ip_info. - * - */ - public function getIpInfo(): ?IPInfo - { - return $this->container['ip_info']; - } - - /** - * Sets ip_info. - * - * @param IPInfo $ip_info ip_info - * - */ - public function setIpInfo(IPInfo $ip_info): self - { - $this->container['ip_info'] = $ip_info; - - return $this; - } - - /** - * Gets proxy. - * - */ - public function getProxy(): ?bool - { - return $this->container['proxy']; - } - - /** - * Sets proxy. - * - * @param bool $proxy IP address was used by a public proxy provider or belonged to a known recent residential proxy - * - */ - public function setProxy(bool $proxy): self - { - $this->container['proxy'] = $proxy; - - return $this; - } - - /** - * Gets proxy_confidence. - * - */ - public function getProxyConfidence(): ProxyConfidence|string|null - { - return $this->container['proxy_confidence']; - } - - /** - * Sets proxy_confidence. - * - * @param ProxyConfidence|string $proxy_confidence proxy_confidence - * - */ - public function setProxyConfidence(ProxyConfidence|string $proxy_confidence): self - { - $this->container['proxy_confidence'] = $proxy_confidence; - - return $this; - } - - /** - * Gets proxy_details. - * - */ - public function getProxyDetails(): ?ProxyDetails - { - return $this->container['proxy_details']; - } - - /** - * Sets proxy_details. - * - * @param ProxyDetails $proxy_details proxy_details - * - */ - public function setProxyDetails(ProxyDetails $proxy_details): self - { - $this->container['proxy_details'] = $proxy_details; - - return $this; - } - /** * Gets proxy_ml_score. * @@ -1944,50 +2014,6 @@ public function setVirtualMachineMlScore(float $virtual_machine_ml_score): self return $this; } - /** - * Gets vpn. - * - */ - public function getVpn(): ?bool - { - return $this->container['vpn']; - } - - /** - * Sets vpn. - * - * @param bool $vpn VPN or other anonymizing service has been used when sending the request - * - */ - public function setVpn(bool $vpn): self - { - $this->container['vpn'] = $vpn; - - return $this; - } - - /** - * Gets vpn_confidence. - * - */ - public function getVpnConfidence(): string|VpnConfidence|null - { - return $this->container['vpn_confidence']; - } - - /** - * Sets vpn_confidence. - * - * @param VpnConfidence|string $vpn_confidence vpn_confidence - * - */ - public function setVpnConfidence(string|VpnConfidence $vpn_confidence): self - { - $this->container['vpn_confidence'] = $vpn_confidence; - - return $this; - } - /** * Gets vpn_ml_score. * @@ -2061,28 +2087,6 @@ public function setVpnOriginCountry(string $vpn_origin_country): self return $this; } - /** - * Gets vpn_methods. - * - */ - public function getVpnMethods(): ?VpnMethods - { - return $this->container['vpn_methods']; - } - - /** - * Sets vpn_methods. - * - * @param VpnMethods $vpn_methods vpn_methods - * - */ - public function setVpnMethods(VpnMethods $vpn_methods): self - { - $this->container['vpn_methods'] = $vpn_methods; - - return $this; - } - /** * Gets high_activity_device. * diff --git a/src/Model/EventEdge.php b/src/Model/EventEdge.php new file mode 100644 index 000000000..fe2e7f7ee --- /dev/null +++ b/src/Model/EventEdge.php @@ -0,0 +1,783 @@ + + * + * @noinspection GrazieInspection + * @noinspection RedundantSuppression + */ +class EventEdge implements ModelInterface, \ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + */ + protected static string $openAPIModelName = 'EventEdge'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $openAPITypes = [ + 'event_id' => 'string', + 'timestamp' => 'int', + 'linked_id' => 'string', + 'tags' => 'array', + 'url' => 'string', + 'bot_info' => '\Fingerprint\ServerSdk\Model\BotInfo', + 'ip_info' => '\Fingerprint\ServerSdk\Model\IPInfo', + 'proxy' => 'bool', + 'proxy_confidence' => '\Fingerprint\ServerSdk\Model\ProxyConfidence', + 'proxy_details' => '\Fingerprint\ServerSdk\Model\ProxyDetails', + 'vpn' => 'bool', + 'vpn_confidence' => '\Fingerprint\ServerSdk\Model\VpnConfidence', + 'vpn_methods' => '\Fingerprint\ServerSdk\Model\VpnMethods', + 'source' => '\Fingerprint\ServerSdk\Model\EventSource', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ + protected static array $openAPIFormats = [ + 'event_id' => null, + 'timestamp' => 'int64', + 'linked_id' => null, + 'tags' => null, + 'url' => null, + 'bot_info' => null, + 'ip_info' => null, + 'proxy' => null, + 'proxy_confidence' => null, + 'proxy_details' => null, + 'vpn' => null, + 'vpn_confidence' => null, + 'vpn_methods' => null, + 'source' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization. + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'event_id' => false, + 'timestamp' => false, + 'linked_id' => false, + 'tags' => false, + 'url' => false, + 'bot_info' => false, + 'ip_info' => false, + 'proxy' => false, + 'proxy_confidence' => false, + 'proxy_details' => false, + 'vpn' => false, + 'vpn_confidence' => false, + 'vpn_methods' => false, + 'source' => 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 = [ + 'event_id' => 'event_id', + 'timestamp' => 'timestamp', + 'linked_id' => 'linked_id', + 'tags' => 'tags', + 'url' => 'url', + 'bot_info' => 'bot_info', + 'ip_info' => 'ip_info', + 'proxy' => 'proxy', + 'proxy_confidence' => 'proxy_confidence', + 'proxy_details' => 'proxy_details', + 'vpn' => 'vpn', + 'vpn_confidence' => 'vpn_confidence', + 'vpn_methods' => 'vpn_methods', + 'source' => 'source', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'event_id' => 'setEventId', + 'timestamp' => 'setTimestamp', + 'linked_id' => 'setLinkedId', + 'tags' => 'setTags', + 'url' => 'setUrl', + 'bot_info' => 'setBotInfo', + 'ip_info' => 'setIpInfo', + 'proxy' => 'setProxy', + 'proxy_confidence' => 'setProxyConfidence', + 'proxy_details' => 'setProxyDetails', + 'vpn' => 'setVpn', + 'vpn_confidence' => 'setVpnConfidence', + 'vpn_methods' => 'setVpnMethods', + 'source' => 'setSource', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'event_id' => 'getEventId', + 'timestamp' => 'getTimestamp', + 'linked_id' => 'getLinkedId', + 'tags' => 'getTags', + 'url' => 'getUrl', + 'bot_info' => 'getBotInfo', + 'ip_info' => 'getIpInfo', + 'proxy' => 'getProxy', + 'proxy_confidence' => 'getProxyConfidence', + 'proxy_details' => 'getProxyDetails', + 'vpn' => 'getVpn', + 'vpn_confidence' => 'getVpnConfidence', + 'vpn_methods' => 'getVpnMethods', + 'source' => 'getSource', + ]; + + /** + * 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('event_id', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('linked_id', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('bot_info', $data ?? [], null); + $this->setIfExists('ip_info', $data ?? [], null); + $this->setIfExists('proxy', $data ?? [], null); + $this->setIfExists('proxy_confidence', $data ?? [], null); + $this->setIfExists('proxy_details', $data ?? [], null); + $this->setIfExists('vpn', $data ?? [], null); + $this->setIfExists('vpn_confidence', $data ?? [], null); + $this->setIfExists('vpn_methods', $data ?? [], null); + $this->setIfExists('source', $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['event_id']) { + $invalidProperties[] = "'event_id' can't be null"; + } + if (null === $this->container['timestamp']) { + $invalidProperties[] = "'timestamp' can't be null"; + } + if (null === $this->container['ip_info']) { + $invalidProperties[] = "'ip_info' can't be null"; + } + if (null === $this->container['source']) { + $invalidProperties[] = "'source' can't be null"; + } + + 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 event_id. + * + */ + public function getEventId(): ?string + { + return $this->container['event_id']; + } + + /** + * Sets event_id. + * + * @param string $event_id Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. + * + */ + public function setEventId(string $event_id): self + { + $this->container['event_id'] = $event_id; + + return $this; + } + + /** + * Gets timestamp. + * + */ + public function getTimestamp(): ?int + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp. + * + * @param int $timestamp timestamp of the event with millisecond precision in Unix time + * + */ + public function setTimestamp(int $timestamp): self + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets linked_id. + * + */ + public function getLinkedId(): ?string + { + return $this->container['linked_id']; + } + + /** + * Sets linked_id. + * + * @param string $linked_id a customer-provided id that was sent with the request + * + */ + public function setLinkedId(string $linked_id): self + { + $this->container['linked_id'] = $linked_id; + + return $this; + } + + /** + * Gets tags. + * + * @return array|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags. + * + * @param array $tags a customer-provided value or an object that was sent with the identification request or updated later + * + */ + public function setTags(array $tags): self + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets url. + * + */ + public function getUrl(): ?string + { + return $this->container['url']; + } + + /** + * Sets url. + * + * @param string $url page URL from which the request was sent + * + */ + public function setUrl(string $url): self + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets bot_info. + * + */ + public function getBotInfo(): ?BotInfo + { + return $this->container['bot_info']; + } + + /** + * Sets bot_info. + * + * @param BotInfo $bot_info bot_info + * + */ + public function setBotInfo(BotInfo $bot_info): self + { + $this->container['bot_info'] = $bot_info; + + return $this; + } + + /** + * Gets ip_info. + * + */ + public function getIpInfo(): ?IPInfo + { + return $this->container['ip_info']; + } + + /** + * Sets ip_info. + * + * @param IPInfo $ip_info ip_info + * + */ + public function setIpInfo(IPInfo $ip_info): self + { + $this->container['ip_info'] = $ip_info; + + return $this; + } + + /** + * Gets proxy. + * + */ + public function getProxy(): ?bool + { + return $this->container['proxy']; + } + + /** + * Sets proxy. + * + * @param bool $proxy IP address was used by a public proxy provider or belonged to a known recent residential proxy + * + */ + public function setProxy(bool $proxy): self + { + $this->container['proxy'] = $proxy; + + return $this; + } + + /** + * Gets proxy_confidence. + * + */ + public function getProxyConfidence(): ProxyConfidence|string|null + { + return $this->container['proxy_confidence']; + } + + /** + * Sets proxy_confidence. + * + * @param ProxyConfidence|string $proxy_confidence proxy_confidence + * + */ + public function setProxyConfidence(ProxyConfidence|string $proxy_confidence): self + { + $this->container['proxy_confidence'] = $proxy_confidence; + + return $this; + } + + /** + * Gets proxy_details. + * + */ + public function getProxyDetails(): ?ProxyDetails + { + return $this->container['proxy_details']; + } + + /** + * Sets proxy_details. + * + * @param ProxyDetails $proxy_details proxy_details + * + */ + public function setProxyDetails(ProxyDetails $proxy_details): self + { + $this->container['proxy_details'] = $proxy_details; + + return $this; + } + + /** + * Gets vpn. + * + */ + public function getVpn(): ?bool + { + return $this->container['vpn']; + } + + /** + * Sets vpn. + * + * @param bool $vpn VPN or other anonymizing service has been used when sending the request + * + */ + public function setVpn(bool $vpn): self + { + $this->container['vpn'] = $vpn; + + return $this; + } + + /** + * Gets vpn_confidence. + * + */ + public function getVpnConfidence(): string|VpnConfidence|null + { + return $this->container['vpn_confidence']; + } + + /** + * Sets vpn_confidence. + * + * @param VpnConfidence|string $vpn_confidence vpn_confidence + * + */ + public function setVpnConfidence(string|VpnConfidence $vpn_confidence): self + { + $this->container['vpn_confidence'] = $vpn_confidence; + + return $this; + } + + /** + * Gets vpn_methods. + * + */ + public function getVpnMethods(): ?VpnMethods + { + return $this->container['vpn_methods']; + } + + /** + * Sets vpn_methods. + * + * @param VpnMethods $vpn_methods vpn_methods + * + */ + public function setVpnMethods(VpnMethods $vpn_methods): self + { + $this->container['vpn_methods'] = $vpn_methods; + + return $this; + } + + /** + * Gets source. + * + */ + public function getSource(): EventSource|string|null + { + return $this->container['source']; + } + + /** + * Sets source. + * + * @param EventSource|string $source source + * + */ + public function setSource(EventSource|string $source): self + { + $this->container['source'] = $source; + + 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/test/Model/EdgeRequestHeadersInnerTest.php b/test/Model/EdgeRequestHeadersInnerTest.php new file mode 100644 index 000000000..260144371 --- /dev/null +++ b/test/Model/EdgeRequestHeadersInnerTest.php @@ -0,0 +1,99 @@ +