/** * Generated by orval v8.5.3 🍺 * Do not edit manually. * Space Invoices API * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking. * OpenAPI spec version: 1.0.0 */ import type { CalculateDocumentPreview, CalculateDocumentPreviewParams, DeleteDocumentParams, DocumentCalculation, Error, FinalizeDocumentBody, FinalizeDocumentParams, FiscalizeDocumentParams, GenericDocument, GetNextDocumentNumberParams, NextDocumentNumber, PermanentDeleteDocumentParams, RestoreDocumentParams, SendDocument200, SendDocumentBody, ShareableId, ValidationError } from '../model'; /** * Preview the next auto-generated document number for the specified type without incrementing the sequence. Useful for showing users what number will be assigned before creating a document. * @summary Preview next document number */ export type getNextDocumentNumberResponse200 = { data: NextDocumentNumber; status: 200; }; export type getNextDocumentNumberResponse400 = { data: Error; status: 400; }; export type getNextDocumentNumberResponse401 = { data: Error; status: 401; }; export type getNextDocumentNumberResponse403 = { data: Error; status: 403; }; export type getNextDocumentNumberResponse404 = { data: Error; status: 404; }; export type getNextDocumentNumberResponse500 = { data: Error; status: 500; }; export type getNextDocumentNumberResponseSuccess = (getNextDocumentNumberResponse200) & { headers: Headers; }; export type getNextDocumentNumberResponseError = (getNextDocumentNumberResponse400 | getNextDocumentNumberResponse401 | getNextDocumentNumberResponse403 | getNextDocumentNumberResponse404 | getNextDocumentNumberResponse500) & { headers: Headers; }; export type getNextDocumentNumberResponse = (getNextDocumentNumberResponseSuccess | getNextDocumentNumberResponseError); export declare const getGetNextDocumentNumberUrl: (params: GetNextDocumentNumberParams) => string; export declare const getNextDocumentNumber: (params: GetNextDocumentNumberParams, options?: RequestInit) => Promise; /** * Calculate document totals, taxes, and transaction type without creating the document. Useful for showing live totals in forms or validating data before submission. * @summary Preview document calculation */ export type calculateDocumentPreviewResponse200 = { data: DocumentCalculation; status: 200; }; export type calculateDocumentPreviewResponse400 = { data: Error; status: 400; }; export type calculateDocumentPreviewResponse401 = { data: Error; status: 401; }; export type calculateDocumentPreviewResponse403 = { data: Error; status: 403; }; export type calculateDocumentPreviewResponse404 = { data: Error; status: 404; }; export type calculateDocumentPreviewResponse422 = { data: ValidationError; status: 422; }; export type calculateDocumentPreviewResponse500 = { data: Error; status: 500; }; export type calculateDocumentPreviewResponseSuccess = (calculateDocumentPreviewResponse200) & { headers: Headers; }; export type calculateDocumentPreviewResponseError = (calculateDocumentPreviewResponse400 | calculateDocumentPreviewResponse401 | calculateDocumentPreviewResponse403 | calculateDocumentPreviewResponse404 | calculateDocumentPreviewResponse422 | calculateDocumentPreviewResponse500) & { headers: Headers; }; export type calculateDocumentPreviewResponse = (calculateDocumentPreviewResponseSuccess | calculateDocumentPreviewResponseError); export declare const getCalculateDocumentPreviewUrl: (params: CalculateDocumentPreviewParams) => string; export declare const calculateDocumentPreview: (calculateDocumentPreview: CalculateDocumentPreview, params: CalculateDocumentPreviewParams, options?: RequestInit) => Promise; /** * Finalize a draft document by assigning a document number and running fiscalization (if applicable). Only draft documents can be finalized. After finalization, the document cannot be deleted. * @summary Finalize a draft document */ export type finalizeDocumentResponse200 = { data: GenericDocument; status: 200; }; export type finalizeDocumentResponse400 = { data: Error; status: 400; }; export type finalizeDocumentResponse401 = { data: Error; status: 401; }; export type finalizeDocumentResponse403 = { data: Error; status: 403; }; export type finalizeDocumentResponse404 = { data: Error; status: 404; }; export type finalizeDocumentResponse422 = { data: ValidationError; status: 422; }; export type finalizeDocumentResponse500 = { data: Error; status: 500; }; export type finalizeDocumentResponseSuccess = (finalizeDocumentResponse200) & { headers: Headers; }; export type finalizeDocumentResponseError = (finalizeDocumentResponse400 | finalizeDocumentResponse401 | finalizeDocumentResponse403 | finalizeDocumentResponse404 | finalizeDocumentResponse422 | finalizeDocumentResponse500) & { headers: Headers; }; export type finalizeDocumentResponse = (finalizeDocumentResponseSuccess | finalizeDocumentResponseError); export declare const getFinalizeDocumentUrl: (id: string, params?: FinalizeDocumentParams) => string; export declare const finalizeDocument: (id: string, finalizeDocumentBody?: FinalizeDocumentBody, params?: FinalizeDocumentParams, options?: RequestInit) => Promise; /** * Manually retry fiscalization for a document that has a failed fiscalization status. Only documents with failed FURS or FINA fiscalization can be retried. * @summary Retry document fiscalization */ export type fiscalizeDocumentResponse200 = { data: GenericDocument; status: 200; }; export type fiscalizeDocumentResponse400 = { data: Error; status: 400; }; export type fiscalizeDocumentResponse401 = { data: Error; status: 401; }; export type fiscalizeDocumentResponse403 = { data: Error; status: 403; }; export type fiscalizeDocumentResponse404 = { data: Error; status: 404; }; export type fiscalizeDocumentResponse422 = { data: ValidationError; status: 422; }; export type fiscalizeDocumentResponse500 = { data: Error; status: 500; }; export type fiscalizeDocumentResponseSuccess = (fiscalizeDocumentResponse200) & { headers: Headers; }; export type fiscalizeDocumentResponseError = (fiscalizeDocumentResponse400 | fiscalizeDocumentResponse401 | fiscalizeDocumentResponse403 | fiscalizeDocumentResponse404 | fiscalizeDocumentResponse422 | fiscalizeDocumentResponse500) & { headers: Headers; }; export type fiscalizeDocumentResponse = (fiscalizeDocumentResponseSuccess | fiscalizeDocumentResponseError); export declare const getFiscalizeDocumentUrl: (id: string, params?: FiscalizeDocumentParams) => string; export declare const fiscalizeDocument: (id: string, params?: FiscalizeDocumentParams, options?: RequestInit) => Promise; /** * Delete a draft document. Only draft documents can be deleted. Finalized documents cannot be deleted - use void instead. * @summary Delete a draft document */ export type deleteDocumentResponse204 = { data: void; status: 204; }; export type deleteDocumentResponse401 = { data: Error; status: 401; }; export type deleteDocumentResponse403 = { data: Error; status: 403; }; export type deleteDocumentResponse404 = { data: Error; status: 404; }; export type deleteDocumentResponse500 = { data: Error; status: 500; }; export type deleteDocumentResponseSuccess = (deleteDocumentResponse204) & { headers: Headers; }; export type deleteDocumentResponseError = (deleteDocumentResponse401 | deleteDocumentResponse403 | deleteDocumentResponse404 | deleteDocumentResponse500) & { headers: Headers; }; export type deleteDocumentResponse = (deleteDocumentResponseSuccess | deleteDocumentResponseError); export declare const getDeleteDocumentUrl: (id: string, params?: DeleteDocumentParams) => string; export declare const deleteDocument: (id: string, params?: DeleteDocumentParams, options?: RequestInit) => Promise; /** * Restore a soft-deleted document from the trash. The document will be returned to its original state. * @summary Restore a deleted document */ export type restoreDocumentResponse200 = { data: GenericDocument; status: 200; }; export type restoreDocumentResponse400 = { data: Error; status: 400; }; export type restoreDocumentResponse401 = { data: Error; status: 401; }; export type restoreDocumentResponse403 = { data: Error; status: 403; }; export type restoreDocumentResponse404 = { data: Error; status: 404; }; export type restoreDocumentResponse422 = { data: ValidationError; status: 422; }; export type restoreDocumentResponse500 = { data: Error; status: 500; }; export type restoreDocumentResponseSuccess = (restoreDocumentResponse200) & { headers: Headers; }; export type restoreDocumentResponseError = (restoreDocumentResponse400 | restoreDocumentResponse401 | restoreDocumentResponse403 | restoreDocumentResponse404 | restoreDocumentResponse422 | restoreDocumentResponse500) & { headers: Headers; }; export type restoreDocumentResponse = (restoreDocumentResponseSuccess | restoreDocumentResponseError); export declare const getRestoreDocumentUrl: (id: string, params?: RestoreDocumentParams) => string; export declare const restoreDocument: (id: string, params?: RestoreDocumentParams, options?: RequestInit) => Promise; /** * Permanently delete a soft-deleted document. Only documents in the trash can be permanently deleted. Only draft documents and estimates can be permanently deleted. * @summary Permanently delete a document */ export type permanentDeleteDocumentResponse204 = { data: void; status: 204; }; export type permanentDeleteDocumentResponse401 = { data: Error; status: 401; }; export type permanentDeleteDocumentResponse403 = { data: Error; status: 403; }; export type permanentDeleteDocumentResponse404 = { data: Error; status: 404; }; export type permanentDeleteDocumentResponse500 = { data: Error; status: 500; }; export type permanentDeleteDocumentResponseSuccess = (permanentDeleteDocumentResponse204) & { headers: Headers; }; export type permanentDeleteDocumentResponseError = (permanentDeleteDocumentResponse401 | permanentDeleteDocumentResponse403 | permanentDeleteDocumentResponse404 | permanentDeleteDocumentResponse500) & { headers: Headers; }; export type permanentDeleteDocumentResponse = (permanentDeleteDocumentResponseSuccess | permanentDeleteDocumentResponseError); export declare const getPermanentDeleteDocumentUrl: (id: string, params?: PermanentDeleteDocumentParams) => string; export declare const permanentDeleteDocument: (id: string, params?: PermanentDeleteDocumentParams, options?: RequestInit) => Promise; /** * Send a document via email. Automatically generates a public shareable link and optionally attaches the PDF. Supports markdown formatting and template variables in the email body. * @summary Send document via email */ export type sendDocumentResponse200 = { data: SendDocument200; status: 200; }; export type sendDocumentResponse400 = { data: Error; status: 400; }; export type sendDocumentResponse401 = { data: Error; status: 401; }; export type sendDocumentResponse403 = { data: Error; status: 403; }; export type sendDocumentResponse404 = { data: Error; status: 404; }; export type sendDocumentResponse422 = { data: ValidationError; status: 422; }; export type sendDocumentResponse500 = { data: Error; status: 500; }; export type sendDocumentResponseSuccess = (sendDocumentResponse200) & { headers: Headers; }; export type sendDocumentResponseError = (sendDocumentResponse400 | sendDocumentResponse401 | sendDocumentResponse403 | sendDocumentResponse404 | sendDocumentResponse422 | sendDocumentResponse500) & { headers: Headers; }; export type sendDocumentResponse = (sendDocumentResponseSuccess | sendDocumentResponseError); export declare const getSendDocumentUrl: (id: string) => string; export declare const sendDocument: (id: string, sendDocumentBody: SendDocumentBody, options?: RequestInit) => Promise; /** * Generate a shareable token for a document. Document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). If the document is already shared, returns the existing token. Can be used to re-share a document that was previously unshared. * @summary Make document shareable */ export type shareDocumentResponse200 = { data: ShareableId; status: 200; }; export type shareDocumentResponse400 = { data: Error; status: 400; }; export type shareDocumentResponse401 = { data: Error; status: 401; }; export type shareDocumentResponse403 = { data: Error; status: 403; }; export type shareDocumentResponse404 = { data: Error; status: 404; }; export type shareDocumentResponse422 = { data: ValidationError; status: 422; }; export type shareDocumentResponse500 = { data: Error; status: 500; }; export type shareDocumentResponseSuccess = (shareDocumentResponse200) & { headers: Headers; }; export type shareDocumentResponseError = (shareDocumentResponse400 | shareDocumentResponse401 | shareDocumentResponse403 | shareDocumentResponse404 | shareDocumentResponse422 | shareDocumentResponse500) & { headers: Headers; }; export type shareDocumentResponse = (shareDocumentResponseSuccess | shareDocumentResponseError); export declare const getShareDocumentUrl: (id: string) => string; export declare const shareDocument: (id: string, options?: RequestInit) => Promise; /** * Retrieve the shareable token for a document if one exists. Document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). * @summary Get shareable token */ export type getShareableIdResponse200 = { data: ShareableId; status: 200; }; export type getShareableIdResponse401 = { data: Error; status: 401; }; export type getShareableIdResponse403 = { data: Error; status: 403; }; export type getShareableIdResponse404 = { data: Error; status: 404; }; export type getShareableIdResponse500 = { data: Error; status: 500; }; export type getShareableIdResponseSuccess = (getShareableIdResponse200) & { headers: Headers; }; export type getShareableIdResponseError = (getShareableIdResponse401 | getShareableIdResponse403 | getShareableIdResponse404 | getShareableIdResponse500) & { headers: Headers; }; export type getShareableIdResponse = (getShareableIdResponseSuccess | getShareableIdResponseError); export declare const getGetShareableIdUrl: (id: string) => string; export declare const getShareableId: (id: string, options?: RequestInit) => Promise; /** * Remove the shareable token from a document. The document will no longer be accessible via public link. Document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). * @summary Unshare document */ export type unshareDocumentResponse204 = { data: void; status: 204; }; export type unshareDocumentResponse401 = { data: Error; status: 401; }; export type unshareDocumentResponse403 = { data: Error; status: 403; }; export type unshareDocumentResponse404 = { data: Error; status: 404; }; export type unshareDocumentResponse500 = { data: Error; status: 500; }; export type unshareDocumentResponseSuccess = (unshareDocumentResponse204) & { headers: Headers; }; export type unshareDocumentResponseError = (unshareDocumentResponse401 | unshareDocumentResponse403 | unshareDocumentResponse404 | unshareDocumentResponse500) & { headers: Headers; }; export type unshareDocumentResponse = (unshareDocumentResponseSuccess | unshareDocumentResponseError); export declare const getUnshareDocumentUrl: (id: string) => string; export declare const unshareDocument: (id: string, options?: RequestInit) => Promise; //# sourceMappingURL=documents.d.ts.map