-
Notifications
You must be signed in to change notification settings - Fork 11
INTER-1488: Migrate SDK to APIv4 #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
erayaydin
wants to merge
68
commits into
main
Choose a base branch
from
migrate-api-v4-inter-1488
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,816
−9,974
Open
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
f543622
feat(api-v4)!: migrate SDK to APIv4
erayaydin 42cd278
feat: remove accept header for updateEvent
erayaydin a928611
test: fix update event test expected method
erayaydin 558c352
chore: remove unnecessary commented line
erayaydin c6a02cd
docs: expand `searchEvents` JSDoc with new filters
erayaydin 696acb3
docs: fix example naming for error handling
erayaydin 3840e16
chore: update OpenAPI schema version
erayaydin ce2854d
chore: add changeset file for changes
erayaydin 41876b5
docs: update package name for badges
erayaydin 29e8497
docs: use correct package name for installation
erayaydin 8e2343e
chore: remove `getVisitorHistory` example file
erayaydin 174b14d
chore: ignore `fingerprint-server-sdk-smoke-tests`
erayaydin 385b01b
chore: changeset mention about package name change
erayaydin ef98a92
fix: use correct method for updating event
erayaydin ba36af2
fix: use response.ok for all success responses
erayaydin 4f21b23
feat: simplify API requests with `callApi`
erayaydin db81f58
refactor: inline null checks in query serializer
erayaydin ba552dc
chore: use `EVENT_ID` placeholder example dotenv
erayaydin 60156de
feat: restrict allowed methods via `AllowedMethod`
erayaydin 297d679
fix: normalize HTTP method casing (uppercase)
erayaydin 577660b
feat: add body support to `callApi`
erayaydin 6ff4e05
test: remove unnecessary visitor detail tests
erayaydin a9d0af3
chore: fix missing quote for linked_id
erayaydin bfce2df
chore: remove redundant await keyword in callApi
erayaydin 0e4ff4e
refactor: unify response handling and improve type
erayaydin bbf565b
refactor: simplify error handling
erayaydin d967cf2
docs: fix webhook example and description
erayaydin ed6fa01
feat: use Event type instead of EventsGetResponse
erayaydin c073aeb
refactor: remove unnecessary `ErrorJson` type
erayaydin c772f6a
build: revert current version to fix changeset
erayaydin ace5e1c
feat: remove unused `responseUtils`
erayaydin 980ea41
test: add error test cases for serverApiClient
erayaydin 9aeb597
refactor: remove `utils` file
erayaydin 465ae41
test: add error convert coverage
erayaydin 75f7d5e
refactor: remove unnecessary queryString guard
erayaydin 2eb7507
test: add errorTests spec and getRequestPath tests
erayaydin 25fe93c
feat: update openapi schema
erayaydin 67eed4c
chore: update repository URLs to new repo name
erayaydin b75c554
chore: remove unnecessary `WebhookOperationIds`
erayaydin 3ebae43
feat: add rulesetId support to getEvent
erayaydin e034873
test: fix linked_id usage in updateEvent tests
erayaydin 4188e2a
chore: add new keyword to type error throw
erayaydin 3e191a9
test: fix grammar typos
erayaydin 1072171
chore: enter to pre-release mode
erayaydin 68869d7
chore: remove duplicated import
erayaydin a034171
chore: fix inconsistent error message
erayaydin 45c2be5
refactor: move region parameter to inside callApi
erayaydin 7c56c0f
refactor: extract toError utility function
erayaydin 47f3719
docs: add rule_action usage example to getEvent
erayaydin 17862d1
docs: update eventId reference url
erayaydin 799e4fe
docs: fix rule_action handling example
erayaydin e3b6d59
docs: fix update event example linked_id usage
erayaydin 8b30052
refactor: change rulesetId parameter to options
erayaydin d8ebee6
chore: remove `signature change` related note
erayaydin 4677ab6
refactor: remove retryAfter TooManyRequestsError
erayaydin 128f963
chore: silence curl output in sync script
erayaydin 5fbe415
refactor: rename createResponse in test utils
erayaydin 7c3b65a
chore: add `RULESET_ID` to .env.example file
erayaydin c233de2
docs: fix pagination_key usage example
erayaydin 8484c2c
docs: fix ruleset evaluation example in readme
erayaydin 26e1f3e
feat: update OpenAPI schema
erayaydin 0d8d1d6
test: add ruleset evaluation smoke tests
erayaydin 167e25c
refactor: remove retryAfter refs from docs tests
erayaydin 3c7455a
fix: use repeated keys instead of bracket notation
erayaydin 1ff9856
fix: throw on unexpected non-JSON content return
erayaydin 200eddf
refactor!: rename FingerprintJsServerApiClient
erayaydin 5fd1884
fix: check error response shape before throw 429
erayaydin 61cc2c4
chore: fix changeset message for getEvent
erayaydin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| '@fingerprint/fingerprint-server-sdk': major | ||
| --- | ||
|
|
||
| **Server APIv3 -> Server APIv4 migration** | ||
|
|
||
| - Switch all endpoints to `/v4/*`. | ||
| - Remove `authenticationMode` option when initializing `FingerprintServerApiClient`. | ||
| - Rename `request_id` to `event_id`. | ||
| - Use snake_case fields when updating an event. | ||
| - Use `PATCH` method when updating an event. | ||
| - Examples, tests, and docs updated. | ||
|
|
||
| **BREAKING CHANGES** | ||
| - Use new client when initializing: `FingerprintServerApiClient`. | ||
| - `authenticationMode` option removed. | ||
| - Removed `getVisits()` function. | ||
| - Removed `getRelatedVisitors()` function. | ||
| - Removed `VisitorHistoryFilter`, `ErrorPlainResponse`, `VisitorsResponse`, `RelatedVisitorsResponse`, | ||
| `RelatedVisitorsFilter`, `Webhook`, `EventsUpdateRequest` types. | ||
| - Use `tags` instead of `tag` for updating an event. | ||
| - Response models changed. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@fingerprint/fingerprint-server-sdk': major | ||
| --- | ||
|
|
||
| change package name to `@fingerprint/fingerprint-server-sdk` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "mode": "pre", | ||
| "tag": "test", | ||
| "initialVersions": { | ||
| "@fingerprint/fingerprint-server-sdk": "6.10.0", | ||
| "fingerprint-server-sdk-example": "1.0.0", | ||
| "fingerprint-server-sdk-smoke-tests": "2.0.0" | ||
| }, | ||
| "changesets": [] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@fingerprint/fingerprint-server-sdk': minor | ||
| --- | ||
|
|
||
| add `options` parameter to the `getEvent` operation |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v2.12.0 | ||
| v3.0.1 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| API_KEY=<API_KEY> | ||
| VISITOR_ID=<VISITOR_ID> | ||
| REQUEST_ID=<REQUEST_ID> | ||
| EVENT_ID=<EVENT_ID> | ||
| RULESET_ID=<RULESET_ID> | ||
| # "eu" or "ap", "us" is the default | ||
| REGION=<REGION> | ||
| WEBHOOK_SIGNATURE_SECRET=<WEBHOOK_SIGNATURE_SECRET> | ||
| BASE64_KEY=<BASE64_KEY> | ||
| BASE64_SEALED_RESULT=<BASE64_SEALED_RESULT> | ||
| BASE64_SEALED_RESULT=<BASE64_SEALED_RESULT> | ||
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
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.