Skip to content

[api-v3] Update Server API schema version v3.7.1 - #281

Merged
JuroUhlar merged 6 commits into
api-v3from
feat/open-api-v3.7.1
Sep 9, 2026
Merged

[api-v3] Update Server API schema version v3.7.1#281
JuroUhlar merged 6 commits into
api-v3from
feat/open-api-v3.7.1

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Syncs the v3 schema to v3.7.1 (from v3.5.2) and regenerates types.

  • Labels.label now required
  • RequestReadTimeout added to ErrorCode
  • 404/429/504 documented on GET /events/search and GET /visitors/{visitor_id}
  • reverse defaults to false (newest first)
  • GET /visitors/{visitor_id} returns at most one item in visits; limit/paginationKey/before deprecated in favor of GET /events/search

The schema diff also drops ~1500 lines of inline examples (absent from the published artifact); no effect on generated types.

Also fixes the smoke tests, which failed on a pre-existing 90-day search window (400: invalid start time) — now 89 days, matching v4's ab99c5e.

Checks: pnpm build, lint, test (83), test:dts pass. Live smoke run needs CI.


🤖 Generated with Claude Code

https://claude.ai/code/session_014UgqDnqUR4FrS2RarTojEt

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014UgqDnqUR4FrS2RarTojEt
@changeset-bot

changeset-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 86c3afd

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 95.73% 224/234
🟢 Branches 89.74% 70/78
🟢 Functions 97.78% 44/45
🟢 Lines 95.69% 222/232

Test suite run success

83 tests passing in 11 suites.

Report generated by 🧪jest coverage report action from 86c3afd

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 95.72 89.74 97.77 95.68
🟢  src 94.56 86.2 96.55 94.53
🟢   index.ts 100 100 100 100
🟢   responseUtils.ts 100 100 100 100
🟢   sealedResults.ts 100 100 100 100
🟢   serverApiClient.ts 89.55 72.72 90 89.55 37,73,140,144,203,234,332
🟢   types.ts 100 100 100 100
🟢   urlUtils.ts 95.23 87.5 100 95.12 37,47
🟡   utils.ts 75 100 100 75 6
🟢   webhook.ts 100 100 100 100
🟢  src/errors 100 100 100 100
🟢   apiErrors.ts 100 100 100 100
🟢   getRetryAfter.ts 100 100 100 100
🟢   handleErrorResponse.ts 100 100 100 100
🟢   unsealError.ts 100 100 100 100

sync.sh fetches the built fingerprint-server-api-compact.yaml (examples
stripped, x-readme removed), not the raw
schemas/fingerprint-server-api-for-sdks.yaml source. Replace the
previously vendored file with a local build of the compact artifact
from the openapi repo at the v3.7.1 release commit, since network
egress to fingerprintjs.github.io is blocked in this environment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014UgqDnqUR4FrS2RarTojEt
@JuroUhlar
JuroUhlar marked this pull request as draft September 7, 2026 11:07
The smoke test computed `start` as exactly `Date.now() - 90 days`,
which the API rejects once clock skew or request latency pushes it
past the 90-day limit ("start time cannot be older than 90 days").
Use an 89-day window instead, matching the fix already applied on
the v4 (main) line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014UgqDnqUR4FrS2RarTojEt
@JuroUhlar
JuroUhlar marked this pull request as ready for review September 8, 2026 10:27
@JuroUhlar
JuroUhlar requested a lite review from Copilot September 8, 2026 10:27

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.

🟡 Changes recommended

The updated schema introduces misleading/deconflicting documentation that should be corrected (and aligned with existing README messaging) before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the Fingerprint Server API v3 OpenAPI schema to v3.7.1 and regenerates the published TypeScript API types, along with a small adjustment to functional smoke tests to avoid an API search-window validation error.

Changes:

  • Sync resources/fingerprint-server-api.yaml to v3.7.1 (new required fields, new error codes/responses, updated endpoint docs/parameters).
  • Regenerate src/generatedApiTypes.ts from the updated schema.
  • Adjust functional smoke tests to use an 89-day search window instead of 90 days.
File summaries
File Description
tests/functional-tests/smokeTests.mjs Updates smoke test time window to avoid server-side “start time too old” validation failures.
src/generatedApiTypes.ts Regenerated TS types/docs based on the updated v3.7.1 OpenAPI schema.
resources/fingerprint-server-api.yaml Main schema sync to v3.7.1 (docs, responses, and schema constraints).
.changeset/update-schema-v3.7.1.md Declares a minor release with a summary of schema/type changes.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread resources/fingerprint-server-api.yaml
Comment thread resources/fingerprint-server-api.yaml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: JuroUhlar <11249993+JuroUhlar@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

@fingerprintjs/fingerprintjs-pro-server-api@6.13.0

Minor Changes

  • Update Server API schema to v3.7.1:

    • Require label on Labels
    • Add RequestReadTimeout to ErrorCode
    • Add 404, 429, and 504 responses to GET /events/search and GET /visitors/{visitor_id}
    • Clarify that reverse on GET /events/search defaults to false (sorts newest first)
    • Clarify that GET /visitors/{visitor_id} currently returns at most one item in visits, and deprecate its limit/paginationKey/before pagination parameters in favor of GET /events/search (d2d900f)

@JuroUhlar
JuroUhlar merged commit ad3ad74 into api-v3 Sep 9, 2026
18 checks passed
@JuroUhlar
JuroUhlar deleted the feat/open-api-v3.7.1 branch September 9, 2026 10:02
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.

5 participants