@checktiv/sdk-web 1.9.0 → 1.12.0

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.
Files changed (64) hide show
  1. package/README.md +16 -1
  2. package/dist/agents/AGENTS.md +8 -0
  3. package/dist/agents/manifest.json +24 -0
  4. package/dist/capture-ui.d.ts +4 -4
  5. package/dist/capture-ui.js +7 -6
  6. package/dist/capture.d.ts +3 -3
  7. package/dist/capture.js +4 -3
  8. package/dist/challenge.js +2 -2
  9. package/dist/chunk-3KEVZCCZ.js +3 -0
  10. package/dist/chunk-4HIQN4KL.js +3 -0
  11. package/dist/chunk-C7GRMEYT.js +3 -0
  12. package/dist/chunk-CAI3JWWU.js +12 -0
  13. package/dist/chunk-EOTGVXW6.js +7 -0
  14. package/dist/{chunk-HV2QKVJX.js → chunk-FQSJUWRP.js} +1 -1
  15. package/dist/{chunk-FL2GCRSI.js → chunk-HWABVMID.js} +4 -4
  16. package/dist/{chunk-MCYAWMYQ.js → chunk-KYV5BPCD.js} +2 -2
  17. package/dist/chunk-MLQ2HMTS.js +3 -0
  18. package/dist/chunk-O3JECGW2.js +3 -0
  19. package/dist/chunk-PB2THQ3P.js +8 -0
  20. package/dist/chunk-TKK5CTVG.js +59 -0
  21. package/dist/chunk-UVTAPUGQ.js +3 -0
  22. package/dist/chunk-VMWTID63.js +3 -0
  23. package/dist/{chunk-WC6TLR42.js → chunk-WALPQ6TH.js} +2 -1
  24. package/dist/chunk-YE2LWN74.js +9 -0
  25. package/dist/{chunk-XSSM5ZB7.js → chunk-ZU4L3NDZ.js} +1 -1
  26. package/dist/collect-user-info.d.ts +4 -4
  27. package/dist/collect-user-info.js +5 -5
  28. package/dist/{controller-Ta5RgFZ4.d.ts → controller-Dh-rSrot.d.ts} +3 -2
  29. package/dist/{copy-CEILzVXc.d.ts → copy-Bsb1n1Wv.d.ts} +1 -1
  30. package/dist/credit-history.d.ts +4 -0
  31. package/dist/credit-history.js +12 -0
  32. package/dist/cross-device.js +2 -2
  33. package/dist/custom-form.css +1 -1
  34. package/dist/custom-form.d.ts +3 -3
  35. package/dist/custom-form.js +7 -8
  36. package/dist/esign/ceremony-runtime.js +7 -0
  37. package/dist/esign.d.ts +16 -0
  38. package/dist/esign.js +427 -0
  39. package/dist/fraud.d.ts +3 -3
  40. package/dist/fraud.js +5 -6
  41. package/dist/idv/cross-device.d.ts +7 -7
  42. package/dist/idv/cross-device.js +4 -5
  43. package/dist/idv.d.ts +3 -3
  44. package/dist/idv.js +13 -13
  45. package/dist/index-CGH7LlPH.d.ts +736 -0
  46. package/dist/{index-G5mVvjNZ.d.ts → index-CZt19Km4.d.ts} +5 -5
  47. package/dist/index.d.ts +6 -6
  48. package/dist/index.js +8 -8
  49. package/dist/{machine-BhPiYmOR.d.ts → machine-EePe2ERe.d.ts} +49 -2
  50. package/dist/react.d.ts +4 -4
  51. package/dist/react.js +11 -11
  52. package/dist/workspace.d.ts +3 -3
  53. package/dist/workspace.js +2 -1
  54. package/package.json +35 -9
  55. package/dist/api-BrQqQbGK.d.ts +0 -342
  56. package/dist/chunk-523TT3PD.js +0 -7
  57. package/dist/chunk-7GP5REM7.js +0 -3
  58. package/dist/chunk-BBO2X73Y.js +0 -9
  59. package/dist/chunk-GFHNOZVO.js +0 -3
  60. package/dist/chunk-NHNGQ5BB.js +0 -66
  61. package/dist/chunk-S2OOEDJS.js +0 -3
  62. package/dist/chunk-T4R5TTE5.js +0 -7
  63. package/dist/chunk-WPMO4FQ2.js +0 -13
  64. package/dist/chunk-XOGHMNBX.js +0 -3
@@ -0,0 +1,736 @@
1
+ import { l as CaptureBehaviorStep, m as CaptureBehaviorTraits, o as CaptureBrandTokens, p as CaptureTheme, e as CaptureLayout, f as CaptureBehaviorMessage, q as CaptureSessionClientConfig, s as SelfiePromptMap, t as SelfieChromeCopy, B as BeginScanCopyOverrides, C as CoachingKind, k as CaptureTimingSnapshot } from './machine-EePe2ERe.js';
2
+ import { M as MountCopy } from './copy-Bsb1n1Wv.js';
3
+ import { C as CrossDeviceCopy } from './copy-DCeQ4JKx.js';
4
+
5
+ declare const SystemModes: readonly ["live", "test"];
6
+ type SystemMode = (typeof SystemModes)[number];
7
+ declare const DataRegions: readonly ["us", "eu"];
8
+ type DataRegion = (typeof DataRegions)[number];
9
+
10
+ type ChecktivKnownErrorCode = 'origin_not_allowed' | 'token_expired' | 'session_expired' | 'wrong_token_type' | 'protocol_mismatch' | 'camera_denied' | 'camera_policy_blocked' | 'camera_unsupported' | 'cv_gate_failed' | 'upload_failed' | 'submit_failed' | 'sdk_load_failed' | 'biometric_unsupported' | 'isolation_required' | 'session_parked';
11
+ type ChecktivErrorCode = ChecktivKnownErrorCode | (string & {});
12
+ declare const CHECKTIV_RECOVERY_STRATEGIES: readonly ["retry", "cross_device", "refresh_session", "contact_operator"];
13
+ type ChecktivRecovery = (typeof CHECKTIV_RECOVERY_STRATEGIES)[number];
14
+ interface ChecktivError {
15
+ code: ChecktivErrorCode;
16
+ recoverable: boolean;
17
+ recovery: ChecktivRecovery;
18
+ message: string;
19
+ }
20
+ declare const CHECKTIV_ERROR_CODES: readonly ChecktivKnownErrorCode[];
21
+ declare function createChecktivError(code: ChecktivKnownErrorCode): ChecktivError;
22
+
23
+ type ChecktivCustomFormEvent = {
24
+ type: 'checktiv.custom_form.ready';
25
+ } | {
26
+ type: 'checktiv.custom_form.submitted';
27
+ sessionId: string;
28
+ } | {
29
+ type: 'checktiv.custom_form.error';
30
+ error: ChecktivError;
31
+ };
32
+
33
+ declare const ESIGN_STATES: readonly ["preparing", "consent", "read", "scroll_incomplete", "adopt", "age_gate", "explain", "sign", "decline", "withdraw", "obscured", "frame_blocked", "age_blocked", "conflict", "token_expired", "protocol_mismatch", "error", "submit_error", "terminal_signed", "terminal_declined", "terminal_voided", "terminal_expired", "terminal_withdrawn"];
34
+ type EsignState = (typeof ESIGN_STATES)[number];
35
+ type TerminalEnvelopeStatus = 'signed' | 'declined' | 'voided' | 'expired';
36
+ declare const TERMINAL_STATUS_TO_STATE: {
37
+ readonly signed: "terminal_signed";
38
+ readonly declined: "terminal_declined";
39
+ readonly voided: "terminal_voided";
40
+ readonly expired: "terminal_expired";
41
+ };
42
+ declare const ESIGN_CONSENT_ACTIONS: readonly ["withdraw_consent", "request_paper_copy"];
43
+ type EsignConsentAction = (typeof ESIGN_CONSENT_ACTIONS)[number];
44
+ type EsignConsentOutcome = 'consent_withdrawn_before_signing' | 'consent_withdrawn_after_signing' | 'paper_copy_requested' | 'paper_copy_already_outstanding';
45
+ type EsignRightsAffordance = 'both' | 'none';
46
+ declare const ESIGN_STATE_RIGHTS: {
47
+ readonly preparing: "none";
48
+ readonly consent: "both";
49
+ readonly read: "both";
50
+ readonly scroll_incomplete: "both";
51
+ readonly adopt: "both";
52
+ readonly age_gate: "both";
53
+ readonly explain: "both";
54
+ readonly sign: "both";
55
+ readonly decline: "both";
56
+ readonly withdraw: "both";
57
+ readonly obscured: "both";
58
+ readonly age_blocked: "none";
59
+ readonly frame_blocked: "none";
60
+ readonly conflict: "none";
61
+ readonly token_expired: "none";
62
+ readonly protocol_mismatch: "none";
63
+ readonly error: "none";
64
+ readonly submit_error: "none";
65
+ readonly terminal_signed: "none";
66
+ readonly terminal_declined: "none";
67
+ readonly terminal_voided: "none";
68
+ readonly terminal_expired: "none";
69
+ readonly terminal_withdrawn: "none";
70
+ };
71
+ declare function esignStateOffersRights(state: EsignState): boolean;
72
+ declare const ESIGN_FRAME_ANNOUNCE_TIMEOUT_MS = 20000;
73
+
74
+ type EsignSubmitOutcome = 'signed' | 'declined';
75
+ type ChecktivEsignEvent = {
76
+ type: 'checktiv.esign.ready';
77
+ } | {
78
+ type: 'checktiv.esign.state';
79
+ state: EsignState;
80
+ } | {
81
+ type: 'checktiv.esign.submitted';
82
+ sessionId: string;
83
+ outcome: EsignSubmitOutcome;
84
+ } | {
85
+ type: 'checktiv.esign.error';
86
+ error: ChecktivError;
87
+ };
88
+
89
+ type CreditBrandTokens = CaptureBrandTokens;
90
+ type CreditTheme = CaptureTheme;
91
+ type CreditScreen = 'consent' | 'address_history' | 'identity_and_title' | 'review';
92
+ type CreditErrorCode = 'load_failed' | 'config_error' | 'session_expired' | 'submit_failed';
93
+ type CreditSkipReason = 'unsupported_jurisdiction';
94
+ interface CreditCopyMap {
95
+ continueLabel?: string;
96
+ backLabel?: string;
97
+ submitLabel?: string;
98
+ }
99
+ interface CreditInitMessage {
100
+ type: 'credit:init';
101
+ locale: string;
102
+ theme: CreditTheme;
103
+ copy?: CreditCopyMap;
104
+ }
105
+ type CreditBehaviorStep = CaptureBehaviorStep;
106
+ type CreditBehaviorTraits = CaptureBehaviorTraits;
107
+ interface CreditBehaviorSegment {
108
+ steps: CreditBehaviorStep[];
109
+ traits: CreditBehaviorTraits;
110
+ }
111
+ type CreditFromIframeMessage = {
112
+ type: 'credit:ready';
113
+ } | {
114
+ type: 'credit:resize';
115
+ height: number;
116
+ } | {
117
+ type: 'credit:screen_changed';
118
+ index: number;
119
+ total: number;
120
+ screen: CreditScreen;
121
+ } | {
122
+ type: 'credit:submitted';
123
+ } | {
124
+ type: 'credit:declined';
125
+ } | {
126
+ type: 'credit:skipped';
127
+ reason: CreditSkipReason;
128
+ } | {
129
+ type: 'credit:error';
130
+ code: CreditErrorCode;
131
+ } | {
132
+ type: 'credit:credential_expired';
133
+ } | {
134
+ type: 'credit:behavior';
135
+ steps: CreditBehaviorStep[];
136
+ traits: CreditBehaviorTraits;
137
+ };
138
+ declare const CREDIT_FRAME_MIN_HEIGHT_PX = 200;
139
+ declare const CREDIT_FRAME_MAX_HEIGHT_PX = 20000;
140
+ declare const CREDIT_SCREENS: readonly ["consent", "address_history", "identity_and_title", "review"];
141
+ declare const CREDIT_SCREEN_COUNT: 4;
142
+ declare function projectCreditCopy(copy: CreditCopyMap | undefined): CreditCopyMap | null;
143
+ declare function parseCreditInbound(data: unknown): CreditFromIframeMessage | null;
144
+
145
+ type CreditHistoryReconnectReason = 'bootstrap_timeout' | 'credential_expired';
146
+ type ChecktivCreditHistoryEvent = {
147
+ type: 'checktiv.credit_history.ready';
148
+ } | {
149
+ type: 'checktiv.credit_history.screen';
150
+ screen: CreditScreen;
151
+ index: number;
152
+ total: number;
153
+ } | {
154
+ type: 'checktiv.credit_history.reconnecting';
155
+ reason: CreditHistoryReconnectReason;
156
+ } | {
157
+ type: 'checktiv.credit_history.submitted';
158
+ sessionId: string;
159
+ } | {
160
+ type: 'checktiv.credit_history.declined';
161
+ } | {
162
+ type: 'checktiv.credit_history.skipped';
163
+ reason: CreditSkipReason;
164
+ } | {
165
+ type: 'checktiv.credit_history.error';
166
+ error: ChecktivError;
167
+ };
168
+ declare const CREDIT_HISTORY_EVENT_TYPES: readonly ["checktiv.credit_history.ready", "checktiv.credit_history.screen", "checktiv.credit_history.reconnecting", "checktiv.credit_history.submitted", "checktiv.credit_history.declined", "checktiv.credit_history.skipped", "checktiv.credit_history.error"];
169
+ declare function isChecktivCreditHistoryEvent(event: ChecktivEvent): event is ChecktivCreditHistoryEvent;
170
+
171
+ declare const FORM_FIELD_TYPES: readonly ["short_text", "long_text", "number", "email", "phone", "date", "single_select", "multi_select", "boolean", "file_upload", "content_heading", "content_paragraph"];
172
+ type FormFieldType = (typeof FORM_FIELD_TYPES)[number];
173
+
174
+ type CustomFormApplicantLabel = Record<string, string>;
175
+ interface CustomFormApplicantFieldValidation {
176
+ minLength?: number;
177
+ maxLength?: number;
178
+ min?: number;
179
+ max?: number;
180
+ minSelections?: number;
181
+ maxSelections?: number;
182
+ }
183
+ interface CustomFormApplicantFieldOption {
184
+ value: string;
185
+ label: CustomFormApplicantLabel;
186
+ }
187
+ interface CustomFormApplicantField {
188
+ id: string;
189
+ type: FormFieldType;
190
+ label: CustomFormApplicantLabel;
191
+ helpText?: CustomFormApplicantLabel;
192
+ required: boolean;
193
+ validation?: CustomFormApplicantFieldValidation;
194
+ options?: CustomFormApplicantFieldOption[];
195
+ }
196
+ type CustomFormApplicantConfig = {
197
+ supportedLocales: string[];
198
+ fields: CustomFormApplicantField[];
199
+ };
200
+
201
+ declare const MODULE_SUBPATH: {
202
+ readonly idv: "idv";
203
+ readonly fraud: "fraud";
204
+ readonly custom_form: "custom-form";
205
+ readonly esign: "esign";
206
+ readonly credit_history: "credit-history";
207
+ };
208
+ type SdkModuleName = keyof typeof MODULE_SUBPATH;
209
+
210
+ interface TokenManager {
211
+ get(): Promise<string>;
212
+ refresh(reason: 'expired' | '401'): Promise<string>;
213
+ }
214
+
215
+ interface SyntheticIdvScript {
216
+ injectError?: ChecktivKnownErrorCode;
217
+ stepDelayMs?: number;
218
+ }
219
+
220
+ type CrossDeviceHandoffHook = () => Promise<{
221
+ kind: 'ok';
222
+ url: string;
223
+ } | {
224
+ kind: 'unavailable';
225
+ }>;
226
+ interface ForwardedSession {
227
+ sessionId: string;
228
+ stepId: string;
229
+ config: CaptureSessionClientConfig | null;
230
+ }
231
+ interface IdvMountOptions {
232
+ target: HTMLElement | string;
233
+ onEvent?: (e: ChecktivIdvEvent) => void;
234
+ copy?: MountCopy;
235
+ layout?: CaptureLayout;
236
+ maxWidth?: string;
237
+ onBeforeSubmit?: () => Promise<void>;
238
+ onBehaviorSegment?: (segment: Pick<CaptureBehaviorMessage, 'steps' | 'traits'>) => void;
239
+ fetchImpl?: typeof fetch;
240
+ synthetic?: SyntheticIdvScript;
241
+ onOpenCrossDevice?: CrossDeviceHandoffHook;
242
+ crossDeviceCopy?: CrossDeviceCopy;
243
+ session?: ForwardedSession;
244
+ }
245
+ interface IdvHandle {
246
+ destroy(): void;
247
+ unmount(): void;
248
+ openCrossDevice?(): void;
249
+ }
250
+ declare const REMINT_READY_TIMEOUT_MS = 15000;
251
+ declare function createIdv(ctx: SubstrateContext, opts: IdvMountOptions): IdvHandle;
252
+ type IdvChunkModule = {
253
+ createIdv: typeof createIdv;
254
+ };
255
+
256
+ interface CustomFormFieldCopy {
257
+ readonly label?: string;
258
+ readonly helpText?: string;
259
+ readonly options?: Readonly<Record<string, string>>;
260
+ }
261
+ interface CustomFormCopy {
262
+ readonly fields?: Readonly<Record<string, CustomFormFieldCopy>>;
263
+ readonly submit?: string;
264
+ readonly submitPending?: string;
265
+ readonly requiredError?: string;
266
+ readonly invalidPhoneError?: string;
267
+ readonly invalidEmailError?: string;
268
+ readonly invalidDateError?: string;
269
+ readonly invalidOptionError?: string;
270
+ readonly outOfRangeError?: string;
271
+ readonly invalidFormatError?: string;
272
+ readonly invalidError?: string;
273
+ readonly validationError?: string;
274
+ readonly uploadError?: string;
275
+ readonly submitError?: string;
276
+ readonly booleanYes?: string;
277
+ readonly booleanNo?: string;
278
+ }
279
+
280
+ interface CustomFormMountOptions {
281
+ target: HTMLElement | string;
282
+ config: CustomFormApplicantConfig;
283
+ copy?: CustomFormCopy;
284
+ onEvent?: (e: ChecktivCustomFormEvent) => void;
285
+ session?: {
286
+ sessionId: string;
287
+ stepId: string;
288
+ };
289
+ fetchImpl?: typeof fetch;
290
+ preview?: boolean;
291
+ }
292
+ interface CustomFormHandle {
293
+ destroy(): void;
294
+ }
295
+ declare function createCustomForm(ctx: SubstrateContext, opts: CustomFormMountOptions): CustomFormHandle;
296
+ type CustomFormChunkModule = {
297
+ createCustomForm: typeof createCustomForm;
298
+ };
299
+
300
+ type EsignCopy = Partial<Record<EsignState, string>> & {
301
+ frameTitle?: string;
302
+ labels?: Partial<Record<EsignLabel, string>>;
303
+ rights?: Partial<Record<EsignRightsKey, string>>;
304
+ documents?: Partial<Record<EsignDocumentCopyKey, string>>;
305
+ shell?: Partial<Record<EsignShellKey, string>>;
306
+ };
307
+ type EsignCopyScalarKey = {
308
+ [K in keyof EsignCopy]-?: EsignCopy[K] extends string | undefined ? K : never;
309
+ }[keyof EsignCopy];
310
+ declare const ESIGN_COPY_FALLBACKS: {
311
+ preparing: string;
312
+ consent: string;
313
+ read: string;
314
+ scroll_incomplete: string;
315
+ adopt: string;
316
+ age_gate: string;
317
+ explain: string;
318
+ sign: string;
319
+ decline: string;
320
+ withdraw: string;
321
+ obscured: string;
322
+ frame_blocked: string;
323
+ conflict: string;
324
+ token_expired: string;
325
+ protocol_mismatch: string;
326
+ error: string;
327
+ submit_error: string;
328
+ terminal_signed: string;
329
+ terminal_declined: string;
330
+ terminal_voided: string;
331
+ terminal_expired: string;
332
+ terminal_withdrawn: string;
333
+ age_blocked: string;
334
+ frameTitle: string;
335
+ };
336
+ declare const ESIGN_LABELS: readonly ["finish", "adopt", "cancel", "change", "tryAgain", "reload", "reloadToCheck", "getHelp", "moreActions", "jumpToEnd", "readNotice", "signatureBlock", "signatureBlockDone", "finishLater", "printAndSign", "decline", "declineSubmit", "declineCancel", "signatureName", "signatureStyle", "declineReason", "ageConfirm", "documentHeading", "signatureHeading"];
337
+ type EsignLabel = (typeof ESIGN_LABELS)[number];
338
+ declare const ESIGN_LABEL_FALLBACKS: {
339
+ readonly finish: "Finish";
340
+ readonly adopt: "Use this signature";
341
+ readonly cancel: "Cancel";
342
+ readonly change: "Change";
343
+ readonly tryAgain: "Try again";
344
+ readonly reload: "Reload the page";
345
+ readonly reloadToCheck: "Reload to check";
346
+ readonly getHelp: "Get help";
347
+ readonly moreActions: "More actions";
348
+ readonly readNotice: "Notice and your rights";
349
+ readonly jumpToEnd: "Jump to the end";
350
+ readonly signatureBlock: "Add your signature here. Required.";
351
+ readonly signatureBlockDone: "Your signature. Select to change it.";
352
+ readonly finishLater: "Finish later";
353
+ readonly printAndSign: "Print and sign";
354
+ readonly decline: "Decline to sign";
355
+ readonly declineSubmit: "Send my decline";
356
+ readonly declineCancel: "Go back";
357
+ readonly signatureName: "Your full legal name";
358
+ readonly signatureStyle: "Signature style";
359
+ readonly declineReason: "Why are you declining?";
360
+ readonly ageConfirm: "I meet the minimum age";
361
+ readonly documentHeading: "Document";
362
+ readonly signatureHeading: "Your signature";
363
+ };
364
+ declare const ESIGN_RIGHTS_KEYS: readonly ["heading", "intro", "withdraw", "paperCopy", "working", "error", "confirmTitle", "confirmBody", "confirmSubmit", "confirmCancel", "withdrawnBeforeSigning", "withdrawnAfterSigning", "paperCopyRequested", "paperCopyAlreadyOutstanding"];
365
+ type EsignRightsKey = (typeof ESIGN_RIGHTS_KEYS)[number];
366
+ declare const ESIGN_RIGHTS_FALLBACKS: {
367
+ readonly heading: "Your rights";
368
+ readonly intro: "You do not have to use electronic records. You can stop using them for this document, or ask for a paper copy in the mail. Neither costs anything.";
369
+ readonly withdraw: "Stop using electronic records";
370
+ readonly paperCopy: "Ask for a mailed paper copy";
371
+ readonly working: "Working on your request.";
372
+ readonly error: "Your request did not go through. Select it again. If it keeps failing, contact the company that sent you this link.";
373
+ readonly confirmTitle: "Withdraw your consent?";
374
+ readonly confirmBody: "This ends the signing session and no electronic signature is recorded for you. The company that sent you this link is told that you withdrew. This costs nothing and no penalty applies, and you can still ask for a mailed paper copy afterward.";
375
+ readonly confirmSubmit: "Yes, withdraw consent";
376
+ readonly confirmCancel: "Go back";
377
+ readonly withdrawnBeforeSigning: "You withdrew your consent to use electronic records, and nothing was signed. The company that sent you this link has been told. If you want this document on paper, ask for a copy below. You can close this window.";
378
+ readonly withdrawnAfterSigning: "You withdrew your consent to use electronic records. The document you already signed still stands, because a signature cannot be taken back after the fact. The company that sent you this link has been told. If you want this document on paper, ask them to send you a copy.";
379
+ readonly paperCopyRequested: "We asked the company that sent you this link to send you a paper copy. There is no fee.";
380
+ readonly paperCopyAlreadyOutstanding: "A paper copy is already on its way to you, so there was nothing new to request.";
381
+ };
382
+ declare const ESIGN_OUTCOME_RIGHTS_KEY: {
383
+ readonly consent_withdrawn_before_signing: "withdrawnBeforeSigning";
384
+ readonly consent_withdrawn_after_signing: "withdrawnAfterSigning";
385
+ readonly paper_copy_requested: "paperCopyRequested";
386
+ readonly paper_copy_already_outstanding: "paperCopyAlreadyOutstanding";
387
+ };
388
+ declare const ESIGN_DOCUMENT_KEYS: readonly ["download", "printAndSignStarted", "downloadFailed", "downloadRemoved"];
389
+ type EsignDocumentCopyKey = (typeof ESIGN_DOCUMENT_KEYS)[number];
390
+ declare const ESIGN_DOCUMENT_FALLBACKS: {
391
+ readonly download: "Download a copy";
392
+ readonly printAndSignStarted: "Print your copy, sign it by hand, and send it to the company that sent you this link. You cannot return a printed page through this page.";
393
+ readonly downloadFailed: "We could not download that document. Select it again. If it keeps failing, contact the company that sent you this link.";
394
+ readonly downloadRemoved: "This copy is no longer stored. Ask the company that sent you this link to send you a new copy or a printed record.";
395
+ };
396
+ declare const ESIGN_COUNT_TOKEN = "{count}";
397
+ declare const ESIGN_SHELL_KEYS: readonly ["stepsBlocked", "gateRead", "gateSignature", "gateAge", "consentTermsLink", "consentTermsNewWindow", "consentAgeAttest", "consentError", "adoptTitle", "adoptConsent", "adoptFinePrint", "declineTitle", "declineBody", "finishLaterTitle", "finishLaterBody", "disclosureTitle", "disclosureVersionLabel", "disclosurePublicCopy", "disclosureBack", "statusSigned", "statusDeclined", "statusVoided", "statusExpired", "statusWithdrawn"];
398
+ type EsignShellKey = (typeof ESIGN_SHELL_KEYS)[number];
399
+ declare const ESIGN_SHELL_FALLBACKS: {
400
+ readonly stepsBlocked: "Not finished yet. Taking you to what is left.";
401
+ readonly gateRead: "Please read to the end";
402
+ readonly gateSignature: "Please sign above";
403
+ readonly gateAge: "Please confirm your age";
404
+ readonly consentTermsLink: "See terms.";
405
+ readonly consentTermsNewWindow: "Opens in a new window.";
406
+ readonly consentAgeAttest: "I am {count} or older.";
407
+ readonly consentError: "We could not record your agreement, so your signature was not added. Select the signature line in the document to try again.";
408
+ readonly adoptTitle: "Add your signature";
409
+ readonly adoptConsent: "Selecting Use this signature also records your agreement to sign and to get records for this document electronically.";
410
+ readonly adoptFinePrint: "Use this signature adopts what you see above as your signature. Selecting Finish signs the document.";
411
+ readonly declineTitle: "Decline to sign?";
412
+ readonly declineBody: "This ends your signing session and tells the company that sent you this link. No penalty applies. You can ask them for a new link later.";
413
+ readonly finishLaterTitle: "Finish later?";
414
+ readonly finishLaterBody: "Come back to this same link any time before the deadline. What you have done is kept.";
415
+ readonly disclosureTitle: "Using electronic records";
416
+ readonly disclosureVersionLabel: "Notice version";
417
+ readonly disclosurePublicCopy: "Open this notice in a new window";
418
+ readonly disclosureBack: "Back to the document";
419
+ readonly statusSigned: "Signed";
420
+ readonly statusDeclined: "Declined";
421
+ readonly statusVoided: "Canceled";
422
+ readonly statusExpired: "Expired";
423
+ readonly statusWithdrawn: "Withdrawn";
424
+ };
425
+ type EsignTerminalState = Extract<EsignState, `terminal_${string}`>;
426
+ declare const ESIGN_TERMINAL_STATUS_KEY: {
427
+ readonly terminal_signed: "statusSigned";
428
+ readonly terminal_declined: "statusDeclined";
429
+ readonly terminal_voided: "statusVoided";
430
+ readonly terminal_expired: "statusExpired";
431
+ readonly terminal_withdrawn: "statusWithdrawn";
432
+ };
433
+ declare function resolveEsignDocumentCopy(copy: EsignCopy | undefined, key: EsignDocumentCopyKey): string;
434
+ declare function resolveEsignShellCopy(copy: EsignCopy | undefined, key: EsignShellKey): string;
435
+ declare function resolveEsignTerminalStatus(copy: EsignCopy | undefined, state: EsignTerminalState): string;
436
+ declare function resolveEsignRightsCopy(copy: EsignCopy | undefined, key: EsignRightsKey): string;
437
+ declare function resolveEsignOutcomeCopy(copy: EsignCopy | undefined, outcome: EsignConsentOutcome): string;
438
+ declare function resolveEsignLabel(copy: EsignCopy | undefined, label: EsignLabel): string;
439
+ declare function resolveEsignCopy(copy: EsignCopy | undefined, state: EsignState): string;
440
+ declare function resolveEsignFrameTitle(copy: EsignCopy | undefined): string;
441
+ declare const ESIGN_COPY_STATE_KEYS: readonly EsignState[];
442
+
443
+ interface EsignMountOptions {
444
+ target: HTMLElement | string;
445
+ copy?: EsignCopy;
446
+ onEvent?: (e: ChecktivEsignEvent) => void;
447
+ session?: {
448
+ sessionId: string;
449
+ stepId: string;
450
+ };
451
+ fetchImpl?: typeof fetch;
452
+ onRequestHelp?: (state: EsignState) => void;
453
+ schedule?: {
454
+ set(cb: () => void, ms: number): unknown;
455
+ clear(handle: unknown): void;
456
+ };
457
+ }
458
+ interface EsignHandle {
459
+ destroy(): void;
460
+ }
461
+ declare function createEsign(ctx: SubstrateContext, opts: EsignMountOptions): EsignHandle;
462
+ type EsignChunkModule = {
463
+ createEsign: typeof createEsign;
464
+ };
465
+
466
+ interface CreditContextMint {
467
+ readonly creditContextToken: string;
468
+ readonly embedOrigin: string;
469
+ readonly expiresAt: string;
470
+ }
471
+ interface CreditHistoryScheduler {
472
+ set(callback: () => void, ms: number): unknown;
473
+ clear(handle: unknown): void;
474
+ }
475
+ interface CreditHistoryHostWindow extends Pick<Window, 'addEventListener' | 'removeEventListener'> {
476
+ readonly parent: {
477
+ postMessage(message: unknown, targetOrigin: string): void;
478
+ };
479
+ }
480
+ interface CreditHistoryOptions {
481
+ readonly win: CreditHistoryHostWindow;
482
+ readonly target: HTMLElement;
483
+ readonly sessionId: string;
484
+ readonly locale: string;
485
+ readonly theme: CreditTheme;
486
+ readonly copy?: CreditCopyMap;
487
+ readonly frameTitle?: string;
488
+ readonly readyTimeoutMs?: number;
489
+ readonly schedule?: CreditHistoryScheduler;
490
+ mintContext(): Promise<CreditContextMint>;
491
+ onEvent?(event: ChecktivCreditHistoryEvent): void;
492
+ onBehaviorSegment?(segment: CreditBehaviorSegment): void;
493
+ }
494
+ interface CreditHistoryController {
495
+ start(): void;
496
+ destroy(): void;
497
+ }
498
+ declare function clampFrameHeight(height: number): number;
499
+ declare function createCreditHistory(options: CreditHistoryOptions): CreditHistoryController;
500
+
501
+ interface CreditHistoryMountOptions {
502
+ target: HTMLElement | string;
503
+ session: {
504
+ sessionId: string;
505
+ stepId: string;
506
+ };
507
+ onEvent?: (event: ChecktivCreditHistoryEvent) => void;
508
+ copy?: CreditCopyMap;
509
+ frameTitle?: string;
510
+ onBehaviorSegment?: (segment: CreditBehaviorSegment) => void;
511
+ fetchImpl?: typeof fetch;
512
+ win?: CreditHistoryHostWindow;
513
+ }
514
+ interface CreditHistoryHandle {
515
+ destroy(): void;
516
+ }
517
+ declare function createCreditHistoryModule(ctx: SubstrateContext, opts: CreditHistoryMountOptions): CreditHistoryHandle;
518
+
519
+ interface ProvisionedHandle {
520
+ destroy(): void;
521
+ openCrossDevice?(): void;
522
+ }
523
+ interface MountProvisionedOptions {
524
+ target: HTMLElement | string;
525
+ onEvent?: (e: ChecktivEvent) => void;
526
+ onConsent?: () => boolean | Promise<boolean>;
527
+ copy?: MountCopy;
528
+ layout?: CaptureLayout;
529
+ maxWidth?: string;
530
+ onBeforeSubmit?: () => Promise<void>;
531
+ onBehaviorSegment?: (segment: Pick<CaptureBehaviorMessage, 'steps' | 'traits'>) => void;
532
+ fetchImpl?: typeof fetch;
533
+ synthetic?: IdvMountOptions['synthetic'];
534
+ customFormConfig?: CustomFormApplicantConfig;
535
+ customFormCopy?: CustomFormCopy;
536
+ esignCopy?: EsignCopy;
537
+ creditCopy?: CreditCopyMap;
538
+ crossDeviceCopy?: CrossDeviceCopy;
539
+ onOpenCrossDevice?: CrossDeviceHandoffHook;
540
+ onRequestHelp?: EsignMountOptions['onRequestHelp'];
541
+ }
542
+
543
+ interface GetSessionTokenContext {
544
+ sessionId: string;
545
+ reason: 'initial' | 'expired' | '401';
546
+ }
547
+ type GetSessionToken = string | ((ctx: GetSessionTokenContext) => Promise<string>);
548
+ interface ChecktivInitOptionsBase {
549
+ getSessionToken: GetSessionToken;
550
+ theme?: {
551
+ primaryColor?: string;
552
+ };
553
+ locale?: string;
554
+ apiBase?: string;
555
+ betas?: string[];
556
+ selfiePromptMap?: SelfiePromptMap;
557
+ selfieChromeCopy?: SelfieChromeCopy;
558
+ beginScanCopy?: BeginScanCopyOverrides;
559
+ }
560
+ type ChecktivInitScope = {
561
+ publishableKey: string;
562
+ } | {
563
+ region: SdkRegion;
564
+ mode: SdkMode;
565
+ };
566
+ type ChecktivInitOptions = ChecktivInitOptionsBase & ChecktivInitScope;
567
+ interface ChecktivClient {
568
+ mountProvisioned(opts: MountProvisionedOptions): ProvisionedHandle;
569
+ preload(modules: readonly SdkModuleName[]): void;
570
+ mount(module: 'idv', opts: IdvMountOptions): IdvHandle;
571
+ mount(module: 'fraud', opts: FraudMountOptions): FraudHandle;
572
+ mount(module: 'custom_form', opts: CustomFormMountOptions): CustomFormHandle;
573
+ mount(module: 'esign', opts: EsignMountOptions): EsignHandle;
574
+ mount(module: 'credit_history', opts: CreditHistoryMountOptions): CreditHistoryHandle;
575
+ }
576
+ interface SubstrateContext {
577
+ readonly region: SdkRegion;
578
+ readonly mode: SdkMode;
579
+ readonly publishableKey: string | undefined;
580
+ readonly apiBaseOrigin: string;
581
+ readonly theme?: ChecktivInitOptions['theme'];
582
+ readonly locale: string;
583
+ readonly betas: readonly string[];
584
+ readonly selfiePromptMap?: SelfiePromptMap;
585
+ readonly selfieChromeCopy?: SelfieChromeCopy;
586
+ readonly beginScanCopy?: BeginScanCopyOverrides;
587
+ readonly tokens: TokenManager;
588
+ getSessionId(): string;
589
+ setSessionId(id: string): void;
590
+ }
591
+
592
+ type ChecktivFraudEvent = {
593
+ type: 'checktiv.fraud.started';
594
+ } | {
595
+ type: 'checktiv.fraud.error';
596
+ error: ChecktivError;
597
+ };
598
+ interface FraudMountOptions {
599
+ onConsent: () => boolean | Promise<boolean>;
600
+ onEvent?: (e: ChecktivFraudEvent) => void;
601
+ fetchImpl?: typeof fetch;
602
+ }
603
+ interface FraudHandle {
604
+ destroy(): void;
605
+ }
606
+ declare function createFraud(ctx: SubstrateContext, opts: FraudMountOptions): FraudHandle;
607
+ type FraudChunkModule = {
608
+ createFraud: typeof createFraud;
609
+ };
610
+
611
+ type IdvCoachingHint = CoachingKind;
612
+ interface ResolvedIdvConfig {
613
+ documentTypes: readonly string[];
614
+ biometricMode: 'selfie' | 'liveness' | 'none';
615
+ allowDocumentUpload?: boolean;
616
+ }
617
+ type ChecktivIdvEvent = {
618
+ type: 'checktiv.idv.ready';
619
+ config: ResolvedIdvConfig;
620
+ } | {
621
+ type: 'checktiv.idv.phase';
622
+ phase: string;
623
+ } | {
624
+ type: 'checktiv.idv.coaching';
625
+ hint: IdvCoachingHint;
626
+ } | {
627
+ type: 'checktiv.idv.submitted';
628
+ sessionId: string;
629
+ } | {
630
+ type: 'checktiv.idv.processing';
631
+ reason?: 'signal_pending' | 'no_renderable_step';
632
+ } | {
633
+ type: 'checktiv.idv.capture_superseded';
634
+ } | {
635
+ type: 'checktiv.idv.error';
636
+ error: ChecktivError;
637
+ } | {
638
+ type: 'checktiv.idv.cross_device_opened';
639
+ } | {
640
+ type: 'checktiv.idv.cross_device_unavailable';
641
+ } | {
642
+ type: 'checktiv.idv.cross_device_capped';
643
+ } | {
644
+ type: 'checktiv.idv.cross_device_closed';
645
+ } | ({
646
+ type: 'checktiv.idv.timing';
647
+ } & CaptureTimingSnapshot);
648
+ type ChecktivEvent = ChecktivIdvEvent | ChecktivFraudEvent | {
649
+ type: `checktiv.${string}`;
650
+ [k: string]: unknown;
651
+ };
652
+
653
+ type SdkRegion = DataRegion;
654
+ type SdkMode = SystemMode;
655
+ interface InitOptions {
656
+ readonly publishableKey: string;
657
+ readonly applicantLinkToken?: string;
658
+ readonly target?: HTMLElement;
659
+ readonly onComplete?: (payload: unknown) => void;
660
+ }
661
+ interface MountCompleteResult {
662
+ readonly sessionId: string;
663
+ }
664
+ type MountScope = {
665
+ readonly publishableKey: string;
666
+ } | {
667
+ readonly region: SdkRegion;
668
+ readonly mode: SdkMode;
669
+ };
670
+ type MountOptions = MountScope & {
671
+ readonly fetchToken: () => Promise<string>;
672
+ readonly onComplete?: (result: MountCompleteResult) => void;
673
+ readonly onEvent?: (e: ChecktivEvent) => void;
674
+ readonly onError?: (e: ChecktivError) => void;
675
+ readonly onConsent?: () => boolean | Promise<boolean>;
676
+ readonly apiBase?: string;
677
+ readonly fetchImpl?: typeof fetch;
678
+ readonly resumeKey?: string;
679
+ readonly shortCode?: string;
680
+ readonly layout?: CaptureLayout;
681
+ readonly maxWidth?: string;
682
+ readonly theme?: {
683
+ readonly primaryColor?: string;
684
+ };
685
+ readonly copy?: MountCopy;
686
+ readonly crossDeviceCopy?: CrossDeviceCopy;
687
+ readonly onOpenCrossDevice?: CrossDeviceHandoffHook;
688
+ };
689
+ interface SessionsCreateApplicantAddress {
690
+ readonly line1: string;
691
+ readonly line2?: string;
692
+ readonly city: string;
693
+ readonly region?: string;
694
+ readonly postalCode?: string;
695
+ readonly country: string;
696
+ readonly placeId?: string;
697
+ readonly formatted?: string;
698
+ }
699
+ interface SessionsCreateApplicant {
700
+ readonly externalId?: string;
701
+ readonly email?: string;
702
+ readonly phone?: string;
703
+ readonly familyName?: string;
704
+ readonly givenNames?: readonly string[];
705
+ readonly nameSuffix?: string;
706
+ readonly dateOfBirth?: string;
707
+ readonly address?: SessionsCreateApplicantAddress;
708
+ readonly referenceName?: string;
709
+ readonly bookingName?: string;
710
+ }
711
+ interface SessionsCreateInput {
712
+ readonly templateId: string;
713
+ readonly applicant: SessionsCreateApplicant;
714
+ }
715
+ interface SessionsCreateOptions {
716
+ readonly apiBase: string;
717
+ readonly secretKey: string;
718
+ readonly idempotencyKey?: string;
719
+ readonly fetchImpl?: typeof fetch;
720
+ }
721
+ interface SessionsCreateResult {
722
+ readonly clientToken: string;
723
+ }
724
+ interface ChecktivSessions {
725
+ create(input: SessionsCreateInput, options: SessionsCreateOptions): Promise<SessionsCreateResult>;
726
+ }
727
+ interface ParsedPublishableKey {
728
+ readonly region: SdkRegion;
729
+ readonly mode: SdkMode;
730
+ }
731
+ declare class InvalidPublishableKeyError extends Error {
732
+ constructor(message: string);
733
+ }
734
+ declare function parsePublishableKey(key: string): ParsedPublishableKey;
735
+
736
+ export { type SdkRegion as $, type EsignRightsKey as A, type EsignShellKey as B, type ChecktivEsignEvent as C, type EsignState as D, ESIGN_CONSENT_ACTIONS as E, type EsignSubmitOutcome as F, type EsignTerminalState as G, type TerminalEnvelopeStatus as H, createEsign as I, esignStateOffersRights as J, resolveEsignCopy as K, resolveEsignDocumentCopy as L, resolveEsignFrameTitle as M, resolveEsignLabel as N, resolveEsignOutcomeCopy as O, resolveEsignRightsCopy as P, resolveEsignShellCopy as Q, resolveEsignTerminalStatus as R, type ChecktivIdvEvent as S, TERMINAL_STATUS_TO_STATE as T, type MountOptions as U, type ChecktivInitOptions as V, type ChecktivInitScope as W, type ChecktivClient as X, type SubstrateContext as Y, type CrossDeviceHandoffHook as Z, type TokenManager as _, ESIGN_COPY_FALLBACKS as a, type CreditHistoryController as a$, type ProvisionedHandle as a0, type InitOptions as a1, type ChecktivSessions as a2, CHECKTIV_ERROR_CODES as a3, type ChecktivCreditHistoryEvent as a4, type ChecktivError as a5, type ChecktivErrorCode as a6, type ChecktivEvent as a7, type ChecktivFraudEvent as a8, type ChecktivKnownErrorCode as a9, isChecktivCreditHistoryEvent as aA, parsePublishableKey as aB, type ForwardedSession as aC, type IdvChunkModule as aD, REMINT_READY_TIMEOUT_MS as aE, createIdv as aF, type FraudChunkModule as aG, createFraud as aH, type ChecktivCustomFormEvent as aI, type CustomFormChunkModule as aJ, type CustomFormCopy as aK, type CustomFormFieldCopy as aL, type CustomFormHandle as aM, type CustomFormMountOptions as aN, createCustomForm as aO, CREDIT_FRAME_MAX_HEIGHT_PX as aP, CREDIT_FRAME_MIN_HEIGHT_PX as aQ, CREDIT_HISTORY_EVENT_TYPES as aR, CREDIT_SCREENS as aS, CREDIT_SCREEN_COUNT as aT, type CreditBehaviorSegment as aU, type CreditBehaviorStep as aV, type CreditBehaviorTraits as aW, type CreditBrandTokens as aX, type CreditContextMint as aY, type CreditCopyMap as aZ, type CreditFromIframeMessage as a_, type ChecktivRecovery as aa, type CreditErrorCode as ab, type CreditHistoryReconnectReason as ac, type CreditScreen as ad, type CreditSkipReason as ae, type FraudHandle as af, type FraudMountOptions as ag, type GetSessionToken as ah, type GetSessionTokenContext as ai, type IdvCoachingHint as aj, type IdvHandle as ak, type IdvMountOptions as al, InvalidPublishableKeyError as am, type MountCompleteResult as an, type MountProvisionedOptions as ao, type MountScope as ap, type ParsedPublishableKey as aq, type ResolvedIdvConfig as ar, type SdkMode as as, type SessionsCreateApplicant as at, type SessionsCreateApplicantAddress as au, type SessionsCreateInput as av, type SessionsCreateOptions as aw, type SessionsCreateResult as ax, type SyntheticIdvScript as ay, createChecktivError as az, ESIGN_COPY_STATE_KEYS as b, type CreditHistoryHandle as b0, type CreditHistoryHostWindow as b1, type CreditHistoryMountOptions as b2, type CreditHistoryOptions as b3, type CreditHistoryScheduler as b4, type CreditInitMessage as b5, type CreditTheme as b6, clampFrameHeight as b7, createCreditHistory as b8, createCreditHistoryModule as b9, parseCreditInbound as ba, projectCreditCopy as bb, ESIGN_COUNT_TOKEN as c, ESIGN_DOCUMENT_FALLBACKS as d, ESIGN_DOCUMENT_KEYS as e, ESIGN_FRAME_ANNOUNCE_TIMEOUT_MS as f, ESIGN_LABELS as g, ESIGN_LABEL_FALLBACKS as h, ESIGN_OUTCOME_RIGHTS_KEY as i, ESIGN_RIGHTS_FALLBACKS as j, ESIGN_RIGHTS_KEYS as k, ESIGN_SHELL_FALLBACKS as l, ESIGN_SHELL_KEYS as m, ESIGN_STATES as n, ESIGN_STATE_RIGHTS as o, ESIGN_TERMINAL_STATUS_KEY as p, type EsignChunkModule as q, type EsignConsentAction as r, type EsignConsentOutcome as s, type EsignCopy as t, type EsignCopyScalarKey as u, type EsignDocumentCopyKey as v, type EsignHandle as w, type EsignLabel as x, type EsignMountOptions as y, type EsignRightsAffordance as z };