From 86e1fb0cc4fb3277f72caf8bb263e4577b9b5f80 Mon Sep 17 00:00:00 2001 From: mcnulty-fp Date: Mon, 10 Aug 2026 20:47:32 +0000 Subject: [PATCH] feat: sync OpenAPI schema to v3.6.0 --- .changeset/add-event-source-field.md | 5 ++ .changeset/add-labels-v3.md | 5 ++ .openapi-generator/FILES | 3 + .schema-version | 2 +- README.md | 1 + docs/Model/Event.md | 1 + docs/Model/EventSource.md | 15 ++++ res/fingerprint-server-api.yaml | 19 +++++ src/Model/Event.php | 29 +++++++ src/Model/EventSource.php | 52 ++++++++++++ test/Model/EventSourceTest.php | 81 +++++++++++++++++++ test/mocks/errors/400_edge_ip_required.json | 6 ++ test/mocks/errors/400_edge_unknown_field.json | 6 ++ .../errors/400_request_read_timeout.json | 6 ++ test/mocks/errors/413_payload_too_large.json | 6 ++ .../errors/429_too_many_search_requests.json | 6 ++ test/mocks/events/get_event_200.json | 1 + .../get_event_200_with_unknown_field.json | 1 + test/mocks/events/get_event_ruleset_200.json | 1 + .../events/get_event_with_bot_info_200.json | 1 + .../mocks/events/get_event_with_edge_200.json | 51 ++++++++++++ .../events/search/get_event_search_200.json | 1 + 22 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 .changeset/add-event-source-field.md create mode 100644 .changeset/add-labels-v3.md create mode 100644 docs/Model/EventSource.md create mode 100644 src/Model/EventSource.php create mode 100644 test/Model/EventSourceTest.php create mode 100644 test/mocks/errors/400_edge_ip_required.json create mode 100644 test/mocks/errors/400_edge_unknown_field.json create mode 100644 test/mocks/errors/400_request_read_timeout.json create mode 100644 test/mocks/errors/413_payload_too_large.json create mode 100644 test/mocks/errors/429_too_many_search_requests.json create mode 100644 test/mocks/events/get_event_with_edge_200.json diff --git a/.changeset/add-event-source-field.md b/.changeset/add-event-source-field.md new file mode 100644 index 00000000..ca3fc77a --- /dev/null +++ b/.changeset/add-event-source-field.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': minor +--- + +Add `source` field to `Event` and `EdgeResponse` to identify how the event was generated (`device` or `edge`) diff --git a/.changeset/add-labels-v3.md b/.changeset/add-labels-v3.md new file mode 100644 index 00000000..00599af3 --- /dev/null +++ b/.changeset/add-labels-v3.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/php-sdk': patch +--- + +**events**: Add `labels` signal to v3 schema \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9a63a2bc..aa9903ce 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -17,6 +17,7 @@ docs/Model/EventRuleAction.md docs/Model/EventRuleActionAllow.md docs/Model/EventRuleActionBlock.md docs/Model/EventSearch.md +docs/Model/EventSource.md docs/Model/EventUpdate.md docs/Model/FontPreferences.md docs/Model/Geolocation.md @@ -82,6 +83,7 @@ src/Model/EventRuleAction.php src/Model/EventRuleActionAllow.php src/Model/EventRuleActionBlock.php src/Model/EventSearch.php +src/Model/EventSource.php src/Model/EventUpdate.php src/Model/FontPreferences.php src/Model/Geolocation.php @@ -135,3 +137,4 @@ src/Sealed/Sealed.php src/Sealed/UnsealAggregateException.php src/Sealed/UnsealException.php src/Webhook/WebhookVerifier.php +test/Model/EventSourceTest.php diff --git a/.schema-version b/.schema-version index 684a941c..c03b60b0 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v3.5.1 \ No newline at end of file +v3.6.0 \ No newline at end of file diff --git a/README.md b/README.md index e7fb41ac..c1bffacb 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,7 @@ Class | Method | HTTP request | Description - [EventRuleActionAllow](docs/Model/EventRuleActionAllow.md) - [EventRuleActionBlock](docs/Model/EventRuleActionBlock.md) - [EventSearch](docs/Model/EventSearch.md) + - [EventSource](docs/Model/EventSource.md) - [EventUpdate](docs/Model/EventUpdate.md) - [FontPreferences](docs/Model/FontPreferences.md) - [Geolocation](docs/Model/Geolocation.md) diff --git a/docs/Model/Event.md b/docs/Model/Event.md index bed1abb8..a64b4f6d 100644 --- a/docs/Model/Event.md +++ b/docs/Model/Event.md @@ -8,6 +8,7 @@ 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. | +**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] diff --git a/docs/Model/EventSource.md b/docs/Model/EventSource.md new file mode 100644 index 00000000..d2025369 --- /dev/null +++ b/docs/Model/EventSource.md @@ -0,0 +1,15 @@ +# EventSource Enum + +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. + + +## Values + +| Name | Value | Description | +| --- | --- | --- | +DEVICE | 'device' | | +EDGE | 'edge' | | + +[[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 2bac3291..f20cd1d4 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -1164,6 +1164,19 @@ 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: @@ -3070,6 +3083,12 @@ components: - android - ios - browser + source: + $ref: '#/components/schemas/EventSource' + x-platforms: + - android + - ios + - browser incremental_identification_status: $ref: '#/components/schemas/IncrementalIdentificationStatus' x-platforms: diff --git a/src/Model/Event.php b/src/Model/Event.php index f52aebe1..10fdec8f 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -65,6 +65,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $openAPITypes = [ 'event_id' => 'string', 'timestamp' => 'int', + 'source' => '\Fingerprint\ServerSdk\Model\EventSource', 'incremental_identification_status' => '\Fingerprint\ServerSdk\Model\IncrementalIdentificationStatus', 'linked_id' => 'string', 'environment_id' => 'string', @@ -141,6 +142,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $openAPIFormats = [ 'event_id' => null, 'timestamp' => 'int64', + 'source' => null, 'incremental_identification_status' => null, 'linked_id' => null, 'environment_id' => null, @@ -213,6 +215,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'event_id' => false, 'timestamp' => false, + 'source' => false, 'incremental_identification_status' => false, 'linked_id' => false, 'environment_id' => false, @@ -293,6 +296,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $attributeMap = [ 'event_id' => 'event_id', 'timestamp' => 'timestamp', + 'source' => 'source', 'incremental_identification_status' => 'incremental_identification_status', 'linked_id' => 'linked_id', 'environment_id' => 'environment_id', @@ -365,6 +369,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $setters = [ 'event_id' => 'setEventId', 'timestamp' => 'setTimestamp', + 'source' => 'setSource', 'incremental_identification_status' => 'setIncrementalIdentificationStatus', 'linked_id' => 'setLinkedId', 'environment_id' => 'setEnvironmentId', @@ -437,6 +442,7 @@ class Event implements ModelInterface, \ArrayAccess, \JsonSerializable protected static array $getters = [ 'event_id' => 'getEventId', 'timestamp' => 'getTimestamp', + 'source' => 'getSource', 'incremental_identification_status' => 'getIncrementalIdentificationStatus', 'linked_id' => 'getLinkedId', 'environment_id' => 'getEnvironmentId', @@ -518,6 +524,7 @@ public function __construct(?array $data = null) { $this->setIfExists('event_id', $data ?? [], null); $this->setIfExists('timestamp', $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); @@ -771,6 +778,28 @@ public function setTimestamp(int $timestamp): self 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; + } + /** * Gets incremental_identification_status. * diff --git a/src/Model/EventSource.php b/src/Model/EventSource.php new file mode 100644 index 00000000..bfeaa525 --- /dev/null +++ b/src/Model/EventSource.php @@ -0,0 +1,52 @@ +