contour-ai-sdk 1.15.1-alpha.1 → 1.15.1-alpha.3
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/android/build.gradle +1 -1
- package/android/src/main/java/com/contouraisdk/ContourAiSdkModule.java +20 -3
- package/contour-ai-sdk.podspec +1 -1
- package/ios/ContourAiSdk.mm +18 -7
- package/ios/ContourModel.h +1 -0
- package/ios/ContourModel.m +1 -0
- package/lib/commonjs/index.js +4 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +5 -0
package/android/build.gradle
CHANGED
|
@@ -90,5 +90,5 @@ dependencies {
|
|
|
90
90
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
91
91
|
//noinspection GradleDynamicVersion
|
|
92
92
|
implementation("com.facebook.react:react-android")
|
|
93
|
-
implementation 'com.github.Contour-Document-Imaging:contours-ai-android-sdk:1.
|
|
93
|
+
implementation 'com.github.Contour-Document-Imaging:contours-ai-android-sdk:1.15.0'
|
|
94
94
|
}
|
|
@@ -12,6 +12,7 @@ import com.contourdocumentimaging.android.contours_ai.models.ContoursCapturingMo
|
|
|
12
12
|
import com.contourdocumentimaging.android.contours_ai.models.ContoursScanType;
|
|
13
13
|
import com.contourdocumentimaging.android.contours_ai.models.ContoursModel;
|
|
14
14
|
import com.contourdocumentimaging.android.contours_ai.models.ContoursResultModel;
|
|
15
|
+
import com.contourdocumentimaging.android.contours_ai.models.ContoursEnvironment;
|
|
15
16
|
import com.facebook.react.bridge.Promise;
|
|
16
17
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
17
18
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
@@ -60,15 +61,25 @@ public class ContourAiSdkModule extends ReactContextBaseJavaModule {
|
|
|
60
61
|
boolean enableMultipleCapturing = options.getBoolean("enableMultipleCapturing");
|
|
61
62
|
String type = options.getString("type");
|
|
62
63
|
String capturingSide = options.getString("capturingSide");
|
|
63
|
-
|
|
64
|
+
String environmentType = options.getString("environmentType");
|
|
65
|
+
startContourSDK(capturingSide, clientId, captureType, enableMultipleCapturing, type, environmentType);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
@ReactMethod
|
|
67
69
|
public void startContourSDK(String captureSide, String clientID, String captureType, boolean enableMultipleCheckCapturing) {
|
|
68
|
-
startContourSDK(captureSide, clientID, captureType, enableMultipleCheckCapturing, null);
|
|
70
|
+
startContourSDK(captureSide, clientID, captureType, enableMultipleCheckCapturing, null, "prod");
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
@ReactMethod
|
|
74
|
+
public void initialize(String clientId, String environmentType) {
|
|
75
|
+
if (environmentType != null && environmentType.equalsIgnoreCase("dev")) {
|
|
76
|
+
ContoursStarterActivity.Companion.initialize(context, clientId, ContoursEnvironment.DEV);
|
|
77
|
+
}else{
|
|
78
|
+
ContoursStarterActivity.Companion.initialize(context, clientId, ContoursEnvironment.PROD);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public void startContourSDK(String captureSide, String clientID, String captureType, boolean enableMultipleCapturing, String type, String environmentType) {
|
|
72
83
|
//Put this code before launching sdk to capture check
|
|
73
84
|
ContoursModel contoursModel = new ContoursModel();
|
|
74
85
|
if(captureType.equalsIgnoreCase("auto")) {
|
|
@@ -97,6 +108,12 @@ public class ContourAiSdkModule extends ReactContextBaseJavaModule {
|
|
|
97
108
|
contoursModel.type = ContoursScanType.CHECK;
|
|
98
109
|
}
|
|
99
110
|
contoursModel.capturingSide = capturingSide;
|
|
111
|
+
if (environmentType != null && environmentType.equalsIgnoreCase("dev")) {
|
|
112
|
+
contoursModel.environmentType = ContoursEnvironment.DEV;
|
|
113
|
+
} else {
|
|
114
|
+
contoursModel.environmentType = ContoursEnvironment.PROD;
|
|
115
|
+
}
|
|
116
|
+
|
|
100
117
|
ContoursStarterActivity.Companion.launchSdk(context, contoursModel, clientID, new IContoursResultListener() {
|
|
101
118
|
@Override
|
|
102
119
|
public void onCaptureSuccess(ContoursResultModel contoursResultModel) {
|
package/contour-ai-sdk.podspec
CHANGED
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source = { :git => "https://github.com/Contour-Document-Imaging/contour-react-native.git", :tag => "#{s.version}" }
|
|
17
17
|
|
|
18
18
|
s.source_files = "ios/**/*.{h,m,mm}"
|
|
19
|
-
s.dependency "ContoursAISDK", '1.
|
|
19
|
+
s.dependency "ContoursAISDK", '1.15.0'
|
|
20
20
|
|
|
21
21
|
if respond_to?(:install_modules_dependencies, true)
|
|
22
22
|
install_modules_dependencies(s)
|
package/ios/ContourAiSdk.mm
CHANGED
|
@@ -9,24 +9,30 @@ RCT_EXPORT_MODULE()
|
|
|
9
9
|
|
|
10
10
|
RCT_REMAP_METHOD(startContourSDK,
|
|
11
11
|
CapturingSide:(NSString *)captureSide withClientId:(NSString *)clientID withCaptureType:(NSString *)captureType withEnableMultipleCheckCapturing:(BOOL) enableMultipleCheckCapturing ) {
|
|
12
|
-
|
|
12
|
+
[self openContoursSDKwithClientId:clientID withCaptureType:captureType withEnableMultipleCheckCapturing:enableMultipleCheckCapturing withType:@"check" withCapturingSide:captureSide environmentType:@""];
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
RCT_REMAP_METHOD(startContour, withModel:(NSDictionary *)model) {
|
|
16
16
|
ContourModel *sdkOptions = [[ContourModel alloc] initWithDictionary:model];
|
|
17
17
|
NSLog(@"%@",sdkOptions);
|
|
18
|
-
[self openContoursSDKwithClientId:sdkOptions.clientID withCaptureType:sdkOptions.captureType withEnableMultipleCheckCapturing:sdkOptions.enableMultipleCapturing withType:sdkOptions.type withCapturingSide:sdkOptions.capturingSide];
|
|
18
|
+
[self openContoursSDKwithClientId:sdkOptions.clientID withCaptureType:sdkOptions.captureType withEnableMultipleCheckCapturing:sdkOptions.enableMultipleCapturing withType:sdkOptions.type withCapturingSide:sdkOptions.capturingSide environmentType:sdkOptions.environmentType];
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
RCT_REMAP_METHOD(initialize, ClientId:(NSString *)ClientId environmentType: (NSString *)environmentType) {
|
|
22
|
+
[self initializeSdkClientId:ClientId environmentType:environmentType];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
-(void)openContoursSDKwithClientId:(NSString *)clientId withCaptureType:(NSString *)captureType withEnableMultipleCheckCapturing:(BOOL) enableMultipleCheckCapturing withType:(NSString *)type withCapturingSide:(NSString *)capturingSide environmentType:(NSString *) environmentType {
|
|
22
27
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
|
23
28
|
[self removeFile];
|
|
24
29
|
UINavigationController *navController = (UINavigationController *)[[[UIApplication sharedApplication] keyWindow] rootViewController];
|
|
25
30
|
ContoursModel *model = [[ContoursModel alloc] initWithClientId:clientId
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
captureType:captureType
|
|
32
|
+
type:type
|
|
33
|
+
capturingSide:capturingSide
|
|
34
|
+
environmentType:environmentType
|
|
35
|
+
delegate:self];
|
|
30
36
|
ContoursAIFramework *contourCaptureViewController = [[ContoursAIFramework alloc] init];
|
|
31
37
|
UIViewController *capturingVC = [contourCaptureViewController startContourWithConfigModel:model enableMultipleCapturing:enableMultipleCheckCapturing];
|
|
32
38
|
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:capturingVC];
|
|
@@ -63,6 +69,11 @@ RCT_REMAP_METHOD(startContour, withModel:(NSDictionary *)model) {
|
|
|
63
69
|
[self sendEventWithName:@"onEventCaptured" body: data];
|
|
64
70
|
}
|
|
65
71
|
|
|
72
|
+
-(void)initializeSdkClientId:(NSString *)ClientId environmentType: (NSString *)environmentType {
|
|
73
|
+
ContoursAIFramework *contourCaptureViewController = [[ContoursAIFramework alloc] init];
|
|
74
|
+
[contourCaptureViewController initializeWithClientID:ClientId environmentType:environmentType];
|
|
75
|
+
}
|
|
76
|
+
|
|
66
77
|
// Adding the image in NSTemporaryDirectory.
|
|
67
78
|
- (NSString *) addFileToDirectoryFileName:(NSString *)fileName image:(UIImage *)image{
|
|
68
79
|
[[NSFileManager defaultManager] createDirectoryAtPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"contourTemp"]
|
package/ios/ContourModel.h
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@property (nonatomic, strong) NSString *clientID;
|
|
7
7
|
@property (nonatomic, strong) NSString *captureType;
|
|
8
8
|
@property (nonatomic, assign) BOOL enableMultipleCapturing;
|
|
9
|
+
@property (nonatomic, assign) NSString *environmentType;
|
|
9
10
|
@property (nonatomic, strong) NSString *type;
|
|
10
11
|
|
|
11
12
|
- (instancetype)initWithDictionary:(NSDictionary *)dict;
|
package/ios/ContourModel.m
CHANGED
package/lib/commonjs/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.initialize = initialize;
|
|
6
7
|
exports.onContourClosed = onContourClosed;
|
|
7
8
|
exports.onEventCaptured = onEventCaptured;
|
|
8
9
|
exports.startContour = startContour;
|
|
@@ -31,6 +32,9 @@ function startContourSDK(captureSide, clientId, captureType, enableMultipleCheck
|
|
|
31
32
|
});
|
|
32
33
|
ContourAiSdk.startContourSDK(captureSide, clientId, captureType, enableMultipleCheckCapturing);
|
|
33
34
|
}
|
|
35
|
+
function initialize(clientId, environmentType = "prod") {
|
|
36
|
+
ContourAiSdk.initialize(clientId, environmentType);
|
|
37
|
+
}
|
|
34
38
|
function startContour(model, callback) {
|
|
35
39
|
const count = eventEmitter.listenerCount('checkCaptured');
|
|
36
40
|
if (count > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","ContourAiSdk","NativeModules","Proxy","get","Error","eventEmitter","NativeEventEmitter","startContourSDK","captureSide","clientId","captureType","enableMultipleCheckCapturing","callback","count","listenerCount","removeAllListeners","addListener","response","startContour","model","onContourClosed","onEventCaptured"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","ContourAiSdk","NativeModules","Proxy","get","Error","eventEmitter","NativeEventEmitter","startContourSDK","captureSide","clientId","captureType","enableMultipleCheckCapturing","callback","count","listenerCount","removeAllListeners","addListener","response","initialize","environmentType","startContour","model","onContourClosed","onEventCaptured"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAUA,MAAMC,aAAa,GACjB,yEAAyE,GACzEC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,YAAY,GAAGC,0BAAa,CAACD,YAAY,GAC3CC,0BAAa,CAACD,YAAY,GAC1B,IAAIE,KAAK,CACT,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEH,MAAMU,YAAY,GAAG,IAAIC,+BAAkB,CAACL,0BAAa,CAACD,YAAY,CAAC;AACvE;AACA;AACA;AACO,SAASO,eAAeA,CAACC,WAAmB,EAAEC,QAAgB,EAAEC,WAAmB,EAAEC,4BAAqC,EAAEC,QAA6B,EAAE;EAChK,MAAMC,KAAK,GAAGR,YAAY,CAACS,aAAa,CAAC,eAAe,CAAC;EACzD,IAAID,KAAK,GAAG,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iB,CAAC;EACpD;EACAV,YAAY,CAACW,WAAW,CAAC,iBAAiB,EAAGC,QAAa,IAAK;IAC7DL,QAAQ,CAACK,QAAQ,CAAC;EACpB,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -22,6 +22,9 @@ export function startContourSDK(captureSide, clientId, captureType, enableMultip
|
|
|
22
22
|
});
|
|
23
23
|
ContourAiSdk.startContourSDK(captureSide, clientId, captureType, enableMultipleCheckCapturing);
|
|
24
24
|
}
|
|
25
|
+
export function initialize(clientId, environmentType = "prod") {
|
|
26
|
+
ContourAiSdk.initialize(clientId, environmentType);
|
|
27
|
+
}
|
|
25
28
|
export function startContour(model, callback) {
|
|
26
29
|
const count = eventEmitter.listenerCount('checkCaptured');
|
|
27
30
|
if (count > 0) {
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","NativeEventEmitter","Platform","LINKING_ERROR","select","ios","default","ContourAiSdk","Proxy","get","Error","eventEmitter","startContourSDK","captureSide","clientId","captureType","enableMultipleCheckCapturing","callback","count","listenerCount","removeAllListeners","addListener","response","startContour","model","onContourClosed","onEventCaptured"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["NativeModules","NativeEventEmitter","Platform","LINKING_ERROR","select","ios","default","ContourAiSdk","Proxy","get","Error","eventEmitter","startContourSDK","captureSide","clientId","captureType","enableMultipleCheckCapturing","callback","count","listenerCount","removeAllListeners","addListener","response","initialize","environmentType","startContour","model","onContourClosed","onEventCaptured"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAU1E,MAAMC,aAAa,GACjB,yEAAyE,GACzED,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE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QAAQ,CAACK,QAAQ,CAAC;EACpB,CAAC,CAAC;EACFf,YAAY,CAACkB,YAAY,CAACC,KAAK,CAAC;AAClC;AAIA,OAAO,SAASC,eAAeA,CAACV,QAAoB,EAAE;EACpD,MAAMC,KAAK,GAAGP,YAAY,CAACQ,aAAa,CAAC,gBAAgB,CAAC;EAC1D,IAAID,KAAK,GAAG,CAAC,EAAE;IACbP,YAAY,CAACS,kBAAkB,CAAC,gBAAgB,CAAC;EACnD;EACAT,YAAY,CAACU,WAAW,CAAC,gBAAgB,EAAE,MAAM;IAC/CJ,QAAQ,CAAC,CAAC;EACZ,CAAC,CAAC;AACJ;AACA,OAAO,SAASW,eAAeA,CAACX,QAA6B,EAAE;EAC7D,MAAMC,KAAK,GAAGP,YAAY,CAACQ,aAAa,CAAC,iBAAiB,CAAC;EAC3D,IAAID,KAAK,GAAG,CAAC,EAAE;IACbP,YAAY,CAACS,kBAAkB,CAAC,iBAAiB,CAAC;EACpD;EACAT,YAAY,CAACU,WAAW,CAAC,iBAAiB,EAAGC,QAAa,IAAK;IAC7DL,QAAQ,CAACK,QAAQ,CAAC;EACpB,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -4,11 +4,13 @@ export interface ContourModel {
|
|
|
4
4
|
enableMultipleCapturing: boolean;
|
|
5
5
|
type: string;
|
|
6
6
|
capturingSide: string;
|
|
7
|
+
environmentType?: string;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* @deprecated This method has been deprecated. Please use startContour(model: ContourModel) method instead.
|
|
10
11
|
*/
|
|
11
12
|
export declare function startContourSDK(captureSide: string, clientId: string, captureType: string, enableMultipleCheckCapturing: Boolean, callback: (data: any) => void): void;
|
|
13
|
+
export declare function initialize(clientId: string, environmentType?: string): void;
|
|
12
14
|
export declare function startContour(model: ContourModel, callback: (data: any) => void): void;
|
|
13
15
|
export declare function onContourClosed(callback: () => void): void;
|
|
14
16
|
export declare function onEventCaptured(callback: (data: any) => void): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAmBD;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,4BAA4B,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,QAS/J;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,GAAE,MAAe,QAE5E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,QAS9E;AAID,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,QAQnD;AACD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,QAQ5D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contour-ai-sdk",
|
|
3
|
-
"version": "1.15.1-alpha.
|
|
3
|
+
"version": "1.15.1-alpha.3",
|
|
4
4
|
"description": "The Contour AI SDK™ has been designed to be the industry’s most intuitive, and protected, experience for mobile image capture - capturing documents of various kinds via an iOS™ or Android™ mobile device. At the same time, it has been designed to enable the clear, accurate, and complete processing of these documents with limited, if any, human intervention, all while improving your efficiencies and reducing costs.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
package/src/index.tsx
CHANGED
|
@@ -6,6 +6,7 @@ export interface ContourModel {
|
|
|
6
6
|
enableMultipleCapturing: boolean;
|
|
7
7
|
type: string;
|
|
8
8
|
capturingSide: string;
|
|
9
|
+
environmentType?: string;
|
|
9
10
|
}
|
|
10
11
|
const LINKING_ERROR =
|
|
11
12
|
`The package 'contour-ai-sdk' doesn't seem to be linked. Make sure: \n\n` +
|
|
@@ -39,6 +40,10 @@ export function startContourSDK(captureSide: string, clientId: string, captureTy
|
|
|
39
40
|
ContourAiSdk.startContourSDK(captureSide, clientId, captureType, enableMultipleCheckCapturing);
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
export function initialize(clientId: string, environmentType: string = "prod") {
|
|
44
|
+
ContourAiSdk.initialize(clientId, environmentType)
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
export function startContour(model: ContourModel, callback: (data: any) => void) {
|
|
43
48
|
const count = eventEmitter.listenerCount('checkCaptured');
|
|
44
49
|
if (count > 0) {
|