@accounter/server
Version:
21 lines (20 loc) • 916 B
TypeScript
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;
};
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 {};