/** * 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 { CreateTaxBody, Error, GetTaxes200, GetTaxesParams, ReplaceTaxBody, TaxResponse, UpdateTaxBody, ValidationError } from '../model'; /** * Create a new tax with one or more tax rates. Each rate can specify a `valid_from` date to track historical changes (defaults to 1970-01-01 if not provided). Rates are automatically sorted by `valid_from` date (newest first). * @summary Create a new tax */ export type createTaxResponse201 = { data: TaxResponse; status: 201; }; export type createTaxResponse400 = { data: Error; status: 400; }; export type createTaxResponse401 = { data: Error; status: 401; }; export type createTaxResponse403 = { data: Error; status: 403; }; export type createTaxResponse404 = { data: Error; status: 404; }; export type createTaxResponse422 = { data: ValidationError; status: 422; }; export type createTaxResponse500 = { data: Error; status: 500; }; export type createTaxResponseSuccess = (createTaxResponse201) & { headers: Headers; }; export type createTaxResponseError = (createTaxResponse400 | createTaxResponse401 | createTaxResponse403 | createTaxResponse404 | createTaxResponse422 | createTaxResponse500) & { headers: Headers; }; export type createTaxResponse = (createTaxResponseSuccess | createTaxResponseError); export declare const getCreateTaxUrl: () => string; export declare const createTax: (createTaxBody: CreateTaxBody, options?: RequestInit) => Promise; /** * Retrieve a paginated list of taxes with optional filtering and sorting. Supports cursor-based pagination, flexible JSON querying with MongoDB-style operators, and sorting. Each tax may contain multiple historical rates. * @summary List all taxes */ export type getTaxesResponse200 = { data: GetTaxes200; status: 200; }; export type getTaxesResponse400 = { data: Error; status: 400; }; export type getTaxesResponse401 = { data: Error; status: 401; }; export type getTaxesResponse403 = { data: Error; status: 403; }; export type getTaxesResponse404 = { data: Error; status: 404; }; export type getTaxesResponse500 = { data: Error; status: 500; }; export type getTaxesResponseSuccess = (getTaxesResponse200) & { headers: Headers; }; export type getTaxesResponseError = (getTaxesResponse400 | getTaxesResponse401 | getTaxesResponse403 | getTaxesResponse404 | getTaxesResponse500) & { headers: Headers; }; export type getTaxesResponse = (getTaxesResponseSuccess | getTaxesResponseError); export declare const getGetTaxesUrl: (params?: GetTaxesParams) => string; export declare const getTaxes: (params?: GetTaxesParams, options?: RequestInit) => Promise; /** * Add one or more new tax rates to an existing tax. New rates are merged with existing rates and automatically sorted by `valid_from` date (newest first). Use this to track historical tax rate changes. * @summary Add new tax rate(s) */ export type updateTaxResponse200 = { data: TaxResponse; status: 200; }; export type updateTaxResponse400 = { data: Error; status: 400; }; export type updateTaxResponse401 = { data: Error; status: 401; }; export type updateTaxResponse403 = { data: Error; status: 403; }; export type updateTaxResponse404 = { data: Error; status: 404; }; export type updateTaxResponse422 = { data: ValidationError; status: 422; }; export type updateTaxResponse500 = { data: Error; status: 500; }; export type updateTaxResponseSuccess = (updateTaxResponse200) & { headers: Headers; }; export type updateTaxResponseError = (updateTaxResponse400 | updateTaxResponse401 | updateTaxResponse403 | updateTaxResponse404 | updateTaxResponse422 | updateTaxResponse500) & { headers: Headers; }; export type updateTaxResponse = (updateTaxResponseSuccess | updateTaxResponseError); export declare const getUpdateTaxUrl: (id: string) => string; export declare const updateTax: (id: string, updateTaxBody: UpdateTaxBody, options?: RequestInit) => Promise; /** * Replace all tax rates on a tax with a new set of rates. This completely replaces the existing `tax_rates` array. Use this when you need to remove rates or completely restructure the rate history. Optionally update the name as well. * @summary Replace tax rates */ export type replaceTaxResponse200 = { data: TaxResponse; status: 200; }; export type replaceTaxResponse400 = { data: Error; status: 400; }; export type replaceTaxResponse401 = { data: Error; status: 401; }; export type replaceTaxResponse403 = { data: Error; status: 403; }; export type replaceTaxResponse404 = { data: Error; status: 404; }; export type replaceTaxResponse422 = { data: ValidationError; status: 422; }; export type replaceTaxResponse500 = { data: Error; status: 500; }; export type replaceTaxResponseSuccess = (replaceTaxResponse200) & { headers: Headers; }; export type replaceTaxResponseError = (replaceTaxResponse400 | replaceTaxResponse401 | replaceTaxResponse403 | replaceTaxResponse404 | replaceTaxResponse422 | replaceTaxResponse500) & { headers: Headers; }; export type replaceTaxResponse = (replaceTaxResponseSuccess | replaceTaxResponseError); export declare const getReplaceTaxUrl: (id: string) => string; export declare const replaceTax: (id: string, replaceTaxBody: ReplaceTaxBody, options?: RequestInit) => Promise; /** * Soft delete a tax. The tax will be moved to the trash and can be restored later. * @summary Delete a tax */ export type deleteTaxResponse204 = { data: void; status: 204; }; export type deleteTaxResponse400 = { data: Error; status: 400; }; export type deleteTaxResponse401 = { data: Error; status: 401; }; export type deleteTaxResponse403 = { data: Error; status: 403; }; export type deleteTaxResponse404 = { data: Error; status: 404; }; export type deleteTaxResponse422 = { data: ValidationError; status: 422; }; export type deleteTaxResponse500 = { data: Error; status: 500; }; export type deleteTaxResponseSuccess = (deleteTaxResponse204) & { headers: Headers; }; export type deleteTaxResponseError = (deleteTaxResponse400 | deleteTaxResponse401 | deleteTaxResponse403 | deleteTaxResponse404 | deleteTaxResponse422 | deleteTaxResponse500) & { headers: Headers; }; export type deleteTaxResponse = (deleteTaxResponseSuccess | deleteTaxResponseError); export declare const getDeleteTaxUrl: (id: string) => string; export declare const deleteTax: (id: string, options?: RequestInit) => Promise; /** * Restore a soft-deleted tax from the trash. * @summary Restore a deleted tax */ export type restoreTaxResponse200 = { data: TaxResponse; status: 200; }; export type restoreTaxResponse400 = { data: Error; status: 400; }; export type restoreTaxResponse401 = { data: Error; status: 401; }; export type restoreTaxResponse403 = { data: Error; status: 403; }; export type restoreTaxResponse404 = { data: Error; status: 404; }; export type restoreTaxResponse422 = { data: ValidationError; status: 422; }; export type restoreTaxResponse500 = { data: Error; status: 500; }; export type restoreTaxResponseSuccess = (restoreTaxResponse200) & { headers: Headers; }; export type restoreTaxResponseError = (restoreTaxResponse400 | restoreTaxResponse401 | restoreTaxResponse403 | restoreTaxResponse404 | restoreTaxResponse422 | restoreTaxResponse500) & { headers: Headers; }; export type restoreTaxResponse = (restoreTaxResponseSuccess | restoreTaxResponseError); export declare const getRestoreTaxUrl: (id: string) => string; export declare const restoreTax: (id: string, options?: RequestInit) => Promise; /** * Permanently delete a soft-deleted tax. Only taxes in the trash can be permanently deleted. * @summary Permanently delete a tax */ export type permanentDeleteTaxResponse204 = { data: void; status: 204; }; export type permanentDeleteTaxResponse400 = { data: Error; status: 400; }; export type permanentDeleteTaxResponse401 = { data: Error; status: 401; }; export type permanentDeleteTaxResponse403 = { data: Error; status: 403; }; export type permanentDeleteTaxResponse404 = { data: Error; status: 404; }; export type permanentDeleteTaxResponse422 = { data: ValidationError; status: 422; }; export type permanentDeleteTaxResponse500 = { data: Error; status: 500; }; export type permanentDeleteTaxResponseSuccess = (permanentDeleteTaxResponse204) & { headers: Headers; }; export type permanentDeleteTaxResponseError = (permanentDeleteTaxResponse400 | permanentDeleteTaxResponse401 | permanentDeleteTaxResponse403 | permanentDeleteTaxResponse404 | permanentDeleteTaxResponse422 | permanentDeleteTaxResponse500) & { headers: Headers; }; export type permanentDeleteTaxResponse = (permanentDeleteTaxResponseSuccess | permanentDeleteTaxResponseError); export declare const getPermanentDeleteTaxUrl: (id: string) => string; export declare const permanentDeleteTax: (id: string, options?: RequestInit) => Promise; //# sourceMappingURL=taxes.d.ts.map