idmission-web-sdk 1.0.200 → 1.0.201

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 (50) hide show
  1. package/dist/components/CompositeWizard.d.ts +3 -3
  2. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +6 -2
  3. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +6 -2
  4. package/dist/components/customer_flows/CustomerIdentification.d.ts +6 -2
  5. package/dist/components/customer_flows/CustomerVerification.d.ts +6 -2
  6. package/dist/components/customer_flows/DocumentCapture.d.ts +4 -2
  7. package/dist/components/customer_flows/FaceValidation.d.ts +6 -2
  8. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +6 -2
  9. package/dist/components/customer_flows/IdValidation.d.ts +6 -2
  10. package/dist/components/customer_flows/SignatureKYC.d.ts +6 -2
  11. package/dist/components/customer_flows/VideoIdValidation.d.ts +6 -2
  12. package/dist/components/submission/AuthUrlNotAllowedOverlay.d.ts +2 -0
  13. package/dist/components/submission/Errors.d.ts +1 -1
  14. package/dist/components/submission/SessionIdMissingOverlay.d.ts +2 -0
  15. package/dist/components/submission/SessionValidationErrorOverlay.d.ts +6 -0
  16. package/dist/components/submission/SessionValidationFailedOverlay.d.ts +2 -0
  17. package/dist/components/submission/SubmissionProvider.d.ts +9 -5
  18. package/dist/contexts/AuthStateContext.d.ts +33 -0
  19. package/dist/contexts/SubmissionContext.d.ts +3 -3
  20. package/dist/index.d.ts +7 -1
  21. package/dist/lib/utils/dataUrlToBase64.d.ts +1 -0
  22. package/dist/sdk2.cjs.development.js +620 -517
  23. package/dist/sdk2.cjs.development.js.map +1 -1
  24. package/dist/sdk2.cjs.production.js +1 -1
  25. package/dist/sdk2.cjs.production.js.map +1 -1
  26. package/dist/sdk2.esm.js +620 -520
  27. package/dist/sdk2.esm.js.map +1 -1
  28. package/dist/sdk2.umd.development.js +620 -517
  29. package/dist/sdk2.umd.development.js.map +1 -1
  30. package/dist/sdk2.umd.production.js +1 -1
  31. package/dist/sdk2.umd.production.js.map +1 -1
  32. package/dist/stories/Auth.stories.d.ts +8 -0
  33. package/dist/stories/Components/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +0 -9
  34. package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +5 -1
  35. package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +5 -1
  36. package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +5 -1
  37. package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +5 -1
  38. package/dist/stories/CustomerFlows/DocumentCapture.stories.d.ts +5 -1
  39. package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +5 -1
  40. package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +5 -1
  41. package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +5 -1
  42. package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +5 -1
  43. package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +14 -1
  44. package/dist/stories/utils/sessions.d.ts +13 -0
  45. package/dist/stories/utils/useLocalStorage.d.ts +1 -0
  46. package/dist/version.d.ts +1 -1
  47. package/package.json +1 -1
  48. package/dist/components/submission/TokenIssuerNotAllowedErrorOverlay.d.ts +0 -2
  49. package/dist/components/submission/TokenMissingErrorOverlay.d.ts +0 -2
  50. package/dist/components/submission/TokenPublicKeyErrorOverlay.d.ts +0 -5
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { IdCaptureWizardProps } from './id_capture/IdCaptureWizard';
3
3
  import { FaceLivenessWizardProps } from './face_liveness/FaceLivenessWizard';
4
- import { SubmissionAction, SubmissionEnvironment, SubmissionResponse } from '../contexts/SubmissionContext';
4
+ import { SubmissionAction, SubmissionResponse } from '../contexts/SubmissionContext';
5
5
  import { AdditionalDocumentCaptureWizardProps } from './additional_document_capture/AdditionalDocumentCaptureWizard';
6
6
  import { SignatureCaptureProps } from './signature_capture/SignatureCapture';
7
7
  import { VideoSignatureWizardProps } from './video_signature_capture/VideoSignatureWizard';
@@ -20,10 +20,10 @@ export type CompositeWizardComponentProps = {
20
20
  debugMode?: boolean;
21
21
  };
22
22
  export type CompositeWizardProps = CompositeWizardComponentProps & {
23
- submissionToken: string;
23
+ sessionId: string;
24
24
  submissionAction?: SubmissionAction;
25
- submissionEnvironment?: SubmissionEnvironment;
26
25
  submissionUrl?: string;
26
+ authUrl?: string;
27
27
  onComplete?: (submissionResponse: SubmissionResponse) => void;
28
28
  };
29
29
  export declare const CompositeWizard: (props: CompositeWizardProps) => ReactElement;
@@ -31,10 +31,14 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
31
31
  enrollmentId: string;
32
32
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
33
33
  lang?: LangOption;
34
- /** A token generated with your IDmission credentials. */
35
- submissionToken: string;
34
+ /** A session identifier generated with your IDmission credentials. */
35
+ sessionId: string | (() => Promise<string>);
36
36
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
37
37
  submissionUrl?: string;
38
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
39
+ authUrl?: string;
40
+ /** URL to upload captured documents to via Tus. */
41
+ documentServiceUrl?: string;
38
42
  /** Company identifier to include with submission. */
39
43
  companyId?: string;
40
44
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -38,10 +38,14 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
38
38
  enrollmentId: string;
39
39
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
40
40
  lang?: LangOption;
41
- /** A token generated with your IDmission credentials. */
42
- submissionToken: string;
41
+ /** A session identifier generated with your IDmission credentials. */
42
+ sessionId: string | (() => Promise<string>);
43
43
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
44
44
  submissionUrl?: string;
45
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
46
+ authUrl?: string;
47
+ /** URL to upload captured documents to via Tus. */
48
+ documentServiceUrl?: string;
45
49
  /** Company identifier to include with submission. */
46
50
  companyId?: string;
47
51
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -6,10 +6,14 @@ import { ThemeInput } from '../../themes';
6
6
  export interface CustomerIdentificationProps extends PropsWithChildren {
7
7
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
8
8
  lang?: LangOption;
9
- /** A token generated with your IDmission credentials. */
10
- submissionToken: string;
9
+ /** A session identifier generated with your IDmission credentials. */
10
+ sessionId: string | (() => Promise<string>);
11
11
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
12
12
  submissionUrl?: string;
13
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
14
+ authUrl?: string;
15
+ /** URL to upload captured documents to via Tus. */
16
+ documentServiceUrl?: string;
13
17
  /** Company identifier to include with submission. */
14
18
  companyId?: string;
15
19
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -8,10 +8,14 @@ export interface CustomerVerificationProps extends PropsWithChildren {
8
8
  enrollmentId: string;
9
9
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
10
10
  lang?: LangOption;
11
- /** A token generated with your IDmission credentials. */
12
- submissionToken: string;
11
+ /** A session identifier generated with your IDmission credentials. */
12
+ sessionId: string | (() => Promise<string>);
13
13
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
14
14
  submissionUrl?: string;
15
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
16
+ authUrl?: string;
17
+ /** URL to upload captured documents to via Tus. */
18
+ documentServiceUrl?: string;
15
19
  /** Company identifier to include with submission. */
16
20
  companyId?: string;
17
21
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -9,10 +9,12 @@ export type DocumentCaptureVerbiage = DocumentCaptureWizardVerbiage;
9
9
  export interface DocumentCaptureProps extends PropsWithChildren {
10
10
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
11
11
  lang?: LangOption;
12
- /** A token generated with your IDmission credentials. */
13
- submissionToken: string;
12
+ /** A session identifier generated with your IDmission credentials. */
13
+ sessionId: string | (() => Promise<string>);
14
14
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
15
15
  submissionUrl?: string;
16
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
17
+ authUrl?: string;
16
18
  /** URL to upload captured documents to via Tus. */
17
19
  documentServiceUrl?: string;
18
20
  /** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
@@ -10,10 +10,14 @@ export type FaceValidationVerbiage = FaceLivenessVerbiage;
10
10
  export interface FaceValidationProps extends PropsWithChildren {
11
11
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
12
12
  lang?: LangOption;
13
- /** A token generated with your IDmission credentials. */
14
- submissionToken: string;
13
+ /** A session identifier generated with your IDmission credentials. */
14
+ sessionId: string | (() => Promise<string>);
15
15
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
16
16
  submissionUrl?: string;
17
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
18
+ authUrl?: string;
19
+ /** URL to upload captured documents to via Tus. */
20
+ documentServiceUrl?: string;
17
21
  /** Company identifier to include with submission. */
18
22
  companyId?: string;
19
23
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -37,10 +37,14 @@ export type IdAndFaceValidationVerbiage = {
37
37
  export interface IdAndFaceValidationProps extends PropsWithChildren {
38
38
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
39
39
  lang?: LangOption;
40
- /** A token generated with your IDmission credentials. */
41
- submissionToken: string;
40
+ /** A session identifier generated with your IDmission credentials. */
41
+ sessionId: string | (() => Promise<string>);
42
42
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
43
43
  submissionUrl?: string;
44
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
45
+ authUrl?: string;
46
+ /** URL to upload captured documents to via Tus. */
47
+ documentServiceUrl?: string;
44
48
  /** Company identifier to include with submission. */
45
49
  companyId?: string;
46
50
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -27,10 +27,14 @@ export type IdValidationVerbiage = IdCaptureWizardVerbiage & {
27
27
  export interface IdValidationProps extends PropsWithChildren {
28
28
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
29
29
  lang?: LangOption;
30
- /** A token generated with your IDmission credentials. */
31
- submissionToken: string;
30
+ /** A session identifier generated with your IDmission credentials. */
31
+ sessionId: string | (() => Promise<string>);
32
32
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
33
33
  submissionUrl?: string;
34
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
35
+ authUrl?: string;
36
+ /** URL to upload captured documents to via Tus. */
37
+ documentServiceUrl?: string;
34
38
  /** Company identifier to include with submission. */
35
39
  companyId?: string;
36
40
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -6,10 +6,14 @@ import { ThemeInput } from '../../themes';
6
6
  export interface SignatureKYCProps extends PropsWithChildren {
7
7
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
8
8
  lang?: LangOption;
9
- /** A token generated with your IDmission credentials. */
10
- submissionToken: string;
9
+ /** A session identifier generated with your IDmission credentials. */
10
+ sessionId: string | (() => Promise<string>);
11
11
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
12
12
  submissionUrl?: string;
13
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
14
+ authUrl?: string;
15
+ /** URL to upload captured documents to via Tus. */
16
+ documentServiceUrl?: string;
13
17
  /** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
14
18
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
15
19
  /** Callback function that fires when the user has completed the flow instead of making a call to IDmission's servers, allowing customers to specify their own submission logic. Arguments: the request payload that would have been dispatched to IDmission's API, which contains the images/documents/video submitted by the user. Note that when this parameter is supplied, `onComplete` will never fire, and the customer will need to implement their own error handling/retry logic. Use at your own risk! */
@@ -27,10 +27,14 @@ export type VideoIdValidationVerbiage = VideoIdWizardVerbiage & {
27
27
  export interface VideoIdValidationProps extends PropsWithChildren {
28
28
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
29
29
  lang?: LangOption;
30
- /** A token generated with your IDmission credentials. */
31
- submissionToken: string;
30
+ /** A session identifier generated with your IDmission credentials. */
31
+ sessionId: string | (() => Promise<string>);
32
32
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
33
33
  submissionUrl?: string;
34
+ /** URL to validate session against. Defaults to https://portal-api-dev.idmission.com. */
35
+ authUrl?: string;
36
+ /** URL to upload captured documents to via Tus. */
37
+ documentServiceUrl?: string;
34
38
  /** Company identifier to include with submission. */
35
39
  companyId?: string;
36
40
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AuthUrlNotAllowedOverlay: () => React.JSX.Element;
@@ -5,7 +5,7 @@ export declare class SubmissionError extends Error {
5
5
  }
6
6
  export declare class NetworkError extends Error {
7
7
  }
8
- export declare class TokenPublicKeyError extends Error {
8
+ export declare class SessionValidationFailedError extends Error {
9
9
  err: Error;
10
10
  host: string;
11
11
  constructor(err: Error, host: string);
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SessionIdMissingOverlay: () => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SessionValidationFailedError } from './Errors';
3
+ export declare const SessionValidationErrorOverlay: ({ error, onRetry, }: {
4
+ error: SessionValidationFailedError | null;
5
+ onRetry?: (() => void) | undefined;
6
+ }) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SessionValidationFailedOverlay: () => React.JSX.Element;
@@ -4,7 +4,11 @@ import { UploadedDocument } from '../additional_document_capture/AdditionalDocum
4
4
  import { SignatureData } from '../signature_capture/data';
5
5
  import { NetworkError, SubmissionError } from './Errors';
6
6
  import { CapturedDocuments } from '../id_capture/CapturedDocuments';
7
- export type TokenState = 'NOT_PARSED' | 'PARSING' | 'GOOD' | 'MISSING' | 'EXPIRED' | 'INVALID_FORMAT' | 'INVALID_SIGNATURE' | 'ISSUER_NOT_ALLOWED' | 'PUBLIC_KEY_LOAD_FAILED';
7
+ export declare const defaultSubmissionUrl = "https://portal-api-dev.idmission.com/swagger";
8
+ type DocumentMetadata = {
9
+ filename?: string;
10
+ filetype?: string;
11
+ };
8
12
  export type SubmissionState = {
9
13
  submit: () => Promise<SubmissionResponse | null>;
10
14
  submissionStatus: SubmissionStatus;
@@ -32,7 +36,7 @@ export type SubmissionState = {
32
36
  setIdCaptureVideoIdFrontImage: (image: string) => void;
33
37
  setIdCaptureVideoIdBackImage: (image: string) => void;
34
38
  setAdditionalDocuments: (uploadedDocuments: UploadedDocument[]) => void;
35
- uploadDocument: (blob: Blob) => Promise<string>;
39
+ uploadDocument: (blob: Blob, metadata?: DocumentMetadata) => Promise<string>;
36
40
  logIdFrontCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
37
41
  logIdBackCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
38
42
  logSelfieCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
@@ -44,8 +48,7 @@ export declare const SubmissionContext: React.Context<SubmissionState>;
44
48
  export type SubmissionProviderProps = {
45
49
  action: SubmissionAction;
46
50
  children: ReactElement;
47
- token: string;
48
- url?: string;
51
+ submissionUrl?: string;
49
52
  environment?: SubmissionEnvironment;
50
53
  companyId?: string;
51
54
  enrollmentId?: string;
@@ -76,4 +79,5 @@ export type SubmissionProviderProps = {
76
79
  onResponseReceived?: (res: SubmissionResponse, req: SubmissionRequest) => void;
77
80
  onRequestFailure?: (err: Error) => void;
78
81
  };
79
- export declare const SubmissionProvider: ({ action, children, url, environment, token, companyId, enrollmentId, personalData, cardData, bypassAgeValidation, bypassNameMatching, needImmediateResponse, manualReviewRequired, idBackImageRequired, idImageResolutionCheck, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, webhooksSendInputImages, webhooksSendProcessedImages, webhooksFireOnReview, precapturedDocuments, documentServiceUrl, onSubmit, onBeforeSubmit, onBeforeLivenessCheck, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
82
+ export declare const SubmissionProvider: ({ action, children, submissionUrl, environment, companyId, enrollmentId, personalData, cardData, bypassAgeValidation, bypassNameMatching, needImmediateResponse, manualReviewRequired, idBackImageRequired, idImageResolutionCheck, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, webhooksSendInputImages, webhooksSendProcessedImages, webhooksFireOnReview, precapturedDocuments, documentServiceUrl, onSubmit, onBeforeSubmit, onBeforeLivenessCheck, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
83
+ export {};
@@ -0,0 +1,33 @@
1
+ import React, { Dispatch, ReactNode } from 'react';
2
+ import { SessionValidationFailedError } from '../components/submission/Errors';
3
+ export declare const defaultAuthUrl = "https://portal-api-dev.idmission.com";
4
+ export declare const allowedAuthUrls: string[];
5
+ export type SessionCheckState = 'READY' | 'RUNNING' | 'PASSED' | 'FAILED' | 'MISSING' | 'AUTH_URL_NOT_ALLOWED' | 'ERROR';
6
+ export type AuthState = {
7
+ authUrl: string;
8
+ sessionCheckState: SessionCheckState;
9
+ sessionId?: string;
10
+ authError?: SessionValidationFailedError;
11
+ };
12
+ export declare const AuthStateContext: React.Context<AuthState>;
13
+ export type AuthAction = {
14
+ type: 'setSessionId';
15
+ payload: string;
16
+ } | {
17
+ type: 'setCheckState';
18
+ payload: SessionCheckState;
19
+ } | {
20
+ type: 'setError';
21
+ payload: SessionValidationFailedError;
22
+ } | {
23
+ type: 'retry';
24
+ };
25
+ export type AuthDispatch = Dispatch<AuthAction>;
26
+ export declare const AuthDispatchContext: React.Context<AuthDispatch>;
27
+ export declare function useAuthReducer(authUrl?: string, sessionId?: string | (() => Promise<string>)): [AuthState, AuthDispatch];
28
+ export declare function useAuthContext(): [AuthState, AuthDispatch];
29
+ export declare function AuthProvider({ authUrl, sessionId, children, }: {
30
+ authUrl?: string;
31
+ sessionId: string | (() => Promise<string>);
32
+ children: ReactNode;
33
+ }): React.JSX.Element;
@@ -156,9 +156,9 @@ export type LiveCheckResponse = {
156
156
  };
157
157
  export declare function parseJwt(token: string): Record<string, unknown>;
158
158
  export declare function determineSubmissionHost(environment: SubmissionEnvironment, token?: string): string;
159
- export declare function determineSubmissionEndpoint(action: SubmissionAction, hasId: boolean, hasSelfie: boolean, hasToken: boolean): string;
160
- export declare function liveCheckEndpoint(hasToken: boolean): string;
161
- export declare function apiHeaders(token?: string): HeadersInit;
159
+ export declare function determineSubmissionEndpoint(action: SubmissionAction, hasId: boolean, hasSelfie: boolean): string;
160
+ export declare function liveCheckEndpoint(): string;
161
+ export declare function apiHeaders(sessionId?: string): HeadersInit;
162
162
  export declare function attachMetadataToRequest(request: SubmissionRequest | LivenessCheckRequest, { selfieCaptureAttempts, idFrontCaptureAttempts, idBackCaptureAttempts, geolocationResult, }: {
163
163
  selfieCaptureAttempts: CaptureAttemptMetadata[];
164
164
  idFrontCaptureAttempts: CaptureAttemptMetadata[];
package/dist/index.d.ts CHANGED
@@ -12,6 +12,8 @@ import { Theme, themes } from './themes';
12
12
  import { SubmissionRequest, SubmissionResponse } from './contexts/SubmissionContext';
13
13
  import { DocumentCapture, DocumentCaptureProps } from './components/customer_flows/DocumentCapture';
14
14
  import { CapturedDocumentImg } from './components/common/CapturedDocumentImg';
15
+ import { defaultSubmissionUrl } from './components/submission/SubmissionProvider';
16
+ import { defaultAuthUrl, allowedAuthUrls } from './contexts/AuthStateContext';
15
17
  type TargetElement = Element | DocumentFragment | string | undefined;
16
18
  export declare const renderIdValidation: (optionsOrTargetElement: TargetElement | IdValidationProps, options?: IdValidationProps) => Element | DocumentFragment;
17
19
  export declare const renderFaceValidation: (optionsOrTargetElement: TargetElement | FaceValidationProps, options?: FaceValidationProps) => Element | DocumentFragment;
@@ -38,8 +40,12 @@ export type IDmissionSDK = {
38
40
  themes: typeof themes;
39
41
  version: string;
40
42
  ready: boolean;
43
+ authMode?: 'session';
44
+ allowedAuthUrls?: string[];
45
+ defaultAuthUrl?: string;
46
+ defaultSubmissionUrl?: string;
41
47
  };
42
48
  declare global {
43
49
  var IDmissionSDK: IDmissionSDK;
44
50
  }
45
- export { preloadModels, themes, Theme, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, };
51
+ export { preloadModels, themes, Theme, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, };
@@ -1,3 +1,4 @@
1
1
  export declare function dataUrlToBase64(url: string): Promise<string>;
2
2
  export declare function dataUrlToBase64Sync(url: string): string;
3
3
  export declare function contentDispositionFromDataUrl(url: string): string;
4
+ export declare function b64toBlob(b64Data: string, contentType?: string, sliceSize?: number): Blob;