UNPKG

@accounter/server

Version:
24 lines (23 loc) 1.19 kB
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; }>; export type OcrData = { isOwnerIssuer?: boolean; counterpartyId?: string; documentType: DocumentType; serial?: string; date?: Date; amount?: number; currency?: Currency; vat?: number; allocationNumber?: string; description?: string; remarks?: string; }; export declare function getOcrData(injector: Injector, file: File | Blob, isSensitive?: boolean | null): Promise<OcrData>; export declare function getDocumentFromUrlsAndOcrData(fileUrl: string, imageUrl: string, ocrData: OcrData, adminBusinessId: string, chargeId?: string | null, fileHash?: number): IInsertDocumentsParams['documents'][number]; export declare function getDocumentFromFile(injector: Injector, file: File | Blob, chargeId?: string | null, isSensitive?: boolean | null, counterPartyId?: string, hash?: number): Promise<IInsertDocumentsParams['documents'][number]>;