/** * 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 { CompleteEstimatePreview, CreateEstimate, CustomCreateEstimate, DocumentVersion, DocumentVersionList, Error, Estimate, EstimateList, GetEstimateByIdParams, GetEstimatesParams, GetShareableEstimateHtmlParams, GetShareableEstimatePdfParams, PartialEstimatePreview, RenderEstimatePreviewParams, UpdateEstimate, ValidationError } from '../model'; /** * Retrieve estimate data using a shareable token. No authentication required. Returns full estimate data for rendering. * @summary View shareable estimate */ export type getShareableEstimateResponse200 = { data: Estimate; status: 200; }; export type getShareableEstimateResponse404 = { data: void; status: 404; }; export type getShareableEstimateResponseSuccess = (getShareableEstimateResponse200) & { headers: Headers; }; export type getShareableEstimateResponseError = (getShareableEstimateResponse404) & { headers: Headers; }; export type getShareableEstimateResponse = (getShareableEstimateResponseSuccess | getShareableEstimateResponseError); export declare const getGetShareableEstimateUrl: (shareableId: string) => string; export declare const getShareableEstimate: (shareableId: string, options?: RequestInit) => Promise; /** * Get estimate as HTML preview using a shareable token. No authentication required. Supports multiple languages via locale query parameter. * @summary Get shareable estimate as HTML */ export type getShareableEstimateHtmlResponse200 = { data: string; status: 200; }; export type getShareableEstimateHtmlResponse404 = { data: void; status: 404; }; export type getShareableEstimateHtmlResponseSuccess = (getShareableEstimateHtmlResponse200) & { headers: Headers; }; export type getShareableEstimateHtmlResponseError = (getShareableEstimateHtmlResponse404) & { headers: Headers; }; export type getShareableEstimateHtmlResponse = (getShareableEstimateHtmlResponseSuccess | getShareableEstimateHtmlResponseError); export declare const getGetShareableEstimateHtmlUrl: (shareableId: string, params?: GetShareableEstimateHtmlParams) => string; export declare const getShareableEstimateHtml: (shareableId: string, params?: GetShareableEstimateHtmlParams, options?: RequestInit) => Promise; /** * Download estimate as PDF using a shareable token. No authentication required. Supports multiple languages via locale query parameter. * @summary Download shareable estimate as PDF */ export type getShareableEstimatePdfResponse200 = { data: Blob; status: 200; }; export type getShareableEstimatePdfResponse404 = { data: void; status: 404; }; export type getShareableEstimatePdfResponseSuccess = (getShareableEstimatePdfResponse200) & { headers: Headers; }; export type getShareableEstimatePdfResponseError = (getShareableEstimatePdfResponse404) & { headers: Headers; }; export type getShareableEstimatePdfResponse = (getShareableEstimatePdfResponseSuccess | getShareableEstimatePdfResponseError); export declare const getGetShareableEstimatePdfUrl: (shareableId: string, params?: GetShareableEstimatePdfParams) => string; export declare const getShareableEstimatePdf: (shareableId: string, params?: GetShareableEstimatePdfParams, options?: RequestInit) => Promise; /** * Create a new estimate with line items. Customer is optional - can be omitted or added inline without referencing a customer_id. The estimate number is auto-generated based on the entity's number format settings. Taxes are calculated automatically based on the tax rates provided. Estimates are valid until the date_valid_till field (defaults to 30 days from creation). * @summary Create a new estimate */ export type createEstimateResponse201 = { data: Estimate; status: 201; }; export type createEstimateResponse400 = { data: Error; status: 400; }; export type createEstimateResponse401 = { data: Error; status: 401; }; export type createEstimateResponse403 = { data: Error; status: 403; }; export type createEstimateResponse404 = { data: Error; status: 404; }; export type createEstimateResponse422 = { data: ValidationError; status: 422; }; export type createEstimateResponse500 = { data: Error; status: 500; }; export type createEstimateResponseSuccess = (createEstimateResponse201) & { headers: Headers; }; export type createEstimateResponseError = (createEstimateResponse400 | createEstimateResponse401 | createEstimateResponse403 | createEstimateResponse404 | createEstimateResponse422 | createEstimateResponse500) & { headers: Headers; }; export type createEstimateResponse = (createEstimateResponseSuccess | createEstimateResponseError); export declare const getCreateEstimateUrl: () => string; export declare const createEstimate: (createEstimate: CreateEstimate, options?: RequestInit) => Promise; /** * Retrieve a paginated list of estimates with optional filtering and sorting. Supports cursor-based pagination, flexible JSON querying with MongoDB-style operators, full-text search, and sorting. * @summary List all estimates */ export type getEstimatesResponse200 = { data: EstimateList; status: 200; }; export type getEstimatesResponse400 = { data: Error; status: 400; }; export type getEstimatesResponse401 = { data: Error; status: 401; }; export type getEstimatesResponse403 = { data: Error; status: 403; }; export type getEstimatesResponse404 = { data: Error; status: 404; }; export type getEstimatesResponse500 = { data: Error; status: 500; }; export type getEstimatesResponseSuccess = (getEstimatesResponse200) & { headers: Headers; }; export type getEstimatesResponseError = (getEstimatesResponse400 | getEstimatesResponse401 | getEstimatesResponse403 | getEstimatesResponse404 | getEstimatesResponse500) & { headers: Headers; }; export type getEstimatesResponse = (getEstimatesResponseSuccess | getEstimatesResponseError); export declare const getGetEstimatesUrl: (params?: GetEstimatesParams) => string; export declare const getEstimates: (params?: GetEstimatesParams, options?: RequestInit) => Promise; /** * Create an estimate with pre-calculated totals from an external 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, customer handling, lifecycle hooks) is identical to the standard create endpoint. * @summary Create estimate with pre-calculated totals */ export type createCustomEstimateResponse201 = { data: Estimate; status: 201; }; export type createCustomEstimateResponse400 = { data: Error; status: 400; }; export type createCustomEstimateResponse401 = { data: Error; status: 401; }; export type createCustomEstimateResponse403 = { data: Error; status: 403; }; export type createCustomEstimateResponse404 = { data: Error; status: 404; }; export type createCustomEstimateResponse422 = { data: ValidationError; status: 422; }; export type createCustomEstimateResponse500 = { data: Error; status: 500; }; export type createCustomEstimateResponseSuccess = (createCustomEstimateResponse201) & { headers: Headers; }; export type createCustomEstimateResponseError = (createCustomEstimateResponse400 | createCustomEstimateResponse401 | createCustomEstimateResponse403 | createCustomEstimateResponse404 | createCustomEstimateResponse422 | createCustomEstimateResponse500) & { headers: Headers; }; export type createCustomEstimateResponse = (createCustomEstimateResponseSuccess | createCustomEstimateResponseError); export declare const getCreateCustomEstimateUrl: () => string; export declare const createCustomEstimate: (customCreateEstimate: CustomCreateEstimate, options?: RequestInit) => Promise; /** * Retrieve a single estimate by its unique identifier. Returns the complete estimate details including all line items, customer information, and calculated totals. * @summary Get estimate by ID */ export type getEstimateByIdResponse200 = { data: Estimate; status: 200; }; export type getEstimateByIdResponse401 = { data: Error; status: 401; }; export type getEstimateByIdResponse403 = { data: Error; status: 403; }; export type getEstimateByIdResponse404 = { data: Error; status: 404; }; export type getEstimateByIdResponse500 = { data: Error; status: 500; }; export type getEstimateByIdResponseSuccess = (getEstimateByIdResponse200) & { headers: Headers; }; export type getEstimateByIdResponseError = (getEstimateByIdResponse401 | getEstimateByIdResponse403 | getEstimateByIdResponse404 | getEstimateByIdResponse500) & { headers: Headers; }; export type getEstimateByIdResponse = (getEstimateByIdResponseSuccess | getEstimateByIdResponseError); export declare const getGetEstimateByIdUrl: (id: string, params?: GetEstimateByIdParams) => string; export declare const getEstimateById: (id: string, params?: GetEstimateByIdParams, options?: RequestInit) => Promise; /** * Update an existing estimate. Creates a version snapshot before applying changes. Cannot update voided estimates. If items are provided, they replace all existing items. * @summary Update an estimate */ export type updateEstimateResponse200 = { data: Estimate; status: 200; }; export type updateEstimateResponse400 = { data: Error; status: 400; }; export type updateEstimateResponse401 = { data: Error; status: 401; }; export type updateEstimateResponse403 = { data: Error; status: 403; }; export type updateEstimateResponse404 = { data: Error; status: 404; }; export type updateEstimateResponse422 = { data: ValidationError; status: 422; }; export type updateEstimateResponse500 = { data: Error; status: 500; }; export type updateEstimateResponseSuccess = (updateEstimateResponse200) & { headers: Headers; }; export type updateEstimateResponseError = (updateEstimateResponse400 | updateEstimateResponse401 | updateEstimateResponse403 | updateEstimateResponse404 | updateEstimateResponse422 | updateEstimateResponse500) & { headers: Headers; }; export type updateEstimateResponse = (updateEstimateResponseSuccess | updateEstimateResponseError); export declare const getUpdateEstimateUrl: (id: string) => string; export declare const updateEstimate: (id: string, updateEstimate: UpdateEstimate, options?: RequestInit) => Promise; /** * Retrieve the version history for an estimate. Each version represents the document state before an update was applied. * @summary Get estimate version history */ export type getEstimateVersionsResponse200 = { data: DocumentVersionList; status: 200; }; export type getEstimateVersionsResponse401 = { data: Error; status: 401; }; export type getEstimateVersionsResponse403 = { data: Error; status: 403; }; export type getEstimateVersionsResponse404 = { data: Error; status: 404; }; export type getEstimateVersionsResponse500 = { data: Error; status: 500; }; export type getEstimateVersionsResponseSuccess = (getEstimateVersionsResponse200) & { headers: Headers; }; export type getEstimateVersionsResponseError = (getEstimateVersionsResponse401 | getEstimateVersionsResponse403 | getEstimateVersionsResponse404 | getEstimateVersionsResponse500) & { headers: Headers; }; export type getEstimateVersionsResponse = (getEstimateVersionsResponseSuccess | getEstimateVersionsResponseError); export declare const getGetEstimateVersionsUrl: (id: string) => string; export declare const getEstimateVersions: (id: string, options?: RequestInit) => Promise; /** * Retrieve a specific version snapshot of an estimate. * @summary Get specific estimate version */ export type getEstimateVersionResponse200 = { data: DocumentVersion; status: 200; }; export type getEstimateVersionResponse401 = { data: Error; status: 401; }; export type getEstimateVersionResponse403 = { data: Error; status: 403; }; export type getEstimateVersionResponse404 = { data: Error; status: 404; }; export type getEstimateVersionResponse500 = { data: Error; status: 500; }; export type getEstimateVersionResponseSuccess = (getEstimateVersionResponse200) & { headers: Headers; }; export type getEstimateVersionResponseError = (getEstimateVersionResponse401 | getEstimateVersionResponse403 | getEstimateVersionResponse404 | getEstimateVersionResponse500) & { headers: Headers; }; export type getEstimateVersionResponse = (getEstimateVersionResponseSuccess | getEstimateVersionResponseError); export declare const getGetEstimateVersionUrl: (id: string, version: number) => string; export declare const getEstimateVersion: (id: string, version: number, options?: RequestInit) => Promise; /** * Render an HTML preview of an estimate without saving to the database. Perfect for displaying live previews in estimate creation/edit forms. Supports both partial mode (allows incomplete data for drafts) and complete mode (validates all required fields). * @summary Render estimate preview */ export type renderEstimatePreviewResponse200 = { data: string; status: 200; }; export type renderEstimatePreviewResponse400 = { data: Error; status: 400; }; export type renderEstimatePreviewResponse401 = { data: Error; status: 401; }; export type renderEstimatePreviewResponse403 = { data: Error; status: 403; }; export type renderEstimatePreviewResponse404 = { data: Error; status: 404; }; export type renderEstimatePreviewResponse422 = { data: ValidationError; status: 422; }; export type renderEstimatePreviewResponse500 = { data: Error; status: 500; }; export type renderEstimatePreviewResponseSuccess = (renderEstimatePreviewResponse200) & { headers: Headers; }; export type renderEstimatePreviewResponseError = (renderEstimatePreviewResponse400 | renderEstimatePreviewResponse401 | renderEstimatePreviewResponse403 | renderEstimatePreviewResponse404 | renderEstimatePreviewResponse422 | renderEstimatePreviewResponse500) & { headers: Headers; }; export type renderEstimatePreviewResponse = (renderEstimatePreviewResponseSuccess | renderEstimatePreviewResponseError); export declare const getRenderEstimatePreviewUrl: (params?: RenderEstimatePreviewParams) => string; export declare const renderEstimatePreview: (partialEstimatePreviewCompleteEstimatePreview: PartialEstimatePreview | CompleteEstimatePreview, params?: RenderEstimatePreviewParams, options?: RequestInit) => Promise; //# sourceMappingURL=estimates.d.ts.map