@accounter/server
Version:
Accounter GraphQL server
30 lines (29 loc) • 1.2 kB
TypeScript
import { z } from 'zod';
import { Currency, DocumentType } from '../../shared/enums.js';
import type { BusinessMatchData, OwnerMatchInfo } from './helpers/business-matcher.helper.js';
declare const documentDataSchema: z.ZodObject<{
type: z.ZodEnum<typeof DocumentType>;
issuer: z.ZodString;
recipient: z.ZodString;
issuerVatNumber: z.ZodString;
recipientVatNumber: z.ZodString;
fullAmount: z.ZodNullable<z.ZodNumber>;
currency: z.ZodNullable<z.ZodEnum<typeof Currency>>;
vatAmount: z.ZodNullable<z.ZodNumber>;
date: z.ZodNullable<z.ZodString>;
referenceCode: z.ZodString;
allocationNumber: z.ZodNullable<z.ZodString>;
description: z.ZodString;
}, z.core.$strip>;
type DocumentData = z.infer<typeof documentDataSchema>;
export type DocumentDataWithMatches = Omit<DocumentData, 'type' | 'currency'> & {
type?: DocumentType;
currency?: Currency;
suggestedIssuer: string | null;
suggestedRecipient: string | null;
};
export declare class AnthropicProvider {
private fileToBase64;
extractInvoiceDetails(fileOrBlob: File | Blob, businesses?: BusinessMatchData[], owner?: OwnerMatchInfo): Promise<DocumentDataWithMatches>;
}
export {};