/** * Upload File Service * Uploads a file to storage with optional template-based generation */ import type { UploadFileRequest } from '@plyaz/types/api'; import type { ServiceOptions } from '@plyaz/types/api'; import type { EndpointsList } from '@/api/endpoints'; import type { FetchResponse } from 'fetchff'; /** * Upload a file to storage * Uses endpoint: POST /upload * * Supports: * - Direct file upload (with metadata) * - Template-based document generation (when templateId is provided) * * @param data - Upload request data * @param options - Optional service options (client override, config overrides) * @returns Promise * * @example * ```typescript * // Template-based generation with upload * const result = await uploadFile({ * templateId: 'invoices/standard-invoice', * templateData: { invoiceNumber: 'INV-001', total: 100 }, * filename: 'invoice.pdf', * outputFormat: 'pdf', * }); * * // With custom timeout for large files * const result = await uploadFile(data, { * apiConfig: { timeout: 120000 } * }); * ``` * * @throws {ApiPackageError} When the upload fails */ export declare function uploadFile(data: UploadFileRequest, options?: ServiceOptions): Promise; //# sourceMappingURL=uploadFile.d.ts.map