react-native-risk-sdk 1.6.6 → 1.6.8
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/CHANGELOG.md
CHANGED
|
@@ -19,14 +19,13 @@ import java.util.concurrent.TimeUnit;
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
import in.finbox.mobileriskmanager.FinBox;
|
|
22
|
+
import in.finbox.mobileriskmanager.FinBoxAuthCallback;
|
|
22
23
|
import in.finbox.mobileriskmanager.common.annotations.FinBoxErrorCode;
|
|
23
24
|
import in.finbox.mobileriskmanager.devicematch.DeviceMatch;
|
|
24
25
|
import in.finbox.mobileriskmanager.notifications.MessagingService;
|
|
25
26
|
|
|
26
27
|
public class RiskSdkModule extends ReactContextBaseJavaModule {
|
|
27
28
|
|
|
28
|
-
private final FinBox finbox = new FinBox();
|
|
29
|
-
|
|
30
29
|
private final ReactApplicationContext reactContext;
|
|
31
30
|
private static String QUOTA_LIMIT_EXCEEDED = "QUOTA_LIMIT_EXCEEDED";
|
|
32
31
|
private static String AUTHENTICATE_FAILED = "AUTHENTICATE_FAILED";
|
|
@@ -79,7 +78,7 @@ public class RiskSdkModule extends ReactContextBaseJavaModule {
|
|
|
79
78
|
return;
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
FinBox.createUser(apiKey, username, new
|
|
81
|
+
FinBox.createUser(apiKey, username, new FinBoxAuthCallback() {
|
|
83
82
|
@Override
|
|
84
83
|
public void onSuccess(@NonNull String s) {
|
|
85
84
|
successCallback.invoke(s);
|
|
@@ -93,73 +92,9 @@ public class RiskSdkModule extends ReactContextBaseJavaModule {
|
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
@ReactMethod
|
|
96
|
-
public void startPeriodicSync(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
finbox.startPeriodicSync();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Sync the data once
|
|
104
|
-
*/
|
|
105
|
-
@SuppressLint("MissingPermission")
|
|
106
|
-
@ReactMethod
|
|
107
|
-
public void syncSmsData() {
|
|
108
|
-
FinBox.syncSmsData();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Sync the data once
|
|
113
|
-
*/
|
|
114
|
-
@SuppressLint("MissingPermission")
|
|
115
|
-
@ReactMethod
|
|
116
|
-
public void syncPermissionData() {
|
|
117
|
-
FinBox.syncPermissionData();
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Sync the data once
|
|
122
|
-
*/
|
|
123
|
-
@SuppressLint("MissingPermission")
|
|
124
|
-
@ReactMethod
|
|
125
|
-
public void syncContactsData() {
|
|
126
|
-
FinBox.syncContactsData();
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Sync the data once
|
|
131
|
-
*/
|
|
132
|
-
@SuppressLint("MissingPermission")
|
|
133
|
-
@ReactMethod
|
|
134
|
-
public void syncCallData() {
|
|
135
|
-
FinBox.syncCallData();
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Sync the data once
|
|
140
|
-
*/
|
|
141
|
-
@SuppressLint("MissingPermission")
|
|
142
|
-
@ReactMethod
|
|
143
|
-
public void syncLocationData() {
|
|
144
|
-
FinBox.syncLocationData();
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Sync the data once
|
|
149
|
-
*/
|
|
150
|
-
@SuppressLint("MissingPermission")
|
|
151
|
-
@ReactMethod
|
|
152
|
-
public void syncDeviceData() {
|
|
153
|
-
FinBox.syncDeviceData();
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Sync the data once
|
|
158
|
-
*/
|
|
159
|
-
@SuppressLint("MissingPermission")
|
|
160
|
-
@ReactMethod
|
|
161
|
-
public void syncAppsListData() {
|
|
162
|
-
FinBox.syncAppsListData();
|
|
95
|
+
public void startPeriodicSync(long duration, TimeUnit unit) {
|
|
96
|
+
FinBox.setSyncFrequency(duration, unit);
|
|
97
|
+
FinBox.startPeriodicSync();
|
|
163
98
|
}
|
|
164
99
|
|
|
165
100
|
/**
|
|
@@ -167,7 +102,7 @@ public class RiskSdkModule extends ReactContextBaseJavaModule {
|
|
|
167
102
|
*/
|
|
168
103
|
@ReactMethod
|
|
169
104
|
public void syncOnce() {
|
|
170
|
-
|
|
105
|
+
FinBox.syncOnce();
|
|
171
106
|
}
|
|
172
107
|
|
|
173
108
|
@ReactMethod
|
|
@@ -182,7 +117,7 @@ public class RiskSdkModule extends ReactContextBaseJavaModule {
|
|
|
182
117
|
if (phone != null) {
|
|
183
118
|
deviceMatchBuilder.setPhone(phone);
|
|
184
119
|
}
|
|
185
|
-
|
|
120
|
+
FinBox.setDeviceMatch(deviceMatchBuilder.build());
|
|
186
121
|
}
|
|
187
122
|
|
|
188
123
|
/**
|
|
@@ -206,8 +141,8 @@ public class RiskSdkModule extends ReactContextBaseJavaModule {
|
|
|
206
141
|
* @param duration Time to set the frequency
|
|
207
142
|
*/
|
|
208
143
|
@ReactMethod
|
|
209
|
-
public void setSyncFrequency(Integer duration) {
|
|
210
|
-
|
|
144
|
+
public void setSyncFrequency(Integer duration, TimeUnit unit) {
|
|
145
|
+
FinBox.setSyncFrequency(duration, unit);
|
|
211
146
|
}
|
|
212
147
|
|
|
213
148
|
/**
|
|
@@ -215,7 +150,7 @@ public class RiskSdkModule extends ReactContextBaseJavaModule {
|
|
|
215
150
|
*/
|
|
216
151
|
@ReactMethod
|
|
217
152
|
public void stopPeriodicSync() {
|
|
218
|
-
|
|
153
|
+
FinBox.stopPeriodicSync();
|
|
219
154
|
}
|
|
220
155
|
|
|
221
156
|
/**
|