@thegrizzlylabs/react-native-genius-scan 5.0.0-beta2 → 5.0.0-beta3

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 (24) hide show
  1. package/android/build.gradle +1 -1
  2. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  3. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +5 -1
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +96 -1
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +8382 -5566
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +59 -0
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +59 -0
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +5 -1
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +192 -2
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +8382 -5566
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +59 -0
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +59 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +8382 -5566
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +59 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +59 -0
  24. package/package.json +1 -1
@@ -30,6 +30,28 @@ import _SwiftConcurrencyShims
30
30
  @objc final public func refreshLicenseKey(onSuccess: @escaping (Swift.String) -> Swift.Void, onFailure: @escaping (any Swift.Error, Swift.String) -> Swift.Void)
31
31
  @objc deinit
32
32
  }
33
+ @objc public enum GSKReceiptCategory : Swift.Int, Swift.CaseIterable {
34
+ case gas
35
+ case transportation
36
+ case accomodation
37
+ case restaurant
38
+ case supermarket
39
+ case other
40
+ public init?(rawValue: Swift.Int)
41
+ public typealias AllCases = [GSSDK.GSKReceiptCategory]
42
+ public typealias RawValue = Swift.Int
43
+ public static var allCases: [GSSDK.GSKReceiptCategory] {
44
+ get
45
+ }
46
+ public var rawValue: Swift.Int {
47
+ get
48
+ }
49
+ }
50
+ extension GSSDK.GSKReceiptCategory : Swift.CustomStringConvertible {
51
+ public var description: Swift.String {
52
+ get
53
+ }
54
+ }
33
55
  @_inheritsConvenienceInitializers @objc public class GSKDocumentGenerator : ObjectiveC.NSObject {
34
56
  @objc public func generate(_ document: GSSDK.GSKPDFDocument, configuration: GSSDK.GSKDocumentGeneratorConfiguration) throws
35
57
  @objc override dynamic public init()
@@ -392,15 +414,49 @@ extension GSSDK.GSKScanFlowSource : Swift.CustomStringConvertible {
392
414
  }
393
415
  @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKScanFlowStructuredDataResult : ObjectiveC.NSObject {
394
416
  @objc final public var bankDetails: GSSDK.GSKScanFlowStructuredDataResultBankDetails?
417
+ @objc final public var businessCardContact: GSSDK.GSKScanFlowStructuredDataResultContact?
418
+ @objc final public var receipt: GSSDK.GSKScanFlowStructuredDataResultReceipt?
395
419
  @objc override dynamic public init()
396
420
  @objc deinit
397
421
  }
422
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultAddress : ObjectiveC.NSObject {
423
+ @objc final public let city: Swift.String?
424
+ @objc final public let postalCode: Swift.String?
425
+ @objc final public let street: Swift.String?
426
+ @objc final public let state: Swift.String?
427
+ @objc final public let country: Swift.String?
428
+ @objc deinit
429
+ }
398
430
  @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKScanFlowStructuredDataResultBankDetails : ObjectiveC.NSObject {
399
431
  @objc final public var iban: Swift.String?
400
432
  @objc final public var bic: Swift.String?
401
433
  @objc override dynamic public init()
402
434
  @objc deinit
403
435
  }
436
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultContact : ObjectiveC.NSObject {
437
+ @objc final public let name: Swift.String?
438
+ @objc final public let organization: Swift.String?
439
+ @objc final public let address: GSSDK.GSKScanFlowStructuredDataResultAddress?
440
+ @objc final public let phoneNumbers: [GSSDK.GSKScanFlowStructuredDataResultPhoneNumber]
441
+ @objc final public let links: [Foundation.URL]
442
+ @objc final public let emailAddresses: [Swift.String]
443
+ @objc final public func asCNContact() -> Contacts.CNContact
444
+ @objc deinit
445
+ }
446
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultPhoneNumber : ObjectiveC.NSObject {
447
+ @objc final public let label: Swift.String
448
+ @objc final public let number: Swift.String
449
+ @objc deinit
450
+ }
451
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultReceipt : ObjectiveC.NSObject {
452
+ @objc final public let locale: Foundation.Locale?
453
+ @objc final public let merchant: Swift.String?
454
+ final public let amount: Swift.Double?
455
+ @objc final public let currency: Swift.String?
456
+ @objc final public let date: Foundation.Date?
457
+ final public let category: GSSDK.GSKReceiptCategory?
458
+ @objc deinit
459
+ }
404
460
  @_inheritsConvenienceInitializers @objc final public class GSKUIBackgroundProcessing : ObjectiveC.NSObject {
405
461
  @objc public static let shared: GSSDK.GSKUIBackgroundProcessing
406
462
  @objc final public let documentGenerationQueue: Dispatch.DispatchQueue
@@ -420,6 +476,9 @@ public struct GSKScanFlowButton<Label> : SwiftUI.View where Label : SwiftUI.View
420
476
  extension GSSDK.GSKScanFlowButton where Label == SwiftUI.Text {
421
477
  public init(_ label: Swift.String, configuration: @escaping () -> GSSDK.GSKScanFlowConfiguration, action: @escaping (Swift.Result<GSSDK.GSKScanFlowResult, any Swift.Error>) -> Swift.Void)
422
478
  }
479
+ extension GSSDK.GSKReceiptCategory : Swift.Equatable {}
480
+ extension GSSDK.GSKReceiptCategory : Swift.Hashable {}
481
+ extension GSSDK.GSKReceiptCategory : Swift.RawRepresentable {}
423
482
  extension GSSDK.GSKScanFlow : Swift.Sendable {}
424
483
  extension GSSDK.GSKScanFlowError : Swift.Equatable {}
425
484
  extension GSSDK.GSKScanFlowError : Swift.Hashable {}
@@ -30,6 +30,28 @@ import _SwiftConcurrencyShims
30
30
  @objc final public func refreshLicenseKey(onSuccess: @escaping (Swift.String) -> Swift.Void, onFailure: @escaping (any Swift.Error, Swift.String) -> Swift.Void)
31
31
  @objc deinit
32
32
  }
33
+ @objc public enum GSKReceiptCategory : Swift.Int, Swift.CaseIterable {
34
+ case gas
35
+ case transportation
36
+ case accomodation
37
+ case restaurant
38
+ case supermarket
39
+ case other
40
+ public init?(rawValue: Swift.Int)
41
+ public typealias AllCases = [GSSDK.GSKReceiptCategory]
42
+ public typealias RawValue = Swift.Int
43
+ public static var allCases: [GSSDK.GSKReceiptCategory] {
44
+ get
45
+ }
46
+ public var rawValue: Swift.Int {
47
+ get
48
+ }
49
+ }
50
+ extension GSSDK.GSKReceiptCategory : Swift.CustomStringConvertible {
51
+ public var description: Swift.String {
52
+ get
53
+ }
54
+ }
33
55
  @_inheritsConvenienceInitializers @objc public class GSKDocumentGenerator : ObjectiveC.NSObject {
34
56
  @objc public func generate(_ document: GSSDK.GSKPDFDocument, configuration: GSSDK.GSKDocumentGeneratorConfiguration) throws
35
57
  @objc override dynamic public init()
@@ -392,15 +414,49 @@ extension GSSDK.GSKScanFlowSource : Swift.CustomStringConvertible {
392
414
  }
393
415
  @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKScanFlowStructuredDataResult : ObjectiveC.NSObject {
394
416
  @objc final public var bankDetails: GSSDK.GSKScanFlowStructuredDataResultBankDetails?
417
+ @objc final public var businessCardContact: GSSDK.GSKScanFlowStructuredDataResultContact?
418
+ @objc final public var receipt: GSSDK.GSKScanFlowStructuredDataResultReceipt?
395
419
  @objc override dynamic public init()
396
420
  @objc deinit
397
421
  }
422
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultAddress : ObjectiveC.NSObject {
423
+ @objc final public let city: Swift.String?
424
+ @objc final public let postalCode: Swift.String?
425
+ @objc final public let street: Swift.String?
426
+ @objc final public let state: Swift.String?
427
+ @objc final public let country: Swift.String?
428
+ @objc deinit
429
+ }
398
430
  @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKScanFlowStructuredDataResultBankDetails : ObjectiveC.NSObject {
399
431
  @objc final public var iban: Swift.String?
400
432
  @objc final public var bic: Swift.String?
401
433
  @objc override dynamic public init()
402
434
  @objc deinit
403
435
  }
436
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultContact : ObjectiveC.NSObject {
437
+ @objc final public let name: Swift.String?
438
+ @objc final public let organization: Swift.String?
439
+ @objc final public let address: GSSDK.GSKScanFlowStructuredDataResultAddress?
440
+ @objc final public let phoneNumbers: [GSSDK.GSKScanFlowStructuredDataResultPhoneNumber]
441
+ @objc final public let links: [Foundation.URL]
442
+ @objc final public let emailAddresses: [Swift.String]
443
+ @objc final public func asCNContact() -> Contacts.CNContact
444
+ @objc deinit
445
+ }
446
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultPhoneNumber : ObjectiveC.NSObject {
447
+ @objc final public let label: Swift.String
448
+ @objc final public let number: Swift.String
449
+ @objc deinit
450
+ }
451
+ @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKScanFlowStructuredDataResultReceipt : ObjectiveC.NSObject {
452
+ @objc final public let locale: Foundation.Locale?
453
+ @objc final public let merchant: Swift.String?
454
+ final public let amount: Swift.Double?
455
+ @objc final public let currency: Swift.String?
456
+ @objc final public let date: Foundation.Date?
457
+ final public let category: GSSDK.GSKReceiptCategory?
458
+ @objc deinit
459
+ }
404
460
  @_inheritsConvenienceInitializers @objc final public class GSKUIBackgroundProcessing : ObjectiveC.NSObject {
405
461
  @objc public static let shared: GSSDK.GSKUIBackgroundProcessing
406
462
  @objc final public let documentGenerationQueue: Dispatch.DispatchQueue
@@ -420,6 +476,9 @@ public struct GSKScanFlowButton<Label> : SwiftUI.View where Label : SwiftUI.View
420
476
  extension GSSDK.GSKScanFlowButton where Label == SwiftUI.Text {
421
477
  public init(_ label: Swift.String, configuration: @escaping () -> GSSDK.GSKScanFlowConfiguration, action: @escaping (Swift.Result<GSSDK.GSKScanFlowResult, any Swift.Error>) -> Swift.Void)
422
478
  }
479
+ extension GSSDK.GSKReceiptCategory : Swift.Equatable {}
480
+ extension GSSDK.GSKReceiptCategory : Swift.Hashable {}
481
+ extension GSSDK.GSKReceiptCategory : Swift.RawRepresentable {}
423
482
  extension GSSDK.GSKScanFlow : Swift.Sendable {}
424
483
  extension GSSDK.GSKScanFlowError : Swift.Equatable {}
425
484
  extension GSSDK.GSKScanFlowError : Swift.Hashable {}
@@ -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,6 +511,15 @@ 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
524
  @class UIViewController;
516
525
  @class GSKScanFlowResult;
@@ -619,7 +628,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
619
628
  @end
620
629
 
621
630
 
622
-
623
631
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
624
632
  /// Create a configuration from a dictionary.
625
633
  /// This is particularly useful for interfacing with React Native but shouldn’t
@@ -633,6 +641,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
633
641
  @end
634
642
 
635
643
 
644
+
636
645
  /// Enum that defines various errors that can occur during a scan flow.
637
646
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
638
647
  /// User has canceled the scan flow
@@ -697,6 +706,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
697
706
  @end
698
707
 
699
708
 
709
+
700
710
  /// The generated PDF paper size.
701
711
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
702
712
  /// PDF page with a width of 8.27 inch (A4 width) and fitting height.
@@ -765,16 +775,44 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
765
775
  };
766
776
 
767
777
  @class GSKScanFlowStructuredDataResultBankDetails;
778
+ @class GSKScanFlowStructuredDataResultContact;
779
+ @class GSKScanFlowStructuredDataResultReceipt;
768
780
 
769
781
  /// The result of a structured data extraction.
770
782
  SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
771
783
  @interface GSKScanFlowStructuredDataResult : NSObject
772
784
  /// Present if bank details extraction was requested, <code>nil</code> otherwise.
773
785
  @property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
786
+ /// Present if business card contact extraction was requested and a contact was
787
+ /// succcessfully extracted, <code>nil</code> otherwise.
788
+ @property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
789
+ /// Present if receipt extraction was requested and a receipt/invoice was
790
+ /// succcessfully extracted, <code>nil</code> otherwise.
791
+ @property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
774
792
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
775
793
  @end
776
794
 
777
795
 
796
+
797
+ /// Address data extracted from a business card document through OCR.
798
+ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
799
+ @interface GSKScanFlowStructuredDataResultAddress : NSObject
800
+ /// The city component of the address.
801
+ @property (nonatomic, readonly, copy) NSString * _Nullable city;
802
+ /// The postal/zip code component of the address.
803
+ @property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
804
+ /// The street name component of the address.
805
+ @property (nonatomic, readonly, copy) NSString * _Nullable street;
806
+ /// The state component of the address.
807
+ @property (nonatomic, readonly, copy) NSString * _Nullable state;
808
+ /// The country component of the address.
809
+ @property (nonatomic, readonly, copy) NSString * _Nullable country;
810
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
811
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
812
+ @end
813
+
814
+
815
+
778
816
  /// The bank details extracted from a document through OCR.
779
817
  SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
780
818
  @interface GSKScanFlowStructuredDataResultBankDetails : NSObject
@@ -786,6 +824,63 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
786
824
  @end
787
825
 
788
826
 
827
+ @class GSKScanFlowStructuredDataResultPhoneNumber;
828
+ @class CNContact;
829
+
830
+ /// Contact data extracted from a business card document through OCR.
831
+ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
832
+ @interface GSKScanFlowStructuredDataResultContact : NSObject
833
+ /// Any name that appears on the business card. Contains the full name, including all components.
834
+ @property (nonatomic, readonly, copy) NSString * _Nullable name;
835
+ /// Any organization that appears on the business card.
836
+ @property (nonatomic, readonly, copy) NSString * _Nullable organization;
837
+ /// Any address that appears on the business card.
838
+ @property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
839
+ /// The phone numbers that appear on the business card.
840
+ @property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
841
+ /// The links/URLs that appear on the business card.
842
+ @property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
843
+ /// The email addresses that appear on the business card.
844
+ @property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
845
+ /// Return a <code>CNContact</code> representation of the contact data within this instance.
846
+ - (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
847
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
848
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
849
+ @end
850
+
851
+
852
+
853
+ /// Phone number data extracted from a business card document through OCR.
854
+ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
855
+ @interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
856
+ /// The label of the phone number. For example “Main”, “Office”, etc.
857
+ @property (nonatomic, readonly, copy) NSString * _Nonnull label;
858
+ /// A string representation of the phone number itself.
859
+ @property (nonatomic, readonly, copy) NSString * _Nonnull number;
860
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
861
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
862
+ @end
863
+
864
+
865
+ @class NSLocale;
866
+
867
+ /// Receipt/invoice details extracted from a document through OCR.
868
+ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
869
+ @interface GSKScanFlowStructuredDataResultReceipt : NSObject
870
+ /// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
871
+ @property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
872
+ /// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
873
+ @property (nonatomic, readonly, copy) NSString * _Nullable merchant;
874
+ /// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
875
+ @property (nonatomic, readonly, copy) NSString * _Nullable currency;
876
+ /// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
877
+ @property (nonatomic, readonly, copy) NSDate * _Nullable date;
878
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
879
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
880
+ @end
881
+
882
+
883
+
789
884
  SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
790
885
  @interface GSKTextLayout : NSObject
791
886
  @property (nonatomic, readonly, copy) NSString * _Nullable hocr;
@@ -1360,6 +1455,15 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
1360
1455
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1361
1456
  @end
1362
1457
 
1458
+ typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
1459
+ GSKReceiptCategoryGas = 0,
1460
+ GSKReceiptCategoryTransportation = 1,
1461
+ GSKReceiptCategoryAccomodation = 2,
1462
+ GSKReceiptCategoryRestaurant = 3,
1463
+ GSKReceiptCategorySupermarket = 4,
1464
+ GSKReceiptCategoryOther = 5,
1465
+ };
1466
+
1363
1467
  @class GSKScanFlowConfiguration;
1364
1468
  @class UIViewController;
1365
1469
  @class GSKScanFlowResult;
@@ -1468,7 +1572,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1468
1572
  @end
1469
1573
 
1470
1574
 
1471
-
1472
1575
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1473
1576
  /// Create a configuration from a dictionary.
1474
1577
  /// This is particularly useful for interfacing with React Native but shouldn’t
@@ -1482,6 +1585,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1482
1585
  @end
1483
1586
 
1484
1587
 
1588
+
1485
1589
  /// Enum that defines various errors that can occur during a scan flow.
1486
1590
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
1487
1591
  /// User has canceled the scan flow
@@ -1546,6 +1650,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
1546
1650
  @end
1547
1651
 
1548
1652
 
1653
+
1549
1654
  /// The generated PDF paper size.
1550
1655
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
1551
1656
  /// PDF page with a width of 8.27 inch (A4 width) and fitting height.
@@ -1614,16 +1719,44 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
1614
1719
  };
1615
1720
 
1616
1721
  @class GSKScanFlowStructuredDataResultBankDetails;
1722
+ @class GSKScanFlowStructuredDataResultContact;
1723
+ @class GSKScanFlowStructuredDataResultReceipt;
1617
1724
 
1618
1725
  /// The result of a structured data extraction.
1619
1726
  SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
1620
1727
  @interface GSKScanFlowStructuredDataResult : NSObject
1621
1728
  /// Present if bank details extraction was requested, <code>nil</code> otherwise.
1622
1729
  @property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
1730
+ /// Present if business card contact extraction was requested and a contact was
1731
+ /// succcessfully extracted, <code>nil</code> otherwise.
1732
+ @property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
1733
+ /// Present if receipt extraction was requested and a receipt/invoice was
1734
+ /// succcessfully extracted, <code>nil</code> otherwise.
1735
+ @property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
1623
1736
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1624
1737
  @end
1625
1738
 
1626
1739
 
1740
+
1741
+ /// Address data extracted from a business card document through OCR.
1742
+ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
1743
+ @interface GSKScanFlowStructuredDataResultAddress : NSObject
1744
+ /// The city component of the address.
1745
+ @property (nonatomic, readonly, copy) NSString * _Nullable city;
1746
+ /// The postal/zip code component of the address.
1747
+ @property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
1748
+ /// The street name component of the address.
1749
+ @property (nonatomic, readonly, copy) NSString * _Nullable street;
1750
+ /// The state component of the address.
1751
+ @property (nonatomic, readonly, copy) NSString * _Nullable state;
1752
+ /// The country component of the address.
1753
+ @property (nonatomic, readonly, copy) NSString * _Nullable country;
1754
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1755
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1756
+ @end
1757
+
1758
+
1759
+
1627
1760
  /// The bank details extracted from a document through OCR.
1628
1761
  SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
1629
1762
  @interface GSKScanFlowStructuredDataResultBankDetails : NSObject
@@ -1635,6 +1768,63 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
1635
1768
  @end
1636
1769
 
1637
1770
 
1771
+ @class GSKScanFlowStructuredDataResultPhoneNumber;
1772
+ @class CNContact;
1773
+
1774
+ /// Contact data extracted from a business card document through OCR.
1775
+ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
1776
+ @interface GSKScanFlowStructuredDataResultContact : NSObject
1777
+ /// Any name that appears on the business card. Contains the full name, including all components.
1778
+ @property (nonatomic, readonly, copy) NSString * _Nullable name;
1779
+ /// Any organization that appears on the business card.
1780
+ @property (nonatomic, readonly, copy) NSString * _Nullable organization;
1781
+ /// Any address that appears on the business card.
1782
+ @property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
1783
+ /// The phone numbers that appear on the business card.
1784
+ @property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
1785
+ /// The links/URLs that appear on the business card.
1786
+ @property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
1787
+ /// The email addresses that appear on the business card.
1788
+ @property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
1789
+ /// Return a <code>CNContact</code> representation of the contact data within this instance.
1790
+ - (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
1791
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1792
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1793
+ @end
1794
+
1795
+
1796
+
1797
+ /// Phone number data extracted from a business card document through OCR.
1798
+ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
1799
+ @interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
1800
+ /// The label of the phone number. For example “Main”, “Office”, etc.
1801
+ @property (nonatomic, readonly, copy) NSString * _Nonnull label;
1802
+ /// A string representation of the phone number itself.
1803
+ @property (nonatomic, readonly, copy) NSString * _Nonnull number;
1804
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1805
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1806
+ @end
1807
+
1808
+
1809
+ @class NSLocale;
1810
+
1811
+ /// Receipt/invoice details extracted from a document through OCR.
1812
+ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
1813
+ @interface GSKScanFlowStructuredDataResultReceipt : NSObject
1814
+ /// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
1815
+ @property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
1816
+ /// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
1817
+ @property (nonatomic, readonly, copy) NSString * _Nullable merchant;
1818
+ /// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
1819
+ @property (nonatomic, readonly, copy) NSString * _Nullable currency;
1820
+ /// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
1821
+ @property (nonatomic, readonly, copy) NSDate * _Nullable date;
1822
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1823
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1824
+ @end
1825
+
1826
+
1827
+
1638
1828
  SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
1639
1829
  @interface GSKTextLayout : NSObject
1640
1830
  @property (nonatomic, readonly, copy) NSString * _Nullable hocr;