@thegrizzlylabs/react-native-genius-scan 5.0.0-beta6 → 5.0.0-beta8

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 (25) hide show
  1. package/README.md +11 -2
  2. package/android/build.gradle +1 -1
  3. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +74 -23
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +7668 -6709
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +82 -32
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +82 -32
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/documentFinder.tflite +0 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +148 -46
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +7668 -6709
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +82 -32
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +82 -32
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +7668 -6709
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +82 -32
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +82 -32
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/documentFinder.tflite +0 -0
  25. package/package.json +1 -1
@@ -306,6 +306,19 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
306
306
 
307
307
 
308
308
 
309
+ /// The type of document detected by the document finder.
310
+ typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
311
+ /// No document present in the image
312
+ GSKDocumentFinderImageTypeNoDocument = 0,
313
+ /// A document present in the image, but no crop, perspective correction have been applied
314
+ GSKDocumentFinderImageTypeUnwarped = 1,
315
+ /// A document present in the image, and crop, perspective correction have been applied
316
+ GSKDocumentFinderImageTypeWarped = 2,
317
+ /// A document present in the image, crop/perspective correction and
318
+ /// enhanced have been applied.
319
+ GSKDocumentFinderImageTypeEnhanced = 3,
320
+ };
321
+
309
322
  @class GSKPDFDocument;
310
323
  @class GSKDocumentGeneratorConfiguration;
311
324
 
@@ -406,7 +419,7 @@ SWIFT_CLASS("_TtC5GSSDK12GSKOCRResult")
406
419
  @property (nonatomic, readonly, copy) NSString * _Nonnull text;
407
420
  /// The recognized text, as a structured text layout.
408
421
  @property (nonatomic, readonly, strong) GSKTextLayout * _Nonnull textLayout;
409
- - (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout OBJC_DESIGNATED_INITIALIZER;
422
+ - (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout;
410
423
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
411
424
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
412
425
  @end
@@ -629,6 +642,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
629
642
  @end
630
643
 
631
644
 
645
+
632
646
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
633
647
  /// Create a configuration from a dictionary.
634
648
  /// This is particularly useful for interfacing with React Native but shouldn’t
@@ -637,7 +651,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
637
651
  @end
638
652
 
639
653
 
640
-
641
654
  /// Enum that defines various errors that can occur during a scan flow.
642
655
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
643
656
  /// User has canceled the scan flow
@@ -770,29 +783,29 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
770
783
  GSKScanFlowSourceLibrary = 2,
771
784
  };
772
785
 
773
- @class GSKScanFlowStructuredDataResultBankDetails;
774
- @class GSKScanFlowStructuredDataResultContact;
775
- @class GSKScanFlowStructuredDataResultReceipt;
786
+ @class GSKStructuredDataBankDetails;
787
+ @class GSKStructuredDataContact;
788
+ @class GSKStructuredDataReceipt;
776
789
 
777
790
  /// The result of a structured data extraction.
778
791
  SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
779
792
  @interface GSKScanFlowStructuredDataResult : NSObject
780
793
  /// Present if bank details extraction was requested, <code>nil</code> otherwise.
781
- @property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
794
+ @property (nonatomic, strong) GSKStructuredDataBankDetails * _Nullable bankDetails;
782
795
  /// Present if business card contact extraction was requested and a contact was
783
796
  /// succcessfully extracted, <code>nil</code> otherwise.
784
- @property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
797
+ @property (nonatomic, strong) GSKStructuredDataContact * _Nullable businessCardContact;
785
798
  /// Present if receipt extraction was requested and a receipt/invoice was
786
799
  /// succcessfully extracted, <code>nil</code> otherwise.
787
- @property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
800
+ @property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
788
801
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
789
802
  @end
790
803
 
791
804
 
792
805
 
793
806
  /// Address data extracted from a business card document through OCR.
794
- SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
795
- @interface GSKScanFlowStructuredDataResultAddress : NSObject
807
+ SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataAddress")
808
+ @interface GSKStructuredDataAddress : NSObject
796
809
  /// The city component of the address.
797
810
  @property (nonatomic, readonly, copy) NSString * _Nullable city;
798
811
  /// The postal/zip code component of the address.
@@ -810,30 +823,31 @@ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
810
823
 
811
824
 
812
825
  /// The bank details extracted from a document through OCR.
813
- SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
814
- @interface GSKScanFlowStructuredDataResultBankDetails : NSObject
826
+ SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataBankDetails")
827
+ @interface GSKStructuredDataBankDetails : NSObject
815
828
  /// The IBAN if successfully extracted, otherwise is <code>nil</code>.
816
829
  @property (nonatomic, copy) NSString * _Nullable iban;
817
830
  /// The BIC code if successfully extracted, otherwise is <code>nil</code>.
818
831
  @property (nonatomic, copy) NSString * _Nullable bic;
819
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
832
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
833
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
820
834
  @end
821
835
 
822
836
 
823
- @class GSKScanFlowStructuredDataResultPhoneNumber;
837
+ @class GSKStructuredDataPhoneNumber;
824
838
  @class CNContact;
825
839
 
826
840
  /// Contact data extracted from a business card document through OCR.
827
- SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
828
- @interface GSKScanFlowStructuredDataResultContact : NSObject
841
+ SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataContact")
842
+ @interface GSKStructuredDataContact : NSObject
829
843
  /// Any name that appears on the business card. Contains the full name, including all components.
830
844
  @property (nonatomic, readonly, copy) NSString * _Nullable name;
831
845
  /// Any organization that appears on the business card.
832
846
  @property (nonatomic, readonly, copy) NSString * _Nullable organization;
833
847
  /// Any address that appears on the business card.
834
- @property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
848
+ @property (nonatomic, readonly, strong) GSKStructuredDataAddress * _Nullable address;
835
849
  /// The phone numbers that appear on the business card.
836
- @property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
850
+ @property (nonatomic, readonly, copy) NSArray<GSKStructuredDataPhoneNumber *> * _Nonnull phoneNumbers;
837
851
  /// The links/URLs that appear on the business card.
838
852
  @property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
839
853
  /// The email addresses that appear on the business card.
@@ -846,9 +860,46 @@ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
846
860
 
847
861
 
848
862
 
863
+ /// Class that enables structured data to be extracted from
864
+ /// scanned documents.
865
+ SWIFT_CLASS("_TtC5GSSDK26GSKStructuredDataExtractor")
866
+ @interface GSKStructuredDataExtractor : NSObject
867
+ - (nonnull instancetype)init;
868
+ @end
869
+
870
+
871
+
872
+ @interface GSKStructuredDataExtractor (SWIFT_EXTENSION(GSSDK))
873
+ /// Extract any bank details that were found in a given document by
874
+ /// passing in the result of performing OCR on that document. Use
875
+ /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
876
+ /// was performed for languages that don’t support structured data extraction,
877
+ /// then this method will throw an error.
878
+ - (void)bankDetailsFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataBankDetails * _Nullable, NSError * _Nullable))completionHandler;
879
+ /// Extract any business card contact that was found in a given document
880
+ /// by passing in the result of performing OCR on that document. Use
881
+ /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
882
+ /// was performed for languages that don’t support structured data extraction,
883
+ /// then this method will throw an error.
884
+ - (void)businessCardContactFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataContact * _Nullable, NSError * _Nullable))completionHandler;
885
+ /// Extract any receipt/invoice information that was found in a given
886
+ /// document by passing in the result of performing OCR on that document.
887
+ /// Use <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
888
+ /// was performed for languages that don’t support structured data extraction,
889
+ /// then this method will throw an error.
890
+ - (void)receiptFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataReceipt * _Nullable, NSError * _Nullable))completionHandler;
891
+ @end
892
+
893
+ /// Enum defining errors that can be thrown by <code>GSKStructuredDataExtractor</code>.
894
+ /// Note that thrown errors will be wrapped in <code>NSError</code> containers.
895
+ typedef SWIFT_ENUM(NSInteger, GSKStructuredDataExtractorError, open) {
896
+ GSKStructuredDataExtractorErrorMissingRequiredOCRMetadata = -1,
897
+ };
898
+
899
+
849
900
  /// Phone number data extracted from a business card document through OCR.
850
- SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
851
- @interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
901
+ SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataPhoneNumber")
902
+ @interface GSKStructuredDataPhoneNumber : NSObject
852
903
  /// The label of the phone number. For example “Main”, “Office”, etc.
853
904
  @property (nonatomic, readonly, copy) NSString * _Nonnull label;
854
905
  /// A string representation of the phone number itself.
@@ -861,8 +912,8 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
861
912
  @class NSLocale;
862
913
 
863
914
  /// Receipt/invoice details extracted from a document through OCR.
864
- SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
865
- @interface GSKScanFlowStructuredDataResultReceipt : NSObject
915
+ SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataReceipt")
916
+ @interface GSKStructuredDataReceipt : NSObject
866
917
  /// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
867
918
  @property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
868
919
  /// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
@@ -918,12 +969,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
918
969
  @end
919
970
 
920
971
 
921
-
922
972
  @interface GSKView (SWIFT_EXTENSION(GSSDK))
923
973
  - (void)startSnapAnimationWithDuration:(NSTimeInterval)duration;
924
974
  - (void)endSnapAnimation;
925
975
  @end
926
976
 
977
+
927
978
  @class NSBundle;
928
979
 
929
980
  SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")
@@ -1269,6 +1320,19 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
1269
1320
 
1270
1321
 
1271
1322
 
1323
+ /// The type of document detected by the document finder.
1324
+ typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
1325
+ /// No document present in the image
1326
+ GSKDocumentFinderImageTypeNoDocument = 0,
1327
+ /// A document present in the image, but no crop, perspective correction have been applied
1328
+ GSKDocumentFinderImageTypeUnwarped = 1,
1329
+ /// A document present in the image, and crop, perspective correction have been applied
1330
+ GSKDocumentFinderImageTypeWarped = 2,
1331
+ /// A document present in the image, crop/perspective correction and
1332
+ /// enhanced have been applied.
1333
+ GSKDocumentFinderImageTypeEnhanced = 3,
1334
+ };
1335
+
1272
1336
  @class GSKPDFDocument;
1273
1337
  @class GSKDocumentGeneratorConfiguration;
1274
1338
 
@@ -1369,7 +1433,7 @@ SWIFT_CLASS("_TtC5GSSDK12GSKOCRResult")
1369
1433
  @property (nonatomic, readonly, copy) NSString * _Nonnull text;
1370
1434
  /// The recognized text, as a structured text layout.
1371
1435
  @property (nonatomic, readonly, strong) GSKTextLayout * _Nonnull textLayout;
1372
- - (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout OBJC_DESIGNATED_INITIALIZER;
1436
+ - (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout;
1373
1437
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1374
1438
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1375
1439
  @end
@@ -1592,6 +1656,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1592
1656
  @end
1593
1657
 
1594
1658
 
1659
+
1595
1660
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1596
1661
  /// Create a configuration from a dictionary.
1597
1662
  /// This is particularly useful for interfacing with React Native but shouldn’t
@@ -1600,7 +1665,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1600
1665
  @end
1601
1666
 
1602
1667
 
1603
-
1604
1668
  /// Enum that defines various errors that can occur during a scan flow.
1605
1669
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
1606
1670
  /// User has canceled the scan flow
@@ -1733,29 +1797,29 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
1733
1797
  GSKScanFlowSourceLibrary = 2,
1734
1798
  };
1735
1799
 
1736
- @class GSKScanFlowStructuredDataResultBankDetails;
1737
- @class GSKScanFlowStructuredDataResultContact;
1738
- @class GSKScanFlowStructuredDataResultReceipt;
1800
+ @class GSKStructuredDataBankDetails;
1801
+ @class GSKStructuredDataContact;
1802
+ @class GSKStructuredDataReceipt;
1739
1803
 
1740
1804
  /// The result of a structured data extraction.
1741
1805
  SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
1742
1806
  @interface GSKScanFlowStructuredDataResult : NSObject
1743
1807
  /// Present if bank details extraction was requested, <code>nil</code> otherwise.
1744
- @property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
1808
+ @property (nonatomic, strong) GSKStructuredDataBankDetails * _Nullable bankDetails;
1745
1809
  /// Present if business card contact extraction was requested and a contact was
1746
1810
  /// succcessfully extracted, <code>nil</code> otherwise.
1747
- @property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
1811
+ @property (nonatomic, strong) GSKStructuredDataContact * _Nullable businessCardContact;
1748
1812
  /// Present if receipt extraction was requested and a receipt/invoice was
1749
1813
  /// succcessfully extracted, <code>nil</code> otherwise.
1750
- @property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
1814
+ @property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
1751
1815
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1752
1816
  @end
1753
1817
 
1754
1818
 
1755
1819
 
1756
1820
  /// Address data extracted from a business card document through OCR.
1757
- SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
1758
- @interface GSKScanFlowStructuredDataResultAddress : NSObject
1821
+ SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataAddress")
1822
+ @interface GSKStructuredDataAddress : NSObject
1759
1823
  /// The city component of the address.
1760
1824
  @property (nonatomic, readonly, copy) NSString * _Nullable city;
1761
1825
  /// The postal/zip code component of the address.
@@ -1773,30 +1837,31 @@ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
1773
1837
 
1774
1838
 
1775
1839
  /// The bank details extracted from a document through OCR.
1776
- SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
1777
- @interface GSKScanFlowStructuredDataResultBankDetails : NSObject
1840
+ SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataBankDetails")
1841
+ @interface GSKStructuredDataBankDetails : NSObject
1778
1842
  /// The IBAN if successfully extracted, otherwise is <code>nil</code>.
1779
1843
  @property (nonatomic, copy) NSString * _Nullable iban;
1780
1844
  /// The BIC code if successfully extracted, otherwise is <code>nil</code>.
1781
1845
  @property (nonatomic, copy) NSString * _Nullable bic;
1782
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1846
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1847
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1783
1848
  @end
1784
1849
 
1785
1850
 
1786
- @class GSKScanFlowStructuredDataResultPhoneNumber;
1851
+ @class GSKStructuredDataPhoneNumber;
1787
1852
  @class CNContact;
1788
1853
 
1789
1854
  /// Contact data extracted from a business card document through OCR.
1790
- SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
1791
- @interface GSKScanFlowStructuredDataResultContact : NSObject
1855
+ SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataContact")
1856
+ @interface GSKStructuredDataContact : NSObject
1792
1857
  /// Any name that appears on the business card. Contains the full name, including all components.
1793
1858
  @property (nonatomic, readonly, copy) NSString * _Nullable name;
1794
1859
  /// Any organization that appears on the business card.
1795
1860
  @property (nonatomic, readonly, copy) NSString * _Nullable organization;
1796
1861
  /// Any address that appears on the business card.
1797
- @property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
1862
+ @property (nonatomic, readonly, strong) GSKStructuredDataAddress * _Nullable address;
1798
1863
  /// The phone numbers that appear on the business card.
1799
- @property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
1864
+ @property (nonatomic, readonly, copy) NSArray<GSKStructuredDataPhoneNumber *> * _Nonnull phoneNumbers;
1800
1865
  /// The links/URLs that appear on the business card.
1801
1866
  @property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
1802
1867
  /// The email addresses that appear on the business card.
@@ -1809,9 +1874,46 @@ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
1809
1874
 
1810
1875
 
1811
1876
 
1877
+ /// Class that enables structured data to be extracted from
1878
+ /// scanned documents.
1879
+ SWIFT_CLASS("_TtC5GSSDK26GSKStructuredDataExtractor")
1880
+ @interface GSKStructuredDataExtractor : NSObject
1881
+ - (nonnull instancetype)init;
1882
+ @end
1883
+
1884
+
1885
+
1886
+ @interface GSKStructuredDataExtractor (SWIFT_EXTENSION(GSSDK))
1887
+ /// Extract any bank details that were found in a given document by
1888
+ /// passing in the result of performing OCR on that document. Use
1889
+ /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
1890
+ /// was performed for languages that don’t support structured data extraction,
1891
+ /// then this method will throw an error.
1892
+ - (void)bankDetailsFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataBankDetails * _Nullable, NSError * _Nullable))completionHandler;
1893
+ /// Extract any business card contact that was found in a given document
1894
+ /// by passing in the result of performing OCR on that document. Use
1895
+ /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
1896
+ /// was performed for languages that don’t support structured data extraction,
1897
+ /// then this method will throw an error.
1898
+ - (void)businessCardContactFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataContact * _Nullable, NSError * _Nullable))completionHandler;
1899
+ /// Extract any receipt/invoice information that was found in a given
1900
+ /// document by passing in the result of performing OCR on that document.
1901
+ /// Use <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
1902
+ /// was performed for languages that don’t support structured data extraction,
1903
+ /// then this method will throw an error.
1904
+ - (void)receiptFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataReceipt * _Nullable, NSError * _Nullable))completionHandler;
1905
+ @end
1906
+
1907
+ /// Enum defining errors that can be thrown by <code>GSKStructuredDataExtractor</code>.
1908
+ /// Note that thrown errors will be wrapped in <code>NSError</code> containers.
1909
+ typedef SWIFT_ENUM(NSInteger, GSKStructuredDataExtractorError, open) {
1910
+ GSKStructuredDataExtractorErrorMissingRequiredOCRMetadata = -1,
1911
+ };
1912
+
1913
+
1812
1914
  /// Phone number data extracted from a business card document through OCR.
1813
- SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
1814
- @interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
1915
+ SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataPhoneNumber")
1916
+ @interface GSKStructuredDataPhoneNumber : NSObject
1815
1917
  /// The label of the phone number. For example “Main”, “Office”, etc.
1816
1918
  @property (nonatomic, readonly, copy) NSString * _Nonnull label;
1817
1919
  /// A string representation of the phone number itself.
@@ -1824,8 +1926,8 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
1824
1926
  @class NSLocale;
1825
1927
 
1826
1928
  /// Receipt/invoice details extracted from a document through OCR.
1827
- SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
1828
- @interface GSKScanFlowStructuredDataResultReceipt : NSObject
1929
+ SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataReceipt")
1930
+ @interface GSKStructuredDataReceipt : NSObject
1829
1931
  /// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
1830
1932
  @property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
1831
1933
  /// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
@@ -1881,12 +1983,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
1881
1983
  @end
1882
1984
 
1883
1985
 
1884
-
1885
1986
  @interface GSKView (SWIFT_EXTENSION(GSSDK))
1886
1987
  - (void)startSnapAnimationWithDuration:(NSTimeInterval)duration;
1887
1988
  - (void)endSnapAnimation;
1888
1989
  @end
1889
1990
 
1991
+
1890
1992
  @class NSBundle;
1891
1993
 
1892
1994
  SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")