import { type Client } from '../core.js'; import { type RequestOptions } from '../lib/types.js'; import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse, AdvanceInvoiceRequest, AdvanceInvoiceResponse, ApproveInvoiceRequest, ApproveInvoiceResponse, RetryInvoiceRequest, RetryInvoiceResponse, SnapshotQuantitiesInvoiceRequest, SnapshotQuantitiesInvoiceResponse } from '../models/operations/invoices.js'; import type { Invoice } from '../models/types.js'; export declare class Invoices { private readonly _client; constructor(_client: Client); /** * List billing invoices * * List billing invoices. * * Returns a page of invoices. Gathering invoices are never included. Use `filter` * to narrow by status, customer, dates, or service period start. Use `sort` to * control ordering. * * GET /openmeter/billing/invoices */ list(request?: ListInvoicesRequest, options?: RequestOptions): Promise; /** * List billing invoices * * List billing invoices. * * Returns a page of invoices. Gathering invoices are never included. Use `filter` * to narrow by status, customer, dates, or service period start. Use `sort` to * control ordering. * * Iterates every item across all pages, fetching more as the returned iterable is consumed. * * GET /openmeter/billing/invoices */ listAll(request?: ListInvoicesRequest, options?: RequestOptions): AsyncIterable; /** * Get a billing invoice * * Get a billing invoice by ID. * * Returns the full invoice resource including line items, status details, totals, * and workflow configuration snapshot. * * GET /openmeter/billing/invoices/{invoiceId} */ get(request: GetInvoiceRequest, options?: RequestOptions): Promise; /** * Update a billing invoice * * Update a billing invoice. * * Only the mutable fields of the invoice can be edited: description, labels, * supplier, customer, workflow settings, and top-level lines. Top-level lines are * matched by `id`; lines without an `id` are created, and existing lines omitted * from `lines` are deleted. Detailed (child) lines are always computed and cannot * be edited directly. Only invoices in draft status can be updated. * * PUT /openmeter/billing/invoices/{invoiceId} */ update(request: UpdateInvoiceRequest, options?: RequestOptions): Promise; /** * Delete a billing invoice * * Delete a billing invoice. * * Only standard invoices in draft status can be deleted. Deleting an invoice will * also delete all associated line items and workflow configuration. * * DELETE /openmeter/billing/invoices/{invoiceId} */ delete(request: DeleteInvoiceRequest, options?: RequestOptions): Promise; /** * Advance billing invoice's next status * * Advance a billing invoice. * * Advances the invoice to the next workflow state. The next state is determined by * the invoice's current status and workflow configuration. Only invoices in draft * or issued status can be advanced. * * POST /openmeter/billing/invoices/{invoiceId}/advance */ advance(request: AdvanceInvoiceRequest, options?: RequestOptions): Promise; /** * Send the invoice to the customer * * Approve a billing invoice. * * This call instantly sends the invoice to the customer using the configured * billing profile app. * * This call is valid in two invoice statuses: * * - draft: the invoice will be sent to the customer, the invoice state becomes * issued * - manual_approval_needed: the invoice will be sent to the customer, the invoice * state becomes issued * * POST /openmeter/billing/invoices/{invoiceId}/approve */ approve(request: ApproveInvoiceRequest, options?: RequestOptions): Promise; /** * Retry advancing the invoice after a failed attempt * * Retry sending a billing invoice. * * Retry advancing the invoice after a failed attempt. * * The action can be called when the invoice's statusDetails' actions field contain * the "retry" action. * * POST /openmeter/billing/invoices/{invoiceId}/retry */ retry(request: RetryInvoiceRequest, options?: RequestOptions): Promise; /** * Snapshot quantities for usage based line items * * Snapshot quantities for usage-based line items. * * This call will snapshot the quantities for all usage based line items in the * invoice. * * This call is only valid in draft.waiting_for_collection status, where the * collection period can be skipped using this action. * * POST /openmeter/billing/invoices/{invoiceId}/snapshot-quantities */ snapshotQuantities(request: SnapshotQuantitiesInvoiceRequest, options?: RequestOptions): Promise; }