@sekyro/node 0.1.0-rc.10 → 0.1.0-rc.11
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 +6 -0
- package/README.md +50 -1
- package/dist/{chunk-TAPXGI3Q.js → chunk-H5TUZAV5.js} +1 -1
- package/dist/{client-Hkxwn6ZA.d.cts → client-B7_KS_rG.d.cts} +190 -11
- package/dist/{client-Hkxwn6ZA.d.ts → client-B7_KS_rG.d.ts} +190 -11
- package/dist/connect/express/index.d.cts +2 -2
- package/dist/connect/express/index.d.ts +2 -2
- package/dist/connect/express/index.js +1 -1
- package/dist/connect/index.d.cts +2 -2
- package/dist/connect/index.d.ts +2 -2
- package/dist/connect/index.js +1 -1
- package/dist/connect/next/index.d.cts +2 -2
- package/dist/connect/next/index.d.ts +2 -2
- package/dist/connect/next/index.js +1 -1
- package/dist/{connector-BInF_yHb.d.ts → connector-DHK_cSbs.d.ts} +3 -2
- package/dist/{connector-C4NuetEm.d.cts → connector-S_99xkJf.d.cts} +3 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +29 -3
- package/dist/index.d.ts +29 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/sbom.cdx.json +7 -7
- /package/dist/{chunk-O5GJ3YJV.js → chunk-4JZXIGA6.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sekyro/node
|
|
2
2
|
|
|
3
|
+
## 0.1.0-rc.11
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-rc.10
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -313,6 +313,12 @@ await sekyro.subjects.revoke(subjectId, { reason: "account closed" }); // idempo
|
|
|
313
313
|
await sekyro.subjects.delete(subjectId); // photos, face templates and identifiers; cannot be undone
|
|
314
314
|
```
|
|
315
315
|
|
|
316
|
+
A subject is visible once the person has passed a verification. A subject that
|
|
317
|
+
never passed, an unknown id and a subject of another organization or
|
|
318
|
+
environment all answer the same `404 subject_not_found` on `get`, `revoke` and
|
|
319
|
+
`delete`, and `list` leaves it out (the list can be empty while sessions with
|
|
320
|
+
that `externalRef` exist).
|
|
321
|
+
|
|
316
322
|
`subject.enrolled` (first reference photo stored), `subject.updated` (a linked
|
|
317
323
|
session finished, or `status: 'revoked'`) and `subject.deleted` webhooks are
|
|
318
324
|
typed on the envelope.
|
|
@@ -341,7 +347,10 @@ app.post("/webhooks/sekyro", express.raw({ type: "application/json" }), (req, re
|
|
|
341
347
|
envelope.data; // SessionLifecycleEventData: { sessionId, status, outcome, flow, steps, … }
|
|
342
348
|
break;
|
|
343
349
|
case "session.review_decided":
|
|
344
|
-
envelope.data; // SessionReviewDecidedEventData: { sessionId, outcome: 'pass' | 'fail', reason, flow }
|
|
350
|
+
envelope.data; // SessionReviewDecidedEventData: { sessionId, outcome: 'pass' | 'fail', reason, reasons, decision, flow, … }
|
|
351
|
+
break;
|
|
352
|
+
case "session.superseded":
|
|
353
|
+
envelope.data; // SessionSupersededEventData: { sessionId, supersededBy, caseId, reason: 'superseded_by_retry' }
|
|
345
354
|
break;
|
|
346
355
|
case "session.step.completed":
|
|
347
356
|
envelope.data; // SessionStepCompletedEventData: { sessionId, checkType, state, nodeId, service, flow }
|
|
@@ -370,6 +379,33 @@ app.post("/webhooks/sekyro", express.raw({ type: "application/json" }), (req, re
|
|
|
370
379
|
`stale`; pass `{ now }` to inject a clock in tests.
|
|
371
380
|
- Retried deliveries carry the same envelope `id`; de-duplicate on it.
|
|
372
381
|
|
|
382
|
+
### Review decisions
|
|
383
|
+
|
|
384
|
+
When a person decides a step, the step carries `decision`
|
|
385
|
+
(`SessionStepDecision`) on `sekyro.sessions.get` and on the `steps` of the
|
|
386
|
+
`session.*` webhooks, and `session.review_decided` carries it at the top level:
|
|
387
|
+
`{ source, mode, votes, agreement?, reasons, decidedAt, sessionId? }`.
|
|
388
|
+
`source` is `review` (a reviewer) or `prior_review` (an earlier review of the
|
|
389
|
+
same person, reference photo and face was reused; `sessionId` names your
|
|
390
|
+
earlier session). `mode` is `single` or `dual`, `votes` counts the votes that
|
|
391
|
+
formed it and `agreement` says whether two dual reviewers agreed. `reasons`
|
|
392
|
+
(`ReviewReason[]`: `document_authenticity`, `liveness`, `face_match`,
|
|
393
|
+
`data_mismatch`, `other`) says what failed on a rejection, or what was
|
|
394
|
+
overridden on an approval. The object never names a reviewer or a vote.
|
|
395
|
+
|
|
396
|
+
`session.review_decided` also carries `reasons` and, when the decision ends the
|
|
397
|
+
session, the terminal fields of `session.completed` / `session.failed`
|
|
398
|
+
(`level`, `assurance`, `unit`, `resultToken`, …). A review that reaches its
|
|
399
|
+
deadline sends `reason: 'review_timeout'`, or `review_split` when two reviewers
|
|
400
|
+
disagreed and nobody settled it; those carry no `decision`.
|
|
401
|
+
|
|
402
|
+
Reason codes of these paths: `prior_review_approved` and
|
|
403
|
+
`prior_review_rejected` on a face match settled by an earlier review
|
|
404
|
+
(`PriorReviewReason`), and `superseded_by_retry` and `review_split` on any
|
|
405
|
+
reviewed step (`ReviewOutcomeReason`). A session that waited for a review ends
|
|
406
|
+
with outcome `superseded` when a newer attempt of the same person takes the
|
|
407
|
+
review over: `session.superseded` names the newer session in `supersededBy`.
|
|
408
|
+
|
|
373
409
|
## Result tokens
|
|
374
410
|
|
|
375
411
|
A finished session carries a short-lived ES256 JWT: `resultToken` on the
|
|
@@ -407,6 +443,19 @@ estimated age; with the step's "Keep and show the estimated age" setting on,
|
|
|
407
443
|
an identity provider, map it to the claims `sekyro_age_over` (`result.age.over`)
|
|
408
444
|
and `sekyro_age_method` (`result.age.method`).
|
|
409
445
|
|
|
446
|
+
`result.decision` is the `sekyro.decision` claim (`ResultDecision`, the same
|
|
447
|
+
fields as a step's `decision`), when a person decided a step of the session.
|
|
448
|
+
`result.failureIdentification` is the `sekyro.failure_identification` claim
|
|
449
|
+
(`FailureIdentification`), when the flow's identify-failures setting is on and
|
|
450
|
+
the search found a match: `{ kind, scope, match: { subjectId?, reference?,
|
|
451
|
+
photoId?, tier, score, band }, referenceSource? }`. The same object is the
|
|
452
|
+
`failureIdentification` field of the session and of the terminal webhooks. It
|
|
453
|
+
is a signal, never a decision. `kind: 'other_identity'` is informational only:
|
|
454
|
+
the registry also knows this face under another record, and the person may
|
|
455
|
+
legitimately hold more than one identity document, for example a foreign
|
|
456
|
+
passport, an older document, a second nationality or a residence permit. Do
|
|
457
|
+
not treat this signal alone as fraud: use it as a lead for your own process.
|
|
458
|
+
|
|
410
459
|
## Connect
|
|
411
460
|
|
|
412
461
|
`@sekyro/node/connect` carries the Sekyro proof into your auth provider as one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{evaluateGate}from"./chunk-
|
|
1
|
+
import{evaluateGate}from"./chunk-4JZXIGA6.js";function sekyroGate(source,tokenClaims,policy){let claims=tokenClaims??{};if("gate"in source)return source.gate(claims,policy);let effective=source.env!==void 0&&policy.env===void 0?{...policy,env:source.env}:policy;return evaluateGate(source.provider.readClaimFromToken(claims),effective)}function gateRoute(result,routes){if(result.ok)return null;switch(result.action){case"verify":return routes.verify;case"step_up":return routes.stepUp;case"recheck":return routes.recheck;case"block":return routes.block}}export{sekyroGate,gateRoute};
|
|
@@ -11,9 +11,12 @@ type SessionStatus = "created" | "in_progress" | "review_pending" | "completed"
|
|
|
11
11
|
/**
|
|
12
12
|
* Terminal verdict, orthogonal to {@link SessionStatus}. `null` until the session
|
|
13
13
|
* reaches a terminal status; `review` when a human reviewer must adjudicate.
|
|
14
|
+
* `superseded` (status `completed`): the session waited for a review and a newer
|
|
15
|
+
* attempt of the same person took that review over (`session.superseded`); read
|
|
16
|
+
* the newer session for the verdict.
|
|
14
17
|
* @public
|
|
15
18
|
*/
|
|
16
|
-
type SessionOutcome = "approved" | "review" | "rejected";
|
|
19
|
+
type SessionOutcome = "approved" | "review" | "rejected" | "superseded";
|
|
17
20
|
/**
|
|
18
21
|
* What a finished session proved: `1` a live, real person (human), `2` that
|
|
19
22
|
* person's identity (document, chip, registry or supplied data bound to the
|
|
@@ -191,6 +194,92 @@ type CameraUnavailableCause = "denied" | "no_camera";
|
|
|
191
194
|
* @public
|
|
192
195
|
*/
|
|
193
196
|
type MatchReason = "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "document_number_mismatch";
|
|
197
|
+
/**
|
|
198
|
+
* Reasons a `face_match` {@link SessionStep.reason} carries when an earlier
|
|
199
|
+
* human review of the same person, reference photo and face settled the match
|
|
200
|
+
* score instead of a new review: `prior_review_approved` (the step passed;
|
|
201
|
+
* final) and `prior_review_rejected` (the step failed; retryable, a better
|
|
202
|
+
* capture sends the session to a reviewer again). Both are billed like
|
|
203
|
+
* `review_band`. The step's {@link SessionStep.decision} has
|
|
204
|
+
* `source: "prior_review"` and names your earlier session.
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
type PriorReviewReason = "prior_review_approved" | "prior_review_rejected";
|
|
208
|
+
/**
|
|
209
|
+
* Review outcome reasons any reviewable step may carry: `superseded_by_retry`
|
|
210
|
+
* (a newer attempt of the same person took the review over; the session ends
|
|
211
|
+
* with outcome `superseded`) and `review_split` (two reviewers disagreed and
|
|
212
|
+
* nobody settled it before the review deadline; the session is rejected).
|
|
213
|
+
* Both are billed and retryable: the person may verify again. Neither counts
|
|
214
|
+
* toward the device cooldown.
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
type ReviewOutcomeReason = "superseded_by_retry" | "review_split";
|
|
218
|
+
/**
|
|
219
|
+
* What a review decision is about, on {@link SessionStepDecision.reasons}: the
|
|
220
|
+
* part that failed on a rejection (several may apply), or the check the
|
|
221
|
+
* reviewer overrode on an approval.
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
224
|
+
type ReviewReason = "document_authenticity" | "liveness" | "face_match" | "data_mismatch" | "other";
|
|
225
|
+
/**
|
|
226
|
+
* How a person decided a step: a reviewer (`source: "review"`), or an earlier
|
|
227
|
+
* review of the same person, reference photo and face that was reused
|
|
228
|
+
* (`source: "prior_review"`). Counts and enums only: never a reviewer's
|
|
229
|
+
* identity and never an individual vote.
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
interface SessionStepDecision {
|
|
233
|
+
source: "review" | "prior_review";
|
|
234
|
+
/** One reviewer (`single`) or two independent reviewers (`dual`). */
|
|
235
|
+
mode: "single" | "dual";
|
|
236
|
+
/** How many reviewer votes formed the decision (a third vote settles a dual split). */
|
|
237
|
+
votes: 1 | 2 | 3;
|
|
238
|
+
/** Dual review only: whether the first two reviewers agreed. */
|
|
239
|
+
agreement?: boolean;
|
|
240
|
+
/** What the decision was about ({@link ReviewReason}). */
|
|
241
|
+
reasons: ReviewReason[];
|
|
242
|
+
/** ISO 8601: when the decision was made. */
|
|
243
|
+
decidedAt: string;
|
|
244
|
+
/** `prior_review` only: your earlier session whose review decided this one. */
|
|
245
|
+
sessionId?: string;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* A failure identification match (terminal sessions, when the flow's
|
|
249
|
+
* identify-failures setting is on and the search found one): who the face
|
|
250
|
+
* matches when the face match did not prove the claimed identity against a
|
|
251
|
+
* registry portrait. A signal, never a decision: the session state is
|
|
252
|
+
* unchanged. Ids, enums and numbers only, never a name or an ID number.
|
|
253
|
+
*
|
|
254
|
+
* `kind`: `presenter` (the live person is most likely the matched record),
|
|
255
|
+
* `shown_face` (the photo or screen shown carries the matched record, a
|
|
256
|
+
* possible victim) or `other_identity`. `other_identity` is informational
|
|
257
|
+
* only: the registry also knows this face under another record. The person may
|
|
258
|
+
* legitimately hold more than one identity document, for example a foreign
|
|
259
|
+
* passport, an older document, a second nationality or a residence permit. Do
|
|
260
|
+
* not treat this signal alone as fraud: use it as a lead for your own process.
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
interface FailureIdentification {
|
|
264
|
+
kind: "presenter" | "shown_face" | "other_identity";
|
|
265
|
+
/** The search scope: your verified persons (`org`) or the whole registry index (`registry`). */
|
|
266
|
+
scope: "org" | "registry";
|
|
267
|
+
match: {
|
|
268
|
+
/** Your verified subject for the matched person, when you hold one. */
|
|
269
|
+
subjectId?: string;
|
|
270
|
+
/** An opaque reference of the matched person when you hold no verified subject for it, scoped to your organisation. */
|
|
271
|
+
reference?: string;
|
|
272
|
+
/** The registry photo that matched (an opaque id, scoped to your organisation). */
|
|
273
|
+
photoId?: string;
|
|
274
|
+
/** The grade of that photo: `1` or `2` registry, `3` an older bulk import photo. */
|
|
275
|
+
tier: 1 | 2 | 3;
|
|
276
|
+
/** Calibrated similarity on the face match scale, in [0, 1]. */
|
|
277
|
+
score: number;
|
|
278
|
+
band: "strong" | "moderate";
|
|
279
|
+
};
|
|
280
|
+
/** With `other_identity`: the reference the session passed against. */
|
|
281
|
+
referenceSource?: "registry" | "chip" | "document" | "subject" | "org_supplied";
|
|
282
|
+
}
|
|
194
283
|
/**
|
|
195
284
|
* Face-match probe-binding reason a `face_match` {@link SessionStep.reason} may
|
|
196
285
|
* carry (SDK spec §4.10): `probe_not_from_liveness` — the face image isn't the
|
|
@@ -241,6 +330,11 @@ interface SessionStep {
|
|
|
241
330
|
* information only: it never changes the step's state or reason.
|
|
242
331
|
*/
|
|
243
332
|
probeQuality?: ProbeQuality;
|
|
333
|
+
/**
|
|
334
|
+
* How a person decided this step ({@link SessionStepDecision}); absent when
|
|
335
|
+
* no person decided it.
|
|
336
|
+
*/
|
|
337
|
+
decision?: SessionStepDecision;
|
|
244
338
|
}
|
|
245
339
|
/**
|
|
246
340
|
* The probe-quality measurement on a `face_match` step. Numbers only; `null`
|
|
@@ -1094,6 +1188,12 @@ interface Session {
|
|
|
1094
1188
|
* fetched with {@link SessionsApi.portrait}.
|
|
1095
1189
|
*/
|
|
1096
1190
|
portraitAvailable?: boolean;
|
|
1191
|
+
/**
|
|
1192
|
+
* Terminal sessions: a failure identification match
|
|
1193
|
+
* ({@link FailureIdentification}), present only for a match and only when the
|
|
1194
|
+
* setting is on. A signal, never a decision.
|
|
1195
|
+
*/
|
|
1196
|
+
failureIdentification?: FailureIdentification;
|
|
1097
1197
|
}
|
|
1098
1198
|
/**
|
|
1099
1199
|
* `data` of the terminal / review-pending session lifecycle events
|
|
@@ -1128,8 +1228,11 @@ interface SessionLifecycleEventData {
|
|
|
1128
1228
|
* result tokens are not enabled.
|
|
1129
1229
|
*/
|
|
1130
1230
|
resultToken?: string;
|
|
1131
|
-
/**
|
|
1132
|
-
|
|
1231
|
+
/**
|
|
1232
|
+
* The checks on the session's path (checks of a lane the person did not take
|
|
1233
|
+
* are omitted), each with its {@link SessionStepDecision} when a person decided it.
|
|
1234
|
+
*/
|
|
1235
|
+
steps?: Array<Pick<SessionStep, "checkType" | "state" | "nodeId" | "service" | "decision">>;
|
|
1133
1236
|
/** Sekyro flows: the flow version the session runs (absent on sessions created before flows). */
|
|
1134
1237
|
flow?: SessionFlowRef;
|
|
1135
1238
|
/** Machine-readable reason, when the transition has one. */
|
|
@@ -1189,6 +1292,12 @@ interface SessionLifecycleEventData {
|
|
|
1189
1292
|
* with {@link SessionsApi.portrait} (the event never carries the image).
|
|
1190
1293
|
*/
|
|
1191
1294
|
portraitAvailable?: boolean;
|
|
1295
|
+
/**
|
|
1296
|
+
* On `completed` / `failed`: a failure identification match
|
|
1297
|
+
* ({@link FailureIdentification}), when the setting is on and the search
|
|
1298
|
+
* found one before the event was sent. A signal, never a decision.
|
|
1299
|
+
*/
|
|
1300
|
+
failureIdentification?: FailureIdentification;
|
|
1192
1301
|
}
|
|
1193
1302
|
/**
|
|
1194
1303
|
* `data` of `subject.updated` — either a session linked to the subject reached
|
|
@@ -1383,16 +1492,60 @@ interface SessionStepCompletedEventData {
|
|
|
1383
1492
|
verifiedContacts?: VerifiedContacts;
|
|
1384
1493
|
}
|
|
1385
1494
|
/**
|
|
1386
|
-
* `data` of `session.review_decided
|
|
1387
|
-
*
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1495
|
+
* `data` of `session.review_decided`: a human (or the review deadline) decided
|
|
1496
|
+
* a pending review. `outcome` speaks the REVIEW vocabulary (`pass` | `fail`),
|
|
1497
|
+
* not the session outcome; `reason` is the reviewer's code, `review_timeout`
|
|
1498
|
+
* when the review expired, or `review_split` when two reviewers disagreed and
|
|
1499
|
+
* nobody settled it by the deadline. A reviewer's decision also carries
|
|
1500
|
+
* `reasons`, `decision` and the terminal fields of `session.completed` /
|
|
1501
|
+
* `session.failed`; a deadline carries the ids only.
|
|
1390
1502
|
* @public
|
|
1391
1503
|
*/
|
|
1392
1504
|
interface SessionReviewDecidedEventData {
|
|
1393
1505
|
sessionId: string;
|
|
1394
1506
|
outcome: "pass" | "fail";
|
|
1395
1507
|
reason: string;
|
|
1508
|
+
/** A reviewer's decision: what it was about ({@link ReviewReason}). */
|
|
1509
|
+
reasons?: ReviewReason[];
|
|
1510
|
+
/** A reviewer's decision: how it was formed ({@link SessionStepDecision}; counts only). */
|
|
1511
|
+
decision?: SessionStepDecision;
|
|
1512
|
+
/** The app the session belongs to. */
|
|
1513
|
+
appId?: string;
|
|
1514
|
+
/** What the session proved ({@link VerificationLevel}). */
|
|
1515
|
+
level?: VerificationLevel | null;
|
|
1516
|
+
/** How the level was proved. */
|
|
1517
|
+
assurance?: VerificationAssurance | null;
|
|
1518
|
+
/** The billing unit the session consumed. */
|
|
1519
|
+
unit?: VerificationUnit | null;
|
|
1520
|
+
/** ISO 8601 terminal time. */
|
|
1521
|
+
verifiedAt?: string;
|
|
1522
|
+
/** Device and network risk facts, when recorded. */
|
|
1523
|
+
risk?: ResultRisk;
|
|
1524
|
+
/** Other subjects the face matched, when a duplicate search ran. */
|
|
1525
|
+
duplicates?: ResultDuplicate[];
|
|
1526
|
+
/** The duplicate search could not run. */
|
|
1527
|
+
dedupUnavailable?: true;
|
|
1528
|
+
/** The minimum age the session proved and how ({@link AgeResult}), when the flow sets one. */
|
|
1529
|
+
age?: AgeResult;
|
|
1530
|
+
/** A failure identification match ({@link FailureIdentification}), when the setting is on and the search found one. */
|
|
1531
|
+
failureIdentification?: FailureIdentification;
|
|
1532
|
+
/** The `link.state` the session was created with, echoed back; absent when the session had none. */
|
|
1533
|
+
link?: {
|
|
1534
|
+
state: string;
|
|
1535
|
+
};
|
|
1536
|
+
/** The signed result token (ES256 JWT, valid 10 minutes), when result tokens are enabled. */
|
|
1537
|
+
resultToken?: string;
|
|
1538
|
+
/** The agent reference sent as `assistedBy` at create, for assisted capture. */
|
|
1539
|
+
assistedBy?: {
|
|
1540
|
+
externalRef: string;
|
|
1541
|
+
};
|
|
1542
|
+
/** Dotted paths the session's create-time {@link CreateSessionInput.overrides} changed. */
|
|
1543
|
+
overriddenFields?: string[];
|
|
1544
|
+
/**
|
|
1545
|
+
* On a session created for an existing subject: `recheck` (the same person
|
|
1546
|
+
* again) or `step_up` (raised to identity level). Absent otherwise.
|
|
1547
|
+
*/
|
|
1548
|
+
reuseMode?: SubjectReuseMode;
|
|
1396
1549
|
/** Sekyro flows: the flow version the session runs (absent on sessions created before flows). */
|
|
1397
1550
|
flow?: SessionFlowRef;
|
|
1398
1551
|
/** The subject (person) the session is linked to, once that subject has passed a verification (absent before that). */
|
|
@@ -1411,6 +1564,24 @@ interface SessionReviewDecidedEventData {
|
|
|
1411
1564
|
/** ID mode only: the ICAO portrait can be fetched with {@link SessionsApi.portrait}. */
|
|
1412
1565
|
portraitAvailable?: boolean;
|
|
1413
1566
|
}
|
|
1567
|
+
/**
|
|
1568
|
+
* `data` of `session.superseded`: a session that waited for a review closed
|
|
1569
|
+
* because a newer attempt of the same person took that review over. The
|
|
1570
|
+
* session ends with status `completed` and outcome `superseded`, its review
|
|
1571
|
+
* step failed with `superseded_by_retry`; nothing of it is deleted. Read the
|
|
1572
|
+
* newer session (`supersededBy`) for the verdict.
|
|
1573
|
+
* @public
|
|
1574
|
+
*/
|
|
1575
|
+
interface SessionSupersededEventData {
|
|
1576
|
+
sessionId: string;
|
|
1577
|
+
/** The newer session of the same person that took the review over. */
|
|
1578
|
+
supersededBy: string;
|
|
1579
|
+
/** The review case both sessions belong to (an opaque id). */
|
|
1580
|
+
caseId: string;
|
|
1581
|
+
reason: "superseded_by_retry";
|
|
1582
|
+
/** Your own id for the person, from `subject.externalRef` at create. */
|
|
1583
|
+
externalRef?: string;
|
|
1584
|
+
}
|
|
1414
1585
|
/**
|
|
1415
1586
|
* `usage.threshold_reached`: a usage, credit or spend threshold of the organization's
|
|
1416
1587
|
* plan was reached (sent once per threshold and period). `kind` is `tier` for a monthly
|
|
@@ -1446,6 +1617,7 @@ interface WebhookEventDataMap {
|
|
|
1446
1617
|
"session.completed": SessionLifecycleEventData;
|
|
1447
1618
|
"session.expired": SessionLifecycleEventData;
|
|
1448
1619
|
"session.failed": SessionLifecycleEventData;
|
|
1620
|
+
"session.superseded": SessionSupersededEventData;
|
|
1449
1621
|
"subject.enrolled": SubjectEnrolledEventData;
|
|
1450
1622
|
"subject.updated": SubjectUpdatedEventData;
|
|
1451
1623
|
"subject.suspicious_activity": SubjectSuspiciousActivityEventData;
|
|
@@ -1598,8 +1770,11 @@ declare class SessionsApi {
|
|
|
1598
1770
|
* `sekyro.subjects` — read and manage subjects (the same person across your
|
|
1599
1771
|
* apps). Reads need the `subjects:read` scope, `revoke` / `delete` the
|
|
1600
1772
|
* `subjects:write` scope (keys minted from the dashboard carry both; an older
|
|
1601
|
-
* key answers `403 insufficient_scope`). A
|
|
1602
|
-
*
|
|
1773
|
+
* key answers `403 insufficient_scope`). A subject is visible once the
|
|
1774
|
+
* person has passed a verification: a subject that never passed, an unknown
|
|
1775
|
+
* id and a subject of another organization or environment all answer the same
|
|
1776
|
+
* `404 subject_not_found` on `get`, `revoke` and `delete`, and `list` leaves
|
|
1777
|
+
* it out.
|
|
1603
1778
|
*
|
|
1604
1779
|
* Type-only export, like {@link SessionsApi}: obtained through
|
|
1605
1780
|
* {@link Sekyro.subjects}.
|
|
@@ -1611,7 +1786,11 @@ declare class SubjectsApi {
|
|
|
1611
1786
|
constructor(call: <T>(method: "GET" | "POST" | "DELETE", path: string, body?: unknown, idempotencyKey?: string) => Promise<T>);
|
|
1612
1787
|
/** `GET /subjects/:id` — the subject, its sessions and its returning-user readiness. */
|
|
1613
1788
|
get(id: string): Promise<Subject>;
|
|
1614
|
-
/**
|
|
1789
|
+
/**
|
|
1790
|
+
* `GET /subjects?externalRef=…`: the subjects carrying your own id that have
|
|
1791
|
+
* passed a verification (newest first, at most 50). The list can be empty
|
|
1792
|
+
* while sessions with this `externalRef` exist.
|
|
1793
|
+
*/
|
|
1615
1794
|
list(query: {
|
|
1616
1795
|
externalRef: string;
|
|
1617
1796
|
}): Promise<Subject[]>;
|
|
@@ -1666,4 +1845,4 @@ declare class Sekyro {
|
|
|
1666
1845
|
listFlows(): Promise<FlowSummary[]>;
|
|
1667
1846
|
}
|
|
1668
1847
|
|
|
1669
|
-
export { type
|
|
1848
|
+
export { type ReviewOutcomeReason as $, type AgeMethod as A, type FlowOverridableSettings as B, type CreatedSession as C, DEFAULT_BASE_URL as D, type EidResult as E, type FetchLike as F, type FlowOverrides as G, type FlowServiceSettings as H, type FlowSummary as I, type IdNumberReason as J, type IdentityMethod as K, type Locale as L, type LevelTarget as M, type ListSessionsQuery as N, type MatchReason as O, type PolicyFailureReason as P, type PortraitReportEntry as Q, type ReviewReason as R, Sekyro as S, type PriorReviewReason as T, type ProbeBindingReason as U, type VerificationLevel as V, type WebhookEventType as W, type ProbeQuality as X, type ProfileDocumentType as Y, type RequestOptions as Z, type ResultTokenResponse as _, type ServiceId as a, type RevokeSubjectInput as a0, type SekyroOptions as a1, type Session as a2, type SessionDevice as a3, type SessionDeviceSignal as a4, type SessionEventData as a5, type SessionFailureReason as a6, type SessionFlowRef as a7, type SessionLifecycleEventData as a8, type SessionLinkInput as a9, type SuppliedIdentityRecord as aA, type UsageThresholdReachedEventData as aB, type VerifiedContacts as aC, type WebhookEnvelopeOf as aD, type WebhookEventDataMap as aE, type SessionNetwork as aa, type SessionNetworkEvent as ab, type SessionPortraitLink as ac, type SessionReviewDecidedEventData as ad, type SessionStatus as ae, type SessionStep as af, type SessionStepCompletedEventData as ag, type SessionStepDecision as ah, type SessionSupersededEventData as ai, SessionsApi as aj, type Subject as ak, type SubjectAssurance as al, type SubjectDeletedEventData as am, type SubjectEnrolledEventData as an, type SubjectIdNumber as ao, type SubjectName as ap, type SubjectReferenceSource as aq, type SubjectReuseDocument as ar, type SubjectReuseTarget as as, type SubjectSession as at, type SubjectSessionInput as au, type SubjectSessionTarget as av, type SubjectStatus as aw, type SubjectSuspiciousActivityEventData as ax, type SubjectUpdatedEventData as ay, SubjectsApi as az, type SessionSubjectInput as b, type WebhookEnvelope as c, type SekyroEnvironment as d, type VerificationAssurance as e, type SessionOutcome as f, type VerificationUnit as g, type SubjectReuseMode as h, type ResultRisk as i, type ResultCheckProofs as j, type ResultDuplicate as k, type FailureIdentification as l, type AgeResult as m, type CameraUnavailableCause as n, type CheckState as o, type CheckType as p, type ConnectorIdentity as q, type CreateSessionInput as r, type CreatedSessionWarning as s, DEFAULT_TIMEOUT_MS as t, type DecisionReason as u, type DeepPartial as v, type DeletedSubject as w, type DeliverOptions as x, type DocumentSubstitutionSettings as y, type EligibilityReason as z };
|