idmission-web-sdk 1.0.282 → 1.0.283

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 +2 -15
  3. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -15
  4. package/dist/components/customer_flows/CustomerIdentification.d.ts +2 -15
  5. package/dist/components/customer_flows/CustomerVerification.d.ts +2 -15
  6. package/dist/components/customer_flows/DocumentCapture.d.ts +2 -13
  7. package/dist/components/customer_flows/FaceValidation.d.ts +2 -17
  8. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +2 -15
  9. package/dist/components/customer_flows/IdValidation.d.ts +2 -15
  10. package/dist/components/customer_flows/SignatureKYC.d.ts +2 -17
  11. package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -17
  12. package/dist/components/submission/Errors.d.ts +1 -1
  13. package/dist/components/submission/SubmissionProvider.d.ts +5 -24
  14. package/dist/components/submission/TokenIssuerNotAllowedErrorOverlay.d.ts +2 -0
  15. package/dist/components/submission/TokenMissingErrorOverlay.d.ts +2 -0
  16. package/dist/components/submission/TokenPublicKeyErrorOverlay.d.ts +5 -0
  17. package/dist/contexts/SubmissionContext.d.ts +3 -9
  18. package/dist/index.d.ts +1 -7
  19. package/dist/lib/utils/dataUrlToBase64.d.ts +0 -2
  20. package/dist/sdk2.cjs.development.js +563 -835
  21. package/dist/sdk2.cjs.development.js.map +1 -1
  22. package/dist/sdk2.cjs.production.js +1 -1
  23. package/dist/sdk2.cjs.production.js.map +1 -1
  24. package/dist/sdk2.esm.js +566 -835
  25. package/dist/sdk2.esm.js.map +1 -1
  26. package/dist/sdk2.umd.development.js +567 -838
  27. package/dist/sdk2.umd.development.js.map +1 -1
  28. package/dist/sdk2.umd.production.js +1 -1
  29. package/dist/sdk2.umd.production.js.map +1 -1
  30. package/dist/stories/Components/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +9 -0
  31. package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +1 -5
  32. package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +1 -5
  33. package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +1 -5
  34. package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +1 -5
  35. package/dist/stories/CustomerFlows/DocumentCapture.stories.d.ts +1 -5
  36. package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +1 -5
  37. package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +1 -5
  38. package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +1 -5
  39. package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +1 -5
  40. package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +1 -14
  41. package/dist/version.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/dist/components/submission/AuthUrlNotAllowedOverlay.d.ts +0 -2
  44. package/dist/components/submission/SessionIdMissingOverlay.d.ts +0 -2
  45. package/dist/components/submission/SessionValidationErrorOverlay.d.ts +0 -6
  46. package/dist/components/submission/SessionValidationFailedOverlay.d.ts +0 -2
  47. package/dist/contexts/AuthStateContext.d.ts +0 -33
  48. package/dist/stories/Auth.stories.d.ts +0 -8
  49. package/dist/stories/utils/sessions.d.ts +0 -13
  50. package/dist/stories/utils/useLocalStorage.d.ts +0 -1
@@ -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, SubmissionResponse } from '../contexts/SubmissionContext';
4
+ import { SubmissionAction, SubmissionEnvironment, 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
- sessionId: string;
23
+ submissionToken: string;
24
24
  submissionAction?: SubmissionAction;
25
+ submissionEnvironment?: SubmissionEnvironment;
25
26
  submissionUrl?: string;
26
- authUrl?: string;
27
27
  onComplete?: (submissionResponse: SubmissionResponse) => void;
28
28
  };
29
29
  export declare const CompositeWizard: (props: CompositeWizardProps) => ReactElement;
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
5
4
  import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
@@ -33,14 +32,10 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
33
32
  enrollmentId: string;
34
33
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
35
34
  lang?: LangOption;
36
- /** A session identifier generated with your IDmission credentials. */
37
- sessionId: string | (() => Promise<string>);
35
+ /** A token generated with your IDmission credentials. */
36
+ submissionToken: string;
38
37
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
39
38
  submissionUrl?: string;
40
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
41
- authUrl?: string;
42
- /** URL to upload captured documents to via Tus. */
43
- documentServiceUrl?: string;
44
39
  /** Company identifier to include with submission. */
45
40
  companyId?: string;
46
41
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -65,14 +60,6 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
65
60
  timeoutDurationMs?: number;
66
61
  /** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
67
62
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
68
- /** 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. */
69
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
70
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
71
- onDocumentUploadProgress?: OnDocumentUploadProgress;
72
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
73
- onDocumentUploaded?: OnDocumentUploaded;
74
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
75
- onDocumentUploadFailed?: OnDocumentUploadFailed;
76
63
  /** 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. */
77
64
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
78
65
  /** 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! */
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren, ReactNode } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
5
4
  import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
@@ -41,14 +40,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
41
40
  enrollmentId: string;
42
41
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
43
42
  lang?: LangOption;
44
- /** A session identifier generated with your IDmission credentials. */
45
- sessionId: string | (() => Promise<string>);
43
+ /** A token generated with your IDmission credentials. */
44
+ submissionToken: string;
46
45
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
47
46
  submissionUrl?: string;
48
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
49
- authUrl?: string;
50
- /** URL to upload captured documents to via Tus. */
51
- documentServiceUrl?: string;
52
47
  /** Company identifier to include with submission. */
53
48
  companyId?: string;
54
49
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -115,14 +110,6 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
115
110
  idCapturePortraitGuidesOnMobile?: boolean;
116
111
  /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
117
112
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
118
- /** 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. */
119
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
120
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
121
- onDocumentUploadProgress?: OnDocumentUploadProgress;
122
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
123
- onDocumentUploaded?: OnDocumentUploaded;
124
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
125
- onDocumentUploadFailed?: OnDocumentUploadFailed;
126
113
  /** 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. */
127
114
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
128
115
  /** 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! */
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { CustomerIdentificationAssets, CustomerIdentificationClassNames, CustomerIdentificationColors, CustomerIdentificationVerbiage } from '../customer_identification/CustomerIdentificationWizard';
5
4
  import { LangOption } from '../../lib/locales';
@@ -8,14 +7,10 @@ import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCapture
8
7
  export interface CustomerIdentificationProps extends PropsWithChildren {
9
8
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
10
9
  lang?: LangOption;
11
- /** A session identifier generated with your IDmission credentials. */
12
- sessionId: string | (() => Promise<string>);
10
+ /** A token generated with your IDmission credentials. */
11
+ submissionToken: string;
13
12
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
14
13
  submissionUrl?: string;
15
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
16
- authUrl?: string;
17
- /** URL to upload captured documents to via Tus. */
18
- documentServiceUrl?: string;
19
14
  /** Company identifier to include with submission. */
20
15
  companyId?: string;
21
16
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -36,14 +31,6 @@ export interface CustomerIdentificationProps extends PropsWithChildren {
36
31
  timeoutDurationMs?: number;
37
32
  /** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
38
33
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
39
- /** 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. */
40
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
41
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
42
- onDocumentUploadProgress?: OnDocumentUploadProgress;
43
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
44
- onDocumentUploaded?: OnDocumentUploaded;
45
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
46
- onDocumentUploadFailed?: OnDocumentUploadFailed;
47
34
  /** 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. */
48
35
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
49
36
  /** 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! */
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { LangOption } from '../../lib/locales';
5
4
  import { CustomerVerificationAssets, CustomerVerificationClassNames, CustomerVerificationColors, CustomerVerificationVerbiage } from '../customer_verification/CustomerVerificationWizard';
@@ -10,14 +9,10 @@ export interface CustomerVerificationProps extends PropsWithChildren {
10
9
  enrollmentId: string;
11
10
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
12
11
  lang?: LangOption;
13
- /** A session identifier generated with your IDmission credentials. */
14
- sessionId: string | (() => Promise<string>);
12
+ /** A token generated with your IDmission credentials. */
13
+ submissionToken: string;
15
14
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
16
15
  submissionUrl?: string;
17
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
18
- authUrl?: string;
19
- /** URL to upload captured documents to via Tus. */
20
- documentServiceUrl?: string;
21
16
  /** Company identifier to include with submission. */
22
17
  companyId?: string;
23
18
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -48,14 +43,6 @@ export interface CustomerVerificationProps extends PropsWithChildren {
48
43
  colors?: CustomerVerificationColors;
49
44
  /** Object containing any verbiage overrides. */
50
45
  verbiage?: CustomerVerificationVerbiage;
51
- /** 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. */
52
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
53
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
54
- onDocumentUploadProgress?: OnDocumentUploadProgress;
55
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
56
- onDocumentUploaded?: OnDocumentUploaded;
57
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
58
- onDocumentUploadFailed?: OnDocumentUploadFailed;
59
46
  /** 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. */
60
47
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
61
48
  /** 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! */
@@ -1,7 +1,6 @@
1
1
  import { FC, PropsWithChildren, ReactNode } from 'react';
2
2
  import { ThemeInput } from '../../themes';
3
3
  import { LangOption } from '../../lib/locales';
4
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
5
4
  import { SubmissionRequest } from '../../contexts/SubmissionContext';
6
5
  import { DocumentCaptureWizardClassNames, DocumentCaptureWizardVerbiage } from '../document_capture/DocumentCaptureWizard';
7
6
  import { CameraFeedMode } from '../../lib/camera/CameraFeedWrapper';
@@ -10,22 +9,12 @@ export type DocumentCaptureVerbiage = DocumentCaptureWizardVerbiage;
10
9
  export interface DocumentCaptureProps extends PropsWithChildren {
11
10
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
12
11
  lang?: LangOption;
13
- /** A session identifier generated with your IDmission credentials. */
14
- sessionId: string | (() => Promise<string>);
12
+ /** A token generated with your IDmission credentials. */
13
+ submissionToken: string;
15
14
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
16
15
  submissionUrl?: string;
17
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
18
- authUrl?: string;
19
16
  /** URL to upload captured documents to via Tus. */
20
17
  documentServiceUrl?: string;
21
- /** 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
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
23
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
24
- onDocumentUploadProgress?: OnDocumentUploadProgress;
25
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
26
- onDocumentUploaded?: OnDocumentUploaded;
27
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
28
- onDocumentUploadFailed?: OnDocumentUploadFailed;
29
18
  /** 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. */
30
19
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
31
20
  /** 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! */
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
5
4
  import { LangOption } from '../../lib/locales';
@@ -12,14 +11,10 @@ export type FaceValidationVerbiage = FaceLivenessVerbiage;
12
11
  export interface FaceValidationProps extends PropsWithChildren {
13
12
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
14
13
  lang?: LangOption;
15
- /** A session identifier generated with your IDmission credentials. */
16
- sessionId: string | (() => Promise<string>);
14
+ /** A token generated with your IDmission credentials. */
15
+ submissionToken: string;
17
16
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
18
17
  submissionUrl?: string;
19
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
20
- authUrl?: string;
21
- /** URL to upload captured documents to via Tus. */
22
- documentServiceUrl?: string;
23
18
  /** Company identifier to include with submission. */
24
19
  companyId?: string;
25
20
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -40,16 +35,6 @@ export interface FaceValidationProps extends PropsWithChildren {
40
35
  timeoutDurationMs?: number;
41
36
  /** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
42
37
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
43
- /** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
44
- idCardForFaceMatch?: string;
45
- /** 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. */
46
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
47
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
48
- onDocumentUploadProgress?: OnDocumentUploadProgress;
49
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
50
- onDocumentUploaded?: OnDocumentUploaded;
51
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
52
- onDocumentUploadFailed?: OnDocumentUploadFailed;
53
38
  /** Callback function that fires immediately prior to liveness check, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The liveness check request is passed in as a parameter and a promise resolving to the updated request should be returned. */
54
39
  onBeforeSubmit?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
55
40
  /** Callback function that fires when the user has completed the FaceValidation flow, regardless of whether they are approved or denied. Arguments: the SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check, and the request payload dispatched to IDmission's API, which contains the images submitted by the user. */
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren, ReactNode } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { CardData, LivenessCheckRequest, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
5
4
  import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
@@ -40,14 +39,10 @@ export type IdAndFaceValidationVerbiage = {
40
39
  export interface IdAndFaceValidationProps extends PropsWithChildren {
41
40
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
42
41
  lang?: LangOption;
43
- /** A session identifier generated with your IDmission credentials. */
44
- sessionId: string | (() => Promise<string>);
42
+ /** A token generated with your IDmission credentials. */
43
+ submissionToken: string;
45
44
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
46
45
  submissionUrl?: string;
47
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
48
- authUrl?: string;
49
- /** URL to upload captured documents to via Tus. */
50
- documentServiceUrl?: string;
51
46
  /** Company identifier to include with submission. */
52
47
  companyId?: string;
53
48
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -112,14 +107,6 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
112
107
  idCapturePortraitGuidesOnMobile?: boolean;
113
108
  /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
114
109
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
115
- /** 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. */
116
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
117
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
118
- onDocumentUploadProgress?: OnDocumentUploadProgress;
119
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
120
- onDocumentUploaded?: OnDocumentUploaded;
121
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
122
- onDocumentUploadFailed?: OnDocumentUploadFailed;
123
110
  /** Callback function that fires immediately prior to liveness check, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The liveness check request is passed in as a parameter and a promise resolving to the updated request should be returned. */
124
111
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
125
112
  /** 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. */
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren, ReactNode } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
5
4
  import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
@@ -29,14 +28,10 @@ export type IdValidationVerbiage = IdCaptureWizardVerbiage & {
29
28
  export interface IdValidationProps extends PropsWithChildren {
30
29
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
31
30
  lang?: LangOption;
32
- /** A session identifier generated with your IDmission credentials. */
33
- sessionId: string | (() => Promise<string>);
31
+ /** A token generated with your IDmission credentials. */
32
+ submissionToken: string;
34
33
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
35
34
  submissionUrl?: string;
36
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
37
- authUrl?: string;
38
- /** URL to upload captured documents to via Tus. */
39
- documentServiceUrl?: string;
40
35
  /** Company identifier to include with submission. */
41
36
  companyId?: string;
42
37
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -93,14 +88,6 @@ export interface IdValidationProps extends PropsWithChildren {
93
88
  rotateLoadingOverlayImageWhenPortrait?: boolean;
94
89
  /** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack , `passport`.*/
95
90
  precapturedDocuments?: CapturedDocuments;
96
- /** 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. */
97
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
98
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
99
- onDocumentUploadProgress?: OnDocumentUploadProgress;
100
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
101
- onDocumentUploaded?: OnDocumentUploaded;
102
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
103
- onDocumentUploadFailed?: OnDocumentUploadFailed;
104
91
  /** 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. */
105
92
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
106
93
  /** 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! */
@@ -1,29 +1,16 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { LangOption } from '../../lib/locales';
3
3
  import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
5
4
  import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
6
5
  import { ThemeInput } from '../../themes';
7
6
  import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
8
7
  export interface SignatureKYCProps extends PropsWithChildren {
9
8
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
10
9
  lang?: LangOption;
11
- /** A session identifier generated with your IDmission credentials. */
12
- sessionId: string | (() => Promise<string>);
10
+ /** A token generated with your IDmission credentials. */
11
+ submissionToken: string;
13
12
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
14
13
  submissionUrl?: string;
15
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
16
- authUrl?: string;
17
- /** URL to upload captured documents to via Tus. */
18
- documentServiceUrl?: string;
19
- /** 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. */
20
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
21
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
22
- onDocumentUploadProgress?: OnDocumentUploadProgress;
23
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
24
- onDocumentUploaded?: OnDocumentUploaded;
25
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
26
- onDocumentUploadFailed?: OnDocumentUploadFailed;
27
14
  /** 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. */
28
15
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
29
16
  /** 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! */
@@ -36,8 +23,6 @@ export interface SignatureKYCProps extends PropsWithChildren {
36
23
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
37
24
  /** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
38
25
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
39
- /** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
40
- idCardForFaceMatch?: string;
41
26
  /** Name of an included theme or object containing theme properties. **/
42
27
  theme?: ThemeInput;
43
28
  /** Object containing any classNames for inner components. **/
@@ -1,6 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { CardData, LivenessCheckRequest, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
4
3
  import { CustomerSuppliedVerbiage, LangOption } from '../../lib/locales';
5
4
  import { VideoIdWizardAssets, VideoIdWizardClassNames, VideoIdWizardColors, VideoIdWizardVerbiage } from '../video_id/IdVideoCaptureWizard';
6
5
  import { IdCaptureWizardProps } from '../id_capture/IdCaptureWizard';
@@ -30,14 +29,10 @@ export type VideoIdValidationVerbiage = VideoIdWizardVerbiage & {
30
29
  export interface VideoIdValidationProps extends PropsWithChildren {
31
30
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
32
31
  lang?: LangOption;
33
- /** A session identifier generated with your IDmission credentials. */
34
- sessionId: string | (() => Promise<string>);
32
+ /** A token generated with your IDmission credentials. */
33
+ submissionToken: string;
35
34
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
36
35
  submissionUrl?: string;
37
- /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
38
- authUrl?: string;
39
- /** URL to upload captured documents to via Tus. */
40
- documentServiceUrl?: string;
41
36
  /** Company identifier to include with submission. */
42
37
  companyId?: string;
43
38
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -68,14 +63,6 @@ export interface VideoIdValidationProps extends PropsWithChildren {
68
63
  webhooksSendProcessedImages?: boolean;
69
64
  /** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
70
65
  webhooksFireOnReview?: boolean;
71
- /** 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. */
72
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
73
- /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
74
- onDocumentUploadProgress?: OnDocumentUploadProgress;
75
- /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
76
- onDocumentUploaded?: OnDocumentUploaded;
77
- /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
78
- onDocumentUploadFailed?: OnDocumentUploadFailed;
79
66
  /** 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. */
80
67
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
81
68
  /** 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! */
@@ -128,8 +115,6 @@ export interface VideoIdValidationProps extends PropsWithChildren {
128
115
  idCapturePortraitGuidesOnMobile?: boolean;
129
116
  /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
130
117
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
131
- /** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
132
- idCardForFaceMatch?: string;
133
118
  /** String indicating which face liveness loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
134
119
  faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
135
120
  /** Name of an included theme or object containing theme properties. **/
@@ -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 SessionValidationFailedError extends Error {
8
+ export declare class TokenPublicKeyError extends Error {
9
9
  err: Error;
10
10
  host: string;
11
11
  constructor(err: Error, host: string);
@@ -4,22 +4,7 @@ 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 declare const defaultSubmissionUrl = "https://portal-api.idmission.com/swagger";
8
- export declare const defaultDocumentServiceUrl = "https://portal-api.idmission.com/files/";
9
- export type DocumentMetadata = {
10
- filename?: string;
11
- filetype?: string;
12
- };
13
- export type DocumentUploadProgressEvent = {
14
- bytesUploaded: number;
15
- bytesTotal: number;
16
- percentage: string;
17
- metadata?: DocumentMetadata;
18
- };
19
- export type OnBeforeDocumentUpload = (content: Blob, metadata?: DocumentMetadata) => Promise<void | false>;
20
- export type OnDocumentUploadProgress = (event: DocumentUploadProgressEvent) => void;
21
- export type OnDocumentUploaded = (documentId: string, metadata?: DocumentMetadata) => Promise<void>;
22
- export type OnDocumentUploadFailed = (error: Error, metadata?: DocumentMetadata) => void;
7
+ export type TokenState = 'NOT_PARSED' | 'PARSING' | 'GOOD' | 'MISSING' | 'EXPIRED' | 'INVALID_FORMAT' | 'INVALID_SIGNATURE' | 'ISSUER_NOT_ALLOWED' | 'PUBLIC_KEY_LOAD_FAILED';
23
8
  export type SubmissionState = {
24
9
  submit: () => Promise<SubmissionResponse | null>;
25
10
  submissionStatus: SubmissionStatus;
@@ -47,7 +32,7 @@ export type SubmissionState = {
47
32
  setIdCaptureVideoIdFrontImage: (image: string) => void;
48
33
  setIdCaptureVideoIdBackImage: (image: string) => void;
49
34
  setAdditionalDocuments: (uploadedDocuments: UploadedDocument[]) => void;
50
- uploadDocument: (blob: Blob, metadata?: DocumentMetadata) => Promise<string>;
35
+ uploadDocument: (blob: Blob) => Promise<string>;
51
36
  logIdFrontCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
52
37
  logIdBackCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
53
38
  logSelfieCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
@@ -59,7 +44,8 @@ export declare const SubmissionContext: React.Context<SubmissionState>;
59
44
  export type SubmissionProviderProps = {
60
45
  action: SubmissionAction;
61
46
  children: ReactElement;
62
- submissionUrl?: string;
47
+ token: string;
48
+ url?: string;
63
49
  environment?: SubmissionEnvironment;
64
50
  companyId?: string;
65
51
  enrollmentId?: string;
@@ -74,7 +60,6 @@ export type SubmissionProviderProps = {
74
60
  verifyIdWithExternalDatabases?: boolean;
75
61
  deduplicationEnabled?: boolean;
76
62
  deduplicationSynchronous?: boolean;
77
- idCardForFaceMatch?: string;
78
63
  geolocationEnabled?: boolean;
79
64
  geolocationRequired?: boolean;
80
65
  webhooksEnabled?: boolean;
@@ -88,11 +73,7 @@ export type SubmissionProviderProps = {
88
73
  onSubmit?: (payload: SubmissionRequest) => void;
89
74
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
90
75
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
91
- onBeforeDocumentUpload?: OnBeforeDocumentUpload;
92
- onDocumentUploadProgress?: OnDocumentUploadProgress;
93
- onDocumentUploaded?: OnDocumentUploaded;
94
- onDocumentUploadFailed?: OnDocumentUploadFailed;
95
76
  onResponseReceived?: (res: SubmissionResponse, req: SubmissionRequest) => void;
96
77
  onRequestFailure?: (err: Error) => void;
97
78
  };
98
- 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, }: SubmissionProviderProps) => ReactElement;
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;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TokenIssuerNotAllowedErrorOverlay: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TokenMissingErrorOverlay: () => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { TokenPublicKeyError } from './Errors';
3
+ export declare const TokenPublicKeyErrorOverlay: ({ error, }: {
4
+ error: TokenPublicKeyError | null;
5
+ }) => React.JSX.Element;
@@ -128,15 +128,9 @@ export type LivenessCheckRequest = {
128
128
  merchantId: number;
129
129
  };
130
130
  customerData: {
131
- additionalData?: {
132
- uniqueRequestId?: string;
133
- };
134
131
  biometricData: {
135
132
  selfie: string;
136
133
  };
137
- idData?: {
138
- idImageFront?: string;
139
- };
140
134
  };
141
135
  additionalData: {
142
136
  uniqueRequestId: string;
@@ -162,9 +156,9 @@ export type LiveCheckResponse = {
162
156
  };
163
157
  export declare function parseJwt(token: string): Record<string, unknown>;
164
158
  export declare function determineSubmissionHost(environment: SubmissionEnvironment, token?: string): string;
165
- export declare function determineSubmissionEndpoint(action: SubmissionAction, hasId: boolean, hasSelfie: boolean): string;
166
- export declare function liveCheckEndpoint(hasDocumentToMatchFace?: boolean): string;
167
- export declare function apiHeaders(sessionId?: string): HeadersInit;
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;
168
162
  export declare function attachMetadataToRequest(request: SubmissionRequest | LivenessCheckRequest, { selfieCaptureAttempts, idFrontCaptureAttempts, idBackCaptureAttempts, geolocationResult, }: {
169
163
  selfieCaptureAttempts: CaptureAttemptMetadata[];
170
164
  idFrontCaptureAttempts: CaptureAttemptMetadata[];
package/dist/index.d.ts CHANGED
@@ -12,8 +12,6 @@ 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';
17
15
  type TargetElement = Element | DocumentFragment | string | undefined;
18
16
  export declare const renderIdValidation: (optionsOrTargetElement: TargetElement | IdValidationProps, options?: IdValidationProps) => Element | DocumentFragment;
19
17
  export declare const renderFaceValidation: (optionsOrTargetElement: TargetElement | FaceValidationProps, options?: FaceValidationProps) => Element | DocumentFragment;
@@ -40,12 +38,8 @@ export type IDmissionSDK = {
40
38
  themes: typeof themes;
41
39
  version: string;
42
40
  ready: boolean;
43
- authMode?: 'session';
44
- allowedAuthUrls?: string[];
45
- defaultAuthUrl?: string;
46
- defaultSubmissionUrl?: string;
47
41
  };
48
42
  declare global {
49
43
  var IDmissionSDK: IDmissionSDK;
50
44
  }
51
- export { preloadModels, themes, Theme, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, };
45
+ export { preloadModels, themes, Theme, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, };
@@ -1,5 +1,3 @@
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;
5
- export declare function blobToB64(blob: Blob): Promise<string>;