@accounter/server
Version:
The test suite is split into three Vitest projects for efficiency and isolation:
23 lines (22 loc) • 1.2 kB
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;
}>;
export 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;
description: string | null;
};
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['document'][number];
export declare function getDocumentFromFile(context: GraphQLModules.ModuleContext, file: File | Blob, chargeId?: string | null, isSensitive?: boolean | null): Promise<IInsertDocumentsParams['document'][number]>;