@kreiseck/kasseneck-api 1.3.0 → 1.5.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/README.md +293 -1
  3. package/dist/cjs/client/aufrufe.d.ts +2 -2
  4. package/dist/cjs/client/aufrufe.js +58 -0
  5. package/dist/cjs/inventory/api.d.ts +61 -0
  6. package/dist/cjs/inventory/api.js +54 -0
  7. package/dist/cjs/inventory/auth.d.ts +17 -0
  8. package/dist/cjs/inventory/auth.js +27 -0
  9. package/dist/cjs/inventory/endpunkte.d.ts +91 -0
  10. package/dist/cjs/inventory/endpunkte.js +290 -0
  11. package/dist/cjs/inventory/fehler.d.ts +43 -0
  12. package/dist/cjs/inventory/fehler.js +66 -0
  13. package/dist/cjs/inventory/index.d.ts +21 -0
  14. package/dist/cjs/inventory/index.js +94 -0
  15. package/dist/cjs/inventory/lesen.d.ts +45 -0
  16. package/dist/cjs/inventory/lesen.js +424 -0
  17. package/dist/cjs/inventory/schreiben.d.ts +83 -0
  18. package/dist/cjs/inventory/schreiben.js +315 -0
  19. package/dist/cjs/inventory/typen.d.ts +679 -0
  20. package/dist/cjs/inventory/typen.js +14 -0
  21. package/dist/cjs/inventory/vertrag.d.ts +136 -0
  22. package/dist/cjs/inventory/vertrag.js +291 -0
  23. package/dist/cjs/inventory/webhook.d.ts +52 -0
  24. package/dist/cjs/inventory/webhook.js +116 -0
  25. package/dist/cjs/invoice/index.d.ts +2 -2
  26. package/dist/cjs/invoice/index.js +2 -1
  27. package/dist/cjs/invoice/typen.d.ts +46 -2
  28. package/dist/cjs/invoice/vertrag.d.ts +19 -5
  29. package/dist/cjs/invoice/vertrag.js +37 -5
  30. package/dist/cjs/stored/vokabular.d.ts +1 -1
  31. package/dist/cjs/stored/vokabular.js +5 -3
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/client/aufrufe.d.ts +2 -2
  35. package/dist/esm/client/aufrufe.js +58 -0
  36. package/dist/esm/inventory/api.d.ts +61 -0
  37. package/dist/esm/inventory/api.js +51 -0
  38. package/dist/esm/inventory/auth.d.ts +17 -0
  39. package/dist/esm/inventory/auth.js +24 -0
  40. package/dist/esm/inventory/endpunkte.d.ts +91 -0
  41. package/dist/esm/inventory/endpunkte.js +267 -0
  42. package/dist/esm/inventory/fehler.d.ts +43 -0
  43. package/dist/esm/inventory/fehler.js +57 -0
  44. package/dist/esm/inventory/index.d.ts +21 -0
  45. package/dist/esm/inventory/index.js +20 -0
  46. package/dist/esm/inventory/lesen.d.ts +45 -0
  47. package/dist/esm/inventory/lesen.js +404 -0
  48. package/dist/esm/inventory/schreiben.d.ts +83 -0
  49. package/dist/esm/inventory/schreiben.js +298 -0
  50. package/dist/esm/inventory/typen.d.ts +679 -0
  51. package/dist/esm/inventory/typen.js +13 -0
  52. package/dist/esm/inventory/vertrag.d.ts +136 -0
  53. package/dist/esm/inventory/vertrag.js +288 -0
  54. package/dist/esm/inventory/webhook.d.ts +52 -0
  55. package/dist/esm/inventory/webhook.js +107 -0
  56. package/dist/esm/invoice/index.d.ts +2 -2
  57. package/dist/esm/invoice/index.js +1 -1
  58. package/dist/esm/invoice/typen.d.ts +46 -2
  59. package/dist/esm/invoice/vertrag.d.ts +19 -5
  60. package/dist/esm/invoice/vertrag.js +36 -4
  61. package/dist/esm/stored/vokabular.d.ts +1 -1
  62. package/dist/esm/stored/vokabular.js +5 -3
  63. package/dist/esm/version.d.ts +1 -1
  64. package/dist/esm/version.js +1 -1
  65. package/fixtures/hobex-hps-codes.json +1 -1
  66. package/fixtures/invoice-api-examples/credit-error-reservation.json +26 -0
  67. package/fixtures/invoice-api-examples/issue-error-reservation-article.json +25 -0
  68. package/fixtures/invoice-api-examples/issue-error-vat-id-risk.json +26 -0
  69. package/fixtures/invoice-api-examples/issue-reservation.json +24 -0
  70. package/fixtures/invoice-api-examples/issue-vat-id-risk.json +28 -0
  71. package/fixtures/invoice-api.schema.json +15 -2
  72. package/fixtures/invoice-texts.json +1 -1
  73. package/fixtures/pos-texts.json +1 -1
  74. package/fixtures/surface.json +306 -5
  75. package/fixtures/v3/README.md +9 -1
  76. package/fixtures/v3/antworten/belege.json +2 -2
  77. package/fixtures/v3/antworten/belegmail.json +2 -2
  78. package/fixtures/v3/antworten/kasse-belege.json +2 -2
  79. package/fixtures/v3/antworten/kasse.json +3 -3
  80. package/fixtures/v3/antworten/lager.json +3881 -0
  81. package/fixtures/v3/antworten/rechnungen.json +267 -44
  82. package/fixtures/v3/antworten/storno.json +2 -2
  83. package/fixtures/v3/stored/belege.json +2 -2
  84. package/fixtures/v3/stored/kasse.json +404 -4
  85. package/fixtures/v3/stored/rechnungen.json +174 -18
  86. package/fixtures/v3/v3-vokabular.json +1007 -20
  87. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  88. package/package.json +14 -2
@@ -89,7 +89,20 @@ export interface InvoiceItemInput {
89
89
  /** Artikel aus dem Artikelstamm; bestandsgefuehrt bucht das Ausstellen ihn vom Lager ab. */
90
90
  articleId?: string;
91
91
  }
92
- /** Eine Gutschriftsposition: wie eine Rechnungsposition, dazu die Rueckgabe-Wahl. */
92
+ /**
93
+ * Eine Position beim Ausstellen (`issueInvoice`): dazu optional die
94
+ * Reservierung aus der Lager-API, die diese Position einloest.
95
+ */
96
+ export interface IssueInvoiceItemInput extends InvoiceItemInput {
97
+ /**
98
+ * Kennung aus `createReservation` (`./inventory`); braucht `articleId`.
99
+ * Geprueft beim Ausstellen (`reservation_not_found`, `reservation_mismatch`,
100
+ * `reservation_not_active`; abgelaufen = Hinweis `reservation_expired`),
101
+ * eingeloest beim Buchen der Rechnung am Lagerstandort der Rechnung.
102
+ */
103
+ reservationId?: string;
104
+ }
105
+ /** Eine Gutschriftsposition: wie eine Rechnungsposition (ohne Reservierung), dazu die Rueckgabe-Wahl. */
93
106
  export interface CreditNoteItemInput extends InvoiceItemInput {
94
107
  /** Wohin die Ware dieser Position geht; fehlt = Vorgabe des Aufrufs bzw. `restock`. */
95
108
  returnDisposition?: ReturnDisposition;
@@ -115,7 +128,7 @@ export interface IssueInvoiceRequest {
115
128
  paymentReference?: string;
116
129
  girocode?: boolean;
117
130
  tracking?: boolean;
118
- items: InvoiceItemInput[];
131
+ items: IssueInvoiceItemInput[];
119
132
  /** Eigene Merkmale (hoechstens 20), nie gedruckt. */
120
133
  metadata?: Record<string, string>;
121
134
  /** Sprache dieser Rechnung; sonst die des Kunden, sonst `de`. Eine Rechnung, eine Nummer, eine Sprache. */
@@ -130,6 +143,15 @@ export interface IssueInvoiceRequest {
130
143
  * Zahlungsinformationen und keinen Giro-QR.
131
144
  */
132
145
  payment?: PaymentInput;
146
+ /**
147
+ * Nur fuer Rechnungen ohne Steuer, die die UID des Kunden verlangen (ig.
148
+ * Lieferung, Reverse Charge): hat die UID-Pruefung noch kein Ergebnis
149
+ * (`vat_id_check_pending`), stellt `true` trotzdem aus. Der Aussteller traegt
150
+ * dann das Risiko, die Rechnung traegt `vatIdRisk`. Eine ungueltige UID
151
+ * (`vat_id_invalid`) sperrt auch damit. Gehoert nicht zur Anfrage im Sinn der
152
+ * Idempotenz: dieselbe Anfrage mit und ohne das Feld ist dieselbe Rechnung.
153
+ */
154
+ acceptVatIdRisk?: boolean;
133
155
  }
134
156
  /** Eine Zahlung, wie das Fremdsystem sie meldet. */
135
157
  export interface PaymentInput {
@@ -168,6 +190,8 @@ export interface InvoicePayment {
168
190
  export interface InvoiceNotice {
169
191
  code: InvoiceNoticeCode;
170
192
  message: string;
193
+ /** Bei `reservation_expired`: die abgelaufene Reservierung. */
194
+ reservationId?: string;
171
195
  }
172
196
  export interface RecordPaymentResult {
173
197
  invoice: Invoice;
@@ -238,6 +262,26 @@ export interface Invoice {
238
262
  paidCents: number;
239
263
  /** Was noch offen ist; `0` heisst bezahlt. */
240
264
  openCents: number;
265
+ /** Beim Festschreiben eingefrorener UID-Nachweis des Kunden; sonst `null`. */
266
+ vatIdProof: InvoiceVatIdProof | null;
267
+ /** Ohne Ergebnis der UID-Pruefung mit `acceptVatIdRisk` ausgestellt; sonst `null`. */
268
+ vatIdRisk: InvoiceVatIdRisk | null;
269
+ }
270
+ /** UID-Nachweis an einer Rechnung: gueltige Pruefung der Kunden-UID, hoechstens 30 Tage vor dem Festschreiben. */
271
+ export interface InvoiceVatIdProof {
272
+ /** Wiener Tag der Pruefung (`YYYY-MM-DD`). */
273
+ checkedOn: string;
274
+ /** Wer geprueft hat: FinanzOnline (Stufe 2 mit Name und Anschrift) oder VIES. */
275
+ source: 'finanzonline' | 'vies';
276
+ /** Stufe der Pruefung: 1 = nur UID, 2 = UID mit Name und Anschrift. */
277
+ level: 1 | 2;
278
+ /** Pruefcode fuer die oeffentliche Pruefseite (auf dem PDF als QR); `null`, wenn keiner vergeben wurde. */
279
+ code: string | null;
280
+ }
281
+ /** Ausgestellt ohne Ergebnis der UID-Pruefung, das Risiko traegt der Aussteller. */
282
+ export interface InvoiceVatIdRisk {
283
+ /** Wiener Tag der Bestaetigung (`YYYY-MM-DD`). */
284
+ acceptedOn: string;
241
285
  }
242
286
  /** Eine Marke des Kontos (Logo, Farbe, Absender) — `id` geht als `brandId` in `issueInvoice`. */
243
287
  export interface Brand {
@@ -27,7 +27,7 @@ export type InvoiceEndpoint = (typeof INVOICE_ENDPOINTS)[number];
27
27
  * Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
28
28
  * aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
29
29
  */
30
- export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large"];
30
+ export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active"];
31
31
  export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
32
32
  /**
33
33
  * Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
@@ -170,7 +170,7 @@ export type InvoicePaymentMethod = (typeof INVOICE_PAYMENT_METHODS)[number];
170
170
  * Hinweise, die eine erfolgreiche Antwort zusaetzlich tragen kann (`data.notice`).
171
171
  * Sie sind keine Fehler: der Aufruf hat gewirkt, es gibt nur etwas zu wissen.
172
172
  */
173
- export declare const INVOICE_NOTICE_CODES: readonly ["cash_receipt_required", "recapitulative_statement_due", "place_of_supply_check"];
173
+ export declare const INVOICE_NOTICE_CODES: readonly ["cash_receipt_required", "recapitulative_statement_due", "place_of_supply_check", "reservation_expired"];
174
174
  export type InvoiceNoticeCode = (typeof INVOICE_NOTICE_CODES)[number];
175
175
  /**
176
176
  * Einheiten einer Position. Die API nimmt nur diese Schluessel an; gedruckt
@@ -270,12 +270,26 @@ export declare const CUSTOMER_FIELDS: Readonly<Record<string, Field>>;
270
270
  * die bisher gerundet eingereicht werden mussten.
271
271
  */
272
272
  export declare const ITEM_FIELDS: Readonly<Record<string, Field>>;
273
+ /**
274
+ * Eine Rechnungsposition beim Ausstellen: die gemeinsamen Positionsfelder plus
275
+ * `reservationId` (seit 1.5.0). Die Reservierung aus der Lager-API
276
+ * (`createReservation`) wird beim Ausstellen geprueft und beim Buchen der
277
+ * Rechnung eingeloest; die Position braucht dazu `articleId`. Unbekannt =
278
+ * `reservation_not_found`, schon eingeloest oder freigegeben =
279
+ * `reservation_not_active`, kein offener Rest dieses Artikels am Lagerstandort
280
+ * der Rechnung (`stockLocationId`, sonst der Standard-Standort) =
281
+ * `reservation_mismatch`; abgelaufen ist kein Fehler, sondern der Hinweis
282
+ * `reservation_expired`. Weniger verkauft als reserviert gibt den Rest frei.
283
+ * Gutschriften kennen das Feld nicht (`validation`).
284
+ */
285
+ export declare const INVOICE_ITEM_FIELDS: Readonly<Record<string, Field>>;
273
286
  /** Genau einer der beiden Preise je Position (§ 9.1). */
274
287
  export declare const ITEM_PRICE_EXACTLY_ONE: readonly (readonly string[])[];
275
288
  /**
276
- * Eine Gutschriftsposition: die Rechnungsposition plus `returnDisposition`
277
- * (wohin die zurueckgenommene Ware geht). An einer Rechnungsposition weist der
278
- * Server das Feld als unbekannt ab.
289
+ * Eine Gutschriftsposition: die gemeinsamen Positionsfelder plus
290
+ * `returnDisposition` (wohin die zurueckgenommene Ware geht), ohne
291
+ * `reservationId`. An einer Rechnungsposition weist der Server
292
+ * `returnDisposition` als unbekannt ab.
279
293
  */
280
294
  export declare const CREDIT_NOTE_ITEM_FIELDS: Readonly<Record<string, Field>>;
281
295
  /**
@@ -70,6 +70,13 @@ export const INVOICE_ERROR_CODES = [
70
70
  'oss_not_enabled',
71
71
  'einvoice_unavailable', // zu dieser Rechnung entsteht keine E-Rechnung, Grund in `reason`
72
72
  'amount_too_large', // Betrag ueber der Grenze des Ganzzahlkerns; erst ab dessen Umstieg gesendet
73
+ // Seit 1.5.0 (0.x: 0.33.0): UID-Pruefung beim Ausstellen ohne Steuer.
74
+ 'vat_id_invalid', // UID des Kunden laut FinanzOnline/VIES ungueltig, sperrt auch mit acceptVatIdRisk
75
+ 'vat_id_check_pending', // noch kein Ergebnis der UID-Pruefung; `retryAfter` in Sekunden, oder acceptVatIdRisk
76
+ // Seit 1.5.0: Position mit `reservationId` (nur `issueInvoice`), geprueft beim Ausstellen.
77
+ 'reservation_not_found', // unbekannt oder einem anderen Konto
78
+ 'reservation_mismatch', // keine offene Position mit gleichem Artikel am Lagerstandort der Rechnung
79
+ 'reservation_not_active', // schon eingeloest oder freigegeben
73
80
  ];
74
81
  /**
75
82
  * Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
@@ -227,6 +234,10 @@ export const INVOICE_NOTICE_CODES = [
227
234
  /** Leistung an eine Privatperson im Drittland: der Leistungsort haengt von der
228
235
  * Art der Leistung ab — wir nehmen den oesterreichischen Fall an. */
229
236
  'place_of_supply_check',
237
+ /** Die Reservierung einer Position war beim Ausstellen schon abgelaufen: die
238
+ * Rechnung entsteht trotzdem, verkauft wird ohne Reservierung (seit 1.5.0).
239
+ * Der Hinweis nennt `reservationId`, je Reservierung einmal. */
240
+ 'reservation_expired',
230
241
  ];
231
242
  /**
232
243
  * Einheiten einer Position. Die API nimmt nur diese Schluessel an; gedruckt
@@ -429,6 +440,19 @@ export const ITEM_FIELDS = Object.freeze({
429
440
  */
430
441
  articleId: id,
431
442
  });
443
+ /**
444
+ * Eine Rechnungsposition beim Ausstellen: die gemeinsamen Positionsfelder plus
445
+ * `reservationId` (seit 1.5.0). Die Reservierung aus der Lager-API
446
+ * (`createReservation`) wird beim Ausstellen geprueft und beim Buchen der
447
+ * Rechnung eingeloest; die Position braucht dazu `articleId`. Unbekannt =
448
+ * `reservation_not_found`, schon eingeloest oder freigegeben =
449
+ * `reservation_not_active`, kein offener Rest dieses Artikels am Lagerstandort
450
+ * der Rechnung (`stockLocationId`, sonst der Standard-Standort) =
451
+ * `reservation_mismatch`; abgelaufen ist kein Fehler, sondern der Hinweis
452
+ * `reservation_expired`. Weniger verkauft als reserviert gibt den Rest frei.
453
+ * Gutschriften kennen das Feld nicht (`validation`).
454
+ */
455
+ export const INVOICE_ITEM_FIELDS = Object.freeze({ ...ITEM_FIELDS, reservationId: id });
432
456
  /** Genau einer der beiden Preise je Position (§ 9.1). */
433
457
  export const ITEM_PRICE_EXACTLY_ONE = Object.freeze([
434
458
  Object.freeze(['unitPriceCents']),
@@ -440,15 +464,16 @@ const positionen = {
440
464
  min: 1,
441
465
  max: 500,
442
466
  item: {
443
- type: 'object', required: true, fields: ITEM_FIELDS, exactlyOne: ITEM_PRICE_EXACTLY_ONE,
467
+ type: 'object', required: true, fields: INVOICE_ITEM_FIELDS, exactlyOne: ITEM_PRICE_EXACTLY_ONE,
444
468
  },
445
469
  };
446
470
  /** Rueckgabe-Wahl einer Gutschrift: Vorgabe des Aufrufs oder je Position. */
447
471
  const returnDisposition = { type: 'enum', required: false, values: RETURN_DISPOSITIONS };
448
472
  /**
449
- * Eine Gutschriftsposition: die Rechnungsposition plus `returnDisposition`
450
- * (wohin die zurueckgenommene Ware geht). An einer Rechnungsposition weist der
451
- * Server das Feld als unbekannt ab.
473
+ * Eine Gutschriftsposition: die gemeinsamen Positionsfelder plus
474
+ * `returnDisposition` (wohin die zurueckgenommene Ware geht), ohne
475
+ * `reservationId`. An einer Rechnungsposition weist der Server
476
+ * `returnDisposition` als unbekannt ab.
452
477
  */
453
478
  export const CREDIT_NOTE_ITEM_FIELDS = Object.freeze({ ...ITEM_FIELDS, returnDisposition });
454
479
  const gutschriftPositionen = {
@@ -545,6 +570,13 @@ export const INVOICE_REQUESTS = Object.freeze({
545
570
  * Idempotenz-Eintrag. Die Antwort traegt `preview` statt `invoice`.
546
571
  */
547
572
  dryRun: { type: 'boolean', required: false },
573
+ /**
574
+ * Rechnung ohne Steuer, deren UID-Pruefung (FinanzOnline, sonst VIES) noch
575
+ * kein Ergebnis hat: `true` stellt trotzdem aus. Der Aussteller traegt das
576
+ * Risiko, die Rechnung steht dann mit `vatIdRisk`. Eine ungueltige UID
577
+ * (`vat_id_invalid`) sperrt auch damit.
578
+ */
579
+ acceptVatIdRisk: { type: 'boolean', required: false },
548
580
  },
549
581
  cancelInvoice: {
550
582
  idempotencyKey: idempotencyKey(true),
@@ -1,5 +1,5 @@
1
1
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
2
- export declare const VOKABULAR_QUELLE = "b1049e2f65e9261cf8f729481d9ce1e5afda2cf620333f38ae6bf1afb36c8712";
2
+ export declare const VOKABULAR_QUELLE = "d351a778c02888291e325068f96156ad1346859f6ff97bae27f91089e9619e8c";
3
3
  /** Schema-Notation des Vertrags: Blatt 'aussen': 'innen', Objekt { __: 'innen', ... }, Liste [ { __: 'innen', ... } ]. */
4
4
  export type SchemaEintrag = string | SchemaObjekt | readonly [SchemaObjekt];
5
5
  export interface SchemaObjekt {
@@ -1,7 +1,7 @@
1
1
  // Erzeugt von scripts/stored-vokabular.mjs aus fixtures/v3/v3-vokabular.json.
2
2
  // Nicht von Hand aendern: test/stored.test.ts vergleicht mit dem Vertrag.
3
3
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
4
- export const VOKABULAR_QUELLE = "b1049e2f65e9261cf8f729481d9ce1e5afda2cf620333f38ae6bf1afb36c8712";
4
+ export const VOKABULAR_QUELLE = "d351a778c02888291e325068f96156ad1346859f6ff97bae27f91089e9619e8c";
5
5
  /** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
6
6
  export const SCHEMAS = {
7
7
  "getReceipt": {
@@ -220,7 +220,8 @@ export const SCHEMAS = {
220
220
  "visible": "sichtbar",
221
221
  "sort": "sort"
222
222
  },
223
- "stockLocationIds": "standorte"
223
+ "stockLocationIds": "standorte",
224
+ "minStockByLocation": "mindestJeStandort"
224
225
  }
225
226
  ]
226
227
  },
@@ -258,7 +259,8 @@ export const ARTIKEL_FELDER = [
258
259
  "active",
259
260
  "groupId",
260
261
  "tile",
261
- "stockLocationIds"
262
+ "stockLocationIds",
263
+ "minStockByLocation"
262
264
  ];
263
265
  /** Wertkataloge innen (deutsch) -> aussen (englisch). */
264
266
  export const KATALOGE = {
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export declare const PACKAGE_VERSION = "1.3.0";
7
+ export declare const PACKAGE_VERSION = "1.5.0";
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export const PACKAGE_VERSION = '1.3.0';
7
+ export const PACKAGE_VERSION = '1.5.0';
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.5.0",
3
3
  "measuredOn": {
4
4
  "tid": "3600335",
5
5
  "hpsVersion": "1.10.0",
@@ -0,0 +1,26 @@
1
+ {
2
+ "endpoint": "createCreditNote",
3
+ "description": "Eine Reservierung wird nur beim Ausstellen eingeloest, nie an einer Gutschrift",
4
+ "request": {
5
+ "idempotencyKey": "ex-21",
6
+ "invoiceId": "invoice_example",
7
+ "reason": "return",
8
+ "items": [
9
+ {
10
+ "description": "Kaisersemmel",
11
+ "quantity": 1,
12
+ "unitPriceCents": 65,
13
+ "vatRate": 10,
14
+ "articleId": "kaisersemmel",
15
+ "reservationId": "res_example"
16
+ }
17
+ ]
18
+ },
19
+ "expected": {
20
+ "ok": false,
21
+ "code": "validation",
22
+ "fields": [
23
+ "items[0].reservationId"
24
+ ]
25
+ }
26
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "endpoint": "issueInvoice",
3
+ "description": "Eine Reservierung gehoert zu einem Artikel: ohne articleId keine reservationId",
4
+ "request": {
5
+ "idempotencyKey": "ex-20",
6
+ "priceMode": "gross",
7
+ "serviceStart": "2026-10-06",
8
+ "items": [
9
+ {
10
+ "description": "Kaisersemmel",
11
+ "quantity": 6,
12
+ "unitPriceCents": 65,
13
+ "vatRate": 10,
14
+ "reservationId": "res_example"
15
+ }
16
+ ]
17
+ },
18
+ "expected": {
19
+ "ok": false,
20
+ "code": "validation",
21
+ "fields": [
22
+ "items[0].articleId"
23
+ ]
24
+ }
25
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "endpoint": "issueInvoice",
3
+ "description": "acceptVatIdRisk ist ein Wahrheitswert, kein Text",
4
+ "request": {
5
+ "idempotencyKey": "ex-vat-id-2",
6
+ "customerId": "customer_example",
7
+ "priceMode": "net",
8
+ "serviceStart": "2026-10-06",
9
+ "acceptVatIdRisk": "yes",
10
+ "items": [
11
+ {
12
+ "description": "Beratung",
13
+ "quantity": 1,
14
+ "unitPriceCents": 1000,
15
+ "vatRate": 20
16
+ }
17
+ ]
18
+ },
19
+ "expected": {
20
+ "ok": false,
21
+ "code": "validation",
22
+ "fields": [
23
+ "acceptVatIdRisk"
24
+ ]
25
+ }
26
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "endpoint": "issueInvoice",
3
+ "description": "Shop-Bestellung: die Position loest eine Reservierung der Lager-API ein",
4
+ "request": {
5
+ "idempotencyKey": "ex-19",
6
+ "priceMode": "gross",
7
+ "serviceStart": "2026-10-06",
8
+ "orderReference": "Bestellung 1001",
9
+ "stockLocationId": "haupt",
10
+ "items": [
11
+ {
12
+ "description": "Kaisersemmel",
13
+ "quantity": 6,
14
+ "unitPriceCents": 65,
15
+ "vatRate": 10,
16
+ "articleId": "kaisersemmel",
17
+ "reservationId": "res_example"
18
+ }
19
+ ]
20
+ },
21
+ "expected": {
22
+ "ok": true
23
+ }
24
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "endpoint": "issueInvoice",
3
+ "description": "Innergemeinschaftliche Lieferung, Risiko einer noch offenen UID-Prüfung übernommen",
4
+ "request": {
5
+ "idempotencyKey": "ex-vat-id-1",
6
+ "customerId": "customer_example",
7
+ "taxScheme": "intraCommunitySupply",
8
+ "priceMode": "net",
9
+ "serviceStart": "2026-10-06",
10
+ "acceptVatIdRisk": true,
11
+ "items": [
12
+ {
13
+ "description": "Ware",
14
+ "quantity": 2,
15
+ "unitPriceCents": 5000,
16
+ "vatRate": 0
17
+ }
18
+ ]
19
+ },
20
+ "expected": {
21
+ "ok": true,
22
+ "totals": {
23
+ "netCents": 10000,
24
+ "vatCents": 0,
25
+ "grossCents": 10000
26
+ }
27
+ }
28
+ }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "Kasseneck Rechnungs-API",
4
4
  "version": 2,
5
- "package": "1.3.0",
5
+ "package": "1.5.0",
6
6
  "endpoints": {
7
7
  "createCustomer": {
8
8
  "request": {
@@ -466,6 +466,11 @@
466
466
  "type": "string",
467
467
  "minLength": 1,
468
468
  "maxLength": 128
469
+ },
470
+ "reservationId": {
471
+ "type": "string",
472
+ "minLength": 1,
473
+ "maxLength": 128
469
474
  }
470
475
  },
471
476
  "required": [
@@ -552,6 +557,9 @@
552
557
  },
553
558
  "dryRun": {
554
559
  "type": "boolean"
560
+ },
561
+ "acceptVatIdRisk": {
562
+ "type": "boolean"
555
563
  }
556
564
  },
557
565
  "required": [
@@ -999,7 +1007,12 @@
999
1007
  "mixed_supply_not_allowed",
1000
1008
  "oss_not_enabled",
1001
1009
  "einvoice_unavailable",
1002
- "amount_too_large"
1010
+ "amount_too_large",
1011
+ "vat_id_invalid",
1012
+ "vat_id_check_pending",
1013
+ "reservation_not_found",
1014
+ "reservation_mismatch",
1015
+ "reservation_not_active"
1003
1016
  ],
1004
1017
  "creditNoteReasons": [
1005
1018
  "cancellation",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.5.0",
3
3
  "languages": [
4
4
  "de",
5
5
  "en"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.5.0",
3
3
  "messages": {
4
4
  "network.no_connection": {
5
5
  "text": "Keine Verbindung zum Server. Bitte die Internetverbindung prüfen und erneut versuchen."