react-native-kalapa-ekyc 1.2.10 → 1.3.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.
package/README.md CHANGED
@@ -6,6 +6,9 @@ Complete guide for integrating Kalapa eKYC functionality into your React Native
6
6
 
7
7
  ## Changelog
8
8
 
9
+ ### 1.3.0
10
+ - **TypeScript**: Fix default export being inferred as `any`. Spreading the native module (`...NativeModules.KalapaEkyc`) into the exported object previously erased all typing, so `KalapaEkyc.start()` and its result fell back to `any` in consumer code. The module is now declared via a `KalapaEkycModule` interface, so `start()` is fully typed and returns `Promise<KalapaEkycResponse>` (`{ kalapa_result: KalapaResult; session?: string }`) — no casting needed to access `kalapa_result` or its methods.
11
+ - **Android**: Update to latest version of Kalapa eKYC to use latest version of Android Camera X 1.6.1.
9
12
  ### 1.2.10
10
13
  - **Android**: Fix switch fall-through in `onError` callback — prevents Promise being rejected multiple times
11
14
  - **Android**: Fix `getCurrentActivity() == null` case now rejects Promise with `ACTIVITY_NULL` instead of leaving it pending forever
@@ -19,10 +19,10 @@ def safeExtGet(prop, fallback) {
19
19
  }
20
20
 
21
21
  android {
22
- compileSdkVersion safeExtGet('KalapaEkyc_compileSdkVersion', 35)
22
+ compileSdkVersion safeExtGet('KalapaEkyc_compileSdkVersion', 36)
23
23
  defaultConfig {
24
24
  minSdkVersion safeExtGet('KalapaEkyc_minSdkVersion', 24)
25
- targetSdkVersion safeExtGet('KalapaEkyc_targetSdkVersion', 35)
25
+ targetSdkVersion safeExtGet('KalapaEkyc_targetSdkVersion', 36)
26
26
  versionCode 1
27
27
  versionName "1.8"
28
28
 
@@ -56,5 +56,5 @@ dependencies {
56
56
  //noinspection GradleDynamicVersion
57
57
  implementation "com.facebook.react:react-native:+" // From node_modules
58
58
  //kalapasdk
59
- implementation 'vn.kalapa:ekyc:2.11.8'
59
+ implementation 'vn.kalapa:ekyc:2.12.0'
60
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-kalapa-ekyc",
3
- "version": "1.2.10",
3
+ "version": "1.3.0",
4
4
  "description": "React Native SDK for Kalapa eKYC integration",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
package/src/index.tsx CHANGED
@@ -51,7 +51,16 @@ interface KalapaEkycResponse {
51
51
  session?: string;
52
52
  }
53
53
 
54
- const ExtendedKalapaEkyc = {
54
+ interface KalapaEkycModule {
55
+ start: (
56
+ session: string,
57
+ flow: KalapaEkycFlow,
58
+ config?: KalapaEkycConfig
59
+ ) => Promise<KalapaEkycResponse>;
60
+ [key: string]: any;
61
+ }
62
+
63
+ const ExtendedKalapaEkyc: KalapaEkycModule = {
55
64
  ...KalapaEkyc,
56
65
 
57
66
  start: async (