UNPKG

@basel_mn/qv-api-client

Version:

TypeScript/JavaScript client for QV API, providing easy access to invoices, payments, and Swish integration

231 lines 5.7 kB
export interface ApiConfig { baseURL: string; accessToken?: string; } export interface ApiError extends Error { status: number; details: Record<string, any>; context?: Record<string, any>; } export interface InvoiceListItem { mexcCustomerinvoicesid: string; apticCustomerId?: string; invoiceId: string; consumerStatus: 'Paid' | 'Credited' | 'Waiting' | 'Unpaid' | 'Overdue' | 'Reminder' | 'Inkasso' | 'ReturnWithCredit' | 'Return' | 'ReturnWithoutCredit' | 'PartPayment'; hash?: string; topay: number; partialPaymentInformation?: PartialPaymentInformation; merchant: { mm3servicesid: string; mm3customersid: string; mexcModulesid: string; name: string; }; method: 'Card' | 'Swish' | 'Bank'; cardMethod: 'Visa' | 'Mastercard' | 'Amex' | 'Discover' | 'Diners Club' | 'JCB' | 'UnionPay' | 'Maestro' | 'Unknown or unsupported'; cardNumber: string; paidIn: number; unPaid: number; currency: string; dueDate: string; invoiceDate: string; createdDate: string; sentDate: string; paidDate: string; } export interface PaymentData { id: string; hash: string; phonenumber: string; [key: string]: any; } export interface ReturnData { id: string; hash: string; articles: ReturnArticle[]; } export interface ExtendData { id: string; hash: string; } export interface RefundData { [key: string]: any; } export interface InvoiceDetailArticle { artnr: string; title: string; quantity: string; aprice: string; discount: string; taxrate: string; withouttax: string; tax: string; } export interface InvoiceCart { Handling: { withouttax: string; taxrate: string; }; Shipping: { withouttax: string; taxrate: string; }; Total: { withouttax: string; tax: string; rounding: string; withtax: string; }; } export interface InvoiceCustomer { nr: string; pno: string; Billing: { firstname: string; lastname: string; company?: string; street: string; street2?: string; zip: string; city: string; country: string; phone?: string; email: string; }; Shipping: { firstname?: string; lastname?: string; company?: string; street?: string; street2?: string; zip?: string; city?: string; country?: string; }; } export interface InvoicePaymentData { paymentplanid: string; currency: string; language: string; country: string; orderid: string; logo?: string; method: string; status: string; invoicetype: string; paymentid_related: string; url: string; autoactivate: string; number: string; withOrder: string; settled: string; } export interface InvoicePaymentInfo { paymentdate: string; paymentterms: string; yourreference: string; ourreference: string; projectname: string; betalmetod: string; rounding: string; deliveryenabled: string; invoiceStatus: string; balancedue: string; } export interface ButtonsAvailability { extend: boolean; return: boolean; swish: boolean; } export interface CreditInvoice { id: string; hash: string; topay: string; currency: string; invoicedate: string; invoiceid_real: string; payoutStatus: string; } export interface PartialPaymentDetail { payment_number: string; start_date: string; end_date: string; invoice_date: string; interest_days: string; payment_fees: string; payment_interest: string; payment_principal: string; payment_total: string; } export interface PartialPaymentInformation { pclass: string; nofInstallment: number; paymentDetails: PartialPaymentDetail[]; } export interface ReturnArticle { name: string; count: string; unit: string; type: string; quantity: string; articletype: string | null; imageUri: string; price: number; id: string; index: number; } export interface ReturnArticles { Articles: ReturnArticle[]; } export interface InvoiceLetter { id: string; url: string | null; hash: string; name: string; createdAt: string; amounttopay: string; paydate: string; bankaccountno: string; } export interface InvoiceDetail { PaymentData: InvoicePaymentData; PaymentInfo: InvoicePaymentInfo; Customer: InvoiceCustomer; Articles: InvoiceDetailArticle[]; creditInvoices: CreditInvoice[]; Cart: InvoiceCart; Card: any[]; time: string; by: string; via: string; apiLogsid: string; apiVersion: string; apiClient: string; mexcCustomerinvoicesid: string; apticCustomerId?: string; invoiceId: string; consumerStatus: 'Paid' | 'Credited' | 'Waiting' | 'Unpaid' | 'Overdue' | 'Reminder' | 'Inkasso' | 'ReturnWithCredit' | 'Return' | 'ReturnWithoutCredit' | 'PartPayment'; hash?: string; topay: number; merchant: { mm3servicesid: string; mm3customersid: string; mexcModulesid: string; name: string; }; method: 'Card' | 'Swish' | 'Bank'; paidIn: number; unPaid: number; currency: string; dueDate: string; invoiceDate: string; createdDate: string; sentDate: string; paidDate: string; reminderFee: number; partialPaymentInformation?: PartialPaymentInformation; returnArticles?: ReturnArticles; invoiceLetters: InvoiceLetter[]; buttonsAvailability: ButtonsAvailability; } //# sourceMappingURL=index.d.ts.map