idmission-web-sdk 1.0.350 → 1.0.352

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.
@@ -59,6 +59,8 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
59
59
  webhooksSendInputImages?: boolean;
60
60
  /** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
61
61
  webhooksSendProcessedImages?: boolean;
62
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
63
+ sendBase64DocumentsInSwaggerProxy?: boolean;
62
64
  /** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
63
65
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
64
66
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
@@ -85,6 +85,8 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
85
85
  webhooksSendProcessedImages?: boolean;
86
86
  /** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
87
87
  webhooksFireOnReview?: boolean;
88
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
89
+ sendBase64DocumentsInSwaggerProxy?: boolean;
88
90
  /** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
89
91
  idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
90
92
  /** String to indicate which types of ID documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
@@ -30,6 +30,8 @@ export interface CustomerIdentificationProps extends PropsWithChildren {
30
30
  webhooksSendInputImages?: boolean;
31
31
  /** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
32
32
  webhooksSendProcessedImages?: boolean;
33
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
34
+ sendBase64DocumentsInSwaggerProxy?: boolean;
33
35
  /** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
34
36
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
35
37
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
@@ -32,6 +32,8 @@ export interface CustomerVerificationProps extends PropsWithChildren {
32
32
  webhooksSendInputImages?: boolean;
33
33
  /** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
34
34
  webhooksSendProcessedImages?: boolean;
35
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
36
+ sendBase64DocumentsInSwaggerProxy?: boolean;
35
37
  /** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
36
38
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
37
39
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
@@ -18,6 +18,8 @@ export interface DocumentCaptureProps extends PropsWithChildren {
18
18
  authUrl?: string;
19
19
  /** URL to upload captured documents to via Tus. */
20
20
  documentServiceUrl?: string;
21
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
22
+ sendBase64DocumentsInSwaggerProxy?: boolean;
21
23
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
22
24
  onBeforeDocumentUpload?: OnBeforeDocumentUpload;
23
25
  /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
@@ -34,6 +34,8 @@ export interface FaceValidationProps extends PropsWithChildren {
34
34
  webhooksSendInputImages?: boolean;
35
35
  /** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
36
36
  webhooksSendProcessedImages?: boolean;
37
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
38
+ sendBase64DocumentsInSwaggerProxy?: boolean;
37
39
  /** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
38
40
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
39
41
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
@@ -78,6 +78,8 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
78
78
  webhooksSendProcessedImages?: boolean;
79
79
  /** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
80
80
  webhooksFireOnReview?: boolean;
81
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
82
+ sendBase64DocumentsInSwaggerProxy?: boolean;
81
83
  /** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack`, `passport`. */
82
84
  precapturedDocuments?: CapturedDocuments & {
83
85
  selfie: CapturedDocument;
@@ -69,6 +69,8 @@ export interface IdValidationProps extends PropsWithChildren {
69
69
  webhooksSendProcessedImages?: boolean;
70
70
  /** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
71
71
  webhooksFireOnReview?: boolean;
72
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
73
+ sendBase64DocumentsInSwaggerProxy?: boolean;
72
74
  /** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
73
75
  loadingOverlayMode?: IdCaptureLoadingOverlayMode;
74
76
  /** String to indicate which types of documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
@@ -18,6 +18,8 @@ export interface SignatureKYCProps extends PropsWithChildren {
18
18
  authUrl?: string;
19
19
  /** URL to upload captured documents to via Tus. */
20
20
  documentServiceUrl?: string;
21
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
22
+ sendBase64DocumentsInSwaggerProxy?: boolean;
21
23
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
22
24
  onBeforeDocumentUpload?: OnBeforeDocumentUpload;
23
25
  /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
@@ -70,6 +70,8 @@ export interface VideoIdValidationProps extends PropsWithChildren {
70
70
  webhooksSendProcessedImages?: boolean;
71
71
  /** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
72
72
  webhooksFireOnReview?: boolean;
73
+ /** Boolean flag to enable download and replace behavior for documents in the Swagger Proxy API. Defaults to false. */
74
+ sendBase64DocumentsInSwaggerProxy?: boolean;
73
75
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
74
76
  onBeforeDocumentUpload?: OnBeforeDocumentUpload;
75
77
  /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
@@ -90,6 +90,7 @@ export type SubmissionProviderProps = {
90
90
  webhooksFireOnReview?: boolean;
91
91
  precapturedDocuments?: CapturedDocuments;
92
92
  documentServiceUrl?: string;
93
+ sendBase64DocumentsInSwaggerProxy?: boolean;
93
94
  onSubmit?: (payload: SubmissionRequest) => void;
94
95
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
95
96
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
@@ -102,4 +103,4 @@ export type SubmissionProviderProps = {
102
103
  readTextPrompt?: string;
103
104
  clientRequestID?: string;
104
105
  };
105
- export declare const SubmissionProvider: ({ action, children, submissionUrl, environment, companyId, enrollmentId, personalData, cardData, bypassAgeValidation, bypassNameMatching, needImmediateResponse, manualReviewRequired, idBackImageRequired, idImageResolutionCheck, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, idCardForFaceMatch, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, webhooksSendInputImages, webhooksSendProcessedImages, webhooksFireOnReview, precapturedDocuments, documentServiceUrl, onSubmit, onBeforeSubmit, onBeforeLivenessCheck, onBeforeDocumentUpload, onDocumentUploadProgress, onDocumentUploaded, onDocumentUploadFailed, onResponseReceived, onRequestFailure, clientRequestID, }: SubmissionProviderProps) => ReactElement;
106
+ export declare const SubmissionProvider: ({ action, children, submissionUrl, environment, companyId, enrollmentId, personalData, cardData, bypassAgeValidation, bypassNameMatching, needImmediateResponse, manualReviewRequired, idBackImageRequired, idImageResolutionCheck, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, idCardForFaceMatch, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, webhooksSendInputImages, webhooksSendProcessedImages, webhooksFireOnReview, precapturedDocuments, documentServiceUrl, sendBase64DocumentsInSwaggerProxy, onSubmit, onBeforeSubmit, onBeforeLivenessCheck, onBeforeDocumentUpload, onDocumentUploadProgress, onDocumentUploaded, onDocumentUploadFailed, onResponseReceived, onRequestFailure, clientRequestID, }: SubmissionProviderProps) => ReactElement;
@@ -169,7 +169,7 @@ export declare function parseJwt(token: string): Record<string, unknown>;
169
169
  export declare function determineSubmissionHost(environment: SubmissionEnvironment, token?: string): string;
170
170
  export declare function determineSubmissionEndpoint(action: SubmissionAction, hasId: boolean, hasSelfie: boolean): string;
171
171
  export declare function liveCheckEndpoint(hasDocumentToMatchFace?: boolean): string;
172
- export declare function apiHeaders(sessionId?: string): HeadersInit;
172
+ export declare function apiHeaders(sessionId?: string, sendBase64DocumentsInSwaggerProxy?: boolean): HeadersInit;
173
173
  export declare function attachMetadataToRequest(request: SubmissionRequest | LivenessCheckRequest, { selfieCaptureAttempts, idFrontCaptureAttempts, idBackCaptureAttempts, geolocationResult, }: {
174
174
  selfieCaptureAttempts: CaptureAttemptMetadata[];
175
175
  idFrontCaptureAttempts: CaptureAttemptMetadata[];
@@ -39,6 +39,7 @@ export type CaptureDevice = {
39
39
  videoDevice: MediaDeviceInfo | null;
40
40
  videoLoaded: boolean;
41
41
  setVideoLoaded: (value: boolean) => void;
42
+ onVideoUnmounted: (videoElement: HTMLVideoElement) => void;
42
43
  cameraRef: MutableRefObject<Camera | null>;
43
44
  cameraReady: boolean;
44
45
  cameraAccessDenied: boolean;