idmission-web-sdk 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -270,7 +270,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
270
270
  <table>
271
271
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
272
272
  <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
273
- <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled.</td></tr>
273
+ <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled. Overrides <code>personalData.uniqueNumber</code> if both are specified.</td></tr>
274
274
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>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.</td></tr>
275
275
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow. 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.</td></tr>
276
276
  <tr><td><code>onEnrolled</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow successfully. 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.</td></tr>
@@ -323,7 +323,7 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
323
323
  <table>
324
324
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
325
325
  <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
326
- <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled.</td></tr>
326
+ <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled. Overrides <code>personalData.uniqueNumber</code> if both are specified.</td></tr>
327
327
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>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.</td></tr>
328
328
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow. 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.</td></tr>
329
329
  <tr><td><code>onEnrolled</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow successfully. 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.</td></tr>
@@ -12,6 +12,12 @@ export type CustomerBiometricsEnrollmentProps = {
12
12
  submissionToken: string;
13
13
  submissionEnvironment?: SubmissionEnvironment;
14
14
  submissionUrl?: string;
15
+ companyId?: string;
16
+ deduplicationEnabled?: boolean;
17
+ deduplicationSynchronous?: boolean;
18
+ webhooksEnabled?: boolean;
19
+ webhooksClientTraceId?: string;
20
+ webhooksStripSpecialCharacters?: boolean;
15
21
  timeoutDurationMs?: number;
16
22
  assets?: FaceLivenessAssets;
17
23
  verbiage?: CustomerBiometricsEnrollmentVerbiage;
@@ -27,4 +33,4 @@ export type CustomerBiometricsEnrollmentProps = {
27
33
  geolocationRequired?: boolean;
28
34
  debugMode?: boolean;
29
35
  };
30
- export declare const CustomerBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerBiometricsEnrollmentProps) => ReactElement;
36
+ export declare const CustomerBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, companyId, deduplicationEnabled, deduplicationSynchronous, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerBiometricsEnrollmentProps) => ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, PersonalData, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { FaceLivenessAssets, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
4
  import { IdCaptureAssets } from '../id_capture/IdCaptureWizard';
5
5
  import { AdditionalDocument } from '../additional_document_capture/AdditionalDocumentCapture';
@@ -11,6 +11,16 @@ export type CustomerEnrollmentProps = {
11
11
  submissionToken: string;
12
12
  submissionEnvironment?: SubmissionEnvironment;
13
13
  submissionUrl?: string;
14
+ companyId?: string;
15
+ manualReviewRequired?: boolean;
16
+ verifyIdWithExternalDatabases?: boolean;
17
+ personalData?: PersonalData;
18
+ cardData?: CardData;
19
+ deduplicationEnabled?: boolean;
20
+ deduplicationSynchronous?: boolean;
21
+ webhooksEnabled?: boolean;
22
+ webhooksClientTraceId?: string;
23
+ webhooksStripSpecialCharacters?: boolean;
14
24
  idAutoCaptureEnabled?: boolean;
15
25
  idCardAutoCaptureScoreThreshold?: number;
16
26
  mrzDetectionScoreThreshold?: number;
@@ -34,4 +44,4 @@ export type CustomerEnrollmentProps = {
34
44
  geolocationRequired?: boolean;
35
45
  debugMode?: boolean;
36
46
  };
37
- export declare const CustomerIdAndBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerEnrollmentProps) => ReactElement;
47
+ export declare const CustomerIdAndBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, companyId, manualReviewRequired, verifyIdWithExternalDatabases, personalData, cardData, deduplicationEnabled, deduplicationSynchronous, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerEnrollmentProps) => ReactElement;
@@ -7,6 +7,10 @@ export type CustomerIdentificationProps = {
7
7
  submissionToken: string;
8
8
  submissionEnvironment?: SubmissionEnvironment;
9
9
  submissionUrl?: string;
10
+ companyId?: string;
11
+ webhooksEnabled?: boolean;
12
+ webhooksClientTraceId?: string;
13
+ webhooksStripSpecialCharacters?: boolean;
10
14
  timeoutDurationMs?: number;
11
15
  onBeforeSubmit?: (request: SubmissionRequest) => Promise<SubmissionRequest>;
12
16
  onComplete?: (response: SubmissionResponse) => void;
@@ -20,4 +24,4 @@ export type CustomerIdentificationProps = {
20
24
  geolocationRequired?: boolean;
21
25
  debugMode?: boolean;
22
26
  };
23
- export declare const CustomerIdentification: ({ lang, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, onBeforeSubmit, onComplete, onCustomerMatched, onCustomerNotMatched, onCaptureGuidanceTimeout, onExitAfterFailure, assets, verbiage, geolocationEnabled, geolocationRequired, debugMode, }: CustomerIdentificationProps) => ReactElement;
27
+ export declare const CustomerIdentification: ({ lang, submissionToken, submissionEnvironment, submissionUrl, companyId, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, timeoutDurationMs, onBeforeSubmit, onComplete, onCustomerMatched, onCustomerNotMatched, onCaptureGuidanceTimeout, onExitAfterFailure, assets, verbiage, geolocationEnabled, geolocationRequired, debugMode, }: CustomerIdentificationProps) => ReactElement;
@@ -8,6 +8,10 @@ export type CustomerVerificationProps = {
8
8
  submissionToken: string;
9
9
  submissionEnvironment?: SubmissionEnvironment;
10
10
  submissionUrl?: string;
11
+ companyId?: string;
12
+ webhooksEnabled?: boolean;
13
+ webhooksClientTraceId?: string;
14
+ webhooksStripSpecialCharacters?: boolean;
11
15
  timeoutDurationMs?: number;
12
16
  assets?: CustomerVerificationAssets;
13
17
  verbiage?: CustomerVerificationVerbiage;
@@ -20,4 +24,4 @@ export type CustomerVerificationProps = {
20
24
  geolocationRequired?: boolean;
21
25
  debugMode?: boolean;
22
26
  };
23
- export declare const CustomerVerification: ({ lang, enrollmentId, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onCustomerMatched, onCustomerNotMatched, onExitAfterFailure, geolocationEnabled, geolocationRequired, debugMode, }: CustomerVerificationProps) => ReactElement;
27
+ export declare const CustomerVerification: ({ lang, enrollmentId, submissionToken, submissionEnvironment, submissionUrl, companyId, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onCustomerMatched, onCustomerNotMatched, onExitAfterFailure, geolocationEnabled, geolocationRequired, debugMode, }: CustomerVerificationProps) => ReactElement;
@@ -7,6 +7,10 @@ export type FaceValidationProps = {
7
7
  submissionToken: string;
8
8
  submissionEnvironment?: SubmissionEnvironment;
9
9
  submissionUrl?: string;
10
+ companyId?: string;
11
+ webhooksEnabled?: boolean;
12
+ webhooksClientTraceId?: string;
13
+ webhooksStripSpecialCharacters?: boolean;
10
14
  timeoutDurationMs?: number;
11
15
  onBeforeSubmit?: (request: SubmissionRequest) => Promise<SubmissionRequest>;
12
16
  onComplete?: (submissionResponse: SubmissionResponse | null) => void;
@@ -19,4 +23,4 @@ export type FaceValidationProps = {
19
23
  geolocationRequired?: boolean;
20
24
  debugMode?: boolean;
21
25
  };
22
- export declare const FaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, onBeforeSubmit, onComplete, onApproved, onDenied, onExitAfterFailure, assets, verbiage, geolocationEnabled, geolocationRequired, debugMode, }: FaceValidationProps) => ReactElement;
26
+ export declare const FaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, companyId, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, timeoutDurationMs, onBeforeSubmit, onComplete, onApproved, onDenied, onExitAfterFailure, assets, verbiage, geolocationEnabled, geolocationRequired, debugMode, }: FaceValidationProps) => ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, PersonalData, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { FaceLivenessAssets, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
4
  import { IdCaptureAssets } from '../id_capture/IdCaptureWizard';
5
5
  import { AdditionalDocument } from '../additional_document_capture/AdditionalDocumentCapture';
@@ -10,6 +10,14 @@ export type IdAndFaceValidationProps = {
10
10
  submissionToken: string;
11
11
  submissionEnvironment?: SubmissionEnvironment;
12
12
  submissionUrl?: string;
13
+ companyId?: string;
14
+ manualReviewRequired?: boolean;
15
+ verifyIdWithExternalDatabases?: boolean;
16
+ personalData?: PersonalData;
17
+ cardData?: CardData;
18
+ webhooksEnabled?: boolean;
19
+ webhooksClientTraceId?: string;
20
+ webhooksStripSpecialCharacters?: boolean;
13
21
  idAutoCaptureEnabled?: boolean;
14
22
  idCardAutoCaptureScoreThreshold?: number;
15
23
  mrzDetectionScoreThreshold?: number;
@@ -33,4 +41,4 @@ export type IdAndFaceValidationProps = {
33
41
  geolocationRequired?: boolean;
34
42
  debugMode?: boolean;
35
43
  };
36
- export declare const IdAndFaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onApproved, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: IdAndFaceValidationProps) => ReactElement;
44
+ export declare const IdAndFaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, companyId, manualReviewRequired, verifyIdWithExternalDatabases, personalData, cardData, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onApproved, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: IdAndFaceValidationProps) => ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, PersonalData, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { IdCaptureAssets, IdCaptureVerbiage } from '../id_capture/IdCaptureWizard';
4
4
  import { NamespacedAdditionalDocumentsVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
5
5
  import { AdditionalDocument } from '../additional_document_capture/AdditionalDocumentCapture';
@@ -11,6 +11,14 @@ export type IdValidationProps = {
11
11
  submissionToken: string;
12
12
  submissionEnvironment?: SubmissionEnvironment;
13
13
  submissionUrl?: string;
14
+ companyId?: string;
15
+ manualReviewRequired?: boolean;
16
+ verifyIdWithExternalDatabases?: boolean;
17
+ personalData?: PersonalData;
18
+ cardData?: CardData;
19
+ webhooksEnabled?: boolean;
20
+ webhooksClientTraceId?: string;
21
+ webhooksStripSpecialCharacters?: boolean;
14
22
  idAutoCaptureEnabled?: boolean;
15
23
  idCardAutoCaptureScoreThreshold?: number;
16
24
  passportAutoCaptureScoreThreshold?: number;
@@ -29,4 +37,4 @@ export type IdValidationProps = {
29
37
  geolocationRequired?: boolean;
30
38
  debugMode?: boolean;
31
39
  };
32
- export declare const IdValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, onBeforeSubmit, onComplete, onApproved, onDenied, assets, verbiage, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: IdValidationProps) => ReactElement;
40
+ export declare const IdValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, companyId, manualReviewRequired, verifyIdWithExternalDatabases, personalData, cardData, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, onBeforeSubmit, onComplete, onApproved, onDenied, assets, verbiage, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: IdValidationProps) => ReactElement;
@@ -1,16 +1,26 @@
1
1
  import { ReactElement } from 'react';
2
- import { SubmissionAction, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, PersonalData, SubmissionAction, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  export type SubmissionProviderProps = {
4
4
  action: SubmissionAction;
5
5
  children: ReactElement;
6
6
  token: string;
7
7
  url?: string;
8
8
  environment?: SubmissionEnvironment;
9
+ companyId?: string;
9
10
  enrollmentId?: string;
11
+ personalData?: PersonalData;
12
+ cardData?: CardData;
13
+ manualReviewRequired?: boolean;
14
+ verifyIdWithExternalDatabases?: boolean;
15
+ deduplicationEnabled?: boolean;
16
+ deduplicationSynchronous?: boolean;
10
17
  geolocationEnabled?: boolean;
11
18
  geolocationRequired?: boolean;
19
+ webhooksEnabled?: boolean;
20
+ webhooksClientTraceId?: string;
21
+ webhooksStripSpecialCharacters?: boolean;
12
22
  onBeforeSubmit?: (request: SubmissionRequest) => Promise<SubmissionRequest>;
13
23
  onResponseReceived?: (response: SubmissionResponse) => void;
14
24
  onRequestFailure?: (err: Error) => void;
15
25
  };
16
- export declare const SubmissionProvider: ({ action, children, url, environment, token, enrollmentId, geolocationEnabled, geolocationRequired, onBeforeSubmit, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
26
+ export declare const SubmissionProvider: ({ action, children, url, environment, token, companyId, enrollmentId, personalData, cardData, manualReviewRequired, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, onBeforeSubmit, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
@@ -33,9 +33,8 @@ export type SubmissionRequest = {
33
33
  idCountry: 'NSP';
34
34
  idState: '';
35
35
  };
36
- personalData?: {
37
- uniqueNumber?: string;
38
- };
36
+ personalData?: PersonalData;
37
+ cardData?: CardData;
39
38
  biometricData?: {
40
39
  selfie?: string;
41
40
  };
@@ -49,6 +48,7 @@ export type SubmissionRequest = {
49
48
  };
50
49
  additionalData: {
51
50
  uniqueRequestId: string;
51
+ clientTraceId?: string;
52
52
  manualReviewRequired: 'Y' | 'N';
53
53
  bypassAgeValidation: 'Y' | 'N';
54
54
  deDuplicationRequired: 'Y' | 'N';
@@ -65,7 +65,7 @@ export type SubmissionRequest = {
65
65
  metadata?: string;
66
66
  };
67
67
  employee?: {
68
- companyId?: number;
68
+ companyId?: string;
69
69
  };
70
70
  };
71
71
  export type CaptureAttemptMetadata = {
@@ -73,6 +73,27 @@ export type CaptureAttemptMetadata = {
73
73
  captureTime: number;
74
74
  operationTime?: number;
75
75
  };
76
+ export type PersonalData = {
77
+ uniqueNumber?: string;
78
+ name?: string;
79
+ phone?: string;
80
+ phoneCountryCode?: string;
81
+ email?: string;
82
+ dob?: string;
83
+ gender?: 'M' | 'F';
84
+ addressLine1?: string;
85
+ addressLine2?: string;
86
+ city?: string;
87
+ district?: string;
88
+ postalCode?: string;
89
+ country?: string;
90
+ };
91
+ export type CardData = {
92
+ cardToken?: string;
93
+ cardLast4?: string;
94
+ cardExpDate?: string;
95
+ nameOnCard?: string;
96
+ };
76
97
  export type SubmissionMetadata = {
77
98
  selfie: CaptureAttemptMetadata[];
78
99
  back: CaptureAttemptMetadata[];