Skip to content

[SPIKE option C] Flatten Event; additive /edge (INTER-2457) - #272

Draft
JuroUhlar wants to merge 5 commits into
mainfrom
spike/INTER-2457-option-c
Draft

[SPIKE option C] Flatten Event; additive /edge (INTER-2457)#272
JuroUhlar wants to merge 5 commits into
mainfrom
spike/INTER-2457-option-c

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

SPIKE. Do not merge. Option C: Event stays a single model. Generated from openapi#465. Not the earlier all-SDK union spike (#271).

  • Event still has getIdentification() / getSource(). DISCRIMINATOR stays null.
  • Additive analyzeRequestForAutomationIntelligence(EdgeRequest): EventEdge.
  • scripts/sync.sh defaults to fingerprint-server-api-v4-flat.yaml (404 until the OpenAPI package publishes that file).

Known: searchEvents argument order

Last two optional parameters swapped: source, active_callactive_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.php diff is setter order. Assoc-array construction is unchanged.

INTER-2457 option C. Event stays a single model; EventEdge is additive for POST /edge.
@github-actions

Copy link
Copy Markdown
Contributor

🟢 Coverage increased by 89.26%

Code Coverage Report

Coverage Report

St. Category Percentage Covered / Total
🟢 Statements 89.26% 3608 / 4042
🟢 Functions 91.29% 1436 / 1573
Files Coverage
St. File Methods Statements Total Coverage

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /edge API operation (analyzeRequestForAutomationIntelligence) and new models (EdgeRequest, EventEdge, EdgeRequestHeadersInner).
  • Updated Event documentation/ordering and extended schema/docs to account for source-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 thread src/Model/EdgeRequest.php
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 thread res/fingerprint-server-api.yaml Outdated
Comment thread docs/Api/FingerprintApi.md Outdated
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');
}
@JuroUhlar

Copy link
Copy Markdown
Contributor Author

@copilot review

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants