type InvoiceErrorCode = 'PROVIDER_REJECTED' | 'CREDENTIAL_INVALID' | 'PROVIDER_UNAVAILABLE' | 'UNSUPPORTED' | 'RECONCILE_REQUIRED';
interface InvoiceError {
    code: InvoiceErrorCode;
    message: string;
    issued?: 'no' | 'unknown';
}
declare function isInvoiceError(value: unknown): value is InvoiceError;
declare function toInvoiceError(value: unknown): InvoiceError;

type DocumentTaxTreatment = 'exclusive' | 'inclusive' | 'exempt' | 'zero_rated';
type DocumentType = 'invoice' | 'receipt' | 'invoice_receipt' | 'credit_note';
interface CustomerParty {
    name: string;
    email?: string;
    taxId?: string;
}
interface DocumentLineItem {
    description: string;
    quantity: number;
    unitAmountMinor: bigint;
    taxTreatment: DocumentTaxTreatment;
    vatRateBasisPoints: number;
}
interface DocumentSpec {
    customer: CustomerParty;
    lineItems: DocumentLineItem[];
    currency: string;
    idempotencyKey: string;
    docType: DocumentType;
    lang?: string;
}
interface InvoiceDocumentResult {
    documentId: string;
    documentNumber: string;
    documentUrl: string;
}

interface InvoiceProvider {
    issue(credential: unknown, spec: DocumentSpec): Promise<InvoiceDocumentResult>;
}

export { type CustomerParty as C, type DocumentSpec as D, type InvoiceProvider as I, type InvoiceDocumentResult as a, type InvoiceError as b, type DocumentLineItem as c, type DocumentTaxTreatment as d, type DocumentType as e, type InvoiceErrorCode as f, isInvoiceError as i, toInvoiceError as t };
