/** * 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 { CreatePaymentBody, Error, GetPaymentByIdParams, GetPayments200, GetPaymentsParams, Payment, UpdatePaymentBody, ValidationError } from '../model'; /** * Record a payment against an outgoing document or an incoming purchase document. At least one document reference is required. For new direct outgoing payments, prefer `document_id`; the API infers `invoice_id`, `credit_note_id`, or `advance_invoice_id` from the ID prefix. Legacy type-specific fields remain supported for backward compatibility. For outgoing type `credit_note`, both `invoice_id` and `credit_note_id` are required. For incoming settlement type `credit_note`, both `incoming_purchase_document_id` and `applied_to_incoming_purchase_document_id` are required. Document payment totals are automatically updated. Credit note refunds or settlements cannot exceed the remaining credit balance. * @summary Create a new payment */ export type createPaymentResponse201 = { data: Payment; status: 201; }; export type createPaymentResponse400 = { data: Error; status: 400; }; export type createPaymentResponse401 = { data: Error; status: 401; }; export type createPaymentResponse403 = { data: Error; status: 403; }; export type createPaymentResponse404 = { data: Error; status: 404; }; export type createPaymentResponse422 = { data: ValidationError; status: 422; }; export type createPaymentResponse500 = { data: Error; status: 500; }; export type createPaymentResponseSuccess = (createPaymentResponse201) & { headers: Headers; }; export type createPaymentResponseError = (createPaymentResponse400 | createPaymentResponse401 | createPaymentResponse403 | createPaymentResponse404 | createPaymentResponse422 | createPaymentResponse500) & { headers: Headers; }; export type createPaymentResponse = (createPaymentResponseSuccess | createPaymentResponseError); export declare const getCreatePaymentUrl: () => string; export declare const createPayment: (createPaymentBody: CreatePaymentBody, options?: RequestInit) => Promise; /** * Retrieve a paginated list of payments with optional filtering and sorting. Supports cursor-based pagination, flexible JSON querying with MongoDB-style operators, full-text search, and sorting across both outgoing and incoming purchase document payment references. * @summary List all payments */ export type getPaymentsResponse200 = { data: GetPayments200; status: 200; }; export type getPaymentsResponse400 = { data: Error; status: 400; }; export type getPaymentsResponse401 = { data: Error; status: 401; }; export type getPaymentsResponse403 = { data: Error; status: 403; }; export type getPaymentsResponse404 = { data: Error; status: 404; }; export type getPaymentsResponse500 = { data: Error; status: 500; }; export type getPaymentsResponseSuccess = (getPaymentsResponse200) & { headers: Headers; }; export type getPaymentsResponseError = (getPaymentsResponse400 | getPaymentsResponse401 | getPaymentsResponse403 | getPaymentsResponse404 | getPaymentsResponse500) & { headers: Headers; }; export type getPaymentsResponse = (getPaymentsResponseSuccess | getPaymentsResponseError); export declare const getGetPaymentsUrl: (params?: GetPaymentsParams) => string; export declare const getPayments: (params?: GetPaymentsParams, options?: RequestInit) => Promise; /** * Retrieve a single payment by its unique identifier. Returns the complete payment details including amount, type, date, and reference information. * @summary Get payment by ID */ export type getPaymentByIdResponse200 = { data: Payment; status: 200; }; export type getPaymentByIdResponse401 = { data: Error; status: 401; }; export type getPaymentByIdResponse403 = { data: Error; status: 403; }; export type getPaymentByIdResponse404 = { data: Error; status: 404; }; export type getPaymentByIdResponse500 = { data: Error; status: 500; }; export type getPaymentByIdResponseSuccess = (getPaymentByIdResponse200) & { headers: Headers; }; export type getPaymentByIdResponseError = (getPaymentByIdResponse401 | getPaymentByIdResponse403 | getPaymentByIdResponse404 | getPaymentByIdResponse500) & { headers: Headers; }; export type getPaymentByIdResponse = (getPaymentByIdResponseSuccess | getPaymentByIdResponseError); export declare const getGetPaymentByIdUrl: (id: string, params?: GetPaymentByIdParams) => string; export declare const getPaymentById: (id: string, params?: GetPaymentByIdParams, options?: RequestInit) => Promise; /** * Update an existing payment. Only the provided fields will be updated. Document references cannot be changed. If amount is changed, payment totals on all linked outgoing or incoming documents are automatically recalculated. System-managed settlement payments cannot be modified. * @summary Update a payment */ export type updatePaymentResponse200 = { data: Payment; status: 200; }; export type updatePaymentResponse400 = { data: Error; status: 400; }; export type updatePaymentResponse401 = { data: Error; status: 401; }; export type updatePaymentResponse403 = { data: Error; status: 403; }; export type updatePaymentResponse404 = { data: Error; status: 404; }; export type updatePaymentResponse422 = { data: ValidationError; status: 422; }; export type updatePaymentResponse500 = { data: Error; status: 500; }; export type updatePaymentResponseSuccess = (updatePaymentResponse200) & { headers: Headers; }; export type updatePaymentResponseError = (updatePaymentResponse400 | updatePaymentResponse401 | updatePaymentResponse403 | updatePaymentResponse404 | updatePaymentResponse422 | updatePaymentResponse500) & { headers: Headers; }; export type updatePaymentResponse = (updatePaymentResponseSuccess | updatePaymentResponseError); export declare const getUpdatePaymentUrl: (id: string) => string; export declare const updatePayment: (id: string, updatePaymentBody: UpdatePaymentBody, options?: RequestInit) => Promise; /** * Soft delete a payment by its unique identifier. The payment is moved to trash and can be restored later. Payment totals on all linked outgoing or incoming documents are automatically recalculated after deletion. System-managed settlement payments remain immutable. * @summary Delete a payment */ export type deletePaymentResponse204 = { data: void; status: 204; }; export type deletePaymentResponse400 = { data: Error; status: 400; }; export type deletePaymentResponse401 = { data: Error; status: 401; }; export type deletePaymentResponse403 = { data: Error; status: 403; }; export type deletePaymentResponse404 = { data: Error; status: 404; }; export type deletePaymentResponse422 = { data: ValidationError; status: 422; }; export type deletePaymentResponse500 = { data: Error; status: 500; }; export type deletePaymentResponseSuccess = (deletePaymentResponse204) & { headers: Headers; }; export type deletePaymentResponseError = (deletePaymentResponse400 | deletePaymentResponse401 | deletePaymentResponse403 | deletePaymentResponse404 | deletePaymentResponse422 | deletePaymentResponse500) & { headers: Headers; }; export type deletePaymentResponse = (deletePaymentResponseSuccess | deletePaymentResponseError); export declare const getDeletePaymentUrl: (id: string) => string; export declare const deletePayment: (id: string, options?: RequestInit) => Promise; /** * Restore a soft-deleted payment from the trash. Document payment totals are automatically recalculated. * @summary Restore a deleted payment */ export type restorePaymentResponse200 = { data: Payment; status: 200; }; export type restorePaymentResponse400 = { data: Error; status: 400; }; export type restorePaymentResponse401 = { data: Error; status: 401; }; export type restorePaymentResponse403 = { data: Error; status: 403; }; export type restorePaymentResponse404 = { data: Error; status: 404; }; export type restorePaymentResponse422 = { data: ValidationError; status: 422; }; export type restorePaymentResponse500 = { data: Error; status: 500; }; export type restorePaymentResponseSuccess = (restorePaymentResponse200) & { headers: Headers; }; export type restorePaymentResponseError = (restorePaymentResponse400 | restorePaymentResponse401 | restorePaymentResponse403 | restorePaymentResponse404 | restorePaymentResponse422 | restorePaymentResponse500) & { headers: Headers; }; export type restorePaymentResponse = (restorePaymentResponseSuccess | restorePaymentResponseError); export declare const getRestorePaymentUrl: (id: string) => string; export declare const restorePayment: (id: string, options?: RequestInit) => Promise; /** * Permanently delete a soft-deleted payment. Only payments in the trash can be permanently deleted. Document payment totals are automatically recalculated. * @summary Permanently delete a payment */ export type permanentDeletePaymentResponse204 = { data: void; status: 204; }; export type permanentDeletePaymentResponse400 = { data: Error; status: 400; }; export type permanentDeletePaymentResponse401 = { data: Error; status: 401; }; export type permanentDeletePaymentResponse403 = { data: Error; status: 403; }; export type permanentDeletePaymentResponse404 = { data: Error; status: 404; }; export type permanentDeletePaymentResponse422 = { data: ValidationError; status: 422; }; export type permanentDeletePaymentResponse500 = { data: Error; status: 500; }; export type permanentDeletePaymentResponseSuccess = (permanentDeletePaymentResponse204) & { headers: Headers; }; export type permanentDeletePaymentResponseError = (permanentDeletePaymentResponse400 | permanentDeletePaymentResponse401 | permanentDeletePaymentResponse403 | permanentDeletePaymentResponse404 | permanentDeletePaymentResponse422 | permanentDeletePaymentResponse500) & { headers: Headers; }; export type permanentDeletePaymentResponse = (permanentDeletePaymentResponseSuccess | permanentDeletePaymentResponseError); export declare const getPermanentDeletePaymentUrl: (id: string) => string; export declare const permanentDeletePayment: (id: string, options?: RequestInit) => Promise; //# sourceMappingURL=payments.d.ts.map