@sekyro/node 0.1.0-rc.9 → 1.0.0-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,116 @@
1
1
  # @sekyro/node
2
2
 
3
+ ## 1.0.0-rc.16
4
+
5
+ ### Major Changes
6
+
7
+ - f7c6d79: Breaking: the last four `subjectId` names are gone. 1.0.0-rc.15 sent and accepted them next to `personId`; each now names the person by `personId` only, the `per_` id `GET /people` returns:
8
+
9
+ - `ResultDuplicate.subjectId` is removed: read `ResultDuplicate.personId`, on `Session.duplicates`, the `session.*` webhooks and `VerifiedResult.duplicates`.
10
+ - `FailureIdentification.match.subjectId` is removed: read `FailureIdentification.match.personId`.
11
+ - `SubjectReuseTarget` no longer takes `subjectId`: send `person.reuse.personId`, the `per_` id or the bare id. The API answers `person.reuse.subjectId` with `400 input_field_misplaced`.
12
+ - `verifyResultToken` reads only `person_id` in the token's `sekyro.duplicates[]` and `sekyro.failure_identification.match`; the token no longer carries `subject_id` there.
13
+
14
+ `VerifiedResult.subjectId` still carries the token's `sub`, unchanged. `@sekyro/node/connect` read none of these names and its stored claim (`subject_id`) does not change.
15
+
16
+ ## 1.0.0-rc.15
17
+
18
+ ### Major Changes
19
+
20
+ - ffb87d8: Breaking: the removal release of the partner API contract. Every name below was deprecated in the contract release, and its replacement already works.
21
+
22
+ Removed from the client:
23
+
24
+ - `sekyro.subjects`: use `sekyro.people`, the same object.
25
+ - `sessions.portrait()`: use `sessions.media()` and its `icao_portrait` item, or `sessions.mediaBytes(id, "icao_portrait")`.
26
+ - `subjectFromNationalRegistry()`: use `personFromNationalRegistry()`.
27
+ - `people.createSession({ subjectId })`: use `{ personId }`.
28
+ - The older error envelope (`status: 'error'`, `request_id`) and the snake_case create answer (`hosted_url`, `client_token`, `level_target`) are no longer read.
29
+
30
+ Removed from the types:
31
+
32
+ - `SessionStep.checkType` and `nodeId`: read `service` and `id`.
33
+ - `Session.subjectId`, `subjectConflict`, `eid` and `portraitAvailable`, and the same on the `session.*` webhooks: read `personId`, `personConflict`, `identity.eid` and `media`.
34
+ - `CreateSessionInput.subject`: send `person`. `nni`, `nationality`, `documentNumber` and `reuse.nni` / `reuse.document` leave it: send `idNumber`, `nationalities`, `document` and `reuse.idNumber`. `input` is an open record of the facts your flow's conditions read: a person fact there answers `400 input_field_misplaced`.
35
+ - `CreatedSession.warnings`, `CreatedSessionWarning`.
36
+ - The `session.created`, `session.step.completed`, `session.review_decided` and `subject.*` webhook events and their data types: read `session.completed` / `session.failed` (`decidedBy`, `decision`) and `person.*`. `SessionSupersededEventData.caseId`.
37
+ - The `Subject`, `SubjectsApi`, `SubjectSession`, `SubjectSessionInput`, `SubjectSessionTarget`, `SessionSubjectInput`, `DeletedSubject`, `RevokeSubjectInput`, `SubjectRecord`, `SubjectFromRegistryOptions`, `SubjectReuseDocument`, `SessionPortraitLink`, `SessionEventData` and `SuppliedIdentityRecord` types.
38
+
39
+ `@sekyro/node/connect`: reads `personId` and `personConflict` only, and handles `person.updated` and `person.deleted`. The claim format it stores (`subject_id`) does not change.
40
+
41
+ Added, next to the names they replace (sent and accepted both in this release; the `subjectId` names go in the next removal release):
42
+
43
+ - `ResultDuplicate.personId` (`per_`) on `Session.duplicates`, the `session.*` webhooks and `VerifiedResult.duplicates`; `subjectId` stays, bare.
44
+ - `FailureIdentification.match.personId`; `subjectId` stays, bare.
45
+ - `VerifiedResult.personId`, the `per_` form of the token's `sub`; `subjectId` stays, bare.
46
+ - `person.reuse.personId` on create; `subjectId` is still accepted and, sent with `personId`, must name the same person (`400 subject_input_conflict`).
47
+ - `verifyResultToken` reads the token's `person_id` claims and keeps `subjectId` bare whichever name the token carries.
48
+
49
+ ### Minor Changes
50
+
51
+ - f91053f: Breaking (pre-1.0):
52
+
53
+ - `verifyResultToken` now requires `env`, `"live"` or `"sandbox"`. A missing or other value throws `SekyroResultTokenError` with the new code `env_required`, so a Sandbox token can no longer pass by omission. Read it from your configuration and switch it at go-live. Connectors already pass their configured `env`.
54
+ - `sekyro.listFlows()` is removed. Use `sekyro.flows.list()`, which makes the same call.
55
+
56
+ New:
57
+
58
+ - `sekyro.flows.list()`: the published flows of the key's app.
59
+ - `sekyro.sessions.simulate(id, { outcome, reason }, { idempotencyKey })`: finishes a simulated Sandbox session in one call, for tests and CI, through the real engine.
60
+ - `sekyro.me()`: the key's environment, prefix, scopes, app and organization.
61
+ - `SekyroApiError.fieldErrors`: on a `validation_error`, the refused fields as `{ field, code, expected? }`.
62
+ - `ServiceId` and `FlowOverrides.services` name `portrait`, the service sessions already send on an ICAO photo step.
63
+ - `personConflict` on the session view and the `session.*` webhooks: an identifier of this session belongs to another person. `subjectConflict` is its deprecated twin, and connectors read either.
64
+
65
+ ## 0.1.0-rc.14
66
+
67
+ ### Minor Changes
68
+
69
+ - 4323262: `sekyro.blocks` creates, lists, checks and lifts blocks on devices, people, accounts and contacts. `sekyro.devices` reads a device and marks it shared. `sessions.list` filters by `deviceId`.
70
+
71
+ ### Patch Changes
72
+
73
+ - 96a3b2b: `SessionFailureReason` gains `blocked_by_org`: one of your blocks (a device, a person, an account or a contact) stopped the session. Not retryable, not billed. Nothing returns it until blocks are available to your organization.
74
+ - 6a58d80: Sessions carry `device.deviceId`, an opaque device identity inside your organization and environment.
75
+ - c3c8f3e: `Block.ruleId` is now a `rul_...` id and `Block.ruleVersion` is documented, on blocks made by an automatic rule. `ReviewReason` gains `org_rule`, for a review an organization rule asked for.
76
+
77
+ ## 0.1.0-rc.13
78
+
79
+ ### Minor Changes
80
+
81
+ - a43e198: The connector claim carries the proven minimum age. `SekyroClaim` gains `age_over` (the minimum age of the flow that proved it, never the person's age) and `age_method` (`estimated`, `document`, `chip`, `registry` or `eid`), written from the result token's `sekyro.age` (or from the webhook's `age` when a session has no token), never the estimate or a birth date. The claim keeps the stronger proof of the same person: a birth date from identity data beats an estimate, then the higher minimum age wins; a session below the stored level that proved a stronger age writes the age alone (new merge rule `age_proved`), and a revocation or deletion clears it. Gates take `minAge` and `ageMethods`, and fail with `age_not_proven` (action `verify`) or `age_method_not_allowed` (action `step_up`). `AgeMethod` is exported from `@sekyro/node/connect`. Claims without the fields still parse and pass gates without `minAge`.
82
+
83
+ `@sekyro/connect-clerk` sends `age_over` and `age_method` as `null` when absent, so Clerk's deep merge never keeps a cleared age. Its peer range now requires `@sekyro/node` 0.1.0-rc.13 or later, the release that writes the age, so an older adapter cannot run next to a core that writes an age it would never clear.
84
+ - fcba7e9: AML screening. Sessions on a flow with an AML screening step return `screening` (`SessionScreening`: the lists searched, the dataset version, the best score and the matching list entries, or `{ unavailable }` when the lists could not be searched), on `sessions.get()` and in the `session.completed` and `session.failed` data. `people.screen(id, { lists })` screens a person again (billed as one AML screening; pass an `idempotencyKey`), and `people.screenings(id)`, `people.screeningsPage()` and `people.iterateScreenings()` list their history. `aml.match_flagged` is sent again, with a typed payload (`AmlMatchFlaggedEventData`). `CheckType` gains `aml_screening`, the `aml_screening` flow settings take `onHit: "signal"`, `PolicyFailureReason` gains `aml_hit` and `ReviewReason` gains `screening`.
85
+
86
+ ## 0.1.0-rc.12
87
+
88
+ ### Minor Changes
89
+
90
+ - 6bad03d: `SessionNetworkEvent.anonymizer` gains two optional flags, present only when true: `proxy` (a public open proxy) and `relay` (Apple iCloud Private Relay, a privacy relay that is not counted as an anonymizer). The existing `vpn`, `tor` and `hosting` flags are documented.
91
+ - 71ab282: Partner API contract and identity data. New: `sekyro.people` (`get`, `list`, `listPage`, `iterate`, `revoke`, `delete`, `createSession`) on the `/people` routes, with `per_` ids; `sessions.iterate` and `sessions.listPage` follow the list cursor, and `sessions.list` takes `flow`, `createdAfter`, `createdBefore`, `limit` and `cursor` (it still returns the first page); `sessions.cancel`, `sessions.resendLink` and `sessions.extendLink`; `sessions.media` and `sessions.mediaBytes` for the session's documents, portraits, selfie and clips; `identity` and `media` on sessions, people and the terminal webhooks; `decidedBy`, `personId` and `supersededBy` on sessions; the `person.*` webhook events; the `person` create key with `nationalities`, `document` and per-script `birthPlace`. Errors read the new `{ success: false, error: { requestId } }` envelope and the older one. The connector core handles `person.updated` and `person.deleted` and reads `personId` first.
92
+
93
+ Deprecated for one release, still working: `sekyro.subjects` (the same object as `sekyro.people`), the `Subject*` types, `sessions.portrait` (now served from the media list, scope `sessions:read`) and `portraitAvailable`, `subject` and the `nationality` / `documentNumber` keys, `subjectId` on sessions and webhooks, step `checkType` and `nodeId`, and the `subject.*`, `session.review_decided`, `session.step.completed`, `session.created` and `aml.match_flagged` events. Read `outcome: null` with `supersededBy` instead of `outcome: "superseded"`.
94
+
95
+ `personFromNationalRegistry()` returns a `PersonRecord` for the `person` key, with `nationalities: [code]`; `subjectFromNationalRegistry()`, `SubjectRecord` and `SubjectFromRegistryOptions` stay as deprecated names. `sessions.portrait()` is deprecated for `sessions.media()` and stays on the portrait route for this release. `people.listPage` and the connector's `userDeleted` keep only people whose `externalRefs` include the user id, and the connector handles a person's `subject.*` and `person.*` twin events once. `Session.createdAt` is optional and `Session.eid` is deprecated for `identity.eid`.
96
+
97
+ ## 0.1.0-rc.11
98
+
99
+ ### Minor Changes
100
+
101
+ - 0dd0208: Type the review decision and failure identification fields of the API. `SessionStep.decision` (`SessionStepDecision`: `source`, `mode`, `votes`, `agreement`, `reasons`, `decidedAt`, `sessionId`) on sessions and on the `steps` of the terminal webhooks; `reasons`, `decision` and the terminal fields on `SessionReviewDecidedEventData`; the new `session.superseded` event (`SessionSupersededEventData`) and the `superseded` session outcome; the reason code types `PriorReviewReason` (`prior_review_approved`, `prior_review_rejected`) and `ReviewOutcomeReason` (`superseded_by_retry`, `review_split`); `failureIdentification` (`FailureIdentification`) on sessions and the terminal webhooks. `verifyResultToken` now returns the `sekyro.decision` claim as `decision` and the `sekyro.failure_identification` claim as `failureIdentification`. The `SubjectsApi` notes describe the `404 subject_not_found` answer for a subject that never passed a verification.
102
+
103
+ ## 0.1.0-rc.10
104
+
105
+ ### Minor Changes
106
+
107
+ - c307b12: New `ConnectorOptions.onRevocationUnresolved(event)`: called when Sekyro revokes or deletes a subject and the connector finds no user to clear the claim on. The event (`RevocationUnresolvedEvent`) carries ids only: `subjectId`, `provider` and `reason` (`revoked` or `deleted`), never provider data. It runs after the `revocation_unresolved` log line and telemetry event, in the background; the webhook does not wait for it, and a throw or rejection is caught and reported to `logger` as the new `revocation_handler_failed` event. The provider packages' READMEs and examples show the option.
108
+ - 58359cc: Connector telemetry for the dashboard's Connectors page. `createConnector` sends an `x-sekyro-connector: <provider>/<version>` header on every API call and, after each claim write and each `revocation_unresolved`, posts an id-only event (type, provider, session id, subject id, time; never the claim, a token or user data) in the background with a 2-second timeout and no retry. `telemetry: false` turns both off; custom adapters send nothing. New: `ConnectorOptions.telemetry`, `ProviderAdapter.version`, `SekyroOptions.connector`. The six provider adapters report their package version.
109
+
110
+ ### Patch Changes
111
+
112
+ - ff5cc35: Doc comments: `subjectId` on session views and webhooks, and the result token `sub`, are present only once the subject has passed a verification (the API leaves them out before that).
113
+
3
114
  ## 0.1.0-rc.9
4
115
 
5
116
  ### Minor Changes