statement-parser-fab
Version:
Parse bank and credit card statements. Updated fork with FAB (First Abu Dhabi Bank) support and maintained dependencies.
33 lines (32 loc) • 1.7 kB
TypeScript
import { AllParserOptions, ParserType } from './all-parsers';
import { ParsedOutput } from './parsed-output';
import { ParsePdfFunctionInput } from './parser-function';
export type StatementPdf = {
parserInput: ParsePdfFunctionInput<AllParserOptions[ParserType.ChasePrimeVisaCredit]>;
/** Type is always required. Without it, the package doesn't know which parser to use. */
type: ParserType.ChasePrimeVisaCredit;
} | {
parserInput: ParsePdfFunctionInput<AllParserOptions[ParserType.CitiCostcoVisaCredit]>;
/** Type is always required. Without it, the package doesn't know which parser to use. */
type: ParserType.CitiCostcoVisaCredit;
} | {
parserInput: ParsePdfFunctionInput<AllParserOptions[ParserType.FabBank]>;
/** Type is always required. Without it, the package doesn't know which parser to use. */
type: ParserType.FabBank;
} | {
parserInput: ParsePdfFunctionInput<AllParserOptions[ParserType.UsaaBank]>;
/** Type is always required. Without it, the package doesn't know which parser to use. */
type: ParserType.UsaaBank;
} | {
parserInput: ParsePdfFunctionInput<AllParserOptions[ParserType.UsaaVisaCredit]>;
/** Type is always required. Without it, the package doesn't know which parser to use. */
type: ParserType.UsaaVisaCredit;
} | {
parserInput: ParsePdfFunctionInput<AllParserOptions[ParserType.Paypal]>;
/** Type is always required. Without it, the package doesn't know which parser to use. */
type: ParserType.Paypal;
};
export type ParsedPdf = Readonly<StatementPdf & {
data: ParsedOutput;
}>;
export declare function parsePdfs(pdfs: StatementPdf[], debug?: boolean): Promise<Readonly<Readonly<ParsedPdf>[]>>;