@smile_identity/react-native 11.0.2 → 11.1.0

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 (42) hide show
  1. package/android/build.gradle +0 -1
  2. package/android/gradle.properties +3 -3
  3. package/android/src/main/AndroidManifest.xml +7 -0
  4. package/android/src/main/java/com/smileidentity/react/Mapper.kt +15 -0
  5. package/android/src/main/java/com/smileidentity/react/SmileIdModule.kt +1 -1
  6. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDBiometricKYCViewManager.kt +0 -8
  7. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDDocumentCaptureViewManager.kt +4 -0
  8. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDDocumentVerificationViewManager.kt +4 -1
  9. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDEnhancedDocumentVerificationViewManager.kt +4 -9
  10. package/android/src/main/java/com/smileidentity/react/views/SmileIDBiometricKYCView.kt +1 -5
  11. package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentCaptureView.kt +8 -0
  12. package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentVerificationView.kt +7 -2
  13. package/android/src/main/java/com/smileidentity/react/views/SmileIDEnhancedDocumentVerificationView.kt +9 -9
  14. package/ios/Utils/SmileIDUtils.swift +16 -0
  15. package/ios/View/SmileIDBiometricKYCView.swift +4 -5
  16. package/ios/View/SmileIDDocumentCaptureView.swift +2 -1
  17. package/ios/View/SmileIDDocumentVerificationView.swift +6 -6
  18. package/ios/View/SmileIDEnhancedDocumentVerificationView.swift +6 -6
  19. package/ios/View/SmileIDSmartSelfieAuthEnhancedView.swift +5 -6
  20. package/ios/View/SmileIDSmartSelfieAuthView.swift +3 -4
  21. package/ios/View/SmileIDSmartSelfieCaptureView.swift +3 -4
  22. package/ios/View/SmileIDSmartSelfieEnrollmentEnhancedView.swift +3 -4
  23. package/ios/View/SmileIDSmartSelfieEnrollmentView.swift +3 -4
  24. package/ios/ViewManagers/SmileIDBiometricKYCViewManager.swift +1 -8
  25. package/ios/ViewManagers/SmileIDDocumentCaptureViewManager.swift +8 -0
  26. package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.swift +7 -1
  27. package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.swift +8 -9
  28. package/ios/ViewModels/SmileIDProductModel.swift +3 -9
  29. package/lib/commonjs/types.js +11 -18
  30. package/lib/commonjs/types.js.map +1 -1
  31. package/lib/module/types.js +10 -15
  32. package/lib/module/types.js.map +1 -1
  33. package/lib/typescript/types.d.ts +14 -15
  34. package/lib/typescript/types.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/react-native-smile-id.podspec +1 -1
  37. package/src/types.ts +14 -26
  38. package/ios/SmileId.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  39. package/ios/SmileId.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  40. package/ios/SmileId.xcodeproj/project.xcworkspace/xcuserdata/jumaallan.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  41. package/ios/SmileId.xcodeproj/xcuserdata/jumaallan.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  42. package/ios/Utils/FileUtils.swift +0 -24
package/src/types.ts CHANGED
@@ -61,7 +61,7 @@ type SmartSelfieRequest = SmileIDViewProps & {
61
61
  */
62
62
  showAttribution?: boolean;
63
63
  /**
64
- * Whether to allow the user to reentoll
64
+ * Whether to allow the user to reenroll
65
65
  */
66
66
  allowNewEnroll?: boolean;
67
67
 
@@ -105,10 +105,15 @@ export type DocumentVerificationRequest = SmartSelfieRequest & {
105
105
  * supplied, image analysis is done to calculate the document's aspect ratio.
106
106
  */
107
107
  idAspectRatio?: number;
108
+ /**
109
+ * Change the default document auto capture timeout on the sdk. Pass the
110
+ * value is seconds e.g. 10 for 10 seconds. The default value is 10 seconds.
111
+ */
112
+ autoCaptureTimeout?: number;
108
113
  /**
109
114
  * Enable or disable document auto capture
110
115
  */
111
- enableAutoCapture?: boolean;
116
+ autoCapture?: AutoCapture;
112
117
  /**
113
118
  * Whether to capture both sides of the ID or not. Otherwise, only the
114
119
  * front side will be captured. If this is true, an option to skip back side will still be
@@ -662,24 +667,6 @@ export class ImageLinks {
662
667
  }
663
668
  }
664
669
 
665
- export class SuspectUser {
666
- reason: string;
667
- userId: string;
668
-
669
- constructor(reason: string, userId: string) {
670
- this.reason = reason;
671
- this.userId = userId;
672
- }
673
- }
674
-
675
- export class Antifraud {
676
- suspectUsers: SuspectUser[];
677
-
678
- constructor(suspectUsers: SuspectUser[]) {
679
- this.suspectUsers = suspectUsers;
680
- }
681
- }
682
-
683
670
  export class JobStatusRequest {
684
671
  userId: string;
685
672
  jobId: string;
@@ -859,7 +846,6 @@ export class BiometricKycJobResult {
859
846
  resultType: string;
860
847
  smileJobId: string;
861
848
  partnerParams: PartnerParams;
862
- antifraud?: Antifraud;
863
849
  dob?: string;
864
850
  photoBase64?: string;
865
851
  gender?: string;
@@ -884,7 +870,6 @@ export class BiometricKycJobResult {
884
870
  resultType: string,
885
871
  smileJobId: string,
886
872
  partnerParams: PartnerParams,
887
- antifraud?: Antifraud,
888
873
  dob?: string,
889
874
  photoBase64?: string,
890
875
  gender?: string,
@@ -908,7 +893,6 @@ export class BiometricKycJobResult {
908
893
  this.resultType = resultType;
909
894
  this.smileJobId = smileJobId;
910
895
  this.partnerParams = partnerParams;
911
- this.antifraud = antifraud;
912
896
  this.dob = dob;
913
897
  this.photoBase64 = photoBase64;
914
898
  this.gender = gender;
@@ -966,7 +950,6 @@ export class EnhancedDocumentVerificationJobResult {
966
950
  resultType: string;
967
951
  smileJobId: string;
968
952
  partnerParams: PartnerParams;
969
- antifraud?: Antifraud;
970
953
  dob?: string;
971
954
  photoBase64?: string;
972
955
  gender?: string;
@@ -991,7 +974,6 @@ export class EnhancedDocumentVerificationJobResult {
991
974
  resultType: string,
992
975
  smileJobId: string,
993
976
  partnerParams: PartnerParams,
994
- antifraud?: Antifraud,
995
977
  dob?: string,
996
978
  photoBase64?: string,
997
979
  gender?: string,
@@ -1015,7 +997,6 @@ export class EnhancedDocumentVerificationJobResult {
1015
997
  this.resultType = resultType;
1016
998
  this.smileJobId = smileJobId;
1017
999
  this.partnerParams = partnerParams;
1018
- this.antifraud = antifraud;
1019
1000
  this.dob = dob;
1020
1001
  this.photoBase64 = photoBase64;
1021
1002
  this.gender = gender;
@@ -1236,3 +1217,10 @@ export class ServicesResponse {
1236
1217
  this.hostedWeb = hostedWeb;
1237
1218
  }
1238
1219
  }
1220
+
1221
+ // noinspection JSUnusedGlobalSymbols
1222
+ export enum AutoCapture {
1223
+ AutoCapture = 'AutoCapture',
1224
+ AutoCaptureOnly = 'AutoCaptureOnly',
1225
+ ManualCaptureOnly = 'ManualCaptureOnly',
1226
+ }
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "self:">
6
- </FileRef>
7
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>SmileId.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>
@@ -1,24 +0,0 @@
1
- protocol SmileIDFileUtilsProtocol {
2
- var fileManager: FileManager { get set }
3
- func getFilePath(fileName: String) -> String?
4
- }
5
-
6
- extension SmileIDFileUtilsProtocol {
7
- func getSmileIDDirectory() -> String? {
8
- guard let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first else {
9
- print("Unable to access documents directory")
10
- return nil
11
- }
12
-
13
- let smileIDDirectory = documentsDirectory.appendingPathComponent("SmileID")
14
- return smileIDDirectory.absoluteURL.absoluteString
15
- }
16
-
17
- func getFilePath(fileName: String) -> String? {
18
- guard let smileIDDirectory = getSmileIDDirectory() else {
19
- return nil
20
- }
21
-
22
- return (smileIDDirectory as NSString).appendingPathComponent(fileName)
23
- }
24
- }