diff --git a/.changeset/event-discriminated-union.md b/.changeset/event-discriminated-union.md deleted file mode 100644 index fa5de33f..00000000 --- a/.changeset/event-discriminated-union.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@fingerprint/node-sdk': minor ---- - -**types**: ⚠️ Type-breaking change in generated TypeScript types for OpenAPI v3.11.0. No runtime change. - -- `Event` is now a union of `EventDevice` and `EventEdge`, discriminated by `source`. Both are exported. Edge events ([Automation Intelligence API](https://docs.fingerprint.com/reference/automation-intelligence-api)) have no Identification, no `rule_action`, and none of the Smart Signals that need device data. They still have IP, proxy, VPN and bot detection. -- Code that reads device-only fields such as `event.identification` or `event.rule_action` no longer compiles. Check `source` first: - - ```ts - if (event.source === 'device') { - console.log(event.rule_action?.type) - } - ``` - -- `source` is now required on `Event`. Objects typed as `Event` without `source` (for example, test fixtures) no longer compile. For webhook bodies, use the new `Webhook` type. diff --git a/.changeset/event-simulator-browser.md b/.changeset/event-simulator-browser.md deleted file mode 100644 index dfe527a3..00000000 --- a/.changeset/event-simulator-browser.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fingerprint/node-sdk': minor ---- - -**events**: `simulator` also flags Safari running inside the iOS Simulator, not only the native iOS SDK diff --git a/.changeset/webhook-type.md b/.changeset/webhook-type.md deleted file mode 100644 index 4b06dc23..00000000 --- a/.changeset/webhook-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fingerprint/node-sdk': minor ---- - -**webhooks**: Add `Webhook` type for webhook bodies. Same as `Event`, but `source` is optional on device events, because webhooks stored before `source` existed don't have it. diff --git a/CHANGELOG.md b/CHANGELOG.md index 25efa4ff..57b8cbe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Fingerprint Server API Node.js SDK +## 7.11.0 + +### Minor Changes + +- **types**: ⚠️ Type-breaking change in generated TypeScript types for OpenAPI v3.11.0. No runtime change. + + - `Event` is now a union of `EventDevice` and `EventEdge`, discriminated by `source`. Both are exported. Edge events ([Automation Intelligence API](https://docs.fingerprint.com/reference/automation-intelligence-api)) have no Identification, no `rule_action`, and none of the Smart Signals that need device data. They still have IP, proxy, VPN and bot detection. + - Code that reads device-only fields such as `event.identification` or `event.rule_action` no longer compiles. Check `source` first: + + ```ts + if (event.source === 'device') { + console.log(event.rule_action?.type) + } + ``` + + - `source` is now required on `Event`. Objects typed as `Event` without `source` (for example, test fixtures) no longer compile. For webhook bodies, use the new `Webhook` type. ([4b1c846](https://github.com/fingerprintjs/node-sdk/commit/4b1c846a8e8f41f13e2a6a10baec950bbc58993b)) + +- **events**: `simulator` also flags Safari running inside the iOS Simulator, not only the native iOS SDK ([4b1c846](https://github.com/fingerprintjs/node-sdk/commit/4b1c846a8e8f41f13e2a6a10baec950bbc58993b)) +- **webhooks**: Add `Webhook` type for webhook bodies. Same as `Event`, but `source` is optional on device events, because webhooks stored before `source` existed don't have it. ([4b1c846](https://github.com/fingerprintjs/node-sdk/commit/4b1c846a8e8f41f13e2a6a10baec950bbc58993b)) + ## 7.10.0 ### Minor Changes diff --git a/package.json b/package.json index c289309d..1341b70e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fingerprint/node-sdk", - "version": "7.10.0", + "version": "7.11.0", "description": "Node.js wrapper for Fingerprint Server API", "main": "dist/index.cjs", "module": "dist/index.mjs",