facia-mobilesdk 0.3.0 → 0.3.2

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.
@@ -8,8 +8,6 @@ import com.facebook.react.modules.core.*;
8
8
  import org.jetbrains.annotations.*;
9
9
 
10
10
  import android.util.Log;
11
-
12
- import com.facia.faciasdk.Activity.Helpers.Enums.DocumentType;
13
11
  import com.facia.faciasdk.FaciaAi;
14
12
 
15
13
  import org.json.JSONObject;
@@ -35,26 +33,15 @@ public class FaciaReactNativeModule extends ReactContextBaseJavaModule {
35
33
  }
36
34
 
37
35
  @ReactMethod
38
- public void verify(String docType,String configObject, Callback callback) {
36
+ public void verify(String token,String configObject, Callback callback) {
39
37
  try {
40
38
 
41
39
 
42
40
  JSONObject configJson = new JSONObject(configObject);
43
41
 
44
- if (docType.equalsIgnoreCase("ID_CARD"))
45
- {
46
- configJson.put("documentType", DocumentType.ID_CARD);
47
- }else if (docType.equalsIgnoreCase("PASSPORT"))
48
- {
49
- configJson.put("documentType", DocumentType.PASSPORT);
50
- }else
51
- {
52
- configJson.put("documentType", DocumentType.OTHERS);
53
- }
54
-
55
42
  FaciaAi faciaAi = new FaciaAi();
56
43
 
57
- faciaAi.createRequest(getCurrentActivity(), configJson, responseSet -> {
44
+ faciaAi.createRequest(token,getCurrentActivity(), configJson, responseSet -> {
58
45
  callback.invoke(new JSONObject(responseSet).toString());
59
46
  });
60
47
 
@@ -16,7 +16,7 @@ RCT_EXPORT_METHOD(testMethod:(NSString *)name location:(NSString *)location)
16
16
 
17
17
 
18
18
  // RCT_EXPORT_METHOD(verify:(NSString *)request auth:(NSString *)auth config:(NSString *)config callback: (RCTResponseSenderBlock) callback)
19
- RCT_EXPORT_METHOD(verify:(NSString *)documentType config:(NSString *)config callback: (RCTResponseSenderBlock) callback)
19
+ RCT_EXPORT_METHOD(verify:(NSString *)token config:(NSString *)config callback: (RCTResponseSenderBlock) callback)
20
20
  {
21
21
 
22
22
 
@@ -27,7 +27,7 @@ RCT_EXPORT_METHOD(verify:(NSString *)documentType config:(NSString *)config call
27
27
 
28
28
  [facia createRequestWithParentViewController:vc
29
29
  configs:[self parseJSONString:config]
30
- documentType:documentType
30
+ accessToken:token
31
31
  completion:^(NSDictionary *result) {
32
32
  NSString *response = [self convertToJSONString:result];
33
33
  callback(@[response]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "facia-mobilesdk",
3
3
  "title": "React Native Mobilesdk Module",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "description": "Facia mobile SDK",
6
6
  "main": "index.js",
7
7
  "files": [