import { PaymentItem } from '@rytass/payments'; import { InvoiceCarrier, CustomsMark, InvoicePaymentItem, InvoiceVoidOptions, InvoiceAllowanceOptions } from './typings.js'; import { Invoice } from './invoice.js'; import { InvoiceAllowance } from './invoice-allowance.js'; export interface BaseInvoiceQueryOptions { orderId?: string; invoiceNumber?: string; [key: string]: unknown; } export type InvoiceQueryOptions = T; export interface InvoiceIssueOptions { items: InvoicePaymentItem[]; vatNumber?: string; carrier?: InvoiceCarrier; customsMark?: CustomsMark; } export interface InvoiceGateway = Invoice, QueryOptions = unknown> { issue(options: InvoiceIssueOptions): Promise; void(invoice: Invoice, options: InvoiceVoidOptions): Promise>; allowance(invoice: Invoice, allowanceItems: InvoicePaymentItem[], options?: InvoiceAllowanceOptions): Promise>; invalidAllowance(allowance: InvoiceAllowance): Promise>; query(options: QueryOptions): Promise; isMobileBarcodeValid(code: string): Promise; isLoveCodeValid(code: string): Promise; }