@thegrizzlylabs/react-native-genius-scan 5.0.0-beta2 → 5.0.0-beta4
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/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +5 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +99 -8
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +1 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +8384 -5567
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +61 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +61 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +5 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +198 -16
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +1 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +8384 -5567
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +61 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +61 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +8384 -5567
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +61 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +61 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
- package/package.json +1 -1
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKPDFGeneratorError.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 08/02/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef GSKPDFGeneratorError_h
|
|
10
|
+
#define GSKPDFGeneratorError_h
|
|
11
|
+
|
|
12
|
+
#import <Foundation/Foundation.h>
|
|
13
|
+
|
|
14
|
+
typedef NS_CLOSED_ENUM(NSInteger, GSKPDFGeneratorError)
|
|
15
|
+
{
|
|
16
|
+
GSKPDFGeneratorErrorSuccess,
|
|
17
|
+
GSKPDFGeneratorErrorInternal,
|
|
18
|
+
GSKPDFGeneratorErrorFileNotFound,
|
|
19
|
+
GSKPDFGeneratorErrorInvalidPassword,
|
|
20
|
+
GSKPDFGeneratorErrorInvalidPageSize,
|
|
21
|
+
GSKPDFGeneratorErrorProcessorError,
|
|
22
|
+
GSKPDFGeneratorErrorInvalidInput,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
#endif /* GSKPDFGeneratorError_h */
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
typedef NS_OPTIONS(NSUInteger, GSKScanFlowStructuredData) {
|
|
8
8
|
GSKScanFlowStructuredDataNone = 0,
|
|
9
9
|
/// To scan IBAN and BIC/SWIFT codes
|
|
10
|
-
GSKScanFlowStructuredDataBankDetails = 1 << 0
|
|
10
|
+
GSKScanFlowStructuredDataBankDetails = 1 << 0,
|
|
11
|
+
/// To scan business card information
|
|
12
|
+
GSKScanFlowStructuredDataBusinessCard = 1 << 1,
|
|
13
|
+
/// To scan receipt/invoice information
|
|
14
|
+
GSKScanFlowStructuredDataReceipt = 1 << 2
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
#endif
|
package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h
CHANGED
|
@@ -511,9 +511,16 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
|
|
|
511
511
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
512
512
|
@end
|
|
513
513
|
|
|
514
|
+
typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
|
|
515
|
+
GSKReceiptCategoryGas = 0,
|
|
516
|
+
GSKReceiptCategoryTransportation = 1,
|
|
517
|
+
GSKReceiptCategoryAccomodation = 2,
|
|
518
|
+
GSKReceiptCategoryRestaurant = 3,
|
|
519
|
+
GSKReceiptCategorySupermarket = 4,
|
|
520
|
+
GSKReceiptCategoryOther = 5,
|
|
521
|
+
};
|
|
522
|
+
|
|
514
523
|
@class GSKScanFlowConfiguration;
|
|
515
|
-
@class UIViewController;
|
|
516
|
-
@class GSKScanFlowResult;
|
|
517
524
|
|
|
518
525
|
/// A high-level scanner module.
|
|
519
526
|
/// You present it and when the user is done, you obtain a result object containing the scanned documents.
|
|
@@ -521,14 +528,12 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
|
|
|
521
528
|
SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
|
|
522
529
|
@interface GSKScanFlow : NSObject
|
|
523
530
|
- (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
|
|
524
|
-
/// Present the scan flow. Asynchronously returns a <code>GSKScanFlowResult</code> object, which
|
|
525
|
-
/// gives you access to the scanned documents, or throws any error that was encountered.
|
|
526
|
-
/// @param viewController The view controller to present the scan flow from.
|
|
527
|
-
- (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
|
|
528
531
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
529
532
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
530
533
|
@end
|
|
531
534
|
|
|
535
|
+
@class UIViewController;
|
|
536
|
+
@class GSKScanFlowResult;
|
|
532
537
|
|
|
533
538
|
@interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
|
|
534
539
|
/// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
|
|
@@ -540,7 +545,7 @@ SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
|
|
|
540
545
|
/// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
|
|
541
546
|
/// a parameter. This object gives you access to the scanned documents.
|
|
542
547
|
/// @param errorBlock A block/closure called if an error was encountered.
|
|
543
|
-
- (void)
|
|
548
|
+
- (void)startFromViewController:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
|
|
544
549
|
@end
|
|
545
550
|
|
|
546
551
|
|
|
@@ -619,7 +624,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
619
624
|
@end
|
|
620
625
|
|
|
621
626
|
|
|
622
|
-
|
|
623
627
|
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
624
628
|
/// Create a configuration from a dictionary.
|
|
625
629
|
/// This is particularly useful for interfacing with React Native but shouldn’t
|
|
@@ -633,6 +637,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
633
637
|
@end
|
|
634
638
|
|
|
635
639
|
|
|
640
|
+
|
|
636
641
|
/// Enum that defines various errors that can occur during a scan flow.
|
|
637
642
|
typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
|
|
638
643
|
/// User has canceled the scan flow
|
|
@@ -697,6 +702,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
|
|
|
697
702
|
@end
|
|
698
703
|
|
|
699
704
|
|
|
705
|
+
|
|
700
706
|
/// The generated PDF paper size.
|
|
701
707
|
typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
|
|
702
708
|
/// PDF page with a width of 8.27 inch (A4 width) and fitting height.
|
|
@@ -765,16 +771,44 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
|
|
|
765
771
|
};
|
|
766
772
|
|
|
767
773
|
@class GSKScanFlowStructuredDataResultBankDetails;
|
|
774
|
+
@class GSKScanFlowStructuredDataResultContact;
|
|
775
|
+
@class GSKScanFlowStructuredDataResultReceipt;
|
|
768
776
|
|
|
769
777
|
/// The result of a structured data extraction.
|
|
770
778
|
SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
|
|
771
779
|
@interface GSKScanFlowStructuredDataResult : NSObject
|
|
772
780
|
/// Present if bank details extraction was requested, <code>nil</code> otherwise.
|
|
773
781
|
@property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
|
|
782
|
+
/// Present if business card contact extraction was requested and a contact was
|
|
783
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
784
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
|
|
785
|
+
/// Present if receipt extraction was requested and a receipt/invoice was
|
|
786
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
787
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
|
|
774
788
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
775
789
|
@end
|
|
776
790
|
|
|
777
791
|
|
|
792
|
+
|
|
793
|
+
/// Address data extracted from a business card document through OCR.
|
|
794
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
|
|
795
|
+
@interface GSKScanFlowStructuredDataResultAddress : NSObject
|
|
796
|
+
/// The city component of the address.
|
|
797
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable city;
|
|
798
|
+
/// The postal/zip code component of the address.
|
|
799
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
|
|
800
|
+
/// The street name component of the address.
|
|
801
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable street;
|
|
802
|
+
/// The state component of the address.
|
|
803
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable state;
|
|
804
|
+
/// The country component of the address.
|
|
805
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable country;
|
|
806
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
807
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
808
|
+
@end
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
778
812
|
/// The bank details extracted from a document through OCR.
|
|
779
813
|
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
780
814
|
@interface GSKScanFlowStructuredDataResultBankDetails : NSObject
|
|
@@ -786,6 +820,63 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
|
786
820
|
@end
|
|
787
821
|
|
|
788
822
|
|
|
823
|
+
@class GSKScanFlowStructuredDataResultPhoneNumber;
|
|
824
|
+
@class CNContact;
|
|
825
|
+
|
|
826
|
+
/// Contact data extracted from a business card document through OCR.
|
|
827
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
|
|
828
|
+
@interface GSKScanFlowStructuredDataResultContact : NSObject
|
|
829
|
+
/// Any name that appears on the business card. Contains the full name, including all components.
|
|
830
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable name;
|
|
831
|
+
/// Any organization that appears on the business card.
|
|
832
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable organization;
|
|
833
|
+
/// Any address that appears on the business card.
|
|
834
|
+
@property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
|
|
835
|
+
/// The phone numbers that appear on the business card.
|
|
836
|
+
@property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
|
|
837
|
+
/// The links/URLs that appear on the business card.
|
|
838
|
+
@property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
|
|
839
|
+
/// The email addresses that appear on the business card.
|
|
840
|
+
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
|
|
841
|
+
/// Return a <code>CNContact</code> representation of the contact data within this instance.
|
|
842
|
+
- (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
|
|
843
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
844
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
845
|
+
@end
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
/// Phone number data extracted from a business card document through OCR.
|
|
850
|
+
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
|
|
851
|
+
@interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
|
|
852
|
+
/// The label of the phone number. For example “Main”, “Office”, etc.
|
|
853
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull label;
|
|
854
|
+
/// A string representation of the phone number itself.
|
|
855
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull number;
|
|
856
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
857
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
858
|
+
@end
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
@class NSLocale;
|
|
862
|
+
|
|
863
|
+
/// Receipt/invoice details extracted from a document through OCR.
|
|
864
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
|
|
865
|
+
@interface GSKScanFlowStructuredDataResultReceipt : NSObject
|
|
866
|
+
/// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
867
|
+
@property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
|
|
868
|
+
/// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
|
|
869
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable merchant;
|
|
870
|
+
/// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
871
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable currency;
|
|
872
|
+
/// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
|
|
873
|
+
@property (nonatomic, readonly, copy) NSDate * _Nullable date;
|
|
874
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
875
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
876
|
+
@end
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
|
|
789
880
|
SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
|
|
790
881
|
@interface GSKTextLayout : NSObject
|
|
791
882
|
@property (nonatomic, readonly, copy) NSString * _Nullable hocr;
|
|
@@ -1360,9 +1451,16 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
|
|
|
1360
1451
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1361
1452
|
@end
|
|
1362
1453
|
|
|
1454
|
+
typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
|
|
1455
|
+
GSKReceiptCategoryGas = 0,
|
|
1456
|
+
GSKReceiptCategoryTransportation = 1,
|
|
1457
|
+
GSKReceiptCategoryAccomodation = 2,
|
|
1458
|
+
GSKReceiptCategoryRestaurant = 3,
|
|
1459
|
+
GSKReceiptCategorySupermarket = 4,
|
|
1460
|
+
GSKReceiptCategoryOther = 5,
|
|
1461
|
+
};
|
|
1462
|
+
|
|
1363
1463
|
@class GSKScanFlowConfiguration;
|
|
1364
|
-
@class UIViewController;
|
|
1365
|
-
@class GSKScanFlowResult;
|
|
1366
1464
|
|
|
1367
1465
|
/// A high-level scanner module.
|
|
1368
1466
|
/// You present it and when the user is done, you obtain a result object containing the scanned documents.
|
|
@@ -1370,14 +1468,12 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
|
|
|
1370
1468
|
SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
|
|
1371
1469
|
@interface GSKScanFlow : NSObject
|
|
1372
1470
|
- (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
|
|
1373
|
-
/// Present the scan flow. Asynchronously returns a <code>GSKScanFlowResult</code> object, which
|
|
1374
|
-
/// gives you access to the scanned documents, or throws any error that was encountered.
|
|
1375
|
-
/// @param viewController The view controller to present the scan flow from.
|
|
1376
|
-
- (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
|
|
1377
1471
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1378
1472
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1379
1473
|
@end
|
|
1380
1474
|
|
|
1475
|
+
@class UIViewController;
|
|
1476
|
+
@class GSKScanFlowResult;
|
|
1381
1477
|
|
|
1382
1478
|
@interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
|
|
1383
1479
|
/// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
|
|
@@ -1389,7 +1485,7 @@ SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
|
|
|
1389
1485
|
/// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
|
|
1390
1486
|
/// a parameter. This object gives you access to the scanned documents.
|
|
1391
1487
|
/// @param errorBlock A block/closure called if an error was encountered.
|
|
1392
|
-
- (void)
|
|
1488
|
+
- (void)startFromViewController:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
|
|
1393
1489
|
@end
|
|
1394
1490
|
|
|
1395
1491
|
|
|
@@ -1468,7 +1564,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
1468
1564
|
@end
|
|
1469
1565
|
|
|
1470
1566
|
|
|
1471
|
-
|
|
1472
1567
|
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
1473
1568
|
/// Create a configuration from a dictionary.
|
|
1474
1569
|
/// This is particularly useful for interfacing with React Native but shouldn’t
|
|
@@ -1482,6 +1577,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
1482
1577
|
@end
|
|
1483
1578
|
|
|
1484
1579
|
|
|
1580
|
+
|
|
1485
1581
|
/// Enum that defines various errors that can occur during a scan flow.
|
|
1486
1582
|
typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
|
|
1487
1583
|
/// User has canceled the scan flow
|
|
@@ -1546,6 +1642,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
|
|
|
1546
1642
|
@end
|
|
1547
1643
|
|
|
1548
1644
|
|
|
1645
|
+
|
|
1549
1646
|
/// The generated PDF paper size.
|
|
1550
1647
|
typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
|
|
1551
1648
|
/// PDF page with a width of 8.27 inch (A4 width) and fitting height.
|
|
@@ -1614,16 +1711,44 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
|
|
|
1614
1711
|
};
|
|
1615
1712
|
|
|
1616
1713
|
@class GSKScanFlowStructuredDataResultBankDetails;
|
|
1714
|
+
@class GSKScanFlowStructuredDataResultContact;
|
|
1715
|
+
@class GSKScanFlowStructuredDataResultReceipt;
|
|
1617
1716
|
|
|
1618
1717
|
/// The result of a structured data extraction.
|
|
1619
1718
|
SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
|
|
1620
1719
|
@interface GSKScanFlowStructuredDataResult : NSObject
|
|
1621
1720
|
/// Present if bank details extraction was requested, <code>nil</code> otherwise.
|
|
1622
1721
|
@property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
|
|
1722
|
+
/// Present if business card contact extraction was requested and a contact was
|
|
1723
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
1724
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
|
|
1725
|
+
/// Present if receipt extraction was requested and a receipt/invoice was
|
|
1726
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
1727
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
|
|
1623
1728
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1624
1729
|
@end
|
|
1625
1730
|
|
|
1626
1731
|
|
|
1732
|
+
|
|
1733
|
+
/// Address data extracted from a business card document through OCR.
|
|
1734
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
|
|
1735
|
+
@interface GSKScanFlowStructuredDataResultAddress : NSObject
|
|
1736
|
+
/// The city component of the address.
|
|
1737
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable city;
|
|
1738
|
+
/// The postal/zip code component of the address.
|
|
1739
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
|
|
1740
|
+
/// The street name component of the address.
|
|
1741
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable street;
|
|
1742
|
+
/// The state component of the address.
|
|
1743
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable state;
|
|
1744
|
+
/// The country component of the address.
|
|
1745
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable country;
|
|
1746
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1747
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1748
|
+
@end
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1627
1752
|
/// The bank details extracted from a document through OCR.
|
|
1628
1753
|
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
1629
1754
|
@interface GSKScanFlowStructuredDataResultBankDetails : NSObject
|
|
@@ -1635,6 +1760,63 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
|
1635
1760
|
@end
|
|
1636
1761
|
|
|
1637
1762
|
|
|
1763
|
+
@class GSKScanFlowStructuredDataResultPhoneNumber;
|
|
1764
|
+
@class CNContact;
|
|
1765
|
+
|
|
1766
|
+
/// Contact data extracted from a business card document through OCR.
|
|
1767
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
|
|
1768
|
+
@interface GSKScanFlowStructuredDataResultContact : NSObject
|
|
1769
|
+
/// Any name that appears on the business card. Contains the full name, including all components.
|
|
1770
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable name;
|
|
1771
|
+
/// Any organization that appears on the business card.
|
|
1772
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable organization;
|
|
1773
|
+
/// Any address that appears on the business card.
|
|
1774
|
+
@property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
|
|
1775
|
+
/// The phone numbers that appear on the business card.
|
|
1776
|
+
@property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
|
|
1777
|
+
/// The links/URLs that appear on the business card.
|
|
1778
|
+
@property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
|
|
1779
|
+
/// The email addresses that appear on the business card.
|
|
1780
|
+
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
|
|
1781
|
+
/// Return a <code>CNContact</code> representation of the contact data within this instance.
|
|
1782
|
+
- (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
|
|
1783
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1784
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1785
|
+
@end
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
/// Phone number data extracted from a business card document through OCR.
|
|
1790
|
+
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
|
|
1791
|
+
@interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
|
|
1792
|
+
/// The label of the phone number. For example “Main”, “Office”, etc.
|
|
1793
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull label;
|
|
1794
|
+
/// A string representation of the phone number itself.
|
|
1795
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull number;
|
|
1796
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1797
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1798
|
+
@end
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
@class NSLocale;
|
|
1802
|
+
|
|
1803
|
+
/// Receipt/invoice details extracted from a document through OCR.
|
|
1804
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
|
|
1805
|
+
@interface GSKScanFlowStructuredDataResultReceipt : NSObject
|
|
1806
|
+
/// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
1807
|
+
@property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
|
|
1808
|
+
/// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
|
|
1809
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable merchant;
|
|
1810
|
+
/// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
1811
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable currency;
|
|
1812
|
+
/// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
|
|
1813
|
+
@property (nonatomic, readonly, copy) NSDate * _Nullable date;
|
|
1814
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1815
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1816
|
+
@end
|
|
1817
|
+
|
|
1818
|
+
|
|
1819
|
+
|
|
1638
1820
|
SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
|
|
1639
1821
|
@interface GSKTextLayout : NSObject
|
|
1640
1822
|
@property (nonatomic, readonly, copy) NSString * _Nullable hocr;
|