@kreiseck/kasseneck-api 1.30.0 → 1.32.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 (150) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/cjs/client/aufrufe.d.ts +3 -3
  3. package/dist/cjs/client/aufrufe.js +8 -0
  4. package/dist/cjs/client/receipts.d.ts +11 -0
  5. package/dist/cjs/client/receipts.js +14 -0
  6. package/dist/cjs/index.d.ts +2 -2
  7. package/dist/cjs/index.js +10 -5
  8. package/dist/cjs/models/index.d.ts +2 -2
  9. package/dist/cjs/models/index.js +7 -2
  10. package/dist/cjs/models/receipt-errors.d.ts +1 -1
  11. package/dist/cjs/models/receipt-errors.js +9 -0
  12. package/dist/cjs/models/receipt-item.d.ts +44 -2
  13. package/dist/cjs/models/receipt-item.js +56 -1
  14. package/dist/cjs/models/receipt.d.ts +17 -0
  15. package/dist/cjs/models/receipt.js +9 -0
  16. package/dist/cjs/models/voucher.d.ts +18 -0
  17. package/dist/cjs/models/voucher.js +32 -1
  18. package/dist/cjs/pos/artikel.d.ts +26 -0
  19. package/dist/cjs/pos/artikel.js +5 -0
  20. package/dist/cjs/pos/client.d.ts +1 -0
  21. package/dist/cjs/pos/client.js +14 -0
  22. package/dist/cjs/pos/errors.d.ts +1 -1
  23. package/dist/cjs/pos/errors.js +13 -0
  24. package/dist/cjs/pos/fremdgutschein-artikel.d.ts +66 -0
  25. package/dist/cjs/pos/fremdgutschein-artikel.js +74 -0
  26. package/dist/cjs/pos/index.d.ts +9 -4
  27. package/dist/cjs/pos/index.js +62 -4
  28. package/dist/cjs/pos/leergut.d.ts +60 -0
  29. package/dist/cjs/pos/leergut.js +82 -0
  30. package/dist/cjs/pos/pfand.d.ts +144 -0
  31. package/dist/cjs/pos/pfand.js +382 -0
  32. package/dist/cjs/pos/rabatt-vorlagen.d.ts +79 -0
  33. package/dist/cjs/pos/rabatt-vorlagen.js +156 -0
  34. package/dist/cjs/pos/schicht-lesen.js +8 -0
  35. package/dist/cjs/pos/schicht-typen.d.ts +15 -0
  36. package/dist/cjs/pos/settings.d.ts +72 -10
  37. package/dist/cjs/pos/settings.js +79 -5
  38. package/dist/cjs/pos/texte.d.ts +283 -0
  39. package/dist/cjs/pos/texte.js +163 -1
  40. package/dist/cjs/pos/zusaetze.d.ts +3 -3
  41. package/dist/cjs/pos/zusaetze.js +4 -2
  42. package/dist/cjs/receipt/discount.js +3 -0
  43. package/dist/cjs/receipt/due.d.ts +6 -0
  44. package/dist/cjs/receipt/due.js +16 -5
  45. package/dist/cjs/receipt/gutschein-plan.d.ts +7 -1
  46. package/dist/cjs/receipt/gutschein-plan.js +16 -2
  47. package/dist/cjs/receipt/layout.js +108 -2
  48. package/dist/cjs/receipt/shift-sheet.js +8 -0
  49. package/dist/cjs/register/pairing.d.ts +15 -1
  50. package/dist/cjs/register/pairing.js +14 -1
  51. package/dist/cjs/stored/draht.js +1 -0
  52. package/dist/cjs/stored/einstellungen.js +50 -2
  53. package/dist/cjs/stored/vokabular.d.ts +1 -1
  54. package/dist/cjs/stored/vokabular.js +107 -5
  55. package/dist/cjs/version.d.ts +1 -1
  56. package/dist/cjs/version.js +1 -1
  57. package/dist/esm/client/aufrufe.d.ts +3 -3
  58. package/dist/esm/client/aufrufe.js +8 -0
  59. package/dist/esm/client/receipts.d.ts +11 -0
  60. package/dist/esm/client/receipts.js +14 -0
  61. package/dist/esm/index.d.ts +2 -2
  62. package/dist/esm/index.js +2 -2
  63. package/dist/esm/models/index.d.ts +2 -2
  64. package/dist/esm/models/index.js +2 -2
  65. package/dist/esm/models/receipt-errors.d.ts +1 -1
  66. package/dist/esm/models/receipt-errors.js +9 -0
  67. package/dist/esm/models/receipt-item.d.ts +44 -2
  68. package/dist/esm/models/receipt-item.js +54 -1
  69. package/dist/esm/models/receipt.d.ts +17 -0
  70. package/dist/esm/models/receipt.js +9 -0
  71. package/dist/esm/models/voucher.d.ts +18 -0
  72. package/dist/esm/models/voucher.js +30 -0
  73. package/dist/esm/pos/artikel.d.ts +26 -0
  74. package/dist/esm/pos/artikel.js +5 -0
  75. package/dist/esm/pos/client.d.ts +1 -0
  76. package/dist/esm/pos/client.js +15 -1
  77. package/dist/esm/pos/errors.d.ts +1 -1
  78. package/dist/esm/pos/errors.js +13 -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/index.d.ts +9 -4
  82. package/dist/esm/pos/index.js +10 -4
  83. package/dist/esm/pos/leergut.d.ts +60 -0
  84. package/dist/esm/pos/leergut.js +77 -0
  85. package/dist/esm/pos/pfand.d.ts +144 -0
  86. package/dist/esm/pos/pfand.js +371 -0
  87. package/dist/esm/pos/rabatt-vorlagen.d.ts +79 -0
  88. package/dist/esm/pos/rabatt-vorlagen.js +148 -0
  89. package/dist/esm/pos/schicht-lesen.js +8 -0
  90. package/dist/esm/pos/schicht-typen.d.ts +15 -0
  91. package/dist/esm/pos/settings.d.ts +72 -10
  92. package/dist/esm/pos/settings.js +74 -4
  93. package/dist/esm/pos/texte.d.ts +283 -0
  94. package/dist/esm/pos/texte.js +160 -0
  95. package/dist/esm/pos/zusaetze.d.ts +3 -3
  96. package/dist/esm/pos/zusaetze.js +4 -2
  97. package/dist/esm/receipt/discount.js +4 -1
  98. package/dist/esm/receipt/due.d.ts +6 -0
  99. package/dist/esm/receipt/due.js +17 -6
  100. package/dist/esm/receipt/gutschein-plan.d.ts +7 -1
  101. package/dist/esm/receipt/gutschein-plan.js +14 -2
  102. package/dist/esm/receipt/layout.js +109 -3
  103. package/dist/esm/receipt/shift-sheet.js +8 -0
  104. package/dist/esm/register/pairing.d.ts +15 -1
  105. package/dist/esm/register/pairing.js +13 -1
  106. package/dist/esm/stored/draht.js +1 -0
  107. package/dist/esm/stored/einstellungen.js +52 -4
  108. package/dist/esm/stored/vokabular.d.ts +1 -1
  109. package/dist/esm/stored/vokabular.js +107 -5
  110. package/dist/esm/version.d.ts +1 -1
  111. package/dist/esm/version.js +1 -1
  112. package/fixtures/add-on-cases.json +6 -4
  113. package/fixtures/deposit-cases.json +4758 -0
  114. package/fixtures/discount-preset-cases.json +1074 -0
  115. package/fixtures/expected/deposit-return.grid32.txt +28 -0
  116. package/fixtures/expected/deposit-return.grid48.txt +28 -0
  117. package/fixtures/expected/deposit-return.lines.json +275 -0
  118. package/fixtures/expected/deposit-return.sheet32.json +194 -0
  119. package/fixtures/expected/deposit-return.sheet48.json +194 -0
  120. package/fixtures/expected/deposit.grid32.txt +34 -0
  121. package/fixtures/expected/deposit.grid48.txt +32 -0
  122. package/fixtures/expected/deposit.lines.json +316 -0
  123. package/fixtures/expected/deposit.sheet32.json +230 -0
  124. package/fixtures/expected/deposit.sheet48.json +218 -0
  125. package/fixtures/external-voucher-article-cases.json +311 -0
  126. package/fixtures/hobex-hps-codes.json +1 -1
  127. package/fixtures/invoice-api.schema.json +1 -1
  128. package/fixtures/invoice-texts.json +1 -1
  129. package/fixtures/manifest.json +16 -0
  130. package/fixtures/pos-texts.json +266 -1
  131. package/fixtures/receipt-due-voucher-generated.json +1 -1
  132. package/fixtures/receipts/deposit-return.json +63 -0
  133. package/fixtures/receipts/deposit.json +83 -0
  134. package/fixtures/renames-1.0.json +18 -0
  135. package/fixtures/return-code-cases.json +1338 -0
  136. package/fixtures/surface.json +92 -7
  137. package/fixtures/v3/antworten/belege.json +2 -2
  138. package/fixtures/v3/antworten/belegmail.json +2 -2
  139. package/fixtures/v3/antworten/berichte.json +2 -2
  140. package/fixtures/v3/antworten/kasse-belege.json +2 -2
  141. package/fixtures/v3/antworten/kasse.json +428 -13
  142. package/fixtures/v3/antworten/lager.json +1 -1
  143. package/fixtures/v3/antworten/rechnungen.json +2 -2
  144. package/fixtures/v3/antworten/storno.json +2 -2
  145. package/fixtures/v3/stored/belege.json +2 -2
  146. package/fixtures/v3/stored/kasse.json +42 -4
  147. package/fixtures/v3/stored/rechnungen.json +2 -2
  148. package/fixtures/v3/v3-vokabular.json +898 -31
  149. package/fixtures/v3/zahlbetrag-faelle.json +187 -3
  150. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,39 @@ Was vor 0.7.0 geschah, steht in der Commit-Historie (`git log`); ab hier wird
4
4
  es hier geführt. Ein Eintrag nennt die Änderung **und ihren Grund** —
5
5
  nur der Grund überlebt den nächsten Umbau.
6
6
 
7
+ ## 1.32.0 - unveröffentlicht
8
+
9
+ Deposit and returnable empties at the till (backend November 2026): the server adds the deposit lines, the till previews them, takes empties back, and the bon prints them. Additive; articles, groups, settings and receipts without the new fields read, send and print exactly as before (all existing goldens unchanged).
10
+
11
+ - **Receipt lines** `ReceiptItem.kind` `'deposit'` / `'deposit_return'` (stored `pfand` / `pfand_rueckgabe`), with `depositTypeId` (`pfandartId`), `depositFor` (`pfandZu`), `depositKind` (`pfandArt`, `single_use | reusable` from `einweg | mehrweg`), `perUnit` (`jeStueck`), `gtin`, `ean`, `ownFilling` (`eigen`), `codes`; `isDepositItem`, `isDepositReturnItem`. A deposit line sent with an `articleId` is refused (`invalid_deposit`); a deposit without `articleId` and a return line are allowed. Read deposit lines carry `perUnit` and `depositKind`, which the server sets: do not send them back as a wish to `createReceipt`. Reason: the deposit belongs to the article and the server books it; the till only shows it.
12
+ - **Create options** `autoDeposits?` and `onPremises?` (booleans, sent only when given). Receipt level `Receipt.onPremises` (`vorOrt`) and `Receipt.sharedReturnPoint` `{ name, address }` (`pfandStelle`).
13
+ - **Deposit data** (`./pos`): lists and types `DEPOSIT_KINDS` / `DepositKind` (`single_use | reusable`), `DEPOSIT_TYPES` / `DepositContainerType`, `DEPOSIT_RETURN_MODES` / `DepositReturnMode`, `DEPOSIT_ON_PREMISES_DEFAULTS` / `DepositOnPremisesDefault`; types `DepositAmount`, `DepositType`, `DepositSettings`, `DepositEntry`, `DepositSharedReturnPoint`, `CashRegisterDeposit`; readers `posDepositSettingsFromWire`, `depositEntriesFromWire`, `cashRegisterDepositFromWire`. `PosArticle.deposits` and `ArticleGroup.deposits` (`DepositEntry[] | null`, always set by the reader), `PosSettings.deposit` (absent without block), `cashregister.deposit` from `listRegisterUsersForDevice`. Permission `RegisterUserPerms.depositReturn` and `depositReturnOf(perms)` (root and `./pos`; missing = allowed, only an explicit `false` blocks).
14
+ - **Preview like the server** (`./pos`): `depositsFor(article, group)` (article before group, `[]` = no deposit, external voucher articles none), `depositAmountOn(type, day)`, `viennaDay(nowMs)`, `withDepositLines(items, input)` (same floating-point steps as the server; result `DepositPreviewResult`: `{ ok: true, items }` or `{ ok: false, code }` with `DepositPreviewErrorCode`), `depositReturnLine(type, quantity, options)`; types `DepositPreviewInput`, `DepositPreviewItem`, `DepositPreviewLine`, `DepositPreviewArticle`. Cases `fixtures/deposit-cases.json`: byte for byte the backend's `deposit-cases.json`.
15
+ - **Return codes** (`./pos`): `learnReturnCode(transport, { gtin, depositTypeId })` (`learnMyLeergutCode`), `listReturnCodes(transport)` (`listMyLeergutCodes`), `matchReturnCode(code, input)` -> `ReturnCodeMatch` (`{ entries: ReturnCodeEntry[] }` or `{ unknown: true }`) with `ReturnCodeInput` (`articles: ReturnCodeArticle[]`, `groups: ReturnCodeGroup[]`, learned `ReturnCode[]`, deposit types); order: learned, GTIN at a deposit entry, article `ean`/`number`/`internalCode`, else unknown. Cases `fixtures/return-code-cases.json` belong to this package (invented, check-digit-correct GTINs).
16
+ - **Till calls:** `learnMyLeergutCode` and `listMyLeergutCodes` join `ALL_CALLS` and `POS_CALLS` (the till way only, for register users with the permission `depositReturn`); `learnMyLeergutCode` is in `UNKNOWN_OUTCOME_CALLS`, `listMyLeergutCodes` is read-only in `CALLS_WITHOUT_EFFECT`.
17
+ - **Amount due:** `receiptDueCents` / `receiptDueBreakdown` keep deposit and empties out of discount and voucher cover, put them unreduced into the bucket of their rate (single-use at 0 % = zero) after the promo step; `distributeDiscount` skips them; vouchers never cover deposit or return lines. `ReceiptDueBreakdown.payout?: 'deposit'` marks a pure empties payout. Reason: deposit is a pass-through, no discount base and no voucher currency.
18
+ - **Bon:** deposit as a sub line (` + `) below its item and add-ons, empties as an own line with a negative amount, line „Pfand, nicht steuerbar“ below the tax table (only with single-use at 0 %), footer „Leergut-Rückgabe: <name>, <address>“, a pure empties receipt titled „Leergut-Rückgabe“ and „Bar ausgezahlt“. New goldens `deposit` and `deposit-return`.
19
+ - **Errors:** `RECEIPT_ERROR_CODES` gains `deposit_not_enabled`, `deposit_return_not_offered`, `deposit_set_by_server`, `deposit_type_not_found`, `deposit_type_not_issued`, `invalid_deposit`, `invalid_deposit_quantity`, `invalid_item_kind`; `POS_ERROR_CODES` gains `deposit_follows_item`, `deposit_not_enabled`, `deposit_return_not_offered`, `deposit_set_by_server`, `deposit_type_in_use`, `deposit_type_not_found`, `deposit_type_not_issued`, `filler_role_required`, `invalid_deposit`, `invalid_deposit_quantity`, `invalid_item_kind`, `too_many_deposit_types`. `deposit_follows_item` (cancellation) is not in `CANCELLATION_ERROR_CODES`, yet `depositErrorMessage` knows it. Stored vocabulary `deposit`/`deposit_return`, `single_use`/`reusable` and the field names above in `./stored`.
20
+ - **Texts:** `DEPOSIT_ERROR_MESSAGES` (code -> message key) / `depositErrorMessage(code)` (returns the message key, `undefined` for any other code; resolve it with `messageText`; eight codes, short sentences without legal language; also `depositErrors` in `pos-texts.json`), message `deposit.changed`, labels `deposit.return`, `.payout`, `.offset`, `.unknown_code`, `.over_usual`, `.on_premises`, `.takeaway`, `.sum`.
21
+ - Contract `v3` re-fetched (deposit blocks, fields, catalogs and codes), `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json` and `hobex-hps-codes.json` regenerated for the version.
22
+
23
+ ## 1.31.0 - unveröffentlicht
24
+
25
+ External vouchers at the till: a tile sells an external voucher, the payment screen redeems one through the same code field, the payout sheet switches between own and external, the cancellation flow warns. Additive; articles, groups and receipts without the new field read, print and send exactly as before (all existing goldens unchanged).
26
+
27
+ - **`PosArticle.externalVoucher`** (`'multi_purpose' | 'single_purpose' | null`, type `ArticleExternalVoucher`, stored `fremdgutschein` = `mehrzweck | einzweck`): the article is a tile for an external voucher. The till asks for the voucher number (and the amount without a price) and sends a `vouchers[]` entry `{ source: 'external', action: 'sell', type, number, amountCents, vatRateBp? }` instead of an item. The reader always sets it; an unknown value becomes `null` (as on the server's `/v3` edge, also in `./stored`). Reason: a business with its own voucher system sells its vouchers at the till; the tile replaces typing the kind every time.
28
+ - **Article rules** `checkExternalVoucherArticle` / `checkExternalVoucherValue`, twin of the backend's `fremdgutschein-artikel-core` (`pruefeArtikel`/`pruefeWert`): reasons `EXTERNAL_VOUCHER_ARTICLE_REASONS` in the server's order (`invalid_type`, `service_voucher`, `add_ons`, `stock_tracked`, `reference`, `asks_quantity`, `rate_required`, `invalid_rate`, `price_required`) – the `data.grund` of `article_external_voucher_invalid` (`ARTICLE_EXTERNAL_VOUCHER_INVALID`). Single-purpose needs a rate of the till (`ARTICLE_EXTERNAL_VOUCHER_VAT_RATES`, percent: 20, 13, 10, 4.9, 0, 19; 0 = sold exempt). Contract cases `fixtures/external-voucher-article-cases.json`, byte for byte the backend's `fremdgutschein-artikel-faelle.json` (for the article editor of the customer area and the Dart package). Saving articles stays in the customer area (`createMyArticle`/`updateMyArticle` with the inner name, no `/v3` edge); the inventory API `createArticle`/`updateArticle` does not carry the field, the server refuses it there.
29
+ - **Tile lock** `externalVoucherTileBlock(article, externalVouchers)`: `not_enabled` (release `off` or unknown) or `type_not_enabled` (single-purpose without `all`), the same rule the server applies to the receipt; sentences in `EXTERNAL_VOUCHER_TILE_MESSAGES`.
30
+ - **Own code look-alikes** `ownVoucherCodeShape(text)` -> `'valid' | 'checksum' | 'length' | 'none'` (`OWN_VOUCHER_CODE_SHAPES`, type `OwnVoucherCodeShape`, root and `./pos`): read like `checkExternalVoucherNumber` (edge trimmed, `.`, `_`, `/` as `-`, then the normalisation of `VoucherCode`). `checksum` = 12 characters of the code alphabet with a wrong check symbol, `length` = pattern `4-4-x` with real hyphens (never `.`, `_`, `/`: `WEIN.2026/7` asks nothing) but not 12 characters. Reason: a twelve-digit web shop number looks like an own code; the till asks („Sieht aus wie ein Kasseneck-Code, ist aber keiner. Als fremden Gutschein verwenden?“, `external_voucher.looks_like_own_code`, button `external_voucher.use_as_external`) instead of refusing it. Only `valid` is refused by the server (`external_voucher_number_is_own_code`).
31
+ - **Add-on tiles:** `isSelectableAddOn` gains the reason `external_voucher` (`ADD_ON_BLOCK_REASONS`): an external voucher article is never an add-on (it would be booked as a normal line). `fixtures/add-on-cases.json` re-copied from the backend's `zusatz-faelle.json` (article `fremd`).
32
+ - **Texts:** messages `external_voucher.not_enabled`, `external_voucher.type_not_enabled`, `external_voucher.looks_like_own_code`, `cancellation.external_voucher_check`, `settings.external_vouchers_hint`, `external_voucher_article.*` (one per reason plus `invalid`, mapped in `EXTERNAL_VOUCHER_ARTICLE_MESSAGES`, `externalVoucherArticleErrorMessage(code, reason)`); labels `external_voucher.number`, `.title`, `.kind`, `.kind_value`, `.kind_service`, `.rate`, `.taxed_with`, `.line_name`, `.use_as_external`, `voucher.payout_source_own`, `voucher.payout_source_external`, `settings.external_vouchers` with its three stages (`EXTERNAL_VOUCHERS_LABELS`), `article.external_voucher`; kind labels in `EXTERNAL_VOUCHER_KIND_LABELS`. Amount and reason reuse `tile_prompt.amount`, `voucher.amount` and `voucher.reason`. `fixtures/pos-texts.json` carries the four new mappings.
33
+ - **Tip kept in three modes:** optional `business.tipKeptMode` (`ask | always | never`, `TIP_KEPT_MODE`, type `PosTipKeptMode`, stored `tgDirektModus` = `fragen | immer | nie`; in `POS_BUSINESS_OPTIONAL_CHOICES`, missing or unknown = `ask`). `posTipKeptMode(business)` and the one rule for both tills `tipKeptFor(business, wanted?)` -> `{ showSwitch, kept }` (`TipKeptDecision`): `ask` shows the switch, preset `tipKeptByDefault`, a switch choice wins; `always`/`never` show no switch and keep / leave open. `kept` goes to the receipt as before (the server does not enforce the mode). Labels `tip_kept_mode.title`, `.always`, `.never`, `.ask` (`TIP_KEPT_MODE_LABELS`, also in `pos-texts.json` as `tipKeptModeLabels`), messages `tip.kept_hint` and `tip.open_hint` (the hints both tills had hard-coded). `stored-backend` now compares settings through `mischeBetrieb`/`mischeGeraet`, the merge `getKasseSettings` actually uses.
34
+ - **Discount presets (named discount chips):** optional `business.discountPresets` (`PosDiscountPreset` = `{ name, kind: 'percent' | 'amount', percentBp?, amountCents? }`, kinds in `DISCOUNT_PRESET_KIND`, type `PosDiscountPresetKind`; stored `rabattVorlagen` with `art` = `prozent | betrag`, `prozentBp`, `betragCents`; listed in `POS_BUSINESS_OPTIONAL_LISTS`). Present (even empty) the presets are the source of the chips and `discountChips` mirrors their percentages for older tills (`discountChipsFromPresets`: percentages in order, equal values once, amounts dropped); missing = `discountChips` as before. The reader keeps the entries that have the shape of a preset and drops a preset with an unknown kind. `posDiscountPresets(business)` is the effective list (stored presets, else the chips as unnamed percent presets), `discountPresetChipText(preset)` the chip text (`Stammkunde 5,00 €`, `Mitarbeiter-Rabatt 20 %`, `10,5 %`). `checkDiscountPresets(list)` -> `{ ok, value } | { ok: false, code: 'invalid_discount_preset', errors: [{ index, field, reason, message }] }` is the server's rule (at most 5, name 1-24 characters after trimming without control characters, unique ignoring case, percent 0.1-100 in steps of 0.1, amount 0.01-1,000,000.00 EUR, only the value field of the kind); `setMyPosSettings` runs it before sending. Error code `invalid_discount_preset` in `POS_ERROR_CODES`. `./stored` reads the stored list like the server (an invalid list is missing without a note, English kind or field names are unknown inside) and lets the chips follow the presets.
35
+ - **Discounts on the shift bon:** `ShiftRunningTotals.discounts` and `ShiftSummaryReceipt.discounts` (`ShiftDiscount` = `{ name, cents, count }`, display only, sent from the first discount on). `shiftReceiptLayout` prints the block `Rabatte` after the non-cash lines (`<name> (n×)`, the amount negative, from two entries on `Rabatte gesamt`, an empty name reads `Rabatt`, a name with amount 0 (fully cancelled) is left out like in the server's list; `discountBlockLines`); without discounts the bon is byte for byte the same. Cases `fixtures/discount-preset-cases.json` (effective list, chip text, mirror, check, bon block) are the backend's `discount-preset-cases.json`, byte for byte.
36
+ - **Texts:** labels `discount_presets.*` (title, name, percent, amount, add, remove, limit), `shift_receipt.discounts`, `.discounts_total`, `.discount_line`, `.discount_unnamed`; messages `discount_preset.*` (one per reason, `DISCOUNT_PRESET_MESSAGES`) and `discount.preset_over_total` (an amount chip above the discountable total).
37
+ - **Custom discount at the till:** optional `business.customDiscountAllowed` (boolean, stored `rabattFrei`; in `POS_BUSINESS_OPTIONAL_FIELDS`, sent only when stored, missing = `true`). `false` = the till offers only the discount chips, no free amount or percent field; `posCustomDiscountAllowed(business)` (`./pos`) returns the effective value. UI only, the server does not check receipts against it (older tills do not know the switch).
38
+ - Contract `v3` re-fetched (`externalVoucher` on articles, catalog `ARTIKEL_FREMDGUTSCHEIN`, `business.tipKeptMode`, `business.discountPresets`, `business.customDiscountAllowed`), `receipt-due-voucher-generated.json` re-generated (only `_source` changed), stored twin hashes re-pinned against the backend.
39
+
7
40
  ## 1.30.0 - 2026-11-07
8
41
 
9
42
  External vouchers and receipt webhooks (backend November 2026). Additive; receipts, requests and settings without the new fields read, send and print exactly as before (all existing goldens unchanged, the generated voucher due cases byte for byte the same).
@@ -13,7 +13,7 @@
13
13
  * umhuellt, muss ihn weiterhin absetzen koennen.
14
14
  */
15
15
  import type { FileOrData, FileOrDataCallOptions, PdfOrData, TransportBodyFields, TransportCallOptions } from './transport.js';
16
- export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady"];
16
+ export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady"];
17
17
  export type ApiCall = typeof ALL_CALLS[number];
18
18
  /**
19
19
  * Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
@@ -29,7 +29,7 @@ export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "can
29
29
  * die fuenf DEP-Aufrufe); die Kasse ruft sie trotzdem ueber diesen Weg (ein Dialekt
30
30
  * je Client, Nachtrag §5.2).
31
31
  */
32
- export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState"];
32
+ export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes"];
33
33
  export type PublicCall = typeof PUBLIC_CALLS[number];
34
34
  export type PosCall = typeof POS_CALLS[number];
35
35
  /**
@@ -50,7 +50,7 @@ export type PosCall = typeof POS_CALLS[number];
50
50
  * [ALL_CALLS], [PUBLIC_CALLS] und [POS_CALLS] steht entweder hier oder in
51
51
  * [CALLS_WITHOUT_EFFECT] (Waechter `test/ausgang-einordnung.test.ts`).
52
52
  */
53
- export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "getTerminalCode", "hobexPayApi", "hobexRefundApi", "issueInvoice", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyShiftCount", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "registerTerminalDevice", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
53
+ export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "getTerminalCode", "hobexPayApi", "hobexRefundApi", "issueInvoice", "learnMyLeergutCode", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyShiftCount", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "registerTerminalDevice", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
54
54
  /** Warum ein Aufruf keine Wirkung hat, die ein Zeitlimit offen lassen koennte. */
55
55
  export type CallWithoutEffectReason = 'read' | 'repeatable';
56
56
  /**
@@ -157,6 +157,9 @@ exports.ALL_CALLS = [
157
157
  'getRegisterInspectionInfo',
158
158
  // Connect-Bestand (./pos): welche Connect-Version an welchem Kassengeraet laeuft; nur ueber den Kassenweg.
159
159
  'reportConnectState',
160
+ // Leergut-Codes (Pfand, ./pos): Codes lernen und lesen; nur ueber den Kassenweg.
161
+ 'learnMyLeergutCode',
162
+ 'listMyLeergutCodes',
160
163
  // Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
161
164
  'registerTerminalDevice',
162
165
  'getTerminalAccess',
@@ -370,6 +373,9 @@ exports.POS_CALLS = [
370
373
  'getRegisterInspectionInfo',
371
374
  // Connect-Bestand: nur ueber den Kassenweg, jeder Kassen-Benutzer.
372
375
  'reportConnectState',
376
+ // Leergut-Codes lernen und lesen: Kassen-Benutzer mit dem Recht depositReturn.
377
+ 'learnMyLeergutCode',
378
+ 'listMyLeergutCodes',
373
379
  ];
374
380
  /**
375
381
  * Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
@@ -421,6 +427,7 @@ exports.UNKNOWN_OUTCOME_CALLS = [
421
427
  'hobexPayApi',
422
428
  'hobexRefundApi',
423
429
  'issueInvoice',
430
+ 'learnMyLeergutCode',
424
431
  'logMyDrawerOpenings',
425
432
  'logReceiptOutputs',
426
433
  'openMyShift',
@@ -503,6 +510,7 @@ exports.CALLS_WITHOUT_EFFECT = Object.freeze({
503
510
  generateFullReceiptId: 'read',
504
511
  getCashregisterReport: 'read',
505
512
  getArticle: 'read',
513
+ listMyLeergutCodes: 'read',
506
514
  getCustomer: 'read',
507
515
  getCustomerCredentials: 'read',
508
516
  getCustomerSignatureStatus: 'read',
@@ -66,6 +66,17 @@ export interface ReceiptCommonOptions {
66
66
  * Hauptlade der Kasse. Leer oder kein Text: wirft vor dem Senden.
67
67
  */
68
68
  drawerId?: string;
69
+ /**
70
+ * Pfand & Leergut: der Server setzt die Pfandzeilen aus den Artikeln (`deposits`) selbst und rechnet den Betrag.
71
+ * Ohne Angabe gilt die Vorgabe des Servers (an, solange der Betrieb Pfand eingeschaltet hat). Mit `false` setzt er
72
+ * keine; ausdrueckliche Zeilen `deposit` ohne `articleId` und `deposit_return` bleiben erlaubt.
73
+ */
74
+ autoDeposits?: boolean;
75
+ /**
76
+ * Pfand & Leergut: der Verkauf wird vor Ort verzehrt (`true`) oder mitgenommen (`false`). Ohne Angabe gilt die
77
+ * Vorgabe der Kasse (`CashRegisterDeposit.onPremisesDefault`). Nur ein Wahrheitswert; anderes wirft vor dem Senden.
78
+ */
79
+ onPremises?: boolean;
69
80
  /**
70
81
  * Schutz vor einem zweiten Beleg, wenn die Antwort verloren geht (Netzabbruch,
71
82
  * Zeitablauf, `outcome: 'unknown'`). Gilt je Kasse: dieselbe Anfrage mit
@@ -120,6 +120,16 @@ function createReceiptParams(options) {
120
120
  if (items?.some((item) => item.kind === 'voucher' || item.kind === 'voucher_float') ?? false) {
121
121
  throw eingabefehler('voucher_invalid: Gutschein-Positionen (kind voucher, voucher_float) setzt nur der Server.');
122
122
  }
123
+ // Pfandzeilen setzt der Server aus den Artikeln: eine Zeile `deposit` mit `articleId` waere doppelt gemeint.
124
+ if (items?.some((item) => item.kind === 'deposit' && item.articleId != null && item.articleId !== '') ?? false) {
125
+ throw eingabefehler('invalid_deposit: Eine Pfandzeile (kind deposit) traegt keine articleId; der Server setzt sie aus dem Artikel (autoDeposits).');
126
+ }
127
+ for (const feld of ['autoDeposits', 'onPremises']) {
128
+ const wert = options[feld];
129
+ if (wert !== undefined && typeof wert !== 'boolean') {
130
+ throw eingabefehler(`${feld} muss true oder false sein (oder weglassen).`);
131
+ }
132
+ }
123
133
  if (typ.needsItems) {
124
134
  // Ein reiner Gutscheinverkauf ist ein Umsatz ohne Positionen, deshalb
125
135
  // zaehlt er hier wie eine Position (wie im Flutter-Vorbild).
@@ -212,6 +222,10 @@ function createReceiptParams(options) {
212
222
  if (options.idempotencyKey != null) {
213
223
  params['idempotencyKey'] = belegSchluessel(options.idempotencyKey);
214
224
  }
225
+ if (options.autoDeposits !== undefined)
226
+ params['autoDeposits'] = options.autoDeposits;
227
+ if (options.onPremises !== undefined)
228
+ params['onPremises'] = options.onPremises;
215
229
  return params;
216
230
  }
217
231
  /** Hoechstlaenge des `idempotencyKey` am Beleg, wie am Server (beleg-idempotenz-core `SCHLUESSEL_MAX`). */
@@ -1,6 +1,6 @@
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 VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, 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';
2
+ export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, 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';
6
- export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, } from './pos/index.js';
6
+ export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, } from './pos/index.js';
package/dist/cjs/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
4
- exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = void 0;
5
- exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = void 0;
6
- exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = void 0;
7
- exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = void 0;
3
+ exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isDepositReturnItem = exports.isDepositItem = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
4
+ exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = void 0;
5
+ exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = void 0;
6
+ exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = void 0;
7
+ exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = void 0;
8
8
  var index_js_1 = require("./enums/index.js");
9
9
  Object.defineProperty(exports, "ReceiptType", { enumerable: true, get: function () { return index_js_1.ReceiptType; } });
10
10
  Object.defineProperty(exports, "VatRate", { enumerable: true, get: function () { return index_js_1.VatRate; } });
@@ -22,6 +22,8 @@ Object.defineProperty(exports, "negateReceiptItem", { enumerable: true, get: fun
22
22
  Object.defineProperty(exports, "isTipItem", { enumerable: true, get: function () { return index_js_2.isTipItem; } });
23
23
  Object.defineProperty(exports, "isVoucherItem", { enumerable: true, get: function () { return index_js_2.isVoucherItem; } });
24
24
  Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: function () { return index_js_2.isVoucherFloatItem; } });
25
+ Object.defineProperty(exports, "isDepositItem", { enumerable: true, get: function () { return index_js_2.isDepositItem; } });
26
+ Object.defineProperty(exports, "isDepositReturnItem", { enumerable: true, get: function () { return index_js_2.isDepositReturnItem; } });
25
27
  Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return index_js_2.toVoucherPayload; } });
26
28
  Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return index_js_2.fromVoucherPayload; } });
27
29
  Object.defineProperty(exports, "voucherIsValid", { enumerable: true, get: function () { return index_js_2.voucherIsValid; } });
@@ -30,6 +32,8 @@ Object.defineProperty(exports, "isExternalVoucher", { enumerable: true, get: fun
30
32
  Object.defineProperty(exports, "externalVoucherIsValid", { enumerable: true, get: function () { return index_js_2.externalVoucherIsValid; } });
31
33
  Object.defineProperty(exports, "normalizeExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.normalizeExternalVoucherNumber; } });
32
34
  Object.defineProperty(exports, "checkExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.checkExternalVoucherNumber; } });
35
+ Object.defineProperty(exports, "ownVoucherCodeShape", { enumerable: true, get: function () { return index_js_2.ownVoucherCodeShape; } });
36
+ Object.defineProperty(exports, "OWN_VOUCHER_CODE_SHAPES", { enumerable: true, get: function () { return index_js_2.OWN_VOUCHER_CODE_SHAPES; } });
33
37
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_NUMBER_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_NUMBER_MAX; } });
34
38
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_TAXED_WITH_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_TAXED_WITH_MAX; } });
35
39
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_VAT_RATES_BP", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_VAT_RATES_BP; } });
@@ -221,3 +225,4 @@ Object.defineProperty(exports, "cancelScopeOf", { enumerable: true, get: functio
221
225
  Object.defineProperty(exports, "receiptsScopeOf", { enumerable: true, get: function () { return index_js_4.receiptsScopeOf; } });
222
226
  Object.defineProperty(exports, "stockViewOf", { enumerable: true, get: function () { return index_js_4.stockViewOf; } });
223
227
  Object.defineProperty(exports, "voucherPermsOf", { enumerable: true, get: function () { return index_js_4.voucherPermsOf; } });
228
+ Object.defineProperty(exports, "depositReturnOf", { enumerable: true, get: function () { return index_js_4.depositReturnOf; } });
@@ -1,5 +1,5 @@
1
- export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isDiscountItem, isVoucherItem, isVoucherFloatItem, } from './receipt-item.js';
2
- export { type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, isNewFormVoucher, voucherServerFields, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, } from './voucher.js';
1
+ export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isDiscountItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, } from './receipt-item.js';
2
+ export { type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, isNewFormVoucher, voucherServerFields, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, } from './voucher.js';
3
3
  export { type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, readRegistrationInfo, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, } from './receipt.js';
4
4
  export { 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, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, } from './cancellation.js';
5
5
  export { type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, } from './receipt-payment.js';
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.readRegistrationInfo = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherServerFields = exports.isNewFormVoucher = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isDiscountItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = void 0;
4
- exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isManualReceiptErrorCode = exports.MANUAL_RECEIPT_ERROR_CODES = exports.readManualReceipt = exports.MANUAL_RECEIPT_REASONS = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = void 0;
3
+ exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.readRegistrationInfo = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherServerFields = exports.isNewFormVoucher = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isDepositReturnItem = exports.isDepositItem = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isDiscountItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = void 0;
4
+ exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isManualReceiptErrorCode = exports.MANUAL_RECEIPT_ERROR_CODES = exports.readManualReceipt = exports.MANUAL_RECEIPT_REASONS = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.asksRefundTip = void 0;
5
+ exports.hobexReceiptNeedsSignature = void 0;
5
6
  var receipt_item_js_1 = require("./receipt-item.js");
6
7
  Object.defineProperty(exports, "toReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.toReceiptItemPayload; } });
7
8
  Object.defineProperty(exports, "fromReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.fromReceiptItemPayload; } });
@@ -12,6 +13,8 @@ Object.defineProperty(exports, "isTipItem", { enumerable: true, get: function ()
12
13
  Object.defineProperty(exports, "isDiscountItem", { enumerable: true, get: function () { return receipt_item_js_1.isDiscountItem; } });
13
14
  Object.defineProperty(exports, "isVoucherItem", { enumerable: true, get: function () { return receipt_item_js_1.isVoucherItem; } });
14
15
  Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: function () { return receipt_item_js_1.isVoucherFloatItem; } });
16
+ Object.defineProperty(exports, "isDepositItem", { enumerable: true, get: function () { return receipt_item_js_1.isDepositItem; } });
17
+ Object.defineProperty(exports, "isDepositReturnItem", { enumerable: true, get: function () { return receipt_item_js_1.isDepositReturnItem; } });
15
18
  var voucher_js_1 = require("./voucher.js");
16
19
  Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return voucher_js_1.toVoucherPayload; } });
17
20
  Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return voucher_js_1.fromVoucherPayload; } });
@@ -23,6 +26,8 @@ Object.defineProperty(exports, "isExternalVoucher", { enumerable: true, get: fun
23
26
  Object.defineProperty(exports, "externalVoucherIsValid", { enumerable: true, get: function () { return voucher_js_1.externalVoucherIsValid; } });
24
27
  Object.defineProperty(exports, "normalizeExternalVoucherNumber", { enumerable: true, get: function () { return voucher_js_1.normalizeExternalVoucherNumber; } });
25
28
  Object.defineProperty(exports, "checkExternalVoucherNumber", { enumerable: true, get: function () { return voucher_js_1.checkExternalVoucherNumber; } });
29
+ Object.defineProperty(exports, "ownVoucherCodeShape", { enumerable: true, get: function () { return voucher_js_1.ownVoucherCodeShape; } });
30
+ Object.defineProperty(exports, "OWN_VOUCHER_CODE_SHAPES", { enumerable: true, get: function () { return voucher_js_1.OWN_VOUCHER_CODE_SHAPES; } });
26
31
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_NUMBER_MAX", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_NUMBER_MAX; } });
27
32
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_TAXED_WITH_MAX", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_TAXED_WITH_MAX; } });
28
33
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_VAT_RATES_BP", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_VAT_RATES_BP; } });
@@ -18,7 +18,7 @@ import { KasseneckApiError } from '../client/errors.js';
18
18
  * ...) stehen in [PAYMENT_ERROR_CODES]. Ein Code ausserhalb bleibt ueber
19
19
  * `KasseneckApiError.code` lesbar.
20
20
  */
21
- export declare const RECEIPT_ERROR_CODES: readonly ["cancellation_reference_unavailable", "cashregister_closed", "cashregister_decommissioned", "final_receipt_expired", "final_receipt_not_allowed", "idempotency_conflict", "invalid_add_on_reference", "module_inactive", "not_permitted", "receipt_limit_exceeded", "receipt_not_found", "receipt_outcome_unknown", "receipt_type_invalid", "server_error", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "voucher_balance_changed", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing", "response_unreadable"];
21
+ export declare const RECEIPT_ERROR_CODES: readonly ["cancellation_reference_unavailable", "cashregister_closed", "cashregister_decommissioned", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_not_found", "deposit_type_not_issued", "final_receipt_expired", "final_receipt_not_allowed", "idempotency_conflict", "invalid_add_on_reference", "invalid_deposit", "invalid_deposit_quantity", "invalid_item_kind", "module_inactive", "not_permitted", "receipt_limit_exceeded", "receipt_not_found", "receipt_outcome_unknown", "receipt_type_invalid", "server_error", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "voucher_balance_changed", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing", "response_unreadable"];
22
22
  export type ReceiptErrorCode = (typeof RECEIPT_ERROR_CODES)[number];
23
23
  export declare function isReceiptErrorCode(value: unknown): value is ReceiptErrorCode;
24
24
  /** Der Code eines geworfenen Fehlers, wenn er in [RECEIPT_ERROR_CODES] steht; sonst `undefined`. */
@@ -29,6 +29,12 @@ exports.RECEIPT_ERROR_CODES = Object.freeze([
29
29
  'cancellation_reference_unavailable',
30
30
  'cashregister_closed',
31
31
  'cashregister_decommissioned',
32
+ // Seit Pfand & Leergut Teil 2: Pfandzeilen an createReceipt (Antworten des Servers, errorCodes.registerHandlersByEndpoint).
33
+ 'deposit_not_enabled',
34
+ 'deposit_return_not_offered',
35
+ 'deposit_set_by_server',
36
+ 'deposit_type_not_found',
37
+ 'deposit_type_not_issued',
32
38
  'final_receipt_expired',
33
39
  'final_receipt_not_allowed',
34
40
  // Seit 1.15.0 (Vertrag): derselbe idempotencyKey mit anderem Inhalt, nichts geschrieben. Seit 1.22.0 sendet
@@ -36,6 +42,9 @@ exports.RECEIPT_ERROR_CODES = Object.freeze([
36
42
  'idempotency_conflict',
37
43
  // Seit 1.27.0 (Zusatz-Kacheln): addOnOf zeigt nicht nach vorne auf eine Warenposition, die selbst kein Zusatz ist.
38
44
  'invalid_add_on_reference',
45
+ 'invalid_deposit',
46
+ 'invalid_deposit_quantity',
47
+ 'invalid_item_kind',
39
48
  'module_inactive',
40
49
  'not_permitted',
41
50
  'receipt_limit_exceeded',
@@ -36,7 +36,7 @@ export interface ReceiptItem {
36
36
  * negative Entgeltminderungen je Steuersatz; die Kennzeichnung steuert nur
37
37
  * die Bon-Darstellung (Summenzeile mit Aufteilung), nie die Beträge.
38
38
  */
39
- kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float';
39
+ kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return';
40
40
  /** Empfaenger der Trinkgeld-Position; `null` = nicht zugeordnet. */
41
41
  recipient?: TipRecipient | null;
42
42
  /** Zahlart der Trinkgeld-Position (kann von der des Belegs abweichen). */
@@ -67,7 +67,31 @@ export interface ReceiptItem {
67
67
  * Warenposition, die selbst kein Zusatz ist (`invalid_add_on_reference`).
68
68
  */
69
69
  addOnOf?: number;
70
+ /**
71
+ * Pfand & Leergut: Pfandart (Kennung aus `getKasseSettings` `deposit.depositTypes[].id`); nur an
72
+ * `deposit`- und `deposit_return`-Zeilen. Der Server setzt Pfandzeilen aus den Artikeln und rechnet
73
+ * den Betrag selbst; bei einer ausdruecklichen Zeile des Aufrufers (ohne `articleId`) prueft er sie.
74
+ */
75
+ depositTypeId?: string;
76
+ /** Index der Warenposition im selben Beleg, zu der die Pfandzeile gehoert (nur `deposit`). */
77
+ depositFor?: number;
78
+ /** Art der Pfandart zum Belegzeitpunkt: Einweg oder Mehrweg. */
79
+ depositKind?: 'single_use' | 'reusable';
80
+ /** Pfand je Stueck in Cent bei einer Pfandzeile; der Zeilenpreis ist Menge mal dieser Betrag. */
81
+ perUnit?: number;
82
+ /** Strichcode des Gebindes (GTIN), falls bekannt. */
83
+ gtin?: string;
84
+ /** Strichcode des Artikels (EAN), falls bekannt. */
85
+ ean?: string;
86
+ /** Das Gebinde wurde im Betrieb selbst befuellt (eigene Abfuellung). */
87
+ ownFilling?: boolean;
88
+ /** Gelernte Leergut-Codes der Zeile (Code -> Menge); nur an `deposit_return`. */
89
+ codes?: Record<string, number>;
70
90
  }
91
+ /** Pfandzeile (Pfand zum Verkauf)? Die eine Erkennungsstelle — niemand prueft `kind` selbst. */
92
+ export declare function isDepositItem(item: ReceiptItem | ReceiptItemPayloadRead): boolean;
93
+ /** Leergutzeile (Ruecknahme, negativer Betrag)? */
94
+ export declare function isDepositReturnItem(item: ReceiptItem | ReceiptItemPayloadRead): boolean;
71
95
  /** Empfaenger einer Trinkgeld-Position (Kassen-Benutzer, Snapshot des Namens). */
72
96
  export interface TipRecipient {
73
97
  registerUserId: string;
@@ -97,7 +121,7 @@ export interface ReceiptItemPayload {
97
121
  unitPriceCents: number;
98
122
  vatRate: number;
99
123
  /** Trinkgeld-/Rabatt-/Gutschein-Kennzeichnung, siehe [ReceiptItem.kind]. */
100
- kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float';
124
+ kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return';
101
125
  recipient?: TipRecipient | null;
102
126
  paymentMethod?: string;
103
127
  receivedImmediately?: boolean;
@@ -107,6 +131,15 @@ export interface ReceiptItemPayload {
107
131
  articleId?: string;
108
132
  /** Hauptposition eines Zusatzes, siehe [ReceiptItem.addOnOf]. */
109
133
  addOnOf?: number;
134
+ /** Pfandzeile, siehe [ReceiptItem.depositTypeId] und die folgenden Felder. */
135
+ depositTypeId?: string;
136
+ depositFor?: number;
137
+ depositKind?: 'single_use' | 'reusable';
138
+ perUnit?: number;
139
+ gtin?: string;
140
+ ean?: string;
141
+ ownFilling?: boolean;
142
+ codes?: Record<string, number>;
110
143
  }
111
144
  /**
112
145
  * Nutzlast-Form, die dieses Paket **liest** — v2 und v1 nebeneinander, alles
@@ -154,6 +187,15 @@ export interface ReceiptItemPayloadRead {
154
187
  returnDisposition?: string | null;
155
188
  /** Hauptposition eines Zusatzes, siehe [ReceiptItem.addOnOf]. */
156
189
  addOnOf?: number | null;
190
+ /** Pfandzeile, siehe [ReceiptItem.depositTypeId] und die folgenden Felder. */
191
+ depositTypeId?: string | null;
192
+ depositFor?: number | null;
193
+ depositKind?: string | null;
194
+ perUnit?: number | null;
195
+ gtin?: string | null;
196
+ ean?: string | null;
197
+ ownFilling?: boolean | null;
198
+ codes?: Record<string, number> | null;
157
199
  }
158
200
  export declare function toReceiptItemPayload(item: ReceiptItem): ReceiptItemPayload;
159
201
  /**
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDepositItem = isDepositItem;
4
+ exports.isDepositReturnItem = isDepositReturnItem;
3
5
  exports.isTipItem = isTipItem;
4
6
  exports.isDiscountItem = isDiscountItem;
5
7
  exports.isVoucherItem = isVoucherItem;
@@ -12,6 +14,14 @@ exports.negateReceiptItem = negateReceiptItem;
12
14
  const index_js_1 = require("../enums/index.js");
13
15
  const enum_payload_js_1 = require("./enum-payload.js");
14
16
  const cancellation_js_1 = require("./cancellation.js");
17
+ /** Pfandzeile (Pfand zum Verkauf)? Die eine Erkennungsstelle — niemand prueft `kind` selbst. */
18
+ function isDepositItem(item) {
19
+ return item != null && item.kind === 'deposit';
20
+ }
21
+ /** Leergutzeile (Ruecknahme, negativer Betrag)? */
22
+ function isDepositReturnItem(item) {
23
+ return item != null && item.kind === 'deposit_return';
24
+ }
15
25
  /** Trinkgeld-Position? Die eine Erkennungsstelle — niemand prueft `kind` selbst. */
16
26
  function isTipItem(item) {
17
27
  return item != null && item.kind === 'tip';
@@ -65,6 +75,28 @@ function toReceiptItemPayload(item) {
65
75
  // (createReceipt weist sie als voucher_invalid ab).
66
76
  if (item.kind === 'voucher' || item.kind === 'voucher_float')
67
77
  nutzlast.kind = item.kind;
78
+ // Pfand & Leergut: Kennzeichen und Felder reisen mit (Cache schreibt gelesene Belege wieder; ein Wunsch an
79
+ // den Server traegt `deposit` nie mit `articleId`, siehe createReceiptParams).
80
+ if (item.kind === 'deposit' || item.kind === 'deposit_return') {
81
+ nutzlast.kind = item.kind;
82
+ if (typeof item.depositTypeId === 'string' && item.depositTypeId !== '')
83
+ nutzlast.depositTypeId = item.depositTypeId;
84
+ if (istIndex(item.depositFor))
85
+ nutzlast.depositFor = item.depositFor;
86
+ if (item.depositKind === 'single_use' || item.depositKind === 'reusable')
87
+ nutzlast.depositKind = item.depositKind;
88
+ if (typeof item.perUnit === 'number' && Number.isFinite(item.perUnit))
89
+ nutzlast.perUnit = item.perUnit;
90
+ if (typeof item.gtin === 'string' && item.gtin !== '')
91
+ nutzlast.gtin = item.gtin;
92
+ if (typeof item.ean === 'string' && item.ean !== '')
93
+ nutzlast.ean = item.ean;
94
+ if (typeof item.ownFilling === 'boolean')
95
+ nutzlast.ownFilling = item.ownFilling;
96
+ const codes = leergutCodes(item.codes);
97
+ if (codes != null)
98
+ nutzlast.codes = codes;
99
+ }
68
100
  // Artikel-Verweis reist mit (Erloesgruppen im Bericht); leere Werte nicht.
69
101
  if (item.articleId != null && item.articleId !== '')
70
102
  nutzlast.articleId = item.articleId;
@@ -114,7 +146,19 @@ function fromReceiptItemPayload(payload) {
114
146
  ? { kind: 'discount' }
115
147
  : payload.kind === 'voucher' || payload.kind === 'voucher_float'
116
148
  ? { kind: payload.kind }
117
- : {}),
149
+ : payload.kind === 'deposit' || payload.kind === 'deposit_return'
150
+ ? {
151
+ kind: payload.kind,
152
+ ...(typeof payload.depositTypeId === 'string' && payload.depositTypeId !== '' ? { depositTypeId: payload.depositTypeId } : {}),
153
+ ...(istIndex(payload.depositFor) ? { depositFor: payload.depositFor } : {}),
154
+ ...(payload.depositKind === 'single_use' || payload.depositKind === 'reusable' ? { depositKind: payload.depositKind } : {}),
155
+ ...(typeof payload.perUnit === 'number' && Number.isFinite(payload.perUnit) ? { perUnit: payload.perUnit } : {}),
156
+ ...(typeof payload.gtin === 'string' && payload.gtin !== '' ? { gtin: payload.gtin } : {}),
157
+ ...(typeof payload.ean === 'string' && payload.ean !== '' ? { ean: payload.ean } : {}),
158
+ ...(typeof payload.ownFilling === 'boolean' ? { ownFilling: payload.ownFilling } : {}),
159
+ ...(leergutCodes(payload.codes) != null ? { codes: leergutCodes(payload.codes) } : {}),
160
+ }
161
+ : {}),
118
162
  // Artikel-Verweis erhalten (Storno-Spiegelung schreibt ihn wieder mit).
119
163
  ...(typeof payload.articleId === 'string' && payload.articleId !== '' ? { articleId: payload.articleId } : {}),
120
164
  // Lager: Bezug und Rueckgabe-Wahl einer Storno-Zeile (nur gelesen; ein
@@ -125,6 +169,17 @@ function fromReceiptItemPayload(payload) {
125
169
  ...(istIndex(payload.addOnOf) ? { addOnOf: payload.addOnOf } : {}),
126
170
  };
127
171
  }
172
+ /** Gelernte Codes (Code -> ganze Menge >= 1); ohne brauchbaren Eintrag `undefined`. */
173
+ function leergutCodes(wert) {
174
+ if (wert === null || typeof wert !== 'object' || Array.isArray(wert))
175
+ return undefined;
176
+ const raus = {};
177
+ for (const [code, menge] of Object.entries(wert)) {
178
+ if (code !== '' && Number.isInteger(menge) && menge >= 1)
179
+ raus[code] = menge;
180
+ }
181
+ return Object.keys(raus).length > 0 ? raus : undefined;
182
+ }
128
183
  function istIndex(wert) {
129
184
  return Number.isInteger(wert) && wert >= 0;
130
185
  }
@@ -79,6 +79,18 @@ export interface Receipt {
79
79
  registrationInfo?: RegistrationInfo;
80
80
  /** Nur an nacherfassten Belegen: der Handbeleg (siehe [ManualReceipt]). */
81
81
  manualReceipt?: ManualReceipt;
82
+ /** Pfand & Leergut: der Kunde trinkt/verzehrt vor Ort (gespeichert `vorOrt`); nur ein Wahrheitswert. */
83
+ onPremises?: boolean;
84
+ /**
85
+ * Gemeinsame Ruecknahmestelle fuer Leergut (gespeichert `pfandStelle`); der Server stempelt sie nur, wenn die
86
+ * Kasse `returns: 'shared'` hat und der Beleg Pfand traegt. Der Bon druckt daraus die Fusszeile.
87
+ */
88
+ sharedReturnPoint?: SharedReturnPoint;
89
+ }
90
+ /** Gemeinsame Ruecknahmestelle fuer Leergut (Name und Anschrift, wie der Server sie am Beleg stempelt). */
91
+ export interface SharedReturnPoint {
92
+ name: string;
93
+ address: string;
82
94
  }
83
95
  /** Registrierdaten von Signaturkarte und Kasse (Zeitstempel oder `null`, wenn unbekannt). */
84
96
  export interface RegistrationInfo {
@@ -131,6 +143,11 @@ export interface ReceiptPayloadRead extends Omit<ReceiptPayload, 'items' | 'vouc
131
143
  cashregisterRegisteredAt?: string | null;
132
144
  } | null;
133
145
  manualReceipt?: unknown;
146
+ onPremises?: boolean | null;
147
+ sharedReturnPoint?: {
148
+ name?: string | null;
149
+ address?: string | null;
150
+ } | null;
134
151
  }
135
152
  /**
136
153
  * Schreibt die Nutzlast in der **neuen** Form — sie **normalisiert, statt zu