Skip to content

Commit a57596a

Browse files
committed
refactor: update typeAll to typeCombined scanner and parser
1 parent 940622b commit a57596a

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

ios/IdscanSdk.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@implementation IdscanSdk
1111

1212
// Constants
13-
const NSString* typeAll = @"all";
13+
const NSString* typeCombined = @"combined";
1414
const NSString* typeMRZ = @"mrz";
1515
const NSString* typePDF = @"pdf";
1616

@@ -69,7 +69,7 @@ - (void)returnScanResult:(ScannerViewController *)controller scanResult:(NSStrin
6969
- (NSDictionary *)constantsToExport
7070
{
7171
return @{
72-
@"TYPE_ALL": typeAll,
72+
@"TYPE_COMBINED": typeCombined,
7373
@"TYPE_MRZ": typeMRZ,
7474
@"TYPE_PDF": typePDF
7575
};

src/index.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,30 @@ const IdscanSdk = NativeModules.IdscanSdk
2020

2121
// SDK Constants
2222
const SDKConstants = IdscanSdk.getConstants();
23+
2324
export const IDScanner_Constants = {
24-
TYPE_ALL: SDKConstants.TYPE_ALL,
25+
/**
26+
* Combined PDF and MRZ Scanner
27+
*/
28+
TYPE_COMBINED: SDKConstants.TYPE_COMBINED,
29+
30+
/**
31+
* Scan Passports
32+
*/
2533
TYPE_MRZ: SDKConstants.TYPE_MRZ,
34+
35+
/**
36+
* Scan Drivers Licenses
37+
*/
2638
TYPE_PDF: SDKConstants.TYPE_PDF,
2739
};
2840

41+
/**
42+
* Scan a Drivers License or Passport
43+
* @param type Supported scanner/parser types
44+
* @param apiKeys Object containing android and iOS API keys
45+
* @param onScanComplete Handle scan complete function
46+
*/
2947
export function scan(
3048
type: IdScannerTypes,
3149
apiKeys: APIKeys,

src/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export type ScanResult = (error: object, scanData: DLData) => void;
4747
* Scanner Types
4848
*/
4949
export enum IdScannerTypes {
50-
TYPE_ALL,
50+
TYPE_COMBINED,
5151
TYPE_MRZ,
5252
TYPE_PDF,
5353
}

0 commit comments

Comments
 (0)