@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.
Files changed (29) hide show
  1. package/android/build.gradle +1 -1
  2. package/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
  3. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +5 -1
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +99 -8
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +1 -0
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +8384 -5567
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +61 -2
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +61 -2
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +5 -1
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +198 -16
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +1 -0
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +8384 -5567
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +61 -2
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +61 -2
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +8384 -5567
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +61 -2
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +61 -2
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
  29. package/package.json +1 -1
@@ -41,5 +41,5 @@ rootProject.allprojects {
41
41
 
42
42
  dependencies {
43
43
  implementation 'com.facebook.react:react-native:+'
44
- implementation 'com.geniusscansdk:gssdk:5.0.0-beta2'
44
+ implementation 'com.geniusscansdk:gssdk:5.0.0-beta4'
45
45
  }
@@ -10,15 +10,18 @@
10
10
  <key>DebugSymbolsPath</key>
11
11
  <string>dSYMs</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64</string>
13
+ <string>ios-arm64_x86_64-simulator</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>GSSDK.framework</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
+ <string>x86_64</string>
19
20
  </array>
20
21
  <key>SupportedPlatform</key>
21
22
  <string>ios</string>
23
+ <key>SupportedPlatformVariant</key>
24
+ <string>simulator</string>
22
25
  </dict>
23
26
  <dict>
24
27
  <key>BinaryPath</key>
@@ -26,18 +29,15 @@
26
29
  <key>DebugSymbolsPath</key>
27
30
  <string>dSYMs</string>
28
31
  <key>LibraryIdentifier</key>
29
- <string>ios-arm64_x86_64-simulator</string>
32
+ <string>ios-arm64</string>
30
33
  <key>LibraryPath</key>
31
34
  <string>GSSDK.framework</string>
32
35
  <key>SupportedArchitectures</key>
33
36
  <array>
34
37
  <string>arm64</string>
35
- <string>x86_64</string>
36
38
  </array>
37
39
  <key>SupportedPlatform</key>
38
40
  <string>ios</string>
39
- <key>SupportedPlatformVariant</key>
40
- <string>simulator</string>
41
41
  </dict>
42
42
  </array>
43
43
  <key>CFBundlePackageType</key>
@@ -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
@@ -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)startFrom:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
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;
@@ -39,3 +39,4 @@ FOUNDATION_EXPORT const unsigned char GSSDKVersionString[];
39
39
  #import <GSSDK/GSKScanFlowStructuredData.h>
40
40
  #import <GSSDK/GSKScanFlowOCROutputFormats.h>
41
41
  #import <GSSDK/GSKScanFlowErrorDomain.h>
42
+ #import <GSSDK/GSKPDFGeneratorError.h>