@smile_identity/react-native 10.0.0-beta01 → 10.0.0-beta03

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 (123) hide show
  1. package/README.md +1 -1
  2. package/android/gradle.properties +1 -1
  3. package/android/src/main/java/com/smileidentity/react/Mapper.kt +179 -0
  4. package/android/src/main/java/com/smileidentity/react/SmileIdModule.kt +76 -49
  5. package/android/src/main/java/com/smileidentity/react/SmileIdPackage.kt +4 -2
  6. package/android/src/main/java/com/smileidentity/react/utils/ReactUtils.kt +9 -38
  7. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDBiometricKYCViewManager.kt +41 -9
  8. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDConsentViewManager.kt +83 -0
  9. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDDocumentVerificationViewManager.kt +45 -9
  10. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDEnhancedDocumentVerificationViewManager.kt +77 -0
  11. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieAuthenticationViewManager.kt +36 -9
  12. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieEnrollmentViewManager.kt +36 -9
  13. package/android/src/main/java/com/smileidentity/react/views/SmileIDBiometricKYCView.kt +64 -0
  14. package/android/src/main/java/com/smileidentity/react/views/SmileIDConsentView.kt +67 -0
  15. package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentVerificationView.kt +77 -0
  16. package/android/src/main/java/com/smileidentity/react/views/SmileIDEnhancedDocumentVerificationView.kt +71 -0
  17. package/android/src/main/java/com/smileidentity/react/views/{SmileIDSmartSelfieAuthentication.kt → SmileIDSmartSelfieAuthenticationView.kt} +15 -4
  18. package/android/src/main/java/com/smileidentity/react/views/{SmileIDSmartSelfieEnrollment.kt → SmileIDSmartSelfieEnrollmentView.kt} +14 -5
  19. package/android/src/main/java/com/smileidentity/react/views/SmileIDView.kt +3 -27
  20. package/android/src/oldarch/SmileIdSpec.kt +26 -1
  21. package/ios/RNDelegates/SmileIDUIViewDelegate.swift +4 -0
  22. package/ios/RNDelegates/SmileIDViewDelegate.swift +5 -0
  23. package/ios/RNSmileID.mm +7 -0
  24. package/ios/RNSmileID.swift +147 -0
  25. package/ios/SmileId.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  26. package/ios/SmileId.xcodeproj/project.xcworkspace/xcuserdata/japhetndhlovu.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  27. package/ios/SmileId.xcodeproj/xcuserdata/japhetndhlovu.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  28. package/ios/Utils/SmileIDDictExt.swift +50 -0
  29. package/ios/Utils/SmileIDUtils.swift +10 -0
  30. package/ios/View/BaseSmileIDView.swift +35 -0
  31. package/ios/View/SmileIDBiometricKYCView.swift +46 -0
  32. package/ios/View/SmileIDConsentView.swift +36 -0
  33. package/ios/View/SmileIDDocumentVerificationView.swift +55 -0
  34. package/ios/View/SmileIDEnhancedDocumentVerificationView.swift +55 -0
  35. package/ios/View/SmileIDSmartSelfieAuthView.swift +41 -0
  36. package/ios/View/SmileIDSmartSelfieEnrollmentView.swift +41 -0
  37. package/ios/ViewManagers/SmileIDBaseViewManager.swift +18 -0
  38. package/ios/ViewManagers/SmileIDBiometricKYCViewManager.m +6 -0
  39. package/ios/ViewManagers/SmileIDBiometricKYCViewManager.swift +34 -0
  40. package/ios/ViewManagers/SmileIDConsentViewManager.m +6 -0
  41. package/ios/ViewManagers/SmileIDConsentViewManager.swift +47 -0
  42. package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.m +6 -0
  43. package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.swift +49 -0
  44. package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.m +6 -0
  45. package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.swift +49 -0
  46. package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationViewManager.m +6 -0
  47. package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationViewManager.swift +27 -0
  48. package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentViewManager.m +6 -0
  49. package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentViewManager.swift +27 -0
  50. package/ios/ViewModels/SmileIDProductModel.swift +30 -0
  51. package/ios/react-native-smile-id-Bridging-Header.h +8 -0
  52. package/lib/commonjs/NativeSmileId.js +1 -1
  53. package/lib/commonjs/NativeSmileId.js.map +1 -1
  54. package/lib/commonjs/SmileIDBiometricKYCView.js +40 -0
  55. package/lib/commonjs/SmileIDBiometricKYCView.js.map +1 -0
  56. package/lib/commonjs/SmileIDConsentView.js +40 -0
  57. package/lib/commonjs/SmileIDConsentView.js.map +1 -0
  58. package/lib/commonjs/SmileIDDocumentVerificationView.js +40 -0
  59. package/lib/commonjs/SmileIDDocumentVerificationView.js.map +1 -0
  60. package/lib/commonjs/SmileIDEnhancedDocumentVerificationView.js +40 -0
  61. package/lib/commonjs/SmileIDEnhancedDocumentVerificationView.js.map +1 -0
  62. package/lib/commonjs/SmileIDSmartSelfieAuthenticationView.js +40 -0
  63. package/lib/commonjs/SmileIDSmartSelfieAuthenticationView.js.map +1 -0
  64. package/lib/commonjs/SmileIDSmartSelfieEnrollmentView.js +40 -0
  65. package/lib/commonjs/SmileIDSmartSelfieEnrollmentView.js.map +1 -0
  66. package/lib/commonjs/index.js +194 -27
  67. package/lib/commonjs/index.js.map +1 -1
  68. package/lib/commonjs/types.js +517 -0
  69. package/lib/commonjs/types.js.map +1 -0
  70. package/lib/module/NativeSmileId.js +1 -1
  71. package/lib/module/NativeSmileId.js.map +1 -1
  72. package/lib/module/SmileIDBiometricKYCView.js +30 -0
  73. package/lib/module/SmileIDBiometricKYCView.js.map +1 -0
  74. package/lib/module/SmileIDConsentView.js +30 -0
  75. package/lib/module/SmileIDConsentView.js.map +1 -0
  76. package/lib/module/SmileIDDocumentVerificationView.js +30 -0
  77. package/lib/module/SmileIDDocumentVerificationView.js.map +1 -0
  78. package/lib/module/SmileIDEnhancedDocumentVerificationView.js +30 -0
  79. package/lib/module/SmileIDEnhancedDocumentVerificationView.js.map +1 -0
  80. package/lib/module/SmileIDSmartSelfieAuthenticationView.js +30 -0
  81. package/lib/module/SmileIDSmartSelfieAuthenticationView.js.map +1 -0
  82. package/lib/module/SmileIDSmartSelfieEnrollmentView.js +30 -0
  83. package/lib/module/SmileIDSmartSelfieEnrollmentView.js.map +1 -0
  84. package/lib/module/index.js +33 -21
  85. package/lib/module/index.js.map +1 -1
  86. package/lib/module/types.js +472 -0
  87. package/lib/module/types.js.map +1 -0
  88. package/lib/typescript/NativeSmileId.d.ts +22 -3
  89. package/lib/typescript/NativeSmileId.d.ts.map +1 -1
  90. package/lib/typescript/SmileIDBiometricKYCView.d.ts +8 -0
  91. package/lib/typescript/SmileIDBiometricKYCView.d.ts.map +1 -0
  92. package/lib/typescript/SmileIDConsentView.d.ts +8 -0
  93. package/lib/typescript/SmileIDConsentView.d.ts.map +1 -0
  94. package/lib/typescript/SmileIDDocumentVerificationView.d.ts +8 -0
  95. package/lib/typescript/SmileIDDocumentVerificationView.d.ts.map +1 -0
  96. package/lib/typescript/SmileIDEnhancedDocumentVerificationView.d.ts +8 -0
  97. package/lib/typescript/SmileIDEnhancedDocumentVerificationView.d.ts.map +1 -0
  98. package/lib/typescript/SmileIDSmartSelfieAuthenticationView.d.ts +8 -0
  99. package/lib/typescript/SmileIDSmartSelfieAuthenticationView.d.ts.map +1 -0
  100. package/lib/typescript/SmileIDSmartSelfieEnrollmentView.d.ts +8 -0
  101. package/lib/typescript/SmileIDSmartSelfieEnrollmentView.d.ts.map +1 -0
  102. package/lib/typescript/index.d.ts +24 -86
  103. package/lib/typescript/index.d.ts.map +1 -1
  104. package/lib/typescript/types.d.ts +504 -0
  105. package/lib/typescript/types.d.ts.map +1 -0
  106. package/package.json +3 -4
  107. package/react-native-smile-id.podspec +2 -2
  108. package/src/NativeSmileId.ts +68 -9
  109. package/src/SmileIDBiometricKYCView.tsx +45 -0
  110. package/src/SmileIDConsentView.tsx +44 -0
  111. package/src/SmileIDDocumentVerificationView.tsx +51 -0
  112. package/src/SmileIDEnhancedDocumentVerificationView.tsx +51 -0
  113. package/src/SmileIDSmartSelfieAuthenticationView.tsx +51 -0
  114. package/src/SmileIDSmartSelfieEnrollmentView.tsx +51 -0
  115. package/src/index.tsx +86 -122
  116. package/src/types.ts +1084 -0
  117. package/android/src/main/assets/smile_config.json +0 -9
  118. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDBVNConsentViewManager.kt +0 -42
  119. package/android/src/main/java/com/smileidentity/react/views/SmileIDBVNConsentScreen.kt +0 -54
  120. package/android/src/main/java/com/smileidentity/react/views/SmileIDBiometricKYC.kt +0 -89
  121. package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentVerification.kt +0 -59
  122. package/ios/SmileId.h +0 -12
  123. package/ios/SmileId.mm +0 -27
package/src/types.ts ADDED
@@ -0,0 +1,1084 @@
1
+ import { ViewProps } from 'react-native';
2
+
3
+ export type SmileIDViewProps = ViewProps & {
4
+ /**
5
+ * The user ID to associate with the Document Verification. Most often, this will
6
+ * correspond to a unique User ID within your system. If not provided, a random user ID will
7
+ * be generated.
8
+ */
9
+ userId?: string;
10
+ /**
11
+ * The job ID to associate with the Document Verification. Most often, this will
12
+ * correspond to a unique Job ID within your system. If not provided, a random job ID will
13
+ * be generated.
14
+ */
15
+ jobId?: string;
16
+ /**
17
+ * Custom values specific to partners.
18
+ */
19
+ extraPartnerParams?: Record<string, any>;
20
+ /**
21
+ * The delegate object that receives the result of the native events
22
+ */
23
+ onResult?: (event: any) => void;
24
+ };
25
+
26
+ type SmartSelfieRequest = SmileIDViewProps & {
27
+ /**
28
+ * Whether to allow Agent Mode or not. If allowed, a switch will be
29
+ * displayed allowing toggling between the back camera and front camera. If not allowed, only
30
+ * the front camera will be used.
31
+ */
32
+ allowAgentMode: boolean;
33
+ /**
34
+ * Whether to deactivate capture screen's instructions before selfie of document capture
35
+ */
36
+ showInstructions?: boolean;
37
+ /**
38
+ * Whether to show the Smile ID attribution on the Instructions screen.
39
+ */
40
+ showAttribution?: boolean;
41
+ /**
42
+ * Whether to allow the user to reentoll
43
+ */
44
+ allowNewEnroll?: boolean;
45
+ };
46
+
47
+ export type SmartSelfieEnrollmentRequest = SmartSelfieRequest;
48
+ export type SmartSelfieAuthenticationRequest = SmartSelfieRequest;
49
+
50
+ export type DocumentVerificationRequest = SmartSelfieRequest & {
51
+ /**
52
+ * The country of issuance of the ID type to be captured.
53
+ */
54
+ countryCode: string;
55
+ /**
56
+ * The ID type of the document ID to be captured.
57
+ */
58
+ documentType: string;
59
+ /**
60
+ * An optional value for the aspect ratio of the document. If no value is
61
+ * supplied, image analysis is done to calculate the document's aspect ratio.
62
+ */
63
+ idAspectRatio?: number;
64
+ /**
65
+ * Whether to capture both sides of the ID or not. Otherwise, only the
66
+ * front side will be captured. If this is true, an option to skip back side will still be
67
+ * shown.
68
+ */
69
+ captureBothSides?: boolean;
70
+ /**
71
+ * Whether to allow the user to upload images from their gallery or not.
72
+ */
73
+ allowGalleryUpload?: boolean;
74
+ /**
75
+ * If provided, selfie capture will be bypassed using this image.
76
+ */
77
+ bypassSelfieCaptureWithFile?: string;
78
+ };
79
+
80
+ export type ConsentRequest = Omit<SmartSelfieRequest, 'allowAgentMode'> & {
81
+ /**
82
+ * String value of the resource in the app's drawable folder to use as the partner icon.
83
+ */
84
+ partnerIcon: string;
85
+ /**
86
+ * The name of the partner to display on the consent screen.
87
+ */
88
+ partnerName: string;
89
+
90
+ /**
91
+ * The privacy policy URL of the partner to display on the consent screen.
92
+ */
93
+ partnerPrivacyPolicy: string;
94
+ /**
95
+ * The product being requested consent for
96
+ */
97
+ productName: string;
98
+ };
99
+
100
+ export type BiometricKYCRequest = ConsentRequest & {
101
+ idInfo: IdInfo;
102
+ productName: string;
103
+ };
104
+
105
+ // noinspection JSUnusedGlobalSymbols
106
+ export enum JobType {
107
+ BiometricKyc = 1,
108
+ SmartSelfieAuthentication = 2,
109
+ SmartSelfieEnrollment = 4,
110
+ EnhancedKyc = 5,
111
+ DocumentVerification = 6,
112
+ BVN = 7,
113
+ EnhancedDocumentVerification = 11,
114
+ }
115
+
116
+ /**
117
+ * Custom values specific to partners can be placed in [extras]
118
+ */
119
+ export class PartnerParams {
120
+ jobType?: JobType;
121
+ jobId: string;
122
+ userId: string;
123
+ extras?: [string: string];
124
+
125
+ constructor(
126
+ jobType: JobType,
127
+ jobId: string,
128
+ userId: string,
129
+ extras?: [string: string]
130
+ ) {
131
+ this.jobType = jobType;
132
+ this.jobId = jobId;
133
+ this.userId = userId;
134
+ this.extras = extras;
135
+ }
136
+ }
137
+
138
+ /**
139
+ * The Auth Smile request. Auth Smile serves multiple purposes:
140
+ *
141
+ * - It is used to fetch the signature needed for subsequent API requests.
142
+ * - It indicates the type of job that will be performed.
143
+ * - It is used to fetch consent information for the partner.
144
+ *
145
+ * @param jobType The type of job that will be performed.
146
+ * @param country The country code of the country where the job is being performed. This value is
147
+ * required in order to get back consent information for the partner.
148
+ * @param idType The type of ID that will be used for the job. This value is required in order to
149
+ * get back consent information for the partner.
150
+ * @param updateEnrolledImage Whether or not the enrolled image should be updated with the image
151
+ * submitted for this job.
152
+ * @param jobId The job ID to associate with the job. Most often, this will correspond to a unique
153
+ * Job ID within your own system. If not provided, a random job ID will be generated.
154
+ * @param userId The user ID to associate with the job. Most often, this will correspond to a unique
155
+ * User ID within your own system. If not provided, a random user ID will be generated.
156
+ */
157
+ export class AuthenticationRequest {
158
+ jobType: JobType;
159
+ country?: string;
160
+ idType?: string;
161
+ updateEnrolledImage?: boolean;
162
+ jobId?: string;
163
+ userId?: string;
164
+
165
+ constructor(
166
+ jobType: JobType,
167
+ country?: string,
168
+ idType?: string,
169
+ updateEnrolledImage?: boolean,
170
+ jobId?: string,
171
+ userId?: string
172
+ ) {
173
+ this.jobType = jobType;
174
+ this.country = country;
175
+ this.idType = idType;
176
+ this.updateEnrolledImage = updateEnrolledImage;
177
+ this.jobId = jobId;
178
+ this.userId = userId;
179
+ }
180
+ }
181
+
182
+ /**
183
+ * [canAccess] Whether the ID type is enabled for the partner
184
+ * [consentRequired] Whether consent is required for the ID type
185
+ */
186
+ export class ConsentInfo {
187
+ canAccess: boolean;
188
+ consentRequired: boolean;
189
+
190
+ constructor(canAccess: boolean, consentRequired: boolean) {
191
+ this.canAccess = canAccess;
192
+ this.consentRequired = consentRequired;
193
+ }
194
+ }
195
+
196
+ export class AuthenticationResponse {
197
+ success: boolean;
198
+ signature: string;
199
+ timestamp: string;
200
+ partnerParams: PartnerParams;
201
+ callbackUrl?: string;
202
+ consentInfo?: ConsentInfo;
203
+
204
+ constructor(
205
+ success: boolean,
206
+ signature: string,
207
+ timestamp: string,
208
+ partnerParams: PartnerParams,
209
+ callbackUrl?: string,
210
+ consentInfo?: ConsentInfo
211
+ ) {
212
+ this.success = success;
213
+ this.signature = signature;
214
+ this.timestamp = timestamp;
215
+ this.partnerParams = partnerParams;
216
+ this.callbackUrl = callbackUrl;
217
+ this.consentInfo = consentInfo;
218
+ }
219
+ }
220
+
221
+ export class PrepUploadRequest {
222
+ partnerParams: PartnerParams;
223
+ callbackUrl?: string;
224
+ partnerId: string;
225
+ timestamp: string;
226
+ signature: string;
227
+
228
+ constructor(
229
+ partnerParams: PartnerParams,
230
+ partnerId: string,
231
+ timestamp: string,
232
+ signature: string,
233
+ callbackUrl?: string
234
+ ) {
235
+ this.partnerParams = partnerParams;
236
+ this.partnerId = partnerId;
237
+ this.timestamp = timestamp;
238
+ this.signature = signature;
239
+ this.callbackUrl = callbackUrl;
240
+ }
241
+ }
242
+
243
+ export class PrepUploadResponse {
244
+ code: string;
245
+ refId: string;
246
+ uploadUrl: string;
247
+ smileJobId: string;
248
+
249
+ constructor(
250
+ code: string,
251
+ refId: string,
252
+ uploadUrl: string,
253
+ smileJobId: string
254
+ ) {
255
+ this.code = code;
256
+ this.refId = refId;
257
+ this.uploadUrl = uploadUrl;
258
+ this.smileJobId = smileJobId;
259
+ }
260
+ }
261
+
262
+ export class IdInfo {
263
+ country: string;
264
+ idType?: string;
265
+ idNumber?: string;
266
+ firstName?: string;
267
+ middleName?: string;
268
+ lastName?: string;
269
+ dob?: string;
270
+ bankCode?: string;
271
+ entered?: boolean;
272
+
273
+ constructor(
274
+ country: string,
275
+ idType?: string,
276
+ idNumber?: string,
277
+ firstName?: string,
278
+ middleName?: string,
279
+ lastName?: string,
280
+ dob?: string,
281
+ bankCode?: string,
282
+ entered?: boolean
283
+ ) {
284
+ this.country = country;
285
+ this.idType = idType;
286
+ this.idNumber = idNumber;
287
+ this.firstName = firstName;
288
+ this.middleName = middleName;
289
+ this.lastName = lastName;
290
+ this.dob = dob;
291
+ this.bankCode = bankCode;
292
+ this.entered = entered;
293
+ }
294
+ }
295
+
296
+ // noinspection JSUnusedGlobalSymbols
297
+ export enum ImageType {
298
+ SelfieJpgFile,
299
+ IdCardJpgFile,
300
+ SelfieJpgBase64,
301
+ IdCardJpgBase64,
302
+ LivenessJpgFile,
303
+ IdCardRearJpgFile,
304
+ LivenessJpgBase64,
305
+ IdCardRearJpgBase64,
306
+ }
307
+
308
+ export class UploadImageInfo {
309
+ imageTypeId: ImageType;
310
+ imageName: string;
311
+
312
+ constructor(imageTypeId: ImageType, imageName: string) {
313
+ this.imageTypeId = imageTypeId;
314
+ this.imageName = imageName;
315
+ }
316
+ }
317
+
318
+ export class UploadRequest {
319
+ images: UploadImageInfo[];
320
+ idInfo?: IdInfo;
321
+
322
+ constructor(images: UploadImageInfo[], idInfo?: IdInfo) {
323
+ this.images = images;
324
+ this.idInfo = idInfo;
325
+ }
326
+ }
327
+
328
+ // noinspection JSUnusedGlobalSymbols
329
+ export enum ActionResult {
330
+ Passed,
331
+ Completed,
332
+ Approved,
333
+ Verified,
334
+ ProvisionallyApproved,
335
+ Returned,
336
+ NotReturned,
337
+ Failed,
338
+ Rejected,
339
+ UnderReview,
340
+ UnableToDetermine,
341
+ NotApplicable,
342
+ NotVerified,
343
+ NotDone,
344
+ IssuerUnavailable,
345
+ Unknown, // Placeholder for unsupported values
346
+ }
347
+
348
+ export class Actions {
349
+ documentCheck: ActionResult;
350
+ humanReviewCompare: ActionResult;
351
+ humanReviewDocumentCheck: ActionResult;
352
+ humanReviewLivenessCheck: ActionResult;
353
+ humanReviewSelfieCheck: ActionResult;
354
+ humanReviewUpdateSelfie: ActionResult;
355
+ livenessCheck: ActionResult;
356
+ registerSelfie: ActionResult;
357
+ returnPersonalInfo: ActionResult;
358
+ selfieCheck: ActionResult;
359
+ selfieProvided: ActionResult;
360
+ selfieToIdAuthorityCompare: ActionResult;
361
+ selfieToIdCardCompare: ActionResult;
362
+ selfieToRegisteredSelfieCompare: ActionResult;
363
+ updateRegisteredSelfieOnFile: ActionResult;
364
+ verifyDocument: ActionResult;
365
+ verifyIdNumber: ActionResult;
366
+
367
+ constructor(
368
+ documentCheck: ActionResult = ActionResult.NotApplicable,
369
+ humanReviewCompare: ActionResult = ActionResult.NotApplicable,
370
+ humanReviewDocumentCheck: ActionResult = ActionResult.NotApplicable,
371
+ humanReviewLivenessCheck: ActionResult = ActionResult.NotApplicable,
372
+ humanReviewSelfieCheck: ActionResult = ActionResult.NotApplicable,
373
+ humanReviewUpdateSelfie: ActionResult = ActionResult.NotApplicable,
374
+ livenessCheck: ActionResult = ActionResult.NotApplicable,
375
+ registerSelfie: ActionResult = ActionResult.NotApplicable,
376
+ returnPersonalInfo: ActionResult = ActionResult.NotApplicable,
377
+ selfieCheck: ActionResult = ActionResult.NotApplicable,
378
+ selfieProvided: ActionResult = ActionResult.NotApplicable,
379
+ selfieToIdAuthorityCompare: ActionResult = ActionResult.NotApplicable,
380
+ selfieToIdCardCompare: ActionResult = ActionResult.NotApplicable,
381
+ selfieToRegisteredSelfieCompare: ActionResult = ActionResult.NotApplicable,
382
+ updateRegisteredSelfieOnFile: ActionResult = ActionResult.NotApplicable,
383
+ verifyDocument: ActionResult = ActionResult.NotApplicable,
384
+ verifyIdNumber: ActionResult = ActionResult.NotApplicable
385
+ ) {
386
+ this.documentCheck = documentCheck;
387
+ this.humanReviewCompare = humanReviewCompare;
388
+ this.humanReviewDocumentCheck = humanReviewDocumentCheck;
389
+ this.humanReviewLivenessCheck = humanReviewLivenessCheck;
390
+ this.humanReviewSelfieCheck = humanReviewSelfieCheck;
391
+ this.humanReviewUpdateSelfie = humanReviewUpdateSelfie;
392
+ this.livenessCheck = livenessCheck;
393
+ this.registerSelfie = registerSelfie;
394
+ this.returnPersonalInfo = returnPersonalInfo;
395
+ this.selfieCheck = selfieCheck;
396
+ this.selfieProvided = selfieProvided;
397
+ this.selfieToIdAuthorityCompare = selfieToIdAuthorityCompare;
398
+ this.selfieToIdCardCompare = selfieToIdCardCompare;
399
+ this.selfieToRegisteredSelfieCompare = selfieToRegisteredSelfieCompare;
400
+ this.updateRegisteredSelfieOnFile = updateRegisteredSelfieOnFile;
401
+ this.verifyDocument = verifyDocument;
402
+ this.verifyIdNumber = verifyIdNumber;
403
+ }
404
+ }
405
+
406
+ export class EnhancedKycResponse {
407
+ smileJobId: string;
408
+ partnerParams: PartnerParams;
409
+ resultText: string;
410
+ resultCode: string;
411
+ actions: Actions;
412
+ country: string;
413
+ idType: string;
414
+ idNumber: string;
415
+ fullName?: string;
416
+ expirationDate?: string;
417
+ dob?: string;
418
+ base64Photo?: string;
419
+
420
+ constructor(
421
+ smileJobId: string,
422
+ partnerParams: PartnerParams,
423
+ resultText: string,
424
+ resultCode: string,
425
+ actions: Actions,
426
+ country: string,
427
+ idType: string,
428
+ idNumber: string,
429
+ fullName?: string,
430
+ expirationDate?: string,
431
+ dob?: string,
432
+ base64Photo?: string
433
+ ) {
434
+ this.smileJobId = smileJobId;
435
+ this.partnerParams = partnerParams;
436
+ this.resultText = resultText;
437
+ this.resultCode = resultCode;
438
+ this.actions = actions;
439
+ this.country = country;
440
+ this.idType = idType;
441
+ this.idNumber = idNumber;
442
+ this.fullName = fullName;
443
+ this.expirationDate = expirationDate;
444
+ this.dob = dob;
445
+ this.base64Photo = base64Photo;
446
+ }
447
+ }
448
+
449
+ export class EnhancedKycRequest {
450
+ country: string;
451
+ idType: string;
452
+ idNumber: string;
453
+ firstName?: string;
454
+ middleName?: string;
455
+ lastName?: string;
456
+ dob?: string;
457
+ phoneNumber?: string;
458
+ bankCode?: string;
459
+ callbackUrl?: string;
460
+ partnerParams: PartnerParams;
461
+ timestamp: string;
462
+ signature: string;
463
+
464
+ constructor(
465
+ country: string,
466
+ idType: string,
467
+ idNumber: string,
468
+ partnerParams: PartnerParams,
469
+ timestamp: string,
470
+ signature: string,
471
+ firstName?: string,
472
+ middleName?: string,
473
+ lastName?: string,
474
+ dob?: string,
475
+ phoneNumber?: string,
476
+ bankCode?: string,
477
+ callbackUrl?: string
478
+ ) {
479
+ this.country = country;
480
+ this.idType = idType;
481
+ this.idNumber = idNumber;
482
+ this.firstName = firstName;
483
+ this.middleName = middleName;
484
+ this.lastName = lastName;
485
+ this.dob = dob;
486
+ this.phoneNumber = phoneNumber;
487
+ this.bankCode = bankCode;
488
+ this.callbackUrl = callbackUrl;
489
+ this.partnerParams = partnerParams;
490
+ this.timestamp = timestamp;
491
+ this.signature = signature;
492
+ }
493
+ }
494
+
495
+ export class EnhancedKycAsyncResponse {
496
+ success: boolean;
497
+
498
+ constructor(success: boolean) {
499
+ this.success = success;
500
+ }
501
+ }
502
+
503
+ export class ImageLinks {
504
+ selfieImageUrl?: string;
505
+ error?: string;
506
+
507
+ constructor(selfieImageUrl?: string, error?: string) {
508
+ this.selfieImageUrl = selfieImageUrl;
509
+ this.error = error;
510
+ }
511
+ }
512
+
513
+ export class SuspectUser {
514
+ reason: string;
515
+ userId: string;
516
+
517
+ constructor(reason: string, userId: string) {
518
+ this.reason = reason;
519
+ this.userId = userId;
520
+ }
521
+ }
522
+
523
+ export class Antifraud {
524
+ suspectUsers: SuspectUser[];
525
+
526
+ constructor(suspectUsers: SuspectUser[]) {
527
+ this.suspectUsers = suspectUsers;
528
+ }
529
+ }
530
+
531
+ export class JobStatusRequest {
532
+ userId: string;
533
+ jobId: string;
534
+ includeImageLinks: boolean;
535
+ includeHistory: boolean;
536
+ partnerId: string;
537
+ timestamp: string;
538
+ signature: string;
539
+
540
+ constructor(
541
+ userId: string,
542
+ jobId: string,
543
+ includeImageLinks: boolean,
544
+ includeHistory: boolean,
545
+ partnerId: string,
546
+ timestamp: string,
547
+ signature: string
548
+ ) {
549
+ this.userId = userId;
550
+ this.jobId = jobId;
551
+ this.includeImageLinks = includeImageLinks;
552
+ this.includeHistory = includeHistory;
553
+ this.partnerId = partnerId;
554
+ this.timestamp = timestamp;
555
+ this.signature = signature;
556
+ }
557
+ }
558
+
559
+ export class SmartSelfieJobResult {
560
+ actions: Actions;
561
+ resultCode: string;
562
+ resultText: string;
563
+ smileJobId: string;
564
+ partnerParams: PartnerParams;
565
+ confidence?: number;
566
+
567
+ constructor(
568
+ actions: Actions,
569
+ resultCode: string,
570
+ resultText: string,
571
+ smileJobId: string,
572
+ partnerParams: PartnerParams,
573
+ confidence?: number
574
+ ) {
575
+ this.actions = actions;
576
+ this.resultCode = resultCode;
577
+ this.resultText = resultText;
578
+ this.smileJobId = smileJobId;
579
+ this.partnerParams = partnerParams;
580
+ this.confidence = confidence;
581
+ }
582
+ }
583
+
584
+ export class SmartSelfieJobStatusResponse {
585
+ timestamp: string;
586
+ jobComplete: boolean;
587
+ jobSuccess: boolean;
588
+ code: string;
589
+ result?: SmartSelfieJobResult;
590
+ resultString?: string;
591
+ history?: SmartSelfieJobResult[];
592
+ imageLinks?: ImageLinks;
593
+
594
+ constructor(
595
+ timestamp: string,
596
+ jobComplete: boolean,
597
+ jobSuccess: boolean,
598
+ code: string,
599
+ result?: SmartSelfieJobResult,
600
+ resultString?: string,
601
+ history?: SmartSelfieJobResult[],
602
+ imageLinks?: ImageLinks
603
+ ) {
604
+ this.timestamp = timestamp;
605
+ this.jobComplete = jobComplete;
606
+ this.jobSuccess = jobSuccess;
607
+ this.code = code;
608
+ this.result = result;
609
+ this.resultString = resultString;
610
+ this.history = history;
611
+ this.imageLinks = imageLinks;
612
+ }
613
+ }
614
+
615
+ export class DocumentVerificationJobResult {
616
+ actions: Actions;
617
+ resultCode: string;
618
+ resultText: string;
619
+ smileJobId: string;
620
+ partnerParams: PartnerParams;
621
+ country?: string;
622
+ idType?: string;
623
+ idNumber?: string;
624
+ fullName?: string;
625
+ dob?: string;
626
+ gender?: string;
627
+ expirationDate?: string;
628
+ documentImageBase64?: string;
629
+ phoneNumber?: string;
630
+ phoneNumber2?: string;
631
+ address?: string;
632
+
633
+ constructor(
634
+ actions: Actions,
635
+ resultCode: string,
636
+ resultText: string,
637
+ smileJobId: string,
638
+ partnerParams: PartnerParams,
639
+ country?: string,
640
+ idType?: string,
641
+ idNumber?: string,
642
+ fullName?: string,
643
+ dob?: string,
644
+ gender?: string,
645
+ expirationDate?: string,
646
+ documentImageBase64?: string,
647
+ phoneNumber?: string,
648
+ phoneNumber2?: string,
649
+ address?: string
650
+ ) {
651
+ this.actions = actions;
652
+ this.resultCode = resultCode;
653
+ this.resultText = resultText;
654
+ this.smileJobId = smileJobId;
655
+ this.partnerParams = partnerParams;
656
+ this.country = country;
657
+ this.idType = idType;
658
+ this.idNumber = idNumber;
659
+ this.fullName = fullName;
660
+ this.dob = dob;
661
+ this.gender = gender;
662
+ this.expirationDate = expirationDate;
663
+ this.documentImageBase64 = documentImageBase64;
664
+ this.phoneNumber = phoneNumber;
665
+ this.phoneNumber2 = phoneNumber2;
666
+ this.address = address;
667
+ }
668
+ }
669
+
670
+ export class DocumentVerificationJobStatusResponse {
671
+ timestamp: string;
672
+ jobComplete: boolean;
673
+ jobSuccess: boolean;
674
+ code: string;
675
+ result?: DocumentVerificationJobResult;
676
+ resultString?: string;
677
+ history?: DocumentVerificationJobResult[];
678
+ imageLinks?: ImageLinks;
679
+
680
+ constructor(
681
+ timestamp: string,
682
+ jobComplete: boolean,
683
+ jobSuccess: boolean,
684
+ code: string,
685
+ result?: DocumentVerificationJobResult,
686
+ resultString?: string,
687
+ history?: DocumentVerificationJobResult[],
688
+ imageLinks?: ImageLinks
689
+ ) {
690
+ this.timestamp = timestamp;
691
+ this.jobComplete = jobComplete;
692
+ this.jobSuccess = jobSuccess;
693
+ this.code = code;
694
+ this.result = result;
695
+ this.resultString = resultString;
696
+ this.history = history;
697
+ this.imageLinks = imageLinks;
698
+ }
699
+ }
700
+
701
+ export class BiometricKycJobResult {
702
+ actions: Actions;
703
+ resultCode: string;
704
+ resultText: string;
705
+ resultType: string;
706
+ smileJobId: string;
707
+ partnerParams: PartnerParams;
708
+ antifraud?: Antifraud;
709
+ dob?: string;
710
+ photoBase64?: string;
711
+ gender?: string;
712
+ idType?: string;
713
+ address?: string;
714
+ country?: string;
715
+ documentImageBase64?: string;
716
+ fullData?: Map<string, string>;
717
+ fullName?: string;
718
+ idNumber?: string;
719
+ phoneNumber?: string;
720
+ phoneNumber2?: string;
721
+ expirationDate?: string;
722
+ secondaryIdNumber?: string;
723
+ idNumberPreviouslyRegistered?: boolean;
724
+ previousRegistrantsUserIds?: string[];
725
+
726
+ constructor(
727
+ actions: Actions,
728
+ resultCode: string,
729
+ resultText: string,
730
+ resultType: string,
731
+ smileJobId: string,
732
+ partnerParams: PartnerParams,
733
+ antifraud?: Antifraud,
734
+ dob?: string,
735
+ photoBase64?: string,
736
+ gender?: string,
737
+ idType?: string,
738
+ address?: string,
739
+ country?: string,
740
+ documentImageBase64?: string,
741
+ fullData?: Map<string, string>,
742
+ fullName?: string,
743
+ idNumber?: string,
744
+ phoneNumber?: string,
745
+ phoneNumber2?: string,
746
+ expirationDate?: string,
747
+ secondaryIdNumber?: string,
748
+ idNumberPreviouslyRegistered?: boolean,
749
+ previousRegistrantsUserIds?: string[]
750
+ ) {
751
+ this.actions = actions;
752
+ this.resultCode = resultCode;
753
+ this.resultText = resultText;
754
+ this.resultType = resultType;
755
+ this.smileJobId = smileJobId;
756
+ this.partnerParams = partnerParams;
757
+ this.antifraud = antifraud;
758
+ this.dob = dob;
759
+ this.photoBase64 = photoBase64;
760
+ this.gender = gender;
761
+ this.idType = idType;
762
+ this.address = address;
763
+ this.country = country;
764
+ this.documentImageBase64 = documentImageBase64;
765
+ this.fullData = fullData;
766
+ this.fullName = fullName;
767
+ this.idNumber = idNumber;
768
+ this.phoneNumber = phoneNumber;
769
+ this.phoneNumber2 = phoneNumber2;
770
+ this.expirationDate = expirationDate;
771
+ this.secondaryIdNumber = secondaryIdNumber;
772
+ this.idNumberPreviouslyRegistered = idNumberPreviouslyRegistered;
773
+ this.previousRegistrantsUserIds = previousRegistrantsUserIds;
774
+ }
775
+ }
776
+
777
+ export class BiometricKycJobStatusResponse {
778
+ timestamp: string;
779
+ jobComplete: boolean;
780
+ jobSuccess: boolean;
781
+ code: string;
782
+ result?: BiometricKycJobResult;
783
+ resultString?: string;
784
+ history?: BiometricKycJobResult[];
785
+ imageLinks?: ImageLinks;
786
+
787
+ constructor(
788
+ timestamp: string,
789
+ jobComplete: boolean,
790
+ jobSuccess: boolean,
791
+ code: string,
792
+ result?: BiometricKycJobResult,
793
+ resultString?: string,
794
+ history?: BiometricKycJobResult[],
795
+ imageLinks?: ImageLinks
796
+ ) {
797
+ this.timestamp = timestamp;
798
+ this.jobComplete = jobComplete;
799
+ this.jobSuccess = jobSuccess;
800
+ this.code = code;
801
+ this.result = result;
802
+ this.resultString = resultString;
803
+ this.history = history;
804
+ this.imageLinks = imageLinks;
805
+ }
806
+ }
807
+
808
+ export class EnhancedDocumentVerificationJobResult {
809
+ actions: Actions;
810
+ resultCode: string;
811
+ resultText: string;
812
+ resultType: string;
813
+ smileJobId: string;
814
+ partnerParams: PartnerParams;
815
+ antifraud?: Antifraud;
816
+ dob?: string;
817
+ photoBase64?: string;
818
+ gender?: string;
819
+ idType?: string;
820
+ address?: string;
821
+ country?: string;
822
+ documentImageBase64?: string;
823
+ fullData?: Map<string, string>;
824
+ fullName?: string;
825
+ idNumber?: string;
826
+ phoneNumber?: string;
827
+ phoneNumber2?: string;
828
+ expirationDate?: string;
829
+ secondaryIdNumber?: string;
830
+ idNumberPreviouslyRegistered?: boolean;
831
+ previousRegistrantsUserIds?: string[];
832
+
833
+ constructor(
834
+ actions: Actions,
835
+ resultCode: string,
836
+ resultText: string,
837
+ resultType: string,
838
+ smileJobId: string,
839
+ partnerParams: PartnerParams,
840
+ antifraud?: Antifraud,
841
+ dob?: string,
842
+ photoBase64?: string,
843
+ gender?: string,
844
+ idType?: string,
845
+ address?: string,
846
+ country?: string,
847
+ documentImageBase64?: string,
848
+ fullData?: Map<string, string>,
849
+ fullName?: string,
850
+ idNumber?: string,
851
+ phoneNumber?: string,
852
+ phoneNumber2?: string,
853
+ expirationDate?: string,
854
+ secondaryIdNumber?: string,
855
+ idNumberPreviouslyRegistered?: boolean,
856
+ previousRegistrantsUserIds?: string[]
857
+ ) {
858
+ this.actions = actions;
859
+ this.resultCode = resultCode;
860
+ this.resultText = resultText;
861
+ this.resultType = resultType;
862
+ this.smileJobId = smileJobId;
863
+ this.partnerParams = partnerParams;
864
+ this.antifraud = antifraud;
865
+ this.dob = dob;
866
+ this.photoBase64 = photoBase64;
867
+ this.gender = gender;
868
+ this.idType = idType;
869
+ this.address = address;
870
+ this.country = country;
871
+ this.documentImageBase64 = documentImageBase64;
872
+ this.fullData = fullData;
873
+ this.fullName = fullName;
874
+ this.idNumber = idNumber;
875
+ this.phoneNumber = phoneNumber;
876
+ this.phoneNumber2 = phoneNumber2;
877
+ this.expirationDate = expirationDate;
878
+ this.secondaryIdNumber = secondaryIdNumber;
879
+ this.idNumberPreviouslyRegistered = idNumberPreviouslyRegistered;
880
+ this.previousRegistrantsUserIds = previousRegistrantsUserIds;
881
+ }
882
+ }
883
+
884
+ export class EnhancedDocumentVerificationJobStatusResponse {
885
+ timestamp: string;
886
+ jobComplete: boolean;
887
+ jobSuccess: boolean;
888
+ code: string;
889
+ result?: EnhancedDocumentVerificationJobResult;
890
+ resultString?: string;
891
+ history?: EnhancedDocumentVerificationJobResult[];
892
+ imageLinks?: ImageLinks;
893
+
894
+ constructor(
895
+ timestamp: string,
896
+ jobComplete: boolean,
897
+ jobSuccess: boolean,
898
+ code: string,
899
+ result?: EnhancedDocumentVerificationJobResult,
900
+ resultString?: string,
901
+ history?: EnhancedDocumentVerificationJobResult[],
902
+ imageLinks?: ImageLinks
903
+ ) {
904
+ this.timestamp = timestamp;
905
+ this.jobComplete = jobComplete;
906
+ this.jobSuccess = jobSuccess;
907
+ this.code = code;
908
+ this.result = result;
909
+ this.resultString = resultString;
910
+ this.history = history;
911
+ this.imageLinks = imageLinks;
912
+ }
913
+ }
914
+
915
+ export class ProductsConfigRequest {
916
+ partnerId: string;
917
+ timestamp: string;
918
+ signature: string;
919
+
920
+ constructor(partnerId: string, timestamp: string, signature: string) {
921
+ this.partnerId = partnerId;
922
+ this.timestamp = timestamp;
923
+ this.signature = signature;
924
+ }
925
+ }
926
+
927
+ export class IdSelection {
928
+ basicKyc: Map<string, string[]>;
929
+ biometricKyc: Map<string, string[]>;
930
+ enhancedKyc: Map<string, string[]>;
931
+ documentVerification: Map<string, string[]>;
932
+
933
+ constructor(
934
+ basicKyc: Map<string, string[]>,
935
+ biometricKyc: Map<string, string[]>,
936
+ enhancedKyc: Map<string, string[]>,
937
+ documentVerification: Map<string, string[]>
938
+ ) {
939
+ this.basicKyc = basicKyc;
940
+ this.biometricKyc = biometricKyc;
941
+ this.enhancedKyc = enhancedKyc;
942
+ this.documentVerification = documentVerification;
943
+ }
944
+ }
945
+
946
+ export class ProductsConfigResponse {
947
+ consentRequired: Map<string, string[]>;
948
+ idSelection: IdSelection;
949
+
950
+ constructor(
951
+ consentRequired: Map<string, string[]>,
952
+ idSelection: IdSelection
953
+ ) {
954
+ this.consentRequired = consentRequired;
955
+ this.idSelection = idSelection;
956
+ }
957
+ }
958
+
959
+ export class Country {
960
+ code: string;
961
+ continent: string;
962
+ name: string;
963
+
964
+ constructor(code: string, continent: string, name: string) {
965
+ this.code = code;
966
+ this.continent = continent;
967
+ this.name = name;
968
+ }
969
+ }
970
+
971
+ export class IdType {
972
+ code: string;
973
+ example: string[];
974
+ hasBack: boolean;
975
+ name: string;
976
+
977
+ constructor(code: string, example: string[], hasBack: boolean, name: string) {
978
+ this.code = code;
979
+ this.example = example;
980
+ this.hasBack = hasBack;
981
+ this.name = name;
982
+ }
983
+ }
984
+
985
+ export class ValidDocument {
986
+ country: Country;
987
+ idTypes: IdType[];
988
+
989
+ constructor(country: Country, idTypes: IdType[]) {
990
+ this.country = country;
991
+ this.idTypes = idTypes;
992
+ }
993
+ }
994
+
995
+ export class ValidDocumentsResponse {
996
+ validDocuments: ValidDocument[];
997
+
998
+ constructor(validDocuments: ValidDocument[]) {
999
+ this.validDocuments = validDocuments;
1000
+ }
1001
+ }
1002
+
1003
+ export class BankCode {
1004
+ name: string;
1005
+ code: string;
1006
+
1007
+ constructor(name: string, code: string) {
1008
+ this.name = name;
1009
+ this.code = code;
1010
+ }
1011
+ }
1012
+
1013
+ export class AvailableIdType {
1014
+ idTypeKey: string;
1015
+ label: string;
1016
+ requiredFields: string[];
1017
+ testData?: string;
1018
+ idNumberRegex?: string;
1019
+
1020
+ constructor(
1021
+ idTypeKey: string,
1022
+ label: string,
1023
+ requiredFields: string[],
1024
+ testData?: string,
1025
+ idNumberRegex?: string
1026
+ ) {
1027
+ this.idTypeKey = idTypeKey;
1028
+ this.label = label;
1029
+ this.requiredFields = requiredFields;
1030
+ this.testData = testData;
1031
+ this.idNumberRegex = idNumberRegex;
1032
+ }
1033
+ }
1034
+
1035
+ export class CountryInfo {
1036
+ countryCode: string;
1037
+ name: string;
1038
+ availableIdTypes: AvailableIdType[];
1039
+
1040
+ constructor(
1041
+ countryCode: string,
1042
+ name: string,
1043
+ availableIdTypes: AvailableIdType[]
1044
+ ) {
1045
+ this.countryCode = countryCode;
1046
+ this.name = name;
1047
+ this.availableIdTypes = availableIdTypes;
1048
+ }
1049
+ }
1050
+
1051
+ export class HostedWeb {
1052
+ basicKyc: Map<string, CountryInfo>;
1053
+ biometricKyc: Map<string, CountryInfo>;
1054
+ enhancedKyc: Map<string, CountryInfo>;
1055
+ documentVerification: Map<string, CountryInfo>;
1056
+ enhancedKycSmartSelfie: Map<string, CountryInfo>;
1057
+ enhancedDocumentVerification: Map<string, CountryInfo>;
1058
+
1059
+ constructor(
1060
+ basicKyc: Map<string, CountryInfo>,
1061
+ biometricKyc: Map<string, CountryInfo>,
1062
+ enhancedKyc: Map<string, CountryInfo>,
1063
+ documentVerification: Map<string, CountryInfo>,
1064
+ enhancedKycSmartSelfie: Map<string, CountryInfo>,
1065
+ enhancedDocumentVerification: Map<string, CountryInfo>
1066
+ ) {
1067
+ this.basicKyc = basicKyc;
1068
+ this.biometricKyc = biometricKyc;
1069
+ this.enhancedKyc = enhancedKyc;
1070
+ this.documentVerification = documentVerification;
1071
+ this.enhancedKycSmartSelfie = enhancedKycSmartSelfie;
1072
+ this.enhancedDocumentVerification = enhancedDocumentVerification;
1073
+ }
1074
+ }
1075
+
1076
+ export class ServicesResponse {
1077
+ bankCodes: BankCode[];
1078
+ hostedWeb: HostedWeb;
1079
+
1080
+ constructor(bankCodes: BankCode[], hostedWeb: HostedWeb) {
1081
+ this.bankCodes = bankCodes;
1082
+ this.hostedWeb = hostedWeb;
1083
+ }
1084
+ }