@getpeppr/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +463 -0
- package/dist/core/client.d.ts +523 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js +1308 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/code-lists.d.ts +120 -0
- package/dist/core/code-lists.d.ts.map +1 -0
- package/dist/core/code-lists.js +247 -0
- package/dist/core/code-lists.js.map +1 -0
- package/dist/core/country-rules.d.ts +30 -0
- package/dist/core/country-rules.d.ts.map +1 -0
- package/dist/core/country-rules.js +128 -0
- package/dist/core/country-rules.js.map +1 -0
- package/dist/core/schematron.d.ts +59 -0
- package/dist/core/schematron.d.ts.map +1 -0
- package/dist/core/schematron.js +480 -0
- package/dist/core/schematron.js.map +1 -0
- package/dist/core/ubl-builder.d.ts +20 -0
- package/dist/core/ubl-builder.d.ts.map +1 -0
- package/dist/core/ubl-builder.js +530 -0
- package/dist/core/ubl-builder.js.map +1 -0
- package/dist/core/validator.d.ts +16 -0
- package/dist/core/validator.d.ts.map +1 -0
- package/dist/core/validator.js +171 -0
- package/dist/core/validator.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/types/invoice.d.ts +635 -0
- package/dist/types/invoice.d.ts.map +1 -0
- package/dist/types/invoice.js +8 -0
- package/dist/types/invoice.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peppol SDK Types
|
|
3
|
+
*
|
|
4
|
+
* Design principle: JSON-native, zero XML exposure.
|
|
5
|
+
* A developer should never see angle brackets.
|
|
6
|
+
*/
|
|
7
|
+
/** Peppol participant identifier (e.g., "0208:BE0123456789") */
|
|
8
|
+
export type PeppolId = `${string}:${string}`;
|
|
9
|
+
/** ISO 4217 currency code */
|
|
10
|
+
export type CurrencyCode = "EUR" | "GBP" | "SEK" | "NOK" | "DKK" | "USD" | "CHF" | (string & {});
|
|
11
|
+
/** ISO 3166-1 alpha-2 country code */
|
|
12
|
+
export type CountryCode = "BE" | "FR" | "DE" | "NL" | "IT" | "ES" | "SE" | "NO" | "DK" | "FI" | "AT" | "PT" | "PL" | "GB" | (string & {});
|
|
13
|
+
/** VAT rate as percentage (e.g., 21 for 21%) */
|
|
14
|
+
export type VatRate = number;
|
|
15
|
+
/**
|
|
16
|
+
* Peppol/UBL invoice type codes (UNCL1001 subset).
|
|
17
|
+
* - 380 = Commercial invoice (default)
|
|
18
|
+
* - 381 = Credit note (used when isCreditNote: true)
|
|
19
|
+
* - 383 = Debit note
|
|
20
|
+
* - 384 = Corrective invoice
|
|
21
|
+
* - 386 = Prepayment invoice
|
|
22
|
+
* - 389 = Self-billed invoice
|
|
23
|
+
* - 751 = Invoice information for accounting purposes
|
|
24
|
+
*/
|
|
25
|
+
export type InvoiceTypeCode = 380 | 381 | 383 | 384 | 386 | 389 | 751;
|
|
26
|
+
/** A Peppol participant entry from the directory (SMP/SML lookup) */
|
|
27
|
+
export interface DirectoryEntry {
|
|
28
|
+
/** Registered business name */
|
|
29
|
+
name: string;
|
|
30
|
+
/** Peppol participant ID */
|
|
31
|
+
peppolId: PeppolId;
|
|
32
|
+
/** Country of registration */
|
|
33
|
+
country: CountryCode;
|
|
34
|
+
/** Supported document types (e.g., ["invoice", "credit_note"]) */
|
|
35
|
+
capabilities: string[];
|
|
36
|
+
}
|
|
37
|
+
export interface Party {
|
|
38
|
+
/** Business name */
|
|
39
|
+
name: string;
|
|
40
|
+
/** Peppol participant ID (scheme:id format, e.g. "0208:BE0123456789") */
|
|
41
|
+
peppolId: PeppolId;
|
|
42
|
+
/** VAT number (e.g., "BE0123456789") */
|
|
43
|
+
vatNumber?: string;
|
|
44
|
+
/** Street address */
|
|
45
|
+
street?: string;
|
|
46
|
+
/** City */
|
|
47
|
+
city?: string;
|
|
48
|
+
/** Postal/zip code */
|
|
49
|
+
postalCode?: string;
|
|
50
|
+
/** Country */
|
|
51
|
+
country: CountryCode;
|
|
52
|
+
/** Company registration number (BT-30/BT-47), distinct from VAT */
|
|
53
|
+
companyId?: string;
|
|
54
|
+
/** Company ID scheme identifier (e.g., "0208" for Belgian BCE, "0088" for EAN/GLN) */
|
|
55
|
+
companyIdScheme?: string;
|
|
56
|
+
/** Contact person name (BT-41) */
|
|
57
|
+
contactName?: string;
|
|
58
|
+
/** Contact telephone (BT-42) */
|
|
59
|
+
phone?: string;
|
|
60
|
+
/** Contact email */
|
|
61
|
+
email?: string;
|
|
62
|
+
}
|
|
63
|
+
/** Additional item property — custom key-value pair on a line item (BG-32) */
|
|
64
|
+
export interface ItemProperty {
|
|
65
|
+
/** Property name (BT-160) */
|
|
66
|
+
name: string;
|
|
67
|
+
/** Property value (BT-161) */
|
|
68
|
+
value: string;
|
|
69
|
+
}
|
|
70
|
+
export interface InvoiceLine {
|
|
71
|
+
/** Line item description */
|
|
72
|
+
description: string;
|
|
73
|
+
/** Quantity */
|
|
74
|
+
quantity: number;
|
|
75
|
+
/**
|
|
76
|
+
* Unit of measure (default: "EA" = each).
|
|
77
|
+
* Accepts UN/ECE codes (e.g., "HUR", "DAY", "KGM") or human-readable names
|
|
78
|
+
* that are automatically resolved: "each"/"piece", "hour"/"hours", "day"/"days",
|
|
79
|
+
* "week"/"weeks", "month"/"months", "year"/"years", "kilogram"/"kg",
|
|
80
|
+
* "meter"/"metre", "liter"/"litre", "unit"/"units", "set"/"sets", "pack"/"packs".
|
|
81
|
+
* Case insensitive. Unknown values pass through unchanged.
|
|
82
|
+
*/
|
|
83
|
+
unit?: string;
|
|
84
|
+
/** Unit price (exclusive of tax) */
|
|
85
|
+
unitPrice: number;
|
|
86
|
+
/** VAT rate in percent (e.g., 21 for 21%) */
|
|
87
|
+
vatRate: VatRate;
|
|
88
|
+
/** VAT category code (default: "S" = standard rate) */
|
|
89
|
+
vatCategory?: "S" | "Z" | "E" | "AE" | "K" | "G" | "O" | "L" | "M";
|
|
90
|
+
/** Optional item identifier (seller's item number) */
|
|
91
|
+
itemId?: string;
|
|
92
|
+
/** Line-level allowances / discounts (BG-27) */
|
|
93
|
+
allowances?: LineAllowanceCharge[];
|
|
94
|
+
/** Line-level charges / surcharges (BG-28) */
|
|
95
|
+
charges?: LineAllowanceCharge[];
|
|
96
|
+
/** Standard item identifier, e.g. GTIN/EAN barcode (BT-157) */
|
|
97
|
+
standardItemId?: string;
|
|
98
|
+
/** Scheme ID for standard item identifier (BT-157-1). Default: "0160" for GTIN */
|
|
99
|
+
standardItemScheme?: string;
|
|
100
|
+
/** Commodity classification code, e.g. UNSPSC or CPV (BT-158) */
|
|
101
|
+
commodityCode?: string;
|
|
102
|
+
/** List ID for commodity classification (BT-158-1). e.g. "STI" for UNSPSC, "CPV" for EU procurement */
|
|
103
|
+
commodityScheme?: string;
|
|
104
|
+
/** Additional item properties — custom key-value pairs (BG-32) */
|
|
105
|
+
properties?: ItemProperty[];
|
|
106
|
+
/** Base quantity for price calculation (BT-149). Default: 1. E.g. "price per 100 units" → baseQuantity: 100 */
|
|
107
|
+
baseQuantity?: number;
|
|
108
|
+
/** Unit code for base quantity (BT-150). Defaults to line's unit code. */
|
|
109
|
+
baseQuantityUnit?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Buyer accounting reference for this line (BT-133).
|
|
112
|
+
* Free-text cost allocation code used by the buyer for internal accounting.
|
|
113
|
+
* Maps to `<cbc:AccountingCost>` at line level in UBL.
|
|
114
|
+
*/
|
|
115
|
+
accountingCost?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface InvoiceInput {
|
|
118
|
+
/** Your invoice number (must be unique per supplier) */
|
|
119
|
+
number: string;
|
|
120
|
+
/** Invoice date (ISO 8601, defaults to today) */
|
|
121
|
+
date?: string;
|
|
122
|
+
/** Due date (ISO 8601) */
|
|
123
|
+
dueDate?: string;
|
|
124
|
+
/** Currency (defaults to EUR) */
|
|
125
|
+
currency?: CurrencyCode;
|
|
126
|
+
/** Tax reporting currency if different from document currency (BT-6) */
|
|
127
|
+
taxCurrency?: CurrencyCode;
|
|
128
|
+
/** Exchange rate: document currency → tax currency */
|
|
129
|
+
taxCurrencyRate?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Seller / supplier.
|
|
132
|
+
* @deprecated Seller is determined by your API key. This field is ignored and will be removed in v1.
|
|
133
|
+
*/
|
|
134
|
+
from?: Party;
|
|
135
|
+
/** Buyer / customer */
|
|
136
|
+
to: Party;
|
|
137
|
+
/** Payee party (BG-10) — when payment recipient differs from seller */
|
|
138
|
+
payeeParty?: Party;
|
|
139
|
+
/** Tax representative party (BG-11) — tax agent filing VAT on behalf of seller */
|
|
140
|
+
taxRepresentative?: Party;
|
|
141
|
+
/** Line items */
|
|
142
|
+
lines: InvoiceLine[];
|
|
143
|
+
/** Additional supporting documents / attachments (BG-24) */
|
|
144
|
+
attachments?: Attachment[];
|
|
145
|
+
/** Document-level allowances / discounts (BG-20) */
|
|
146
|
+
allowances?: AllowanceCharge[];
|
|
147
|
+
/** Document-level charges / surcharges (BG-21) */
|
|
148
|
+
charges?: AllowanceCharge[];
|
|
149
|
+
/** Billing period (BG-14) — common for SaaS/subscription invoices */
|
|
150
|
+
invoicePeriod?: InvoicePeriod;
|
|
151
|
+
/** Delivery information (BG-13) — mandatory in some countries */
|
|
152
|
+
delivery?: Delivery;
|
|
153
|
+
/** Optional note/memo */
|
|
154
|
+
note?: string;
|
|
155
|
+
/** Payment reference (e.g., structured communication) */
|
|
156
|
+
paymentReference?: string;
|
|
157
|
+
/** Buyer reference — required by Peppol BIS 3.0 if no orderReference (BT-10) */
|
|
158
|
+
buyerReference?: string;
|
|
159
|
+
/** Buyer's order reference (PO number) */
|
|
160
|
+
orderReference?: string;
|
|
161
|
+
/** Sales order reference issued by the seller (BT-14) */
|
|
162
|
+
salesOrderReference?: string;
|
|
163
|
+
/** Contract reference number (BT-12) */
|
|
164
|
+
contractReference?: string;
|
|
165
|
+
/** Project reference identifier (BT-11) */
|
|
166
|
+
projectReference?: string;
|
|
167
|
+
/** Despatch advice / delivery note reference (BT-16) */
|
|
168
|
+
despatchReference?: string;
|
|
169
|
+
/** Receiving advice reference (BT-15) */
|
|
170
|
+
receiptReference?: string;
|
|
171
|
+
/** Free-text payment terms (e.g., "Net 30 days", "2% discount if paid within 10 days") (BT-20) */
|
|
172
|
+
paymentTerms?: string;
|
|
173
|
+
/** Payment means code (30=credit transfer, 58=SEPA, etc.) */
|
|
174
|
+
paymentMeans?: number;
|
|
175
|
+
/** IBAN for payment */
|
|
176
|
+
paymentIban?: string;
|
|
177
|
+
/** BIC/SWIFT code */
|
|
178
|
+
paymentBic?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Tax point date (BT-7) — date when VAT becomes accountable.
|
|
181
|
+
* ISO 8601 format: YYYY-MM-DD. Omit to use invoice date.
|
|
182
|
+
* Maps to `<cbc:TaxPointDate>` in UBL.
|
|
183
|
+
*/
|
|
184
|
+
taxPointDate?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Prepaid amount (BT-113) — sum already paid before this invoice.
|
|
187
|
+
* Reduces the payable amount. Currency matches the document currency.
|
|
188
|
+
* Maps to `<cbc:PrepaidAmount>` in `<cac:LegalMonetaryTotal>`.
|
|
189
|
+
*/
|
|
190
|
+
prepaidAmount?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Rounding amount (BT-114) — rounding applied to the payable amount.
|
|
193
|
+
* Must be between -0.99 and 0.99 (in document currency units).
|
|
194
|
+
* B2BRouter stores this as integer cents (±99).
|
|
195
|
+
* Maps to `<cbc:PayableRoundingAmount>` in `<cac:LegalMonetaryTotal>`.
|
|
196
|
+
*/
|
|
197
|
+
roundingAmount?: number;
|
|
198
|
+
/**
|
|
199
|
+
* Buyer accounting reference (BT-19) — cost allocation code at document level.
|
|
200
|
+
* Free-text field used by the buyer for internal accounting.
|
|
201
|
+
* Maps to `<cbc:AccountingCost>` at document level in UBL.
|
|
202
|
+
*/
|
|
203
|
+
accountingCost?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Invoice type code (default: 380 for invoice, 381 for credit note via isCreditNote).
|
|
206
|
+
* Use 383 for debit note, 384 for corrective invoice, 386 for prepayment,
|
|
207
|
+
* 389 for self-billed, 751 for accounting purposes.
|
|
208
|
+
*/
|
|
209
|
+
invoiceTypeCode?: InvoiceTypeCode;
|
|
210
|
+
/** Set to true for credit notes */
|
|
211
|
+
isCreditNote?: boolean;
|
|
212
|
+
/** Reference to the original invoice being credited (required when isCreditNote is true) */
|
|
213
|
+
invoiceReference?: string;
|
|
214
|
+
}
|
|
215
|
+
/** Additional supporting document (BG-24) */
|
|
216
|
+
export interface Attachment {
|
|
217
|
+
/** Document reference identifier (required) */
|
|
218
|
+
id: string;
|
|
219
|
+
/** Human-readable description */
|
|
220
|
+
description?: string;
|
|
221
|
+
/** Filename (required when content is provided) */
|
|
222
|
+
filename?: string;
|
|
223
|
+
/** MIME type (e.g., "application/pdf") — required when content is provided */
|
|
224
|
+
mimeType?: string;
|
|
225
|
+
/** Base64-encoded file content (for embedded attachments) */
|
|
226
|
+
content?: string;
|
|
227
|
+
/** External URL reference (alternative to embedded content) */
|
|
228
|
+
url?: string;
|
|
229
|
+
}
|
|
230
|
+
/** Document-level allowance or charge (BG-20/BG-21) */
|
|
231
|
+
export interface AllowanceCharge {
|
|
232
|
+
/** Reason for the allowance/charge */
|
|
233
|
+
reason: string;
|
|
234
|
+
/** Amount (positive number, exclusive of tax) */
|
|
235
|
+
amount: number;
|
|
236
|
+
/** VAT rate in percent */
|
|
237
|
+
vatRate: VatRate;
|
|
238
|
+
/** VAT category code (default: "S") */
|
|
239
|
+
vatCategory?: "S" | "Z" | "E" | "AE" | "K" | "G" | "O" | "L" | "M";
|
|
240
|
+
}
|
|
241
|
+
/** Line-level allowance or charge (BG-27/BG-28) */
|
|
242
|
+
export interface LineAllowanceCharge {
|
|
243
|
+
/** Reason for the allowance/charge */
|
|
244
|
+
reason: string;
|
|
245
|
+
/** Amount (positive number) */
|
|
246
|
+
amount: number;
|
|
247
|
+
}
|
|
248
|
+
/** Billing period (BG-14) — common for SaaS/subscription invoices */
|
|
249
|
+
export interface InvoicePeriod {
|
|
250
|
+
/** Period start date (ISO 8601) (BT-73) */
|
|
251
|
+
startDate?: string;
|
|
252
|
+
/** Period end date (ISO 8601) (BT-74) */
|
|
253
|
+
endDate?: string;
|
|
254
|
+
}
|
|
255
|
+
export interface DeliveryAddress {
|
|
256
|
+
street?: string;
|
|
257
|
+
city?: string;
|
|
258
|
+
postalCode?: string;
|
|
259
|
+
country: CountryCode;
|
|
260
|
+
}
|
|
261
|
+
export interface Delivery {
|
|
262
|
+
/** Actual delivery date (ISO 8601) (BT-72) */
|
|
263
|
+
date?: string;
|
|
264
|
+
/** Delivery location identifier (BT-71) */
|
|
265
|
+
locationId?: string;
|
|
266
|
+
/** Delivery address (BG-15) */
|
|
267
|
+
address?: DeliveryAddress;
|
|
268
|
+
}
|
|
269
|
+
/** @deprecated Use InvoiceInput with isCreditNote: true instead */
|
|
270
|
+
export interface CreditNoteInput extends Omit<InvoiceInput, "number"> {
|
|
271
|
+
/** Credit note number */
|
|
272
|
+
number: string;
|
|
273
|
+
/** Reference to the original invoice being credited */
|
|
274
|
+
invoiceReference: string;
|
|
275
|
+
}
|
|
276
|
+
export interface PaginationMeta {
|
|
277
|
+
totalCount: number;
|
|
278
|
+
offset: number;
|
|
279
|
+
limit: number;
|
|
280
|
+
hasMore: boolean;
|
|
281
|
+
}
|
|
282
|
+
export interface PaginatedResult<T> {
|
|
283
|
+
data: T[];
|
|
284
|
+
meta: PaginationMeta;
|
|
285
|
+
}
|
|
286
|
+
export interface ListInvoicesOptions {
|
|
287
|
+
limit?: number;
|
|
288
|
+
offset?: number;
|
|
289
|
+
/** Filter by type: "issued" | "received" */
|
|
290
|
+
type?: "issued" | "received";
|
|
291
|
+
/** Include line details */
|
|
292
|
+
includeLines?: boolean;
|
|
293
|
+
}
|
|
294
|
+
export interface InvoiceSummary {
|
|
295
|
+
id: string;
|
|
296
|
+
number: string;
|
|
297
|
+
status: DocumentStatus;
|
|
298
|
+
createdAt?: string;
|
|
299
|
+
}
|
|
300
|
+
export type DocumentStatus = "new" | "sent" | "downloaded" | "accepted" | "registered" | "refused" | "allegedly_paid" | "paid" | "closed" | "annotated" | "error" | "invalid";
|
|
301
|
+
export interface SendResult {
|
|
302
|
+
/** Unique document ID */
|
|
303
|
+
id: string;
|
|
304
|
+
/** Current status */
|
|
305
|
+
status: DocumentStatus;
|
|
306
|
+
/** Peppol message ID (once sent) */
|
|
307
|
+
peppolMessageId?: string;
|
|
308
|
+
/** Generated UBL XML (for debugging) */
|
|
309
|
+
ublXml?: string;
|
|
310
|
+
/** Validation warnings (non-blocking) */
|
|
311
|
+
warnings?: ValidationWarning[];
|
|
312
|
+
/** Timestamp */
|
|
313
|
+
createdAt: string;
|
|
314
|
+
}
|
|
315
|
+
export interface ReceivedInvoice {
|
|
316
|
+
/** Document ID */
|
|
317
|
+
id: string;
|
|
318
|
+
/** Parsed invoice data (same structure as InvoiceInput) */
|
|
319
|
+
invoice: InvoiceInput;
|
|
320
|
+
/** Raw UBL XML */
|
|
321
|
+
rawXml: string;
|
|
322
|
+
/** Peppol sender ID */
|
|
323
|
+
senderId: PeppolId;
|
|
324
|
+
/** Reception timestamp */
|
|
325
|
+
receivedAt: string;
|
|
326
|
+
}
|
|
327
|
+
export interface ValidationWarning {
|
|
328
|
+
/** Field path (e.g., "lines[0].vatRate") */
|
|
329
|
+
field: string;
|
|
330
|
+
/** Warning message */
|
|
331
|
+
message: string;
|
|
332
|
+
/** Peppol rule ID (e.g., "BR-CO-17") */
|
|
333
|
+
ruleId?: string;
|
|
334
|
+
}
|
|
335
|
+
export interface ValidationError {
|
|
336
|
+
/** Field path */
|
|
337
|
+
field: string;
|
|
338
|
+
/** Error message (human-readable, actionable) */
|
|
339
|
+
message: string;
|
|
340
|
+
/** Peppol rule ID */
|
|
341
|
+
ruleId?: string;
|
|
342
|
+
/** Suggested fix */
|
|
343
|
+
suggestion?: string;
|
|
344
|
+
}
|
|
345
|
+
export interface ValidationResult {
|
|
346
|
+
valid: boolean;
|
|
347
|
+
errors: ValidationError[];
|
|
348
|
+
warnings: ValidationWarning[];
|
|
349
|
+
}
|
|
350
|
+
/** Available document export formats (GET /invoices/{id}/as/{format}) */
|
|
351
|
+
export type DocumentFormat = "pdf" | "xml.ubl.invoice.bis3" | "xml.facturae.3.2" | "original";
|
|
352
|
+
/** Individual validation message from server-side XSD/Schematron validation */
|
|
353
|
+
export interface ServerValidationMessage {
|
|
354
|
+
/** Severity: "error" or "warning" */
|
|
355
|
+
severity: "error" | "warning";
|
|
356
|
+
/** Validation message */
|
|
357
|
+
message: string;
|
|
358
|
+
/** Location in the XML document (XPath or line reference) */
|
|
359
|
+
location?: string;
|
|
360
|
+
/** Rule ID (e.g., Schematron rule) */
|
|
361
|
+
ruleId?: string;
|
|
362
|
+
}
|
|
363
|
+
/** Server-side validation result with XSD + Schematron checks */
|
|
364
|
+
export interface ServerValidationResult {
|
|
365
|
+
valid: boolean;
|
|
366
|
+
/** XSD schema validation results */
|
|
367
|
+
xsd: {
|
|
368
|
+
valid: boolean;
|
|
369
|
+
errors: ServerValidationMessage[];
|
|
370
|
+
};
|
|
371
|
+
/** Schematron business rule validation results */
|
|
372
|
+
schematron: {
|
|
373
|
+
valid: boolean;
|
|
374
|
+
errors: ServerValidationMessage[];
|
|
375
|
+
warnings: ServerValidationMessage[];
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
/** An event entry from the B2BRouter events feed */
|
|
379
|
+
export interface EventEntry {
|
|
380
|
+
/** Event name/type (e.g., "state_change", "delivery") */
|
|
381
|
+
name: string;
|
|
382
|
+
/** Human-readable event description */
|
|
383
|
+
text: string;
|
|
384
|
+
/** Additional notes (optional) */
|
|
385
|
+
notes?: string;
|
|
386
|
+
/** Timestamp of the event (ISO 8601) */
|
|
387
|
+
createdAt: string;
|
|
388
|
+
/** Associated invoice (if applicable) */
|
|
389
|
+
invoice?: {
|
|
390
|
+
id: string;
|
|
391
|
+
number: string;
|
|
392
|
+
state: string;
|
|
393
|
+
};
|
|
394
|
+
/** Associated contact (if applicable) */
|
|
395
|
+
contact?: {
|
|
396
|
+
id: string;
|
|
397
|
+
name: string;
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
/** Options for listing events */
|
|
401
|
+
export interface ListEventsOptions {
|
|
402
|
+
/** Maximum number of events to return */
|
|
403
|
+
limit?: number;
|
|
404
|
+
/** Offset for pagination */
|
|
405
|
+
offset?: number;
|
|
406
|
+
/** Filter events by invoice ID */
|
|
407
|
+
invoiceId?: string;
|
|
408
|
+
/** Filter events from this date (ISO 8601) */
|
|
409
|
+
dateFrom?: string;
|
|
410
|
+
/** Filter events until this date (ISO 8601) */
|
|
411
|
+
dateTo?: string;
|
|
412
|
+
}
|
|
413
|
+
/** A contact in the address book (client/provider) */
|
|
414
|
+
export interface Contact {
|
|
415
|
+
/** Unique contact ID */
|
|
416
|
+
id: string;
|
|
417
|
+
/** Business name */
|
|
418
|
+
name: string;
|
|
419
|
+
/** Peppol participant ID (scheme:id format, e.g. "0208:BE0123456789") */
|
|
420
|
+
peppolId?: string;
|
|
421
|
+
/** VAT number (e.g., "BE0123456789") */
|
|
422
|
+
vatNumber?: string;
|
|
423
|
+
/** Company registration number */
|
|
424
|
+
companyId?: string;
|
|
425
|
+
/** Street address */
|
|
426
|
+
street?: string;
|
|
427
|
+
/** City */
|
|
428
|
+
city?: string;
|
|
429
|
+
/** Postal/zip code */
|
|
430
|
+
postalCode?: string;
|
|
431
|
+
/** Country (ISO 3166-1 alpha-2) */
|
|
432
|
+
country?: string;
|
|
433
|
+
/** Email address */
|
|
434
|
+
email?: string;
|
|
435
|
+
/** Whether this contact is a client */
|
|
436
|
+
isClient?: boolean;
|
|
437
|
+
/** Whether this contact is a provider/supplier */
|
|
438
|
+
isProvider?: boolean;
|
|
439
|
+
/** Creation timestamp (ISO 8601) */
|
|
440
|
+
createdAt?: string;
|
|
441
|
+
/** Last update timestamp (ISO 8601) */
|
|
442
|
+
updatedAt?: string;
|
|
443
|
+
}
|
|
444
|
+
/** Input for creating or updating a contact */
|
|
445
|
+
export interface ContactInput {
|
|
446
|
+
/** Business name (required) */
|
|
447
|
+
name: string;
|
|
448
|
+
/** Peppol participant ID (scheme:id format) */
|
|
449
|
+
peppolId?: string;
|
|
450
|
+
/** VAT number */
|
|
451
|
+
vatNumber?: string;
|
|
452
|
+
/** Company registration number */
|
|
453
|
+
companyId?: string;
|
|
454
|
+
/** Street address */
|
|
455
|
+
street?: string;
|
|
456
|
+
/** City */
|
|
457
|
+
city?: string;
|
|
458
|
+
/** Postal/zip code */
|
|
459
|
+
postalCode?: string;
|
|
460
|
+
/** Country (ISO 3166-1 alpha-2) */
|
|
461
|
+
country?: string;
|
|
462
|
+
/** Email address */
|
|
463
|
+
email?: string;
|
|
464
|
+
/** Whether this contact is a client (default: true) */
|
|
465
|
+
isClient?: boolean;
|
|
466
|
+
/** Whether this contact is a provider/supplier (default: false) */
|
|
467
|
+
isProvider?: boolean;
|
|
468
|
+
}
|
|
469
|
+
/** Options for listing contacts with filtering and pagination */
|
|
470
|
+
export interface ListContactsOptions {
|
|
471
|
+
/** Maximum number of contacts to return */
|
|
472
|
+
limit?: number;
|
|
473
|
+
/** Offset for pagination */
|
|
474
|
+
offset?: number;
|
|
475
|
+
/** Search by name, address, or VAT code */
|
|
476
|
+
name?: string;
|
|
477
|
+
/** Filter by client status */
|
|
478
|
+
isClient?: boolean;
|
|
479
|
+
/** Filter by provider status */
|
|
480
|
+
isProvider?: boolean;
|
|
481
|
+
}
|
|
482
|
+
/** A bank account linked to the account */
|
|
483
|
+
export interface BankAccount {
|
|
484
|
+
/** Unique bank account ID */
|
|
485
|
+
id: string;
|
|
486
|
+
/** Display name for this bank account */
|
|
487
|
+
name: string;
|
|
488
|
+
/** Account type: IBAN-based or raw account number */
|
|
489
|
+
type: "iban" | "number";
|
|
490
|
+
/** IBAN (required when type is "iban") */
|
|
491
|
+
iban?: string;
|
|
492
|
+
/** Account number (required when type is "number") */
|
|
493
|
+
number?: string;
|
|
494
|
+
/** BIC/SWIFT code */
|
|
495
|
+
bic?: string;
|
|
496
|
+
/** Country (ISO 3166-1 alpha-2) */
|
|
497
|
+
country?: string;
|
|
498
|
+
/** Creation timestamp (ISO 8601) */
|
|
499
|
+
createdAt?: string;
|
|
500
|
+
/** Last update timestamp (ISO 8601) */
|
|
501
|
+
updatedAt?: string;
|
|
502
|
+
}
|
|
503
|
+
/** Input for creating or updating a bank account */
|
|
504
|
+
export interface BankAccountInput {
|
|
505
|
+
/** Display name for this bank account (required) */
|
|
506
|
+
name: string;
|
|
507
|
+
/** Account type (default: "iban") */
|
|
508
|
+
type?: "iban" | "number";
|
|
509
|
+
/** IBAN (required when type is "iban") */
|
|
510
|
+
iban?: string;
|
|
511
|
+
/** Account number (required when type is "number") */
|
|
512
|
+
number?: string;
|
|
513
|
+
/** BIC/SWIFT code */
|
|
514
|
+
bic?: string;
|
|
515
|
+
/** Country (ISO 3166-1 alpha-2) */
|
|
516
|
+
country?: string;
|
|
517
|
+
}
|
|
518
|
+
/** Options for listing bank accounts with pagination */
|
|
519
|
+
export interface ListBankAccountsOptions {
|
|
520
|
+
/** Maximum number of bank accounts to return */
|
|
521
|
+
limit?: number;
|
|
522
|
+
/** Offset for pagination */
|
|
523
|
+
offset?: number;
|
|
524
|
+
}
|
|
525
|
+
/** A transport type available in the Peppol network (e.g., Peppol BIS 3.0, FatturaE) */
|
|
526
|
+
export interface TransportType {
|
|
527
|
+
/** Transport type code (e.g., "peppol", "fatturae") */
|
|
528
|
+
code: string;
|
|
529
|
+
/** Human-readable name */
|
|
530
|
+
name: string;
|
|
531
|
+
}
|
|
532
|
+
/** A configured transport for the account */
|
|
533
|
+
export interface Transport {
|
|
534
|
+
/** Unique transport ID */
|
|
535
|
+
id: string;
|
|
536
|
+
/** Code of the transport type (references TransportType.code) */
|
|
537
|
+
transportTypeCode: string;
|
|
538
|
+
/** Human-readable name */
|
|
539
|
+
name: string;
|
|
540
|
+
/** Transport status (e.g., "active", "inactive") */
|
|
541
|
+
status?: string;
|
|
542
|
+
}
|
|
543
|
+
export type WebhookEventType = "invoice.sent" | "invoice.accepted" | "invoice.refused" | "invoice.error" | "invoice.registered" | "invoice.paid" | "invoice.closed" | "invoice.received" | "creditnote.sent" | "creditnote.received";
|
|
544
|
+
export interface WebhookEvent<T = unknown> {
|
|
545
|
+
/** Event ID */
|
|
546
|
+
id: string;
|
|
547
|
+
/** Event type */
|
|
548
|
+
type: WebhookEventType;
|
|
549
|
+
/** Event payload */
|
|
550
|
+
data: T;
|
|
551
|
+
/** Timestamp */
|
|
552
|
+
createdAt: string;
|
|
553
|
+
}
|
|
554
|
+
export interface RetryConfig {
|
|
555
|
+
/** Maximum number of retries (default: 3) */
|
|
556
|
+
maxRetries?: number;
|
|
557
|
+
/** Initial delay in ms before first retry (default: 500) */
|
|
558
|
+
initialDelayMs?: number;
|
|
559
|
+
/** Maximum delay in ms between retries (default: 30000) */
|
|
560
|
+
maxDelayMs?: number;
|
|
561
|
+
}
|
|
562
|
+
export interface WaitForOptions {
|
|
563
|
+
/** Timeout in ms (default: 120000 = 2 min) */
|
|
564
|
+
timeout?: number;
|
|
565
|
+
/** Polling interval in ms (default: 5000 = 5 sec) */
|
|
566
|
+
interval?: number;
|
|
567
|
+
}
|
|
568
|
+
/** Log entry for an outgoing HTTP request */
|
|
569
|
+
export interface RequestLogEntry {
|
|
570
|
+
method: string;
|
|
571
|
+
url: string;
|
|
572
|
+
headers: Record<string, string>;
|
|
573
|
+
body?: unknown;
|
|
574
|
+
timestamp: number;
|
|
575
|
+
}
|
|
576
|
+
/** Log entry for an incoming HTTP response */
|
|
577
|
+
export interface ResponseLogEntry {
|
|
578
|
+
status: number;
|
|
579
|
+
headers: Record<string, string>;
|
|
580
|
+
body: unknown;
|
|
581
|
+
durationMs: number;
|
|
582
|
+
timestamp: number;
|
|
583
|
+
}
|
|
584
|
+
/** Options for invoice operations (send, create) */
|
|
585
|
+
export interface InvoiceOperationOptions {
|
|
586
|
+
/** Idempotency key to prevent duplicate operations (max 256 chars, 24h TTL) */
|
|
587
|
+
idempotencyKey?: string;
|
|
588
|
+
}
|
|
589
|
+
export interface PeppolConfig {
|
|
590
|
+
/** getpeppr API key (starts with sk_sandbox_ or sk_live_) */
|
|
591
|
+
apiKey: string;
|
|
592
|
+
/** Environment (default: "sandbox") — no longer affects base URL */
|
|
593
|
+
environment?: "sandbox" | "production";
|
|
594
|
+
/** Base URL override (default: https://api.getpeppr.dev/v1) */
|
|
595
|
+
baseUrl?: string;
|
|
596
|
+
/** Request timeout in ms (default: 30000) */
|
|
597
|
+
timeout?: number;
|
|
598
|
+
/** Retry configuration for transient errors */
|
|
599
|
+
retry?: RetryConfig;
|
|
600
|
+
/** Hook called before each HTTP request (for logging/debugging) */
|
|
601
|
+
onRequest?: (entry: RequestLogEntry) => void;
|
|
602
|
+
/** Hook called after each HTTP response (for logging/debugging) */
|
|
603
|
+
onResponse?: (entry: ResponseLogEntry) => void;
|
|
604
|
+
}
|
|
605
|
+
/** Options for importing an invoice from a file (XML, PDF, etc.) */
|
|
606
|
+
export interface ImportInvoiceOptions {
|
|
607
|
+
/** File content as ArrayBuffer or Uint8Array */
|
|
608
|
+
file: ArrayBuffer | Uint8Array;
|
|
609
|
+
/** Original filename (e.g. "invoice.xml") */
|
|
610
|
+
filename: string;
|
|
611
|
+
/** MIME type (default: auto-detected from filename extension) */
|
|
612
|
+
mimeType?: string;
|
|
613
|
+
}
|
|
614
|
+
export interface BatchSendOptions {
|
|
615
|
+
/** Max concurrent requests (default: 5) */
|
|
616
|
+
concurrency?: number;
|
|
617
|
+
/** Whether to stop on first error or continue (default: false = continue all) */
|
|
618
|
+
stopOnError?: boolean;
|
|
619
|
+
}
|
|
620
|
+
export interface BatchSendResult {
|
|
621
|
+
/** Successfully sent invoices */
|
|
622
|
+
succeeded: Array<{
|
|
623
|
+
index: number;
|
|
624
|
+
result: SendResult;
|
|
625
|
+
}>;
|
|
626
|
+
/** Failed invoices with error details */
|
|
627
|
+
failed: Array<{
|
|
628
|
+
index: number;
|
|
629
|
+
input: InvoiceInput;
|
|
630
|
+
error: Error;
|
|
631
|
+
}>;
|
|
632
|
+
/** Total invoices attempted */
|
|
633
|
+
total: number;
|
|
634
|
+
}
|
|
635
|
+
//# sourceMappingURL=invoice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../src/types/invoice.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,gEAAgE;AAChE,MAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAE7C,6BAA6B;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEjG,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE1I,gDAAgD;AAChD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAItE,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,QAAQ,EAAE,QAAQ,C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