@invowerk-dev/sdk 1.0.8 → 1.0.10
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/dist/sdk.gen.d.ts +10 -7
- package/dist/sdk.gen.js +10 -7
- package/dist/types.gen.d.ts +7 -5
- package/package.json +1 -1
package/dist/sdk.gen.d.ts
CHANGED
|
@@ -78,13 +78,16 @@ export declare const convertInvoice: <ThrowOnError extends boolean = false>(opti
|
|
|
78
78
|
* requires `buyer_reference` (BT-10, the Leitweg-ID) and `payment_iban` (BT-84).
|
|
79
79
|
* A credit note (381) needs CII. The seller needs `identifier` (BT-29),
|
|
80
80
|
* `legal_registration_id` (BT-30) or `vat_id` (BT-31). invowerk writes your
|
|
81
|
-
* amounts as given. It does not compute or correct them.
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
81
|
+
* amounts as given, with 2 decimals. It does not compute or correct them.
|
|
82
|
+
* Input that breaks an EN 16931 or XRechnung rule is a 422 naming each rule,
|
|
83
|
+
* e.g. BT-112 = BT-109 + BT-110 (BR-CO-15). Dates are YYYY-MM-DD, amounts go
|
|
84
|
+
* up to 999,999,999.99. Before answering, invowerk checks
|
|
85
|
+
* the generated XML and never returns an invalid document. The answer is
|
|
86
|
+
* `application/xml`; `?format=json` returns `{xml, syntax, flavor,
|
|
87
|
+
* self_validation}`. Errors: 422 for invalid input, with details per field or
|
|
88
|
+
* the rule it breaks; 500 when the generated XML still fails the check (the
|
|
89
|
+
* credits are refunded); 429 when every slot is busy (callers without an API key
|
|
90
|
+
* share one); 504 when it took longer than 20 s. Costs 5 credits.
|
|
88
91
|
*
|
|
89
92
|
* **Credits:** 5 per call.
|
|
90
93
|
*/
|
package/dist/sdk.gen.js
CHANGED
|
@@ -88,13 +88,16 @@ export const convertInvoice = (options) => (options.client ?? client).post({
|
|
|
88
88
|
* requires `buyer_reference` (BT-10, the Leitweg-ID) and `payment_iban` (BT-84).
|
|
89
89
|
* A credit note (381) needs CII. The seller needs `identifier` (BT-29),
|
|
90
90
|
* `legal_registration_id` (BT-30) or `vat_id` (BT-31). invowerk writes your
|
|
91
|
-
* amounts as given. It does not compute or correct them.
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
91
|
+
* amounts as given, with 2 decimals. It does not compute or correct them.
|
|
92
|
+
* Input that breaks an EN 16931 or XRechnung rule is a 422 naming each rule,
|
|
93
|
+
* e.g. BT-112 = BT-109 + BT-110 (BR-CO-15). Dates are YYYY-MM-DD, amounts go
|
|
94
|
+
* up to 999,999,999.99. Before answering, invowerk checks
|
|
95
|
+
* the generated XML and never returns an invalid document. The answer is
|
|
96
|
+
* `application/xml`; `?format=json` returns `{xml, syntax, flavor,
|
|
97
|
+
* self_validation}`. Errors: 422 for invalid input, with details per field or
|
|
98
|
+
* the rule it breaks; 500 when the generated XML still fails the check (the
|
|
99
|
+
* credits are refunded); 429 when every slot is busy (callers without an API key
|
|
100
|
+
* share one); 504 when it took longer than 20 s. Costs 5 credits.
|
|
98
101
|
*
|
|
99
102
|
* **Credits:** 5 per call.
|
|
100
103
|
*/
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -152,13 +152,13 @@ export type DocumentTotals = {
|
|
|
152
152
|
/**
|
|
153
153
|
* Tax Exclusive
|
|
154
154
|
*
|
|
155
|
-
* Invoice total without VAT (BT-109).
|
|
155
|
+
* Invoice total without VAT (BT-109). invowerk writes no document-level allowances or charges, so to generate, it must equal the line total (BR-CO-13).
|
|
156
156
|
*/
|
|
157
157
|
tax_exclusive: number | string;
|
|
158
158
|
/**
|
|
159
159
|
* Tax Inclusive
|
|
160
160
|
*
|
|
161
|
-
* Invoice total with VAT (BT-112).
|
|
161
|
+
* Invoice total with VAT (BT-112): the total without VAT plus the sum of the VAT breakdown amounts (BR-CO-15).
|
|
162
162
|
*/
|
|
163
163
|
tax_inclusive: number | string;
|
|
164
164
|
/**
|
|
@@ -371,7 +371,9 @@ export type Flavor = 'en16931' | 'xrechnung';
|
|
|
371
371
|
*
|
|
372
372
|
* All amounts are your own figures. invowerk writes them into the XML and
|
|
373
373
|
* checks the result against EN 16931 (and XRechnung, if selected). It does not
|
|
374
|
-
* compute or correct them.
|
|
374
|
+
* compute or correct them. Input that breaks an EN 16931 or XRechnung rule is
|
|
375
|
+
* refused (HTTP 422), each rule named. Dates are YYYY-MM-DD, amounts go up to
|
|
376
|
+
* 999,999,999.99.
|
|
375
377
|
*/
|
|
376
378
|
export type GenerateRequest = {
|
|
377
379
|
/**
|
|
@@ -591,7 +593,7 @@ export type InvoiceLine = {
|
|
|
591
593
|
/**
|
|
592
594
|
* Tax Rate
|
|
593
595
|
*
|
|
594
|
-
* VAT rate of the line in percent, e.g. 19.00 (BT-152).
|
|
596
|
+
* VAT rate of the line in percent, e.g. 19.00 (BT-152). Not written for category 'O', not subject to VAT (BR-O-05).
|
|
595
597
|
*/
|
|
596
598
|
tax_rate?: number | string;
|
|
597
599
|
};
|
|
@@ -1312,7 +1314,7 @@ export type GenerateInvoiceErrors = {
|
|
|
1312
1314
|
*/
|
|
1313
1315
|
422: Problem;
|
|
1314
1316
|
/**
|
|
1315
|
-
* The generated XML failed invowerk's own check. No document is returned and the credits are refunded.
|
|
1317
|
+
* The generated XML failed invowerk's own check. No document is returned and the credits are refunded. Input that breaks a rule is a 422, not a 500.
|
|
1316
1318
|
*/
|
|
1317
1319
|
500: Problem;
|
|
1318
1320
|
};
|
package/package.json
CHANGED