UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

299 lines (254 loc) 8.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnknownCheckDocumentType = exports.UnknownCheck = exports.USACheckDocumentType = exports.USACheck = exports.UAECheckDocumentType = exports.UAECheck = exports.KWTCheckDocumentType = exports.KWTCheck = exports.ISRCheckDocumentType = exports.ISRCheck = exports.INDCheckDocumentType = exports.INDCheck = exports.FRACheckDocumentType = exports.FRACheck = exports.CheckDocumentType = exports.Check = exports.CANCheckDocumentType = exports.CANCheck = exports.AUSCheckDocumentType = exports.AUSCheck = void 0; /// Auto-generated. Modifications will be overwritten. /// Generated from core/document-schemas/CheckDocumentModel.yaml /// All possible root document types. const CheckDocumentType = exports.CheckDocumentType = 'Check'; const USACheckDocumentType = exports.USACheckDocumentType = 'USACheck'; const UAECheckDocumentType = exports.UAECheckDocumentType = 'UAECheck'; const FRACheckDocumentType = exports.FRACheckDocumentType = 'FRACheck'; const ISRCheckDocumentType = exports.ISRCheckDocumentType = 'ISRCheck'; const KWTCheckDocumentType = exports.KWTCheckDocumentType = 'KWTCheck'; const AUSCheckDocumentType = exports.AUSCheckDocumentType = 'AUSCheck'; const INDCheckDocumentType = exports.INDCheckDocumentType = 'INDCheck'; const CANCheckDocumentType = exports.CANCheckDocumentType = 'CANCheck'; const UnknownCheckDocumentType = exports.UnknownCheckDocumentType = 'UnknownCheck'; /** Check Document */ class Check { get document() { return this._document; } constructor(document) { if (document.type.name !== this.requiredDocumentType()) { throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`); } this._document = document; } /** type of check font */ get fontType() { return this.document.fields.find(f => f.type.name === 'FontType'); } /** Detected raw string */ get rawString() { return this.document.fields.find(f => f.type.name === 'RawString'); } } /** A check compatible with the ASC X9 standard used in the USA */ exports.Check = Check; class USACheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return USACheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Auxiliary On-Us */ get auxiliaryOnUs() { return this.document.fields.find(f => f.type.name === 'AuxiliaryOnUs'); } /** Transit number */ get transitNumber() { return this.document.fields.find(f => f.type.name === 'TransitNumber'); } } /** A check format commonly used in the United Arab Emirates */ exports.USACheck = USACheck; class UAECheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return UAECheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Routing number */ get routingNumber() { return this.document.fields.find(f => f.type.name === 'RoutingNumber'); } } /** A check format commonly used in France */ exports.UAECheck = UAECheck; class FRACheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return FRACheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Routing number */ get routingNumber() { return this.document.fields.find(f => f.type.name === 'RoutingNumber'); } } /** A check format commonly used in Israel */ exports.FRACheck = FRACheck; class ISRCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return ISRCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Bank number */ get bankNumber() { return this.document.fields.find(f => f.type.name === 'BankNumber'); } /** Branch number */ get branchNumber() { return this.document.fields.find(f => f.type.name === 'BranchNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } } /** A check format commonly used in Kuwait */ exports.ISRCheck = ISRCheck; class KWTCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return KWTCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Sort code */ get sortCode() { return this.document.fields.find(f => f.type.name === 'SortCode'); } } /** A check compatible with the Australian Paper Clearing System cheque standard */ exports.KWTCheck = KWTCheck; class AUSCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return AUSCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Auxiliary domestic */ get auxDomestic() { return this.document.fields.find(f => f.type.name === 'AuxDomestic'); } /** BSB */ get bsb() { return this.document.fields.find(f => f.type.name === 'BSB'); } /** Extra auxiliary domestic */ get extraAuxDomestic() { return this.document.fields.find(f => f.type.name === 'ExtraAuxDomestic'); } /** Transaction code */ get transactionCode() { return this.document.fields.find(f => f.type.name === 'TransactionCode'); } } /** A check compatible with the CTS-2010 standard issued by the Reserve Bank of India in 2012 */ exports.AUSCheck = AUSCheck; class INDCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return INDCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Serial number */ get serialNumber() { return this.document.fields.find(f => f.type.name === 'SerialNumber'); } /** Sort number */ get sortNumber() { return this.document.fields.find(f => f.type.name === 'SortNumber'); } /** Transaction code */ get transactionCode() { return this.document.fields.find(f => f.type.name === 'TransactionCode'); } } /** A check format commonly used in Canada */ exports.INDCheck = INDCheck; class CANCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return CANCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Bank number */ get bankNumber() { return this.document.fields.find(f => f.type.name === 'BankNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Designation number */ get designationNumber() { return this.document.fields.find(f => f.type.name === 'DesignationNumber'); } /** Transaction code */ get transactionCode() { return this.document.fields.find(f => f.type.name === 'TransactionCode'); } /** Transit number */ get transitNumber() { return this.document.fields.find(f => f.type.name === 'TransitNumber'); } } /** A check that doesn't conform to any supported standard */ exports.CANCheck = CANCheck; class UnknownCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return UnknownCheckDocumentType; } } exports.UnknownCheck = UnknownCheck; //# sourceMappingURL=CheckDocumentModel.js.map