/** * 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 { CompleteInvoicePreview, CreateInvoice, CustomCreateInvoice, DocumentVersion, DocumentVersionList, Error, GetInvoiceByIdParams, GetInvoicesParams, GetShareableInvoiceHtmlParams, GetShareableInvoicePdfParams, Invoice, InvoiceList, PartialInvoicePreview, RenderDocumentHtmlParams, RenderDocumentPdfParams, RenderInvoicePreviewParams, UpdateInvoice, ValidationError, VoidInvoiceBody } from '../model'; /** * Retrieve invoice data using a shareable token. No authentication required. Returns full invoice data for rendering. * @summary View shareable invoice */ export type getShareableInvoiceResponse200 = { data: Invoice; status: 200; }; export type getShareableInvoiceResponse404 = { data: void; status: 404; }; export type getShareableInvoiceResponseSuccess = (getShareableInvoiceResponse200) & { headers: Headers; }; export type getShareableInvoiceResponseError = (getShareableInvoiceResponse404) & { headers: Headers; }; export type getShareableInvoiceResponse = (getShareableInvoiceResponseSuccess | getShareableInvoiceResponseError); export declare const getGetShareableInvoiceUrl: (shareableId: string) => string; export declare const getShareableInvoice: (shareableId: string, options?: RequestInit) => Promise; /** * Get invoice as HTML preview using a shareable token. No authentication required. Supports multiple languages via locale query parameter. * @summary Get shareable invoice as HTML */ export type getShareableInvoiceHtmlResponse200 = { data: string; status: 200; }; export type getShareableInvoiceHtmlResponse404 = { data: void; status: 404; }; export type getShareableInvoiceHtmlResponseSuccess = (getShareableInvoiceHtmlResponse200) & { headers: Headers; }; export type getShareableInvoiceHtmlResponseError = (getShareableInvoiceHtmlResponse404) & { headers: Headers; }; export type getShareableInvoiceHtmlResponse = (getShareableInvoiceHtmlResponseSuccess | getShareableInvoiceHtmlResponseError); export declare const getGetShareableInvoiceHtmlUrl: (shareableId: string, params?: GetShareableInvoiceHtmlParams) => string; export declare const getShareableInvoiceHtml: (shareableId: string, params?: GetShareableInvoiceHtmlParams, options?: RequestInit) => Promise; /** * Download invoice as PDF using a shareable token. No authentication required. Supports multiple languages via locale query parameter. * @summary Download shareable invoice as PDF */ export type getShareableInvoicePdfResponse200 = { data: Blob; status: 200; }; export type getShareableInvoicePdfResponse404 = { data: void; status: 404; }; export type getShareableInvoicePdfResponseSuccess = (getShareableInvoicePdfResponse200) & { headers: Headers; }; export type getShareableInvoicePdfResponseError = (getShareableInvoicePdfResponse404) & { headers: Headers; }; export type getShareableInvoicePdfResponse = (getShareableInvoicePdfResponseSuccess | getShareableInvoicePdfResponseError); export declare const getGetShareableInvoicePdfUrl: (shareableId: string, params?: GetShareableInvoicePdfParams) => string; export declare const getShareableInvoicePdf: (shareableId: string, params?: GetShareableInvoicePdfParams, options?: RequestInit) => Promise; /** * Download invoice as e-SLOG 2.0 XML (Slovenian electronic invoice format) using a shareable token. No authentication required. Only available for Slovenian entities with valid e-SLOG validation. * @summary Download shareable invoice as e-SLOG XML */ export type getShareableInvoiceEslogResponse200 = { data: string; status: 200; }; export type getShareableInvoiceEslogResponse404 = { data: void; status: 404; }; export type getShareableInvoiceEslogResponseSuccess = (getShareableInvoiceEslogResponse200) & { headers: Headers; }; export type getShareableInvoiceEslogResponseError = (getShareableInvoiceEslogResponse404) & { headers: Headers; }; export type getShareableInvoiceEslogResponse = (getShareableInvoiceEslogResponseSuccess | getShareableInvoiceEslogResponseError); export declare const getGetShareableInvoiceEslogUrl: (shareableId: string) => string; export declare const getShareableInvoiceEslog: (shareableId: string, options?: RequestInit) => Promise; /** * Create a new invoice with line items. Customer is optional - can be omitted for retail/convenience store sales where customer information isn't needed, or added inline without referencing a customer_id. The invoice number is auto-generated based on the entity's number format settings. Taxes are calculated automatically based on the tax rates provided. * @summary Create a new invoice */ export type createInvoiceResponse201 = { data: Invoice; status: 201; }; export type createInvoiceResponse400 = { data: Error; status: 400; }; export type createInvoiceResponse401 = { data: Error; status: 401; }; export type createInvoiceResponse403 = { data: Error; status: 403; }; export type createInvoiceResponse404 = { data: Error; status: 404; }; export type createInvoiceResponse422 = { data: ValidationError; status: 422; }; export type createInvoiceResponse500 = { data: Error; status: 500; }; export type createInvoiceResponseSuccess = (createInvoiceResponse201) & { headers: Headers; }; export type createInvoiceResponseError = (createInvoiceResponse400 | createInvoiceResponse401 | createInvoiceResponse403 | createInvoiceResponse404 | createInvoiceResponse422 | createInvoiceResponse500) & { headers: Headers; }; export type createInvoiceResponse = (createInvoiceResponseSuccess | createInvoiceResponseError); export declare const getCreateInvoiceUrl: () => string; export declare const createInvoice: (createInvoice: CreateInvoice, options?: RequestInit) => Promise; /** * Retrieve a paginated list of invoices with optional filtering and sorting. Supports cursor-based pagination, flexible JSON querying with MongoDB-style operators, full-text search, and sorting. * @summary List all invoices */ export type getInvoicesResponse200 = { data: InvoiceList; status: 200; }; export type getInvoicesResponse400 = { data: Error; status: 400; }; export type getInvoicesResponse401 = { data: Error; status: 401; }; export type getInvoicesResponse403 = { data: Error; status: 403; }; export type getInvoicesResponse404 = { data: Error; status: 404; }; export type getInvoicesResponse500 = { data: Error; status: 500; }; export type getInvoicesResponseSuccess = (getInvoicesResponse200) & { headers: Headers; }; export type getInvoicesResponseError = (getInvoicesResponse400 | getInvoicesResponse401 | getInvoicesResponse403 | getInvoicesResponse404 | getInvoicesResponse500) & { headers: Headers; }; export type getInvoicesResponse = (getInvoicesResponseSuccess | getInvoicesResponseError); export declare const getGetInvoicesUrl: (params?: GetInvoicesParams) => string; export declare const getInvoices: (params?: GetInvoicesParams, options?: RequestInit) => Promise; /** * Create an invoice with pre-calculated totals from an external ERP or accounting system. The caller provides `total`, `total_with_tax`, `total_discount`, and `taxes` at the document level, and `total`/`total_with_tax` on each line item. When `calculation_mode` is omitted, Space Invoices preserves pass-through behavior and accepts the supplied totals as-is. When `calculation_mode` is provided, Space Invoices validates the supplied totals against that calculation mode before creating the document. All other logic (numbering, fiscalization, customer handling, payments, lifecycle hooks) is identical to the standard create endpoint. * @summary Create invoice with pre-calculated totals */ export type createCustomInvoiceResponse201 = { data: Invoice; status: 201; }; export type createCustomInvoiceResponse400 = { data: Error; status: 400; }; export type createCustomInvoiceResponse401 = { data: Error; status: 401; }; export type createCustomInvoiceResponse403 = { data: Error; status: 403; }; export type createCustomInvoiceResponse404 = { data: Error; status: 404; }; export type createCustomInvoiceResponse422 = { data: ValidationError; status: 422; }; export type createCustomInvoiceResponse500 = { data: Error; status: 500; }; export type createCustomInvoiceResponseSuccess = (createCustomInvoiceResponse201) & { headers: Headers; }; export type createCustomInvoiceResponseError = (createCustomInvoiceResponse400 | createCustomInvoiceResponse401 | createCustomInvoiceResponse403 | createCustomInvoiceResponse404 | createCustomInvoiceResponse422 | createCustomInvoiceResponse500) & { headers: Headers; }; export type createCustomInvoiceResponse = (createCustomInvoiceResponseSuccess | createCustomInvoiceResponseError); export declare const getCreateCustomInvoiceUrl: () => string; export declare const createCustomInvoice: (customCreateInvoice: CustomCreateInvoice, options?: RequestInit) => Promise; /** * Retrieve a single invoice by its unique identifier. Returns the complete invoice details including all line items, customer information, and calculated totals. * @summary Get invoice by ID */ export type getInvoiceByIdResponse200 = { data: Invoice; status: 200; }; export type getInvoiceByIdResponse401 = { data: Error; status: 401; }; export type getInvoiceByIdResponse403 = { data: Error; status: 403; }; export type getInvoiceByIdResponse404 = { data: Error; status: 404; }; export type getInvoiceByIdResponse500 = { data: Error; status: 500; }; export type getInvoiceByIdResponseSuccess = (getInvoiceByIdResponse200) & { headers: Headers; }; export type getInvoiceByIdResponseError = (getInvoiceByIdResponse401 | getInvoiceByIdResponse403 | getInvoiceByIdResponse404 | getInvoiceByIdResponse500) & { headers: Headers; }; export type getInvoiceByIdResponse = (getInvoiceByIdResponseSuccess | getInvoiceByIdResponseError); export declare const getGetInvoiceByIdUrl: (id: string, params?: GetInvoiceByIdParams) => string; export declare const getInvoiceById: (id: string, params?: GetInvoiceByIdParams, options?: RequestInit) => Promise; /** * Update an existing invoice. Creates a version snapshot before applying changes. Cannot update voided or FURS-fiscalized invoices. If items are provided, they replace all existing items. * @summary Update an invoice */ export type updateInvoiceResponse200 = { data: Invoice; status: 200; }; export type updateInvoiceResponse400 = { data: Error; status: 400; }; export type updateInvoiceResponse401 = { data: Error; status: 401; }; export type updateInvoiceResponse403 = { data: Error; status: 403; }; export type updateInvoiceResponse404 = { data: Error; status: 404; }; export type updateInvoiceResponse422 = { data: ValidationError; status: 422; }; export type updateInvoiceResponse500 = { data: Error; status: 500; }; export type updateInvoiceResponseSuccess = (updateInvoiceResponse200) & { headers: Headers; }; export type updateInvoiceResponseError = (updateInvoiceResponse400 | updateInvoiceResponse401 | updateInvoiceResponse403 | updateInvoiceResponse404 | updateInvoiceResponse422 | updateInvoiceResponse500) & { headers: Headers; }; export type updateInvoiceResponse = (updateInvoiceResponseSuccess | updateInvoiceResponseError); export declare const getUpdateInvoiceUrl: (id: string) => string; export declare const updateInvoice: (id: string, updateInvoice: UpdateInvoice, options?: RequestInit) => Promise; /** * Retrieve the version history for an invoice. Each version represents the document state before an update was applied. * @summary Get invoice version history */ export type getInvoiceVersionsResponse200 = { data: DocumentVersionList; status: 200; }; export type getInvoiceVersionsResponse401 = { data: Error; status: 401; }; export type getInvoiceVersionsResponse403 = { data: Error; status: 403; }; export type getInvoiceVersionsResponse404 = { data: Error; status: 404; }; export type getInvoiceVersionsResponse500 = { data: Error; status: 500; }; export type getInvoiceVersionsResponseSuccess = (getInvoiceVersionsResponse200) & { headers: Headers; }; export type getInvoiceVersionsResponseError = (getInvoiceVersionsResponse401 | getInvoiceVersionsResponse403 | getInvoiceVersionsResponse404 | getInvoiceVersionsResponse500) & { headers: Headers; }; export type getInvoiceVersionsResponse = (getInvoiceVersionsResponseSuccess | getInvoiceVersionsResponseError); export declare const getGetInvoiceVersionsUrl: (id: string) => string; export declare const getInvoiceVersions: (id: string, options?: RequestInit) => Promise; /** * Retrieve a specific version snapshot of an invoice. * @summary Get specific invoice version */ export type getInvoiceVersionResponse200 = { data: DocumentVersion; status: 200; }; export type getInvoiceVersionResponse401 = { data: Error; status: 401; }; export type getInvoiceVersionResponse403 = { data: Error; status: 403; }; export type getInvoiceVersionResponse404 = { data: Error; status: 404; }; export type getInvoiceVersionResponse500 = { data: Error; status: 500; }; export type getInvoiceVersionResponseSuccess = (getInvoiceVersionResponse200) & { headers: Headers; }; export type getInvoiceVersionResponseError = (getInvoiceVersionResponse401 | getInvoiceVersionResponse403 | getInvoiceVersionResponse404 | getInvoiceVersionResponse500) & { headers: Headers; }; export type getInvoiceVersionResponse = (getInvoiceVersionResponseSuccess | getInvoiceVersionResponseError); export declare const getGetInvoiceVersionUrl: (id: string, version: number) => string; export declare const getInvoiceVersion: (id: string, version: number, options?: RequestInit) => Promise; /** * Render an HTML preview of an invoice without saving to the database. Perfect for displaying live previews in invoice creation/edit forms. Supports both partial mode (allows incomplete data for drafts) and complete mode (validates all required fields). * @summary Render invoice preview */ export type renderInvoicePreviewResponse200 = { data: string; status: 200; }; export type renderInvoicePreviewResponse400 = { data: Error; status: 400; }; export type renderInvoicePreviewResponse401 = { data: Error; status: 401; }; export type renderInvoicePreviewResponse403 = { data: Error; status: 403; }; export type renderInvoicePreviewResponse404 = { data: Error; status: 404; }; export type renderInvoicePreviewResponse422 = { data: ValidationError; status: 422; }; export type renderInvoicePreviewResponse500 = { data: Error; status: 500; }; export type renderInvoicePreviewResponseSuccess = (renderInvoicePreviewResponse200) & { headers: Headers; }; export type renderInvoicePreviewResponseError = (renderInvoicePreviewResponse400 | renderInvoicePreviewResponse401 | renderInvoicePreviewResponse403 | renderInvoicePreviewResponse404 | renderInvoicePreviewResponse422 | renderInvoicePreviewResponse500) & { headers: Headers; }; export type renderInvoicePreviewResponse = (renderInvoicePreviewResponseSuccess | renderInvoicePreviewResponseError); export declare const getRenderInvoicePreviewUrl: (params?: RenderInvoicePreviewParams) => string; export declare const renderInvoicePreview: (partialInvoicePreviewCompleteInvoicePreview: PartialInvoicePreview | CompleteInvoicePreview, params?: RenderInvoicePreviewParams, options?: RequestInit) => Promise; /** * Void an invoice for technical reasons (duplicate, error, etc.). For FURS-fiscalized invoices, automatically submits technical cancellation to FURS and creates a credit note. For business corrections, create a credit note instead. * @summary Void an invoice */ export type voidInvoiceResponse200 = { data: Invoice; status: 200; }; export type voidInvoiceResponse400 = { data: Error; status: 400; }; export type voidInvoiceResponse401 = { data: Error; status: 401; }; export type voidInvoiceResponse403 = { data: Error; status: 403; }; export type voidInvoiceResponse404 = { data: Error; status: 404; }; export type voidInvoiceResponse422 = { data: ValidationError; status: 422; }; export type voidInvoiceResponse500 = { data: Error; status: 500; }; export type voidInvoiceResponseSuccess = (voidInvoiceResponse200) & { headers: Headers; }; export type voidInvoiceResponseError = (voidInvoiceResponse400 | voidInvoiceResponse401 | voidInvoiceResponse403 | voidInvoiceResponse404 | voidInvoiceResponse422 | voidInvoiceResponse500) & { headers: Headers; }; export type voidInvoiceResponse = (voidInvoiceResponseSuccess | voidInvoiceResponseError); export declare const getVoidInvoiceUrl: (id: string) => string; export declare const voidInvoice: (id: string, voidInvoiceBody: VoidInvoiceBody, options?: RequestInit) => Promise; /** * Manually fiscalize an invoice that was created before FURS was enabled. Auto-creates a dedicated "OLD" premise and device for FURS submission, assigns a new sequential FURS number (OLD-OLD-N), and submits to FURS with SubsequentSubmit=true and SpecialNotes=#OLDINV;. The original invoice number remains unchanged. * @summary Fiscalize an old invoice */ export type fiscalizeInvoiceResponse200 = { data: Invoice; status: 200; }; export type fiscalizeInvoiceResponse400 = { data: Error; status: 400; }; export type fiscalizeInvoiceResponse401 = { data: Error; status: 401; }; export type fiscalizeInvoiceResponse403 = { data: Error; status: 403; }; export type fiscalizeInvoiceResponse404 = { data: Error; status: 404; }; export type fiscalizeInvoiceResponse422 = { data: ValidationError; status: 422; }; export type fiscalizeInvoiceResponse500 = { data: Error; status: 500; }; export type fiscalizeInvoiceResponseSuccess = (fiscalizeInvoiceResponse200) & { headers: Headers; }; export type fiscalizeInvoiceResponseError = (fiscalizeInvoiceResponse400 | fiscalizeInvoiceResponse401 | fiscalizeInvoiceResponse403 | fiscalizeInvoiceResponse404 | fiscalizeInvoiceResponse422 | fiscalizeInvoiceResponse500) & { headers: Headers; }; export type fiscalizeInvoiceResponse = (fiscalizeInvoiceResponseSuccess | fiscalizeInvoiceResponseError); export declare const getFiscalizeInvoiceUrl: (id: string) => string; export declare const fiscalizeInvoice: (id: string, options?: RequestInit) => Promise; /** * Render a saved document by its ID as HTML. The document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). The output is styled for professional presentation and optimized for display in web applications. * @summary Render HTML */ export type renderDocumentHtmlResponse200 = { data: string; status: 200; }; export type renderDocumentHtmlResponse401 = { data: Error; status: 401; }; export type renderDocumentHtmlResponse403 = { data: Error; status: 403; }; export type renderDocumentHtmlResponse404 = { data: Error; status: 404; }; export type renderDocumentHtmlResponse500 = { data: Error; status: 500; }; export type renderDocumentHtmlResponseSuccess = (renderDocumentHtmlResponse200) & { headers: Headers; }; export type renderDocumentHtmlResponseError = (renderDocumentHtmlResponse401 | renderDocumentHtmlResponse403 | renderDocumentHtmlResponse404 | renderDocumentHtmlResponse500) & { headers: Headers; }; export type renderDocumentHtmlResponse = (renderDocumentHtmlResponseSuccess | renderDocumentHtmlResponseError); export declare const getRenderDocumentHtmlUrl: (id: string, params?: RenderDocumentHtmlParams) => string; export declare const renderDocumentHtml: (id: string, params?: RenderDocumentHtmlParams, options?: RequestInit) => Promise; /** * Render a saved document by its ID as PDF. The document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). The output is styled for professional presentation and optimized for printing. Ideal for downloads and archival. * @summary Render PDF */ export type renderDocumentPdfResponse200 = { data: Blob; status: 200; }; export type renderDocumentPdfResponse401 = { data: Error; status: 401; }; export type renderDocumentPdfResponse403 = { data: Error; status: 403; }; export type renderDocumentPdfResponse404 = { data: Error; status: 404; }; export type renderDocumentPdfResponse500 = { data: Error; status: 500; }; export type renderDocumentPdfResponseSuccess = (renderDocumentPdfResponse200) & { headers: Headers; }; export type renderDocumentPdfResponseError = (renderDocumentPdfResponse401 | renderDocumentPdfResponse403 | renderDocumentPdfResponse404 | renderDocumentPdfResponse500) & { headers: Headers; }; export type renderDocumentPdfResponse = (renderDocumentPdfResponseSuccess | renderDocumentPdfResponseError); export declare const getRenderDocumentPdfUrl: (id: string, params?: RenderDocumentPdfParams) => string; export declare const renderDocumentPdf: (id: string, params?: RenderDocumentPdfParams, options?: RequestInit) => Promise; //# sourceMappingURL=invoices.d.ts.map