@kreiseck/kasseneck-api 1.37.0 → 1.39.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 (185) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +19 -1
  3. package/dist/cjs/client/aufrufe.d.ts +2 -2
  4. package/dist/cjs/client/aufrufe.js +12 -0
  5. package/dist/cjs/index.d.ts +1 -1
  6. package/dist/cjs/index.js +6 -5
  7. package/dist/cjs/invoice/texte.d.ts +18 -1
  8. package/dist/cjs/invoice/texte.js +43 -2
  9. package/dist/cjs/invoice/vertrag.d.ts +1 -1
  10. package/dist/cjs/invoice/vertrag.js +1 -0
  11. package/dist/cjs/models/cancellation.d.ts +1 -1
  12. package/dist/cjs/models/cancellation.js +2 -0
  13. package/dist/cjs/models/index.d.ts +2 -1
  14. package/dist/cjs/models/index.js +6 -3
  15. package/dist/cjs/models/invoice-payment-ref.d.ts +42 -0
  16. package/dist/cjs/models/invoice-payment-ref.js +38 -0
  17. package/dist/cjs/models/receipt-item.d.ts +10 -2
  18. package/dist/cjs/models/receipt-item.js +14 -1
  19. package/dist/cjs/models/receipt.d.ts +7 -0
  20. package/dist/cjs/models/receipt.js +6 -0
  21. package/dist/cjs/payments/hobex-hps/connect-client.d.ts +17 -0
  22. package/dist/cjs/payments/hobex-hps/connect-client.js +17 -0
  23. package/dist/cjs/payments/hobex-hps/index.d.ts +1 -1
  24. package/dist/cjs/payments/index.d.ts +1 -1
  25. package/dist/cjs/pos/client.js +2 -1
  26. package/dist/cjs/pos/index.d.ts +1 -1
  27. package/dist/cjs/pos/index.js +7 -5
  28. package/dist/cjs/pos/schicht-lesen.js +5 -0
  29. package/dist/cjs/pos/schicht-typen.d.ts +11 -0
  30. package/dist/cjs/pos/settings.d.ts +14 -1
  31. package/dist/cjs/pos/settings.js +16 -2
  32. package/dist/cjs/pos/texte.d.ts +400 -2
  33. package/dist/cjs/pos/texte.js +152 -3
  34. package/dist/cjs/receipt/index.d.ts +1 -0
  35. package/dist/cjs/receipt/index.js +4 -2
  36. package/dist/cjs/receipt/layout.d.ts +2 -2
  37. package/dist/cjs/receipt/layout.js +106 -117
  38. package/dist/cjs/receipt/shift-sheet.js +6 -1
  39. package/dist/cjs/receipt/vermerke.d.ts +80 -0
  40. package/dist/cjs/receipt/vermerke.js +167 -0
  41. package/dist/cjs/register/errors.d.ts +1 -1
  42. package/dist/cjs/register/errors.js +4 -0
  43. package/dist/cjs/register/index.d.ts +1 -1
  44. package/dist/cjs/register/index.js +3 -1
  45. package/dist/cjs/register/pairing.d.ts +51 -0
  46. package/dist/cjs/register/pairing.js +59 -0
  47. package/dist/cjs/stored/draht.js +25 -1
  48. package/dist/cjs/stored/einstellungen.js +5 -2
  49. package/dist/cjs/stored/vokabular.d.ts +1 -1
  50. package/dist/cjs/stored/vokabular.js +22 -2
  51. package/dist/cjs/version.d.ts +1 -1
  52. package/dist/cjs/version.js +1 -1
  53. package/dist/esm/client/aufrufe.d.ts +2 -2
  54. package/dist/esm/client/aufrufe.js +12 -0
  55. package/dist/esm/index.d.ts +1 -1
  56. package/dist/esm/index.js +1 -1
  57. package/dist/esm/invoice/texte.d.ts +18 -1
  58. package/dist/esm/invoice/texte.js +43 -2
  59. package/dist/esm/invoice/vertrag.d.ts +1 -1
  60. package/dist/esm/invoice/vertrag.js +1 -0
  61. package/dist/esm/models/cancellation.d.ts +1 -1
  62. package/dist/esm/models/cancellation.js +2 -0
  63. package/dist/esm/models/index.d.ts +2 -1
  64. package/dist/esm/models/index.js +2 -1
  65. package/dist/esm/models/invoice-payment-ref.d.ts +42 -0
  66. package/dist/esm/models/invoice-payment-ref.js +35 -0
  67. package/dist/esm/models/receipt-item.d.ts +10 -2
  68. package/dist/esm/models/receipt-item.js +13 -1
  69. package/dist/esm/models/receipt.d.ts +7 -0
  70. package/dist/esm/models/receipt.js +6 -0
  71. package/dist/esm/payments/hobex-hps/connect-client.d.ts +17 -0
  72. package/dist/esm/payments/hobex-hps/connect-client.js +17 -0
  73. package/dist/esm/payments/hobex-hps/index.d.ts +1 -1
  74. package/dist/esm/payments/index.d.ts +1 -1
  75. package/dist/esm/pos/client.js +3 -2
  76. package/dist/esm/pos/index.d.ts +1 -1
  77. package/dist/esm/pos/index.js +1 -1
  78. package/dist/esm/pos/schicht-lesen.js +5 -0
  79. package/dist/esm/pos/schicht-typen.d.ts +11 -0
  80. package/dist/esm/pos/settings.d.ts +14 -1
  81. package/dist/esm/pos/settings.js +14 -1
  82. package/dist/esm/pos/texte.d.ts +400 -2
  83. package/dist/esm/pos/texte.js +152 -3
  84. package/dist/esm/receipt/index.d.ts +1 -0
  85. package/dist/esm/receipt/index.js +1 -0
  86. package/dist/esm/receipt/layout.d.ts +2 -2
  87. package/dist/esm/receipt/layout.js +103 -113
  88. package/dist/esm/receipt/shift-sheet.js +6 -1
  89. package/dist/esm/receipt/vermerke.d.ts +80 -0
  90. package/dist/esm/receipt/vermerke.js +155 -0
  91. package/dist/esm/register/errors.d.ts +1 -1
  92. package/dist/esm/register/errors.js +4 -0
  93. package/dist/esm/register/index.d.ts +1 -1
  94. package/dist/esm/register/index.js +1 -1
  95. package/dist/esm/register/pairing.d.ts +51 -0
  96. package/dist/esm/register/pairing.js +57 -0
  97. package/dist/esm/stored/draht.js +25 -1
  98. package/dist/esm/stored/einstellungen.js +6 -3
  99. package/dist/esm/stored/vokabular.d.ts +1 -1
  100. package/dist/esm/stored/vokabular.js +22 -2
  101. package/dist/esm/version.d.ts +1 -1
  102. package/dist/esm/version.js +1 -1
  103. package/fixtures/expected/invoice-payment-cancellation.grid32.txt +28 -0
  104. package/fixtures/expected/invoice-payment-cancellation.grid48.txt +26 -0
  105. package/fixtures/expected/invoice-payment-cancellation.lines.json +189 -0
  106. package/fixtures/expected/invoice-payment-cancellation.sheet32.json +194 -0
  107. package/fixtures/expected/invoice-payment-cancellation.sheet48.json +182 -0
  108. package/fixtures/expected/invoice-payment-manual-receipt.grid32.txt +30 -0
  109. package/fixtures/expected/invoice-payment-manual-receipt.grid48.txt +29 -0
  110. package/fixtures/expected/invoice-payment-manual-receipt.lines.json +199 -0
  111. package/fixtures/expected/invoice-payment-manual-receipt.sheet32.json +206 -0
  112. package/fixtures/expected/invoice-payment-manual-receipt.sheet48.json +200 -0
  113. package/fixtures/expected/invoice-payment-normal.grid32.txt +22 -0
  114. package/fixtures/expected/invoice-payment-normal.grid48.txt +21 -0
  115. package/fixtures/expected/invoice-payment-normal.lines.json +192 -0
  116. package/fixtures/expected/invoice-payment-normal.sheet32.json +158 -0
  117. package/fixtures/expected/invoice-payment-normal.sheet48.json +152 -0
  118. package/fixtures/expected/invoice-payment-outage.grid32.txt +23 -0
  119. package/fixtures/expected/invoice-payment-outage.grid48.txt +21 -0
  120. package/fixtures/expected/invoice-payment-outage.lines.json +172 -0
  121. package/fixtures/expected/invoice-payment-outage.sheet32.json +164 -0
  122. package/fixtures/expected/invoice-payment-outage.sheet48.json +152 -0
  123. package/fixtures/expected/invoice-payment-partial.grid32.txt +20 -0
  124. package/fixtures/expected/invoice-payment-partial.grid48.txt +20 -0
  125. package/fixtures/expected/invoice-payment-partial.lines.json +162 -0
  126. package/fixtures/expected/invoice-payment-partial.sheet32.json +146 -0
  127. package/fixtures/expected/invoice-payment-partial.sheet48.json +146 -0
  128. package/fixtures/expected/invoice-payment-refund.grid32.txt +20 -0
  129. package/fixtures/expected/invoice-payment-refund.grid48.txt +20 -0
  130. package/fixtures/expected/invoice-payment-refund.lines.json +162 -0
  131. package/fixtures/expected/invoice-payment-refund.sheet32.json +146 -0
  132. package/fixtures/expected/invoice-payment-refund.sheet48.json +146 -0
  133. package/fixtures/expected/invoice-payment-see-invoice.grid32.txt +22 -0
  134. package/fixtures/expected/invoice-payment-see-invoice.grid48.txt +21 -0
  135. package/fixtures/expected/invoice-payment-see-invoice.lines.json +192 -0
  136. package/fixtures/expected/invoice-payment-see-invoice.sheet32.json +158 -0
  137. package/fixtures/expected/invoice-payment-see-invoice.sheet48.json +152 -0
  138. package/fixtures/expected/invoice-payment-training.grid32.txt +30 -0
  139. package/fixtures/expected/invoice-payment-training.grid48.txt +27 -0
  140. package/fixtures/expected/invoice-payment-training.lines.json +183 -0
  141. package/fixtures/expected/invoice-payment-training.sheet32.json +206 -0
  142. package/fixtures/expected/invoice-payment-training.sheet48.json +188 -0
  143. package/fixtures/expected/invoice-payment-without-vat.grid32.txt +20 -0
  144. package/fixtures/expected/invoice-payment-without-vat.grid48.txt +19 -0
  145. package/fixtures/expected/invoice-payment-without-vat.lines.json +162 -0
  146. package/fixtures/expected/invoice-payment-without-vat.sheet32.json +146 -0
  147. package/fixtures/expected/invoice-payment-without-vat.sheet48.json +140 -0
  148. package/fixtures/expected/invoice-payment-zero-percent.grid32.txt +22 -0
  149. package/fixtures/expected/invoice-payment-zero-percent.grid48.txt +21 -0
  150. package/fixtures/expected/invoice-payment-zero-percent.lines.json +192 -0
  151. package/fixtures/expected/invoice-payment-zero-percent.sheet32.json +158 -0
  152. package/fixtures/expected/invoice-payment-zero-percent.sheet48.json +152 -0
  153. package/fixtures/hobex-hps-codes.json +1 -1
  154. package/fixtures/invoice-api.schema.json +3 -2
  155. package/fixtures/invoice-texts.json +37 -3
  156. package/fixtures/manifest.json +80 -0
  157. package/fixtures/pos-message-cases.json +3 -0
  158. package/fixtures/pos-texts.json +458 -1
  159. package/fixtures/receipt-due-generated.json +3 -3
  160. package/fixtures/receipt-due-voucher-generated.json +5 -5
  161. package/fixtures/receipts/invoice-payment-cancellation.json +70 -0
  162. package/fixtures/receipts/invoice-payment-manual-receipt.json +69 -0
  163. package/fixtures/receipts/invoice-payment-normal.json +65 -0
  164. package/fixtures/receipts/invoice-payment-outage.json +63 -0
  165. package/fixtures/receipts/invoice-payment-partial.json +63 -0
  166. package/fixtures/receipts/invoice-payment-refund.json +63 -0
  167. package/fixtures/receipts/invoice-payment-see-invoice.json +65 -0
  168. package/fixtures/receipts/invoice-payment-training.json +63 -0
  169. package/fixtures/receipts/invoice-payment-without-vat.json +63 -0
  170. package/fixtures/receipts/invoice-payment-zero-percent.json +65 -0
  171. package/fixtures/surface.json +16 -4
  172. package/fixtures/v3/antworten/belege.json +2 -2
  173. package/fixtures/v3/antworten/belegmail.json +2 -2
  174. package/fixtures/v3/antworten/berichte.json +2 -2
  175. package/fixtures/v3/antworten/kasse-belege.json +2 -2
  176. package/fixtures/v3/antworten/kasse.json +702 -127
  177. package/fixtures/v3/antworten/lager.json +1 -1
  178. package/fixtures/v3/antworten/rechnungen.json +2 -2
  179. package/fixtures/v3/antworten/storno.json +2 -2
  180. package/fixtures/v3/stored/belege.json +2 -2
  181. package/fixtures/v3/stored/kasse.json +210 -4
  182. package/fixtures/v3/stored/rechnungen.json +2 -2
  183. package/fixtures/v3/v3-vokabular.json +237 -20
  184. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  185. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,7 +4,45 @@ 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.37.0 - unveröffentlicht
7
+ ## 1.39.0 - 2026-11-14
8
+
9
+ Texts for the device operation of both registers (printer, paper, terminal, lock screen), an address callback in the HPS Connect client, a call to report a new terminal address, a call to report the running register version and the device switch `printerHint` (backend spec 2026-11-09-connect-betrieb, stage 2). Additive; every existing call, golden and text behaves as before.
10
+
11
+ - **`onEndpoint(endpoint)` in `createHpsConnectClient`** (type `HpsConnectEndpoint`: `host`, `port`, `relocated`): called with the address Kasseneck Connect really used, but only from an answer with `ok: true` that carries a complete `endpoint` (Connect 1.5.0 and later). An error envelope never calls it, not even when it carries an `endpoint`; neither does an answer of Connect 1.4.2 (no field) or an incomplete address. A throw in the callback leaves the payment untouched. Reason: the register adopts a new terminal address only from a successful answer, and an old Connect must behave exactly as before.
12
+ - **Printer and paper sentences** (both registers): `printer.paper_out`, `printer.cover_open`, `printer.not_ready`, `printer.paper_near_end`, `printer.unreachable`, `printer.none`, and the new `printer.no_status_answer` („Drucker antwortet nicht – Deckel und Papier prüfen.“) for a printer that stays silent on the status query – a hint only, the receipt is printed anyway. Label `printer.hint_setting` („Warnen, wenn der Drucker nicht antwortet“) for the switch that hides that hint. `printer.warn_unreachable` and `printer.warn_none` are unchanged.
13
+ - **Terminal and lock screen sentences** (both registers): `terminal.unreachable`, `terminal.tid_mismatch`, `terminal.tid_hint`, `manager.ask`, `print.test_ruler_hint` and the five lock screen lines `lock_screen.card_payment_unclear`, `.receipt_unclear`, `.payout_unclear`, `.reversal_unclear`, `.split_open` („… bitte anmelden und prüfen.“).
14
+ - **Connect sentences** (`only: ['web']`): `connect.browser_blocks`, `connect.updating`, `connect.other_installation`, `connect.other_installation_hint`. `connect.not_responding` is unchanged.
15
+ - **Sentences that stood in the code of the browser register** (`only: ['web']`, wording unchanged): the rest of the Connect error messages (`connect.pair_invalid`, `.pair_request_throttled`, `.print_in_progress`, `.printer_timeout`, `.printer_refused`, `.bad_request`, `.unreadable_answer`, `.error_generic`), the success sentences `connect.unpaired_done` and `connect.switched_over` plus the label `connect.code_prompt` (no explanatory hints of the settings: spec 2.1 of the Connect operation spec; the composed search and pairing sentences of the browser register are built from the labels below and are not in the catalogue).
16
+ - **Labels and buttons** `devices.*` (61 entries, both registers): status lines („Bondrucker bereit“, „Kartenterminal bereit“, „Verbunden“ …), field names („Papierbreite“, „Zeichensatz“, „Kassenlade“ …), placeholders `{n}`, `{width}`, `{count}`, `{tid}`, `{ip}`, `{port}`, and buttons („Nochmal prüfen“, „Nicht jetzt“, „Neu suchen“ …). Among them the short labels of the device settings `devices.check` („prüfen“), `devices.searching` („Sucht …“), `devices.search` („Suchen“), `devices.none` („keiner“), `devices.yes` („ja“), `devices.no` („nein“) and `devices.test_print_paper` („Testdruck auf Papier ({width}, {count} Zeichen)“). Existing buttons are reused, not duplicated: `common.cancel`, `nav.settings`, `printer.set_up`, `receipts.open` („Öffnen“), `codetable.print_again`, `codetable.apply` („Übernehmen“), `split.remove` („Entfernen“), `cancellation.tip_refund_yes` („Ja“), `cancellation.tip_refund_no` („Nein“).
17
+ - **Titles of the device settings** (labels, both registers, wording unchanged from the browser register; no explanatory sentences, spec 2.1 of the Connect operation spec, apart from `terminal.tid_hint`): `printer.section_title` („Drucker & Lade“), `connect.status_title`, `.install_title`, `.name`, `.switch_title`, `printer.use`, `.bluetooth_title`, `.print_qr`, `.old_way_title`, `.cut_title`, `.bon_texts_title`, `.test_page_print`, `.drawer_title`, `.drawer_auto_title`, `.drawer_open_now`, `terminal.card_terminal`, `.tid_title`, `.search_title`, `.ip_title`, `.port_title`, the hint `terminal.change_in_panel` („Im Panel ändern“) and, browser register only, the buttons `connect.pair` („Koppeln“), `.unpair` („Entkoppeln“), `.unpair_yes` („Ja, entkoppeln“).
18
+ - **`reportMyTerminalAddress({ ownerUid, deviceId, deviceSecret, tid, host, port })`** (`./register`, `POS_CALLS` now 54; only on the register path, device credentials like `listRegisterUsersForDevice`, no session of a person): the register reports silently that the card terminal answers under a new address. The server writes only the two fields `terminalIp`/`terminalPort`, and only when the TID matches the device's setup; every change is entered in the register log. Answer `{ changed }` (`false` = the address was already stored). The form is checked before sending (`KasseneckValidationError`, `scope: 'request'`: credentials, `tid` and `host` non-empty, `port` a whole number from 1 to 65535); the device secret goes as `secretParams`, never into a log or error. After a timeout the outcome stays `rejected` (repeatable: the same address again is `changed: false`). The register shows nothing about it. New error codes in `REGISTER_ERROR_CODES`: `terminal_id_mismatch`, `invalid_terminal_address`, `too_many_changes` (changed too often today), and `server_error`. Because `isRegisterError` looks only at the code, never at the call, `isRegisterError(e)` without a code is now also `true` for the `server_error` of every register call (before: `false`); a branch that used it to tell sign-in errors from the rest decides at the code instead.
19
+ - **`reportMyRegisterClient({ ownerUid, deviceId, deviceSecret, app })`** (`./register`, `POS_CALLS` now 55; register path only, device credentials like `reportMyTerminalAddress`, no session of a person): the register reports silently which version of it runs on this device (`app` is the build identifier: `1.39.0/2026-11-13T18:20Z` in the browser, `kasse-app/1.0.3+34` in the app). The server stores it with the time of the report and writes only when the identifier changed or the last report is at least 10 minutes old; answer `{ written }` (`false` = nothing to write, no error). Meant for the start, after sign-in and a beat of about 15 minutes. The form is checked before sending (`KasseneckValidationError`, `scope: 'request'`: credentials and `app` non-empty); the device secret goes as `secretParams`. After a timeout the outcome stays `rejected` (repeatable). No new error codes (`device_not_paired`, `server_error`). The register shows nothing about it. Reason: the admin shows per device which version runs and whether it is outdated.
20
+ - **Version texts** (`version.line` label, both registers: „Fassung {version} · {time}“, the quiet line in the settings and on the PIN screen; `version.updated` message, `only: ['web']`: „Kasse aktualisiert auf {version}.“, shown once after the browser register reloaded itself).
21
+ - **Device setting `printerHint`** (optional switch, `PosDeviceSettings.printerHint?`, `POS_DEVICE_OPTIONAL_SWITCHES`, `posPrinterHint(device)`): shows or hides the "printer does not answer" hint at the print buttons. No default value, the server sends it only when stored; absent means on. Written with `true`/`false` through `setMyRegisterDeviceSettings`, read through `posSettingsFromWire`/`./stored`.
22
+ - `fixtures/pos-texts.json`, `surface.json`, `invoice-texts.json`, `invoice-api.schema.json` and `hobex-hps-codes.json` regenerated for the version.
23
+
24
+ ## 1.38.0 - 2026-11-12
25
+
26
+ Payment on invoices: when an invoice is paid in cash or by card on site, the server writes a payment receipt ("Zahlung auf Rechnung") into the cash register the money goes into. This version reads, prints and explains such receipts. Additive; every existing call, receipt and golden behaves as before (all existing goldens are byte-identical, eight new ones are added).
27
+
28
+ - **Position kind `invoice_payment`** (`ReceiptItem.kind`, `isInvoicePaymentItem`): a position of a payment receipt. It counts in the RKSV field "Null", but it is not tax-free revenue, the VAT is on the invoice. The receipt layout prints it without quantity and without tax category ("Zahlung auf Rechnung 2026-0042 | 1569,60"), leaves it out of the VAT table (a receipt with only such positions has no table) and never shows "0 %" for it. Below the position it prints the tax note of the invoice (`taxNote`, see below): `inkl. USt`, `0 % USt` or `Steuerangaben siehe Rechnung`, none without a note; "0 %" never stands at the position itself, only as that note, and a small business gets the note `0 % USt` but not the small-business notice; and a recorded handwritten payment receipt gets no "USt: Duplikat …" line. The kind travels with `toReceiptItemPayload`; a request from a till never carries it (only the server creates payment receipts). Reason: one number on the invoice, the other in the cash register, and the VAT counted once, on the invoice.
29
+ - **`Receipt.invoicePayments`** (type `InvoicePaymentRef`: `invoiceId`, `invoiceNumber`, `paymentId`, `customerId`, `amountCents`, `partial`, `paidOn`, `taxNote`; reader `readInvoicePaymentRefs`): one reference per invoice, in the order of the positions (the n-th `invoice_payment` position belongs to the n-th reference). Not signed, like `cancellationOf`. An entry without invoice id, number, payment id or integer amount is dropped; `taxNote` (`InvoicePaymentTaxNote`) is optional and has three values: `incl_vat` (the invoice shows VAT), `zero_percent` (no VAT because exempt or not taxable, also small business) and `see_invoice` (reverse charge); an unknown or missing value means no note.
30
+ - **`receiptNotes(receipt, { testCashregister?, testSignature? })`** (`./receipt`, types `ReceiptNote`, `ReceiptNoteKind`, `ReceiptNotesOptions`): the notes of a receipt as `{ kind, title, lines }` in a fixed order: `test_cashregister`, `test_signature`, `training`, `cancellation`, `manual_receipt`, `signature_outage`. Same building blocks and words as the receipt layout (module `vermerke.ts`), so the cash-register section on an A4 invoice or payment confirmation arranges the same notes without rules of its own. The note of a recorded handwritten receipt has no "USt: Duplikat …" line (that depends on the business and stays in the layout). An unknown or old German option (`testKasse`) throws `KasseneckValidationError` (scope `request`), so a test receipt never looks valid.
31
+ - **Cancellation code `invoice_payment_not_cancellable`** in `CANCELLATION_ERROR_CODES` (after `idempotency_key_required`): a payment receipt is cancelled only at its invoice in the customer area, never from a till. The code is part of the taken-over contract export now (`fixtures/v3/`, backend package 0.40.0); the temporary allowance `VOR_DEM_VERTRAG` in `test/receipts-v3.test.ts` is gone.
32
+ - **Till texts** (`fixtures/pos-texts.json`, `fixtures/pos-message-cases.json`): message `cancellation.invoice_payment_not_cancellable` "Diese Zahlung gehört zu einer Rechnung. Storniere sie im Kundenbereich bei der Rechnung." with a code rule in `ERROR_CODE_RULES` and its case; `cancellationErrorMessage` also applies a code rule whose key is a `cancellation.*` message (only this one so far). Label `shift_receipt.invoice_payments` "Zahlungen auf Rechnungen".
33
+ - **Shift:** `ShiftRunningTotals.invoicePaymentCents` and `ShiftSummaryReceipt.invoicePaymentCents` (optional, read as sent, integer): payments on invoices of the shift, cash and non-cash, information only (the money is already in cash sales or non-cash). The Z and X receipt print "Zahlungen auf Rechnungen" with the amount at the start of the information block; without the field or with 0 the receipt stays as before.
34
+ - **Invoice texts** (`fixtures/invoice-texts.json`, de and en): `pdf.paid.text` is short now, "Diese Rechnung ist beglichen." / "This invoice has been paid." (the sentence "Es ist nichts weiter zu tun." is dropped for every paid invoice). New: `pdf.title.payment_confirmation`, `pdf.title.refund_confirmation`, `pdf.cash_register.header` ("REGISTRIERKASSE"), `pdf.cash_register.receipt_number`, `pdf.cash_register.date`, `pdf.confirmation.intro`, `pdf.confirmation.not_invoice` and the columns `pdf.confirmation.table.invoice`, `.amount`, `.paid_so_far`, `.received_today`, `.still_open` for the cash-register section and the payment confirmation.
35
+ - **Contract taken over** (`node scripts/v3-vertrag-holen.mjs`, then `npm run fixtures:stored`): besides the cancellation code the contract carries the receipt field `invoicePayments` and the error codes `invoice_payment_server_only`, `invoice_payment_mixed`, `invalid_invoice_payment`. `./stored` reads a stored `rechnungszahlung` into `invoicePayments` (all eight keys; `nummer` becomes `invoiceNumber`, `kundeId` `customerId`, `teil` `partial`, `zahlungVom` `paidOn`, `steuerhinweis` `taxNote` with `inkl_ust`/`null_prozent`/`siehe_rechnung` becoming `incl_vat`/`zero_percent`/`see_invoice`; since the contract was taken over again the vocabulary export knows the rename and the value catalogue, the hand mapping in `./stored` stays on purpose and accepts German and English values).
36
+ - **Tax note texts** (`pdf.cash_register.tax.incl_vat`, `.zero_percent`, `.see_invoice`, de and en): "inkl. USt" / "incl. VAT", "0 % USt" / "0 % VAT", "Steuerangaben siehe Rechnung" / "Tax details see invoice" for the cash register part on the A4 page, in the language of the invoice. On the receipt the notes stay German. New golden receipts `invoice-payment-zero-percent` and `invoice-payment-see-invoice`; `invoice-payment-without-vat` (small business) now prints `0 % USt`, all other goldens are unchanged.
37
+ - **Short paid texts** (`pdf.paid.cash`, `pdf.paid.card`, de and en): "Bar bezahlt am {date}." / "Paid in cash on {date}." and "Mit Karte bezahlt am {date}." / "Paid by card on {date}." for an invoice paid on site.
38
+ - **Invoice code `cash_receipt_pending`** (appended to `INVOICE_ERROR_CODES`, after `invalid_deposit`; `fixtures/invoice-api.schema.json` and `fixtures/surface.json` regenerated): the invoice was paid in cash, the cash receipt of the payment is not finished yet, so the invoice PDF cannot be issued; call again shortly. The contract was taken over again from the backend (`node scripts/v3-vertrag-holen.mjs`, `npm run fixtures:stored`); besides the new code only the fingerprints changed.
39
+ - **Contract taken over again** (rename `inklUst`/`includesVat` to `steuerhinweis`/`taxNote`): the export carries the field `taxNote` and the catalogue `RECHNUNGSZAHLUNG_STEUERHINWEIS` (`inkl_ust` becomes `incl_vat`, `null_prozent` `zero_percent`, `siehe_rechnung` `see_invoice`); `src/stored/vokabular.ts`, the stored twins and the generated amount-due fixtures were regenerated against the backend (source hashes only), otherwise only fingerprints changed.
40
+ - **Contract taken over again (only one's own tips):** without `cashView` and `cashMove` the backend returns only the caller's own entry in `getMyDrawerState` `tips` and `tipClaims`; in the case `success_cashier_tip_taken` the entry of `ru_chef` is gone. The package reads both lists as before, only the fixture and its test changed.
41
+ - **Goldens:** `invoice-payment-normal`, `-partial`, `-without-vat`, `-refund`, `-cancellation`, `-outage`, `-training`, `-manual-receipt` (lines, grids, sheets, print digests).
42
+ - `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json`, `hobex-hps-codes.json` and `invoice-api.schema.json` regenerated for the version.
43
+
44
+
45
+ ## 1.37.0 - 2026-11-12
8
46
 
9
47
  Late terminal query for a card payment with an open outcome (`HpsPayments.clarifyPayment` in `./payments`). Additive; `pay`, `refund` and `cancel` behave as before. Card tips at the register (backend spec 2026-11-11-kartentrinkgeld, stages 1 and 2). Additive; every existing call, golden and text behaves as before, except the wording changes named below.
10
48
 
package/README.md CHANGED
@@ -302,7 +302,7 @@ const register = registerUserAuth({
302
302
 
303
303
  ### Calls without any authentication
304
304
 
305
- Six calls run **without any identity**, because they are how an identity comes
305
+ Eight calls run **without any identity**, because they are how an identity comes
306
306
  into being or how a device manages itself. They live in `…/register` and take
307
307
  **no authentication**, only the connection settings (`posBaseUrl`, timeout,
308
308
  `fetch`); they always go to the register path:
@@ -311,6 +311,8 @@ into being or how a device manages itself. They live in `…/register` and take
311
311
  |---|---|
312
312
  | `pairRegisterDevice` | the pairing code from the panel |
313
313
  | `listRegisterUsersForDevice`, `listRegisterSessionsForDevice` | the device credentials from pairing |
314
+ | `reportMyTerminalAddress` | the device credentials from pairing (no session; register path only) |
315
+ | `reportMyRegisterClient` | the device credentials from pairing (no session; register path only) |
314
316
  | `unpairRegisterDevice` | the device credentials; locks the device in the backend |
315
317
  | `registerUserLogin` | device credentials, user and PIN |
316
318
  | `registerPinLogin` | device credentials and PIN, without choosing a user |
@@ -872,6 +874,16 @@ vom 11.08.2026, 09:02 Uhr / Grund: Fehleingabe". The date comes from
872
874
  `cancellationOf.timeStamp` (backend since 2026-09-04); older receipts without
873
875
  it omit that line.
874
876
 
877
+ **Payment receipts (payment on invoices).** A receipt whose positions carry
878
+ `kind: 'invoice_payment'` (`isInvoicePaymentItem`) takes money for one or more
879
+ invoices (cash or card on site) or pays it back for a credit note; only the
880
+ server creates it, and `receipt.invoicePayments` names the invoices in the
881
+ order of the positions. It is cancelled only at its invoice in the customer
882
+ area: `cancelReceipt` answers `invoice_payment_not_cancellable`, and the till
883
+ shows `cancellation.invoice_payment_not_cancellable` (`./pos`). The printed
884
+ receipt shows these positions without tax category and without VAT table,
885
+ with `inkl. USt` below when the invoice shows VAT.
886
+
875
887
  ## Sending a receipt by email
876
888
 
877
889
  ```ts
@@ -981,6 +993,12 @@ fitted, never scaled up. Banners (TESTKASSE, STORNOBELEG, …) are framed by
981
993
  `=` lines, the same on every path. The package rasterises finished RGBA pixels;
982
994
  loading and decoding the image (PNG, JPEG) stays with your application.
983
995
 
996
+ A page that shows a receipt in its own arrangement (the cash-register section
997
+ on an A4 invoice) takes the notes from `receiptNotes(receipt, { testCashregister,
998
+ testSignature })` (`./receipt`): `{ kind, title, lines }` for test register, test
999
+ signature, training, cancellation, recorded handwritten receipt and signature
1000
+ outage, in this order, with the same words as the printed receipt.
1001
+
984
1002
  ### Getting the bytes to the printer
985
1003
 
986
1004
  The package generates ESC/POS bytes and ePOS XML, and it ships three ways to
@@ -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", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
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", "getMyTipBalance", "reportMyTerminalAddress", "reportMyRegisterClient", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
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", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance"];
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", "getMyTipBalance", "reportMyTerminalAddress", "reportMyRegisterClient"];
33
33
  export type PublicCall = typeof PUBLIC_CALLS[number];
34
34
  export type PosCall = typeof POS_CALLS[number];
35
35
  /**
@@ -162,6 +162,10 @@ exports.ALL_CALLS = [
162
162
  'listMyLeergutCodes',
163
163
  // „Mein Trinkgeld“ (./pos): Stand der angemeldeten Person; nur ueber den Kassenweg.
164
164
  'getMyTipBalance',
165
+ // Neue Adresse des Kartenterminals still melden (./register, Ausweis des Geraets); nur ueber den Kassenweg.
166
+ 'reportMyTerminalAddress',
167
+ // Laufende Fassung der Kasse still melden (./register, Ausweis des Geraets); nur ueber den Kassenweg.
168
+ 'reportMyRegisterClient',
165
169
  // Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
166
170
  'registerTerminalDevice',
167
171
  'getTerminalAccess',
@@ -394,6 +398,10 @@ exports.POS_CALLS = [
394
398
  'listMyLeergutCodes',
395
399
  // „Mein Trinkgeld“: nur ueber den Kassenweg, nur persoenliche Anmeldung.
396
400
  'getMyTipBalance',
401
+ // Neue Adresse des Kartenterminals melden: nur ueber den Kassenweg, Ausweis des Geraets (keine Sitzung).
402
+ 'reportMyTerminalAddress',
403
+ // Laufende Fassung melden: nur ueber den Kassenweg, Ausweis des Geraets (keine Sitzung).
404
+ 'reportMyRegisterClient',
397
405
  ];
398
406
  /**
399
407
  * Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
@@ -610,6 +618,10 @@ exports.CALLS_WITHOUT_EFFECT = Object.freeze({
610
618
  registerUserLogin: 'repeatable',
611
619
  renewRegisterSession: 'repeatable',
612
620
  // Kartenterminal: Anmeldung und Einrichtung melden schreiben denselben Stand noch einmal.
621
+ // Dieselbe Adresse noch einmal gemeldet aendert nichts (`changed: false`); der Tageszaehler zaehlt nur echte Aenderungen.
622
+ reportMyTerminalAddress: 'repeatable',
623
+ // Dieselbe Kennung noch einmal gemeldet schreibt nichts (`written: false`).
624
+ reportMyRegisterClient: 'repeatable',
613
625
  reportTerminalLogin: 'repeatable',
614
626
  reportTerminalReady: 'repeatable',
615
627
  // Kartenterminal: die feste Bindung noch einmal loesen aendert nichts am Server.
@@ -1,5 +1,5 @@
1
1
  export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
2
- export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, 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';
2
+ export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, isInvoicePaymentItem, 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 InvoicePaymentRef, type InvoicePaymentTaxNote, 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, EWP_REASONS, EWP_WARNING_CODES, type EwpReason, type EwpWarningCode, type EwpMasterData, type EwpLineSources, type EwpLine, type EwpWarning, type EwpExtraQuantity, type EwpExtraQuantityInput, type EwpReport, type EwpReportFile, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
4
4
  export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
package/dist/cjs/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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.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.EWP_WARNING_CODES = exports.EWP_REASONS = 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 = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = void 0;
3
+ 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.isInvoicePaymentItem = 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.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 = exports.isPaymentErrorCode = void 0;
5
+ 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 = exports.hobexReceiptNeedsSignature = void 0;
6
+ 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.EWP_WARNING_CODES = exports.EWP_REASONS = 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 = exports.LIST_RECEIPTS_VIEWS = 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 = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = 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; } });
@@ -24,6 +24,7 @@ Object.defineProperty(exports, "isVoucherItem", { enumerable: true, get: functio
24
24
  Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: function () { return index_js_2.isVoucherFloatItem; } });
25
25
  Object.defineProperty(exports, "isDepositItem", { enumerable: true, get: function () { return index_js_2.isDepositItem; } });
26
26
  Object.defineProperty(exports, "isDepositReturnItem", { enumerable: true, get: function () { return index_js_2.isDepositReturnItem; } });
27
+ Object.defineProperty(exports, "isInvoicePaymentItem", { enumerable: true, get: function () { return index_js_2.isInvoicePaymentItem; } });
27
28
  Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return index_js_2.toVoucherPayload; } });
28
29
  Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return index_js_2.fromVoucherPayload; } });
29
30
  Object.defineProperty(exports, "voucherIsValid", { enumerable: true, get: function () { return index_js_2.voucherIsValid; } });
@@ -18,6 +18,8 @@ import type { InvoiceLanguage } from './vertrag.js';
18
18
  declare const DE: {
19
19
  readonly 'pdf.title.invoice': "RECHNUNG";
20
20
  readonly 'pdf.title.credit_note': "GUTSCHRIFT";
21
+ readonly 'pdf.title.payment_confirmation': "ZAHLUNGSBESTÄTIGUNG";
22
+ readonly 'pdf.title.refund_confirmation': "RÜCKZAHLUNGSBESTÄTIGUNG";
21
23
  readonly 'pdf.badge.paid': "BEZAHLT";
22
24
  readonly 'pdf.badge.direct_debit': "SEPA-LASTSCHRIFT";
23
25
  readonly 'pdf.meta.number.invoice': "Rechnungsnr.";
@@ -78,9 +80,24 @@ declare const DE: {
78
80
  readonly 'pdf.payment.note_until': "Zahlbar ohne Abzug bis {date}. Vielen Dank für Ihren Auftrag.";
79
81
  readonly 'pdf.payment.note': "Zahlbar ohne Abzug. Vielen Dank für Ihren Auftrag.";
80
82
  readonly 'pdf.payment.qr': "Mit Banking-App scannen & zahlen";
81
- readonly 'pdf.paid.text': "Diese Rechnung ist beglichen. Es ist nichts weiter zu tun.";
83
+ readonly 'pdf.paid.text': "Diese Rechnung ist beglichen.";
82
84
  readonly 'pdf.paid.date': "Bezahlt am";
85
+ readonly 'pdf.paid.cash': "Bar bezahlt am {date}.";
86
+ readonly 'pdf.paid.card': "Mit Karte bezahlt am {date}.";
83
87
  readonly 'pdf.paid.payment_method': "Zahlungsart";
88
+ readonly 'pdf.cash_register.header': "REGISTRIERKASSE";
89
+ readonly 'pdf.cash_register.receipt_number': "Beleg-Nr.";
90
+ readonly 'pdf.cash_register.date': "Datum";
91
+ readonly 'pdf.cash_register.tax.incl_vat': "inkl. USt";
92
+ readonly 'pdf.cash_register.tax.zero_percent': "0 % USt";
93
+ readonly 'pdf.cash_register.tax.see_invoice': "Steuerangaben siehe Rechnung";
94
+ readonly 'pdf.confirmation.intro': "Wir bestätigen den Erhalt Ihrer Zahlung.";
95
+ readonly 'pdf.confirmation.not_invoice': "Diese Bestätigung ist keine Rechnung.";
96
+ readonly 'pdf.confirmation.table.invoice': "Rechnung";
97
+ readonly 'pdf.confirmation.table.amount': "Betrag";
98
+ readonly 'pdf.confirmation.table.paid_so_far': "Bisher bezahlt";
99
+ readonly 'pdf.confirmation.table.received_today': "Heute erhalten";
100
+ readonly 'pdf.confirmation.table.still_open': "Noch offen";
84
101
  readonly 'payment_method.cash': "Bar";
85
102
  readonly 'payment_method.transfer': "Überweisung";
86
103
  readonly 'payment_method.card': "Karte";
@@ -5,6 +5,9 @@ exports.invoiceText = invoiceText;
5
5
  const DE = {
6
6
  'pdf.title.invoice': 'RECHNUNG',
7
7
  'pdf.title.credit_note': 'GUTSCHRIFT',
8
+ // Zahlung auf Rechnung (1.38.0): eigene Bestaetigung, wenn spaeter bar oder mit Karte bezahlt wird.
9
+ 'pdf.title.payment_confirmation': 'ZAHLUNGSBESTÄTIGUNG',
10
+ 'pdf.title.refund_confirmation': 'RÜCKZAHLUNGSBESTÄTIGUNG',
8
11
  'pdf.badge.paid': 'BEZAHLT',
9
12
  'pdf.badge.direct_debit': 'SEPA-LASTSCHRIFT',
10
13
  'pdf.meta.number.invoice': 'Rechnungsnr.',
@@ -73,9 +76,30 @@ const DE = {
73
76
  'pdf.payment.note_until': 'Zahlbar ohne Abzug bis {date}. Vielen Dank für Ihren Auftrag.',
74
77
  'pdf.payment.note': 'Zahlbar ohne Abzug. Vielen Dank für Ihren Auftrag.',
75
78
  'pdf.payment.qr': 'Mit Banking-App scannen & zahlen',
76
- 'pdf.paid.text': 'Diese Rechnung ist beglichen. Es ist nichts weiter zu tun.',
79
+ // Kurz, fuer jede bezahlte Rechnung (auch Ueberweisung); der Satz „Es ist nichts weiter zu tun.“ entfiel mit 1.38.0.
80
+ 'pdf.paid.text': 'Diese Rechnung ist beglichen.',
77
81
  'pdf.paid.date': 'Bezahlt am',
82
+ // Kurztexte (1.38.0) fuer die Zahlung vor Ort; {date} = Zahltag.
83
+ 'pdf.paid.cash': 'Bar bezahlt am {date}.',
84
+ 'pdf.paid.card': 'Mit Karte bezahlt am {date}.',
78
85
  'pdf.paid.payment_method': 'Zahlungsart',
86
+ // Kassenteil (1.38.0): der Zahlungsbeleg der Kasse unten auf Rechnung und Zahlungsbestaetigung. Kopfzeile
87
+ // mit der Kassen-ID dahinter; Vermerke und Positionstexte bleiben deutsch (Pflichtwoerter, receiptNotes).
88
+ 'pdf.cash_register.header': 'REGISTRIERKASSE',
89
+ 'pdf.cash_register.receipt_number': 'Beleg-Nr.',
90
+ 'pdf.cash_register.date': 'Datum',
91
+ // Steuerhinweis unter der Zahlung (Spec 2026-11-11, Abschnitt 16): Umsatzsteuer ausgewiesen, steuerfrei/nicht steuerbar, Reverse Charge.
92
+ 'pdf.cash_register.tax.incl_vat': 'inkl. USt',
93
+ 'pdf.cash_register.tax.zero_percent': '0 % USt',
94
+ 'pdf.cash_register.tax.see_invoice': 'Steuerangaben siehe Rechnung',
95
+ // Zahlungsbestaetigung (1.38.0): Einleitung, Hinweis und die Spalten der Tabelle je Rechnung.
96
+ 'pdf.confirmation.intro': 'Wir bestätigen den Erhalt Ihrer Zahlung.',
97
+ 'pdf.confirmation.not_invoice': 'Diese Bestätigung ist keine Rechnung.',
98
+ 'pdf.confirmation.table.invoice': 'Rechnung',
99
+ 'pdf.confirmation.table.amount': 'Betrag',
100
+ 'pdf.confirmation.table.paid_so_far': 'Bisher bezahlt',
101
+ 'pdf.confirmation.table.received_today': 'Heute erhalten',
102
+ 'pdf.confirmation.table.still_open': 'Noch offen',
79
103
  'payment_method.cash': 'Bar',
80
104
  'payment_method.transfer': 'Überweisung',
81
105
  'payment_method.card': 'Karte',
@@ -220,6 +244,8 @@ const DE = {
220
244
  const EN = {
221
245
  'pdf.title.invoice': 'INVOICE',
222
246
  'pdf.title.credit_note': 'CREDIT NOTE',
247
+ 'pdf.title.payment_confirmation': 'PAYMENT CONFIRMATION',
248
+ 'pdf.title.refund_confirmation': 'REFUND CONFIRMATION',
223
249
  'pdf.badge.paid': 'PAID',
224
250
  'pdf.badge.direct_debit': 'SEPA DIRECT DEBIT',
225
251
  'pdf.meta.number.invoice': 'Invoice no.',
@@ -280,9 +306,24 @@ const EN = {
280
306
  'pdf.payment.note_until': 'Payable without deduction by {date}. Thank you for your business.',
281
307
  'pdf.payment.note': 'Payable without deduction. Thank you for your business.',
282
308
  'pdf.payment.qr': 'Scan with your banking app to pay',
283
- 'pdf.paid.text': 'This invoice has been paid. No further action is required.',
309
+ 'pdf.paid.text': 'This invoice has been paid.',
284
310
  'pdf.paid.date': 'Paid on',
311
+ 'pdf.paid.cash': 'Paid in cash on {date}.',
312
+ 'pdf.paid.card': 'Paid by card on {date}.',
285
313
  'pdf.paid.payment_method': 'Payment method',
314
+ 'pdf.cash_register.header': 'CASH REGISTER',
315
+ 'pdf.cash_register.receipt_number': 'Receipt no.',
316
+ 'pdf.cash_register.date': 'Date',
317
+ 'pdf.cash_register.tax.incl_vat': 'incl. VAT',
318
+ 'pdf.cash_register.tax.zero_percent': '0 % VAT',
319
+ 'pdf.cash_register.tax.see_invoice': 'Tax details see invoice',
320
+ 'pdf.confirmation.intro': 'We confirm receipt of your payment.',
321
+ 'pdf.confirmation.not_invoice': 'This confirmation is not an invoice.',
322
+ 'pdf.confirmation.table.invoice': 'Invoice',
323
+ 'pdf.confirmation.table.amount': 'Amount',
324
+ 'pdf.confirmation.table.paid_so_far': 'Paid so far',
325
+ 'pdf.confirmation.table.received_today': 'Received today',
326
+ 'pdf.confirmation.table.still_open': 'Still open',
286
327
  'payment_method.cash': 'Cash',
287
328
  'payment_method.transfer': 'Bank transfer',
288
329
  'payment_method.card': 'Card',
@@ -27,7 +27,7 @@ export type InvoiceEndpoint = (typeof INVOICE_ENDPOINTS)[number];
27
27
  * Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
28
28
  * aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
29
29
  */
30
- export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken", "deposit_not_enabled", "deposit_type_not_found", "deposit_set_by_server", "invalid_deposit_quantity", "invalid_deposit"];
30
+ export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken", "deposit_not_enabled", "deposit_type_not_found", "deposit_set_by_server", "invalid_deposit_quantity", "invalid_deposit", "cash_receipt_pending"];
31
31
  export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
32
32
  /**
33
33
  * Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
@@ -88,6 +88,7 @@ exports.INVOICE_ERROR_CODES = [
88
88
  'deposit_set_by_server', // das Pfand zu einer Artikelposition leitet der Server selbst ab
89
89
  'invalid_deposit_quantity', // die Pfandmenge passt nicht zur Menge der Position
90
90
  'invalid_deposit', // sonstige Pfandangabe unzulaessig, `index` nennt die Position
91
+ 'cash_receipt_pending', // Rechnung bar bezahlt, der Kassenbeleg der Zahlung ist noch nicht fertig: PDF spaeter abrufen
91
92
  ];
92
93
  /**
93
94
  * Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
@@ -54,7 +54,7 @@ export declare function isReturnDisposition(value: unknown): value is ReturnDisp
54
54
  * [PAYMENT_ERROR_CODES]. Ein Code ausserhalb bleibt ueber
55
55
  * `KasseneckApiError.code` lesbar.
56
56
  */
57
- export declare const CANCELLATION_ERROR_CODES: readonly ["receipt_not_found", "receipt_type_not_cancellable", "training_receipt", "already_cancelled", "invalid_line", "quantity_exceeds_remaining", "unknown_reason", "note_too_long", "invalid_items", "cashregister_not_assigned", "not_permitted", "own_receipts_only", "cashregister_incomplete", "cancellation_failed", "cancellation_payments_required", "cancellation_refund_exceeds_payment", "cancellation_refund_reference_required", "cancellation_refund_reference_unknown", "cancellation_outcome_unknown", "invalid_return_disposition", "tip_refund_conflict", "invalid_tip_refund_source", "tip_refund_source_requires_cash", "tip_keep_not_possible_with_voucher", "refund_as_invalid", "refund_as_conflict", "refund_as_voucher_not_available", "refund_as_voucher_reason", "refund_as_voucher_with_voucher", "refund_as_voucher_no_type", "refund_as_voucher_amount", "idempotency_key_required", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "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", "validation", "route_missing", "response_unreadable"];
57
+ export declare const CANCELLATION_ERROR_CODES: readonly ["receipt_not_found", "receipt_type_not_cancellable", "training_receipt", "already_cancelled", "invalid_line", "quantity_exceeds_remaining", "unknown_reason", "note_too_long", "invalid_items", "cashregister_not_assigned", "not_permitted", "own_receipts_only", "cashregister_incomplete", "cancellation_failed", "cancellation_payments_required", "cancellation_refund_exceeds_payment", "cancellation_refund_reference_required", "cancellation_refund_reference_unknown", "cancellation_outcome_unknown", "invalid_return_disposition", "tip_refund_conflict", "invalid_tip_refund_source", "tip_refund_source_requires_cash", "tip_keep_not_possible_with_voucher", "refund_as_invalid", "refund_as_conflict", "refund_as_voucher_not_available", "refund_as_voucher_reason", "refund_as_voucher_with_voucher", "refund_as_voucher_no_type", "refund_as_voucher_amount", "idempotency_key_required", "invoice_payment_not_cancellable", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "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", "validation", "route_missing", "response_unreadable"];
58
58
  export type CancellationErrorCode = (typeof CANCELLATION_ERROR_CODES)[number];
59
59
  export declare function isCancellationErrorCode(value: unknown): value is CancellationErrorCode;
60
60
  /** Der Code eines geworfenen Fehlers, wenn er in [CANCELLATION_ERROR_CODES] steht; sonst `undefined`. */
@@ -106,6 +106,8 @@ exports.CANCELLATION_ERROR_CODES = Object.freeze([
106
106
  'refund_as_voucher_no_type', // keine passende Rueckgabe-Sorte eingestellt
107
107
  'refund_as_voucher_amount', // Betrag ohne Trinkgeld ausserhalb 1,00 bis 10.000,00 Euro
108
108
  'idempotency_key_required', // refundAs ohne idempotencyKey
109
+ // Zahlung auf Rechnung (Server 2026-11): ein Zahlungsbeleg wird nur im Kundenbereich bei der Rechnung storniert
110
+ 'invoice_payment_not_cancellable', // Original ist ein Zahlungsbeleg (Positionen invoice_payment)
109
111
  // Anmeldung und Rand (errorCodes.auth ohne Partner-Zugang, errorCodes.edge)
110
112
  'account_not_found',
111
113
  'action_confirmation_required',
@@ -1,4 +1,4 @@
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';
1
+ export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isDiscountItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, isInvoicePaymentItem, } from './receipt-item.js';
2
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';
@@ -11,6 +11,7 @@ export { type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayl
11
11
  export { type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, } from './cashregister.js';
12
12
  export { type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind } from './receipt-summary.js';
13
13
  export { type ManualReceipt, type ManualReceiptReason, MANUAL_RECEIPT_REASONS, readManualReceipt, type ManualReceiptErrorCode, MANUAL_RECEIPT_ERROR_CODES, isManualReceiptErrorCode, } from './manual-receipt.js';
14
+ export { type InvoicePaymentRef, type InvoicePaymentTaxNote, readInvoicePaymentRefs } from './invoice-payment-ref.js';
14
15
  export { type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, } from './report-month.js';
15
16
  export { type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, } from './stripe-url-session.js';
16
17
  export { type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './hobex-receipt.js';
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ 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.isInvoicePaymentItem = 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.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.readInvoicePaymentRefs = 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 = exports.asksTipRefundSource = void 0;
5
+ exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = void 0;
6
6
  var receipt_item_js_1 = require("./receipt-item.js");
7
7
  Object.defineProperty(exports, "toReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.toReceiptItemPayload; } });
8
8
  Object.defineProperty(exports, "fromReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.fromReceiptItemPayload; } });
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "isVoucherItem", { enumerable: true, get: functio
15
15
  Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: function () { return receipt_item_js_1.isVoucherFloatItem; } });
16
16
  Object.defineProperty(exports, "isDepositItem", { enumerable: true, get: function () { return receipt_item_js_1.isDepositItem; } });
17
17
  Object.defineProperty(exports, "isDepositReturnItem", { enumerable: true, get: function () { return receipt_item_js_1.isDepositReturnItem; } });
18
+ Object.defineProperty(exports, "isInvoicePaymentItem", { enumerable: true, get: function () { return receipt_item_js_1.isInvoicePaymentItem; } });
18
19
  var voucher_js_1 = require("./voucher.js");
19
20
  Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return voucher_js_1.toVoucherPayload; } });
20
21
  Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return voucher_js_1.fromVoucherPayload; } });
@@ -106,6 +107,8 @@ Object.defineProperty(exports, "MANUAL_RECEIPT_REASONS", { enumerable: true, get
106
107
  Object.defineProperty(exports, "readManualReceipt", { enumerable: true, get: function () { return manual_receipt_js_1.readManualReceipt; } });
107
108
  Object.defineProperty(exports, "MANUAL_RECEIPT_ERROR_CODES", { enumerable: true, get: function () { return manual_receipt_js_1.MANUAL_RECEIPT_ERROR_CODES; } });
108
109
  Object.defineProperty(exports, "isManualReceiptErrorCode", { enumerable: true, get: function () { return manual_receipt_js_1.isManualReceiptErrorCode; } });
110
+ var invoice_payment_ref_js_1 = require("./invoice-payment-ref.js");
111
+ Object.defineProperty(exports, "readInvoicePaymentRefs", { enumerable: true, get: function () { return invoice_payment_ref_js_1.readInvoicePaymentRefs; } });
109
112
  var report_month_js_1 = require("./report-month.js");
110
113
  Object.defineProperty(exports, "reportMonthFromDate", { enumerable: true, get: function () { return report_month_js_1.reportMonthFromDate; } });
111
114
  Object.defineProperty(exports, "previousReportMonth", { enumerable: true, get: function () { return report_month_js_1.previousReportMonth; } });
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Zahlung auf Rechnung (`invoicePayments` am Beleg, Backend `rechnungszahlung`):
3
+ * Ein Zahlungsbeleg nimmt in der Kasse Geld fuer eine oder mehrere Rechnungen
4
+ * entgegen (bar oder mit Karte vor Ort) bzw. gibt es zu einer Gutschrift
5
+ * zurueck. Seine Positionen tragen `kind: 'invoice_payment'` und zaehlen im
6
+ * RKSV-Feld „Null“; die Umsatzsteuer steht auf der Rechnung, nicht am Beleg.
7
+ *
8
+ * Je Rechnung ein Bezug, in der Reihenfolge der Positionen (eine Zeile je
9
+ * Rechnung). Der Bezug ist nicht signiert (wie `cancellationOf`), die
10
+ * Rechnungsnummer steht zusaetzlich im Text der Position.
11
+ *
12
+ * Nur der Server legt solche Belege an; dieses Paket liest sie nur.
13
+ */
14
+ export interface InvoicePaymentRef {
15
+ invoiceId: string;
16
+ /** Nummer der Rechnung bzw. Gutschrift aus ihrem Rechnungskreis (`2026-0042`). */
17
+ invoiceNumber: string;
18
+ /** Kennung des Zahlungseintrags an der Rechnung. */
19
+ paymentId: string;
20
+ customerId: string | null;
21
+ /** Betrag dieser Zeile in Cent; bei einer Rueckzahlung zu einer Gutschrift negativ. */
22
+ amountCents: number;
23
+ /** Teilzahlung: weniger als der Rechnungsbetrag. */
24
+ partial: boolean;
25
+ /** Zahlungstag `YYYY-MM-DD` (Wiener Tag), `null` wenn unbekannt. */
26
+ paidOn: string | null;
27
+ /**
28
+ * Steuerhinweis unter der Position: `incl_vat` (die Rechnung weist Umsatzsteuer aus), `zero_percent`
29
+ * (steuerfrei oder nicht steuerbar) oder `see_invoice` (Reverse Charge). Fehlt er, steht kein Hinweis.
30
+ */
31
+ taxNote?: InvoicePaymentTaxNote;
32
+ }
33
+ /** Werte von [InvoicePaymentRef.taxNote] (gespeichert `inkl_ust` | `null_prozent` | `siehe_rechnung`). */
34
+ export type InvoicePaymentTaxNote = 'incl_vat' | 'zero_percent' | 'see_invoice';
35
+ /**
36
+ * Liest `invoicePayments` vom Draht. Ein Eintrag ohne Rechnungs-ID, Nummer,
37
+ * Zahlungs-ID oder ganzzahligen Betrag faellt weg (lesen tolerant, der Beleg
38
+ * bleibt anzeigbar); ohne brauchbaren Eintrag gibt es keinen Bezug
39
+ * (`undefined`). Ein unbekannter oder fehlender `taxNote` ergibt keinen
40
+ * Hinweis: ein Beleg behauptet nie eine Steuer, die er nicht kennt.
41
+ */
42
+ export declare function readInvoicePaymentRefs(roh: unknown): InvoicePaymentRef[] | undefined;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readInvoicePaymentRefs = readInvoicePaymentRefs;
4
+ const STEUERHINWEISE = ['incl_vat', 'zero_percent', 'see_invoice'];
5
+ const istText = (w) => typeof w === 'string' && w !== '';
6
+ /**
7
+ * Liest `invoicePayments` vom Draht. Ein Eintrag ohne Rechnungs-ID, Nummer,
8
+ * Zahlungs-ID oder ganzzahligen Betrag faellt weg (lesen tolerant, der Beleg
9
+ * bleibt anzeigbar); ohne brauchbaren Eintrag gibt es keinen Bezug
10
+ * (`undefined`). Ein unbekannter oder fehlender `taxNote` ergibt keinen
11
+ * Hinweis: ein Beleg behauptet nie eine Steuer, die er nicht kennt.
12
+ */
13
+ function readInvoicePaymentRefs(roh) {
14
+ if (!Array.isArray(roh))
15
+ return undefined;
16
+ const raus = [];
17
+ for (const e of roh) {
18
+ if (e === null || typeof e !== 'object' || Array.isArray(e))
19
+ continue;
20
+ const o = e;
21
+ if (!istText(o['invoiceId']) || !istText(o['invoiceNumber']) || !istText(o['paymentId']))
22
+ continue;
23
+ if (!Number.isSafeInteger(o['amountCents']))
24
+ continue;
25
+ const hinweis = o['taxNote'];
26
+ raus.push({
27
+ invoiceId: o['invoiceId'],
28
+ invoiceNumber: o['invoiceNumber'],
29
+ paymentId: o['paymentId'],
30
+ customerId: istText(o['customerId']) ? o['customerId'] : null,
31
+ amountCents: o['amountCents'],
32
+ partial: o['partial'] === true,
33
+ paidOn: istText(o['paidOn']) ? o['paidOn'] : null,
34
+ ...(typeof hinweis === 'string' && STEUERHINWEISE.includes(hinweis) ? { taxNote: hinweis } : {}),
35
+ });
36
+ }
37
+ return raus.length > 0 ? raus : undefined;
38
+ }