@kreiseck/kasseneck-api 1.29.0 → 1.31.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 (144) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +27 -0
  3. package/dist/cjs/client/list-receipts.d.ts +5 -0
  4. package/dist/cjs/client/list-receipts.js +5 -1
  5. package/dist/cjs/client/receipts.d.ts +6 -0
  6. package/dist/cjs/client/receipts.js +1 -0
  7. package/dist/cjs/enums/voucher-type.d.ts +5 -1
  8. package/dist/cjs/enums/voucher-type.js +5 -1
  9. package/dist/cjs/index.d.ts +1 -1
  10. package/dist/cjs/index.js +15 -5
  11. package/dist/cjs/inventory/index.d.ts +2 -2
  12. package/dist/cjs/inventory/index.js +3 -2
  13. package/dist/cjs/inventory/typen.d.ts +39 -1
  14. package/dist/cjs/inventory/vertrag.d.ts +13 -2
  15. package/dist/cjs/inventory/vertrag.js +16 -1
  16. package/dist/cjs/inventory/webhook.d.ts +3 -0
  17. package/dist/cjs/inventory/webhook.js +39 -0
  18. package/dist/cjs/models/index.d.ts +1 -1
  19. package/dist/cjs/models/index.js +12 -2
  20. package/dist/cjs/models/voucher.d.ts +96 -2
  21. package/dist/cjs/models/voucher.js +158 -5
  22. package/dist/cjs/pos/artikel.d.ts +12 -0
  23. package/dist/cjs/pos/artikel.js +2 -0
  24. package/dist/cjs/pos/client.js +11 -0
  25. package/dist/cjs/pos/errors.d.ts +1 -1
  26. package/dist/cjs/pos/errors.js +1 -0
  27. package/dist/cjs/pos/fremdgutschein-artikel.d.ts +66 -0
  28. package/dist/cjs/pos/fremdgutschein-artikel.js +74 -0
  29. package/dist/cjs/pos/gutschein.d.ts +13 -0
  30. package/dist/cjs/pos/gutschein.js +5 -1
  31. package/dist/cjs/pos/index.d.ts +7 -4
  32. package/dist/cjs/pos/index.js +43 -4
  33. package/dist/cjs/pos/rabatt-vorlagen.d.ts +79 -0
  34. package/dist/cjs/pos/rabatt-vorlagen.js +156 -0
  35. package/dist/cjs/pos/schicht-lesen.js +8 -0
  36. package/dist/cjs/pos/schicht-typen.d.ts +15 -0
  37. package/dist/cjs/pos/settings.d.ts +69 -3
  38. package/dist/cjs/pos/settings.js +72 -5
  39. package/dist/cjs/pos/texte.d.ts +235 -0
  40. package/dist/cjs/pos/texte.js +135 -1
  41. package/dist/cjs/pos/zusaetze.d.ts +3 -3
  42. package/dist/cjs/pos/zusaetze.js +4 -2
  43. package/dist/cjs/receipt/due.d.ts +8 -1
  44. package/dist/cjs/receipt/due.js +1 -0
  45. package/dist/cjs/receipt/gutschein-plan.d.ts +11 -1
  46. package/dist/cjs/receipt/gutschein-plan.js +116 -1
  47. package/dist/cjs/receipt/layout.js +39 -6
  48. package/dist/cjs/receipt/shift-sheet.js +8 -0
  49. package/dist/cjs/stored/draht.js +6 -0
  50. package/dist/cjs/stored/einstellungen.js +50 -2
  51. package/dist/cjs/stored/vokabular.d.ts +3 -1
  52. package/dist/cjs/stored/vokabular.js +52 -5
  53. package/dist/cjs/version.d.ts +1 -1
  54. package/dist/cjs/version.js +1 -1
  55. package/dist/esm/client/list-receipts.d.ts +5 -0
  56. package/dist/esm/client/list-receipts.js +5 -2
  57. package/dist/esm/client/receipts.d.ts +6 -0
  58. package/dist/esm/client/receipts.js +1 -0
  59. package/dist/esm/enums/voucher-type.d.ts +5 -1
  60. package/dist/esm/enums/voucher-type.js +5 -1
  61. package/dist/esm/index.d.ts +1 -1
  62. package/dist/esm/index.js +1 -1
  63. package/dist/esm/inventory/index.d.ts +2 -2
  64. package/dist/esm/inventory/index.js +1 -1
  65. package/dist/esm/inventory/typen.d.ts +39 -1
  66. package/dist/esm/inventory/vertrag.d.ts +13 -2
  67. package/dist/esm/inventory/vertrag.js +15 -0
  68. package/dist/esm/inventory/webhook.d.ts +3 -0
  69. package/dist/esm/inventory/webhook.js +39 -0
  70. package/dist/esm/models/index.d.ts +1 -1
  71. package/dist/esm/models/index.js +1 -1
  72. package/dist/esm/models/voucher.d.ts +96 -2
  73. package/dist/esm/models/voucher.js +152 -4
  74. package/dist/esm/pos/artikel.d.ts +12 -0
  75. package/dist/esm/pos/artikel.js +2 -0
  76. package/dist/esm/pos/client.js +12 -1
  77. package/dist/esm/pos/errors.d.ts +1 -1
  78. package/dist/esm/pos/errors.js +1 -0
  79. package/dist/esm/pos/fremdgutschein-artikel.d.ts +66 -0
  80. package/dist/esm/pos/fremdgutschein-artikel.js +67 -0
  81. package/dist/esm/pos/gutschein.d.ts +13 -0
  82. package/dist/esm/pos/gutschein.js +4 -0
  83. package/dist/esm/pos/index.d.ts +7 -4
  84. package/dist/esm/pos/index.js +8 -4
  85. package/dist/esm/pos/rabatt-vorlagen.d.ts +79 -0
  86. package/dist/esm/pos/rabatt-vorlagen.js +148 -0
  87. package/dist/esm/pos/schicht-lesen.js +8 -0
  88. package/dist/esm/pos/schicht-typen.d.ts +15 -0
  89. package/dist/esm/pos/settings.d.ts +69 -3
  90. package/dist/esm/pos/settings.js +67 -4
  91. package/dist/esm/pos/texte.d.ts +235 -0
  92. package/dist/esm/pos/texte.js +133 -0
  93. package/dist/esm/pos/zusaetze.d.ts +3 -3
  94. package/dist/esm/pos/zusaetze.js +4 -2
  95. package/dist/esm/receipt/due.d.ts +8 -1
  96. package/dist/esm/receipt/due.js +1 -0
  97. package/dist/esm/receipt/gutschein-plan.d.ts +11 -1
  98. package/dist/esm/receipt/gutschein-plan.js +117 -2
  99. package/dist/esm/receipt/layout.js +40 -7
  100. package/dist/esm/receipt/shift-sheet.js +8 -0
  101. package/dist/esm/stored/draht.js +7 -1
  102. package/dist/esm/stored/einstellungen.js +52 -4
  103. package/dist/esm/stored/vokabular.d.ts +3 -1
  104. package/dist/esm/stored/vokabular.js +51 -4
  105. package/dist/esm/version.d.ts +1 -1
  106. package/dist/esm/version.js +1 -1
  107. package/fixtures/add-on-cases.json +6 -4
  108. package/fixtures/discount-preset-cases.json +1074 -0
  109. package/fixtures/expected/voucher-external-redeem.grid32.txt +30 -0
  110. package/fixtures/expected/voucher-external-redeem.grid48.txt +27 -0
  111. package/fixtures/expected/voucher-external-redeem.lines.json +280 -0
  112. package/fixtures/expected/voucher-external-redeem.sheet32.json +206 -0
  113. package/fixtures/expected/voucher-external-redeem.sheet48.json +188 -0
  114. package/fixtures/expected/voucher-external-sale.grid32.txt +27 -0
  115. package/fixtures/expected/voucher-external-sale.grid48.txt +26 -0
  116. package/fixtures/expected/voucher-external-sale.lines.json +256 -0
  117. package/fixtures/expected/voucher-external-sale.sheet32.json +188 -0
  118. package/fixtures/expected/voucher-external-sale.sheet48.json +182 -0
  119. package/fixtures/external-voucher-article-cases.json +311 -0
  120. package/fixtures/hobex-hps-codes.json +1 -1
  121. package/fixtures/invoice-api.schema.json +1 -1
  122. package/fixtures/invoice-texts.json +1 -1
  123. package/fixtures/manifest.json +16 -0
  124. package/fixtures/pos-texts.json +226 -2
  125. package/fixtures/receipt-due-voucher-generated.json +2 -2
  126. package/fixtures/receipts/voucher-external-redeem.json +85 -0
  127. package/fixtures/receipts/voucher-external-sale.json +80 -0
  128. package/fixtures/renames-1.0.json +18 -0
  129. package/fixtures/stored/voucher-cases.json +2800 -0
  130. package/fixtures/surface.json +62 -5
  131. package/fixtures/v3/antworten/belege.json +4 -3
  132. package/fixtures/v3/antworten/belegmail.json +2 -2
  133. package/fixtures/v3/antworten/berichte.json +2 -2
  134. package/fixtures/v3/antworten/kasse-belege.json +4 -3
  135. package/fixtures/v3/antworten/kasse.json +16 -10
  136. package/fixtures/v3/antworten/lager.json +6 -3
  137. package/fixtures/v3/antworten/rechnungen.json +2 -2
  138. package/fixtures/v3/antworten/storno.json +2 -2
  139. package/fixtures/v3/stored/belege.json +2 -2
  140. package/fixtures/v3/stored/kasse.json +3 -3
  141. package/fixtures/v3/stored/rechnungen.json +2 -2
  142. package/fixtures/v3/v3-vokabular.json +262 -15
  143. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  144. package/package.json +1 -1
@@ -5,6 +5,7 @@ exports._storedPosSettingsToWire = _storedPosSettingsToWire;
5
5
  const settings_js_1 = require("../pos/settings.js");
6
6
  const draht_js_1 = require("./draht.js");
7
7
  const draht_js_2 = require("./draht.js");
8
+ const rabatt_vorlagen_js_1 = require("../pos/rabatt-vorlagen.js");
8
9
  const vokabular_js_1 = require("./vokabular.js");
9
10
  const bool = (v) => typeof v === 'boolean';
10
11
  const hex = (v) => typeof v === 'string' && /^#[0-9a-fA-F]{6}$/.test(v);
@@ -138,6 +139,38 @@ function aufzaehlung(liste, katalog, w) {
138
139
  return 'ungueltig';
139
140
  return 'unbekannt';
140
141
  }
142
+ /**
143
+ * Rabatt-Vorlagen (Zwilling von `rabatt-vorlagen-core.liste` und dem Schema `discountPresets`): die gespeicherte Liste
144
+ * `[{ name, art, prozentBp | betragCents }]` geht nur hinaus, wenn die Pruefung sie annimmt (sonst faellt sie ganz);
145
+ * ausgegeben wird sie wie gespeichert (nicht getrimmt), eine ungueltige fehlt still, uebersetzt in `kind`/`percentBp`/`amountCents`. Ein englischer
146
+ * Wert in `art` oder ein englischer Feldname ist innen unbekannt und macht die Liste ungueltig.
147
+ */
148
+ function vorlagenNachAussen(w) {
149
+ const schema = teilSchema('business').discountPresets;
150
+ const aussenName = (0, draht_js_1.innereNamen)((0, draht_js_1.regel)(schema).unter); // innen -> aussen
151
+ const art = vokabular_js_1.KATALOGE['KASSE_BETRIEB_WERTE.discountPresets[].kind'] ?? {};
152
+ if (!Array.isArray(w))
153
+ return undefined;
154
+ const draht = w.map((e) => {
155
+ if (!(0, draht_js_1.istObjekt)(e))
156
+ return e;
157
+ const raus = {};
158
+ for (const [k, v] of Object.entries(e)) {
159
+ if (k === 'art')
160
+ raus[aussenName.get('art') ?? 'kind'] = typeof v === 'string' && (0, draht_js_1.hat)(art, v) ? art[v] : undefined;
161
+ else if (k === 'name')
162
+ raus[k] = v;
163
+ else if (k === 'prozentBp' || k === 'betragCents')
164
+ raus[aussenName.get(k) ?? k] = v;
165
+ // Jeder andere Schluessel (auch ein englischer wie `percentBp`) ist innen unbekannt.
166
+ else
167
+ raus[`innen_${k}`] = v;
168
+ }
169
+ return raus;
170
+ });
171
+ const geprueft = (0, rabatt_vorlagen_js_1.checkDiscountPresets)(draht);
172
+ return geprueft.ok ? draht : undefined;
173
+ }
141
174
  function teilNachAussen(teil, gespeichert, weg) {
142
175
  if (!(0, draht_js_1.istObjekt)(gespeichert))
143
176
  return {};
@@ -150,6 +183,13 @@ function teilNachAussen(teil, gespeichert, weg) {
150
183
  if (aussen === undefined || w === undefined)
151
184
  continue;
152
185
  const pfad = `${teil}.${aussen}`;
186
+ if (teil === 'business' && aussen === 'discountPresets') {
187
+ const liste = vorlagenNachAussen(w);
188
+ // Wie jede optionale Einstellung: ungueltig fehlt still (mischeBetrieb nimmt sie gar nicht erst), ohne Eintrag in `weg`.
189
+ if (liste !== undefined)
190
+ raus[aussen] = liste;
191
+ continue;
192
+ }
153
193
  if ((0, draht_js_1.hat)(WAHLFELDER, teil) && WAHLFELDER[teil].includes(aussen)) {
154
194
  const katalog = katalogFuer(teil, aussen);
155
195
  const einzeln = (e) => (typeof e === 'string' && katalog !== null && (0, draht_js_1.hat)(katalog, e) ? katalog[e] : undefined);
@@ -226,6 +266,14 @@ function teilNachAussen(teil, gespeichert, weg) {
226
266
  else
227
267
  weg.push(pfad);
228
268
  }
269
+ // Mit gueltigen Vorlagen folgen die Chips immer den Vorlagen (mischeBetrieb), auch ein ungueltiges gespeichertes
270
+ // `rabattChips` faellt dann nicht erst am Validator.
271
+ if (teil === 'business' && (0, draht_js_1.hat)(raus, 'discountPresets')) {
272
+ raus.discountChips = (0, rabatt_vorlagen_js_1.discountChipsFromPresets)(raus.discountPresets);
273
+ const i = weg.indexOf('business.discountChips');
274
+ if (i >= 0)
275
+ weg.splice(i, 1);
276
+ }
229
277
  return raus;
230
278
  }
231
279
  /**
@@ -242,10 +290,10 @@ function _storedPosSettingsToWire(stored) {
242
290
  }
243
291
  /** Nur fuer den Test: die Feldliste der Pruefer (muss mit der Vorgabe deckungsgleich sein). */
244
292
  exports._PRUEFER_FELDER = Object.freeze({
245
- business: [...new Set([...Object.keys(PRUEFER.business), ...Object.keys(settings_js_1.POS_BUSINESS_VALUES), ...Object.keys(BETRIEB_OPTIONAL), ...Object.keys(KARTEN)])],
293
+ business: [...new Set([...Object.keys(PRUEFER.business), ...Object.keys(settings_js_1.POS_BUSINESS_VALUES), ...Object.keys(BETRIEB_OPTIONAL), ...Object.keys(KARTEN), ...settings_js_1.POS_BUSINESS_OPTIONAL_LISTS])],
246
294
  device: [...new Set([...Object.keys(PRUEFER.device), ...Object.keys(settings_js_1.POS_DEVICE_VALUES), ...Object.keys(GERAET_OPTIONAL), 'shortcuts'])],
247
295
  standard: {
248
- business: [...Object.keys(settings_js_1.POS_BUSINESS_DEFAULTS), ...settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS, ...settings_js_1.POS_BUSINESS_OPTIONAL_CHOICES],
296
+ business: [...Object.keys(settings_js_1.POS_BUSINESS_DEFAULTS), ...settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS, ...settings_js_1.POS_BUSINESS_OPTIONAL_CHOICES, ...settings_js_1.POS_BUSINESS_OPTIONAL_LISTS],
249
297
  device: [...Object.keys(settings_js_1.POS_DEVICE_DEFAULTS), ...settings_js_1.POS_DEVICE_OPTIONAL_FIELDS, ...settings_js_1.POS_DEVICE_OPTIONAL_CHOICES],
250
298
  },
251
299
  });
@@ -1,5 +1,5 @@
1
1
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
2
- export declare const VOKABULAR_QUELLE = "c137b0f64dd1a06c8cddd9d9164bd2360ecbc3133cc04ca2b82d0e37f9d4fe5d";
2
+ export declare const VOKABULAR_QUELLE = "04ab5e1d031979a4f0aa31ea000f4cbe1d6e557e2411e439899ac19a1bba0325";
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 {
@@ -18,3 +18,5 @@ export declare const SCHEMAS: Readonly<Record<'getReceipt' | 'getKasseSettings'
18
18
  export declare const ARTIKEL_FELDER: readonly string[];
19
19
  /** Wertkataloge innen (deutsch) -> aussen (englisch). */
20
20
  export declare const KATALOGE: Readonly<Record<string, Readonly<Record<string, string>>>>;
21
+ /** Kataloge der Gutschein-Eintraege am Beleg ohne Schemaverweis (`quelle` eines Fremdgutscheins), innen -> aussen. */
22
+ export declare const ZUSATZ_KATALOGE: Readonly<Record<string, Readonly<Record<string, string>>>>;
@@ -2,9 +2,9 @@
2
2
  // Erzeugt von scripts/stored-vokabular.mjs aus fixtures/v3/v3-vokabular.json.
3
3
  // Nicht von Hand aendern: test/stored.test.ts vergleicht mit dem Vertrag.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
5
+ exports.ZUSATZ_KATALOGE = exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
6
6
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
7
- exports.VOKABULAR_QUELLE = "c137b0f64dd1a06c8cddd9d9164bd2360ecbc3133cc04ca2b82d0e37f9d4fe5d";
7
+ exports.VOKABULAR_QUELLE = "04ab5e1d031979a4f0aa31ea000f4cbe1d6e557e2411e439899ac19a1bba0325";
8
8
  /** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
9
9
  exports.SCHEMAS = {
10
10
  "getReceipt": {
@@ -47,6 +47,7 @@ exports.SCHEMAS = {
47
47
  },
48
48
  "testCashregister": "testKasse",
49
49
  "testSignature": "testSignatur",
50
+ "deprecation": "deprecation",
50
51
  "logo_scale": "logo_skala",
51
52
  "layout": {
52
53
  "__": "layout",
@@ -153,6 +154,7 @@ exports.SCHEMAS = {
153
154
  "tipChips": "tgChips",
154
155
  "exactCash": "schnellbar",
155
156
  "tipKeptByDefault": "tgDirekt",
157
+ "tipKeptMode": "tgDirektModus",
156
158
  "tipKinds": "tgArten",
157
159
  "tipStart": "tgStart",
158
160
  "checkoutMode": "kassierenModus",
@@ -167,7 +169,16 @@ exports.SCHEMAS = {
167
169
  "watermarkScale": "wzSkala",
168
170
  "glass": "glas",
169
171
  "hints": "hinweise",
170
- "discountChips": "rabattChips"
172
+ "discountChips": "rabattChips",
173
+ "discountPresets": [
174
+ {
175
+ "__": "rabattVorlagen",
176
+ "kind": "art",
177
+ "percentBp": "prozentBp",
178
+ "amountCents": "betragCents"
179
+ }
180
+ ],
181
+ "customDiscountAllowed": "rabattFrei"
171
182
  },
172
183
  "device": {
173
184
  "__": "geraet",
@@ -291,6 +302,7 @@ exports.SCHEMAS = {
291
302
  }
292
303
  ],
293
304
  "serviceArticles": "leistungsArtikel",
305
+ "externalVouchers": "fremd",
294
306
  "returnType": {
295
307
  "__": "rueckgabe",
296
308
  "typeId": "sorteId",
@@ -331,6 +343,12 @@ exports.SCHEMAS = {
331
343
  "business.tipStart": {
332
344
  "$catalog": "KASSE_BETRIEB_WERTE.tipStart"
333
345
  },
346
+ "business.tipKeptMode": {
347
+ "$catalog": "KASSE_BETRIEB_WERTE.tipKeptMode"
348
+ },
349
+ "business.discountPresets[].kind": {
350
+ "$catalog": "KASSE_BETRIEB_WERTE.discountPresets[].kind"
351
+ },
334
352
  "business.checkoutMode": {
335
353
  "$catalog": "KASSE_BETRIEB_WERTE.checkoutMode"
336
354
  },
@@ -376,6 +394,11 @@ exports.SCHEMAS = {
376
394
  },
377
395
  "vouchers.types[].payout": {
378
396
  "$catalog": "GUTSCHEIN_AUSZAHLUNG"
397
+ },
398
+ "vouchers.externalVouchers": {
399
+ "aus": "off",
400
+ "wert": "multi_purpose",
401
+ "beide": "all"
379
402
  }
380
403
  }
381
404
  },
@@ -404,7 +427,8 @@ exports.SCHEMAS = {
404
427
  "pattern": "muster",
405
428
  "patternStrict": "musterStreng"
406
429
  },
407
- "addOns": "zusaetze"
430
+ "addOns": "zusaetze",
431
+ "externalVoucher": "fremdgutschein"
408
432
  }
409
433
  ]
410
434
  },
@@ -417,6 +441,9 @@ exports.SCHEMAS = {
417
441
  },
418
442
  "articles[].reference.mode": {
419
443
  "$catalog": "REFERENZ_STUFE"
444
+ },
445
+ "articles[].externalVoucher": {
446
+ "$catalog": "ARTIKEL_FREMDGUTSCHEIN"
420
447
  }
421
448
  }
422
449
  }
@@ -450,10 +477,15 @@ exports.ARTIKEL_FELDER = [
450
477
  "minStockByLocation",
451
478
  "askPrice",
452
479
  "reference",
453
- "addOns"
480
+ "addOns",
481
+ "externalVoucher"
454
482
  ];
455
483
  /** Wertkataloge innen (deutsch) -> aussen (englisch). */
456
484
  exports.KATALOGE = {
485
+ "ARTIKEL_FREMDGUTSCHEIN": {
486
+ "mehrzweck": "multi_purpose",
487
+ "einzweck": "single_purpose"
488
+ },
457
489
  "AUSGABE_ART": {
458
490
  "erstdruck": "print",
459
491
  "duplikat": "reprint",
@@ -647,6 +679,10 @@ exports.KATALOGE = {
647
679
  "aus": "off",
648
680
  "an": "on"
649
681
  },
682
+ "KASSE_BETRIEB_WERTE.discountPresets[].kind": {
683
+ "prozent": "percent",
684
+ "betrag": "amount"
685
+ },
650
686
  "KASSE_BETRIEB_WERTE.quantity": {
651
687
  "aus": "off",
652
688
  "x": "x",
@@ -669,6 +705,11 @@ exports.KATALOGE = {
669
705
  "streifen": "stripe",
670
706
  "voll": "full"
671
707
  },
708
+ "KASSE_BETRIEB_WERTE.tipKeptMode": {
709
+ "fragen": "ask",
710
+ "immer": "always",
711
+ "nie": "never"
712
+ },
672
713
  "KASSE_BETRIEB_WERTE.tipKinds[]": {
673
714
  "prozent": "percent",
674
715
  "aufrunden": "round_up",
@@ -748,3 +789,9 @@ exports.KATALOGE = {
748
789
  "sonstiges": "other"
749
790
  }
750
791
  };
792
+ /** Kataloge der Gutschein-Eintraege am Beleg ohne Schemaverweis (`quelle` eines Fremdgutscheins), innen -> aussen. */
793
+ exports.ZUSATZ_KATALOGE = {
794
+ "GUTSCHEIN_QUELLE": {
795
+ "extern": "external"
796
+ }
797
+ };
@@ -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.29.0";
7
+ export declare const PACKAGE_VERSION = "1.31.0";
@@ -7,4 +7,4 @@ exports.PACKAGE_VERSION = void 0;
7
7
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
8
8
  * beim Anheben der Version beide Stellen aendern.
9
9
  */
10
- exports.PACKAGE_VERSION = '1.29.0';
10
+ exports.PACKAGE_VERSION = '1.31.0';
@@ -216,6 +216,11 @@ export interface ListReceiptsPage<V extends ListReceiptsView = 'summary'> {
216
216
  }
217
217
  /** Zeile `view: summary` vom Draht. */
218
218
  export declare function fromListReceiptsSummaryPayload(payload: Record<string, unknown>): ListReceiptsSummary;
219
+ /**
220
+ * Ein Beleg der vollen Ansicht vom Draht: das Belegdokument und die Zusaetze, die `getReceipt` in der Huelle traegt.
221
+ * Paketintern auch fuer die Beleg-Webhooks (dieselbe Darstellung, `parseInventoryWebhookEvent`).
222
+ */
223
+ export declare function vollerBeleg(roh: Record<string, unknown>): ListedFullReceipt;
219
224
  /**
220
225
  * Ein Beleg der vollen Ansicht mit den Druck- und Anzeigedaten seiner Seite, in derselben Form wie
221
226
  * `getReceiptWithCompany` (ohne `outputs`): der Kopf der Version des Belegs aus `headers` (Nullbelege ohne
@@ -220,8 +220,11 @@ function kopfdaten(roh) {
220
220
  return { ...fromReceiptCompanyPayload(roh), label: typeof label === 'string' ? label : '' };
221
221
  }
222
222
  const LOGO_STUFEN = ['S', 'M', 'L', 'XL'];
223
- /** Ein Beleg der vollen Ansicht vom Draht: das Belegdokument und die Zusaetze, die `getReceipt` in der Huelle traegt. */
224
- function vollerBeleg(roh) {
223
+ /**
224
+ * Ein Beleg der vollen Ansicht vom Draht: das Belegdokument und die Zusaetze, die `getReceipt` in der Huelle traegt.
225
+ * Paketintern auch fuer die Beleg-Webhooks (dieselbe Darstellung, `parseInventoryWebhookEvent`).
226
+ */
227
+ export function vollerBeleg(roh) {
225
228
  const beleg = fromReceiptPayload(roh);
226
229
  if (typeof roh['testSignature'] === 'boolean')
227
230
  beleg.testSignature = roh['testSignature'];
@@ -280,6 +280,12 @@ export interface ReceiptWithCompany {
280
280
  * neuer Beleg). Fehlt sonst, auch beim ersten Verkauf mit Schluessel.
281
281
  */
282
282
  replayed?: true;
283
+ /**
284
+ * Nur nach einem Verkauf auf einem veralteten Weg (Server 2026-11: Wertgutschein der Altform mit frei getipptem
285
+ * Code, `type: 'value'`): der Hinweis des Servers (englisch). Der Beleg gilt; kuenftig den Gutschein als
286
+ * Fremdgutschein (`source: 'external'`) bzw. als eigenen ueber eine Sorte senden. Fehlt sonst.
287
+ */
288
+ deprecation?: string;
283
289
  }
284
290
  /**
285
291
  * Das Zeilenmodell zum Drucken und Anzeigen eines Belegs aus einer Antwort.
@@ -1042,6 +1042,7 @@ export function belegMitFirmaAusHuelle(daten, functionName) {
1042
1042
  ...(outputs !== undefined ? { outputs } : {}),
1043
1043
  // Nur genau true: ohne Wiederholung bleibt die Form des Ergebnisses wie bisher.
1044
1044
  ...(d.replayed === true ? { replayed: true } : {}),
1045
+ ...(typeof d.deprecation === 'string' && d.deprecation !== '' ? { deprecation: d.deprecation } : {}),
1045
1046
  };
1046
1047
  }
1047
1048
  /**
@@ -2,7 +2,11 @@
2
2
  * Gutscheinart — Zwilling von `VoucherType` in kasseneck_api/lib/enums/voucher_type.dart.
3
3
  */
4
4
  export declare const VoucherType: {
5
- /** Altform: Wertgutschein (Wert im Cent, Code frei). */
5
+ /**
6
+ * Altform: Wertgutschein (Wert im Cent, Code frei). Gelesene Belege tragen `value` fuer jeden
7
+ * Mehrzweck-Eintrag (eigen und fremd); dort ist der Wert gueltig. Als Wunsch mit frei getipptem Code
8
+ * veraltet: siehe [LegacyValueVoucherWish].
9
+ */
6
10
  readonly value: "value";
7
11
  /** Altform: Rabatt-/Aktionsgutschein. */
8
12
  readonly promo: "promo";
@@ -2,7 +2,11 @@
2
2
  * Gutscheinart — Zwilling von `VoucherType` in kasseneck_api/lib/enums/voucher_type.dart.
3
3
  */
4
4
  export const VoucherType = {
5
- /** Altform: Wertgutschein (Wert im Cent, Code frei). */
5
+ /**
6
+ * Altform: Wertgutschein (Wert im Cent, Code frei). Gelesene Belege tragen `value` fuer jeden
7
+ * Mehrzweck-Eintrag (eigen und fremd); dort ist der Wert gueltig. Als Wunsch mit frei getipptem Code
8
+ * veraltet: siehe [LegacyValueVoucherWish].
9
+ */
6
10
  value: 'value',
7
11
  /** Altform: Rabatt-/Aktionsgutschein. */
8
12
  promo: 'promo',
@@ -1,5 +1,5 @@
1
1
  export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
2
- export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
2
+ export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
3
  export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
4
4
  export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ReceiptType, VatRate, KeckPaymentMethod, CreditCardProvider, VoucherType, VoucherAction, StripeLinkMode, } from './enums/index.js';
2
- export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, isVoucherItem, isVoucherFloatItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_LOG_KINDS, RECEIPT_OUTPUT_RESULTS, RECEIPT_OUTPUT_ENTRIES_MAX, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, RECEIPT_OUTPUT_ERROR_CODES, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
2
+ export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, isVoucherItem, isVoucherFloatItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_LOG_KINDS, RECEIPT_OUTPUT_RESULTS, RECEIPT_OUTPUT_ENTRIES_MAX, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, RECEIPT_OUTPUT_ERROR_CODES, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
3
  export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, listMyCashregisters, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
4
4
  export { receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock } from './vienna-time.js';
@@ -21,5 +21,5 @@ export { changeStockCondition, createArticle, createReservation, deactivateArtic
21
21
  export { addVariant, createVariantGroup, getVariantGroup, iterateVariantGroups, listVariantGroups, updateVariantGroup, } from './varianten.js';
22
22
  export { cancelStocktake, closeStocktake, createStocktake, getStocktake, getStocktakePdf, iterateStocktakeCounts, iterateStocktakeItems, iterateStocktakes, listStocktakeCounts, listStocktakeItems, listStocktakes, recordStocktakeCount, recountStocktake, reviewStocktake, voidStocktakeCount, } from './inventur.js';
23
23
  export { verifyInventoryWebhookSignature, parseInventoryWebhookEvent, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_TOLERANCE_SEC, type VerifyInventoryWebhookOptions, } from './webhook.js';
24
- export type { AddVariantRequest, Article, CancelStocktakeRequest, CloseStocktakeRequest, CloseStocktakeResult, CreateStocktakeRequest, RecordStocktakeCountRequest, RecountStocktakeRequest, ReviewStocktakeRequest, Stocktake, StocktakeActor, StocktakeCancellation, StocktakeClosing, StocktakeCount, StocktakeCountListQuery, StocktakeCountPage, StocktakeCountResult, StocktakeInventoryLine, StocktakeItem, StocktakeItemListQuery, StocktakeItemPage, StocktakeListQuery, StocktakeNotBooked, StocktakePage, StocktakePdf, StocktakePdfDownload, StocktakePdfInfo, StocktakeProgress, StocktakeRecount, StocktakeReview, StocktakeScope, StocktakeScopeInput, StocktakeSeal, StocktakeTotals, StocktakeWarning, VoidStocktakeCountRequest, ArticleInput, ArticleListQuery, ArticleLookup, ArticlePage, ChangeStockConditionRequest, CreateArticleRequest, CreateInventoryWebhookOptions, CreateReservationRequest, CreateVariantGroupRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptItem, GoodsReceiptPreview, GoodsReceiptPreviewLine, GoodsReceiptPreviewRequest, InventoryShortfall, InventoryWarning, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookEnvelope, InventoryWebhookEvent, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestDelivery, InventoryWebhookTestResult, InventoryWebhookWithSecret, LandedCost, Location, LocationAddress, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationItem, ReleaseReservationRequest, Reservation, ReservationItem, ReservationItemInput, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockBelowMinimumEventData, StockChangedEventData, StockItem, StockLevel, StockListQuery, StockMovement, StockMovementLot, StockMovementPage, StockMovementQuery, StockMovementSourceRef, StockOperation, StockPage, StockResult, StockValue, TransferStockRequest, UpdateArticleRequest, UpdateVariantGroupRequest, VariantAttribute, VariantGroup, VariantGroupDefaults, VariantGroupDefaultsInput, VariantGroupListQuery, VariantGroupMember, VariantGroupPage, VariantInput, } from './typen.js';
25
- export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, STOCKTAKE_STATUSES, STOCKTAKE_TYPES, STOCKTAKE_SCOPE_TYPES, STOCKTAKE_CHECK_REASONS, STOCKTAKE_NOT_BOOKED_REASONS, STOCKTAKE_SOURCES, STOCKTAKE_ACTOR_TYPES, STOCKTAKE_INVENTORY_AS_OF, STOCKTAKE_ITEMS_MAX, STOCKTAKE_RECOUNT_ITEMS_MAX, STOCKTAKE_COUNTS_PER_ITEM_MAX, type StocktakeStatus, type StocktakeType, type StocktakeScopeType, type StocktakeCheckReason, type StocktakeNotBookedReason, type StocktakeSource, type StocktakeActorType, type StocktakeInventoryAsOf, type InventoryEndpoint, type InventoryErrorCode, type InventoryRequestErrorCode, type InventoryWebhookEventType, type LocationType, type StockMovementType, type StockMovementSource, type StockCondition, type StockChangeCause, type WebhookDeliveryStatus, type InventoryWarningCode, type StockKind, type StockLossReason, type WithdrawalType, type LandedCostType, type LandedCostAllocation, type ReservationStatus, } from './vertrag.js';
24
+ export type { AddVariantRequest, Article, CancelStocktakeRequest, CloseStocktakeRequest, CloseStocktakeResult, CreateStocktakeRequest, RecordStocktakeCountRequest, RecountStocktakeRequest, ReviewStocktakeRequest, Stocktake, StocktakeActor, StocktakeCancellation, StocktakeClosing, StocktakeCount, StocktakeCountListQuery, StocktakeCountPage, StocktakeCountResult, StocktakeInventoryLine, StocktakeItem, StocktakeItemListQuery, StocktakeItemPage, StocktakeListQuery, StocktakeNotBooked, StocktakePage, StocktakePdf, StocktakePdfDownload, StocktakePdfInfo, StocktakeProgress, StocktakeRecount, StocktakeReview, StocktakeScope, StocktakeScopeInput, StocktakeSeal, StocktakeTotals, StocktakeWarning, VoidStocktakeCountRequest, ArticleInput, ArticleListQuery, ArticleLookup, ArticlePage, ChangeStockConditionRequest, CreateArticleRequest, CreateInventoryWebhookOptions, CreateReservationRequest, CreateVariantGroupRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptItem, GoodsReceiptPreview, GoodsReceiptPreviewLine, GoodsReceiptPreviewRequest, InventoryShortfall, InventoryWarning, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookEnvelope, InventoryWebhookEvent, ReceiptCreatedEventData, ReceiptCancelledEventData, ReceiptCancelledItem, ReceiptRefund, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestDelivery, InventoryWebhookTestResult, InventoryWebhookWithSecret, LandedCost, Location, LocationAddress, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationItem, ReleaseReservationRequest, Reservation, ReservationItem, ReservationItemInput, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockBelowMinimumEventData, StockChangedEventData, StockItem, StockLevel, StockListQuery, StockMovement, StockMovementLot, StockMovementPage, StockMovementQuery, StockMovementSourceRef, StockOperation, StockPage, StockResult, StockValue, TransferStockRequest, UpdateArticleRequest, UpdateVariantGroupRequest, VariantAttribute, VariantGroup, VariantGroupDefaults, VariantGroupDefaultsInput, VariantGroupListQuery, VariantGroupMember, VariantGroupPage, VariantInput, } from './typen.js';
25
+ export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, RECEIPT_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, STOCKTAKE_STATUSES, STOCKTAKE_TYPES, STOCKTAKE_SCOPE_TYPES, STOCKTAKE_CHECK_REASONS, STOCKTAKE_NOT_BOOKED_REASONS, STOCKTAKE_SOURCES, STOCKTAKE_ACTOR_TYPES, STOCKTAKE_INVENTORY_AS_OF, STOCKTAKE_ITEMS_MAX, STOCKTAKE_RECOUNT_ITEMS_MAX, STOCKTAKE_COUNTS_PER_ITEM_MAX, type StocktakeStatus, type StocktakeType, type StocktakeScopeType, type StocktakeCheckReason, type StocktakeNotBookedReason, type StocktakeSource, type StocktakeActorType, type StocktakeInventoryAsOf, type InventoryEndpoint, type InventoryErrorCode, type InventoryRequestErrorCode, type InventoryWebhookEventType, type ReceiptWebhookEventType, type LocationType, type StockMovementType, type StockMovementSource, type StockCondition, type StockChangeCause, type WebhookDeliveryStatus, type InventoryWarningCode, type StockKind, type StockLossReason, type WithdrawalType, type LandedCostType, type LandedCostAllocation, type ReservationStatus, } from './vertrag.js';
@@ -21,4 +21,4 @@ export { changeStockCondition, createArticle, createReservation, deactivateArtic
21
21
  export { addVariant, createVariantGroup, getVariantGroup, iterateVariantGroups, listVariantGroups, updateVariantGroup, } from './varianten.js';
22
22
  export { cancelStocktake, closeStocktake, createStocktake, getStocktake, getStocktakePdf, iterateStocktakeCounts, iterateStocktakeItems, iterateStocktakes, listStocktakeCounts, listStocktakeItems, listStocktakes, recordStocktakeCount, recountStocktake, reviewStocktake, voidStocktakeCount, } from './inventur.js';
23
23
  export { verifyInventoryWebhookSignature, parseInventoryWebhookEvent, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_TOLERANCE_SEC, } from './webhook.js';
24
- export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, STOCKTAKE_STATUSES, STOCKTAKE_TYPES, STOCKTAKE_SCOPE_TYPES, STOCKTAKE_CHECK_REASONS, STOCKTAKE_NOT_BOOKED_REASONS, STOCKTAKE_SOURCES, STOCKTAKE_ACTOR_TYPES, STOCKTAKE_INVENTORY_AS_OF, STOCKTAKE_ITEMS_MAX, STOCKTAKE_RECOUNT_ITEMS_MAX, STOCKTAKE_COUNTS_PER_ITEM_MAX, } from './vertrag.js';
24
+ export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, RECEIPT_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, STOCKTAKE_STATUSES, STOCKTAKE_TYPES, STOCKTAKE_SCOPE_TYPES, STOCKTAKE_CHECK_REASONS, STOCKTAKE_NOT_BOOKED_REASONS, STOCKTAKE_SOURCES, STOCKTAKE_ACTOR_TYPES, STOCKTAKE_INVENTORY_AS_OF, STOCKTAKE_ITEMS_MAX, STOCKTAKE_RECOUNT_ITEMS_MAX, STOCKTAKE_COUNTS_PER_ITEM_MAX, } from './vertrag.js';
@@ -11,6 +11,7 @@
11
11
  * Tag) `YYYY-MM-DD`.
12
12
  */
13
13
  import type { InventoryWarningCode, InventoryWebhookEventType, LandedCostAllocation, LandedCostType, LocationType, ReservationStatus, StockChangeCause, StockCondition, StockKind, StockLossReason, StockMovementSource, StockMovementType, StocktakeActorType, StocktakeCheckReason, StocktakeInventoryAsOf, StocktakeNotBookedReason, StocktakeScopeType, StocktakeSource, StocktakeStatus, StocktakeType, WebhookDeliveryStatus, WithdrawalType } from './vertrag.js';
14
+ import type { ListedFullReceipt } from '../client/list-receipts.js';
14
15
  /**
15
16
  * Ein Artikel, wie `getArticle`, `listArticles`, `lookupArticleByCode` und die
16
17
  * Ereignisse `article.*` ihn senden.
@@ -355,7 +356,44 @@ export interface InventoryWebhookEnvelope<T extends InventoryWebhookEventType, D
355
356
  test: boolean;
356
357
  data: D;
357
358
  }
358
- export type InventoryWebhookEvent = InventoryWebhookEnvelope<'stock.changed', StockChangedEventData> | InventoryWebhookEnvelope<'stock.below_minimum', StockBelowMinimumEventData> | InventoryWebhookEnvelope<'article.created', Article> | InventoryWebhookEnvelope<'article.updated', Article> | InventoryWebhookEnvelope<'article.deactivated', Article> | InventoryWebhookEnvelope<'reservation.expired', Reservation> | InventoryWebhookEnvelope<'reservation.released', Reservation> | InventoryWebhookEnvelope<'reservation.redeemed', Reservation> | InventoryWebhookEnvelope<'variant_group.created', VariantGroup> | InventoryWebhookEnvelope<'variant_group.updated', VariantGroup>;
359
+ /**
360
+ * Nutzlast von `receipt.created` (Beleg-Webhooks): der Beleg wie `listReceipts` mit `view: 'full'` (dieselbe
361
+ * Darstellung, auch Fremdgutscheine mit Nummer, eigene maskiert). Ist der Beleg fuer eine Zustellung zu gross,
362
+ * fehlen seine Positionen (`receipt.items` leer), `truncated` ist `true` und `hint` sagt, ihn mit `getReceipt`
363
+ * zu holen.
364
+ */
365
+ export interface ReceiptCreatedEventData {
366
+ receipt: ListedFullReceipt;
367
+ /** Nur bei einer gekuerzten Zustellung: `true` (die Positionen fehlen). */
368
+ truncated?: true;
369
+ /** Nur bei einer gekuerzten Zustellung: Hinweis (deutsch). */
370
+ hint?: string;
371
+ }
372
+ /** Eine stornierte Position aus dem Storno-Beleg (`cancelledItems[]`). */
373
+ export interface ReceiptCancelledItem {
374
+ /** Index der Position im Original; `null`, wenn der Storno-Beleg ihn nicht traegt (Positionen ohne Artikel). */
375
+ index: number | null;
376
+ quantity: number | null;
377
+ }
378
+ /** Eine Rueckzahlung des Storno-Belegs (`refunds[]`): Betrag positiv in Cent. */
379
+ export interface ReceiptRefund {
380
+ /** Kennung der Zahlung im Original (`payments[].id`); `null` ohne Bezug (etwa bar zurueck). */
381
+ refundOf: string | null;
382
+ amountCents: number | null;
383
+ /** Zahlart wie in `payments[].method`. */
384
+ method: string | null;
385
+ }
386
+ /**
387
+ * Nutzlast von `receipt.cancelled`: der Storno-Beleg wie bei `receipt.created`, dazu Bezug, stornierte Positionen
388
+ * und Rueckzahlungen, abgeleitet aus dem Storno-Beleg selbst. `cancellationOf` ist die Beleg-ID des Originals;
389
+ * der veraltete Storno ohne Bezug traegt `null`.
390
+ */
391
+ export interface ReceiptCancelledEventData extends ReceiptCreatedEventData {
392
+ cancellationOf: string | null;
393
+ cancelledItems: ReceiptCancelledItem[];
394
+ refunds: ReceiptRefund[];
395
+ }
396
+ export type InventoryWebhookEvent = InventoryWebhookEnvelope<'stock.changed', StockChangedEventData> | InventoryWebhookEnvelope<'stock.below_minimum', StockBelowMinimumEventData> | InventoryWebhookEnvelope<'article.created', Article> | InventoryWebhookEnvelope<'article.updated', Article> | InventoryWebhookEnvelope<'article.deactivated', Article> | InventoryWebhookEnvelope<'reservation.expired', Reservation> | InventoryWebhookEnvelope<'reservation.released', Reservation> | InventoryWebhookEnvelope<'reservation.redeemed', Reservation> | InventoryWebhookEnvelope<'variant_group.created', VariantGroup> | InventoryWebhookEnvelope<'variant_group.updated', VariantGroup> | InventoryWebhookEnvelope<'receipt.created', ReceiptCreatedEventData> | InventoryWebhookEnvelope<'receipt.cancelled', ReceiptCancelledEventData>;
359
397
  /**
360
398
  * Die Felder eines Artikels beim Anlegen. Bei der Anlage heisst `null` „nicht
361
399
  * angegeben“ (ausser bei `name`, der Pflicht ist).
@@ -58,9 +58,20 @@ export type WebhookDeliveryStatus = (typeof WEBHOOK_DELIVERY_STATUSES)[number];
58
58
  * Variantengruppe wie `getVariantGroup`; `updated` kommt nur bei einer aussen
59
59
  * sichtbaren Aenderung (neuer Wert, neue oder stillgelegte Variante, Name,
60
60
  * Vorgaben, Stilllegen der Gruppe).
61
+ * `receipt.created` und `receipt.cancelled` (Beleg-Webhooks, Server 2026-11) tragen den Beleg wie
62
+ * `listReceipts` mit `view: 'full'` ([RECEIPT_WEBHOOK_EVENTS]); sie brauchen das Modul Registrierkasse, nicht
63
+ * das Lager (sonst `webhook_event_not_available` beim Anlegen oder Aendern).
61
64
  */
62
- export declare const INVENTORY_WEBHOOK_EVENTS: readonly ["stock.changed", "stock.below_minimum", "article.created", "article.updated", "article.deactivated", "reservation.expired", "reservation.released", "reservation.redeemed", "variant_group.created", "variant_group.updated"];
65
+ export declare const INVENTORY_WEBHOOK_EVENTS: readonly ["stock.changed", "stock.below_minimum", "article.created", "article.updated", "article.deactivated", "reservation.expired", "reservation.released", "reservation.redeemed", "variant_group.created", "variant_group.updated", "receipt.created", "receipt.cancelled"];
63
66
  export type InventoryWebhookEventType = (typeof INVENTORY_WEBHOOK_EVENTS)[number];
67
+ /**
68
+ * Die Beleg-Ereignisse der Konto-Webhooks: `receipt.created` fuer jeden neu signierten Beleg jeder Art (auch den
69
+ * Storno-Beleg), `receipt.cancelled` zusaetzlich fuer jeden Storno-Beleg. Ein Storno bringt also beide. Die
70
+ * Ereignis-ID ist je Beleg und Ereignis fest: darauf entdoppeln. Fehlt eine fortlaufende Belegnummer einer Kasse,
71
+ * den Zeitraum mit `listReceipts` nachholen.
72
+ */
73
+ export declare const RECEIPT_WEBHOOK_EVENTS: readonly ["receipt.created", "receipt.cancelled"];
74
+ export type ReceiptWebhookEventType = (typeof RECEIPT_WEBHOOK_EVENTS)[number];
64
75
  /**
65
76
  * Die Felder der Huelle jeder Zustellung, in der Reihenfolge am Draht. Statt
66
77
  * `partnerId` (Partner-Webhooks) traegt sie `accountId`; `test` steht nur auf
@@ -117,7 +128,7 @@ export declare const INVENTORY_LIST_LIMIT_MAX = 200;
117
128
  * `stocktake_not_closed` (das Protokoll gibt es erst nach dem Abschluss, auch
118
129
  * nicht fuer eine abgebrochene Inventur).
119
130
  */
120
- export declare const INVENTORY_ERROR_CODES: readonly ["validation", "invalid_cursor", "article_not_found", "webhook_not_found", "webhook_limit", "invalid_webhook_url", "event_not_subscribed", "webhook_inactive", "inventory_api_not_enabled", "module_inactive", "rate_limited", "server_error", "idempotency_key_required", "idempotency_conflict", "location_not_found", "location_inactive", "invalid_location", "invalid_locations", "invalid_transfer", "operation_not_found", "already_reversed", "reversal_not_possible", "reversal_not_supported", "exceeds_stock", "no_positions", "too_many_positions", "invalid_step", "invalid_quantity", "invalid_amount", "invalid_price", "negative_value", "invalid_reason", "note_required", "withdrawal_type_required", "invalid_method", "invalid_stock_kind", "invalid_minimum", "invalid_dimensions", "weight_missing", "invalid_landed_cost", "invalid_distribution", "landed_costs_mismatch", "return_totals_mismatch", "lot_not_found", "invalid_serial", "serial_required", "serial_not_allowed", "serial_already_exists", "serial_not_in_stock", "code_taken", "external_id_taken", "group_not_found", "revenue_group_not_found", "stock_kind_locked", "article_inactive", "invalid_position", "invalid_condition", "reason_required", "insufficient_available", "reservation_not_found", "reservation_not_active", "variant_group_not_found", "variant_already_exists", "invalid_variant_attributes", "variant_group_inactive", "variant_limit", "stocktake_not_found", "stocktake_not_open", "stocktake_closed", "stocktake_not_in_review", "stocktake_closing", "stocktake_location_busy", "stocktake_review_running", "stocktake_recount_open", "article_not_in_scope", "article_not_tracked", "count_not_found", "count_already_voided", "serial_already_counted", "too_many_counts", "stocktake_not_closed"];
131
+ export declare const INVENTORY_ERROR_CODES: readonly ["validation", "invalid_cursor", "article_not_found", "webhook_not_found", "webhook_limit", "invalid_webhook_url", "event_not_subscribed", "webhook_inactive", "inventory_api_not_enabled", "module_inactive", "rate_limited", "server_error", "webhook_event_not_available", "idempotency_key_required", "idempotency_conflict", "location_not_found", "location_inactive", "invalid_location", "invalid_locations", "invalid_transfer", "operation_not_found", "already_reversed", "reversal_not_possible", "reversal_not_supported", "exceeds_stock", "no_positions", "too_many_positions", "invalid_step", "invalid_quantity", "invalid_amount", "invalid_price", "negative_value", "invalid_reason", "note_required", "withdrawal_type_required", "invalid_method", "invalid_stock_kind", "invalid_minimum", "invalid_dimensions", "weight_missing", "invalid_landed_cost", "invalid_distribution", "landed_costs_mismatch", "return_totals_mismatch", "lot_not_found", "invalid_serial", "serial_required", "serial_not_allowed", "serial_already_exists", "serial_not_in_stock", "code_taken", "external_id_taken", "group_not_found", "revenue_group_not_found", "stock_kind_locked", "article_inactive", "invalid_position", "invalid_condition", "reason_required", "insufficient_available", "reservation_not_found", "reservation_not_active", "variant_group_not_found", "variant_already_exists", "invalid_variant_attributes", "variant_group_inactive", "variant_limit", "stocktake_not_found", "stocktake_not_open", "stocktake_closed", "stocktake_not_in_review", "stocktake_closing", "stocktake_location_busy", "stocktake_review_running", "stocktake_recount_open", "article_not_in_scope", "article_not_tracked", "count_not_found", "count_already_voided", "serial_already_counted", "too_many_counts", "stocktake_not_closed"];
121
132
  export type InventoryErrorCode = (typeof INVENTORY_ERROR_CODES)[number];
122
133
  /**
123
134
  * Codes, die Anmeldung und Rand auf jedem Lager-Aufruf erzeugen koennen,
@@ -136,6 +136,9 @@ export const WEBHOOK_DELIVERY_STATUSES = ['delivered', 'pending', 'failed', 'dro
136
136
  * Variantengruppe wie `getVariantGroup`; `updated` kommt nur bei einer aussen
137
137
  * sichtbaren Aenderung (neuer Wert, neue oder stillgelegte Variante, Name,
138
138
  * Vorgaben, Stilllegen der Gruppe).
139
+ * `receipt.created` und `receipt.cancelled` (Beleg-Webhooks, Server 2026-11) tragen den Beleg wie
140
+ * `listReceipts` mit `view: 'full'` ([RECEIPT_WEBHOOK_EVENTS]); sie brauchen das Modul Registrierkasse, nicht
141
+ * das Lager (sonst `webhook_event_not_available` beim Anlegen oder Aendern).
139
142
  */
140
143
  export const INVENTORY_WEBHOOK_EVENTS = [
141
144
  'stock.changed',
@@ -148,7 +151,16 @@ export const INVENTORY_WEBHOOK_EVENTS = [
148
151
  'reservation.redeemed',
149
152
  'variant_group.created',
150
153
  'variant_group.updated',
154
+ 'receipt.created',
155
+ 'receipt.cancelled',
151
156
  ];
157
+ /**
158
+ * Die Beleg-Ereignisse der Konto-Webhooks: `receipt.created` fuer jeden neu signierten Beleg jeder Art (auch den
159
+ * Storno-Beleg), `receipt.cancelled` zusaetzlich fuer jeden Storno-Beleg. Ein Storno bringt also beide. Die
160
+ * Ereignis-ID ist je Beleg und Ereignis fest: darauf entdoppeln. Fehlt eine fortlaufende Belegnummer einer Kasse,
161
+ * den Zeitraum mit `listReceipts` nachholen.
162
+ */
163
+ export const RECEIPT_WEBHOOK_EVENTS = ['receipt.created', 'receipt.cancelled'];
152
164
  /**
153
165
  * Die Felder der Huelle jeder Zustellung, in der Reihenfolge am Draht. Statt
154
166
  * `partnerId` (Partner-Webhooks) traegt sie `accountId`; `test` steht nur auf
@@ -218,6 +230,9 @@ export const INVENTORY_ERROR_CODES = [
218
230
  'module_inactive',
219
231
  'rate_limited',
220
232
  'server_error',
233
+ // Seit Beleg-Webhooks (Server 2026-11, Stelle wie im Vertrag): ein Ereignis, dessen Modul dem Konto fehlt
234
+ // (`receipt.*` ohne Registrierkasse, `stock.*` u. a. ohne Lager), laesst sich nicht abonnieren; mit `field: 'events'`.
235
+ 'webhook_event_not_available',
221
236
  'idempotency_key_required',
222
237
  'idempotency_conflict',
223
238
  'location_not_found',
@@ -46,6 +46,9 @@ export declare function verifyInventoryWebhookSignature(secret: string | readonl
46
46
  * - `variant_group.created|updated` tragen die Gruppe wie `getVariantGroup`
47
47
  * (seit 1.6.0). Zwei Zustellungen koennen sich ueberholen: den Stand nur
48
48
  * uebernehmen, wenn `data.updatedAt` neuer ist als der gespeicherte.
49
+ * - `receipt.created|cancelled` (Beleg-Webhooks) tragen den Beleg wie
50
+ * `listReceipts` mit `view: 'full'` ([ReceiptCreatedEventData],
51
+ * [ReceiptCancelledEventData]).
49
52
  * - Ein Rumpf, der keine Huelle ist, oder eine Bruchzahl in einer Menge wirft
50
53
  * `KasseneckValidationError` (`scope: 'response'`).
51
54
  *