Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/cyan-lobsters-look.md

This file was deleted.

76 changes: 0 additions & 76 deletions .changeset/early-seas-look.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/loud-waves-drive.md

This file was deleted.

15 changes: 0 additions & 15 deletions .changeset/pre.json

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/witty-lobsters-film.md

This file was deleted.

87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,92 @@
# Fingerprint Server API Node.js SDK

## 7.0.0

### Major Changes

- **Server API v3 -> Server API v4 migration**

- All endpoints switched to `/v4/*`.
- `authenticationMode` option removed from `FingerprintServerApiClient`.
- `request_id` renamed to `event_id`.
- Event updates switched to _snake_case_ fields and `PATCH` method.
- Response models switched to _snake_case_ fields.
- **Removed APIs**: `getVisits()`, `getRelatedVisitors()`, and related types (`VisitorHistoryFilter`,
`ErrorPlainResponse`, `VisitorsResponse`, `RelatedVisitorsResponse`, `RelatedVisitorsFilter`, `Webhook`,
`EventsUpdateRequest`).
- **`updateEvent` signature changed**: `(eventId, body)` instead of `(body, eventId)`.

**Migration Notes:**

Use new client when initializing: `FingerprintServerApiClient`:

```diff
- const client = new FingerprintJsServerApiClient(config)
+ const client = new FingerprintServerApiClient(config)
```

`authenticationMode` option removed from constructor:

```diff
const client = new FingerprintServerApiClient({
- authenticationMode: AuthenticationMode.AuthHeader
// ...
})
```

Use `searchEvents` function instead of `getVisits()`:

```diff
- client.getVisits('VISITOR_ID', { limit: 1 })
+ client.searchEvents({ visitor_id: 'VISITOR_ID', limit: 1 })
```

Related visitors API (`getRelatedVisitors()`) is removed:

```diff
- client.getRelatedVisitors({ visitor_id: 'VISITOR_ID' })
```

Use `tags` instead of `tag` for updating an event:

```diff
- const body: EventsUpdateRequest = {
+ const body: EventUpdate = {
- tag: {
+ tags: {
key: 'value',
}
}
```

`updateEvent` parameter order changed to `(eventId, body)`:

```diff
- client.updateEvent(body, 'EVENT_ID')
+ client.updateEvent('EVENT_ID', body)
```

Use simplified and _snake_case_ fields for the response:

```diff
const event = await client.getEvent(eventId)
- console.log(event.products.identification.data.visitorId)
+ console.log(event.identification.visitor_id)
```

Remove any usage of the removed types (`VisitorHistoryFilter`, `ErrorPlainResponse`, `VisitorsResponse`, `RelatedVisitorsResponse`,
`RelatedVisitorsFilter`, `Webhook`, `EventsUpdateRequest`). ([ce2854d](https://github.com/fingerprintjs/node-sdk/commit/ce2854dc064037cd7b2583cb076e671db58d0866))

- **Package renamed** from `@fingerprintjs/fingerprintjs-pro-server-api` to `@fingerprint/node-sdk`. ([385b01b](https://github.com/fingerprintjs/node-sdk/commit/385b01b7f9e49422bc3b5e4a4423b73c241a9766))

### Minor Changes

- Added `options` parameter to the `getEvent` operation. ([3ebae43](https://github.com/fingerprintjs/node-sdk/commit/3ebae43482985bf1100ce9cc499fa5da1caeb45f))

### Patch Changes

- **Performance**: Avoid the overhead of cloning and double-buffering large payloads in the success case. ([bc3fd33](https://github.com/fingerprintjs/node-sdk/commit/bc3fd3385903f17f04015140945e721be39ed438))

## 7.0.0-test.1

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fingerprint/node-sdk",
"version": "7.0.0-test.1",
"version": "7.0.0",
"description": "Node.js wrapper for Fingerprint Server API",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
Expand Down
Loading