UNPKG

@accounter/server

Version:

22 lines (21 loc) 953 B
import type { Injector } from 'graphql-modules'; import { Currency, DocumentType } from '../../../shared/enums.js'; import type { IInsertDocumentsParams } from '../types.js'; export declare const uploadToCloudinary: (injector: Injector, file: File | Blob) => Promise<{ fileUrl: string; imageUrl: string; }>; type OcrData = { isOwnerIssuer: boolean | null; counterpartyId: string | null; documentType: DocumentType; serial: string | null; date: Date | null; amount: number | null; currency: Currency | null; vat: number | null; allocationNumber: string | null; }; export declare function getOcrData(injector: Injector, file: File | Blob, isSensitive?: boolean | null): Promise<OcrData>; export declare function getDocumentFromFile(context: GraphQLModules.ModuleContext, file: File | Blob, chargeId?: string | null, isSensitive?: boolean | null): Promise<IInsertDocumentsParams['document'][number]>; export {};