|
| 1 | +export namespace BillsV4Static { |
| 2 | + export interface Bill { |
| 3 | + id: string; // uuid, required |
| 4 | + document_no: string; // required, 1..255 chars |
| 5 | + title?: string; // 1..80 chars |
| 6 | + status: BillStatus; // required, enum |
| 7 | + firstname_suffix?: string; // 1..80 chars |
| 8 | + lastname_company: string; // required, 1..80 chars |
| 9 | + created_at: string; // required, date-time |
| 10 | + vendor_ref?: string; // 1..255 chars |
| 11 | + pending_amount?: number; // double |
| 12 | + currency_code: string; // required, 1..20 chars |
| 13 | + net?: number; // double, calculated from line_items and discounts |
| 14 | + gross?: number; // double, calculated from line_items and discounts |
| 15 | + bill_date: string; // required, date |
| 16 | + due_date: string; // required, date |
| 17 | + overdue: boolean; // required |
| 18 | + booking_account_ids: number[]; // required, array of int32 |
| 19 | + attachment_ids: string[]; // required, array of uuid |
| 20 | + } |
| 21 | + |
| 22 | + export interface BillFull extends Bill { |
| 23 | + supplier_id: number; |
| 24 | + contact_partner_id: number; |
| 25 | + amount_man: number; |
| 26 | + amount_calc: number; |
| 27 | + manual_amount: boolean; |
| 28 | + exchange_rate: number; |
| 29 | + base_currency_code: string; |
| 30 | + item_net: boolean; |
| 31 | + split_into_line_items: boolean; |
| 32 | + purchase_order_id?: number; |
| 33 | + base_currency_amount: number; |
| 34 | + qr_bill_information?: string; |
| 35 | + address: Address; |
| 36 | + line_items: LineItem[]; |
| 37 | + discounts: Discount[]; |
| 38 | + payment?: Payment; |
| 39 | + note?: string; |
| 40 | + } |
| 41 | + |
| 42 | + export interface Address { |
| 43 | + title?: string; |
| 44 | + salutation?: string; |
| 45 | + firstname_suffix?: string; |
| 46 | + lastname_company: string; |
| 47 | + address_line?: string; |
| 48 | + postcode?: string; |
| 49 | + city?: string; |
| 50 | + country_code?: string; |
| 51 | + main_contact_id?: number; |
| 52 | + contact_address_id?: number; |
| 53 | + type: "PRIVATE" | "COMPANY"; |
| 54 | + } |
| 55 | + |
| 56 | + export interface LineItem { |
| 57 | + position: number; |
| 58 | + title?: string; |
| 59 | + tax_id?: number; |
| 60 | + amount: number; |
| 61 | + booking_account_id?: number; |
| 62 | + } |
| 63 | + |
| 64 | + export interface Discount { |
| 65 | + position: number; |
| 66 | + amount: number; |
| 67 | + } |
| 68 | + |
| 69 | + export interface Payment { |
| 70 | + type: PaymentType; |
| 71 | + bank_account_id?: number; |
| 72 | + fee?: PaymentFee; |
| 73 | + execution_date: string; |
| 74 | + exchange_rate?: number; |
| 75 | + amount: number; |
| 76 | + account_no?: string; |
| 77 | + iban?: string; |
| 78 | + name?: string; |
| 79 | + address?: string; |
| 80 | + street?: string; |
| 81 | + house_no?: string; |
| 82 | + postcode?: string; |
| 83 | + city?: string; |
| 84 | + country_code?: string; |
| 85 | + message?: string; |
| 86 | + booking_text?: string; |
| 87 | + salary_payment?: boolean; |
| 88 | + reference_no?: string; |
| 89 | + } |
| 90 | + |
| 91 | + export interface BillCreate { |
| 92 | + supplier_id: number; |
| 93 | + vendor_ref?: string; |
| 94 | + title?: string; |
| 95 | + contact_partner_id: number; |
| 96 | + bill_date: string; |
| 97 | + due_date: string; |
| 98 | + amount_man?: number; |
| 99 | + amount_calc?: number; |
| 100 | + manual_amount: boolean; |
| 101 | + currency_code: string; |
| 102 | + exchange_rate?: number; |
| 103 | + base_currency_amount?: number; |
| 104 | + item_net: boolean; |
| 105 | + purchase_order_id?: number; |
| 106 | + qr_bill_information?: string; |
| 107 | + attachment_ids: string[]; |
| 108 | + address: Address; |
| 109 | + line_items: LineItem[]; |
| 110 | + discounts: Discount[]; |
| 111 | + payment?: Payment; |
| 112 | + salary_payment?: boolean; |
| 113 | + reference_no?: string; |
| 114 | + note?: string; |
| 115 | + } |
| 116 | + |
| 117 | + export interface BillOverwrite { |
| 118 | + document_no?: string; |
| 119 | + title?: string; |
| 120 | + supplier_id: number; |
| 121 | + vendor_ref?: string; |
| 122 | + contact_partner_id: number; |
| 123 | + bill_date: string; |
| 124 | + due_date: string; |
| 125 | + amount_man?: number; |
| 126 | + amount_calc?: number; |
| 127 | + manual_amount: boolean; |
| 128 | + currency_code: string; |
| 129 | + exchange_rate?: number; |
| 130 | + item_net: boolean; |
| 131 | + split_into_line_items: boolean; |
| 132 | + base_currency_amount?: number; |
| 133 | + attachment_ids: string[]; |
| 134 | + address: Address; |
| 135 | + line_items: LineItem[]; |
| 136 | + discounts: Discount[]; |
| 137 | + payment?: Payment; |
| 138 | + } |
| 139 | + |
| 140 | + export enum SearchParameters { |
| 141 | + document_no = "document_no", |
| 142 | + title = "title", |
| 143 | + vendor_ref = "vendor_ref", |
| 144 | + currency_code = "currency_code", |
| 145 | + lastname_company = "lastname_company", |
| 146 | + firstname_suffix = "firstname_suffix", |
| 147 | + } |
| 148 | + |
| 149 | + export enum BillStatusUpdate { |
| 150 | + DRAFT = "DRAFT", |
| 151 | + BOOKED = "BOOKED", |
| 152 | + } |
| 153 | + |
| 154 | + export enum BillAction { |
| 155 | + DUPLICATE = "DUPLICATE", |
| 156 | + } |
| 157 | + |
| 158 | + export interface ListOptions { |
| 159 | + limit?: number; |
| 160 | + page?: number; |
| 161 | + order?: "asc" | "desc"; |
| 162 | + sort?: string; |
| 163 | + search_term?: string; |
| 164 | + "fields[]"?: string[]; |
| 165 | + status?: "DRAFTS" | "TODO" | "PAID" | "OVERDUE"; |
| 166 | + bill_date_start?: string; |
| 167 | + bill_date_end?: string; |
| 168 | + due_date_start?: string; |
| 169 | + due_date_end?: string; |
| 170 | + vendor_ref?: string; |
| 171 | + title?: string; |
| 172 | + currency_code?: string; |
| 173 | + pending_amount_min?: number; |
| 174 | + pending_amount_max?: number; |
| 175 | + vendor?: string; |
| 176 | + gross_min?: number; |
| 177 | + gross_max?: number; |
| 178 | + net_min?: number; |
| 179 | + net_max?: number; |
| 180 | + document_no?: string; |
| 181 | + supplier_id?: number; |
| 182 | + average_exchange_rate_enabled?: boolean; |
| 183 | + } |
| 184 | + |
| 185 | + export enum PaymentType { |
| 186 | + IBAN = "IBAN", |
| 187 | + MANUAL = "MANUAL", |
| 188 | + QR = "QR", |
| 189 | + } |
| 190 | + |
| 191 | + export enum PaymentFee { |
| 192 | + BY_SENDER = "BY_SENDER", |
| 193 | + BY_RECEIVER = "BY_RECEIVER", |
| 194 | + BREAKDOWN = "BREAKDOWN", |
| 195 | + NO_FEE = "NO_FEE", |
| 196 | + } |
| 197 | + |
| 198 | + export enum BillStatus { |
| 199 | + DRAFT = "DRAFT", |
| 200 | + BOOKED = "BOOKED", |
| 201 | + PARTIALLY_CREATED = "PARTIALLY_CREATED", |
| 202 | + CREATED = "CREATED", |
| 203 | + PARTIALLY_SENT = "PARTIALLY_SENT", |
| 204 | + SENT = "SENT", |
| 205 | + PARTIALLY_DOWNLOADED = "PARTIALLY_DOWNLOADED", |
| 206 | + DOWNLOADED = "DOWNLOADED", |
| 207 | + PARTIALLY_PAID = "PARTIALLY_PAID", |
| 208 | + PAID = "PAID", |
| 209 | + PARTIALLY_FAILED = "PARTIALLY_FAILED", |
| 210 | + FAILED = "FAILED", |
| 211 | + } |
| 212 | +} |
0 commit comments