@smile_identity/react-native 10.0.0-beta02 → 10.0.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 (66) 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 +172 -0
  4. package/android/src/main/java/com/smileidentity/react/SmileIdModule.kt +64 -87
  5. package/android/src/main/java/com/smileidentity/react/utils/ReactUtils.kt +4 -39
  6. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDBiometricKYCViewManager.kt +11 -8
  7. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDConsentViewManager.kt +16 -10
  8. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDDocumentVerificationViewManager.kt +14 -12
  9. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDEnhancedDocumentVerificationViewManager.kt +13 -11
  10. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieAuthenticationViewManager.kt +7 -6
  11. package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieEnrollmentViewManager.kt +7 -6
  12. package/android/src/main/java/com/smileidentity/react/views/CustomViewModelStoreOwner.kt +12 -0
  13. package/android/src/main/java/com/smileidentity/react/views/SmileIDBiometricKYCView.kt +30 -22
  14. package/android/src/main/java/com/smileidentity/react/views/SmileIDConsentView.kt +19 -14
  15. package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentVerificationView.kt +34 -27
  16. package/android/src/main/java/com/smileidentity/react/views/SmileIDEnhancedDocumentVerificationView.kt +34 -26
  17. package/android/src/main/java/com/smileidentity/react/views/SmileIDSmartSelfieAuthenticationView.kt +28 -22
  18. package/android/src/main/java/com/smileidentity/react/views/SmileIDSmartSelfieEnrollmentView.kt +28 -22
  19. package/android/src/main/java/com/smileidentity/react/views/SmileIDView.kt +20 -7
  20. package/android/src/oldarch/SmileIdSpec.kt +23 -1
  21. package/ios/RNSmileID.mm +10 -0
  22. package/ios/RNSmileID.swift +137 -0
  23. package/ios/Utils/SmileIDDictExt.swift +145 -6
  24. package/ios/View/BaseSmileIDView.swift +26 -9
  25. package/ios/View/SmileIDBiometricKYCView.swift +6 -4
  26. package/ios/View/SmileIDConsentView.swift +15 -8
  27. package/ios/View/SmileIDDocumentVerificationView.swift +5 -3
  28. package/ios/View/SmileIDEnhancedDocumentVerificationView.swift +6 -4
  29. package/ios/View/SmileIDSmartSelfieAuthView.swift +6 -4
  30. package/ios/View/SmileIDSmartSelfieEnrollmentView.swift +6 -4
  31. package/ios/ViewManagers/SmileIDBaseViewManager.swift +14 -4
  32. package/ios/ViewManagers/SmileIDBiometricKYCViewManager.m +1 -0
  33. package/ios/ViewManagers/SmileIDBiometricKYCViewManager.swift +11 -10
  34. package/ios/ViewManagers/SmileIDConsentViewManager.m +1 -0
  35. package/ios/ViewManagers/SmileIDConsentViewManager.swift +9 -9
  36. package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.m +1 -0
  37. package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.swift +17 -16
  38. package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.m +1 -0
  39. package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.swift +16 -15
  40. package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationViewManager.m +1 -0
  41. package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationViewManager.swift +10 -9
  42. package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentViewManager.m +1 -0
  43. package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentViewManager.swift +10 -9
  44. package/ios/ViewModels/SmileIDProductModel.swift +2 -1
  45. package/lib/commonjs/NativeSmileId.js.map +1 -1
  46. package/lib/commonjs/index.js +144 -4
  47. package/lib/commonjs/index.js.map +1 -1
  48. package/lib/commonjs/types.js +511 -0
  49. package/lib/commonjs/types.js.map +1 -1
  50. package/lib/module/NativeSmileId.js.map +1 -1
  51. package/lib/module/index.js +45 -7
  52. package/lib/module/index.js.map +1 -1
  53. package/lib/module/types.js +471 -1
  54. package/lib/module/types.js.map +1 -1
  55. package/lib/typescript/NativeSmileId.d.ts +13 -9
  56. package/lib/typescript/NativeSmileId.d.ts.map +1 -1
  57. package/lib/typescript/index.d.ts +44 -6
  58. package/lib/typescript/index.d.ts.map +1 -1
  59. package/lib/typescript/types.d.ts +410 -88
  60. package/lib/typescript/types.d.ts.map +1 -1
  61. package/package.json +3 -3
  62. package/react-native-smile-id.podspec +1 -1
  63. package/src/NativeSmileId.ts +58 -11
  64. package/src/index.tsx +97 -7
  65. package/src/types.ts +985 -90
  66. package/android/src/main/assets/smile_config.json +0 -9
@@ -6,15 +6,15 @@ import SwiftUI
6
6
  @objc(SmileIDConsentViewManager)
7
7
  class SmileIDConsentViewManager: SmileIDBaseViewManager {
8
8
  override func getView() -> UIView {
9
- SmileIDConsentView()
9
+ BaseSmileIDView(frame: .zero, contentView: AnyView(SmileIDConsentView(product: self.product)),product:self.product)
10
10
  }
11
11
 
12
12
  @objc func setParams(_ node: NSNumber, params: NSDictionary) {
13
13
  /* UI Updates on the Main Thread:async ensures that the UI update is scheduled to run on the next cycle of the run loop, preventing any potential blocking of the UI if the update were to take a noticeable amount of time
14
14
  */
15
15
  DispatchQueue.main.async {
16
- if let component = self.bridge.uiManager.view(forReactTag: node) as? SmileIDConsentView {
17
- let onResult = params["onResult"] as? RCTDirectEventBlock
16
+ if let component = self.bridge.uiManager.view(forReactTag: node) as? BaseSmileIDView {
17
+ let onResult = params["onResult"] as? RCTBubblingEventBlock
18
18
  guard let partnerIcon = params["partnerIcon"] as? String else {
19
19
  onResult?(["error": SmileIDError.unknown("partnerIcon is required to run show consent screen")])
20
20
  return
@@ -35,12 +35,12 @@ class SmileIDConsentViewManager: SmileIDBaseViewManager {
35
35
  onResult?(["error": SmileIDError.unknown("partnerPrivacyPolicy must be a valid url")])
36
36
  return
37
37
  }
38
- component.product.partnerIcon = partnerIcon
39
- component.product.partnerName = partnerName
40
- component.product.productName = productName
41
- component.product.partnerPrivacyPolicy = partnerPrivacyPolicyUrl
42
- component.product.showAttribution = params["showAttribution"] as? Bool ?? true
43
- component.product.onResult = params["onResult"] as? RCTDirectEventBlock
38
+ self.product.onResult = onResult
39
+ self.product.partnerIcon = partnerIcon
40
+ self.product.partnerName = partnerName
41
+ self.product.productName = productName
42
+ self.product.partnerPrivacyPolicy = partnerPrivacyPolicyUrl
43
+ self.product.showAttribution = params["showAttribution"] as? Bool ?? true
44
44
  }
45
45
  }
46
46
  }
@@ -3,4 +3,5 @@
3
3
 
4
4
  @interface RCT_EXTERN_MODULE(SmileIDDocumentVerificationViewManager, RCTViewManager)
5
5
  RCT_EXTERN_METHOD(setParams:(nonnull NSNumber *)node params:(NSDictionary *)params)
6
+ RCT_EXPORT_VIEW_PROPERTY(onResult, RCTBubblingEventBlock);
6
7
  @end
@@ -6,14 +6,14 @@ import SwiftUI
6
6
  @objc(SmileIDDocumentVerificationViewManager)
7
7
  class SmileIDDocumentVerificationViewManager: SmileIDBaseViewManager {
8
8
  override func getView() -> UIView {
9
- SmileIDDocumentVerificationView()
9
+ BaseSmileIDView(frame: .zero, contentView: AnyView(SmileIDDocumentVerificationView(product: self.product)),product:self.product)
10
10
  }
11
11
 
12
12
  @objc func setParams(_ node: NSNumber, params: NSDictionary) {
13
13
  /* UI Updates on the Main Thread:async ensures that the UI update is scheduled to run on the next cycle of the run loop, preventing any potential blocking of the UI if the update were to take a noticeable amount of time
14
14
  */
15
15
  DispatchQueue.main.async {
16
- if let component = self.bridge.uiManager.view(forReactTag: node) as? SmileIDDocumentVerificationView {
16
+ if let component = self.bridge.uiManager.view(forReactTag: node) as? BaseSmileIDView {
17
17
  let onResult = params["onResult"] as? RCTDirectEventBlock
18
18
  guard let countryCode = params["countryCode"] as? String else {
19
19
  onResult?(["error": SmileIDError.unknown("countryCode is required to run Enhanced Document Verification")])
@@ -28,20 +28,21 @@ class SmileIDDocumentVerificationViewManager: SmileIDBaseViewManager {
28
28
  }
29
29
  bypassSelfieCaptureWithFilePath = URL(string: filePath)
30
30
  }
31
-
32
- component.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
33
- component.product.userId = params["userId"] as? String
34
- component.product.jobId = params["jobId"] as? String
35
- component.product.countryCode = countryCode
36
- component.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
37
- component.product.showAttribution = params["showAttribution"] as? Bool ?? true
38
- component.product.showInstructions = params["showInstructions"] as? Bool ?? true
39
- component.product.documentType = params["documentType"] as? String
40
- component.product.idAspectRatio = params["idAspectRatio"] as? Double
41
- component.product.bypassSelfieCaptureWithFilePath = bypassSelfieCaptureWithFilePath
42
- component.product.captureBothSides = params["captureBothSides"] as? Bool ?? true
43
- component.product.allowGalleryUpload = params["allowGalleryUpload"] as? Bool ?? false
44
- component.product.onResult = params["onResult"] as? RCTDirectEventBlock
31
+
32
+ self.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
33
+ self.product.userId = params["userId"] as? String
34
+ self.product.jobId = params["jobId"] as? String
35
+ self.product.countryCode = countryCode
36
+ self.product.allowNewEnroll = params["allowNewEnroll"] as? Bool ?? false
37
+ self.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
38
+ self.product.showAttribution = params["showAttribution"] as? Bool ?? true
39
+ self.product.showInstructions = params["showInstructions"] as? Bool ?? true
40
+ self.product.documentType = params["documentType"] as? String
41
+ self.product.idAspectRatio = params["idAspectRatio"] as? Double
42
+ self.product.bypassSelfieCaptureWithFilePath = bypassSelfieCaptureWithFilePath
43
+ self.product.captureBothSides = params["captureBothSides"] as? Bool ?? true
44
+ self.product.allowGalleryUpload = params["allowGalleryUpload"] as? Bool ?? false
45
+ self.product.onResult = params["onResult"] as? RCTDirectEventBlock
45
46
  }
46
47
  }
47
48
  }
@@ -3,4 +3,5 @@
3
3
 
4
4
  @interface RCT_EXTERN_MODULE(SmileIDEnhancedDocumentVerificationViewManager, RCTViewManager)
5
5
  RCT_EXTERN_METHOD(setParams:(nonnull NSNumber *)node params:(NSDictionary *)params)
6
+ RCT_EXPORT_VIEW_PROPERTY(onResult, RCTBubblingEventBlock);
6
7
  @end
@@ -6,14 +6,14 @@ import SwiftUI
6
6
  @objc(SmileIDEnhancedDocumentVerificationViewManager)
7
7
  class SmileIDEnhancedDocumentVerificationViewManager: SmileIDBaseViewManager {
8
8
  override func getView() -> UIView {
9
- SmileIDEnhancedDocumentVerificationView()
9
+ BaseSmileIDView(frame: .zero, contentView: AnyView(SmileIDEnhancedDocumentVerificationView(product: self.product)),product:self.product)
10
10
  }
11
11
 
12
12
  @objc func setParams(_ node: NSNumber, params: NSDictionary) {
13
13
  /* UI Updates on the Main Thread:async ensures that the UI update is scheduled to run on the next cycle of the run loop, preventing any potential blocking of the UI if the update were to take a noticeable amount of time
14
14
  */
15
15
  DispatchQueue.main.async {
16
- if let component = self.bridge.uiManager.view(forReactTag: node) as? SmileIDEnhancedDocumentVerificationView {
16
+ if let component = self.bridge.uiManager.view(forReactTag: node) as? BaseSmileIDView {
17
17
  let onResult = params["onResult"] as? RCTDirectEventBlock
18
18
  guard let countryCode = params["countryCode"] as? String else {
19
19
  onResult?(["error": SmileIDError.unknown("countryCode is required to run Enhanced Document Verification")])
@@ -29,19 +29,20 @@ class SmileIDEnhancedDocumentVerificationViewManager: SmileIDBaseViewManager {
29
29
  bypassSelfieCaptureWithFilePath = URL(string: filePath)
30
30
  }
31
31
 
32
- component.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
33
- component.product.userId = params["userId"] as? String
34
- component.product.jobId = params["jobId"] as? String
35
- component.product.countryCode = countryCode
36
- component.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
37
- component.product.showAttribution = params["showAttribution"] as? Bool ?? true
38
- component.product.showInstructions = params["showInstructions"] as? Bool ?? true
39
- component.product.documentType = params["documentType"] as? String
40
- component.product.idAspectRatio = params["idAspectRatio"] as? Double
41
- component.product.bypassSelfieCaptureWithFilePath = bypassSelfieCaptureWithFilePath
42
- component.product.captureBothSides = params["captureBothSides"] as? Bool ?? true
43
- component.product.allowGalleryUpload = params["allowGalleryUpload"] as? Bool ?? false
44
- component.product.onResult = params["onResult"] as? RCTDirectEventBlock
32
+ self.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
33
+ self.product.userId = params["userId"] as? String
34
+ self.product.jobId = params["jobId"] as? String
35
+ self.product.countryCode = countryCode
36
+ self.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
37
+ self.product.allowNewEnroll = params["allowNewEnroll"] as? Bool ?? false
38
+ self.product.showAttribution = params["showAttribution"] as? Bool ?? true
39
+ self.product.showInstructions = params["showInstructions"] as? Bool ?? true
40
+ self.product.documentType = params["documentType"] as? String
41
+ self.product.idAspectRatio = params["idAspectRatio"] as? Double
42
+ self.product.bypassSelfieCaptureWithFilePath = bypassSelfieCaptureWithFilePath
43
+ self.product.captureBothSides = params["captureBothSides"] as? Bool ?? true
44
+ self.product.allowGalleryUpload = params["allowGalleryUpload"] as? Bool ?? false
45
+ self.product.onResult = params["onResult"] as? RCTDirectEventBlock
45
46
  }
46
47
  }
47
48
  }
@@ -3,4 +3,5 @@
3
3
 
4
4
  @interface RCT_EXTERN_MODULE(SmileIDSmartSelfieAuthenticationViewManager, RCTViewManager)
5
5
  RCT_EXTERN_METHOD(setParams:(nonnull NSNumber *)node params:(NSDictionary *)params)
6
+ RCT_EXPORT_VIEW_PROPERTY(onResult, RCTBubblingEventBlock);
6
7
  @end
@@ -5,21 +5,22 @@ import SwiftUI
5
5
  @objc(SmileIDSmartSelfieAuthenticationViewManager)
6
6
  class SmileIDSmartSelfieAuthenticationViewManager: SmileIDBaseViewManager {
7
7
  override func getView() -> UIView {
8
- SmileIDSmartSelfieAuthView()
8
+ BaseSmileIDView(frame: .zero, contentView: AnyView(SmileIDSmartSelfieAuthView(product: self.product)),product:self.product)
9
9
  }
10
10
 
11
11
  @objc func setParams(_ node: NSNumber, params: NSDictionary) {
12
12
  /* UI Updates on the Main Thread:async ensures that the UI update is scheduled to run on the next cycle of the run loop, preventing any potential blocking of the UI if the update were to take a noticeable amount of time
13
13
  */
14
14
  DispatchQueue.main.async {
15
- if let component = self.bridge.uiManager.view(forReactTag: node) as? SmileIDSmartSelfieAuthView {
16
- component.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
17
- component.product.userId = params["userId"] as? String
18
- component.product.jobId = params["jobId"] as? String
19
- component.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
20
- component.product.showAttribution = params["showAttribution"] as? Bool ?? true
21
- component.product.showInstructions = params["showInstructions"] as? Bool ?? true
22
- component.product.onResult = params["onResult"] as? RCTDirectEventBlock
15
+ if let component = self.bridge.uiManager.view(forReactTag: node) as? BaseSmileIDView {
16
+ self.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
17
+ self.product.userId = params["userId"] as? String
18
+ self.product.jobId = params["jobId"] as? String
19
+ self.product.allowNewEnroll = params["allowNewEnroll"] as? Bool ?? false
20
+ self.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
21
+ self.product.showAttribution = params["showAttribution"] as? Bool ?? true
22
+ self.product.showInstructions = params["showInstructions"] as? Bool ?? true
23
+ self.product.onResult = params["onResult"] as? RCTDirectEventBlock
23
24
  }
24
25
  }
25
26
  }
@@ -3,4 +3,5 @@
3
3
 
4
4
  @interface RCT_EXTERN_MODULE(SmileIDSmartSelfieEnrollmentViewManager, RCTViewManager)
5
5
  RCT_EXTERN_METHOD(setParams:(nonnull NSNumber *)node params:(NSDictionary *)params)
6
+ RCT_EXPORT_VIEW_PROPERTY(onResult, RCTBubblingEventBlock);
6
7
  @end
@@ -5,21 +5,22 @@ import SwiftUI
5
5
  @objc(SmileIDSmartSelfieEnrollmentViewManager)
6
6
  class SmileIDSmartSelfieEnrollmentViewManager: SmileIDBaseViewManager {
7
7
  override func getView() -> UIView {
8
- SmileIDSmartSelfieEnrollmentView()
8
+ BaseSmileIDView(frame: .zero, contentView: AnyView(SmileIDSmartSelfieEnrollmentView(product: self.product)),product:self.product)
9
9
  }
10
10
 
11
11
  @objc func setParams(_ node: NSNumber, params: NSDictionary) {
12
12
  /* UI Updates on the Main Thread:async ensures that the UI update is scheduled to run on the next cycle of the run loop, preventing any potential blocking of the UI if the update were to take a noticeable amount of time
13
13
  */
14
14
  DispatchQueue.main.async {
15
- if let component = self.bridge.uiManager.view(forReactTag: node) as? SmileIDSmartSelfieEnrollmentView {
16
- component.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
17
- component.product.userId = params["userId"] as? String
18
- component.product.jobId = params["jobId"] as? String
19
- component.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
20
- component.product.showAttribution = params["showAttribution"] as? Bool ?? true
21
- component.product.showInstructions = params["showInstructions"] as? Bool ?? true
22
- component.product.onResult = params["onResult"] as? RCTDirectEventBlock
15
+ if let component = self.bridge.uiManager.view(forReactTag: node) as? BaseSmileIDView {
16
+ self.product.extraPartnerParams = params["extraPartnerParams"] as? [String: String] ?? [:]
17
+ self.product.userId = params["userId"] as? String
18
+ self.product.jobId = params["jobId"] as? String
19
+ self.product.allowAgentMode = params["allowAgentMode"] as? Bool ?? false
20
+ self.product.allowNewEnroll = params["allowNewEnroll"] as? Bool ?? false
21
+ self.product.showAttribution = params["showAttribution"] as? Bool ?? true
22
+ self.product.showInstructions = params["showInstructions"] as? Bool ?? true
23
+ self.product.onResult = params["onResult"] as? RCTBubblingEventBlock
23
24
  }
24
25
  }
25
26
  }
@@ -15,6 +15,7 @@ class SmileIDProductModel: ObservableObject {
15
15
  @Published var productName: String?
16
16
  @Published var partnerPrivacyPolicy: String?
17
17
  @Published var allowAgentMode: Bool = false
18
+ @Published var allowNewEnroll: Bool = false
18
19
  @Published var showAttribution: Bool = true
19
20
  @Published var showInstructions: Bool = true
20
21
  @Published var extraPartnerParams: [String: String] = [:]
@@ -25,5 +26,5 @@ class SmileIDProductModel: ObservableObject {
25
26
  @Published var allowGalleryUpload: Bool = false
26
27
  @Published var idInfo: IdInfo?
27
28
  @Published var bypassSelfieCaptureWithFilePath: URL?
28
- @Published var onResult: RCTDirectEventBlock?
29
+ @Published var onResult: RCTBubblingEventBlock?
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","TurboModuleRegistry","getEnforcing","exports","default"],"sourceRoot":"../../src","sources":["NativeSmileId.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAwBpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA"}
1
+ {"version":3,"names":["_reactNative","require","_default","TurboModuleRegistry","getEnforcing","exports","default"],"sourceRoot":"../../src","sources":["NativeSmileId.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAuEpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA"}
@@ -3,30 +3,108 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "AuthenticationRequest", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _types.AuthenticationRequest;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "AuthenticationResponse", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _types.AuthenticationResponse;
16
+ }
17
+ });
6
18
  Object.defineProperty(exports, "BiometricKYCRequest", {
7
19
  enumerable: true,
8
20
  get: function () {
9
21
  return _types.BiometricKYCRequest;
10
22
  }
11
23
  });
24
+ Object.defineProperty(exports, "BiometricKycJobStatusResponse", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _types.BiometricKycJobStatusResponse;
28
+ }
29
+ });
12
30
  Object.defineProperty(exports, "ConsentRequest", {
13
31
  enumerable: true,
14
32
  get: function () {
15
33
  return _types.ConsentRequest;
16
34
  }
17
35
  });
36
+ Object.defineProperty(exports, "DocumentVerificationJobStatusResponse", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _types.DocumentVerificationJobStatusResponse;
40
+ }
41
+ });
18
42
  Object.defineProperty(exports, "DocumentVerificationRequest", {
19
43
  enumerable: true,
20
44
  get: function () {
21
45
  return _types.DocumentVerificationRequest;
22
46
  }
23
47
  });
48
+ Object.defineProperty(exports, "EnhancedDocumentVerificationJobStatusResponse", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _types.EnhancedDocumentVerificationJobStatusResponse;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "EnhancedKycAsyncResponse", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _types.EnhancedKycAsyncResponse;
58
+ }
59
+ });
24
60
  Object.defineProperty(exports, "EnhancedKycRequest", {
25
61
  enumerable: true,
26
62
  get: function () {
27
63
  return _types.EnhancedKycRequest;
28
64
  }
29
65
  });
66
+ Object.defineProperty(exports, "EnhancedKycResponse", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _types.EnhancedKycResponse;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "JobStatusRequest", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _types.JobStatusRequest;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "PrepUploadRequest", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _types.PrepUploadRequest;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "PrepUploadResponse", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _types.PrepUploadResponse;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "ProductsConfigRequest", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _types.ProductsConfigRequest;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "ProductsConfigResponse", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _types.ProductsConfigResponse;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "ServicesResponse", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _types.ServicesResponse;
106
+ }
107
+ });
30
108
  Object.defineProperty(exports, "SmartSelfieAuthenticationRequest", {
31
109
  enumerable: true,
32
110
  get: function () {
@@ -39,6 +117,12 @@ Object.defineProperty(exports, "SmartSelfieEnrollmentRequest", {
39
117
  return _types.SmartSelfieEnrollmentRequest;
40
118
  }
41
119
  });
120
+ Object.defineProperty(exports, "SmartSelfieJobStatusResponse", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _types.SmartSelfieJobStatusResponse;
124
+ }
125
+ });
42
126
  exports.SmileID = void 0;
43
127
  Object.defineProperty(exports, "SmileIDBiometricKYCView", {
44
128
  enumerable: true,
@@ -46,6 +130,12 @@ Object.defineProperty(exports, "SmileIDBiometricKYCView", {
46
130
  return _SmileIDBiometricKYCView.default;
47
131
  }
48
132
  });
133
+ Object.defineProperty(exports, "SmileIDConsentView", {
134
+ enumerable: true,
135
+ get: function () {
136
+ return _SmileIDConsentView.default;
137
+ }
138
+ });
49
139
  Object.defineProperty(exports, "SmileIDDocumentVerificationView", {
50
140
  enumerable: true,
51
141
  get: function () {
@@ -76,12 +166,25 @@ Object.defineProperty(exports, "SmileIDViewProps", {
76
166
  return _types.SmileIDViewProps;
77
167
  }
78
168
  });
169
+ Object.defineProperty(exports, "UploadRequest", {
170
+ enumerable: true,
171
+ get: function () {
172
+ return _types.UploadRequest;
173
+ }
174
+ });
175
+ Object.defineProperty(exports, "ValidDocumentsResponse", {
176
+ enumerable: true,
177
+ get: function () {
178
+ return _types.ValidDocumentsResponse;
179
+ }
180
+ });
79
181
  var _reactNative = require("react-native");
80
182
  var _SmileIDSmartSelfieEnrollmentView = _interopRequireDefault(require("./SmileIDSmartSelfieEnrollmentView"));
81
183
  var _SmileIDSmartSelfieAuthenticationView = _interopRequireDefault(require("./SmileIDSmartSelfieAuthenticationView"));
82
184
  var _SmileIDDocumentVerificationView = _interopRequireDefault(require("./SmileIDDocumentVerificationView"));
83
185
  var _SmileIDBiometricKYCView = _interopRequireDefault(require("./SmileIDBiometricKYCView"));
84
186
  var _SmileIDEnhancedDocumentVerificationView = _interopRequireDefault(require("./SmileIDEnhancedDocumentVerificationView"));
187
+ var _SmileIDConsentView = _interopRequireDefault(require("./SmileIDConsentView"));
85
188
  var _types = require("./types");
86
189
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
87
190
  const LINKING_ERROR = `The package 'react-native-smile-id' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
@@ -110,14 +213,51 @@ const SmileID = {
110
213
  * Disable crash reporting
111
214
  */
112
215
  disableCrashReporting: () => _reactNative.Platform.OS === 'android' ? _SmileID.disableCrashReporting() : () => {},
216
+ authenticate: request => _SmileID.authenticate(request),
217
+ /**
218
+ * Prepare upload process
219
+ */
220
+ prepUpload: request => _SmileID.prepUpload(request),
221
+ /**
222
+ * Perform the upload operation
223
+ */
224
+ upload: (url, request) => _SmileID.upload(url, request),
225
+ /**
226
+ * Perform Enhanced KYC
227
+ */
228
+ doEnhancedKyc: request => _SmileID.doEnhancedKyc(request),
229
+ /**
230
+ * Perform Enhanced KYC asynchronously
231
+ */
232
+ doEnhancedKycAsync: request => _SmileID.doEnhancedKycAsync(request),
233
+ /**
234
+ * Get the status of a Smart Selfie job
235
+ */
236
+ getSmartSelfieJobStatus: request => _SmileID.getSmartSelfieJobStatus(request),
237
+ /**
238
+ * Get the status of a document verification job
239
+ */
240
+ getDocumentVerificationJobStatus: request => _SmileID.getDocumentVerificationJobStatus(request),
241
+ /**
242
+ * Get the status of a biometric KYC job
243
+ */
244
+ getBiometricKycJobStatus: request => _SmileID.getBiometricKycJobStatus(request),
245
+ /**
246
+ * Get the status of an enhanced document verification job
247
+ */
248
+ getEnhancedDocumentVerificationJobStatus: request => _SmileID.getEnhancedDocumentVerificationJobStatus(request),
249
+ /**
250
+ * Get products configuration
251
+ */
252
+ getProductsConfig: request => _SmileID.getProductsConfig(request),
113
253
  /**
114
- *Headless run enhanced kyc async
254
+ * Get valid documents based on products configuration
115
255
  */
116
- doEnhancedKycAsync: enhancedKYCRequest => _SmileID.doEnhancedKycAsync(enhancedKYCRequest),
256
+ getValidDocuments: request => _SmileID.getValidDocuments(request),
117
257
  /**
118
- *Headless run enhanced kyc async
258
+ * Get available services
119
259
  */
120
- doEnhancedKyc: enhancedKYCRequest => _SmileID.doEnhancedKyc(enhancedKYCRequest)
260
+ getServices: () => _SmileID.getServices()
121
261
  };
122
262
  exports.SmileID = SmileID;
123
263
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_SmileIDSmartSelfieEnrollmentView","_interopRequireDefault","_SmileIDSmartSelfieAuthenticationView","_SmileIDDocumentVerificationView","_SmileIDBiometricKYCView","_SmileIDEnhancedDocumentVerificationView","_types","obj","__esModule","default","LINKING_ERROR","Platform","select","ios","isTurboModuleEnabled","global","__turboModuleProxy","SmileIdModule","NativeModules","RNSmileID","_SmileID","Proxy","get","Error","SmileID","initialize","useSandBox","arguments","length","undefined","disableCrashReporting","OS","doEnhancedKycAsync","enhancedKYCRequest","doEnhancedKyc","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,iCAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,qCAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gCAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,wBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,wCAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAQiB,SAAAE,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEjB,MAAMG,aAAa,GAChB,gFAA+E,GAChFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEJ,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMK,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,aAAa,GAAGH,oBAAoB,GACtCf,OAAO,CAAC,iBAAiB,CAAC,CAACU,OAAO,GAClCS,0BAAa,CAACC,SAAS;AAE3B,MAAMC,QAAQ,GAAGH,aAAa,GAC1BA,aAAa,GACb,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACb,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,MAAMc,OAAO,GAAG;EACd;AACF;AACA;EACEC,UAAU,EAAE,SAAAA,CAAA;IAAA,IAACC,UAAmB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;IAAA,OAAKP,QAAQ,CAACK,UAAU,CAACC,UAAU,CAAC;EAAA;EAC5E;AACF;AACA;AACA;EACEI,qBAAqB,EAAEA,CAAA,KACrBnB,qBAAQ,CAACoB,EAAE,KAAK,SAAS,GAAGX,QAAQ,CAACU,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;EACzE;AACF;AACA;EACEE,kBAAkB,EAAGC,kBAAsC,IACzDb,QAAQ,CAACY,kBAAkB,CAACC,kBAAkB,CAAC;EAEjD;AACF;AACA;EACEC,aAAa,EAAGD,kBAAsC,IACpDb,QAAQ,CAACc,aAAa,CAACD,kBAAkB;AAC7C,CAAC;AAACE,OAAA,CAAAX,OAAA,GAAAA,OAAA"}
1
+ {"version":3,"names":["_reactNative","require","_SmileIDSmartSelfieEnrollmentView","_interopRequireDefault","_SmileIDSmartSelfieAuthenticationView","_SmileIDDocumentVerificationView","_SmileIDBiometricKYCView","_SmileIDEnhancedDocumentVerificationView","_SmileIDConsentView","_types","obj","__esModule","default","LINKING_ERROR","Platform","select","ios","isTurboModuleEnabled","global","__turboModuleProxy","SmileIdModule","NativeModules","RNSmileID","_SmileID","Proxy","get","Error","SmileID","initialize","useSandBox","arguments","length","undefined","disableCrashReporting","OS","authenticate","request","prepUpload","upload","url","doEnhancedKyc","doEnhancedKycAsync","getSmartSelfieJobStatus","getDocumentVerificationJobStatus","getBiometricKycJobStatus","getEnhancedDocumentVerificationJobStatus","getProductsConfig","getValidDocuments","getServices","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"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"}