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