[SPIKE option C] Flatten Event; additive /edge (INTER-2457) - #272
Draft
JuroUhlar wants to merge 5 commits into
Draft
[SPIKE option C] Flatten Event; additive /edge (INTER-2457)#272JuroUhlar wants to merge 5 commits into
JuroUhlar wants to merge 5 commits into
Conversation
INTER-2457 option C. Event stays a single model; EventEdge is additive for POST /edge.
Contributor
|
🟢 Coverage increased by 89.26% Code Coverage ReportCoverage Report
Files Coverage
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is a SPIKE regeneration of the PHP SDK from an updated OpenAPI schema that keeps Event as a single flattened model while adding an additive /edge Automation Intelligence endpoint and associated models/documentation.
Changes:
- Added
/edgeAPI operation (analyzeRequestForAutomationIntelligence) and new models (EdgeRequest,EventEdge,EdgeRequestHeadersInner). - Updated
Eventdocumentation/ordering and extended schema/docs to account forsource-distinguished device vs edge events. - Updated generated docs, OpenAPI resource YAML, sync script default schema URL, and webhook mock payload.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/Api/FingerprintApi.php |
Adds /edge operation and updates searchEvents signature/query parameter handling. |
src/Model/EdgeRequest.php |
Introduces request model for /edge payload. |
src/Model/EdgeRequestHeadersInner.php |
Adds header entry model used by EdgeRequest. |
src/Model/EventEdge.php |
Adds response model for /edge results. |
src/Model/Event.php |
Updates Event model docs and reorders/adds edge-related properties in the flattened model. |
res/fingerprint-server-api.yaml |
Updates bundled OpenAPI YAML (new /edge, updated Event description and parameters). |
scripts/sync.sh |
Changes default schema to fingerprint-server-api-v4-flat.yaml. |
README.md |
Adds new endpoint and model links to the README lists. |
docs/Api/FingerprintApi.md |
Documents new /edge method and updates existing endpoint docs. |
docs/Model/EdgeRequest.md |
Documents new EdgeRequest model. |
docs/Model/EdgeRequestHeadersInner.md |
Documents new EdgeRequestHeadersInner model. |
docs/Model/EventEdge.md |
Documents new EventEdge model. |
docs/Model/Event.md |
Updates Event model documentation text and property ordering. |
test/Model/EventEdgeTest.php |
Adds autogenerated model test stub (currently incomplete). |
test/Model/EdgeRequestTest.php |
Adds autogenerated model test stub (currently incomplete). |
test/Model/EdgeRequestHeadersInnerTest.php |
Adds autogenerated model test stub (currently incomplete). |
test/mocks/webhook/webhook_event.json |
Adds source to webhook event fixture. |
.openapi-generator/FILES |
Registers newly generated files in the generator manifest. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+807
to
810
| 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); | ||
|
|
Comment on lines
+124
to
+128
| public function analyzeRequestForAutomationIntelligence(EdgeRequest $edge_request): EventEdge | ||
| { | ||
| list($response) = $this->analyzeRequestForAutomationIntelligenceWithHttpInfo($edge_request); | ||
|
|
||
| return $response; |
Comment on lines
+280
to
+292
| 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"; | ||
| } |
Comment on lines
+61
to
+62
| $edge_request = new \Fingerprint\ServerSdk\Model\EdgeRequest(); // \Fingerprint\ServerSdk\Model\EdgeRequest | ||
|
|
Comment on lines
+73
to
+80
| /** | ||
| * Test "EdgeRequest". | ||
| */ | ||
| public function testEdgeRequest() | ||
| { | ||
| // TODO: implement | ||
| self::markTestIncomplete('Not implemented'); | ||
| } |
Comment on lines
+73
to
+80
| /** | ||
| * Test "EdgeRequestHeadersInner". | ||
| */ | ||
| public function testEdgeRequestHeadersInner() | ||
| { | ||
| // TODO: implement | ||
| self::markTestIncomplete('Not implemented'); | ||
| } |
Comment on lines
+73
to
+80
| /** | ||
| * Test "EventEdge". | ||
| */ | ||
| public function testEventEdge() | ||
| { | ||
| // TODO: implement | ||
| self::markTestIncomplete('Not implemented'); | ||
| } |
Contributor
Author
|
@copilot review |
Contributor
pnpm exec changesetto create a changeset. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SPIKE. Do not merge. Option C: Event stays a single model. Generated from openapi#465. Not the earlier all-SDK union spike (#271).
Eventstill hasgetIdentification()/getSource().DISCRIMINATORstays null.analyzeRequestForAutomationIntelligence(EdgeRequest): EventEdge.scripts/sync.shdefaults tofingerprint-server-api-v4-flat.yaml(404 until the OpenAPI package publishes that file).Known: searchEvents argument order
Last two optional parameters swapped:
source, active_call→active_call, source. Named arguments are fine. Positional callers of those two would mix them up. This is query-parameter order in the schema, not Event flattening.Known: Event property order
Huge
Event.phpdiff is setter order. Assoc-array construction is unchanged.