@incodetech/welcome 1.95.0 → 1.96.0-20261109204501.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.
- package/dist/onBoarding.d.ts +147 -11
- package/dist/onBoarding.mjs +17768 -14433
- package/dist/onBoarding.umd.js +1900 -1731
- package/package.json +1 -1
package/dist/onBoarding.d.ts
CHANGED
|
@@ -318,6 +318,10 @@ declare interface BaseWorkflowProps {
|
|
|
318
318
|
skipDesktopRedirect?: () => void;
|
|
319
319
|
uiConfig?: UiConfig;
|
|
320
320
|
renderLaunchScreen?: LaunchScreenRenderer;
|
|
321
|
+
/** TrueSight diagnostics; see `create()`. The first call of the page decides. */
|
|
322
|
+
trueSight?: {
|
|
323
|
+
enabled?: boolean;
|
|
324
|
+
};
|
|
321
325
|
}
|
|
322
326
|
|
|
323
327
|
export declare const BiometricConsent: ({ token, onCancel, onSuccess, regulationType, }: BiometricConsentProps) => JSX_2.Element;
|
|
@@ -632,6 +636,24 @@ declare type Consent = {
|
|
|
632
636
|
description: string;
|
|
633
637
|
};
|
|
634
638
|
|
|
639
|
+
/**
|
|
640
|
+
* Continues the session behind a desktop→mobile handoff link (`?uuid=` from
|
|
641
|
+
* `renderRedirectToMobile`) through `POST /omni/session/continue`. Only `uuid`
|
|
642
|
+
* and `urlUuid` are sent, and the response `sessionId` becomes `interviewId`.
|
|
643
|
+
* `createNewSession` with `uuid` does the same.
|
|
644
|
+
*
|
|
645
|
+
* Each call spends one continue of a server-set limit (two by default) inside
|
|
646
|
+
* 48 hours of the session start. A refused continue throws `{ status }`:
|
|
647
|
+
* 4026 unknown or expired link, 4086 window passed, 4087 limit reached,
|
|
648
|
+
* 4088 session no longer active.
|
|
649
|
+
*/
|
|
650
|
+
export declare function continueSession({ uuid, urlUuid, version, disableFingerprint, }: {
|
|
651
|
+
uuid: string;
|
|
652
|
+
urlUuid?: string;
|
|
653
|
+
version?: string;
|
|
654
|
+
disableFingerprint?: boolean;
|
|
655
|
+
}): Promise<Session>;
|
|
656
|
+
|
|
635
657
|
declare type CrashReport = {
|
|
636
658
|
message: string;
|
|
637
659
|
stack: string;
|
|
@@ -640,7 +662,7 @@ declare type CrashReport = {
|
|
|
640
662
|
|
|
641
663
|
export declare function create({ apiKey, apiURL, lang, encrypt, translations, theme: _theme, clientId,
|
|
642
664
|
/** @deprecated This parameter is no longer used. The apiKey is now received from backend responses */
|
|
643
|
-
tokboxApiKey, darkMode, hostingApp, unsafeMode, customHeaders, fingerprintApiKey, redirectFromUnsupportedBrowsers, useSha256, forceProductionMode, clientExperimentId, version, skipInitialization, useSentry, offline, wasmBaseUrl, pdfWorkerUrl, tutorialsBaseUrl, lottieScriptUrl, ffmpegBaseUrl, translationsUrl, httpRequestTimeout, }: {
|
|
665
|
+
tokboxApiKey, darkMode, hostingApp, unsafeMode, customHeaders, fingerprintApiKey, redirectFromUnsupportedBrowsers, useSha256, forceProductionMode, clientExperimentId, version, skipInitialization, useSentry, offline, wasmBaseUrl, pdfWorkerUrl, tutorialsBaseUrl, lottieScriptUrl, ffmpegBaseUrl, translationsUrl, httpRequestTimeout, trueSight, }: {
|
|
644
666
|
apiKey?: string;
|
|
645
667
|
apiURL?: string;
|
|
646
668
|
lang?: string;
|
|
@@ -677,9 +699,37 @@ export declare function create({ apiKey, apiURL, lang, encrypt, translations, th
|
|
|
677
699
|
* API and slow-but-valid responses would otherwise be cut off.
|
|
678
700
|
*/
|
|
679
701
|
httpRequestTimeout?: number;
|
|
702
|
+
/**
|
|
703
|
+
* TrueSight diagnostics: Incode-internal SDK-health telemetry for an
|
|
704
|
+
* engineering-only dashboard, not customer analytics. During a session the
|
|
705
|
+
* SDK buffers diagnostic lines: module outcomes, error codes, HTTP statuses
|
|
706
|
+
* and timings. Lines are built from code-owned values and pass a sanitizer,
|
|
707
|
+
* so they leave out images, document data and tokens. Each record is keyed
|
|
708
|
+
* to its session and names the browser, OS, language and network
|
|
709
|
+
* conditions. When the flow or workflow ends, the SDK sends ONE gzipped
|
|
710
|
+
* record to `/omni/add/diagnostics-data/` on `apiURL`. It also reads
|
|
711
|
+
* `/omni/feature-config` once per session, so a server-side switch can turn
|
|
712
|
+
* it off. It is fire-and-forget and fail-open: no retries, and it never
|
|
713
|
+
* affects the onboarding.
|
|
714
|
+
*
|
|
715
|
+
* While a session runs, a gzipped copy of the record is kept in
|
|
716
|
+
* `localStorage` (`incode.truesight.pending.*`), so the record of a closed
|
|
717
|
+
* tab or a cancelled upload is sent on a later page load. That later load,
|
|
718
|
+
* with TrueSight on and a session token, also deletes copies older than 7
|
|
719
|
+
* days unsent. Opting out deletes nothing already saved.
|
|
720
|
+
*
|
|
721
|
+
* - `enabled`: `false` opts out: no collection, no subscriptions, no
|
|
722
|
+
* upload. Any other value keeps TrueSight on, the default.
|
|
723
|
+
*
|
|
724
|
+
* The first SDK call of the page decides; later calls cannot change it.
|
|
725
|
+
*/
|
|
726
|
+
trueSight?: {
|
|
727
|
+
enabled?: boolean;
|
|
728
|
+
};
|
|
680
729
|
}): {
|
|
681
730
|
createSession: typeof createSession;
|
|
682
731
|
createNewSession: typeof createNewSession;
|
|
732
|
+
continueSession: typeof continueSession;
|
|
683
733
|
updateSession: typeof updateSession;
|
|
684
734
|
publishKeys: typeof initializeEncryption;
|
|
685
735
|
capture: typeof capture;
|
|
@@ -915,12 +965,19 @@ export declare function create({ apiKey, apiURL, lang, encrypt, translations, th
|
|
|
915
965
|
readonly forms: "FORMS";
|
|
916
966
|
readonly customModule: "CUSTOM_MODULE";
|
|
917
967
|
readonly mDocWallet: "MDOC_WALLET";
|
|
968
|
+
readonly identityReuse: "IDENTITY_REUSE";
|
|
918
969
|
};
|
|
919
970
|
eventScreenNames: {
|
|
920
971
|
readonly idOcrLoading: "ID_OCR.loading";
|
|
921
972
|
readonly idOcrInputting: "ID_OCR.inputting";
|
|
922
973
|
readonly idOcrSubmitting: "ID_OCR.submitting";
|
|
923
974
|
readonly idOcrError: "ID_OCR.error";
|
|
975
|
+
readonly identityReuseIdle: "IDENTITY_REUSE.idle";
|
|
976
|
+
readonly identityReuseLoading: "IDENTITY_REUSE.loading";
|
|
977
|
+
readonly identityReuseDocumentsFound: "IDENTITY_REUSE.documentsFound";
|
|
978
|
+
readonly identityReuseSubmitting: "IDENTITY_REUSE.submitting";
|
|
979
|
+
readonly identityReuseFinished: "IDENTITY_REUSE.finished";
|
|
980
|
+
readonly identityReuseError: "IDENTITY_REUSE.error";
|
|
924
981
|
readonly faceMatch: "FACE_MATCH";
|
|
925
982
|
readonly faceCaptureTutorial: "SELFIE_CAPTURE_TUTORIAL";
|
|
926
983
|
readonly faceCaptureCamera: "SELFIE_CAMERA_CAPTURE";
|
|
@@ -1127,7 +1184,7 @@ export declare function create({ apiKey, apiURL, lang, encrypt, translations, th
|
|
|
1127
1184
|
}) => {
|
|
1128
1185
|
close: () => void;
|
|
1129
1186
|
};
|
|
1130
|
-
executeWorkflow: ({ element, token, workflowId, apiURL, customModuleCallback, onSuccess, onError, wfConfig, authHint, urlUuid, uuid, redirectUrl, clientId, showFinishScreen, skipDesktopRedirect, uiConfig, renderLaunchScreen, }: WorkflowPropsWithToken | WorkflowPropsWithoutToken) => Promise<void>;
|
|
1187
|
+
executeWorkflow: ({ element, token, workflowId, apiURL, customModuleCallback, onSuccess, onError, wfConfig, authHint, urlUuid, uuid, redirectUrl, clientId, showFinishScreen, skipDesktopRedirect, uiConfig, renderLaunchScreen, trueSight, }: WorkflowPropsWithToken | WorkflowPropsWithoutToken) => Promise<void>;
|
|
1131
1188
|
getWorkflowConfig: ({ token }: {
|
|
1132
1189
|
token: any;
|
|
1133
1190
|
}) => Promise<any>;
|
|
@@ -1163,10 +1220,12 @@ declare type CreateError<TSpecificErrors extends string = never> = {
|
|
|
1163
1220
|
};
|
|
1164
1221
|
|
|
1165
1222
|
export declare function createNewSession({ externalId, externalCustomerId, configurationId, uuid, interviewId, customFields, language: _language, version, urlUuid, integrationReference, loginHint, disableFingerprint, }?: {
|
|
1223
|
+
/** @deprecated */
|
|
1166
1224
|
externalId?: string;
|
|
1167
1225
|
externalCustomerId?: string;
|
|
1168
1226
|
configurationId?: string;
|
|
1169
1227
|
uuid?: string;
|
|
1228
|
+
/** @deprecated */
|
|
1170
1229
|
interviewId?: string;
|
|
1171
1230
|
customFields?: object;
|
|
1172
1231
|
language?: string;
|
|
@@ -1188,10 +1247,14 @@ declare type CreateRedirectUrlType = {
|
|
|
1188
1247
|
session: LooseSession;
|
|
1189
1248
|
};
|
|
1190
1249
|
|
|
1250
|
+
/**
|
|
1251
|
+
* @param externalId - Deprecated.
|
|
1252
|
+
*/
|
|
1191
1253
|
export declare function createSession(_countryCode: string, externalId?: string, { externalCustomerId, configurationId, uuid, interviewId, customFields, language, forceProductionMode, urlUuid, }?: {
|
|
1192
1254
|
externalCustomerId?: string;
|
|
1193
1255
|
configurationId?: string;
|
|
1194
1256
|
uuid?: string;
|
|
1257
|
+
/** @deprecated */
|
|
1195
1258
|
interviewId?: string;
|
|
1196
1259
|
customFields?: object;
|
|
1197
1260
|
language?: string;
|
|
@@ -1614,6 +1677,7 @@ export declare const eventModuleNames: {
|
|
|
1614
1677
|
readonly forms: "FORMS";
|
|
1615
1678
|
readonly customModule: "CUSTOM_MODULE";
|
|
1616
1679
|
readonly mDocWallet: "MDOC_WALLET";
|
|
1680
|
+
readonly identityReuse: "IDENTITY_REUSE";
|
|
1617
1681
|
};
|
|
1618
1682
|
|
|
1619
1683
|
export declare const executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, authHint, }: {
|
|
@@ -1632,7 +1696,9 @@ export declare const executeFlow: ({ element, token, onSuccess, onError, onEvent
|
|
|
1632
1696
|
close: () => void;
|
|
1633
1697
|
};
|
|
1634
1698
|
|
|
1635
|
-
export declare const executeWorkflow: ({ element, token, workflowId, apiURL, customModuleCallback, onSuccess, onError, wfConfig, authHint, urlUuid, uuid, redirectUrl, clientId, showFinishScreen, skipDesktopRedirect, uiConfig, renderLaunchScreen, }: WorkflowPropsWithToken | WorkflowPropsWithoutToken) => Promise<void>;
|
|
1699
|
+
export declare const executeWorkflow: ({ element, token, workflowId, apiURL, customModuleCallback, onSuccess, onError, wfConfig, authHint, urlUuid, uuid, redirectUrl, clientId, showFinishScreen, skipDesktopRedirect, uiConfig, renderLaunchScreen, trueSight, }: WorkflowPropsWithToken | WorkflowPropsWithoutToken) => Promise<void>;
|
|
1700
|
+
|
|
1701
|
+
export declare function expectDeviceHash(token: string): void;
|
|
1636
1702
|
|
|
1637
1703
|
declare type ExternalResolution = {
|
|
1638
1704
|
width: number;
|
|
@@ -1703,7 +1769,7 @@ declare interface FaceProcessingPipelineResult {
|
|
|
1703
1769
|
|
|
1704
1770
|
export declare type FaceSuccess = SendFaceImageResponse;
|
|
1705
1771
|
|
|
1706
|
-
declare const FEATURE_FLAGS: readonly ["id_text_barcode_readability", "selfie_local_lenses_check_web", "id_model_hebrew_back_id", "id_face_readability", "id_face_detector", "ml_capture_core_enabled", "new_id_capture_ux_least_risky_clients", "enable_sentry_web", "id_test_aa", "id_iou_check", "iad_checks", "iad_c_checks", "fdm", "smv", "new_fingerprint", "mp_test_hashed_id", "id_quality_backend_validation", "id_video_recording_enabled", "enable_app_logs", "selfie_video_recorder_v2_web"];
|
|
1772
|
+
declare const FEATURE_FLAGS: readonly ["id_text_barcode_readability", "selfie_local_lenses_check_web", "id_model_hebrew_back_id", "id_face_readability", "id_face_detector", "ml_capture_core_enabled", "new_id_capture_ux_least_risky_clients", "enable_sentry_web", "id_test_aa", "id_iou_check", "iad_checks", "iad_c_checks", "fdm", "smv", "new_fingerprint", "mp_test_hashed_id", "id_quality_backend_validation", "id_video_recording_enabled", "enable_app_logs", "selfie_video_recorder_v2_web", "incode_device_fingerprint"];
|
|
1707
1773
|
|
|
1708
1774
|
declare type FeatureConfig = {
|
|
1709
1775
|
enabled: boolean;
|
|
@@ -1895,7 +1961,7 @@ declare type FlowModuleConfig = {
|
|
|
1895
1961
|
prefillSource?: string;
|
|
1896
1962
|
};
|
|
1897
1963
|
EXTERNAL_VERIFICATION: {
|
|
1898
|
-
source: 'US_DRIVERS_LICENSE_1' | 'US_TELCO_1' | 'US_TELCO_2' | 'US_CONSUMER_1' | 'US_CREDIT_BUREAU_1' | 'MX_CONSUMER_1' | 'MX_CIVIL_REGISTER_2' | 'BR_GOVT_1' | 'BR_TAX_PHONE_REGISTER' | 'CA_RES_CREDIT' | 'CA_TELCO' | 'UK_CREDIT_BUREAU_1' | 'GB_2X2' | 'ES_PHONE_REGISTER_2' | 'FI_NATIONAL_ID' | 'CL_1' | 'AR_1' | 'AR_CREDIT_BUR_1' | 'AR_RES_REGISTER' | 'GR_1' | 'GT_1' | 'CO_CIVIL_REGISTER_1' | 'BR_CPF_1' | 'NG_MONO_BVN' | 'NG_MONO_NIN' | 'PH_RES_CREDIT' | 'VE_CIVIL_REGISTER' | 'PE_CIVIL_REGISTER_2' | 'IDENTIFY_AFRICA_KE' | 'NL_CONSUMER_POP_REG_TELCO' | 'NL_CIVIL_REG_CREDIT_TELCO' | 'FI_CONSUMER_POP_REG_TELCO' | 'DK_CIVIL_REG_CREDIT_TELCO' | 'BE_CREDIT_TELCO' | 'IT_CIVIL_REG_CREDIT_TELCO' | 'NO_CONS_POP_REG' | 'DE_PHONE_MOBILE_REGISTER' | 'SG_PHONE_REGISTER' | 'INDIA_PAN_1' | 'RISK_ADDONS_ONLY';
|
|
1964
|
+
source: 'US_DRIVERS_LICENSE_1' | 'US_TELCO_1' | 'US_TELCO_2' | 'US_CONSUMER_1' | 'US_CREDIT_BUREAU_1' | 'MX_CONSUMER_1' | 'MX_CIVIL_REGISTER_2' | 'BR_GOVT_1' | 'BR_TAX_PHONE_REGISTER' | 'CA_RES_CREDIT' | 'CA_TELCO' | 'UK_CREDIT_BUREAU_1' | 'GB_2X2' | 'ES_PHONE_REGISTER_2' | 'FI_NATIONAL_ID' | 'CL_1' | 'CL_CIVIL_REGISTER_3' | 'AR_1' | 'AR_CREDIT_BUR_1' | 'AR_RES_REGISTER' | 'GR_1' | 'GT_1' | 'CO_CIVIL_REGISTER_1' | 'BR_CPF_1' | 'NG_MONO_BVN' | 'NG_MONO_NIN' | 'PH_RES_CREDIT' | 'VE_CIVIL_REGISTER' | 'PE_CIVIL_REGISTER_2' | 'IDENTIFY_AFRICA_KE' | 'INDIA_PASSPORT_1' | 'NL_CONSUMER_POP_REG_TELCO' | 'NL_CIVIL_REG_CREDIT_TELCO' | 'FI_CONSUMER_POP_REG_TELCO' | 'DK_CIVIL_REG_CREDIT_TELCO' | 'BE_CREDIT_TELCO' | 'IT_CIVIL_REG_CREDIT_TELCO' | 'PT_CIVIL_REG_CREDIT_TELCO' | 'EC_PHONE_REGISTER' | 'PT_PHONE_REGISTER' | 'KG_VOTER_REGISTER' | 'RO_VOTER_REGISTER' | 'NO_CONS_POP_REG' | 'DE_PHONE_MOBILE_REGISTER' | 'SG_PHONE_REGISTER' | 'INDIA_PAN_1' | 'RISK_ADDONS_ONLY';
|
|
1899
1965
|
checkName: boolean;
|
|
1900
1966
|
nameSource: EKYCFieldSource;
|
|
1901
1967
|
nameDisplayMode: EKYCFieldDisplayMode;
|
|
@@ -2945,6 +3011,15 @@ declare class MlWasmJSApi extends WebClient {
|
|
|
2945
3011
|
* so a cancel path (a flow manager's onClose) skips its `reset()` while one
|
|
2946
3012
|
* is set — otherwise it would drop the frame the upload is still reading. */
|
|
2947
3013
|
private pseInFlight_;
|
|
3014
|
+
/** Diagnostics: workflows consuming frames, `pse`/`poc` calls in flight,
|
|
3015
|
+
* and the last per-frame detection call. An abort starts a new epoch, so
|
|
3016
|
+
* calls it orphaned cannot count down the next attempt's. */
|
|
3017
|
+
private consumingWorkflows_;
|
|
3018
|
+
private captureCallsInFlight_;
|
|
3019
|
+
private captureEpoch_;
|
|
3020
|
+
private lastDetectionCallAt_;
|
|
3021
|
+
private captureActive_;
|
|
3022
|
+
private captureQuietTimer_;
|
|
2948
3023
|
/** C++ WebApi instance — used for postFaceResults() to send on-device face results to server */
|
|
2949
3024
|
private webApi;
|
|
2950
3025
|
private fpCompletionTask_;
|
|
@@ -3028,6 +3103,29 @@ declare class MlWasmJSApi extends WebClient {
|
|
|
3028
3103
|
* keep working while analysis is off. Only `rcc` stops the camera.
|
|
3029
3104
|
*/
|
|
3030
3105
|
setWorkflowConsuming(type: WasmWorkflow, consuming: boolean): boolean;
|
|
3106
|
+
/**
|
|
3107
|
+
* Capture activity for diagnostics: snapshot rebuilds wait while a workflow
|
|
3108
|
+
* consumes frames, a per-frame detection loop runs, or a capture finalizes.
|
|
3109
|
+
* Analysis stops before `poc()`, so the end is reported only after a quiet
|
|
3110
|
+
* second, once the attempt is over.
|
|
3111
|
+
*/
|
|
3112
|
+
private updateCaptureActivity;
|
|
3113
|
+
/** Ends the activity once a whole quiet second has passed since the last detection call. */
|
|
3114
|
+
private scheduleCaptureQuiet;
|
|
3115
|
+
/**
|
|
3116
|
+
* One frame of a JS-driven detection loop (the Video Selfie recorder's):
|
|
3117
|
+
* cheap per frame, because the quiet timer reads the time instead of
|
|
3118
|
+
* being re-armed.
|
|
3119
|
+
*/
|
|
3120
|
+
private noteDetectionCall;
|
|
3121
|
+
/** A `pse`/`poc` call in flight; the returned function ends it. */
|
|
3122
|
+
private beginCaptureCall;
|
|
3123
|
+
/**
|
|
3124
|
+
* The runtime aborted, so nothing captures any more: diagnostics stop
|
|
3125
|
+
* waiting on calls that will never settle, and the abort line reaches the
|
|
3126
|
+
* next snapshot.
|
|
3127
|
+
*/
|
|
3128
|
+
private releaseCaptureActivity;
|
|
3031
3129
|
ens(input: string): string;
|
|
3032
3130
|
ckvcks(data: ArrayBuffer): void;
|
|
3033
3131
|
estimatePerformance(): string;
|
|
@@ -3095,6 +3193,15 @@ declare class MlWasmJSApi extends WebClient {
|
|
|
3095
3193
|
setMotionStatus(motionStatus: string): void;
|
|
3096
3194
|
lg(level: number, tag: string, message: string): void;
|
|
3097
3195
|
getAppLogs(): string;
|
|
3196
|
+
/**
|
|
3197
|
+
* The ML kit's diagnostics sensor bindings, feature-detected: a binary
|
|
3198
|
+
* without a binding leaves it undefined. `null` before `initialize()`.
|
|
3199
|
+
*/
|
|
3200
|
+
getKitDiagnosticsApi(): {
|
|
3201
|
+
setDiagnosticsSink?: (sink: ((batch: string) => void) | undefined) => void;
|
|
3202
|
+
drainDiagnostics?: () => string;
|
|
3203
|
+
getAppLogs?: () => string;
|
|
3204
|
+
} | null;
|
|
3098
3205
|
setMetadataField(key: string, value: string): void;
|
|
3099
3206
|
setInspectorOpened(inspectorOpened: boolean): void;
|
|
3100
3207
|
getCheck(): string;
|
|
@@ -4352,17 +4459,19 @@ declare type SendFaceImageResponse = {
|
|
|
4352
4459
|
sessionStatus: string;
|
|
4353
4460
|
};
|
|
4354
4461
|
|
|
4355
|
-
export declare function sendFingerprint(
|
|
4356
|
-
token: string;
|
|
4357
|
-
version?: string;
|
|
4358
|
-
disableIpify?: boolean;
|
|
4359
|
-
}, sendIP?: boolean, sendDeviceFingerprint?: boolean): Promise<{
|
|
4462
|
+
export declare function sendFingerprint(params: SendFingerprintParams, sendIP?: boolean, sendDeviceFingerprint?: boolean): Promise<{
|
|
4360
4463
|
success: boolean;
|
|
4361
4464
|
sessionStatus: string;
|
|
4362
4465
|
showMandatoryConsent?: boolean;
|
|
4363
4466
|
regulationType?: RegulationTypes;
|
|
4364
4467
|
}>;
|
|
4365
4468
|
|
|
4469
|
+
declare type SendFingerprintParams = {
|
|
4470
|
+
token: string;
|
|
4471
|
+
version?: string;
|
|
4472
|
+
disableIpify?: boolean;
|
|
4473
|
+
};
|
|
4474
|
+
|
|
4366
4475
|
/**
|
|
4367
4476
|
* Send a unified finished message for both Flow and Workflow
|
|
4368
4477
|
*/
|
|
@@ -4458,7 +4567,7 @@ declare function setSessionStatus({ token, action }: {
|
|
|
4458
4567
|
|
|
4459
4568
|
declare function setSpeechOffset(token: string, seconds: number): Promise<any>;
|
|
4460
4569
|
|
|
4461
|
-
export declare const setup: ({ forceProductionMode, theme: _theme, clientId, lang, translations, apiKey, apiURL, tokboxApiKey, options, customHeaders, fingerprintApiKey, clientExperimentId, version, flowId, skipInitialization, httpRequestTimeout, }: SetupParams) => Promise<void>;
|
|
4570
|
+
export declare const setup: ({ forceProductionMode, theme: _theme, clientId, lang, translations, apiKey, apiURL, tokboxApiKey, options, customHeaders, fingerprintApiKey, clientExperimentId, version, flowId, skipInitialization, httpRequestTimeout, trueSight, }: SetupParams) => Promise<void>;
|
|
4462
4571
|
|
|
4463
4572
|
export declare const setupDetect: () => Promise<void>;
|
|
4464
4573
|
|
|
@@ -4481,6 +4590,8 @@ declare type SetupParams = {
|
|
|
4481
4590
|
skipInitialization?: boolean;
|
|
4482
4591
|
/** Timeout in ms for SDK API requests. Defaults to the built-in 30s. */
|
|
4483
4592
|
httpRequestTimeout?: number;
|
|
4593
|
+
/** TrueSight diagnostics; see `create()`. The first call of the page decides. */
|
|
4594
|
+
trueSight?: TrueSightOptions;
|
|
4484
4595
|
};
|
|
4485
4596
|
|
|
4486
4597
|
export declare const setupWebClient: (apiURL?: string, useSha256?: boolean, defaultHeaders?: Record<string, string>) => Promise<void>;
|
|
@@ -5412,6 +5523,11 @@ declare type Translations = {
|
|
|
5412
5523
|
[key: string]: string | Translations;
|
|
5413
5524
|
};
|
|
5414
5525
|
|
|
5526
|
+
declare type TrueSightOptions = {
|
|
5527
|
+
/** `false` opts out: no collection, no subscriptions, no upload. */
|
|
5528
|
+
enabled?: boolean;
|
|
5529
|
+
};
|
|
5530
|
+
|
|
5415
5531
|
declare type TutorialIdConfig = {
|
|
5416
5532
|
showTutorial: boolean;
|
|
5417
5533
|
enableId: boolean;
|
|
@@ -5761,6 +5877,7 @@ declare class WebClient {
|
|
|
5761
5877
|
protected semaphore: Semaphore;
|
|
5762
5878
|
protected requestTimeout: number;
|
|
5763
5879
|
private unauthorizedHandler;
|
|
5880
|
+
private requestObserver;
|
|
5764
5881
|
initializeWebClient(wasmPath: string, wasmPathSimd: string, useSimd: boolean, glueCodePath: string): Promise<void>;
|
|
5765
5882
|
setupConnection(baseUrl: string, token?: string, useSha256?: boolean, encryptionEnabled?: boolean): Promise<void>;
|
|
5766
5883
|
/**
|
|
@@ -5778,6 +5895,12 @@ declare class WebClient {
|
|
|
5778
5895
|
* it to end whatever render is on screen. Independent of WASM init.
|
|
5779
5896
|
*/
|
|
5780
5897
|
setUnauthorizedHandler(handler: ((error: WebClientError) => void) | null): void;
|
|
5898
|
+
/**
|
|
5899
|
+
* Runs once for every finished request with its timing and outcome — the
|
|
5900
|
+
* SDK's diagnostics read it. It can never affect the request. Independent of
|
|
5901
|
+
* WASM init.
|
|
5902
|
+
*/
|
|
5903
|
+
setRequestObserver(observer: ((entry: WebClientRequestEntry) => void) | null): void;
|
|
5781
5904
|
setToken(token: string): void;
|
|
5782
5905
|
getToken(): string;
|
|
5783
5906
|
setDefaultHeaders(headers: Record<string, string>): void;
|
|
@@ -5796,6 +5919,7 @@ declare class WebClient {
|
|
|
5796
5919
|
private clearProgressCallbacks;
|
|
5797
5920
|
private prepareBody;
|
|
5798
5921
|
private executeWebRequest;
|
|
5922
|
+
private notifyRequestObserver;
|
|
5799
5923
|
private toValObject;
|
|
5800
5924
|
private checkError;
|
|
5801
5925
|
}
|
|
@@ -5812,6 +5936,18 @@ declare class WebClientError extends Error {
|
|
|
5812
5936
|
constructor(message: string, statusCode: number, data?: any, url?: string);
|
|
5813
5937
|
}
|
|
5814
5938
|
|
|
5939
|
+
/** One finished request, as a `setRequestObserver` observer sees it. */
|
|
5940
|
+
declare type WebClientRequestEntry = {
|
|
5941
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
5942
|
+
url: string;
|
|
5943
|
+
/** The HTTP status; `0` when no answer arrived, `null` when the request never ran. */
|
|
5944
|
+
httpStatus: number | null;
|
|
5945
|
+
durationMs: number;
|
|
5946
|
+
outcome: 'success' | 'failure';
|
|
5947
|
+
/** The rejection, for a failure. */
|
|
5948
|
+
error?: unknown;
|
|
5949
|
+
};
|
|
5950
|
+
|
|
5815
5951
|
declare interface WebClientResponse<T = any> {
|
|
5816
5952
|
data: T;
|
|
5817
5953
|
status: number;
|