import { Currency, MultiLanguageString } from '@/types'; export type BillPositionType = 'product' | 'service' | 'text'; export interface BillPosition { type?: BillPositionType; name: string; description?: string; quantity: number; pricePerUnit: number; totalPrice?: number; unit?: string; sku?: string; vatRate?: number; discountPercentage?: number; discountAmount?: number; } export interface BillRecipient { title?: string; forename: string; surname: string; company?: string; street?: string; postcode?: string; place?: string; country?: string; phone?: string; email?: string; vatNumber?: string; dateOfBirth?: string; companyRegisterNumber?: string; customerReference?: string; } export interface BillServicePeriod { from: string; to: string; description?: string; } export interface BillDiscount { type: 'percentage' | 'amount'; value: number; description?: string; applyTo?: 'total' | 'subtotal' | 'position'; positionIds?: number[]; } export interface BillCashDiscount { percentage: number; daysAfterInvoice: number; description?: string; } export interface BillAttachment { name: string; content?: string | File | Blob; url?: string; type?: string; size?: number; } export interface BillBankInformation { iban: string; bic?: string; bankName?: string; accountHolder?: string; reference?: string; } export interface BillReminder { days: number; fee?: number; text?: string | MultiLanguageString; sendEmail?: boolean; sendSms?: boolean; sendLetter?: boolean; } export interface BillPurchaseOnInvoiceInformation { companyUid?: string; paymentTerms?: number; paymentReference?: string; supplierReference?: string; orderReference?: string; deliveryDate?: string; deliveryMethod?: string; } export interface BillMeta { customField1?: string; customField2?: string; customField3?: string; internalReference?: string; externalId?: string; tags?: string[]; notes?: string; createdBy?: string; lastModifiedBy?: string; } export interface BillTransaction { id: number; status: string; amount: number; currency: Currency; time: string; type: string; psp?: string; pspId?: number; invoice?: { paymentRequestId: number; title: string; description: string; pspId: number; }; } export interface BillRequest { id?: number; language: string; currency: Currency; dueAfterDays: number; positions: BillPosition[]; recipient: BillRecipient; date?: string; servicePeriod?: BillServicePeriod; discount?: BillDiscount; cashDiscounts?: BillCashDiscount[]; shippingCost?: number; applicationFee?: number; note?: string; terms?: string; attachments?: BillAttachment[]; bankInformation?: BillBankInformation; payoutDescriptor?: string | null; psp?: number[]; pm?: string[]; reminders?: BillReminder[]; reference?: string | null; design?: string; send?: boolean; additionalRecipients?: BillRecipient[]; complete?: boolean; offset?: number; limit?: number; } export interface BillResponse extends BillRequest { id: number; status: string; paymentStatus: string; number: string; total: number; transactions: BillTransaction[]; paymentLink: string; purchaseOnInvoiceInformation: BillPurchaseOnInvoiceInformation; meta: BillMeta; } export type BillStatus = 'draft' | 'sent' | 'viewed' | 'paid' | 'cancelled' | 'overdue'; export type BillPaymentStatus = 'waiting' | 'paid' | 'partially_paid' | 'cancelled' | 'refunded' | 'partially_refunded'; export interface BillListResponse { data: BillResponse[]; count: number; offset: number; limit: number; } export interface BillCreateOptions { send?: boolean; sendEmail?: boolean; sendSms?: boolean; sendLetter?: boolean; useDefaultReminders?: boolean; } export interface BillUpdateOptions { send?: boolean; regenerateNumber?: boolean; updatePaymentLink?: boolean; } export interface BillSearchFilters { status?: BillStatus | BillStatus[]; paymentStatus?: BillPaymentStatus | BillPaymentStatus[]; currency?: Currency; dateFrom?: string; dateTo?: string; dueDateFrom?: string; dueDateTo?: string; amountFrom?: number; amountTo?: number; recipientEmail?: string; recipientName?: string; reference?: string; customerReference?: string; billNumber?: string; } //# sourceMappingURL=bill.d.ts.map