import type { AcceptDateStrings } from '../../lib/wire.js'; import type { Invoice, InvoicePagePaginatedResponse, ListInvoicesParamsFilter, SortQueryInput, UpdateInvoiceRequestInput } from '../types.js'; export interface ListInvoicesQuery { /** Determines which page of the collection to retrieve. */ page?: { size?: number; number?: number; }; /** * Sort invoices returned in the response. Supported sort attributes: * * - `issued_at` * - `created_at` (default) * - `service_period_start` * * The `asc` suffix is optional as the default sort order is ascending. The `desc` * suffix is used to specify a descending order. */ sort?: SortQueryInput; /** * Filter invoices returned in the response. * * Examples: * * - `filter[status][oeq]=draft,issued` * - `filter[customer_id]=01KPDB8K...` * - `filter[issued_at][gte]=2024-01-01T00:00:00Z` */ filter?: ListInvoicesParamsFilter; } export type ListInvoicesRequest = AcceptDateStrings; export type ListInvoicesResponse = InvoicePagePaginatedResponse; export type GetInvoiceRequest = { invoiceId: string; }; export type GetInvoiceResponse = Invoice; export type UpdateInvoiceRequest = AcceptDateStrings<{ invoiceId: string; body: UpdateInvoiceRequestInput; }>; export type UpdateInvoiceResponse = Invoice; export type DeleteInvoiceRequest = { invoiceId: string; }; export type DeleteInvoiceResponse = void; export type AdvanceInvoiceRequest = { invoiceId: string; }; export type AdvanceInvoiceResponse = Invoice; export type ApproveInvoiceRequest = { invoiceId: string; }; export type ApproveInvoiceResponse = Invoice; export type RetryInvoiceRequest = { invoiceId: string; }; export type RetryInvoiceResponse = Invoice; export type SnapshotQuantitiesInvoiceRequest = { invoiceId: string; }; export type SnapshotQuantitiesInvoiceResponse = Invoice;