assentify-sdk-react-native 1.0.0-Beta.4 → 1.0.0-Beta.40

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 (106) hide show
  1. package/Package.swift +172 -0
  2. package/README.md +120 -32
  3. package/android/build.gradle +1 -6
  4. package/android/src/main/java/com/assentifysdk/AssentifySdkModule.kt +48 -9
  5. package/android/src/main/java/com/assentifysdk/FlowActivity.kt +75 -7
  6. package/android/src/main/java/com/assentifysdk/ScanIDActivity.kt +5 -4
  7. package/android/src/main/res/layout/activity_scan.xml +45 -57
  8. package/ios/AssentifySdkBaseModule.swift +1 -0
  9. package/ios/NativeAssentifySdk.mm +19 -2
  10. package/ios/NativeAssentifySdk.swift +151 -25
  11. package/ios/UIComponents/RNPassportScanner.swift +4 -3
  12. package/ios/View/AssentifySdkEventEmitting.swift +10 -0
  13. package/ios/View/DataDecoder.swift +16 -16
  14. package/ios/View/FaceMatchController.swift +51 -51
  15. package/ios/View/IDCardController.swift +37 -37
  16. package/ios/View/OtherController.swift +33 -33
  17. package/ios/View/PassportController.swift +36 -36
  18. package/ios/View/QrController.swift +10 -10
  19. package/ios/View/UI.swift +77 -26
  20. package/lib/commonjs/AssentifyProvider.js +3 -0
  21. package/lib/commonjs/AssentifyProvider.js.map +1 -1
  22. package/lib/commonjs/AssentifyWrapper.js +4 -4
  23. package/lib/commonjs/AssentifyWrapper.js.map +1 -1
  24. package/lib/commonjs/ClickFontWeightType.js +14 -0
  25. package/lib/commonjs/ClickFontWeightType.js.map +1 -0
  26. package/lib/commonjs/FlowStepperType.js +11 -0
  27. package/lib/commonjs/FlowStepperType.js.map +1 -0
  28. package/lib/commonjs/Language.js +5 -1
  29. package/lib/commonjs/Language.js.map +1 -1
  30. package/lib/commonjs/ValidationStyleType.js +11 -0
  31. package/lib/commonjs/ValidationStyleType.js.map +1 -0
  32. package/lib/commonjs/index.js +36 -0
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/commonjs/types.js.map +1 -1
  35. package/lib/module/AssentifyProvider.js +4 -0
  36. package/lib/module/AssentifyProvider.js.map +1 -1
  37. package/lib/module/AssentifyWrapper.js +4 -4
  38. package/lib/module/AssentifyWrapper.js.map +1 -1
  39. package/lib/module/ClickFontWeightType.js +8 -0
  40. package/lib/module/ClickFontWeightType.js.map +1 -0
  41. package/lib/module/FlowStepperType.js +5 -0
  42. package/lib/module/FlowStepperType.js.map +1 -0
  43. package/lib/module/Language.js +4 -0
  44. package/lib/module/Language.js.map +1 -1
  45. package/lib/module/ValidationStyleType.js +5 -0
  46. package/lib/module/ValidationStyleType.js.map +1 -0
  47. package/lib/module/index.js +3 -0
  48. package/lib/module/index.js.map +1 -1
  49. package/lib/module/types.js.map +1 -1
  50. package/lib/typescript/babel.config.d.ts +0 -1
  51. package/lib/typescript/example/babel.config.d.ts +7 -4
  52. package/lib/typescript/example/babel.config.d.ts.map +1 -1
  53. package/lib/typescript/example/metro.config.d.ts +9 -1
  54. package/lib/typescript/example/metro.config.d.ts.map +1 -1
  55. package/lib/typescript/example/react-native.config.d.ts +5 -2
  56. package/lib/typescript/example/react-native.config.d.ts.map +1 -1
  57. package/lib/typescript/example/src/App.d.ts.map +1 -1
  58. package/lib/typescript/example/src/Home.d.ts.map +1 -1
  59. package/lib/typescript/lib/commonjs/AssentifyProvider.d.ts.map +1 -1
  60. package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts +2 -2
  61. package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts.map +1 -1
  62. package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts +9 -0
  63. package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts.map +1 -0
  64. package/lib/typescript/lib/commonjs/FlowStepperType.d.ts +6 -0
  65. package/lib/typescript/lib/commonjs/FlowStepperType.d.ts.map +1 -0
  66. package/lib/typescript/lib/commonjs/Language.d.ts +6 -0
  67. package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts +6 -0
  68. package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts.map +1 -0
  69. package/lib/typescript/lib/module/AssentifyProvider.d.ts.map +1 -1
  70. package/lib/typescript/lib/module/AssentifyWrapper.d.ts +2 -2
  71. package/lib/typescript/lib/module/AssentifyWrapper.d.ts.map +1 -1
  72. package/lib/typescript/lib/module/ClickFontWeightType.d.ts +8 -0
  73. package/lib/typescript/lib/module/ClickFontWeightType.d.ts.map +1 -0
  74. package/lib/typescript/lib/module/FlowStepperType.d.ts +5 -0
  75. package/lib/typescript/lib/module/FlowStepperType.d.ts.map +1 -0
  76. package/lib/typescript/lib/module/Language.d.ts +6 -0
  77. package/lib/typescript/lib/module/ValidationStyleType.d.ts +5 -0
  78. package/lib/typescript/lib/module/ValidationStyleType.d.ts.map +1 -0
  79. package/lib/typescript/lib/module/index.d.ts +5 -2
  80. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  81. package/lib/typescript/src/AssentifyProvider.d.ts.map +1 -1
  82. package/lib/typescript/src/AssentifyWrapper.d.ts +6 -2
  83. package/lib/typescript/src/AssentifyWrapper.d.ts.map +1 -1
  84. package/lib/typescript/src/ClickFontWeightType.d.ts +9 -0
  85. package/lib/typescript/src/ClickFontWeightType.d.ts.map +1 -0
  86. package/lib/typescript/src/FlowStepperType.d.ts +6 -0
  87. package/lib/typescript/src/FlowStepperType.d.ts.map +1 -0
  88. package/lib/typescript/src/Language.d.ts +5 -0
  89. package/lib/typescript/src/Language.d.ts.map +1 -1
  90. package/lib/typescript/src/ValidationStyleType.d.ts +6 -0
  91. package/lib/typescript/src/ValidationStyleType.d.ts.map +1 -0
  92. package/lib/typescript/src/index.d.ts +5 -2
  93. package/lib/typescript/src/index.d.ts.map +1 -1
  94. package/lib/typescript/src/types.d.ts.map +1 -1
  95. package/package.json +9 -8
  96. package/src/AssentifyProvider.tsx +341 -305
  97. package/src/AssentifyWrapper.ts +47 -6
  98. package/src/ClickFontWeightType.ts +10 -0
  99. package/src/FlowStepperType.ts +7 -0
  100. package/src/Language.ts +7 -0
  101. package/src/ValidationStyleType.ts +7 -0
  102. package/src/index.ts +3 -0
  103. package/src/types.ts +1 -0
  104. package/assentify-sdk.podspec +0 -44
  105. package/lib/typescript/example/src/navigator.d.ts +0 -4
  106. package/lib/typescript/example/src/navigator.d.ts.map +0 -1
@@ -1,7 +1,11 @@
1
1
  import { NativeModules, Platform, Alert, Linking } from 'react-native';
2
2
  import { type LanguageCode } from './Language';
3
+ import { type FlowUiLanguageCode } from './Language';
3
4
  import { type TemplatesByCountry } from './types';
4
5
  import { type BackgroundTypeCode } from './BackgroundType';
6
+ import { type FlowStepperTypeCode } from './FlowStepperType';
7
+ import { type ValidationStyleTypeCode, } from './ValidationStyleType';
8
+ import { type ClickFontWeightTypeCode, } from './ClickFontWeightType';
5
9
 
6
10
  const LINKING_ERROR =
7
11
  `The package 'assentify-sdk-react-native-react-native' doesn't seem to be linked. Make sure: \n\n` +
@@ -27,6 +31,7 @@ const AssentifyWrapper = {
27
31
  initialize: function (
28
32
  apiKey: string,
29
33
  configFileName: string,
34
+ processJsonConfigFile?: string,
30
35
  performLivenessFace?: boolean,
31
36
  ENV_CustomColor?: string,
32
37
  enableDetect?: boolean,
@@ -45,11 +50,13 @@ const AssentifyWrapper = {
45
50
  iOSMinRam?: number,
46
51
  minCPUCores ?: number,
47
52
  manualClickColor?: string,
48
- countDownNumbersColor?: string
53
+ countDownNumbersColor?: string,
54
+ flowUiLanguage ?: FlowUiLanguageCode
49
55
  ) {
50
56
  AssentifySdk.initialize(
51
57
  apiKey,
52
58
  configFileName,
59
+ processJsonConfigFile?? '',
53
60
  performLivenessFace ?? false,
54
61
  ENV_CustomColor ?? '#f5a103',
55
62
  enableDetect ?? true,
@@ -68,7 +75,8 @@ const AssentifyWrapper = {
68
75
  iOSMinRam??2,
69
76
  minCPUCores??6,
70
77
  manualClickColor ?? '#f5a103',
71
- countDownNumbersColor ?? '#f5a103'
78
+ countDownNumbersColor ?? '#f5a103',
79
+ flowUiLanguage ?? "en",
72
80
  );
73
81
  },
74
82
 
@@ -123,10 +131,25 @@ const AssentifyWrapper = {
123
131
  holdUntilClickColors?: number,
124
132
  backgroundType?: BackgroundTypeCode,
125
133
  clear?: boolean,
126
- language?: LanguageCode,
134
+ extractedDataLanguage?: LanguageCode,
127
135
  enableNfc?: boolean,
128
136
  enableQr?: boolean,
129
- blockLoaderCustomProperties?:Record<string, string>
137
+ blockLoaderCustomProperties?:Record<string, string>,
138
+ flowStepperType?:FlowStepperTypeCode,
139
+ rangeStart?: number,
140
+ rangeEnd?: number,
141
+ stepperTitle?: string,
142
+ showCountDown?: boolean,
143
+ validationStyle?: ValidationStyleTypeCode,
144
+ stepperTitleColor?: string,
145
+ howToCapturePassportVideo?: string,
146
+ howToCaptureIDVideo?: string,
147
+ howToCaptureFaceVideo?: string,
148
+ clickFontWeight?: ClickFontWeightTypeCode,
149
+ hideBlockLoader?: boolean,
150
+ hideWrapUp?: boolean,
151
+ localMrzScan?: boolean,
152
+ faceAcceptanceRate?: number,
130
153
  ) {
131
154
  AssentifySdk.startFlow(
132
155
  logoUrl ?? "",
@@ -143,13 +166,31 @@ const AssentifyWrapper = {
143
166
  holdUntilClickColors ?? 0.4,
144
167
  backgroundType,
145
168
  clear,
146
- language ?? "NON",
169
+ extractedDataLanguage ?? "NON",
147
170
  enableNfc ?? false,
148
171
  enableQr ?? false,
149
- JSON.stringify(blockLoaderCustomProperties ?? {})
172
+ JSON.stringify(blockLoaderCustomProperties ?? {}),
173
+ flowStepperType ?? "Normal",
174
+ rangeStart ?? 25,
175
+ rangeEnd ?? 50,
176
+ stepperTitle ?? "Identification",
177
+ showCountDown ?? true,
178
+
179
+ validationStyle ?? "Message",
180
+ stepperTitleColor ?? "",
181
+ howToCapturePassportVideo ?? "",
182
+ howToCaptureIDVideo ?? "",
183
+ howToCaptureFaceVideo ?? "",
184
+ clickFontWeight ?? "Normal",
185
+
186
+ hideBlockLoader ?? false,
187
+ hideWrapUp ?? false,
188
+ localMrzScan ?? false,
189
+ faceAcceptanceRate ?? 50,
150
190
  );
151
191
  },
152
192
 
153
193
  };
154
194
 
195
+
155
196
  export default AssentifyWrapper;
@@ -0,0 +1,10 @@
1
+ export const ClickFontWeightType = {
2
+ Normal: "Normal",
3
+ Medium: "Medium",
4
+ Bold: "Bold",
5
+ SemiBold: "SemiBold",
6
+ ExtraBold: "ExtraBold",
7
+
8
+ };
9
+
10
+ export type ClickFontWeightTypeCode = typeof ClickFontWeightType[keyof typeof ClickFontWeightType];
@@ -0,0 +1,7 @@
1
+ export const FlowStepperType = {
2
+ Normal: "Normal",
3
+ PercentageBased: "PercentageBased",
4
+
5
+ };
6
+
7
+ export type FlowStepperTypeCode = typeof FlowStepperType[keyof typeof FlowStepperType];
package/src/Language.ts CHANGED
@@ -20,3 +20,10 @@ export const Language = {
20
20
  };
21
21
 
22
22
  export type LanguageCode = typeof Language[keyof typeof Language];
23
+
24
+ export const FlowUiLanguage = {
25
+ English: "en",
26
+ Arabic: "ar",
27
+ };
28
+
29
+ export type FlowUiLanguageCode = typeof FlowUiLanguage[keyof typeof FlowUiLanguage];
@@ -0,0 +1,7 @@
1
+ export const ValidationStyleType = {
2
+ Message: "Message",
3
+ Asterisk: "Asterisk",
4
+
5
+ };
6
+
7
+ export type ValidationStyleTypeCode = typeof ValidationStyleType[keyof typeof ValidationStyleType];
package/src/index.ts CHANGED
@@ -4,5 +4,8 @@ export * from './types';
4
4
  export * from './Language';
5
5
  export * from './ActiveLiveType';
6
6
  export * from './BackgroundType';
7
+ export * from './FlowStepperType';
8
+ export * from './ValidationStyleType';
9
+ export * from './ClickFontWeightType';
7
10
  export const Assentify = AssentifyWrapper;
8
11
  export * from './AssentifyProvider';
package/src/types.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type LanguageCode } from './Language';
2
2
  import { type BackgroundTypeCode } from './BackgroundType';
3
+ import { type FlowStepperTypeCode } from './FlowStepperType';
3
4
 
4
5
 
5
6
  export interface AssentifySdkCallback {
@@ -1,44 +0,0 @@
1
- require "json"
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
-
6
- Pod::Spec.new do |s|
7
- s.name = "assentify-sdk"
8
- s.version = package["version"]
9
- s.summary = package["description"]
10
- s.homepage = package["homepage"]
11
- s.license = package["license"]
12
- s.authors = package["author"]
13
-
14
- s.platforms = { :ios => min_ios_version_supported }
15
- s.source = { :git => "https://github.com/AssentifyLTD/Assentify.SDK.ReactNative.git", :tag => "#{s.version}" }
16
-
17
- s.swift_versions = ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5']
18
-
19
- s.ios.deployment_target = '14.0'
20
- s.pod_target_xcconfig = {
21
- 'DEFINES_MODULE' => 'YES'
22
- }
23
-
24
-
25
- s.source_files = "ios/**/*.{h,m,mm,swift}"
26
-
27
- s.resources = ["ios/Resources/info_icon.png",
28
- "ios/Resources/zoom_in.png",
29
- "ios/Resources/zoom_out.png",
30
- "ios/Resources/expire.png",
31
- "ios/Resources/id_warning.png",
32
- "ios/Resources/warning.png",
33
- "ios/Resources/sending.png",
34
- "ios/Resources/id.gif",
35
- "ios/Resources/passport.gif",
36
- "ios/Resources/card.gif",
37
- ]
38
-
39
-
40
- s.dependency "React-Core"
41
- s.dependency "MLKitFaceDetection", '8.0.0'
42
- s.dependency "AssentifySdk", '1.0.0-Beta.8'
43
-
44
- end
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- declare function MyStack(): React.JSX.Element;
3
- export default MyStack;
4
- //# sourceMappingURL=navigator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigator.d.ts","sourceRoot":"","sources":["../../../../example/src/navigator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,iBAAS,OAAO,sBAMf;AAED,eAAe,OAAO,CAAC"}