import { DataValues } from './interfaces'; export { DataValues }; /** * Response metadata (optional, used in some endpoints) */ export interface ResponseMetadata { count?: number; ocrFullResult?: any; ocrFullResultText?: string; usageUnits?: number; exactUsageUnits?: number; [key: string]: any; } export interface DeleteObjectResponse { /** Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined. */ acknowledged: boolean; /** The number of documents that were deleted */ deletedCount: number; } export interface FileUploadResponse { fileName: string; } export interface FileDownloadUrlResponse { url: string; } export interface FileDeleteResponse { success: boolean; message?: string; } export interface OcrImageResponse { text: string; confidence?: number; fullDetails?: any; } export interface OcrPdfResponse { text: string; pages?: Array<{ text: string; pageNumber: number; }>; fullDetails?: any; } export interface InvoiceLineItem { fullDescription: string; productReference?: string; quantity: number; unitPrice?: number; taxes: number; total: number; } export interface ScanInvoiceData { totalAmountIncludingTaxes: number; totalAmountExcludingTaxes: number; dateOfInvoice: string; irpf: number; iva: number; complete_invoice_number: string; currency: "EUR" | "USD" | "GBP" | "OTHER"; fullNameOfCompanyIssuingInvoice: string; addressOfCompanyIssuingInvoice: string; nif_cif: string; postalCode: string; city: string; province: string; country: string; invoiceListItems?: InvoiceLineItem[]; extraFields?: { [key: string]: any; }; } export interface PdfGenerationResponse { fileName: string; } export interface TranscribeAudioResponse { text: string; } export interface EmailSendResponse { success: true; message: string; messageId: string; data?: any; } export interface OpenAIUsage { prompt_tokens: number; completion_tokens: number; total_tokens: number; } export interface OpenAICompletionChoice { text: string; index: number; logprobs: any; finish_reason: string; } export interface OpenAICompletionResponse { id: string; object: string; created: number; model: string; choices: OpenAICompletionChoice[]; usage: OpenAIUsage; } export interface OpenAIChatMessage { role: string; content: string; } export interface OpenAIChatCompletionChoice { index: number; message: OpenAIChatMessage; finish_reason: string; } export interface OpenAIChatCompletionResponse { id: string; object: string; created: number; model: string; choices: OpenAIChatCompletionChoice[]; usage: OpenAIUsage; } export interface ImageGenerationResponse { fileName: string; imageUrl: string; } export interface GeminiContentPart { text?: string; functionCall?: { name: string; args: any; }; } export interface GeminiCandidate { content: { role: string; parts: GeminiContentPart[]; }; finishReason?: string; safetyRatings?: any[]; } export interface GeminiPromptFeedback { safetyRatings?: any[]; blockReason?: string; } export interface GeminiAnalyzeVideoResponse { model: string; response: { candidates: GeminiCandidate[]; promptFeedback?: GeminiPromptFeedback; }; } export interface LookupFilterResult { result: DataValues[] | number; count?: number; } export type CustomAggregationResponse = any; export interface NotificationVisibility { sendTo: "all" | "admins" | "specificUsers"; specificUsersEmails?: string[]; } export interface NotificationAction { actionType: "link" | "none"; actionName?: string; link?: string; } export interface NotificationEmail { sendEmail: boolean; totalumSupportBtn?: boolean; } export interface NotificationResponse { _id: string; name: string; type?: string; title: string; description: string; visibility: NotificationVisibility; action?: NotificationAction; email?: NotificationEmail; createdAt: Date | string; } export type StatisticResponse = number; export interface UpdateRecordChange { timestamp: Date | string; userId: string; changes: any; } export interface UpdatesRecordResponse { _id: string; objectId: string; typeId: string; updatesRecord: UpdateRecordChange[]; } export interface ManyToManyReferenceResponse { acknowledged: boolean; matchedCount?: number; modifiedCount?: number; } export type UpdatesRecordResponseOrEmpty = UpdatesRecordResponse | [];