@sekyro/node 0.1.0-rc.11 → 0.1.0-rc.13

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.
@@ -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
+ * A session that waited for a review and was taken over by a newer attempt of
15
+ * the same person (`session.superseded`) has `outcome: null` and names that
16
+ * attempt in {@link Session.supersededBy}: read the newer session for the
17
+ * verdict. `superseded` is no longer sent on the session view, its webhooks or
18
+ * the result token; it stays in this union for one release and may still
19
+ * appear on {@link PersonSession.outcome}.
17
20
  * @public
18
21
  */
19
22
  type SessionOutcome = "approved" | "review" | "rejected" | "superseded";
@@ -85,8 +88,9 @@ interface AgeResult {
85
88
  estimate?: number;
86
89
  sigma?: number;
87
90
  }
88
- /** Another subject the person's face already matched (duplicate search). @public */
91
+ /** Another person the face already matched (duplicate search). @public */
89
92
  interface ResultDuplicate {
93
+ /** That person's id, bare (24 hexadecimal characters). */
90
94
  subjectId: string;
91
95
  externalRef?: string;
92
96
  }
@@ -116,7 +120,7 @@ interface SessionLinkInput {
116
120
  */
117
121
  type IdentityMethod = "national_number" | "document_photo" | "document_chip" | "national_eid";
118
122
  /** The verification checks a flow may contain. @public */
119
- type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth";
123
+ type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth" | "aml_screening";
120
124
  /** Per-check execution state within a session. @public */
121
125
  type CheckState = "pending" | "input_required" | "processing" | "passed" | "failed" | "review" | "skipped";
122
126
  /**
@@ -130,10 +134,14 @@ type CheckState = "pending" | "input_required" | "processing" | "passed" | "fail
130
134
  * people than `device.velocity` allows, with `action: 'block'`;
131
135
  * - `device_cooldown` — the device had too many rejected sessions
132
136
  * (`cooldown` tiers); {@link Session.retryAfter} says when it may try again.
133
- * Not billed.
137
+ * Not billed;
138
+ * - `platform_unsupported` — the flow requires a chip read and the person
139
+ * opened the link on the web (the link stays usable in a native app);
140
+ * - `cancelled_by_organization` — you cancelled the session
141
+ * ({@link SessionsApi.cancel}).
134
142
  * @public
135
143
  */
136
- type SessionFailureReason = "location_not_allowed" | "anonymizer_blocked" | "capture_tampered" | "device_velocity_exceeded" | "device_cooldown";
144
+ type SessionFailureReason = "location_not_allowed" | "anonymizer_blocked" | "capture_tampered" | "device_velocity_exceeded" | "device_cooldown" | "platform_unsupported" | "cancelled_by_organization";
137
145
  /**
138
146
  * Profile-v2 decision-mode reasons a check's {@link SessionStep.reason} may
139
147
  * carry when the app decides automatically (`decisions.mode: 'automatic'`)
@@ -163,10 +171,13 @@ type EligibilityReason = "document_type_not_accepted" | "nationality_not_allowed
163
171
  * `document_id_number_mismatch` (the document belongs to someone other than the
164
172
  * ID number the session was created for; `document_nni_mismatch` is its former
165
173
  * 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,
166
- * so the live step ended without a capture; the session is rejected at level 0 unless your flow has a fallback).
174
+ * so the live step ended without a capture; the session is rejected at level 0 unless your flow has a fallback),
175
+ * `subject_face_mismatch` (a step-up whose face did not match the person it was created for), or a review that
176
+ * ended at its deadline: `review_timeout` (nobody decided it) or `review_split` (two reviewers disagreed and
177
+ * nobody settled it); those two carry `decidedBy: "automatic"`.
167
178
  * @public
168
179
  */
169
- type PolicyFailureReason = SessionFailureReason | EligibilityReason | "document_id_number_mismatch" | "document_nni_mismatch" | "camera_unavailable";
180
+ type PolicyFailureReason = SessionFailureReason | EligibilityReason | "document_id_number_mismatch" | "document_nni_mismatch" | "camera_unavailable" | "subject_face_mismatch" | "review_timeout" | "review_split" | "aml_hit";
170
181
  /**
171
182
  * The ID-number reasons a check's {@link SessionStep.reason} may carry (person data
172
183
  * spec Appendix A.2), each under its generic name and its former Mauritanian name:
@@ -208,7 +219,7 @@ type PriorReviewReason = "prior_review_approved" | "prior_review_rejected";
208
219
  /**
209
220
  * Review outcome reasons any reviewable step may carry: `superseded_by_retry`
210
221
  * (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
222
+ * with `outcome: null` and {@link Session.supersededBy}) and `review_split` (two reviewers disagreed and
212
223
  * nobody settled it before the review deadline; the session is rejected).
213
224
  * Both are billed and retryable: the person may verify again. Neither counts
214
225
  * toward the device cooldown.
@@ -221,7 +232,7 @@ type ReviewOutcomeReason = "superseded_by_retry" | "review_split";
221
232
  * reviewer overrode on an approval.
222
233
  * @public
223
234
  */
224
- type ReviewReason = "document_authenticity" | "liveness" | "face_match" | "data_mismatch" | "other";
235
+ type ReviewReason = "document_authenticity" | "liveness" | "face_match" | "data_mismatch" | "screening" | "other";
225
236
  /**
226
237
  * How a person decided a step: a reviewer (`source: "review"`), or an earlier
227
238
  * review of the same person, reference photo and face that was reused
@@ -289,9 +300,8 @@ interface FailureIdentification {
289
300
  */
290
301
  type ProbeBindingReason = "probe_not_from_liveness";
291
302
  /**
292
- * The languages the person being verified sees (hosted flow and SDK screens; spec 2026-10-29 §9). `ar`, `fr` and `en`
293
- * carry every screen; `es`, `pt` and `de` carry the Human verification screens and show English elsewhere. SMS and
294
- * email messages stay in `ar`, `fr` or `en` (English for the three others).
303
+ * The languages the person being verified sees (hosted flow and SDK screens; spec 2026-10-29 §9), every screen in
304
+ * each. SMS and email messages stay in `ar`, `fr` or `en` (English for the three others).
295
305
  * @public
296
306
  */
297
307
  type Locale = "ar" | "fr" | "en" | "es" | "pt" | "de";
@@ -303,12 +313,18 @@ type SekyroEnvironment = "sandbox" | "live";
303
313
  * @public
304
314
  */
305
315
  interface SessionStep {
316
+ /** The node of your flow this step belongs to (e.g. `n_live`): the name of the step. Absent on sessions created before flows. */
317
+ id?: string;
318
+ /** What the step runs: the service of its node. Absent on sessions created before flows. */
319
+ service?: ServiceId;
320
+ /**
321
+ * @deprecated Read {@link SessionStep.service}. The internal check this step
322
+ * runs; removed from the API after this release.
323
+ */
306
324
  checkType: CheckType;
307
325
  state: CheckState;
308
- /** Sekyro flows: the flow node this check belongs to (e.g. `n_live`). */
326
+ /** @deprecated Read {@link SessionStep.id}, which holds the same node id. */
309
327
  nodeId?: string;
310
- /** Sekyro flows: the service of that node. */
311
- service?: ServiceId;
312
328
  /** Sekyro flows: the check failed and the flow's fallback took over. */
313
329
  handled?: true;
314
330
  /** Machine-readable failure/review reason, when the check has one. */
@@ -335,6 +351,8 @@ interface SessionStep {
335
351
  * no person decided it.
336
352
  */
337
353
  decision?: SessionStepDecision;
354
+ /** The step last ran simulated in the Sandbox (no paid or external service). */
355
+ simulated?: true;
338
356
  }
339
357
  /**
340
358
  * The probe-quality measurement on a `face_match` step. Numbers only; `null`
@@ -369,6 +387,7 @@ interface PortraitReportEntry {
369
387
  /**
370
388
  * A short-lived link to a session's ICAO portrait (480×640 JPEG), from
371
389
  * {@link SessionsApi.portrait}. Download it before `expiresAt`; never store the URL.
390
+ * @deprecated Use {@link SessionsApi.media} and its `icao_portrait` item ({@link MediaItem}).
372
391
  * @public
373
392
  */
374
393
  interface SessionPortraitLink {
@@ -413,7 +432,28 @@ interface SubjectName {
413
432
  patronymic?: string;
414
433
  }
415
434
  /**
416
- * What you already know about the person (`subject` at session create). A
435
+ * One birth place entry of {@link SessionPersonInput.birthPlace}: the place in
436
+ * one script (ISO 15924 code, e.g. `Latn` or `Arab`), 1 to 120 characters.
437
+ * @public
438
+ */
439
+ interface PersonBirthPlaceInput {
440
+ script: string;
441
+ value: string;
442
+ }
443
+ /**
444
+ * The person's identity document ({@link SessionPersonInput.document}): its
445
+ * type, issuing country (ISO 3166-1 alpha-2 or alpha-3) and the number it
446
+ * prints (1 to 40 letters, digits, spaces or hyphens). Compared with what the
447
+ * capture reads; it does not bind the session (`idNumber` does).
448
+ * @public
449
+ */
450
+ interface PersonDocumentInput {
451
+ type: "national_id" | "passport" | "residence_permit";
452
+ issuingCountry: string;
453
+ number: string;
454
+ }
455
+ /**
456
+ * What you already know about the person (`person` at session create). A
417
457
  * closed object: unknown keys are refused (`400`). Every field is optional;
418
458
  * `null` or blank counts as absent.
419
459
  *
@@ -426,7 +466,7 @@ interface SubjectName {
426
466
  * substitute another number.
427
467
  * @public
428
468
  */
429
- interface SessionSubjectInput {
469
+ interface SessionPersonInput {
430
470
  /** The person's ID number. Binds the session. */
431
471
  idNumber?: SubjectIdNumber;
432
472
  /**
@@ -444,14 +484,24 @@ interface SessionSubjectInput {
444
484
  names?: SubjectName[];
445
485
  /** ISO 8601 date (`YYYY-MM-DD`). */
446
486
  birthDate?: string;
447
- /** Place of birth, 1 to 120 characters, any script (kept only with a reference record). */
448
- birthPlace?: string;
487
+ /**
488
+ * Place of birth (kept only with a reference record): a string of 1 to 120
489
+ * characters in any script, or one entry per script (at most 4).
490
+ */
491
+ birthPlace?: string | PersonBirthPlaceInput[];
449
492
  /** `M`, `F` or `X` (ICAO 9303 values; kept only with a reference record). */
450
493
  sex?: "M" | "F" | "X";
451
- /** ISO 3166-1 alpha-2. */
494
+ /** ISO 3166-1 alpha-2 codes, 1 to 4. */
495
+ nationalities?: string[];
496
+ /**
497
+ * @deprecated Send `nationalities: [code]`. ISO 3166-1 alpha-2. Both keys
498
+ * with different values answer `400 subject_input_conflict`.
499
+ */
452
500
  nationality?: string;
501
+ /** The person's identity document ({@link PersonDocumentInput}). */
502
+ document?: PersonDocumentInput;
453
503
  /**
454
- * @deprecated Use `idNumber` with the document's `type` and `issuingCountry`.
504
+ * @deprecated Send `document` (`type`, `issuingCountry`, `number`).
455
505
  * Identity-document number (1 to 40 characters).
456
506
  */
457
507
  documentNumber?: string;
@@ -470,7 +520,7 @@ interface SessionSubjectInput {
470
520
  fetchedAt?: string;
471
521
  /**
472
522
  * Your own id for this person (1–128 characters). Echoed on the session and
473
- * its webhooks, and searchable on the subjects API.
523
+ * its webhooks, and searchable on the people API ({@link PeopleApi.list}).
474
524
  */
475
525
  externalRef?: string;
476
526
  /**
@@ -484,6 +534,11 @@ interface SessionSubjectInput {
484
534
  */
485
535
  reuse?: SubjectReuseTarget;
486
536
  }
537
+ /**
538
+ * @deprecated Use {@link SessionPersonInput} (the `person` create key).
539
+ * @public
540
+ */
541
+ type SessionSubjectInput = SessionPersonInput;
487
542
  /**
488
543
  * An identity document for {@link SubjectReuseTarget}: the document type, the
489
544
  * issuing country (ISO 3166-1 alpha-2 or alpha-3) and its number.
@@ -717,9 +772,14 @@ interface FlowServiceSettings {
717
772
  reference: "auto" | "document" | "registry";
718
773
  attempts?: number;
719
774
  };
775
+ /**
776
+ * Sanctions and PEP screening of the person the flow verified. `onHit`: `signal`
777
+ * (the session goes on and the match is reported), `review` (a reviewer
778
+ * decides) or `fail` (the session is rejected with `aml_hit`).
779
+ */
720
780
  aml_screening: {
721
- lists: Array<"sanctions" | "pep" | "adverse_media">;
722
- onHit: "review" | "fail";
781
+ lists: ScreeningList[];
782
+ onHit: "signal" | "review" | "fail";
723
783
  };
724
784
  face_dedup: {
725
785
  scope: "app" | "org";
@@ -832,10 +892,16 @@ interface CreateSessionInput {
832
892
  link?: SessionLinkInput;
833
893
  /**
834
894
  * What you already know about the person (preferred over `input` for
835
- * identity data). A key sent in both `subject` and `input` with different
895
+ * identity data). A key sent in both `person` and `input` with different
836
896
  * values answers `400 subject_input_conflict`.
837
897
  */
838
- subject?: SessionSubjectInput;
898
+ person?: SessionPersonInput;
899
+ /**
900
+ * @deprecated Send {@link CreateSessionInput.person}, the same object. The
901
+ * same value under both keys is accepted; different values answer
902
+ * `400 subject_input_conflict`.
903
+ */
904
+ subject?: SessionPersonInput;
839
905
  /**
840
906
  * Your own id for the agent filming the person, for flows whose liveness
841
907
  * capture is `assisted` (1 to 128 characters). Stored as is and echoed on
@@ -953,6 +1019,13 @@ interface CreatedSession {
953
1019
  subjectUse?: "reference" | "prefill";
954
1020
  /** One entry per deprecated request key you used, naming its replacement. Absent otherwise. */
955
1021
  warnings?: CreatedSessionWarning[];
1022
+ /**
1023
+ * With {@link CreateSessionInput.deliver} only: the send of the hosted link.
1024
+ * `failed` never fails the create; `simulated` on a simulated Sandbox session.
1025
+ */
1026
+ delivery?: {
1027
+ status: "queued" | "failed" | "simulated";
1028
+ };
956
1029
  }
957
1030
  /**
958
1031
  * A deprecation warning of {@link CreatedSession.warnings}: `field` is the
@@ -966,11 +1039,11 @@ interface CreatedSessionWarning {
966
1039
  replacement: string;
967
1040
  }
968
1041
  /**
969
- * Input of {@link SubjectsApi.createSession}: a re-check or step-up session
970
- * for an existing subject in one call.
1042
+ * Input of {@link PeopleApi.createSession}: a re-check or step-up session
1043
+ * for an existing person in one call.
971
1044
  * @public
972
1045
  */
973
- interface SubjectSessionInput {
1046
+ interface PersonSessionInput {
974
1047
  mode: SubjectReuseMode;
975
1048
  /** The app's flow to run (slug or `flw_` id); absent = the app's default flow. */
976
1049
  flow?: string;
@@ -979,16 +1052,24 @@ interface SubjectSessionInput {
979
1052
  ttlMinutes?: number;
980
1053
  locale?: Locale;
981
1054
  }
1055
+ /** @deprecated Use {@link PersonSessionInput}. @public */
1056
+ type SubjectSessionInput = PersonSessionInput;
982
1057
  /**
983
- * Which subject {@link SubjectsApi.createSession} targets: the subject id or
984
- * your own external reference.
1058
+ * Which person {@link PeopleApi.createSession} targets: the person id
1059
+ * (`per_...` or the bare 24 hexadecimal characters) or your own external
1060
+ * reference. `{ subjectId }` is the deprecated name of `{ personId }`.
985
1061
  * @public
986
1062
  */
987
- type SubjectSessionTarget = {
1063
+ type PersonSessionTarget = {
1064
+ personId: string;
1065
+ } | {
1066
+ /** @deprecated Use `personId`. */
988
1067
  subjectId: string;
989
1068
  } | {
990
1069
  externalRef: string;
991
1070
  };
1071
+ /** @deprecated Use {@link PersonSessionTarget}. @public */
1072
+ type SubjectSessionTarget = PersonSessionTarget;
992
1073
  /** Result of {@link SessionsApi.resultToken}: a freshly signed result token. @public */
993
1074
  interface ResultTokenResponse {
994
1075
  /** ES256 JWT; check it with {@link verifyResultToken}. */
@@ -1011,9 +1092,19 @@ interface SessionNetworkEvent {
1011
1092
  operator?: string;
1012
1093
  connectionType: "mobile" | "hosting" | "unknown";
1013
1094
  anonymizer: {
1095
+ /** A known commercial VPN service exit. */
1014
1096
  vpn: boolean;
1097
+ /** A Tor exit. */
1015
1098
  tor: boolean;
1099
+ /** A cloud, hosting or data center network. */
1016
1100
  hosting: boolean;
1101
+ /** A public open proxy. Present only when true. */
1102
+ proxy?: boolean;
1103
+ /**
1104
+ * Apple iCloud Private Relay. A privacy relay for Apple accounts, not counted
1105
+ * as an anonymizer. Present only when true.
1106
+ */
1107
+ relay?: boolean;
1017
1108
  };
1018
1109
  /** IANA time zone reported by the end user's device. */
1019
1110
  browserTimezone?: string;
@@ -1090,6 +1181,183 @@ interface VerifiedContacts {
1090
1181
  verifiedAt: string;
1091
1182
  };
1092
1183
  }
1184
+ /**
1185
+ * Where a value of {@link Identity} comes from: the `document` (its machine
1186
+ * readable zone or printed text), the passport `chip`, the population
1187
+ * `registry`, a national `eid`, or the record you `supplied` at create.
1188
+ * @public
1189
+ */
1190
+ type IdentitySource = "document" | "chip" | "registry" | "eid" | "supplied";
1191
+ /**
1192
+ * How a name of {@link Identity.names} was obtained: `mrz` (the ICAO
1193
+ * transliteration of the machine readable zone: upper case, truncated, no
1194
+ * diacritics), `printed` (the visual zone, as written), `chip` (the chip's
1195
+ * data groups), `registry`, `eid` or `supplied`.
1196
+ * @public
1197
+ */
1198
+ type NameForm = "mrz" | "printed" | "chip" | "registry" | "eid" | "supplied";
1199
+ /**
1200
+ * One name as one source gives it. Names from different sources are never
1201
+ * merged. For an `mrz` entry `family` holds the ICAO primary identifier and
1202
+ * `given` the secondary one, as the document arranges them. To show a name,
1203
+ * pick the first entry whose `form` is not `mrz`.
1204
+ * @public
1205
+ */
1206
+ interface IdentityName {
1207
+ /** ISO 15924 script, e.g. `Latn` or `Arab`. */
1208
+ script: string;
1209
+ form: NameForm;
1210
+ /** Given names (the secondary identifier). */
1211
+ given?: string;
1212
+ /** Family name (the primary identifier). */
1213
+ family?: string;
1214
+ /** The father's given name, when the source distinguishes it. */
1215
+ patronymic?: string;
1216
+ /** The name as one string, when the source gives one (never built from the parts). */
1217
+ fullName?: string;
1218
+ source: IdentitySource;
1219
+ }
1220
+ /** One birth place as one source wrote it ({@link Identity.birthPlace}). @public */
1221
+ interface IdentityBirthPlace {
1222
+ /** ISO 15924 script. */
1223
+ script: string;
1224
+ value: string;
1225
+ source: IdentitySource;
1226
+ }
1227
+ /** The holder's national number, when a per-country rule recognises it ({@link Identity.idNumber}). @public */
1228
+ interface IdentityIdNumber {
1229
+ type: "national_id" | "passport" | "residence_permit";
1230
+ /** ISO 3166-1 alpha-2. */
1231
+ issuingCountry: string;
1232
+ /** The number, normalised. */
1233
+ number: string;
1234
+ }
1235
+ /** The document or chip that was read ({@link Identity.document}). @public */
1236
+ interface IdentityDocument {
1237
+ type: "national_id" | "passport" | "residence_permit";
1238
+ /** ISO 3166-1 alpha-2, or the ICAO code as read when it has no ISO equivalent. */
1239
+ issuingCountry?: string;
1240
+ /** The document number as read: upper case, no spaces. */
1241
+ number?: string;
1242
+ /** `YYYY-MM-DD`. */
1243
+ expiryDate?: string;
1244
+ /** `YYYY-MM-DD`, from the chip. */
1245
+ issueDate?: string;
1246
+ /** The issuing authority as written, from the chip. */
1247
+ issuingAuthority?: string;
1248
+ /** The keys whose value a check digit protects. Never the names. */
1249
+ mrzVerified?: Array<"number" | "birthDate" | "expiryDate" | "idNumber">;
1250
+ }
1251
+ /**
1252
+ * The scalar keys of {@link Identity} that {@link Identity.sources} reports on.
1253
+ * @public
1254
+ */
1255
+ type IdentityScalarKey = "idNumber" | "birthDate" | "sex" | "nationalities" | "document.number" | "document.expiryDate";
1256
+ /**
1257
+ * For each scalar key, the sources whose value equals the returned one. A
1258
+ * source that read another value is not listed (its step carries the mismatch
1259
+ * reason).
1260
+ * @public
1261
+ */
1262
+ type IdentitySources = Partial<Record<IdentityScalarKey, IdentitySource[]>>;
1263
+ /**
1264
+ * The identity data a session read (its document, chip, registry, eID or your
1265
+ * supplied record), present once one identity step settled, whatever the
1266
+ * outcome. On a person ({@link Person.identity}), the identity of the latest
1267
+ * approved session that read one. Every key is optional. Sent to you only (the
1268
+ * session view, the person view and the terminal webhooks).
1269
+ * @public
1270
+ */
1271
+ interface Identity {
1272
+ idNumber?: IdentityIdNumber;
1273
+ /** One entry per source and script, registry forms first. */
1274
+ names?: IdentityName[];
1275
+ /** ISO 8601 with the precision the source has: `YYYY-MM-DD`, `YYYY-MM` or `YYYY`. */
1276
+ birthDate?: string;
1277
+ birthPlace?: IdentityBirthPlace[];
1278
+ /** `null` when the source read an unspecified value; absent when no source read it. */
1279
+ sex?: "M" | "F" | "X" | null;
1280
+ /** ISO 3166-1 alpha-2 codes, or the ICAO code when it has no ISO equivalent. */
1281
+ nationalities?: string[];
1282
+ /** Set when the nationality code is not a country (e.g. `stateless`). */
1283
+ nationalityKind?: string;
1284
+ document?: IdentityDocument;
1285
+ sources?: IdentitySources;
1286
+ /** The registry a registry step passed against. */
1287
+ registry?: {
1288
+ id: string;
1289
+ fetchedAt?: string;
1290
+ };
1291
+ /** The national eID that verified the identity. */
1292
+ eid?: {
1293
+ provider: string;
1294
+ country: string;
1295
+ verifiedAt?: string;
1296
+ };
1297
+ /** ISO 8601: when the last identity step settled. */
1298
+ verifiedAt?: string;
1299
+ /** @deprecated Read {@link Identity.names}. The first Latin name as one string. */
1300
+ name?: string;
1301
+ }
1302
+ /**
1303
+ * The media kinds of a session, in the order the API lists them.
1304
+ * `reference_portrait` is the photo the face match compared against.
1305
+ * @public
1306
+ */
1307
+ type MediaKind = "icao_portrait" | "document_front" | "document_back" | "document_portrait" | "chip_portrait" | "reference_portrait" | "supplied_photo" | "selfie" | "liveness_clip";
1308
+ /**
1309
+ * One media object of a session ({@link SessionsApi.media}). `url` is a
1310
+ * download link valid 15 minutes, or the bytes route on this API
1311
+ * (`/api/v2/sessions/{id}/media/{kind}`), which needs your key: read it with
1312
+ * {@link SessionsApi.mediaBytes}. Never store the URL.
1313
+ * @public
1314
+ */
1315
+ interface MediaItem {
1316
+ kind: MediaKind;
1317
+ /** The check that produced or used it. */
1318
+ check: string;
1319
+ /** The attempt it came from (1, 2, ...); absent when it is not per attempt. */
1320
+ attempt?: number;
1321
+ /** It belongs to the attempt that settled the check. */
1322
+ decisive: boolean;
1323
+ /** The state of that attempt, else of the check. */
1324
+ state?: string;
1325
+ /** The reason of that attempt, when it did not pass. */
1326
+ reason?: string;
1327
+ /** The attempt was set aside (for example a retake) and not counted. */
1328
+ voided?: string;
1329
+ contentType: "image/jpeg" | "image/png" | "video/mp4" | "video/webm";
1330
+ /** `reference_portrait` and `supplied_photo`: where the photo came from (`stored`: kept from an earlier verification). */
1331
+ source?: "registry" | "eid" | "chip" | "document" | "supplied" | "stored";
1332
+ /** `reference_portrait`: the registry photo was fetched again for this match. */
1333
+ refreshed?: true;
1334
+ url: string;
1335
+ /** ISO 8601: when `url` expires. List the media again for fresh links. */
1336
+ expiresAt: string;
1337
+ }
1338
+ /** Result of {@link SessionsApi.media}. @public */
1339
+ interface MediaList {
1340
+ items: MediaItem[];
1341
+ }
1342
+ /** Options of {@link SessionsApi.mediaBytes}. @public */
1343
+ interface MediaBytesOptions {
1344
+ /** The attempt (1, 2, ...) to read; default: the decisive item, else the latest attempt. */
1345
+ attempt?: number;
1346
+ /** `reference_portrait` only: the first reference, when a second one decided the step. */
1347
+ reference?: "first";
1348
+ }
1349
+ /** Result of {@link SessionsApi.mediaBytes}: the bytes and their media type. @public */
1350
+ interface MediaBytes {
1351
+ contentType: string;
1352
+ bytes: Uint8Array;
1353
+ }
1354
+ /**
1355
+ * Who closed a completed or failed session: `review` when a person decided
1356
+ * the verdict (the deciding step carries its {@link SessionStepDecision}),
1357
+ * `automatic` otherwise (a review deadline included).
1358
+ * @public
1359
+ */
1360
+ type DecidedBy = "automatic" | "review";
1093
1361
  /**
1094
1362
  * The whitelisted session view returned by {@link SessionsApi.get}. Never
1095
1363
  * contains the client token.
@@ -1101,9 +1369,17 @@ interface Session {
1101
1369
  flow?: SessionFlowRef;
1102
1370
  status: SessionStatus;
1103
1371
  outcome: SessionOutcome | null;
1372
+ /** Completed and failed sessions: who decided the verdict ({@link DecidedBy}). */
1373
+ decidedBy?: DecidedBy;
1374
+ /**
1375
+ * A session closed because a newer attempt of the same person took over its
1376
+ * review: that session's id (`outcome` is `null`). Watch it instead.
1377
+ */
1378
+ supersededBy?: string;
1104
1379
  /**
1105
- * What the session proved ({@link VerificationLevel}); `null` while the
1106
- * session is active, `0` when it was rejected. Absent from older API versions.
1380
+ * What the session proved ({@link VerificationLevel}), on a completed or
1381
+ * failed session: `0` when it was rejected. Absent while the session is
1382
+ * active, and from older API versions.
1107
1383
  */
1108
1384
  level?: VerificationLevel | null;
1109
1385
  /** How the level was proved; `null` while the session is active. */
@@ -1116,8 +1392,8 @@ interface Session {
1116
1392
  steps: SessionStep[];
1117
1393
  /** ISO 8601. */
1118
1394
  expiresAt: string;
1119
- /** ISO 8601. */
1120
- createdAt: string;
1395
+ /** ISO 8601. Absent on a session view that does not carry it. */
1396
+ createdAt?: string;
1121
1397
  /** ISO 8601: when the session reached a terminal state; `null` while it is active. */
1122
1398
  completedAt?: string | null;
1123
1399
  /** End-user network context; absent when not recorded. */
@@ -1132,9 +1408,14 @@ interface Session {
1132
1408
  failureReason?: PolicyFailureReason;
1133
1409
  /** With failureReason `camera_unavailable`: why (`denied` or `no_camera`), when the SDK said. Absent otherwise. */
1134
1410
  failureDetail?: CameraUnavailableCause;
1135
- /** The subject (person) this session is linked to, once that subject has passed a verification (absent before that). */
1411
+ /** The person (`per_...`) this session is linked to, once that person has passed a verification (absent before that). */
1412
+ personId?: string;
1413
+ /**
1414
+ * @deprecated Read {@link Session.personId}. The same person with the id
1415
+ * bare (no `per_` prefix), as the result token's `sub` names it.
1416
+ */
1136
1417
  subjectId?: string;
1137
- /** Your own id for the person, from `subject.externalRef` at create. */
1418
+ /** Your own id for the person, from `person.externalRef` at create. */
1138
1419
  externalRef?: string;
1139
1420
  /** The agent reference sent as `assistedBy` at create, for assisted capture. */
1140
1421
  assistedBy?: {
@@ -1163,7 +1444,7 @@ interface Session {
1163
1444
  riskSignals?: string[];
1164
1445
  /**
1165
1446
  * `true` for a returning-user session (created with
1166
- * {@link SessionSubjectInput.reuse}): liveness + face match against the
1447
+ * {@link SessionPersonInput.reuse}): liveness + face match against the
1167
1448
  * subject's stored reference photo only.
1168
1449
  */
1169
1450
  returning?: true;
@@ -1176,7 +1457,10 @@ interface Session {
1176
1457
  reuseMode?: SubjectReuseMode;
1177
1458
  /** The contacts verified in this session (passed OTP checks only); absent when none. */
1178
1459
  verifiedContacts?: VerifiedContacts;
1179
- /** The national eID that verified this session (the `eid_auth` check passed); absent otherwise. */
1460
+ /**
1461
+ * The national eID that verified this session (the `eid_auth` check passed); absent otherwise.
1462
+ * @deprecated Read `identity.eid` ({@link Identity}) instead.
1463
+ */
1180
1464
  eid?: EidResult;
1181
1465
  /**
1182
1466
  * When the flow sets a minimum age and the session proved it: the threshold
@@ -1184,30 +1468,60 @@ interface Session {
1184
1468
  */
1185
1469
  age?: AgeResult;
1186
1470
  /**
1187
- * ID mode (`portrait.purpose = id_document`) only: the ICAO portrait can be
1188
- * fetched with {@link SessionsApi.portrait}.
1471
+ * @deprecated Read {@link Session.media}: `true` when it includes
1472
+ * `icao_portrait`. ID mode only: the ICAO portrait can be fetched.
1189
1473
  */
1190
1474
  portraitAvailable?: boolean;
1475
+ /**
1476
+ * The identity data the session read ({@link Identity}), once one identity
1477
+ * step settled. On an approved returning-user session, with a key that also
1478
+ * holds `people:read`, the identity stored on the person.
1479
+ */
1480
+ identity?: Identity;
1481
+ /** The media kinds this session has, in kind order: fetch them with {@link SessionsApi.media}. */
1482
+ media?: MediaKind[];
1483
+ /**
1484
+ * Terminal sessions, when result tokens are on: a signed result token
1485
+ * (ES256 JWT, valid 10 minutes). Check it with {@link verifyResultToken}.
1486
+ */
1487
+ resultToken?: string;
1488
+ /** Terminal sessions: other people the face matched in the duplicate search (non-empty only). */
1489
+ duplicates?: ResultDuplicate[];
1490
+ /** Terminal sessions: the duplicate search could not run. */
1491
+ dedupUnavailable?: true;
1191
1492
  /**
1192
1493
  * Terminal sessions: a failure identification match
1193
1494
  * ({@link FailureIdentification}), present only for a match and only when the
1194
1495
  * setting is on. A signal, never a decision.
1195
1496
  */
1196
1497
  failureIdentification?: FailureIdentification;
1498
+ /**
1499
+ * Terminal sessions whose flow screens the person against sanctions and PEP
1500
+ * lists: the result ({@link SessionScreening}), or why it could not run.
1501
+ */
1502
+ screening?: SessionScreening;
1197
1503
  }
1198
1504
  /**
1199
- * `data` of the terminal / review-pending session lifecycle events
1200
- * (`session.completed` | `session.failed` | `session.review_pending` |
1201
- * `session.expired`): ids and enums only, no civil data,
1202
- * scores or links. `outcome` and `steps` travel on `completed` / `failed`;
1203
- * `review_pending` carries `steps` without an outcome; `expired` carries the
1204
- * status and the session's refs (`flow`, subject ids, `overriddenFields`).
1505
+ * `data` of the session lifecycle events (`session.started` |
1506
+ * `session.review_pending` | `session.completed` | `session.failed` |
1507
+ * `session.expired`). `outcome`, `decidedBy` and `steps` travel on
1508
+ * `completed` / `failed`, which are the one terminal event of a session: a
1509
+ * reviewer's decision arrives as one of them with `decidedBy: "review"` and
1510
+ * the `decision`. `review_pending` carries `steps` without an outcome;
1511
+ * `expired` carries the status and the session's refs (`flow`, person ids,
1512
+ * `overriddenFields`). `identity` and `media` (kinds only, never links) ride on
1513
+ * `completed` / `failed` when the platform sends them.
1205
1514
  * @public
1206
1515
  */
1207
1516
  interface SessionLifecycleEventData {
1517
+ /** The session id (`ses_...`). */
1208
1518
  sessionId: string;
1209
1519
  status: SessionStatus;
1210
1520
  outcome?: SessionOutcome | null;
1521
+ /** On `completed` / `failed`: who decided the verdict ({@link DecidedBy}). */
1522
+ decidedBy?: DecidedBy;
1523
+ /** On `completed` / `failed` with `decidedBy: "review"`: how the deciding step was decided. */
1524
+ decision?: SessionStepDecision;
1211
1525
  /** On `completed` / `failed`: the app the session belongs to. */
1212
1526
  appId?: string;
1213
1527
  /** On `completed` / `failed`: what the session proved ({@link VerificationLevel}). */
@@ -1228,11 +1542,13 @@ interface SessionLifecycleEventData {
1228
1542
  * result tokens are not enabled.
1229
1543
  */
1230
1544
  resultToken?: string;
1545
+ /** On `completed` / `failed`: the duplicate search could not run. */
1546
+ dedupUnavailable?: true;
1231
1547
  /**
1232
1548
  * The checks on the session's path (checks of a lane the person did not take
1233
1549
  * are omitted), each with its {@link SessionStepDecision} when a person decided it.
1234
1550
  */
1235
- steps?: Array<Pick<SessionStep, "checkType" | "state" | "nodeId" | "service" | "decision">>;
1551
+ steps?: Array<Pick<SessionStep, "id" | "service" | "checkType" | "state" | "nodeId" | "simulated" | "decision">>;
1236
1552
  /** Sekyro flows: the flow version the session runs (absent on sessions created before flows). */
1237
1553
  flow?: SessionFlowRef;
1238
1554
  /** Machine-readable reason, when the transition has one. */
@@ -1249,21 +1565,30 @@ interface SessionLifecycleEventData {
1249
1565
  failureReason?: PolicyFailureReason;
1250
1566
  /** On `session.failed` with failureReason `camera_unavailable`: why (`denied` or `no_camera`), when the SDK said. Absent otherwise. */
1251
1567
  failureDetail?: CameraUnavailableCause;
1252
- /** The subject (person) the session is linked to, once that subject has passed a verification (absent before that). */
1568
+ /** The person (`per_...`) the session is linked to, once that person has passed a verification (absent before that). */
1569
+ personId?: string;
1570
+ /**
1571
+ * @deprecated Read {@link SessionLifecycleEventData.personId}. The same
1572
+ * person with the id bare (no `per_` prefix).
1573
+ */
1253
1574
  subjectId?: string;
1254
- /** Your own id for the person, from `subject.externalRef` at create. */
1575
+ /** Your own id for the person, from `person.externalRef` at create. */
1255
1576
  externalRef?: string;
1577
+ /** The agent reference sent as `assistedBy` at create, for assisted capture. */
1578
+ assistedBy?: {
1579
+ externalRef: string;
1580
+ };
1256
1581
  /**
1257
1582
  * `true` when an identifier this session read already belongs to a
1258
- * different subject than `subjectId` — the subjects are never merged.
1583
+ * different person than `personId`: the people are never merged.
1259
1584
  */
1260
1585
  subjectConflict?: boolean;
1261
1586
  /** `true` on a returning-user session (liveness + face match against the stored photo). */
1262
1587
  returning?: true;
1263
- /** On a returning-user session: the subject (person) it re-verifies. */
1588
+ /** On a returning-user session: the person (`per_...`) it re-verifies. */
1264
1589
  reuseOf?: string;
1265
1590
  /**
1266
- * On a session created for an existing subject: `recheck` (the same person
1591
+ * On a session created for an existing person: `recheck` (the same person
1267
1592
  * again) or `step_up` (raised to identity level). Absent otherwise.
1268
1593
  */
1269
1594
  reuseMode?: SubjectReuseMode;
@@ -1288,16 +1613,22 @@ interface SessionLifecycleEventData {
1288
1613
  /** On `completed` / `failed`: the minimum age the session proved and how ({@link AgeResult}), when the flow sets one. */
1289
1614
  age?: AgeResult;
1290
1615
  /**
1291
- * ID mode only, on `completed` / `failed`: the ICAO portrait can be fetched
1292
- * with {@link SessionsApi.portrait} (the event never carries the image).
1616
+ * @deprecated Read {@link SessionLifecycleEventData.media}. ID mode only, on
1617
+ * `completed` / `failed`: the ICAO portrait can be fetched.
1293
1618
  */
1294
1619
  portraitAvailable?: boolean;
1620
+ /** On `completed` / `failed`: the identity data the session read ({@link Identity}), when the platform sends it. */
1621
+ identity?: Identity;
1622
+ /** On `completed` / `failed`: the media kinds of the session (never links), when the platform sends them. */
1623
+ media?: MediaKind[];
1295
1624
  /**
1296
1625
  * On `completed` / `failed`: a failure identification match
1297
1626
  * ({@link FailureIdentification}), when the setting is on and the search
1298
1627
  * found one before the event was sent. A signal, never a decision.
1299
1628
  */
1300
1629
  failureIdentification?: FailureIdentification;
1630
+ /** On `completed` / `failed`: the AML screening result ({@link SessionScreening}), when the flow screens the person. */
1631
+ screening?: SessionScreening;
1301
1632
  }
1302
1633
  /**
1303
1634
  * `data` of `subject.updated` — either a session linked to the subject reached
@@ -1368,8 +1699,9 @@ type SubjectAssurance = "registry_biometric" | "chip_biometric" | "document_biom
1368
1699
  * @public
1369
1700
  */
1370
1701
  type SubjectReferenceSource = "registry" | "doc_registry" | "chip" | "org_supplied" | "document";
1371
- /** One session linked to a subject. @public */
1372
- interface SubjectSession {
1702
+ /** One session linked to a person. @public */
1703
+ interface PersonSession {
1704
+ /** The session id (`ses_...`). */
1373
1705
  sessionId: string;
1374
1706
  appId: string | null;
1375
1707
  /** ISO 8601 — when the session was linked. */
@@ -1381,17 +1713,22 @@ interface SubjectSession {
1381
1713
  /** How the session's level was proved; present only when stored. */
1382
1714
  assurance?: VerificationAssurance;
1383
1715
  }
1716
+ /** @deprecated Use {@link PersonSession}. @public */
1717
+ type SubjectSession = PersonSession;
1384
1718
  /**
1385
- * A subject (the same person across your apps), as `GET /subjects/:id`
1719
+ * A person (the same person across your apps), as `GET /people/:id`
1386
1720
  * returns it. Never contains photo keys or URLs.
1387
1721
  * @public
1388
1722
  */
1389
- interface Subject {
1723
+ interface Person {
1724
+ /** The person id (`per_...`). */
1390
1725
  id: string;
1726
+ /** The same value as `id`. Absent from older API versions. */
1727
+ personId?: string;
1391
1728
  status: SubjectStatus;
1392
1729
  /** ISO 8601 — present only when revoked. */
1393
1730
  revokedAt?: string;
1394
- sessions: SubjectSession[];
1731
+ sessions: PersonSession[];
1395
1732
  externalRefs: string[];
1396
1733
  /** ISO 8601. */
1397
1734
  firstSeenAt: string;
@@ -1413,9 +1750,9 @@ interface Subject {
1413
1750
  * recorded since the field exists. Absent from API versions before the field.
1414
1751
  */
1415
1752
  level?: VerificationLevel | null | undefined;
1416
- /** ISO 8601: when {@link Subject.level} was last proved (the latest approved session at that level or higher); `null` with it. Absent with it. */
1753
+ /** ISO 8601: when {@link Person.level} was last proved (the latest approved session at that level or higher); `null` with it. Absent with it. */
1417
1754
  levelAt?: string | null | undefined;
1418
- /** The assurance of the session that proved {@link Subject.level}; `null` with it. Absent with it. */
1755
+ /** The assurance of the session that proved {@link Person.level}; `null` with it. Absent with it. */
1419
1756
  levelAssurance?: VerificationAssurance | null | undefined;
1420
1757
  /**
1421
1758
  * A returning-user session can be created now: active, a reference photo is
@@ -1429,27 +1766,216 @@ interface Subject {
1429
1766
  name?: string;
1430
1767
  birthDate?: string;
1431
1768
  };
1769
+ /** The identity of the latest approved session that read one ({@link Identity}). */
1770
+ identity?: Identity;
1432
1771
  }
1772
+ /** @deprecated Use {@link Person}. @public */
1773
+ type Subject = Person;
1433
1774
  /**
1434
- * Filters of {@link SessionsApi.list}: your own user id
1435
- * (`subject.externalRef` at create) and/or a status.
1775
+ * Filters of {@link SessionsApi.list}, {@link SessionsApi.listPage} and
1776
+ * {@link SessionsApi.iterate}, combined with AND. Newest first.
1436
1777
  * @public
1437
1778
  */
1438
1779
  interface ListSessionsQuery {
1439
- /** Your own id for the person (1 to 128 characters). */
1780
+ /** Your own id for the person (1 to 128 characters), exact match. */
1440
1781
  externalRef?: string;
1441
1782
  status?: SessionStatus;
1783
+ /** A flow id (`flw_...`) or slug. */
1784
+ flow?: string;
1785
+ /** Sessions created at or after this time (ISO 8601 or a `Date`). */
1786
+ createdAfter?: string | Date;
1787
+ /** Sessions created before this time (ISO 8601 or a `Date`). */
1788
+ createdBefore?: string | Date;
1789
+ /** Page size, 1 to 100 (the API's default is 50). */
1790
+ limit?: number;
1791
+ /** The {@link Page.nextCursor} of the previous page. */
1792
+ cursor?: string;
1793
+ }
1794
+ /**
1795
+ * Filters of {@link PeopleApi.list}, {@link PeopleApi.listPage} and
1796
+ * {@link PeopleApi.iterate}. Newest first; only people who passed a verification.
1797
+ * @public
1798
+ */
1799
+ interface ListPeopleQuery {
1800
+ /** Your own id for the person, exact match. */
1801
+ externalRef?: string;
1802
+ /** Page size, 1 to 100 (the API's default is 50). */
1803
+ limit?: number;
1804
+ /** The {@link Page.nextCursor} of the previous page. */
1805
+ cursor?: string;
1806
+ }
1807
+ /**
1808
+ * One page of a list: the items and, when more exist, the cursor of the next
1809
+ * page (pass it as `cursor`). Opaque; absent on the last page.
1810
+ * @public
1811
+ */
1812
+ interface Page<T> {
1813
+ data: T[];
1814
+ nextCursor?: string;
1442
1815
  }
1443
- /** Result of {@link SubjectsApi.delete}. @public */
1444
- interface DeletedSubject {
1816
+ /** Result of {@link PeopleApi.delete}. @public */
1817
+ interface DeletedPerson {
1818
+ /** The person id (`per_...`). */
1445
1819
  id: string;
1446
1820
  deleted: true;
1447
1821
  }
1448
- /** Options of {@link SubjectsApi.revoke}. @public */
1449
- interface RevokeSubjectInput {
1822
+ /** @deprecated Use {@link DeletedPerson}. @public */
1823
+ type DeletedSubject = DeletedPerson;
1824
+ /** The lists an AML screening can search. @public */
1825
+ type ScreeningList = "sanctions" | "pep" | "adverse_media";
1826
+ /**
1827
+ * Where a screening stands: `clear` (nothing scored above the possible
1828
+ * threshold), `possible` (a possible match), `hit` (a match), `confirmed` or
1829
+ * `dismissed` (a person of your organization decided the hits), `unavailable`
1830
+ * (the lists could not be searched; never billed).
1831
+ * @public
1832
+ */
1833
+ type ScreeningStatus = "clear" | "possible" | "hit" | "confirmed" | "dismissed" | "unavailable";
1834
+ /** Why the lists could not be searched. @public */
1835
+ type ScreeningUnavailableReason = "screening_unavailable" | "no_identity_data" | "no_list_covered";
1836
+ /** What ran a screening: a session step, a screening run again, or ongoing screening. @public */
1837
+ type ScreeningTrigger = "session" | "rescreen" | "monitor";
1838
+ /** A list entry that matched the person, best first. Public list data. @public */
1839
+ interface ScreeningHitSummary {
1840
+ /** The stable id of the list entry. */
1841
+ entityId: string;
1842
+ /** The name of the entry as the list publishes it. */
1843
+ caption: string;
1844
+ /** How closely the entry matches the person, 0 to 1. */
1845
+ score: number;
1846
+ /** The searched lists the entry is on. */
1847
+ lists: ScreeningList[];
1848
+ }
1849
+ /** A list entry that matched, with its public attributes and sources. @public */
1850
+ interface ScreeningHit extends ScreeningHitSummary {
1851
+ /** The tags of the entry on its lists (`sanction`, `role.pep`, ...). */
1852
+ topics: string[];
1853
+ /** The source datasets of the entry. */
1854
+ datasets: string[];
1855
+ /** Public attributes of the entry, when the list publishes them. */
1856
+ attributes: {
1857
+ birthDates?: string[];
1858
+ nationalities?: string[];
1859
+ positions?: string[];
1860
+ aliases?: string[];
1861
+ gender?: string;
1862
+ };
1863
+ /** Where the list publishes the entry. */
1864
+ sourceUrls: string[];
1865
+ firstSeen?: string;
1866
+ lastSeen?: string;
1867
+ }
1868
+ /**
1869
+ * {@link Session.screening}: the search a session's AML screening step ran, or
1870
+ * `{ unavailable }` alone when it could not run.
1871
+ * @public
1872
+ */
1873
+ type SessionScreening = {
1874
+ /** The screening id (`scr_...`); see {@link PeopleApi.screenings}. */
1875
+ id: string;
1876
+ status: Exclude<ScreeningStatus, "unavailable">;
1877
+ /** The lists the flow asked for. */
1878
+ lists: ScreeningList[];
1879
+ /** The lists actually searched. */
1880
+ listsCovered: ScreeningList[];
1881
+ /** The list data release the search ran on. */
1882
+ datasetVersion: string;
1883
+ /** The best score, 0 when nothing matched. */
1884
+ topScore: number;
1885
+ hits: ScreeningHitSummary[];
1886
+ } | {
1887
+ unavailable: ScreeningUnavailableReason;
1888
+ };
1889
+ /** One screening of a person ({@link PeopleApi.screen}, {@link PeopleApi.screenings}). @public */
1890
+ interface Screening {
1891
+ /** The screening id (`scr_...`). */
1892
+ id: string;
1893
+ trigger: ScreeningTrigger;
1894
+ status: ScreeningStatus;
1895
+ /** With `status: "unavailable"`: why the lists could not be searched. */
1896
+ unavailable?: ScreeningUnavailableReason;
1897
+ /** The lists asked for. */
1898
+ lists: ScreeningList[];
1899
+ /** The lists actually searched. */
1900
+ listsCovered: ScreeningList[];
1901
+ /** The list data release the search ran on. */
1902
+ datasetVersion: string;
1903
+ /** The best score, 0 when nothing matched. */
1904
+ topScore: number;
1905
+ /** The matching entries, best first. */
1906
+ hits: ScreeningHit[];
1907
+ /** The decision of a person of your organization on the hits, once made. */
1908
+ decision?: {
1909
+ outcome: "confirmed" | "dismissed";
1910
+ at: string;
1911
+ note?: string;
1912
+ };
1913
+ /** ISO 8601. */
1914
+ createdAt: string;
1915
+ }
1916
+ /** Input of {@link PeopleApi.screen}. @public */
1917
+ interface ScreenPersonInput {
1918
+ /** The lists to search, each once. Default `["sanctions", "pep"]`. */
1919
+ lists?: ScreeningList[];
1920
+ }
1921
+ /** Query of {@link PeopleApi.screenings}. @public */
1922
+ interface ListScreeningsQuery {
1923
+ /** Page size, 1 to 50 (the API's default is 25). */
1924
+ limit?: number;
1925
+ /** The {@link Page.nextCursor} of the previous page. */
1926
+ cursor?: string;
1927
+ }
1928
+ /**
1929
+ * `data` of `aml.match_flagged`: a screening settled `hit` or `possible`, from
1930
+ * a session step, a screening run again or ongoing screening. Sent once per
1931
+ * screening (de-duplicate on `screeningId`); a decision sends no event.
1932
+ * @public
1933
+ */
1934
+ interface AmlMatchFlaggedEventData {
1935
+ screeningId: string;
1936
+ trigger: ScreeningTrigger;
1937
+ /** The session the screening ran in, or the person's latest approved session. */
1938
+ sessionId?: string;
1939
+ /** The person (`per_...`), once known. */
1940
+ personId?: string;
1941
+ status: "hit" | "possible";
1942
+ lists: ScreeningList[];
1943
+ listsCovered: ScreeningList[];
1944
+ datasetVersion: string;
1945
+ topScore: number;
1946
+ hits: ScreeningHitSummary[];
1947
+ }
1948
+ /** Options of {@link PeopleApi.revoke}. @public */
1949
+ interface RevokePersonInput {
1450
1950
  /** Kept on the audit trail only (≤ 500 characters). Do not put personal data here. */
1451
1951
  reason?: string;
1452
1952
  }
1953
+ /** @deprecated Use {@link RevokePersonInput}. @public */
1954
+ type RevokeSubjectInput = RevokePersonInput;
1955
+ /**
1956
+ * Input of {@link SessionsApi.extendLink}: the new link lifetime in minutes,
1957
+ * counted from the session creation, or the new expiry. It must be later than
1958
+ * the current expiry and within the flow's maximum link lifetime.
1959
+ * @public
1960
+ */
1961
+ type ExtendLinkInput = {
1962
+ ttlMinutes: number;
1963
+ } | {
1964
+ expiresAt: string | Date;
1965
+ };
1966
+ /** Result of {@link SessionsApi.resendLink}: the new delivery attempt. @public */
1967
+ interface SessionLinkDelivery {
1968
+ delivery: {
1969
+ channel: "sms" | "whatsapp" | "email";
1970
+ /** `simulated` in the Sandbox: nothing is sent. */
1971
+ status: "queued" | "sent" | "failed" | "simulated";
1972
+ };
1973
+ }
1974
+ /** Result of {@link SessionsApi.extendLink}. @public */
1975
+ interface SessionLinkExpiry {
1976
+ /** ISO 8601: the new expiry of the link and its session. */
1977
+ expiresAt: string;
1978
+ }
1453
1979
  /**
1454
1980
  * `data` of `subject.suspicious_activity` — a device already linked to
1455
1981
  * ANOTHER subject was used for a session of this subject. `count` is the
@@ -1461,8 +1987,35 @@ interface SubjectSuspiciousActivityEventData {
1461
1987
  sessionId: string;
1462
1988
  count: number;
1463
1989
  }
1990
+ /**
1991
+ * `data` of `person.updated`: the `subject.updated` data plus `personId`
1992
+ * (`per_...`). `subjectId` names the same person bare during this release.
1993
+ * @public
1994
+ */
1995
+ interface PersonUpdatedEventData extends SubjectUpdatedEventData {
1996
+ personId: string;
1997
+ }
1998
+ /** `data` of `person.enrolled`: the `subject.enrolled` data plus `personId` (`per_...`). @public */
1999
+ interface PersonEnrolledEventData extends SubjectEnrolledEventData {
2000
+ personId: string;
2001
+ }
2002
+ /**
2003
+ * `data` of `person.deleted`: the `subject.deleted` data plus `personId`
2004
+ * (`per_...`) when the delete names the person (a delete through the people
2005
+ * API); the erasure variant carries `subjectRef` instead.
2006
+ * @public
2007
+ */
2008
+ interface PersonDeletedEventData extends SubjectDeletedEventData {
2009
+ personId?: string;
2010
+ }
2011
+ /** `data` of `person.suspicious_activity`: the `subject.suspicious_activity` data plus `personId` (`per_...`). @public */
2012
+ interface PersonSuspiciousActivityEventData extends SubjectSuspiciousActivityEventData {
2013
+ personId: string;
2014
+ }
1464
2015
  /**
1465
2016
  * `data` of `session.step.completed` — the check that just passed.
2017
+ * @deprecated The event leaves the catalog after this release: read the steps
2018
+ * of the terminal event (`session.completed` / `session.failed`).
1466
2019
  * @public
1467
2020
  */
1468
2021
  interface SessionStepCompletedEventData {
@@ -1499,6 +2052,10 @@ interface SessionStepCompletedEventData {
1499
2052
  * nobody settled it by the deadline. A reviewer's decision also carries
1500
2053
  * `reasons`, `decision` and the terminal fields of `session.completed` /
1501
2054
  * `session.failed`; a deadline carries the ids only.
2055
+ * @deprecated The event leaves the catalog after this release: a reviewer's
2056
+ * decision arrives as `session.completed` or `session.failed` with
2057
+ * `decidedBy: "review"` and the `decision`; a review deadline as
2058
+ * `session.failed` with `failureReason: "review_timeout" | "review_split"`.
1502
2059
  * @public
1503
2060
  */
1504
2061
  interface SessionReviewDecidedEventData {
@@ -1567,17 +2124,19 @@ interface SessionReviewDecidedEventData {
1567
2124
  /**
1568
2125
  * `data` of `session.superseded`: a session that waited for a review closed
1569
2126
  * 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.
2127
+ * session ends with status `completed`, `outcome: null` and `supersededBy`;
2128
+ * its review step failed with `superseded_by_retry`; nothing of it is deleted.
2129
+ * Read the newer session (`supersededBy`) for the verdict. This is the one
2130
+ * terminal event of the superseded session.
1573
2131
  * @public
1574
2132
  */
1575
2133
  interface SessionSupersededEventData {
2134
+ /** The superseded session (`ses_...`). */
1576
2135
  sessionId: string;
1577
- /** The newer session of the same person that took the review over. */
2136
+ /** The newer session of the same person that took the review over (`ses_...`). */
1578
2137
  supersededBy: string;
1579
- /** The review case both sessions belong to (an opaque id). */
1580
- caseId: string;
2138
+ /** @deprecated No longer sent: the review case is internal. */
2139
+ caseId?: string;
1581
2140
  reason: "superseded_by_retry";
1582
2141
  /** Your own id for the person, from `subject.externalRef` at create. */
1583
2142
  externalRef?: string;
@@ -1609,20 +2168,31 @@ interface UsageThresholdReachedEventData {
1609
2168
  * @public
1610
2169
  */
1611
2170
  interface WebhookEventDataMap {
2171
+ /** @deprecated Leaves the catalog after this release (you created the session). */
1612
2172
  "session.created": Record<string, unknown>;
1613
2173
  "session.started": Record<string, unknown>;
2174
+ /** @deprecated Leaves the catalog after this release: read the steps of the terminal event. */
1614
2175
  "session.step.completed": SessionStepCompletedEventData;
1615
2176
  "session.review_pending": SessionLifecycleEventData;
2177
+ /** @deprecated Leaves the catalog after this release: see {@link SessionReviewDecidedEventData}. */
1616
2178
  "session.review_decided": SessionReviewDecidedEventData;
1617
2179
  "session.completed": SessionLifecycleEventData;
1618
2180
  "session.expired": SessionLifecycleEventData;
1619
2181
  "session.failed": SessionLifecycleEventData;
1620
2182
  "session.superseded": SessionSupersededEventData;
2183
+ "person.enrolled": PersonEnrolledEventData;
2184
+ "person.updated": PersonUpdatedEventData;
2185
+ "person.suspicious_activity": PersonSuspiciousActivityEventData;
2186
+ "person.deleted": PersonDeletedEventData;
2187
+ /** @deprecated Subscribe to `person.enrolled`, sent next to it with `personId`. */
1621
2188
  "subject.enrolled": SubjectEnrolledEventData;
2189
+ /** @deprecated Subscribe to `person.updated`, sent next to it with `personId`. */
1622
2190
  "subject.updated": SubjectUpdatedEventData;
2191
+ /** @deprecated Subscribe to `person.suspicious_activity`, sent next to it with `personId`. */
1623
2192
  "subject.suspicious_activity": SubjectSuspiciousActivityEventData;
2193
+ /** @deprecated Subscribe to `person.deleted`, sent next to it with `personId`. */
1624
2194
  "subject.deleted": SubjectDeletedEventData;
1625
- "aml.match_flagged": Record<string, unknown>;
2195
+ "aml.match_flagged": AmlMatchFlaggedEventData;
1626
2196
  "payment.received": Record<string, unknown>;
1627
2197
  "invoice.generated": Record<string, unknown>;
1628
2198
  "invoice.paid": Record<string, unknown>;
@@ -1661,8 +2231,8 @@ interface WebhookEnvelopeOf<E extends WebhookEventType> {
1661
2231
  * case "session.completed":
1662
2232
  * envelope.data.outcome; // SessionOutcome | null | undefined
1663
2233
  * break;
1664
- * case "session.review_decided":
1665
- * envelope.data.outcome; // "pass" | "fail"
2234
+ * case "person.updated":
2235
+ * envelope.data.personId; // "per_..."
1666
2236
  * break;
1667
2237
  * }
1668
2238
  * ```
@@ -1719,13 +2289,17 @@ interface ConnectorIdentity {
1719
2289
  * @public
1720
2290
  */
1721
2291
  declare class SessionsApi {
1722
- private readonly call;
2292
+ private readonly t;
1723
2293
  /**
1724
2294
  * Constructed by {@link Sekyro}; the transport is kept out of the public
1725
- * surface on purpose (only its bound `call` crosses this boundary).
2295
+ * surface on purpose (only its bound calls cross this boundary).
1726
2296
  * @internal
1727
2297
  */
1728
- constructor(call: <T>(method: "GET" | "POST" | "DELETE", path: string, body?: unknown, idempotencyKey?: string) => Promise<T>);
2298
+ constructor(t: {
2299
+ call<T>(method: "GET" | "POST" | "DELETE", path: string, body?: unknown, idempotencyKey?: string): Promise<T>;
2300
+ page<T>(path: string): Promise<Page<T>>;
2301
+ bytes(path: string): Promise<MediaBytes>;
2302
+ });
1729
2303
  /**
1730
2304
  * `POST /sessions`. Returns the one-time `clientToken` — hand it to the
1731
2305
  * browser, never persist it. Pass an `idempotencyKey` so a retried call
@@ -1742,20 +2316,79 @@ declare class SessionsApi {
1742
2316
  * {@link isFlowError}).
1743
2317
  */
1744
2318
  selectMethod(id: string, method: IdentityMethod): Promise<Session>;
1745
- /** `GET /sessions/:id` — the whitelisted view (no client token). */
2319
+ /** `GET /sessions/:id` — the whitelisted view (no client token). Either id form (`ses_...` or bare) works. */
1746
2320
  get(id: string): Promise<Session>;
1747
2321
  /**
1748
- * `GET /sessions?externalRef=&status=`: your newest sessions (at most 100),
1749
- * optionally filtered by your own user id and/or a status. The filters are
2322
+ * `POST /sessions/:id/cancel` — stop a session that has not ended. The
2323
+ * hosted link stops working, and one `session.failed` with
2324
+ * `failureReason: "cancelled_by_organization"` is sent. Returns the
2325
+ * cancelled session. `409 session_not_cancellable` once the session has
2326
+ * ended (a repeated cancel included). Needs the `sessions:create` scope.
2327
+ */
2328
+ cancel(id: string, opts?: RequestOptions): Promise<Session>;
2329
+ /**
2330
+ * `POST /sessions/:id/link/resend` — send the hosted link again through the
2331
+ * session's own `deliver` channel, to the same destination (neither can be
2332
+ * changed). Only for sessions created with `deliver`:
2333
+ * `409 link_not_deliverable` otherwise, `409 link_not_usable` once the
2334
+ * session ended, `429 resend_rate_limited` past the send limits. Needs the
2335
+ * `sessions:create` scope.
2336
+ */
2337
+ resendLink(id: string, opts?: RequestOptions): Promise<SessionLinkDelivery>;
2338
+ /**
2339
+ * `POST /sessions/:id/link/extend` — a later expiry for the hosted link
2340
+ * and its session: `{ ttlMinutes }` counted from the session creation, or
2341
+ * `{ expiresAt }`. `400 ttl_out_of_policy` when it is not later than the
2342
+ * current expiry or past the flow's maximum. Only for sessions created with
2343
+ * `deliver`. Needs the `sessions:create` scope.
2344
+ */
2345
+ extendLink(id: string, input: ExtendLinkInput, opts?: RequestOptions): Promise<SessionLinkExpiry>;
2346
+ /**
2347
+ * The first page of your sessions, newest first (`GET /sessions`; the API
2348
+ * returns 50 by default, at most 100 with `limit`). Read every page with
2349
+ * {@link SessionsApi.iterate}, or one page and its cursor with
2350
+ * {@link SessionsApi.listPage}. The `externalRef` and `status` filters are
1750
2351
  * applied again to the answer, so an API that ignores them never returns
1751
2352
  * another user's sessions.
1752
2353
  */
1753
2354
  list(query?: ListSessionsQuery): Promise<Session[]>;
2355
+ /** One page of {@link SessionsApi.list} with its `nextCursor` (absent on the last page). */
2356
+ listPage(query?: ListSessionsQuery): Promise<Page<Session>>;
2357
+ /**
2358
+ * Every session matching `query`, newest first, following `nextCursor` page
2359
+ * after page (`limit` sets the page size).
2360
+ *
2361
+ * @example
2362
+ * ```ts
2363
+ * for await (const s of sekyro.sessions.iterate({ status: "completed" })) {
2364
+ * console.log(s.id);
2365
+ * }
2366
+ * ```
2367
+ */
2368
+ iterate(query?: ListSessionsQuery): AsyncGenerator<Session, void, undefined>;
1754
2369
  /**
1755
- * `GET /sessions/:id/portrait?format=url` — ID mode: a 5-minute presigned
1756
- * link to the 480×640 ICAO portrait (JPEG). Needs the `portrait:read` scope
1757
- * (keys minted from the dashboard carry it). `404 portrait_not_available`
1758
- * until the session's `portrait_icao` check has passed (`portraitAvailable`).
2370
+ * `GET /sessions/:id/media` — the session's media (documents, portraits,
2371
+ * the selfie, the clips), each with its check, attempt tags and a URL valid
2372
+ * 15 minutes ({@link MediaItem}). Needs the `sessions:read` scope.
2373
+ */
2374
+ media(id: string): Promise<MediaList>;
2375
+ /**
2376
+ * `GET /sessions/:id/media/:kind` — the bytes of one media item: the
2377
+ * decisive attempt of that kind by default, `attempt` for another one,
2378
+ * `reference: "first"` for the first reference of a `reference_portrait`
2379
+ * a second reference decided. `404 media_not_available` when the kind, the
2380
+ * attempt or the object is not there. Needs the `sessions:read` scope.
2381
+ */
2382
+ mediaBytes(id: string, kind: MediaKind, opts?: MediaBytesOptions): Promise<MediaBytes>;
2383
+ /**
2384
+ * `GET /sessions/:id/portrait?format=url` — ID mode: a short-lived
2385
+ * presigned link to the 480×640 ICAO portrait (JPEG). Needs the
2386
+ * `sessions:read` scope (the older `portrait:read` still works).
2387
+ * `404 portrait_not_available` until the session's `portrait_icao` check
2388
+ * has passed (`portraitAvailable`).
2389
+ * @deprecated Use {@link SessionsApi.media} (the `icao_portrait` item) or
2390
+ * {@link SessionsApi.mediaBytes} with `icao_portrait`. This method stays on
2391
+ * the portrait route for its last release.
1759
2392
  */
1760
2393
  portrait(id: string): Promise<SessionPortraitLink>;
1761
2394
  /**
@@ -1767,56 +2400,92 @@ declare class SessionsApi {
1767
2400
  resultToken(id: string): Promise<ResultTokenResponse>;
1768
2401
  }
1769
2402
  /**
1770
- * `sekyro.subjects` — read and manage subjects (the same person across your
1771
- * apps). Reads need the `subjects:read` scope, `revoke` / `delete` the
1772
- * `subjects:write` scope (keys minted from the dashboard carry both; an older
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.
2403
+ * `sekyro.people` — read and manage people (the same person across your
2404
+ * apps). Reads need the `people:read` scope, `revoke` / `delete` the
2405
+ * `people:write` scope (`subjects:read` and `subjects:write`, the older
2406
+ * names, still work; keys minted from the dashboard carry both). A person is
2407
+ * visible once they have passed a verification: a person who never passed,
2408
+ * an unknown id and a person of another organization or environment all
2409
+ * answer the same `404 subject_not_found` on `get`, `revoke` and `delete`,
2410
+ * and `list` leaves them out. Ids are `per_...`; the bare 24 hexadecimal
2411
+ * characters name the same person.
1778
2412
  *
1779
2413
  * Type-only export, like {@link SessionsApi}: obtained through
1780
- * {@link Sekyro.subjects}.
2414
+ * {@link Sekyro.people}.
1781
2415
  * @public
1782
2416
  */
1783
- declare class SubjectsApi {
1784
- private readonly call;
2417
+ declare class PeopleApi {
2418
+ private readonly t;
1785
2419
  /** @internal */
1786
- constructor(call: <T>(method: "GET" | "POST" | "DELETE", path: string, body?: unknown, idempotencyKey?: string) => Promise<T>);
1787
- /** `GET /subjects/:id` — the subject, its sessions and its returning-user readiness. */
1788
- get(id: string): Promise<Subject>;
2420
+ constructor(t: {
2421
+ call<T>(method: "GET" | "POST" | "DELETE", path: string, body?: unknown, idempotencyKey?: string): Promise<T>;
2422
+ page<T>(path: string): Promise<Page<T>>;
2423
+ });
2424
+ /** `GET /people/:id` — the person, their sessions and their returning-user readiness. */
2425
+ get(id: string): Promise<Person>;
1789
2426
  /**
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.
2427
+ * The first page of the people who have passed a verification, newest
2428
+ * first (`GET /people`; 50 by default, at most 100 with `limit`),
2429
+ * optionally only those carrying your own id (`externalRef`). The list can
2430
+ * be empty while sessions with this `externalRef` exist. Every page:
2431
+ * {@link PeopleApi.iterate}.
1793
2432
  */
1794
- list(query: {
1795
- externalRef: string;
1796
- }): Promise<Subject[]>;
2433
+ list(query?: ListPeopleQuery): Promise<Person[]>;
2434
+ /** One page of {@link PeopleApi.list} with its `nextCursor` (absent on the last page). */
2435
+ listPage(query?: ListPeopleQuery): Promise<Page<Person>>;
2436
+ /** Every person matching `query`, newest first, following `nextCursor` page after page. */
2437
+ iterate(query?: ListPeopleQuery): AsyncGenerator<Person, void, undefined>;
1797
2438
  /**
1798
- * `POST /subjects/:id/revoke` — the subject can no longer be used for
2439
+ * `POST /people/:id/revoke` — the person can no longer be used for
1799
2440
  * returning-user sessions. Idempotent: revoking again returns the same view.
1800
- * Emits `subject.updated` with `status: 'revoked'`.
2441
+ * Emits `person.updated` (and `subject.updated`) with `status: 'revoked'`.
2442
+ */
2443
+ revoke(id: string, input?: RevokePersonInput, opts?: RequestOptions): Promise<Person>;
2444
+ /**
2445
+ * `POST /people/:id/screen` — screens a verified person again against
2446
+ * sanctions and PEP lists (`lists`, default sanctions and PEP), from the
2447
+ * person's stored name, birth date and the issuing countries of their identity
2448
+ * numbers. Billed as one AML screening; a refusal is not billed
2449
+ * (`400 screening_list_not_covered`, `403 service_not_in_plan`,
2450
+ * `503 screening_unavailable`). A hit or a possible match also sends
2451
+ * `aml.match_flagged`. Pass an `idempotencyKey` so a retried call is not
2452
+ * billed twice.
2453
+ */
2454
+ screen(id: string, input?: ScreenPersonInput, opts?: RequestOptions): Promise<Screening>;
2455
+ /**
2456
+ * The first page of a person's screenings, newest first
2457
+ * (`GET /people/:id/screenings`; 25 by default, at most 50 with `limit`).
2458
+ * Every page: {@link PeopleApi.iterateScreenings}.
1801
2459
  */
1802
- revoke(id: string, input?: RevokeSubjectInput, opts?: RequestOptions): Promise<Subject>;
2460
+ screenings(id: string, query?: ListScreeningsQuery): Promise<Screening[]>;
2461
+ /** One page of {@link PeopleApi.screenings} with its `nextCursor` (absent on the last page). */
2462
+ screeningsPage(id: string, query?: ListScreeningsQuery): Promise<Page<Screening>>;
2463
+ /** Every screening of a person, newest first, following `nextCursor` page after page. */
2464
+ iterateScreenings(id: string, query?: ListScreeningsQuery): AsyncGenerator<Screening, void, undefined>;
1803
2465
  /**
1804
- * `DELETE /subjects/:id` — deletes the subject's stored photos, face
1805
- * templates and identifiers, and unlinks its sessions. Emits
1806
- * `subject.deleted`. Cannot be undone; a second call answers `404`.
2466
+ * `DELETE /people/:id` — deletes the person's stored photos, face
2467
+ * templates and identifiers, and the personal data and media of their
2468
+ * sessions, which it unlinks (they keep their outcome and steps). Emits
2469
+ * `person.deleted` (and `subject.deleted`). Cannot be undone; a second call answers `404`.
1807
2470
  */
1808
- delete(id: string): Promise<DeletedSubject>;
2471
+ delete(id: string): Promise<DeletedPerson>;
1809
2472
  /**
1810
- * A re-check or step-up session for an existing subject in one call:
1811
- * `POST /subjects/:id/sessions` when `target` is a subject id (24
1812
- * hexadecimal characters) or `{ subjectId }`, otherwise
1813
- * `POST /subjects/by-external-ref/:externalRef/sessions` (pass
2473
+ * A re-check or step-up session for an existing person in one call:
2474
+ * `POST /people/:id/sessions` when `target` is a person id (`per_...` or 24
2475
+ * hexadecimal characters) or `{ personId }`, otherwise
2476
+ * `POST /people/by-external-ref/:externalRef/sessions` (pass
1814
2477
  * `{ externalRef }` to force it). Same result and errors as
1815
2478
  * {@link SessionsApi.create}; needs the `sessions:create` and
1816
- * `subjects:read` scopes.
2479
+ * `people:read` scopes.
1817
2480
  */
1818
- createSession(target: string | SubjectSessionTarget, input: SubjectSessionInput, opts?: RequestOptions): Promise<CreatedSession>;
2481
+ createSession(target: string | PersonSessionTarget, input: PersonSessionInput, opts?: RequestOptions): Promise<CreatedSession>;
1819
2482
  }
2483
+ /**
2484
+ * @deprecated Use {@link PeopleApi} ({@link Sekyro.people}); `sekyro.subjects`
2485
+ * is the same object.
2486
+ * @public
2487
+ */
2488
+ type SubjectsApi = PeopleApi;
1820
2489
  /**
1821
2490
  * Sekyro AI partner API client. Server-side only: it carries your API key.
1822
2491
  *
@@ -1827,14 +2496,16 @@ declare class SubjectsApi {
1827
2496
  * @example
1828
2497
  * ```ts
1829
2498
  * const sekyro = new Sekyro({ apiKey: process.env.SEKYRO_API_KEY! });
1830
- * const { id, clientToken } = await sekyro.sessions.create({ input: { nni: "1357924632" } });
2499
+ * const { id, hostedUrl } = await sekyro.sessions.create({ person: { externalRef: "<your user id>" } });
1831
2500
  * ```
1832
2501
  * @public
1833
2502
  */
1834
2503
  declare class Sekyro {
1835
2504
  #private;
1836
2505
  readonly sessions: SessionsApi;
1837
- readonly subjects: SubjectsApi;
2506
+ readonly people: PeopleApi;
2507
+ /** @deprecated Use {@link Sekyro.people}: the same object. */
2508
+ readonly subjects: PeopleApi;
1838
2509
  constructor(opts: SekyroOptions);
1839
2510
  /**
1840
2511
  * `GET /flows` — the published flows of the API key's app (default flow
@@ -1845,4 +2516,4 @@ declare class Sekyro {
1845
2516
  listFlows(): Promise<FlowSummary[]>;
1846
2517
  }
1847
2518
 
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 };
2519
+ export { type IdentitySources as $, type AgeMethod as A, type DeliverOptions as B, type CreatedSession as C, DEFAULT_BASE_URL as D, type DocumentSubstitutionSettings as E, type FetchLike as F, type EidResult as G, type EligibilityReason as H, type ExtendLinkInput as I, type FlowOverridableSettings as J, type FlowOverrides as K, type Locale as L, type FlowServiceSettings as M, type FlowSummary as N, type IdNumberReason as O, type Identity as P, type IdentityBirthPlace as Q, type ReviewReason as R, Sekyro as S, type IdentityDocument as T, type IdentityIdNumber as U, type VerificationLevel as V, type WebhookEventType as W, type IdentityMethod as X, type IdentityName as Y, type IdentityScalarKey as Z, type IdentitySource as _, type ServiceId as a, type SessionSupersededEventData as a$, type LevelTarget as a0, type ListPeopleQuery as a1, type ListScreeningsQuery as a2, type ListSessionsQuery as a3, type MatchReason as a4, type MediaBytes as a5, type MediaBytesOptions as a6, type MediaItem as a7, type MediaKind as a8, type MediaList as a9, type ScreeningHit as aA, type ScreeningHitSummary as aB, type ScreeningList as aC, type ScreeningStatus as aD, type ScreeningTrigger as aE, type ScreeningUnavailableReason as aF, type SekyroOptions as aG, type Session as aH, type SessionDevice as aI, type SessionDeviceSignal as aJ, type SessionEventData as aK, type SessionFailureReason as aL, type SessionFlowRef as aM, type SessionLifecycleEventData as aN, type SessionLinkDelivery as aO, type SessionLinkExpiry as aP, type SessionLinkInput as aQ, type SessionNetwork as aR, type SessionNetworkEvent as aS, type SessionPortraitLink as aT, type SessionReviewDecidedEventData as aU, type SessionScreening as aV, type SessionStatus as aW, type SessionStep as aX, type SessionStepCompletedEventData as aY, type SessionStepDecision as aZ, type SessionSubjectInput as a_, type NameForm as aa, type Page as ab, PeopleApi as ac, type Person as ad, type PersonBirthPlaceInput as ae, type PersonDeletedEventData as af, type PersonDocumentInput as ag, type PersonEnrolledEventData as ah, type PersonSession as ai, type PersonSessionInput as aj, type PersonSessionTarget as ak, type PersonSuspiciousActivityEventData as al, type PersonUpdatedEventData as am, type PolicyFailureReason as an, type PortraitReportEntry as ao, type PriorReviewReason as ap, type ProbeBindingReason as aq, type ProbeQuality as ar, type ProfileDocumentType as as, type RequestOptions as at, type ResultTokenResponse as au, type ReviewOutcomeReason as av, type RevokePersonInput as aw, type RevokeSubjectInput as ax, type ScreenPersonInput as ay, type Screening as az, type SessionPersonInput as b, SessionsApi as b0, type Subject as b1, type SubjectAssurance as b2, type SubjectDeletedEventData as b3, type SubjectEnrolledEventData as b4, type SubjectIdNumber as b5, type SubjectName as b6, type SubjectReferenceSource as b7, type SubjectReuseDocument as b8, type SubjectReuseTarget as b9, type SubjectSession as ba, type SubjectSessionInput as bb, type SubjectSessionTarget as bc, type SubjectStatus as bd, type SubjectSuspiciousActivityEventData as be, type SubjectUpdatedEventData as bf, type SubjectsApi as bg, type SuppliedIdentityRecord as bh, type UsageThresholdReachedEventData as bi, type VerifiedContacts as bj, type WebhookEnvelopeOf as bk, type WebhookEventDataMap as bl, 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 AmlMatchFlaggedEventData as n, type CameraUnavailableCause as o, type CheckState as p, type CheckType as q, type ConnectorIdentity as r, type CreateSessionInput as s, type CreatedSessionWarning as t, DEFAULT_TIMEOUT_MS as u, type DecidedBy as v, type DecisionReason as w, type DeepPartial as x, type DeletedPerson as y, type DeletedSubject as z };