@digiotech/react-native 1.0.18 → 2.0.1

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
@@ -19,9 +19,9 @@ Documentation of Digio Gateway Integration and their usage
19
19
  Instantiate the Digio instance with `environment` & other options
20
20
 
21
21
  ```tsx
22
- import { Digio, DigioConfig, DigioResponse } from '@digiotech/react-native';
22
+ import { Digio, DigioConfig, DigioResponse, ServiceMode } from '@digiotech/react-native';
23
23
 
24
- const config: DigioConfig = { environment: Environment.PRODUCTION };
24
+ const config: DigioConfig = { environment: Environment.PRODUCTION, serviceMode: ServiceMode.OTP };
25
25
  const digio = new Digio(config);
26
26
  const documentId = "<document_id>";
27
27
  const identifier = "<email_or_phone>";
@@ -36,7 +36,7 @@ For a complete list of events and the payload associated with it, refer [here](h
36
36
 
37
37
  ```tsx
38
38
  import { useEffect } from 'react';
39
- import { Digio, DigioConfig, GatewayEvent } from '@digiotech/react-native';
39
+ import { Digio, DigioConfig, GatewayEvent, ServiceMode } from '@digiotech/react-native';
40
40
 
41
41
  function YourComponent() {
42
42
  useEffect(() => {
@@ -57,7 +57,7 @@ function YourComponent() {
57
57
 
58
58
  ```tsx
59
59
  import { useEffect } from 'react';
60
- import { Digio, DigioConfig, GatewayEvent } from '@digiotech/react-native';
60
+ import { Digio, DigioConfig, GatewayEvent, ServiceMode } from '@digiotech/react-native';
61
61
 
62
62
  function YourComponent() {
63
63
  useEffect(() => {
@@ -73,7 +73,7 @@ function YourComponent() {
73
73
  }, []);
74
74
 
75
75
  const triggerDigioGateway = async () => {
76
- const config: DigioConfig = { environment: Environment.PRODUCTION };
76
+ const config: DigioConfig = { environment: Environment.PRODUCTION, serviceMode: ServiceMode.OTP };
77
77
  const digio = new Digio(config);
78
78
  const documentId = "<document_id>";
79
79
  const identifier = "<email_or_phone>";
@@ -85,18 +85,17 @@ function YourComponent() {
85
85
  ```
86
86
 
87
87
  ## Android
88
- #### Note: Incase you are using camera feature and facing black screen on camera then follow below steps
89
- - Add digioKycworkflow.aar file inside your react project under android/app/libs folder. [Download digio_kyc_workflow-4.0.15.aar](https://drive.google.com/file/d/1nHeZhDBPavLxwJp0VgNrMiEZpXswENgz/view?usp=sharing)
90
-
91
-
92
88
  - Add below in your project under build.gradle (module:app)file inside dependencies
93
89
 
94
90
  ```tsx
95
- implementation fileTree(dir: 'libs', include: ['*.aar'])
96
- // Required for KYC/work_flow /video/2way video
97
- implementation 'com.github.digio-tech:gateway_kyc:v4.0.20'
98
91
  // Required for esign/mandate sign
99
92
  implementation 'com.github.digio-tech:protean-esign:v3.2'
93
+ // under android {} of build.gradle(module:app)
94
+ buildFeatures {
95
+ viewBinding true
96
+ dataBinding true
97
+ }
98
+
100
99
  ```
101
100
 
102
101
  ## SDK Reference
@@ -105,11 +104,12 @@ implementation 'com.github.digio-tech:protean-esign:v3.2'
105
104
 
106
105
  **Parameters:**
107
106
 
108
- | Name | Type | Description |
109
- |-----------------|---------|----------------------------------------------------------------------------------------|
110
- | environment* | string | Environment for which you want to open gateway. One of `sandbox` or `production` |
111
- | logo | string | Pass an URL of your brand logo. **Note:** Pass an optimised image url for best results |
112
- | theme | string | Options for changing the appearance of the gateway. See below for options under it. |
107
+ | Name | Type | Description |
108
+ |-----------------|---------|---------------------------------------------------------------------------------------------|
109
+ | environment* | string | Environment for which you want to open gateway. One of `sandbox` or `production` |
110
+ | logo | string | Pass an URL of your brand logo. **Note:** Pass an optimised image url for best results |
111
+ | theme | string | Options for changing the appearance of the gateway. See below for options under it. |
112
+ | serviceMode* | string | ServiceMode can be OTP/FACE/IRIS/FP <Default it's OTP> you can set based on your requirment|
113
113
 
114
114
  **Theme:**
115
115
 
@@ -140,9 +140,17 @@ Add required permissions in the manifest file. Note - This is the common SDK for
140
140
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
141
141
  /** Required for geotagging */
142
142
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
143
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
144
+
143
145
  /** Required for ID card analysis, selfie and face match**/
144
146
  <uses-permission android:name="android.permission.CAMERA" />
145
147
  <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
148
+
149
+ <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
150
+ <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
151
+ <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
152
+
153
+
146
154
  ```
147
155
  A fintech Android app can't access the following permission
148
156
  - Read_external_storage
@@ -152,6 +160,26 @@ A fintech Android app can't access the following permission
152
160
  - Read_phone_numbers
153
161
  - Read_media_videos
154
162
 
163
+ ## You get a build error due to a theme issue.
164
+ - Please add tools:replace="android:theme" under your android manifest.
165
+ ```
166
+ <application
167
+ ....
168
+ tools:replace="android:theme"
169
+ ...
170
+ >
171
+ .....
172
+ </application>
173
+
174
+ ```
175
+ ## You get a build error due to a duplicate class android.support.v4
176
+ - Check your gradle.properties below should be added.
177
+ ```
178
+ android.enableJetifier=true
179
+ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
180
+
181
+ ```
182
+
155
183
  ### IOS Permission
156
184
 
157
185
  Permissions need to add in your info.plist
@@ -88,32 +88,58 @@ dependencies {
88
88
  // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
89
89
  //noinspection GradleDynamicVersion
90
90
  implementation "com.facebook.react:react-native:+"
91
- implementation 'com.github.digio-tech:gateway:v4.0.14'
92
- compileOnly 'com.github.digio-tech:gateway_kyc:v4.0.20'
93
- implementation 'com.github.digio-tech:gateway_esign:4.0.12'
94
- // compileOnly fileTree(dir: "libs", include: ["*.aar"])
95
- implementation 'androidx.appcompat:appcompat:1.6.1'
96
- implementation 'com.google.android.material:material:1.9.0'
97
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
98
- implementation "androidx.camera:camera-core:1.2.2"
99
- implementation "androidx.camera:camera-camera2:1.2.2"
100
- implementation "androidx.camera:camera-lifecycle:1.2.2"
101
- implementation "androidx.camera:camera-view:1.2.2"
102
- implementation 'androidx.navigation:navigation-fragment:2.5.3'
103
- implementation 'androidx.navigation:navigation-ui:2.5.3'
104
- implementation 'androidx.preference:preference:1.2.0'
105
- implementation 'com.google.android.gms:play-services-mlkit-face-detection:17.1.0'
106
- implementation 'com.google.android.gms:play-services-location:21.0.1'
107
- implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
108
-
109
- compileOnly 'com.github.digio-tech:protean-esign:v3.2'
110
- implementation 'com.android.volley:volley:1.2.1'
111
- implementation 'com.scottyab:rootbeer-lib:0.1.0'
112
-
113
- implementation 'com.squareup.okhttp3:okhttp:4.10.0'
114
- implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
115
- implementation 'com.github.digio-tech:cvl_esign:v1.0.1'
116
- implementation 'com.github.digio-tech:cvl_rdservice:v1.0.0'
117
- implementation 'com.google.code.gson:gson:2.9.1'
91
+ // core dependencies
92
+ implementation(platform("com.github.digio-tech:digio-bom:v1.0.10"))
93
+ implementation("androidx.appcompat:appcompat")
94
+ implementation("com.google.android.material:material")
95
+ implementation("androidx.navigation:navigation-fragment-ktx")
96
+ implementation("androidx.navigation:navigation-ui-ktx")
97
+
98
+ implementation("com.github.digio-tech:gateway")
99
+
100
+ implementation("androidx.swiperefreshlayout:swiperefreshlayout")
101
+ implementation("com.android.volley:volley")
102
+ implementation("com.squareup.okhttp3:okhttp")
103
+ implementation("com.squareup.okhttp3:logging-interceptor")
104
+ implementation("com.google.code.gson:gson")
105
+ implementation("com.github.digio-tech:digio_permissions")
106
+ implementation("com.google.android.gms:play-services-location")
107
+
108
+ implementation("com.github.digio-tech:sdk_offlinekyc")
109
+
110
+ implementation("com.github.digio-tech:esign_otp")
111
+ compileOnly("com.github.digio-tech:protean-esign")
112
+ implementation("com.github.digio-tech:cvl_esign")
113
+ implementation("com.scottyab:rootbeer-lib")
114
+ implementation("com.afollestad.material-dialogs:core") //giving duplicate class with upi
115
+
116
+ implementation("com.github.digio-tech:esign_biometrics")
117
+ implementation("com.github.digio-tech:cvl_rdservice")
118
+
119
+ implementation("com.github.digio-tech:esign_mandate")
120
+
121
+ implementation("com.github.digio-tech:sdk_native_camera")
122
+ implementation("com.github.digio-tech:image_processor")
123
+ implementation("androidx.exifinterface:exifinterface")
124
+
125
+ implementation("com.github.digio-tech:sdk_ml_camera")
126
+ implementation("com.google.mlkit:face-detection")
127
+ implementation("androidx.camera:camera-core")
128
+ implementation("androidx.camera:camera-camera2")
129
+ implementation("androidx.camera:camera-lifecycle")
130
+ implementation("androidx.camera:camera-view")
131
+ implementation("androidx.camera:camera-video")
132
+ implementation("androidx.preference:preference-ktx")
133
+ implementation("androidx.exifinterface:exifinterface")
134
+
135
+ implementation("com.github.digio-tech:sdk_upi")
136
+ implementation("androidx.core:core-ktx")
137
+ implementation("com.squareup.retrofit2:retrofit")
138
+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android")
139
+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
140
+ implementation("androidx.fragment:fragment-ktx")
141
+ implementation("androidx.lifecycle:lifecycle-livedata-ktx")
142
+ implementation("com.squareup.retrofit2:converter-gson")
143
+
118
144
  }
119
145
 
@@ -37,15 +37,17 @@ import java.util.Map;
37
37
  import in.digio.sdk.gateway.DigioActivity;
38
38
  import in.digio.sdk.gateway.DigioConstants;
39
39
  import in.digio.sdk.gateway.enums.DigioEnvironment;
40
+ import in.digio.sdk.gateway.enums.DigioServiceMode;
40
41
  import in.digio.sdk.gateway.enums.DigioErrorCode;
41
42
  import in.digio.sdk.gateway.model.DigioConfig;
42
43
  import in.digio.sdk.gateway.model.DigioTheme;
43
44
 
45
+
44
46
  @ReactModule(name = DigioReactNativeModule.NAME)
45
47
  public class DigioReactNativeModule extends ReactContextBaseJavaModule implements LifecycleEventListener {
46
48
  public static final String NAME = "DigioReactNative";
47
49
 
48
- public static final String AAR_VERSION = "4.0.8";
50
+ public static final String AAR_VERSION = "5.0.1";
49
51
  public static final int DIGIO_ACTIVITY = 73457843;
50
52
  private Promise resultPromise;
51
53
  private boolean isReceiverRegistered = false;
@@ -55,17 +57,19 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
55
57
 
56
58
  @Override
57
59
  public void onReceive(Context context, Intent intent) {
58
- if (intent.getStringExtra("data") != null) {
60
+ if (intent.getStringExtra("updateGatewayEvent") != null) {
61
+ // if (intent.getStringExtra("data") != null) {
59
62
  JSONObject jsonObject = null;
60
63
  try {
61
64
  jsonObject = new JSONObject(
62
- intent.getStringExtra(
63
- "data"
64
- )
65
+ // intent.getStringExtra("data")
66
+ intent.getStringExtra("updateGatewayEvent")
65
67
  );
66
68
  } catch (JSONException e) {
67
69
  e.printStackTrace();
68
70
  }
71
+ // Log.e("CheckResponse"," gatewayEvent "+jsonObject);
72
+
69
73
  WritableMap resultMap = MapUtil.jsonToWritableMap(jsonObject);
70
74
  getReactApplicationContext()
71
75
  .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
@@ -78,7 +82,8 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
78
82
  @Override
79
83
  public void onActivityResult(Activity activity, int requestCode, int resultCode, @Nullable Intent intent) {
80
84
  if (requestCode == DIGIO_ACTIVITY) {
81
- onNativeActivityResult(resultCode, intent);
85
+ int responseCode = intent.getIntExtra("responseCode", 0);
86
+ onNativeActivityResult(responseCode, intent);
82
87
  }
83
88
  }
84
89
 
@@ -92,16 +97,19 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
92
97
  WritableMap resultMap = Arguments.createMap();
93
98
  resultMap.putInt("code", resultCode);
94
99
  if (data != null) {
100
+ // Log.e("CheckResponse"," resultCode "+resultCode+ " data "+data.getDataString());
101
+
95
102
  resultMap.putString("message", data.getStringExtra("message"));
96
- String screenName = data.getStringExtra("screen_name");
103
+ String screenName = data.getStringExtra("currentState");
104
+ // String screenName = data.getStringExtra("screen_name");
97
105
  if (TextUtils.isEmpty(screenName)) {
98
106
  screenName = "starting_digio";
99
107
  }
100
108
  resultMap.putString("screen", screenName);
101
109
  resultMap.putString("step", data.getStringExtra("step"));
102
110
  resultMap.putString("documentId", data.getStringExtra("document_id"));
103
- resultMap.putString("failingUrl", data.getStringExtra("failing_url"));
104
- resultMap.putInt("errorCode", data.getIntExtra("error_code", resultCode));
111
+ resultMap.putString("failingUrl", data.getStringExtra("failingUrl"));
112
+ resultMap.putInt("errorCode", data.getIntExtra("errorCode", resultCode));
105
113
  String[] stringArrayExtra = data.getStringArrayExtra("permissions");
106
114
  WritableArray permissionArray = Arguments.createArray();
107
115
  if (stringArrayExtra != null && stringArrayExtra.length > 0) {
@@ -142,7 +150,7 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
142
150
  compatRegisterReceiver(this.getReactApplicationContext(), eventBroadcastReceiver, filter, true);
143
151
  isReceiverRegistered = true;
144
152
  }
145
-
153
+
146
154
  }
147
155
 
148
156
  @Override
@@ -174,14 +182,17 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
174
182
  }
175
183
  }
176
184
 
177
- @ReactMethod
185
+ @ReactMethod
178
186
  public void start(String documentId, String identifier, String tokenId, ReadableMap additionalData, ReadableMap config, Promise promise) {
179
187
  this.resultPromise = promise;
180
188
  try {
181
189
  Intent intent = new Intent(this.getCurrentActivity(), DigioActivity.class);
190
+ // set everything under digioConfig
182
191
  DigioConfig digioConfig = new DigioConfig();
183
192
  String environment = config.getString("environment");
184
193
  String logo = config.getString("logo");
194
+ String mode = config.getString("mode");
195
+ // Log.e("Digio_mode ", ""+mode);
185
196
  if (!TextUtils.isEmpty(environment)) {
186
197
  try {
187
198
  digioConfig.setEnvironment(DigioEnvironment.valueOf(environment.toUpperCase(Locale.ENGLISH)));
@@ -217,17 +228,16 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
217
228
 
218
229
  digioConfig.setTheme(digioTheme);
219
230
 
220
- intent.putExtra("config", digioConfig);
221
- intent.putExtra("aar_version", AAR_VERSION);
222
- if (documentId.startsWith("ENA") || documentId.startsWith("DID")) {
223
- intent.putExtra("navigation_graph", in.digio.sdk.esign.R.navigation.esign);
224
- } else {
225
- intent.putExtra("navigation_graph", in.digio.sdk.kyc.R.navigation.workflow);
231
+ digioConfig.setAarVersion(AAR_VERSION);
232
+ if (!TextUtils.isEmpty(mode)) {
233
+ digioConfig.setServiceMode(DigioServiceMode.valueOf(mode.toUpperCase(Locale.ENGLISH)));
226
234
  }
227
235
 
228
- intent.putExtra("document_id", documentId);
229
- intent.putExtra("customer_identifier", identifier);
230
- intent.putExtra("token_id", tokenId);
236
+ digioConfig.setGToken(tokenId);
237
+ digioConfig.setRequestId(documentId);
238
+ digioConfig.setUserIdentifier(identifier);
239
+ digioConfig.setLinkApproach(false);
240
+
231
241
  HashMap additionalDataMap = new HashMap();
232
242
  if (additionalData != null) {
233
243
  Iterator<Map.Entry<String, Object>> entryIterator = additionalData.getEntryIterator();
@@ -236,7 +246,9 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
236
246
  additionalDataMap.put(objectEntry.getKey(), objectEntry.getValue());
237
247
  }
238
248
  }
239
- intent.putExtra("additional_data", additionalDataMap);
249
+ digioConfig.setAdditionalData(additionalDataMap);
250
+ intent.putExtra("config", digioConfig);
251
+
240
252
  this.getCurrentActivity().startActivityForResult(intent, DIGIO_ACTIVITY);
241
253
  } catch (Exception e) {
242
254
  // Throws DigioException if WorkflowResponseListener is not implemented/passed, or
@@ -10,8 +10,15 @@ Object.defineProperty(exports, "Environment", {
10
10
  return _environment.Environment;
11
11
  }
12
12
  });
13
+ Object.defineProperty(exports, "ServiceMode", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _service_mode.ServiceMode;
17
+ }
18
+ });
13
19
  var _reactNative = require("react-native");
14
20
  var _environment = require("./types/enums/environment");
21
+ var _service_mode = require("./types/enums/service_mode");
15
22
  const LINKING_ERROR = `The package 'digio-react-native' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
16
23
  ios: "- You have run 'pod install'\n",
17
24
  default: ''
@@ -51,6 +58,7 @@ class Digio {
51
58
  return {
52
59
  environment: this.config.environment,
53
60
  logo: this.config.logo,
61
+ mode: this.config.serviceMode,
54
62
  ...this.config.theme
55
63
  };
56
64
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_environment","LINKING_ERROR","Platform","select","ios","default","DigioReactNative","NativeModules","Proxy","get","Error","Digio","constructor","config","addGatewayEventListener","callback","OS","DeviceEventEmitter","addListener","data","digioReactNativeEmitter","NativeEventEmitter","start","documentId","identifier","tokenId","additionalData","buildConfigParams","environment","logo","theme","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAWA,IAAAC,YAAA,GAAAD,OAAA;AAEA,MAAME,aAAa,GACjB,6EAA6E,GAC7EC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,gBAAgB,GAAGC,0BAAa,CAACD,gBAAgB,GACnDC,0BAAa,CAACD,gBAAgB,GAC9B,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAWE,MAAMU,KAAK,CAAC;EAGjBC,WAAWA,CAACC,MAAmB,EAAE;IAC/B,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;EAEAC,uBAAuBA,CACrBC,QAAgC,EACX;IACrB,IAAIb,qBAAQ,CAACc,EAAE,KAAK,SAAS,EAAE;MAC7B,OAAOC,+BAAkB,CAACC,WAAW,CAAC,cAAc,EAAGC,IAAI,IAAK;QAC9D,IAAIJ,QAAQ,EAAE;UACZA,QAAQ,CAACI,IAAI,CAAC;QAChB;MACF,CAAC,CAAC;IACJ;IACA,IAAIjB,qBAAQ,CAACc,EAAE,KAAK,KAAK,EAAE;MACzB,MAAMI,uBAAuB,GAAG,IAAIC,+BAAkB,CAACf,gBAAgB,CAAC;MACxE,OAAOc,uBAAuB,CAACF,WAAW,CAAC,cAAc,EAAGC,IAAI,IAAK;QACnE,IAAIJ,QAAQ,EAAE;UACZA,QAAQ,CAACI,IAAI,CAAC;QAChB;MACF,CAAC,CAAC;IACJ;IACA,MAAMT,KAAK,CAAC,YAAYR,qBAAQ,CAACc,EAAE,gBAAgB,CAAC;EACtD;EAEA,MAAMM,KAAKA,CACTC,UAAkB,EAClBC,UAAkB,EAClBC,OAAgB,EAChBC,cAA0C,EAClB;IACxB,OAAOpB,gBAAgB,CAACgB,KAAK,CAC3BC,UAAU,EACVC,UAAU,EACVC,OAAO,IAAI,IAAI,EACfC,cAAc,IAAI,IAAI,EACtB,IAAI,CAACC,iBAAiB,CAAC,CAAC,IAAI,IAC9B,CAAC;EACH;EAEQA,iBAAiBA,CAAA,EAAG;IAC1B,IAAI,CAAC,IAAI,CAACd,MAAM,EAAE;IAClB,OAAO;MACLe,WAAW,EAAE,IAAI,CAACf,MAAM,CAACe,WAAW;MACpCC,IAAI,EAAE,IAAI,CAAChB,MAAM,CAACgB,IAAI;MACtB,GAAG,IAAI,CAAChB,MAAM,CAACiB;IACjB,CAAC;EACH;AACF;AAACC,OAAA,CAAApB,KAAA,GAAAA,KAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_environment","_service_mode","LINKING_ERROR","Platform","select","ios","default","DigioReactNative","NativeModules","Proxy","get","Error","Digio","constructor","config","addGatewayEventListener","callback","OS","DeviceEventEmitter","addListener","data","digioReactNativeEmitter","NativeEventEmitter","start","documentId","identifier","tokenId","additionalData","buildConfigParams","environment","logo","mode","serviceMode","theme","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;A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CAACgB,KAAK,CAC3BC,UAAU,EACVC,UAAU,EACVC,OAAO,IAAI,IAAI,EACfC,cAAc,IAAI,IAAI,EACtB,IAAI,CAACC,iBAAiB,CAAC,CAAC,IAAI,IAC9B,CAAC;EACH;EAEQA,iBAAiBA,CAAA,EAAG;IAC1B,IAAI,CAAC,IAAI,CAACd,MAAM,EAAE;IAClB,OAAO;MACLe,WAAW,EAAE,IAAI,CAACf,MAAM,CAACe,WAAW;MACpCC,IAAI,EAAE,IAAI,CAAChB,MAAM,CAACgB,IAAI;MACtBC,IAAI,EAAE,IAAI,CAACjB,MAAM,CAACkB,WAAW;MAC7B,GAAG,IAAI,CAAClB,MAAM,CAACmB;IACjB,CAAC;EACH;AACF;AAACC,OAAA,CAAAtB,KAAA,GAAAA,KAAA","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ServiceMode = void 0;
7
+ let ServiceMode = exports.ServiceMode = /*#__PURE__*/function (ServiceMode) {
8
+ ServiceMode["OTP"] = "OTP";
9
+ ServiceMode["FP"] = "FP";
10
+ ServiceMode["IRIS"] = "IRIS";
11
+ ServiceMode["FACE"] = "FACE";
12
+ return ServiceMode;
13
+ }({});
14
+ //# sourceMappingURL=service_mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ServiceMode","exports"],"sourceRoot":"../../../../src","sources":["types/enums/service_mode.ts"],"mappings":";;;;;;IAAYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
1
  import { DeviceEventEmitter, NativeEventEmitter, NativeModules, Platform } from 'react-native';
2
2
  export { Environment } from './types/enums/environment';
3
+ export { ServiceMode } from './types/enums/service_mode';
3
4
  const LINKING_ERROR = `The package 'digio-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
4
5
  ios: "- You have run 'pod install'\n",
5
6
  default: ''
@@ -39,6 +40,7 @@ export class Digio {
39
40
  return {
40
41
  environment: this.config.environment,
41
42
  logo: this.config.logo,
43
+ mode: this.config.serviceMode,
42
44
  ...this.config.theme
43
45
  };
44
46
  }
@@ -1 +1 @@
1
- {"version":3,"names":["DeviceEventEmitter","NativeEventEmitter","NativeModules","Platform","Environment","LINKING_ERROR","select","ios","default","DigioReactNative","Proxy","get","Error","Digio","constructor","config","addGatewayEventListener","callback","OS","addListener","data","digioReactNativeEmitter","start","documentId","identifier","tokenId","additionalData","buildConfigParams","environment","logo","theme"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,SACEA,kBAAkB,EAClBC,kBAAkB,EAClBC,aAAa,EACbC,QAAQ,QACH,cAAc;AAMrB,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,aAAa,GACjB,6EAA6E,GAC7EF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,gBAAgB,GAAGP,aAAa,CAACO,gBAAgB,GACnDP,aAAa,CAACO,gBAAgB,GAC9B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAWL,OAAO,MAAMQ,KAAK,CAAC;EAGjBC,WAAWA,CAACC,MAAmB,EAAE;IAC/B,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;EAEAC,uBAAuBA,CACrBC,QAAgC,EACX;IACrB,IAAId,QAAQ,CAACe,EAAE,KAAK,SAAS,EAAE;MAC7B,OAAOlB,kBAAkB,CAACmB,WAAW,CAAC,cAAc,EAAGC,IAAI,IAAK;QAC9D,IAAIH,QAAQ,EAAE;UACZA,QAAQ,CAACG,IAAI,CAAC;QAChB;MACF,CAAC,CAAC;IACJ;IACA,IAAIjB,QAAQ,CAACe,EAAE,KAAK,KAAK,EAAE;MACzB,MAAMG,uBAAuB,GAAG,IAAIpB,kBAAkB,CAACQ,gBAAgB,CAAC;MACxE,OAAOY,uBAAuB,CAACF,WAAW,CAAC,cAAc,EAAGC,IAAI,IAAK;QACnE,IAAIH,QAAQ,EAAE;UACZA,QAAQ,CAACG,IAAI,CAAC;QAChB;MACF,CAAC,CAAC;IACJ;IACA,MAAMR,KAAK,CAAC,YAAYT,QAAQ,CAACe,EAAE,gBAAgB,CAAC;EACtD;EAEA,MAAMI,KAAKA,CACTC,UAAkB,EAClBC,UAAkB,EAClBC,OAAgB,EAChBC,cAA0C,EAClB;IACxB,OAAOjB,gBAAgB,CAACa,KAAK,CAC3BC,UAAU,EACVC,UAAU,EACVC,OAAO,IAAI,IAAI,EACfC,cAAc,IAAI,IAAI,EACtB,IAAI,CAACC,iBAAiB,CAAC,CAAC,IAAI,IAC9B,CAAC;EACH;EAEQA,iBAAiBA,CAAA,EAAG;IAC1B,IAAI,CAAC,IAAI,CAACZ,MAAM,EAAE;IAClB,OAAO;MACLa,WAAW,EAAE,IAAI,CAACb,MAAM,CAACa,WAAW;MACpCC,IAAI,EAAE,IAAI,CAACd,MAAM,CAACc,IAAI;MACtB,GAAG,IAAI,CAACd,MAAM,CAACe;IACjB,CAAC;EACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["DeviceEventEmitter","NativeEventEmitter","NativeModules","Platform","Environment","ServiceMode","LINKING_ERROR","select","ios","default","DigioReactNative","Proxy","get","Error","Digio","constructor","config","addGatewayEventListener","callback","OS","addListener","data","digioReactNativeEmitter","start","documentId","identifier","tokenId","additionalData","buildConfigParams","environment","logo","mode","serviceMode","theme"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,SACEA,kBAAkB,EAClBC,kBAAkB,EAClBC,aAAa,EACbC,QAAQ,QACH,cAAc;AA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B,gBAAgB,CAACa,KAAK,CAC3BC,UAAU,EACVC,UAAU,EACVC,OAAO,IAAI,IAAI,EACfC,cAAc,IAAI,IAAI,EACtB,IAAI,CAACC,iBAAiB,CAAC,CAAC,IAAI,IAC9B,CAAC;EACH;EAEQA,iBAAiBA,CAAA,EAAG;IAC1B,IAAI,CAAC,IAAI,CAACZ,MAAM,EAAE;IAClB,OAAO;MACLa,WAAW,EAAE,IAAI,CAACb,MAAM,CAACa,WAAW;MACpCC,IAAI,EAAE,IAAI,CAACd,MAAM,CAACc,IAAI;MACtBC,IAAI,EAAE,IAAI,CAACf,MAAM,CAACgB,WAAW;MAC7B,GAAG,IAAI,CAAChB,MAAM,CAACiB;IACjB,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ export let ServiceMode = /*#__PURE__*/function (ServiceMode) {
2
+ ServiceMode["OTP"] = "OTP";
3
+ ServiceMode["FP"] = "FP";
4
+ ServiceMode["IRIS"] = "IRIS";
5
+ ServiceMode["FACE"] = "FACE";
6
+ return ServiceMode;
7
+ }({});
8
+ //# sourceMappingURL=service_mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ServiceMode"],"sourceRoot":"../../../../src","sources":["types/enums/service_mode.ts"],"mappings":"AAAA,WAAYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
@@ -3,6 +3,7 @@ import type { DigioConfig } from './types/interfaces/digio_config';
3
3
  import type { DigioResponse } from './types/interfaces/digio_response';
4
4
  import type { GatewayEvent } from './types/interfaces/gateway_event';
5
5
  export { Environment } from './types/enums/environment';
6
+ export { ServiceMode } from './types/enums/service_mode';
6
7
  type GatewayEventCallbackFn = (data: GatewayEvent) => void;
7
8
  export type { DigioConfig, DigioResponse, GatewayEvent, GatewayEventCallbackFn, };
8
9
  export declare class Digio {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAmBxD,KAAK,sBAAsB,GAAG,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;AAE3D,YAAY,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,sBAAsB,GACvB,CAAC;AAEF,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAI/B,uBAAuB,CACrB,QAAQ,EAAE,sBAAsB,GAC/B,mBAAmB;IAmBhB,KAAK,CACT,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GACzC,OAAO,CAAC,aAAa,CAAC;IAUzB,OAAO,CAAC,iBAAiB;CAQ1B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAmBzD,KAAK,sBAAsB,GAAG,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;AAE3D,YAAY,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,sBAAsB,GACvB,CAAC;AAEF,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAI/B,uBAAuB,CACrB,QAAQ,EAAE,sBAAsB,GAC/B,mBAAmB;IAmBhB,KAAK,CACT,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GACzC,OAAO,CAAC,aAAa,CAAC;IAUzB,OAAO,CAAC,iBAAiB;CAS1B"}
@@ -0,0 +1,7 @@
1
+ export declare enum ServiceMode {
2
+ OTP = "OTP",
3
+ FP = "FP",
4
+ IRIS = "IRIS",
5
+ FACE = "FACE"
6
+ }
7
+ //# sourceMappingURL=service_mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service_mode.d.ts","sourceRoot":"","sources":["../../../../../src/types/enums/service_mode.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACnB,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,IAAI,SAAS;IACb,IAAI,SAAS;CAChB"}
@@ -1,8 +1,10 @@
1
1
  import { Environment } from '../enums/environment';
2
+ import type { ServiceMode } from '../enums/service_mode';
2
3
  import type { Theme } from './theme';
3
4
  export interface DigioConfig {
4
5
  logo?: string;
5
6
  environment?: Environment;
6
7
  theme?: Theme;
8
+ serviceMode?: ServiceMode;
7
9
  }
8
10
  //# sourceMappingURL=digio_config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"digio_config.d.ts","sourceRoot":"","sources":["../../../../../src/types/interfaces/digio_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
1
+ {"version":3,"file":"digio_config.d.ts","sourceRoot":"","sources":["../../../../../src/types/interfaces/digio_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digiotech/react-native",
3
- "version": "1.0.18",
3
+ "version": "2.0.1",
4
4
  "description": "SDK for invoking client side journey for any of Digio request",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@ import type { DigioResponse } from './types/interfaces/digio_response';
10
10
  import type { GatewayEvent } from './types/interfaces/gateway_event';
11
11
 
12
12
  export { Environment } from './types/enums/environment';
13
+ export { ServiceMode } from './types/enums/service_mode';
13
14
 
14
15
  const LINKING_ERROR =
15
16
  `The package 'digio-react-native' doesn't seem to be linked. Make sure: \n\n` +
@@ -85,6 +86,7 @@ export class Digio {
85
86
  return {
86
87
  environment: this.config.environment,
87
88
  logo: this.config.logo,
89
+ mode: this.config.serviceMode,
88
90
  ...this.config.theme,
89
91
  };
90
92
  }
@@ -0,0 +1,6 @@
1
+ export enum ServiceMode {
2
+ OTP = 'OTP',
3
+ FP = 'FP',
4
+ IRIS = 'IRIS',
5
+ FACE = 'FACE',
6
+ }
@@ -1,8 +1,10 @@
1
1
  import { Environment } from '../enums/environment';
2
+ import type { ServiceMode } from '../enums/service_mode';
2
3
  import type { Theme } from './theme';
3
4
 
4
5
  export interface DigioConfig {
5
6
  logo?: string;
6
7
  environment?: Environment;
7
8
  theme?: Theme;
9
+ serviceMode?: ServiceMode;
8
10
  }