@sekyro/node 0.1.0-rc.7 → 0.1.0-rc.9
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 +17 -0
- package/README.md +97 -29
- package/dist/{client-DUMp_I-1.d.cts → client-BYoo67F-.d.cts} +210 -41
- package/dist/{client-DUMp_I-1.d.ts → client-BYoo67F-.d.ts} +210 -41
- package/dist/connect/express/index.d.cts +2 -2
- package/dist/connect/express/index.d.ts +2 -2
- package/dist/connect/index.d.cts +2 -2
- package/dist/connect/index.d.ts +2 -2
- package/dist/connect/next/index.d.cts +2 -2
- package/dist/connect/next/index.d.ts +2 -2
- package/dist/{connector-CMHuC-CU.d.ts → connector-B2vbywn2.d.ts} +1 -1
- package/dist/{connector-D1bhSLBl.d.cts → connector-Bo0P3ytq.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +64 -20
- package/dist/index.d.ts +64 -20
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/sbom.cdx.json +7 -7
|
@@ -60,6 +60,28 @@ interface ResultCheckProofs {
|
|
|
60
60
|
captureProof: "verified" | "missing";
|
|
61
61
|
injectionSignals: "clear" | "flagged";
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* How a session proved the person's minimum age: `estimated` (the age check
|
|
65
|
+
* (selfie) step estimated the face over the threshold by a safety margin), or
|
|
66
|
+
* from identity data: `document`, `chip`, `registry` or `eid`.
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
type AgeMethod = "estimated" | "document" | "chip" | "registry" | "eid";
|
|
70
|
+
/**
|
|
71
|
+
* The age answer of a session whose flow sets a minimum age. `over` is the
|
|
72
|
+
* flow's minimum age (the threshold), never the person's age. `estimate`
|
|
73
|
+
* (years, one decimal) and `sigma` (its spread in years) are present only on
|
|
74
|
+
* the API session and webhooks, and only when the age check (selfie) step's
|
|
75
|
+
* "Keep and show the estimated age" setting is on; the result token never
|
|
76
|
+
* carries them.
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
interface AgeResult {
|
|
80
|
+
over: number;
|
|
81
|
+
method: AgeMethod;
|
|
82
|
+
estimate?: number;
|
|
83
|
+
sigma?: number;
|
|
84
|
+
}
|
|
63
85
|
/** Another subject the person's face already matched (duplicate search). @public */
|
|
64
86
|
interface ResultDuplicate {
|
|
65
87
|
subjectId: string;
|
|
@@ -130,17 +152,29 @@ type DecisionReason = "liveness_inconclusive" | "match_inconclusive" | "document
|
|
|
130
152
|
* a clearer photo; population_registry: terminal).
|
|
131
153
|
* @public
|
|
132
154
|
*/
|
|
133
|
-
type EligibilityReason = "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable";
|
|
155
|
+
type EligibilityReason = "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "underage_estimated";
|
|
134
156
|
/**
|
|
135
157
|
* Why a profile-v2 policy ended a session: a session-level
|
|
136
158
|
* {@link SessionFailureReason} (location / anonymizer gate), or the failed
|
|
137
159
|
* check's policy reason — an {@link EligibilityReason} or
|
|
138
|
-
* `
|
|
139
|
-
*
|
|
160
|
+
* `document_id_number_mismatch` (the document belongs to someone other than the
|
|
161
|
+
* ID number the session was created for; `document_nni_mismatch` is its former
|
|
162
|
+
* name, still sent until the API switches to the new names), or `camera_unavailable` (spec 2026-10-29 §3.4: the person had no usable camera,
|
|
140
163
|
* so the live step ended without a capture; the session is rejected at level 0 unless your flow has a fallback).
|
|
141
164
|
* @public
|
|
142
165
|
*/
|
|
143
|
-
type PolicyFailureReason = SessionFailureReason | EligibilityReason | "document_nni_mismatch" | "camera_unavailable";
|
|
166
|
+
type PolicyFailureReason = SessionFailureReason | EligibilityReason | "document_id_number_mismatch" | "document_nni_mismatch" | "camera_unavailable";
|
|
167
|
+
/**
|
|
168
|
+
* The ID-number reasons a check's {@link SessionStep.reason} may carry (person data
|
|
169
|
+
* spec Appendix A.2), each under its generic name and its former Mauritanian name:
|
|
170
|
+
* `id_number_invalid` (`nni_invalid`: the number fails its country's rule),
|
|
171
|
+
* `registry_record_not_found` (`nni_not_found`: no registry record for the number),
|
|
172
|
+
* `id_number_recheck` (`nni_recheck`: the number must be checked again) and
|
|
173
|
+
* `document_id_number_mismatch` (`document_nni_mismatch`). The API sends the former
|
|
174
|
+
* names until it switches to the generic ones; handle both.
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
type IdNumberReason = "id_number_invalid" | "nni_invalid" | "registry_record_not_found" | "nni_not_found" | "id_number_recheck" | "nni_recheck" | "document_id_number_mismatch" | "document_nni_mismatch";
|
|
144
178
|
/**
|
|
145
179
|
* Why the person had no camera (spec 2026-10-29 §3.4, 2026-10-30), when the SDK said: `denied` (the
|
|
146
180
|
* person refused camera access) or `no_camera` (no usable camera: none found, an insecure page or a
|
|
@@ -256,29 +290,90 @@ interface SessionPortraitLink {
|
|
|
256
290
|
interface DeliverOptions {
|
|
257
291
|
/** Delivery channel. */
|
|
258
292
|
channel: "sms" | "whatsapp";
|
|
259
|
-
/** E.164 phone number of the recipient
|
|
293
|
+
/** E.164 phone number of the recipient (`+` and the country code). */
|
|
260
294
|
to: string;
|
|
261
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* An ID number of the person (person data spec §4.1): the document type, the
|
|
298
|
+
* issuing country (ISO 3166-1 alpha-2; alpha-3 is accepted and normalized) and
|
|
299
|
+
* the number (1 to 40 characters, then the issuing country's rule, e.g. the
|
|
300
|
+
* check digit of a Mauritanian national ID number).
|
|
301
|
+
* @public
|
|
302
|
+
*/
|
|
303
|
+
interface SubjectIdNumber {
|
|
304
|
+
type: "national_id" | "passport" | "residence_permit";
|
|
305
|
+
issuingCountry: string;
|
|
306
|
+
number: string;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* The person's name in one script (ISO 15924 code, e.g. `Latn` or `Arab`).
|
|
310
|
+
* @public
|
|
311
|
+
*/
|
|
312
|
+
interface SubjectName {
|
|
313
|
+
script: string;
|
|
314
|
+
/** 1 to 100 characters. */
|
|
315
|
+
given: string;
|
|
316
|
+
/** 1 to 100 characters. */
|
|
317
|
+
family: string;
|
|
318
|
+
/** Optional, 1 to 100 characters. */
|
|
319
|
+
patronymic?: string;
|
|
320
|
+
}
|
|
262
321
|
/**
|
|
263
322
|
* What you already know about the person (`subject` at session create). A
|
|
264
323
|
* closed object: unknown keys are refused (`400`). Every field is optional;
|
|
265
|
-
* `null` or blank counts as absent.
|
|
266
|
-
*
|
|
267
|
-
*
|
|
324
|
+
* `null` or blank counts as absent.
|
|
325
|
+
*
|
|
326
|
+
* The flow decides whether these are checked or believed: in a flow that checks
|
|
327
|
+
* identity from a document or a registry, they are a prefill compared with what
|
|
328
|
+
* the person shows; in a flow that verifies identity from your data (the
|
|
329
|
+
* response's `subjectUse: "reference"`), `idNumber`, `birthDate`, `photo` and
|
|
330
|
+
* `fetchedAt` are required and the record is the reference. `idNumber` binds the
|
|
331
|
+
* session to that identity in both cases: the hosted flow may omit it but cannot
|
|
332
|
+
* substitute another number.
|
|
268
333
|
* @public
|
|
269
334
|
*/
|
|
270
335
|
interface SessionSubjectInput {
|
|
271
|
-
/**
|
|
336
|
+
/** The person's ID number. Binds the session. */
|
|
337
|
+
idNumber?: SubjectIdNumber;
|
|
338
|
+
/**
|
|
339
|
+
* @deprecated Use `idNumber: { type: "national_id", issuingCountry: "MR", number }`.
|
|
340
|
+
* A Mauritanian national ID number (10 digits), as a string.
|
|
341
|
+
*/
|
|
272
342
|
nni?: string;
|
|
273
|
-
/** E.164 phone number
|
|
343
|
+
/** E.164 phone number (`+` and the country code). */
|
|
274
344
|
phone?: string;
|
|
345
|
+
/** Email address, for the email OTP step. */
|
|
346
|
+
email?: string;
|
|
347
|
+
/** Full name, 1 to 200 characters, any script. */
|
|
275
348
|
fullName?: string;
|
|
349
|
+
/** The name per script, at most 4 entries, one per script. */
|
|
350
|
+
names?: SubjectName[];
|
|
276
351
|
/** ISO 8601 date (`YYYY-MM-DD`). */
|
|
277
352
|
birthDate?: string;
|
|
278
|
-
/**
|
|
353
|
+
/** Place of birth, 1 to 120 characters, any script (kept only with a reference record). */
|
|
354
|
+
birthPlace?: string;
|
|
355
|
+
/** `M`, `F` or `X` (ICAO 9303 values; kept only with a reference record). */
|
|
356
|
+
sex?: "M" | "F" | "X";
|
|
357
|
+
/** ISO 3166-1 alpha-2. */
|
|
279
358
|
nationality?: string;
|
|
280
|
-
/**
|
|
359
|
+
/**
|
|
360
|
+
* @deprecated Use `idNumber` with the document's `type` and `issuingCountry`.
|
|
361
|
+
* Identity-document number (1 to 40 characters).
|
|
362
|
+
*/
|
|
281
363
|
documentNumber?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Base64 JPEG or PNG (optional data-URL prefix, at most 1 MB decoded): the
|
|
366
|
+
* face-match reference of a reference record. Refused in a flow that uses the
|
|
367
|
+
* data as a prefill (`422 subject_photo_not_used`).
|
|
368
|
+
*/
|
|
369
|
+
photo?: string;
|
|
370
|
+
/** ISO 8601 date (`YYYY-MM-DD`) of the photo. */
|
|
371
|
+
photoDate?: string;
|
|
372
|
+
/**
|
|
373
|
+
* ISO 8601 date-time: when YOUR system obtained this data. Required with a
|
|
374
|
+
* reference record; at most 24 h old (`422 subject_record_stale`).
|
|
375
|
+
*/
|
|
376
|
+
fetchedAt?: string;
|
|
282
377
|
/**
|
|
283
378
|
* Your own id for this person (1–128 characters). Echoed on the session and
|
|
284
379
|
* its webhooks, and searchable on the subjects API.
|
|
@@ -306,9 +401,11 @@ interface SubjectReuseDocument {
|
|
|
306
401
|
number: string;
|
|
307
402
|
}
|
|
308
403
|
/**
|
|
309
|
-
* Which subject a returning-user session re-verifies
|
|
310
|
-
* subject id, your own `externalRef` (must match a single subject)
|
|
311
|
-
*
|
|
404
|
+
* Which subject a returning-user session re-verifies: exactly ONE of the
|
|
405
|
+
* subject id, your own `externalRef` (must match a single subject) or the
|
|
406
|
+
* `idNumber` the person verified with. `nni` and `document` are the deprecated
|
|
407
|
+
* names of the `idNumber` target: an `nni` is an `idNumber` of type
|
|
408
|
+
* `national_id` issued by `MR`; a `document` has the same three parts.
|
|
312
409
|
* @public
|
|
313
410
|
*/
|
|
314
411
|
type SubjectReuseTarget = ({
|
|
@@ -316,21 +413,33 @@ type SubjectReuseTarget = ({
|
|
|
316
413
|
externalRef?: never;
|
|
317
414
|
nni?: never;
|
|
318
415
|
document?: never;
|
|
416
|
+
idNumber?: never;
|
|
319
417
|
} | {
|
|
320
418
|
externalRef: string;
|
|
321
419
|
subjectId?: never;
|
|
322
420
|
nni?: never;
|
|
323
421
|
document?: never;
|
|
422
|
+
idNumber?: never;
|
|
324
423
|
} | {
|
|
424
|
+
/** @deprecated Use `idNumber` with type `national_id` and issuing country `MR`. */
|
|
325
425
|
nni: string;
|
|
326
426
|
subjectId?: never;
|
|
327
427
|
externalRef?: never;
|
|
328
428
|
document?: never;
|
|
429
|
+
idNumber?: never;
|
|
329
430
|
} | {
|
|
431
|
+
/** @deprecated Use `idNumber` (the same three parts). */
|
|
330
432
|
document: SubjectReuseDocument;
|
|
331
433
|
subjectId?: never;
|
|
332
434
|
externalRef?: never;
|
|
333
435
|
nni?: never;
|
|
436
|
+
idNumber?: never;
|
|
437
|
+
} | {
|
|
438
|
+
idNumber: SubjectIdNumber;
|
|
439
|
+
subjectId?: never;
|
|
440
|
+
externalRef?: never;
|
|
441
|
+
nni?: never;
|
|
442
|
+
document?: never;
|
|
334
443
|
}) & {
|
|
335
444
|
/**
|
|
336
445
|
* `recheck` (default) or `step_up` ({@link SubjectReuseMode}). `step_up` on
|
|
@@ -348,7 +457,7 @@ type ProfileDocumentType = "carte_identite" | "passport" | "residence_permit";
|
|
|
348
457
|
* portrait).
|
|
349
458
|
* @public
|
|
350
459
|
*/
|
|
351
|
-
type ServiceId = "device_network" | "phone_otp" | "email_otp" | "national_eid" | "document" | "nfc" | "population_registry" | "supplied_identity" | "summary_confirm" | "liveness" | "face_match" | "aml_screening" | "face_dedup";
|
|
460
|
+
type ServiceId = "device_network" | "phone_otp" | "email_otp" | "national_eid" | "document" | "nfc" | "population_registry" | "supplied_identity" | "summary_confirm" | "liveness" | "face_match" | "aml_screening" | "face_dedup" | "age_estimation";
|
|
352
461
|
/**
|
|
353
462
|
* The general settings of a flow that a session may override (the flow's
|
|
354
463
|
* `link`, `language` and override policy are not overridable). Country codes
|
|
@@ -490,7 +599,13 @@ interface FlowServiceSettings {
|
|
|
490
599
|
population_registry: {
|
|
491
600
|
/** `'org'` (every registry the org can use, resolved at session create) or registry ids. */
|
|
492
601
|
sources: "org" | Array<"MR.anrpts">;
|
|
602
|
+
/**
|
|
603
|
+
* @deprecated Use `idNumberSource` (same values). Both with different values is
|
|
604
|
+
* `400 override_invalid`.
|
|
605
|
+
*/
|
|
493
606
|
nniSource: "auto" | "typed" | "bound_only";
|
|
607
|
+
/** Where the ID number comes from: `auto`, `typed` (the person types it) or `bound_only` (your `subject.idNumber`). */
|
|
608
|
+
idNumberSource: "auto" | "typed" | "bound_only";
|
|
494
609
|
onUncovered: "skip";
|
|
495
610
|
attempts?: number;
|
|
496
611
|
};
|
|
@@ -516,6 +631,11 @@ interface FlowServiceSettings {
|
|
|
516
631
|
scope: "app" | "org";
|
|
517
632
|
onDuplicate: "review" | "fail";
|
|
518
633
|
};
|
|
634
|
+
/** The age check (selfie); the threshold is the flow's `eligibility.minAge`. */
|
|
635
|
+
age_estimation: {
|
|
636
|
+
/** Keep and show the estimated age ({@link AgeResult.estimate}) on the API session and webhooks. Default `false`. */
|
|
637
|
+
showEstimatedAge?: boolean;
|
|
638
|
+
};
|
|
519
639
|
}
|
|
520
640
|
/**
|
|
521
641
|
* `T` with every property optional, recursively. Arrays are replaced as a
|
|
@@ -639,48 +759,49 @@ interface CreateSessionInput {
|
|
|
639
759
|
*/
|
|
640
760
|
overrides?: FlowOverrides;
|
|
641
761
|
/**
|
|
642
|
-
* Step inputs consumed server-side
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
762
|
+
* Step inputs consumed server-side: an open record of branch facts your flow's
|
|
763
|
+
* conditions read. The person keys below are deprecated: send them in
|
|
764
|
+
* {@link CreateSessionInput.subject} (the response's `warnings` names each one
|
|
765
|
+
* you used). Values are strings (a number is a string, never a JSON number).
|
|
646
766
|
*/
|
|
647
767
|
input?: {
|
|
648
|
-
/**
|
|
768
|
+
/**
|
|
769
|
+
* @deprecated Use `subject.idNumber: { type: "national_id", issuingCountry: "MR", number }`.
|
|
770
|
+
* A Mauritanian national ID number (10 digits), as a string.
|
|
771
|
+
*/
|
|
649
772
|
nni?: string;
|
|
650
|
-
/** E.164 phone number
|
|
773
|
+
/** @deprecated Use `subject.phone`. E.164 phone number. */
|
|
651
774
|
phone?: string;
|
|
652
|
-
/** Email address for the email OTP step
|
|
775
|
+
/** @deprecated Use `subject.email`. Email address for the email OTP step. */
|
|
653
776
|
email?: string;
|
|
777
|
+
/** @deprecated Use `subject.fullName`. */
|
|
654
778
|
fullName?: string;
|
|
655
|
-
/** ISO 8601 date (`YYYY-MM-DD`). */
|
|
779
|
+
/** @deprecated Use `subject.birthDate`. ISO 8601 date (`YYYY-MM-DD`). */
|
|
656
780
|
birthDate?: string;
|
|
657
781
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
*
|
|
661
|
-
*
|
|
662
|
-
* never receives or stores any registry key. `nni` must be set too and
|
|
663
|
-
* equal `suppliedIdentity.nni`. Refused unless Sekyro AI enabled the mode
|
|
664
|
-
* for the environment (`403 supplied_identity_not_entitled`); required in
|
|
665
|
-
* that mode when the app verifies identity (`422 supplied_identity_required`).
|
|
782
|
+
* @deprecated Use the reference keys of `subject` (`idNumber`, `names`,
|
|
783
|
+
* `birthDate`, `photo`, `fetchedAt`, ...), for example from
|
|
784
|
+
* {@link subjectFromNationalRegistry}.
|
|
785
|
+
* Partner-supplied identity data (`supplied` mode only).
|
|
666
786
|
*/
|
|
667
787
|
suppliedIdentity?: SuppliedIdentityRecord;
|
|
668
788
|
} & Record<string, unknown>;
|
|
669
789
|
}
|
|
670
790
|
/**
|
|
791
|
+
* @deprecated Send the record in `subject` instead (`idNumber`, `names`,
|
|
792
|
+
* `birthDate`, `birthPlace`, `sex`, `nationality`, `photo`, `photoDate`,
|
|
793
|
+
* `fetchedAt`), for example from {@link subjectFromNationalRegistry}.
|
|
794
|
+
*
|
|
671
795
|
* Partner-supplied identity data (`sessions.create` `input.suppliedIdentity`):
|
|
672
796
|
* the person's biographic record and photo, as your organization holds them.
|
|
673
|
-
*
|
|
674
|
-
* a registry lookup. Refusals at create: `400 supplied_identity_nni_mismatch`,
|
|
797
|
+
* Refusals at create: `400 supplied_identity_nni_mismatch`,
|
|
675
798
|
* `422 supplied_identity_stale` (`fetchedAt` older than 24 h),
|
|
676
799
|
* `422 supplied_identity_photo_unusable` (not a JPEG/PNG of at most 1 MB within the
|
|
677
|
-
* size bounds).
|
|
678
|
-
* without `input.suppliedIdentity` is `422 supplied_identity_required`. The face on
|
|
679
|
-
* the photo is checked after consent, at the face match (`no_face_reference`).
|
|
800
|
+
* size bounds).
|
|
680
801
|
* @public
|
|
681
802
|
*/
|
|
682
803
|
interface SuppliedIdentityRecord {
|
|
683
|
-
/** 10-digit
|
|
804
|
+
/** 10-digit national ID number, as a string. */
|
|
684
805
|
nni: string;
|
|
685
806
|
firstNameFr: string;
|
|
686
807
|
lastNameFr: string;
|
|
@@ -693,7 +814,7 @@ interface SuppliedIdentityRecord {
|
|
|
693
814
|
birthPlaceFr?: string;
|
|
694
815
|
birthPlaceAr?: string;
|
|
695
816
|
sex?: "M" | "F";
|
|
696
|
-
/** Nationality text as your source holds it
|
|
817
|
+
/** Nationality text as your source holds it. */
|
|
697
818
|
nationalities?: string[];
|
|
698
819
|
/** Base64 JPEG or PNG (at most 1 MB decoded). */
|
|
699
820
|
photo: string;
|
|
@@ -730,6 +851,25 @@ interface CreatedSession {
|
|
|
730
851
|
expiresAt: string;
|
|
731
852
|
/** The levels the flow can reach on its paths; absent from older API versions. */
|
|
732
853
|
levelTarget?: LevelTarget;
|
|
854
|
+
/**
|
|
855
|
+
* How the flow uses the person data you sent: `reference` (believed, your
|
|
856
|
+
* record is the identity reference) or `prefill` (checked against the
|
|
857
|
+
* person's document or registry record). Absent from older API versions.
|
|
858
|
+
*/
|
|
859
|
+
subjectUse?: "reference" | "prefill";
|
|
860
|
+
/** One entry per deprecated request key you used, naming its replacement. Absent otherwise. */
|
|
861
|
+
warnings?: CreatedSessionWarning[];
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* A deprecation warning of {@link CreatedSession.warnings}: `field` is the
|
|
865
|
+
* deprecated key you sent (e.g. `input.nni`), `replacement` the key to send
|
|
866
|
+
* instead (e.g. `subject.idNumber`).
|
|
867
|
+
* @public
|
|
868
|
+
*/
|
|
869
|
+
interface CreatedSessionWarning {
|
|
870
|
+
code: "deprecated_field";
|
|
871
|
+
field: string;
|
|
872
|
+
replacement: string;
|
|
733
873
|
}
|
|
734
874
|
/**
|
|
735
875
|
* Input of {@link SubjectsApi.createSession}: a re-check or step-up session
|
|
@@ -841,7 +981,7 @@ interface EidResult {
|
|
|
841
981
|
interface VerifiedContacts {
|
|
842
982
|
/** From a passed `phone_otp` check. */
|
|
843
983
|
phone?: {
|
|
844
|
-
/** E.164
|
|
984
|
+
/** E.164 (`+` and the country code). */
|
|
845
985
|
number: string;
|
|
846
986
|
/** The channel the code was delivered on. */
|
|
847
987
|
channel: "whatsapp" | "sms";
|
|
@@ -944,6 +1084,11 @@ interface Session {
|
|
|
944
1084
|
verifiedContacts?: VerifiedContacts;
|
|
945
1085
|
/** The national eID that verified this session (the `eid_auth` check passed); absent otherwise. */
|
|
946
1086
|
eid?: EidResult;
|
|
1087
|
+
/**
|
|
1088
|
+
* When the flow sets a minimum age and the session proved it: the threshold
|
|
1089
|
+
* and how it was proved ({@link AgeResult}). Absent otherwise.
|
|
1090
|
+
*/
|
|
1091
|
+
age?: AgeResult;
|
|
947
1092
|
/**
|
|
948
1093
|
* ID mode (`portrait.purpose = id_document`) only: the ICAO portrait can be
|
|
949
1094
|
* fetched with {@link SessionsApi.portrait}.
|
|
@@ -1037,6 +1182,8 @@ interface SessionLifecycleEventData {
|
|
|
1037
1182
|
verifiedContacts?: VerifiedContacts;
|
|
1038
1183
|
/** On `completed` / `failed`: the national eID that verified this session, when one did. */
|
|
1039
1184
|
eid?: EidResult;
|
|
1185
|
+
/** On `completed` / `failed`: the minimum age the session proved and how ({@link AgeResult}), when the flow sets one. */
|
|
1186
|
+
age?: AgeResult;
|
|
1040
1187
|
/**
|
|
1041
1188
|
* ID mode only, on `completed` / `failed`: the ICAO portrait can be fetched
|
|
1042
1189
|
* with {@link SessionsApi.portrait} (the event never carries the image).
|
|
@@ -1264,6 +1411,27 @@ interface SessionReviewDecidedEventData {
|
|
|
1264
1411
|
/** ID mode only: the ICAO portrait can be fetched with {@link SessionsApi.portrait}. */
|
|
1265
1412
|
portraitAvailable?: boolean;
|
|
1266
1413
|
}
|
|
1414
|
+
/**
|
|
1415
|
+
* `usage.threshold_reached`: a usage, credit or spend threshold of the organization's
|
|
1416
|
+
* plan was reached (sent once per threshold and period). `kind` is `tier` for a monthly
|
|
1417
|
+
* tier, or the alert, e.g. `credit_80`, `usage_100_paid`, `spend_cap_reached`.
|
|
1418
|
+
* @public
|
|
1419
|
+
*/
|
|
1420
|
+
interface UsageThresholdReachedEventData {
|
|
1421
|
+
kind: string;
|
|
1422
|
+
/** The verification unit, on per-unit alerts. */
|
|
1423
|
+
unit?: "human_verification" | "identity_verification";
|
|
1424
|
+
/** Percent of the limit (80, 100), or `overage` for the first verification beyond a tier. */
|
|
1425
|
+
threshold?: number | "overage";
|
|
1426
|
+
used?: number;
|
|
1427
|
+
limit?: number;
|
|
1428
|
+
/** UTC month, `YYYY-MM`. */
|
|
1429
|
+
period?: string;
|
|
1430
|
+
/** Tier alerts: verifications that reached a result this month. */
|
|
1431
|
+
confirmed?: number;
|
|
1432
|
+
/** Tier alerts: verifications beyond the tier this month. */
|
|
1433
|
+
overage?: number;
|
|
1434
|
+
}
|
|
1267
1435
|
/**
|
|
1268
1436
|
* Event type → the shape of its `data`. Session events are typed; the
|
|
1269
1437
|
* remaining events carry an open record until their payloads are frozen.
|
|
@@ -1287,6 +1455,7 @@ interface WebhookEventDataMap {
|
|
|
1287
1455
|
"invoice.generated": Record<string, unknown>;
|
|
1288
1456
|
"invoice.paid": Record<string, unknown>;
|
|
1289
1457
|
"invoice.overdue": Record<string, unknown>;
|
|
1458
|
+
"usage.threshold_reached": UsageThresholdReachedEventData;
|
|
1290
1459
|
"webhook.test": Record<string, unknown>;
|
|
1291
1460
|
}
|
|
1292
1461
|
/** Every event a partner endpoint may receive. @public */
|
|
@@ -1482,4 +1651,4 @@ declare class Sekyro {
|
|
|
1482
1651
|
listFlows(): Promise<FlowSummary[]>;
|
|
1483
1652
|
}
|
|
1484
1653
|
|
|
1485
|
-
export { type
|
|
1654
|
+
export { type SessionDeviceSignal as $, type AgeMethod as A, type FlowSummary as B, type CreatedSession as C, DEFAULT_BASE_URL as D, type EidResult as E, type FetchLike as F, type IdentityMethod as G, type LevelTarget as H, type IdNumberReason as I, type ListSessionsQuery as J, type PortraitReportEntry as K, type Locale as L, type MatchReason as M, type ProbeBindingReason as N, type ProbeQuality as O, type PolicyFailureReason as P, type ProfileDocumentType as Q, type ResultRisk as R, Sekyro as S, type RequestOptions as T, type ResultTokenResponse as U, type VerificationLevel as V, type WebhookEventType as W, type RevokeSubjectInput as X, type SekyroOptions as Y, type Session as Z, type SessionDevice as _, type ServiceId as a, type SessionEventData as a0, type SessionFailureReason as a1, type SessionFlowRef as a2, type SessionLifecycleEventData as a3, type SessionLinkInput as a4, type SessionNetwork as a5, type SessionNetworkEvent as a6, type SessionPortraitLink as a7, type SessionReviewDecidedEventData as a8, type SessionStatus as a9, type SessionStep as aa, type SessionStepCompletedEventData as ab, SessionsApi as ac, type Subject as ad, type SubjectAssurance as ae, type SubjectDeletedEventData as af, type SubjectEnrolledEventData as ag, type SubjectIdNumber as ah, type SubjectName as ai, type SubjectReferenceSource as aj, type SubjectReuseDocument as ak, type SubjectReuseTarget as al, type SubjectSession as am, type SubjectSessionInput as an, type SubjectSessionTarget as ao, type SubjectStatus as ap, type SubjectSuspiciousActivityEventData as aq, type SubjectUpdatedEventData as ar, SubjectsApi as as, type SuppliedIdentityRecord as at, type UsageThresholdReachedEventData as au, type VerifiedContacts as av, type WebhookEnvelopeOf as aw, type WebhookEventDataMap as ax, 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 ResultCheckProofs as i, type ResultDuplicate as j, type AgeResult as k, type CameraUnavailableCause as l, type CheckState as m, type CheckType as n, type CreateSessionInput as o, type CreatedSessionWarning as p, DEFAULT_TIMEOUT_MS as q, type DecisionReason as r, type DeepPartial as s, type DeletedSubject as t, type DeliverOptions as u, type DocumentSubstitutionSettings as v, type EligibilityReason as w, type FlowOverridableSettings as x, type FlowOverrides as y, type FlowServiceSettings as z };
|