@smile_identity/react-native 10.2.4 → 10.2.5

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 (54) hide show
  1. package/android/build.gradle +2 -1
  2. package/android/gradle.properties +1 -1
  3. package/android/src/main/java/com/smileidentity/react/Mapper.kt +1 -1
  4. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDBiometricKYCViewManager.kt +1 -0
  5. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDDocumentVerificationViewManager.kt +1 -0
  6. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDEnhancedDocumentVerificationViewManager.kt +1 -0
  7. package/android/src/main/java/com/smileidentity/react/views/SmileIDBiometricKYCView.kt +2 -0
  8. package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentVerificationView.kt +2 -0
  9. package/android/src/main/java/com/smileidentity/react/views/SmileIDEnhancedDocumentVerificationView.kt +2 -0
  10. package/ios/RNSmileID.swift +12 -0
  11. package/ios/Utils/SmileIDDictExt.swift +15 -0
  12. package/ios/Utils/SmileIDUtils.swift +9 -0
  13. package/ios/View/SmileIDBiometricKYCView.swift +5 -3
  14. package/ios/View/SmileIDConsentView.swift +1 -1
  15. package/ios/View/SmileIDDocumentCaptureView.swift +2 -2
  16. package/ios/View/SmileIDDocumentVerificationView.swift +2 -1
  17. package/ios/View/SmileIDEnhancedDocumentVerificationView.swift +4 -2
  18. package/ios/View/SmileIDSmartSelfieAuthEnhancedView.swift +1 -1
  19. package/ios/View/SmileIDSmartSelfieAuthView.swift +1 -1
  20. package/ios/View/SmileIDSmartSelfieCaptureView.swift +1 -1
  21. package/ios/View/SmileIDSmartSelfieEnrollmentEnhancedView.swift +1 -1
  22. package/ios/View/SmileIDSmartSelfieEnrollmentView.swift +1 -1
  23. package/ios/ViewManagers/SmileIDBaseViewManager.swift +1 -1
  24. package/ios/ViewManagers/SmileIDBiometricKYCViewManager.swift +6 -0
  25. package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.swift +1 -0
  26. package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.swift +7 -0
  27. package/ios/ViewModels/SmileIDProductModel.swift +2 -0
  28. package/lib/commonjs/SmileIDBiometricKYCView.js +2 -11
  29. package/lib/commonjs/SmileIDBiometricKYCView.js.map +1 -1
  30. package/lib/commonjs/SmileIDEnhancedDocumentVerificationView.js +2 -11
  31. package/lib/commonjs/SmileIDEnhancedDocumentVerificationView.js.map +1 -1
  32. package/lib/commonjs/index.js.map +1 -1
  33. package/lib/commonjs/types.js +31 -1
  34. package/lib/commonjs/types.js.map +1 -1
  35. package/lib/module/SmileIDBiometricKYCView.js +2 -11
  36. package/lib/module/SmileIDBiometricKYCView.js.map +1 -1
  37. package/lib/module/SmileIDEnhancedDocumentVerificationView.js +2 -11
  38. package/lib/module/SmileIDEnhancedDocumentVerificationView.js.map +1 -1
  39. package/lib/module/index.js.map +1 -1
  40. package/lib/module/types.js +29 -0
  41. package/lib/module/types.js.map +1 -1
  42. package/lib/typescript/SmileIDBiometricKYCView.d.ts.map +1 -1
  43. package/lib/typescript/SmileIDEnhancedDocumentVerificationView.d.ts +2 -2
  44. package/lib/typescript/SmileIDEnhancedDocumentVerificationView.d.ts.map +1 -1
  45. package/lib/typescript/index.d.ts +2 -2
  46. package/lib/typescript/index.d.ts.map +1 -1
  47. package/lib/typescript/types.d.ts +17 -3
  48. package/lib/typescript/types.d.ts.map +1 -1
  49. package/package.json +1 -1
  50. package/react-native-smile-id.podspec +1 -1
  51. package/src/SmileIDBiometricKYCView.tsx +2 -9
  52. package/src/SmileIDEnhancedDocumentVerificationView.tsx +6 -16
  53. package/src/index.tsx +2 -0
  54. package/src/types.ts +62 -3
package/src/types.ts CHANGED
@@ -129,8 +129,22 @@ export type DocumentVerificationRequest = SmartSelfieRequest & {
129
129
  /*jobId The job ID to associate with the job. Most often, this will correspond to a unique
130
130
  Job ID within your own system. If not provided, a random job ID will be generated.*/
131
131
  jobId?: string;
132
+
133
+ /*
134
+ * Will use Enhanced SmartSelfie™ capture for the selfie capture
135
+ * if set to true, if false will use the default SmartSelfie™ capture
136
+ */
137
+ useStrictMode?: boolean;
132
138
  };
133
139
 
140
+ export type EnhancedDocumentVerificationRequest =
141
+ DocumentVerificationRequest & {
142
+ /**
143
+ * The country of issuance of the ID type to be captured.
144
+ */
145
+ consentInformation: ConsentInformation;
146
+ };
147
+
134
148
  export type ConsentRequest = Omit<SmartSelfieRequest, 'allowAgentMode'> & {
135
149
  /**
136
150
  * String value of the resource in the app's drawable folder to use as the partner icon.
@@ -151,10 +165,20 @@ export type ConsentRequest = Omit<SmartSelfieRequest, 'allowAgentMode'> & {
151
165
  productName: string;
152
166
  };
153
167
 
154
- export type BiometricKYCRequest = ConsentRequest & {
168
+ export type BiometricKYCRequest = SmartSelfieRequest & {
169
+ /*
170
+ * The user id information for KYC
171
+ */
155
172
  idInfo: IdInfo;
156
- productName: string;
157
- jobId: string;
173
+ /*
174
+ * The consent information for the partner
175
+ */
176
+ consentInformation: ConsentInformation;
177
+ /*
178
+ * Will use Enhanced SmartSelfie™ capture for the selfie capture
179
+ * if set to true, if false will use the default SmartSelfie™ capture
180
+ */
181
+ useStrictMode?: boolean;
158
182
  };
159
183
 
160
184
  // noinspection JSUnusedGlobalSymbols
@@ -314,6 +338,41 @@ export class PrepUploadResponse {
314
338
  }
315
339
  }
316
340
 
341
+ /*
342
+ * The consent information for the user
343
+ * required for Biometric KYC and Enhanced Document Verification
344
+ */
345
+ export class ConsentInformation {
346
+ /*
347
+ * The date the user granted consent
348
+ */
349
+ consentGrantedDate: string;
350
+ /*
351
+ * Whether the user has granted consent for personal details
352
+ */
353
+ personalDetailsConsentGranted: boolean;
354
+ /*
355
+ * Whether the user has granted consent for contact information
356
+ */
357
+ contactInfoConsentGranted: boolean;
358
+ /*
359
+ * Whether the user has granted consent for document information
360
+ */
361
+ documentInfoConsentGranted: boolean;
362
+
363
+ constructor(
364
+ consentGrantedDate: string,
365
+ personalDetailsConsentGranted: boolean,
366
+ contactInfoConsentGranted: boolean,
367
+ documentInfoConsentGranted: boolean
368
+ ) {
369
+ this.consentGrantedDate = consentGrantedDate;
370
+ this.personalDetailsConsentGranted = personalDetailsConsentGranted;
371
+ this.contactInfoConsentGranted = contactInfoConsentGranted;
372
+ this.documentInfoConsentGranted = documentInfoConsentGranted;
373
+ }
374
+ }
375
+
317
376
  export class IdInfo {
318
377
  country: string;
319
378
  idType?: string;