File size: 2,013 Bytes
1477a90 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
import { z } from 'zod'
import * as schemas from '../schemas.js'
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<ListInvoicesQuery>
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
|