@kreiseck/kasseneck-api 1.36.0 → 1.38.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 (226) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +16 -0
  3. package/dist/cjs/client/aufrufe.d.ts +2 -2
  4. package/dist/cjs/client/aufrufe.js +5 -0
  5. package/dist/cjs/client/receipts.d.ts +1 -1
  6. package/dist/cjs/index.d.ts +1 -1
  7. package/dist/cjs/index.js +6 -5
  8. package/dist/cjs/invoice/texte.d.ts +18 -1
  9. package/dist/cjs/invoice/texte.js +43 -2
  10. package/dist/cjs/invoice/vertrag.d.ts +1 -1
  11. package/dist/cjs/invoice/vertrag.js +1 -0
  12. package/dist/cjs/models/cancellation.d.ts +1 -1
  13. package/dist/cjs/models/cancellation.js +2 -0
  14. package/dist/cjs/models/index.d.ts +2 -1
  15. package/dist/cjs/models/index.js +6 -3
  16. package/dist/cjs/models/invoice-payment-ref.d.ts +42 -0
  17. package/dist/cjs/models/invoice-payment-ref.js +38 -0
  18. package/dist/cjs/models/receipt-item.d.ts +10 -2
  19. package/dist/cjs/models/receipt-item.js +14 -1
  20. package/dist/cjs/models/receipt.d.ts +7 -0
  21. package/dist/cjs/models/receipt.js +6 -0
  22. package/dist/cjs/payments/hobex-hps/index.d.ts +2 -1
  23. package/dist/cjs/payments/hobex-hps/index.js +3 -1
  24. package/dist/cjs/payments/hobex-hps/outcome.d.ts +10 -0
  25. package/dist/cjs/payments/hobex-hps/payments.d.ts +54 -0
  26. package/dist/cjs/payments/hobex-hps/payments.js +157 -1
  27. package/dist/cjs/payments/hobex-hps/support.d.ts +19 -0
  28. package/dist/cjs/payments/hobex-hps/support.js +22 -0
  29. package/dist/cjs/payments/hobex-hps/transaction-response.js +1 -1
  30. package/dist/cjs/payments/index.d.ts +1 -1
  31. package/dist/cjs/payments/index.js +2 -1
  32. package/dist/cjs/pos/errors.d.ts +1 -1
  33. package/dist/cjs/pos/errors.js +1 -0
  34. package/dist/cjs/pos/index.d.ts +4 -4
  35. package/dist/cjs/pos/index.js +13 -5
  36. package/dist/cjs/pos/schicht-lesen.d.ts +3 -1
  37. package/dist/cjs/pos/schicht-lesen.js +28 -1
  38. package/dist/cjs/pos/schicht-typen.d.ts +50 -4
  39. package/dist/cjs/pos/schicht-typen.js +7 -2
  40. package/dist/cjs/pos/schicht.d.ts +6 -4
  41. package/dist/cjs/pos/schicht.js +6 -3
  42. package/dist/cjs/pos/settings.d.ts +37 -8
  43. package/dist/cjs/pos/settings.js +34 -10
  44. package/dist/cjs/pos/texte.d.ts +262 -4
  45. package/dist/cjs/pos/texte.js +157 -7
  46. package/dist/cjs/pos/trinkgeld.d.ts +30 -0
  47. package/dist/cjs/pos/trinkgeld.js +30 -0
  48. package/dist/cjs/receipt/index.d.ts +1 -0
  49. package/dist/cjs/receipt/index.js +4 -2
  50. package/dist/cjs/receipt/layout.d.ts +2 -2
  51. package/dist/cjs/receipt/layout.js +106 -117
  52. package/dist/cjs/receipt/shift-sheet.js +12 -2
  53. package/dist/cjs/receipt/vermerke.d.ts +80 -0
  54. package/dist/cjs/receipt/vermerke.js +167 -0
  55. package/dist/cjs/register/pairing.d.ts +4 -0
  56. package/dist/cjs/register/pairing.js +2 -0
  57. package/dist/cjs/stored/draht.js +25 -1
  58. package/dist/cjs/stored/vokabular.d.ts +1 -1
  59. package/dist/cjs/stored/vokabular.js +32 -2
  60. package/dist/cjs/version.d.ts +1 -1
  61. package/dist/cjs/version.js +1 -1
  62. package/dist/esm/client/aufrufe.d.ts +2 -2
  63. package/dist/esm/client/aufrufe.js +5 -0
  64. package/dist/esm/client/receipts.d.ts +1 -1
  65. package/dist/esm/index.d.ts +1 -1
  66. package/dist/esm/index.js +1 -1
  67. package/dist/esm/invoice/texte.d.ts +18 -1
  68. package/dist/esm/invoice/texte.js +43 -2
  69. package/dist/esm/invoice/vertrag.d.ts +1 -1
  70. package/dist/esm/invoice/vertrag.js +1 -0
  71. package/dist/esm/models/cancellation.d.ts +1 -1
  72. package/dist/esm/models/cancellation.js +2 -0
  73. package/dist/esm/models/index.d.ts +2 -1
  74. package/dist/esm/models/index.js +2 -1
  75. package/dist/esm/models/invoice-payment-ref.d.ts +42 -0
  76. package/dist/esm/models/invoice-payment-ref.js +35 -0
  77. package/dist/esm/models/receipt-item.d.ts +10 -2
  78. package/dist/esm/models/receipt-item.js +13 -1
  79. package/dist/esm/models/receipt.d.ts +7 -0
  80. package/dist/esm/models/receipt.js +6 -0
  81. package/dist/esm/payments/hobex-hps/index.d.ts +2 -1
  82. package/dist/esm/payments/hobex-hps/index.js +1 -0
  83. package/dist/esm/payments/hobex-hps/outcome.d.ts +10 -0
  84. package/dist/esm/payments/hobex-hps/payments.d.ts +54 -0
  85. package/dist/esm/payments/hobex-hps/payments.js +158 -2
  86. package/dist/esm/payments/hobex-hps/support.d.ts +19 -0
  87. package/dist/esm/payments/hobex-hps/support.js +19 -0
  88. package/dist/esm/payments/hobex-hps/transaction-response.js +1 -1
  89. package/dist/esm/payments/index.d.ts +1 -1
  90. package/dist/esm/payments/index.js +1 -1
  91. package/dist/esm/pos/errors.d.ts +1 -1
  92. package/dist/esm/pos/errors.js +1 -0
  93. package/dist/esm/pos/index.d.ts +4 -4
  94. package/dist/esm/pos/index.js +5 -5
  95. package/dist/esm/pos/schicht-lesen.d.ts +3 -1
  96. package/dist/esm/pos/schicht-lesen.js +27 -1
  97. package/dist/esm/pos/schicht-typen.d.ts +50 -4
  98. package/dist/esm/pos/schicht-typen.js +6 -1
  99. package/dist/esm/pos/schicht.d.ts +6 -4
  100. package/dist/esm/pos/schicht.js +6 -3
  101. package/dist/esm/pos/settings.d.ts +37 -8
  102. package/dist/esm/pos/settings.js +30 -9
  103. package/dist/esm/pos/texte.d.ts +262 -4
  104. package/dist/esm/pos/texte.js +156 -6
  105. package/dist/esm/pos/trinkgeld.d.ts +30 -0
  106. package/dist/esm/pos/trinkgeld.js +28 -0
  107. package/dist/esm/receipt/index.d.ts +1 -0
  108. package/dist/esm/receipt/index.js +1 -0
  109. package/dist/esm/receipt/layout.d.ts +2 -2
  110. package/dist/esm/receipt/layout.js +103 -113
  111. package/dist/esm/receipt/shift-sheet.js +12 -2
  112. package/dist/esm/receipt/vermerke.d.ts +80 -0
  113. package/dist/esm/receipt/vermerke.js +155 -0
  114. package/dist/esm/register/pairing.d.ts +4 -0
  115. package/dist/esm/register/pairing.js +2 -0
  116. package/dist/esm/stored/draht.js +25 -1
  117. package/dist/esm/stored/vokabular.d.ts +1 -1
  118. package/dist/esm/stored/vokabular.js +32 -2
  119. package/dist/esm/version.d.ts +1 -1
  120. package/dist/esm/version.js +1 -1
  121. package/fixtures/duplicate-cases.json +1 -1
  122. package/fixtures/expected/duplicate.shift-close.hex +1 -1
  123. package/fixtures/expected/invoice-payment-cancellation.grid32.txt +28 -0
  124. package/fixtures/expected/invoice-payment-cancellation.grid48.txt +26 -0
  125. package/fixtures/expected/invoice-payment-cancellation.lines.json +189 -0
  126. package/fixtures/expected/invoice-payment-cancellation.sheet32.json +194 -0
  127. package/fixtures/expected/invoice-payment-cancellation.sheet48.json +182 -0
  128. package/fixtures/expected/invoice-payment-manual-receipt.grid32.txt +30 -0
  129. package/fixtures/expected/invoice-payment-manual-receipt.grid48.txt +29 -0
  130. package/fixtures/expected/invoice-payment-manual-receipt.lines.json +199 -0
  131. package/fixtures/expected/invoice-payment-manual-receipt.sheet32.json +206 -0
  132. package/fixtures/expected/invoice-payment-manual-receipt.sheet48.json +200 -0
  133. package/fixtures/expected/invoice-payment-normal.grid32.txt +22 -0
  134. package/fixtures/expected/invoice-payment-normal.grid48.txt +21 -0
  135. package/fixtures/expected/invoice-payment-normal.lines.json +192 -0
  136. package/fixtures/expected/invoice-payment-normal.sheet32.json +158 -0
  137. package/fixtures/expected/invoice-payment-normal.sheet48.json +152 -0
  138. package/fixtures/expected/invoice-payment-outage.grid32.txt +23 -0
  139. package/fixtures/expected/invoice-payment-outage.grid48.txt +21 -0
  140. package/fixtures/expected/invoice-payment-outage.lines.json +172 -0
  141. package/fixtures/expected/invoice-payment-outage.sheet32.json +164 -0
  142. package/fixtures/expected/invoice-payment-outage.sheet48.json +152 -0
  143. package/fixtures/expected/invoice-payment-partial.grid32.txt +20 -0
  144. package/fixtures/expected/invoice-payment-partial.grid48.txt +20 -0
  145. package/fixtures/expected/invoice-payment-partial.lines.json +162 -0
  146. package/fixtures/expected/invoice-payment-partial.sheet32.json +146 -0
  147. package/fixtures/expected/invoice-payment-partial.sheet48.json +146 -0
  148. package/fixtures/expected/invoice-payment-refund.grid32.txt +20 -0
  149. package/fixtures/expected/invoice-payment-refund.grid48.txt +20 -0
  150. package/fixtures/expected/invoice-payment-refund.lines.json +162 -0
  151. package/fixtures/expected/invoice-payment-refund.sheet32.json +146 -0
  152. package/fixtures/expected/invoice-payment-refund.sheet48.json +146 -0
  153. package/fixtures/expected/invoice-payment-see-invoice.grid32.txt +22 -0
  154. package/fixtures/expected/invoice-payment-see-invoice.grid48.txt +21 -0
  155. package/fixtures/expected/invoice-payment-see-invoice.lines.json +192 -0
  156. package/fixtures/expected/invoice-payment-see-invoice.sheet32.json +158 -0
  157. package/fixtures/expected/invoice-payment-see-invoice.sheet48.json +152 -0
  158. package/fixtures/expected/invoice-payment-training.grid32.txt +30 -0
  159. package/fixtures/expected/invoice-payment-training.grid48.txt +27 -0
  160. package/fixtures/expected/invoice-payment-training.lines.json +183 -0
  161. package/fixtures/expected/invoice-payment-training.sheet32.json +206 -0
  162. package/fixtures/expected/invoice-payment-training.sheet48.json +188 -0
  163. package/fixtures/expected/invoice-payment-without-vat.grid32.txt +20 -0
  164. package/fixtures/expected/invoice-payment-without-vat.grid48.txt +19 -0
  165. package/fixtures/expected/invoice-payment-without-vat.lines.json +162 -0
  166. package/fixtures/expected/invoice-payment-without-vat.sheet32.json +146 -0
  167. package/fixtures/expected/invoice-payment-without-vat.sheet48.json +140 -0
  168. package/fixtures/expected/invoice-payment-zero-percent.grid32.txt +22 -0
  169. package/fixtures/expected/invoice-payment-zero-percent.grid48.txt +21 -0
  170. package/fixtures/expected/invoice-payment-zero-percent.lines.json +192 -0
  171. package/fixtures/expected/invoice-payment-zero-percent.sheet32.json +158 -0
  172. package/fixtures/expected/invoice-payment-zero-percent.sheet48.json +152 -0
  173. package/fixtures/expected/shift-close-card-tips.grid32.txt +44 -0
  174. package/fixtures/expected/shift-close-card-tips.grid48.txt +40 -0
  175. package/fixtures/expected/shift-close-card-tips.lines.json +479 -0
  176. package/fixtures/expected/shift-close-put-in.grid32.txt +1 -1
  177. package/fixtures/expected/shift-close-put-in.grid48.txt +1 -1
  178. package/fixtures/expected/shift-close-put-in.lines.json +1 -1
  179. package/fixtures/expected/shift-close-take-out.grid32.txt +1 -1
  180. package/fixtures/expected/shift-close-take-out.grid48.txt +1 -1
  181. package/fixtures/expected/shift-close-take-out.lines.json +1 -1
  182. package/fixtures/expected/shift-close.grid32.txt +1 -1
  183. package/fixtures/expected/shift-close.grid48.txt +1 -1
  184. package/fixtures/expected/shift-close.lines.json +1 -1
  185. package/fixtures/expected/shift-interim-card-tips.grid32.txt +34 -0
  186. package/fixtures/expected/shift-interim-card-tips.grid48.txt +31 -0
  187. package/fixtures/expected/shift-interim-card-tips.lines.json +344 -0
  188. package/fixtures/hobex-hps-codes.json +2 -2
  189. package/fixtures/invoice-api.schema.json +3 -2
  190. package/fixtures/invoice-texts.json +37 -3
  191. package/fixtures/manifest.json +80 -0
  192. package/fixtures/pos-message-cases.json +3 -0
  193. package/fixtures/pos-texts.json +313 -3
  194. package/fixtures/receipt-due-generated.json +3 -3
  195. package/fixtures/receipt-due-voucher-generated.json +5 -5
  196. package/fixtures/receipts/invoice-payment-cancellation.json +70 -0
  197. package/fixtures/receipts/invoice-payment-manual-receipt.json +69 -0
  198. package/fixtures/receipts/invoice-payment-normal.json +65 -0
  199. package/fixtures/receipts/invoice-payment-outage.json +63 -0
  200. package/fixtures/receipts/invoice-payment-partial.json +63 -0
  201. package/fixtures/receipts/invoice-payment-refund.json +63 -0
  202. package/fixtures/receipts/invoice-payment-see-invoice.json +65 -0
  203. package/fixtures/receipts/invoice-payment-training.json +63 -0
  204. package/fixtures/receipts/invoice-payment-without-vat.json +63 -0
  205. package/fixtures/receipts/invoice-payment-zero-percent.json +65 -0
  206. package/fixtures/renames-1.0.json +10 -0
  207. package/fixtures/shift-ablauf-cases.json +4 -4
  208. package/fixtures/shift-cases.json +4 -2
  209. package/fixtures/shift-receipts-card-tips.json +73 -0
  210. package/fixtures/shift-receipts.json +9 -9
  211. package/fixtures/stored/card-tip-cases.json +132 -0
  212. package/fixtures/surface.json +23 -6
  213. package/fixtures/v3/antworten/belege.json +2 -2
  214. package/fixtures/v3/antworten/belegmail.json +2 -2
  215. package/fixtures/v3/antworten/berichte.json +2 -2
  216. package/fixtures/v3/antworten/kasse-belege.json +2 -2
  217. package/fixtures/v3/antworten/kasse.json +247 -127
  218. package/fixtures/v3/antworten/lager.json +1 -1
  219. package/fixtures/v3/antworten/rechnungen.json +2 -2
  220. package/fixtures/v3/antworten/storno.json +2 -2
  221. package/fixtures/v3/stored/belege.json +2 -2
  222. package/fixtures/v3/stored/kasse.json +3 -3
  223. package/fixtures/v3/stored/rechnungen.json +2 -2
  224. package/fixtures/v3/v3-vokabular.json +264 -21
  225. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  226. package/package.json +1 -1
@@ -35,8 +35,10 @@ export interface ReceiptItem {
35
35
  * Inhaber-Trinkgeld (`recipient.owner`) Umsatz. Rabatt-Positionen sind
36
36
  * negative Entgeltminderungen je Steuersatz; die Kennzeichnung steuert nur
37
37
  * die Bon-Darstellung (Summenzeile mit Aufteilung), nie die Beträge.
38
+ * `invoice_payment`: Zahlung auf Rechnung (Zahlungsbeleg, nur vom Server; Bezug in
39
+ * `Receipt.invoicePayments`), siehe [isInvoicePaymentItem].
38
40
  */
39
- kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return';
41
+ kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return' | 'invoice_payment';
40
42
  /** Empfaenger der Trinkgeld-Position; `null` = nicht zugeordnet. */
41
43
  recipient?: TipRecipient | null;
42
44
  /** Zahlart der Trinkgeld-Position (kann von der des Belegs abweichen). */
@@ -92,6 +94,12 @@ export interface ReceiptItem {
92
94
  export declare function isDepositItem(item: ReceiptItem | ReceiptItemPayloadRead): boolean;
93
95
  /** Leergutzeile (Ruecknahme, negativer Betrag)? */
94
96
  export declare function isDepositReturnItem(item: ReceiptItem | ReceiptItemPayloadRead): boolean;
97
+ /**
98
+ * Zahlung auf Rechnung (Zahlungsbeleg)? Die Position zaehlt im RKSV-Feld „Null“, ist aber kein
99
+ * steuerfreier Umsatz: die Umsatzsteuer steht auf der Rechnung. Am Bon steht sie ohne Satzkennzeichen
100
+ * und nicht in der Steuertabelle. Ein Beleg mit einer solchen Position besteht nur aus solchen.
101
+ */
102
+ export declare function isInvoicePaymentItem(item: ReceiptItem | ReceiptItemPayloadRead): boolean;
95
103
  /** Empfaenger einer Trinkgeld-Position (Kassen-Benutzer, Snapshot des Namens). */
96
104
  export interface TipRecipient {
97
105
  registerUserId: string;
@@ -121,7 +129,7 @@ export interface ReceiptItemPayload {
121
129
  unitPriceCents: number;
122
130
  vatRate: number;
123
131
  /** Trinkgeld-/Rabatt-/Gutschein-Kennzeichnung, siehe [ReceiptItem.kind]. */
124
- kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return';
132
+ kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return' | 'invoice_payment';
125
133
  recipient?: TipRecipient | null;
126
134
  paymentMethod?: string;
127
135
  receivedImmediately?: boolean;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isDepositItem = isDepositItem;
4
4
  exports.isDepositReturnItem = isDepositReturnItem;
5
+ exports.isInvoicePaymentItem = isInvoicePaymentItem;
5
6
  exports.isTipItem = isTipItem;
6
7
  exports.isDiscountItem = isDiscountItem;
7
8
  exports.isVoucherItem = isVoucherItem;
@@ -22,6 +23,14 @@ function isDepositItem(item) {
22
23
  function isDepositReturnItem(item) {
23
24
  return item != null && item.kind === 'deposit_return';
24
25
  }
26
+ /**
27
+ * Zahlung auf Rechnung (Zahlungsbeleg)? Die Position zaehlt im RKSV-Feld „Null“, ist aber kein
28
+ * steuerfreier Umsatz: die Umsatzsteuer steht auf der Rechnung. Am Bon steht sie ohne Satzkennzeichen
29
+ * und nicht in der Steuertabelle. Ein Beleg mit einer solchen Position besteht nur aus solchen.
30
+ */
31
+ function isInvoicePaymentItem(item) {
32
+ return item != null && item.kind === 'invoice_payment';
33
+ }
25
34
  /** Trinkgeld-Position? Die eine Erkennungsstelle — niemand prueft `kind` selbst. */
26
35
  function isTipItem(item) {
27
36
  return item != null && item.kind === 'tip';
@@ -75,6 +84,10 @@ function toReceiptItemPayload(item) {
75
84
  // (createReceipt weist sie als voucher_invalid ab).
76
85
  if (item.kind === 'voucher' || item.kind === 'voucher_float')
77
86
  nutzlast.kind = item.kind;
87
+ // Zahlung auf Rechnung (vom Server): reist mit wie die Gutschein-Positionen; ein Wunsch an den Server
88
+ // traegt sie nie (createReceipt weist sie ausser beim Selbstaufruf ab).
89
+ if (item.kind === 'invoice_payment')
90
+ nutzlast.kind = 'invoice_payment';
78
91
  // Pfand & Leergut: Kennzeichen und Felder reisen mit (Cache schreibt gelesene Belege wieder; ein Wunsch an
79
92
  // den Server traegt `deposit` nie mit `articleId`, siehe createReceiptParams).
80
93
  if (item.kind === 'deposit' || item.kind === 'deposit_return') {
@@ -144,7 +157,7 @@ function fromReceiptItemPayload(payload) {
144
157
  }
145
158
  : payload.kind === 'discount'
146
159
  ? { kind: 'discount' }
147
- : payload.kind === 'voucher' || payload.kind === 'voucher_float'
160
+ : payload.kind === 'voucher' || payload.kind === 'voucher_float' || payload.kind === 'invoice_payment'
148
161
  ? { kind: payload.kind }
149
162
  : payload.kind === 'deposit' || payload.kind === 'deposit_return'
150
163
  ? {
@@ -1,5 +1,6 @@
1
1
  import { ReceiptType, KeckPaymentMethod, CreditCardProvider } from '../enums/index.js';
2
2
  import { type ManualReceipt } from './manual-receipt.js';
3
+ import { type InvoicePaymentRef } from './invoice-payment-ref.js';
3
4
  import { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead } from './receipt-item.js';
4
5
  import { type Voucher, type VoucherPayload } from './voucher.js';
5
6
  import { type Cancellation, type CancellationOf, type CancellationReason } from './cancellation.js';
@@ -86,6 +87,11 @@ export interface Receipt {
86
87
  * Kasse `returns: 'shared'` hat und der Beleg Pfand traegt. Der Bon druckt daraus die Fusszeile.
87
88
  */
88
89
  sharedReturnPoint?: SharedReturnPoint;
90
+ /**
91
+ * Nur am Zahlungsbeleg (Zahlung auf Rechnung, Positionen `kind: 'invoice_payment'`): je Rechnung ein
92
+ * Bezug, in der Reihenfolge der Positionen (gespeichert `rechnungszahlung`). Siehe [InvoicePaymentRef].
93
+ */
94
+ invoicePayments?: InvoicePaymentRef[];
89
95
  }
90
96
  /** Gemeinsame Ruecknahmestelle fuer Leergut (Name und Anschrift, wie der Server sie am Beleg stempelt). */
91
97
  export interface SharedReturnPoint {
@@ -148,6 +154,7 @@ export interface ReceiptPayloadRead extends Omit<ReceiptPayload, 'items' | 'vouc
148
154
  name?: string | null;
149
155
  address?: string | null;
150
156
  } | null;
157
+ invoicePayments?: unknown;
151
158
  }
152
159
  /**
153
160
  * Schreibt die Nutzlast in der **neuen** Form — sie **normalisiert, statt zu
@@ -9,6 +9,7 @@ exports.receiptSumCents = receiptSumCents;
9
9
  const index_js_1 = require("../enums/index.js");
10
10
  const enum_payload_js_1 = require("./enum-payload.js");
11
11
  const manual_receipt_js_1 = require("./manual-receipt.js");
12
+ const invoice_payment_ref_js_1 = require("./invoice-payment-ref.js");
12
13
  const receipt_item_js_1 = require("./receipt-item.js");
13
14
  const voucher_js_1 = require("./voucher.js");
14
15
  const cancellation_js_1 = require("./cancellation.js");
@@ -99,8 +100,13 @@ function fromReceiptPayload(payload) {
99
100
  ...handbelegFeld(payload.manualReceipt),
100
101
  ...(typeof payload.onPremises === 'boolean' ? { onPremises: payload.onPremises } : {}),
101
102
  ...pfandStelleFeld(payload.sharedReturnPoint),
103
+ ...rechnungszahlungFeld(payload.invoicePayments),
102
104
  };
103
105
  }
106
+ function rechnungszahlungFeld(roh) {
107
+ const invoicePayments = (0, invoice_payment_ref_js_1.readInvoicePaymentRefs)(roh);
108
+ return invoicePayments ? { invoicePayments } : {};
109
+ }
104
110
  function pfandStelleFeld(roh) {
105
111
  if (roh == null || typeof roh !== 'object')
106
112
  return {};
@@ -21,7 +21,8 @@ export { type HpsConnectCancelOptions, type HpsConnectClient, type HpsConnectCli
21
21
  export { HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, } from './errors.js';
22
22
  export { type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, } from './events.js';
23
23
  export { type CardPaymentOutcome, type HpsPaymentResult, isHostUncertainResult, mayRetrySafely, } from './outcome.js';
24
- export { type HpsCancelOptions, type HpsPaymentOptions, type HpsPayments, type HpsPaymentsOptions, type HpsRefundOptions, createHpsPayments, } from './payments.js';
24
+ export { type HpsCancelOptions, type HpsClarifyOptions, type HpsPaymentOptions, type HpsPayments, type HpsPaymentsOptions, type HpsRefundOptions, createHpsPayments, } from './payments.js';
25
25
  export { MAX_TRANSACTION_ID_LENGTH, createHpsTransactionIdGenerator, isValidHpsTransactionId, newHpsTransactionId, type HpsTransactionIdGeneratorOptions, } from './transaction-id.js';
26
26
  export { ABORTED_CODE, APP_SELECT_FAILED_CODE, APPROVED_CODE, BAD_REQUEST_CODE, CARD_DECLINED_CODE, CARD_INFO_NOT_ENTERED_CODE, CARD_NOT_PRESENT_CODE, CARD_NOT_SUPPORTED_CODE, CARD_READ_FAILED_CODE, CHIP_DATA_MISMATCH_CODE, COMPLETION_FAILED_CODE, DIAGNOSIS_FAILED_CODE, HOST_COMMUNICATION_FAILED_CODE, HOST_STEP_FAILED_CODE, HOST_TIMEOUT_REVERSED_CODE, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, INTERNAL_ERROR_CODE, INVALID_MESSAGE_TYPE_CODE, INVALID_TID_DOCUMENTED_CODE, INVALID_TX_TYPE_CODE, MAX_RETRIES_EXCEEDED_CODE, NOT_FOUND_CODE, PASSWORD_NOT_ENTERED_CODE, REFUND_DISABLED_CODE, REFUND_PASSWORD_INVALID_CODE, SCEP_ENROLLMENT_FAILED_CODE, TERMINAL_BLOCKED_CODE, TERMINAL_BUSY_CODE, TIP_SELECTION_FAILED_CODE, UNSUPPORTED_USER_DATA_CODE, hpsCodeInfo, hpsCodeReason, isHostUncertain, isHostUncertainReason, INVALID_TRANSACTION_CODE, NOT_ABORTABLE_CODE, INVALID_AMOUNT_CODE, AMOUNT_OUT_OF_RANGE_CODE, INVALID_TID_CODE, WRONG_PIN_CODE, NO_STATEMENT_CODE, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, isApproved, isCanceled, isConclusive, isConclusiveAsStatus, isInProgress, isNoStatement, isNotAbortable, needsReversal, normalizeHpsCode, isTechnicalError, isUnknownCode, parseHpsTransactionResponse, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsTransactionResponse, } from './transaction-response.js';
27
27
  export { hobexReceiptFromHps } from './receipt.js';
28
+ export { HOBEX_SUPPORT } from './support.js';
@@ -20,7 +20,7 @@
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.hpsCodeReason = exports.hpsCodeInfo = exports.UNSUPPORTED_USER_DATA_CODE = exports.TIP_SELECTION_FAILED_CODE = exports.TERMINAL_BUSY_CODE = exports.TERMINAL_BLOCKED_CODE = exports.SCEP_ENROLLMENT_FAILED_CODE = exports.REFUND_PASSWORD_INVALID_CODE = exports.REFUND_DISABLED_CODE = exports.PASSWORD_NOT_ENTERED_CODE = exports.NOT_FOUND_CODE = exports.MAX_RETRIES_EXCEEDED_CODE = exports.INVALID_TX_TYPE_CODE = exports.INVALID_TID_DOCUMENTED_CODE = exports.INVALID_MESSAGE_TYPE_CODE = exports.INTERNAL_ERROR_CODE = exports.HPS_REASON_HINTS = exports.HPS_MEASURED_CODES = exports.HPS_CODES = exports.HOST_TIMEOUT_REVERSED_CODE = exports.HOST_STEP_FAILED_CODE = exports.HOST_COMMUNICATION_FAILED_CODE = exports.DIAGNOSIS_FAILED_CODE = exports.COMPLETION_FAILED_CODE = exports.CHIP_DATA_MISMATCH_CODE = exports.CARD_READ_FAILED_CODE = exports.CARD_NOT_SUPPORTED_CODE = exports.CARD_NOT_PRESENT_CODE = exports.CARD_INFO_NOT_ENTERED_CODE = exports.CARD_DECLINED_CODE = exports.BAD_REQUEST_CODE = exports.APPROVED_CODE = exports.APP_SELECT_FAILED_CODE = exports.ABORTED_CODE = exports.newHpsTransactionId = exports.isValidHpsTransactionId = exports.createHpsTransactionIdGenerator = exports.MAX_TRANSACTION_ID_LENGTH = exports.createHpsPayments = exports.mayRetrySafely = exports.isHostUncertainResult = exports.TERMINAL_UNREACHABLE_CONNECT_CODES = exports.PREFLIGHT_CONNECT_CODES = exports.HpsTransactionIdError = exports.HpsPreflightError = exports.HpsConnectTransportError = exports.HpsConnectTerminalError = exports.HpsConnectException = exports.HpsClarifyTimeoutError = exports.createHpsConnectClient = void 0;
23
- exports.hobexReceiptFromHps = exports.parseHpsTransactionResponse = exports.isUnknownCode = exports.isTechnicalError = exports.normalizeHpsCode = exports.needsReversal = exports.isNotAbortable = exports.isNoStatement = exports.isInProgress = exports.isConclusiveAsStatus = exports.isConclusive = exports.isCanceled = exports.isApproved = exports.TRANSACTION_CANCELED_CODE = exports.TERMINAL_BUSY_HTTP_STATUS = exports.NOT_FOUND_HTTP_STATUS = exports.TECHNICAL_ERROR_CODE = exports.NO_STATEMENT_CODE = exports.WRONG_PIN_CODE = exports.INVALID_TID_CODE = exports.AMOUNT_OUT_OF_RANGE_CODE = exports.INVALID_AMOUNT_CODE = exports.NOT_ABORTABLE_CODE = exports.INVALID_TRANSACTION_CODE = exports.isHostUncertainReason = exports.isHostUncertain = void 0;
23
+ exports.HOBEX_SUPPORT = exports.hobexReceiptFromHps = exports.parseHpsTransactionResponse = exports.isUnknownCode = exports.isTechnicalError = exports.normalizeHpsCode = exports.needsReversal = exports.isNotAbortable = exports.isNoStatement = exports.isInProgress = exports.isConclusiveAsStatus = exports.isConclusive = exports.isCanceled = exports.isApproved = exports.TRANSACTION_CANCELED_CODE = exports.TERMINAL_BUSY_HTTP_STATUS = exports.NOT_FOUND_HTTP_STATUS = exports.TECHNICAL_ERROR_CODE = exports.NO_STATEMENT_CODE = exports.WRONG_PIN_CODE = exports.INVALID_TID_CODE = exports.AMOUNT_OUT_OF_RANGE_CODE = exports.INVALID_AMOUNT_CODE = exports.NOT_ABORTABLE_CODE = exports.INVALID_TRANSACTION_CODE = exports.isHostUncertainReason = exports.isHostUncertain = void 0;
24
24
  var connect_client_js_1 = require("./connect-client.js");
25
25
  Object.defineProperty(exports, "createHpsConnectClient", { enumerable: true, get: function () { return connect_client_js_1.createHpsConnectClient; } });
26
26
  var errors_js_1 = require("./errors.js");
@@ -104,3 +104,5 @@ Object.defineProperty(exports, "isUnknownCode", { enumerable: true, get: functio
104
104
  Object.defineProperty(exports, "parseHpsTransactionResponse", { enumerable: true, get: function () { return transaction_response_js_1.parseHpsTransactionResponse; } });
105
105
  var receipt_js_1 = require("./receipt.js");
106
106
  Object.defineProperty(exports, "hobexReceiptFromHps", { enumerable: true, get: function () { return receipt_js_1.hobexReceiptFromHps; } });
107
+ var support_js_1 = require("./support.js");
108
+ Object.defineProperty(exports, "HOBEX_SUPPORT", { enumerable: true, get: function () { return support_js_1.HOBEX_SUPPORT; } });
@@ -48,6 +48,16 @@ export interface HpsPaymentResult {
48
48
  * Terminal etwas sagte) und bei einer Aufhebung, die nicht gegriffen hat.
49
49
  */
50
50
  readonly reason?: HpsCodeReason;
51
+ /**
52
+ * Gesetzt, wenn dieses Ergebnis aus einer SPAETEN Nachfrage stammt
53
+ * (`HpsPayments.clarifyPayment`). Ein solches Ergebnis taugt nicht als
54
+ * `previous` einer weiteren Nachfrage: die Vorgeschichte einer Zahlung ist
55
+ * das Ergebnis von `pay`, und das bleibt sie -- ein `reason` aus der
56
+ * Nachfrage selbst (etwa `noStatement`) sagt nichts darueber, ob die
57
+ * Klaerung von `pay` ein Storno nachgeschickt hat. Die Nachfrage weist ein
58
+ * so markiertes `previous` deshalb zurueck: keine Antwort entscheidet.
59
+ */
60
+ readonly clarified?: true;
51
61
  /**
52
62
  * Verlauf der Klaerung, in Reihenfolge — der Nachweis, der im
53
63
  * Belastungsstreit gelesen wird. Behauptet nie eine Ursache, die nicht
@@ -219,11 +219,65 @@ export interface HpsCancelOptions {
219
219
  currency?: string;
220
220
  language?: string;
221
221
  }
222
+ export interface HpsClarifyOptions {
223
+ /** Kennung der Zahlung aus [HpsPayments.pay] -- keine Gutschrift, keine Aufhebung. */
224
+ transactionId: string;
225
+ /**
226
+ * Was ueber die bisherige Klaerung dieser Zahlung feststeht. Davon haengt
227
+ * ab, was eine Antwort des Terminals jetzt noch beweist, siehe
228
+ * [HpsPayments.clarifyPayment]:
229
+ *
230
+ * - das `unresolved`-Ergebnis von [HpsPayments.pay] (es zaehlen `reason` und
231
+ * `clarified`). NIE das Ergebnis einer Nachfrage: dessen `reason` stammt
232
+ * aus der Nachfrage, nicht aus der Zahlung, und wuerde eine unbekannte
233
+ * Vorgeschichte reinwaschen -- ein mit `clarified` markiertes Ergebnis
234
+ * zaehlt deshalb wie `null`;
235
+ * - `'beforeResolve'`: die Zahlung wurde gestartet, ihre Klaerung hat aber
236
+ * nie begonnen -- etwa weil die Seite waehrend des Kartenflows abriss. Es
237
+ * wurde dann sicher kein Storno nachgeschickt. Nur angeben, wenn das
238
+ * Beobachter-Ereignis `resolving` nachweislich nie kam (es wird vor dem
239
+ * ersten Abbruch- oder Storno-Aufruf gemeldet); im Zweifel `null`;
240
+ * - `null`: nicht bekannt (etwa ein Eintrag aus einer aelteren Fassung, oder
241
+ * die Seite riss waehrend der Klaerung ab).
242
+ */
243
+ previous: Pick<HpsPaymentResult, 'reason' | 'clarified'> | 'beforeResolve' | null;
244
+ }
222
245
  export interface HpsPayments {
223
246
  pay(options: HpsPaymentOptions): Promise<HpsPaymentResult>;
224
247
  /** Gutschrift, geklaert wie [pay] -- siehe Klassendoku oben. */
225
248
  refund(options: HpsRefundOptions): Promise<HpsPaymentResult>;
226
249
  /** Aufhebung (Storno/Void) einer bestehenden Zahlung -- eigener Klaerweg, siehe Klassendoku oben. */
227
250
  cancel(options: HpsCancelOptions): Promise<HpsPaymentResult>;
251
+ /**
252
+ * Fragt den Ausgang einer Zahlung SPAETER noch einmal ab -- etwa wenn der
253
+ * Kassier eine unklare Karte klaert. Liest nur: kein Abbruch, kein Storno,
254
+ * kein neuer Vorgang. Das Ergebnis hat dieselbe Form wie das von [pay].
255
+ *
256
+ * Entschieden wird nur, was nach [HpsClarifyOptions.previous] feststeht
257
+ * ([nachfrageRegel]):
258
+ *
259
+ * | bisher | `'0'` | `9011` | andere Ablehnung |
260
+ * |---|---|---|---|
261
+ * | `'beforeResolve'`, oder offen ohne Stoerung beim Host | `approved` | `declined` | `declined` |
262
+ * | Stoerung beim Host, Storno sicher versucht (`hostFault`, `hostTimeout`) | offen | `declined` | offen |
263
+ * | andere Stoerung beim Host | offen | offen | offen |
264
+ * | `null` oder Ergebnis einer Nachfrage (`clarified`) | offen | offen | offen |
265
+ *
266
+ * Nach einer Stoerung beim Host kann die Klaerung von [pay] ein Storno
267
+ * nachgeschickt haben -- auch wenn der erste Code keines verlangte, denn
268
+ * ein spaeterer Status kann es noch ausloesen. Ein `'0'` beweist dann
269
+ * nichts (siehe Klassendoku, "Storno nach ausbleibender Host-Antwort").
270
+ * `9011` (aufgehoben) heisst nur dann sicher "nichts belastet", wenn ein
271
+ * Storno sicher versucht wurde -- wie in der Klaerung von [pay]. `9027`
272
+ * bleibt hier immer ohne Aussage: die Zwei-9027-Regel braucht die Antwort
273
+ * auf die Zahlung selbst. Meldet der Status selbst eine Stoerung beim
274
+ * Host, entscheidet danach nur noch `'0'`.
275
+ *
276
+ * Sagt der Status zweimal in Folge nichts, endet die Nachfrage sofort als
277
+ * `unresolved` -- die Zahlung ist laengst beendet, das Terminal wird es
278
+ * auch spaeter nicht wissen. Budget: ein Sechstel von
279
+ * [HpsPaymentsOptions.resolveBudgetMs] (Vorgabe 15 s).
280
+ */
281
+ clarifyPayment(options: HpsClarifyOptions): Promise<HpsPaymentResult>;
228
282
  }
229
283
  export declare function createHpsPayments(client: HpsConnectClient, target: HpsConnectTarget, options?: HpsPaymentsOptions): HpsPayments;
@@ -6,6 +6,32 @@ const transaction_id_js_1 = require("./transaction-id.js");
6
6
  const transaction_response_js_1 = require("./transaction-response.js");
7
7
  /** Teiler, mit dem das Abbruchbudget aus [HpsPaymentsOptions.resolveBudgetMs] entsteht. */
8
8
  const ABORT_BUDGET_DIVISOR = 6;
9
+ /** Teiler fuer das Budget von [HpsPayments.clarifyPayment]: bei der Vorgabe 15 s. */
10
+ const CLARIFY_BUDGET_DIVISOR = 6;
11
+ /**
12
+ * `true`, wenn die Klaerung von [HpsPayments.pay] bei diesem Grund sicher ein
13
+ * Storno versucht hat: der Grund kommt von der ersten Stoerung beim Host
14
+ * ([offenerGrund]), und JEDER Code mit diesem Grund verlangt ein Storno. Aus
15
+ * der Tabelle gerechnet, damit ein neuer Code ohne Storno die Regel nicht
16
+ * still bricht.
17
+ */
18
+ function stornoSicherVersucht(reason) {
19
+ const codes = transaction_response_js_1.HPS_CODES.filter((c) => c.reason === reason);
20
+ return codes.length > 0 && codes.every((c) => c.sendReversal);
21
+ }
22
+ /** Siehe Tabelle an [HpsPayments.clarifyPayment]. */
23
+ function nachfrageRegel(previous) {
24
+ if (previous === null || (previous !== 'beforeResolve' && previous.clarified === true)) {
25
+ return { genehmigt: false, aufgehoben: false, abgelehnt: false };
26
+ }
27
+ if (previous === 'beforeResolve')
28
+ return { genehmigt: true, aufgehoben: true, abgelehnt: true };
29
+ const reason = previous.reason;
30
+ if (reason !== undefined && (0, transaction_response_js_1.isHostUncertainReason)(reason)) {
31
+ return { genehmigt: false, aufgehoben: stornoSicherVersucht(reason), abgelehnt: false };
32
+ }
33
+ return { genehmigt: true, aufgehoben: true, abgelehnt: true };
34
+ }
9
35
  /**
10
36
  * Teiler fuer das Budget des nachgeschickten Stornos: ein Drittel, bei der
11
37
  * Vorgabe 30 s. Ein Storno geht ueber den Host und darf Sekunden brauchen.
@@ -53,6 +79,7 @@ function createHpsPayments(client, target, options = {}) {
53
79
  const observer = options.observer;
54
80
  const abortBudgetMs = Math.trunc(resolveBudgetMs / ABORT_BUDGET_DIVISOR);
55
81
  const reversalBudgetMs = Math.trunc(resolveBudgetMs / REVERSAL_BUDGET_DIVISOR);
82
+ const clarifyBudgetMs = Math.trunc(resolveBudgetMs / CLARIFY_BUDGET_DIVISOR);
56
83
  function emit(kind, message, transactionId) {
57
84
  if (!observer)
58
85
  return;
@@ -854,5 +881,134 @@ function createHpsPayments(client, target, options = {}) {
854
881
  }
855
882
  return resolveCancel(id, steps, res);
856
883
  }
857
- return { pay, refund, cancel };
884
+ /**
885
+ * Spaete Nachfrage zu einer Zahlung, siehe [HpsPayments.clarifyPayment].
886
+ * Liest nur den Status -- nie ein Abbruch, nie ein Storno. Wirft wie [pay]
887
+ * nur [HpsPreflightError]: Connect hat die Abfrage abgewiesen, bevor sie
888
+ * das Terminal erreichte (etwa `terminal_unreachable`).
889
+ */
890
+ async function clarifyPayment(clarifyOptions) {
891
+ const id = clarifyOptions.transactionId;
892
+ const previous = clarifyOptions.previous;
893
+ const regel = nachfrageRegel(previous);
894
+ // Ein Nachfrage-Ergebnis als Vorgeschichte zaehlt wie "nicht bekannt" --
895
+ // auch sein `reason` (siehe [HpsPaymentResult.clarified]).
896
+ const vorgeschichteBekannt = previous !== null && (previous === 'beforeResolve' || previous.clarified !== true);
897
+ const vorherGrund = vorgeschichteBekannt && typeof previous === 'object' ? previous.reason : undefined;
898
+ const vorherGestoert = vorherGrund !== undefined && (0, transaction_response_js_1.isHostUncertainReason)(vorherGrund);
899
+ const steps = [nachfrageAnfang(previous, regel)];
900
+ emit('resolving', steps[0], id);
901
+ const start = now();
902
+ const elapsedMs = () => now() - start;
903
+ let wait = 0;
904
+ let transportFailures = 0;
905
+ let ohneAussage = 0;
906
+ // Die erste Stoerung beim Host, die der Status in DIESER Nachfrage meldet.
907
+ let stoerung;
908
+ let letzteAntwort;
909
+ // Ein schluessiger Code, der hier nicht entscheiden durfte (`'0'`, `9011`, eine
910
+ // Ablehnung), erklaert den offenen Ausgang nicht -- sonst stuende etwa „genehmigt“
911
+ // als Grund an einem offenen Ergebnis (Geraetetest 11.11.2026, Vorgeschichte unbekannt).
912
+ const offen = () => {
913
+ const erklaerend = letzteAntwort && !(0, transaction_response_js_1.isConclusiveAsStatus)(letzteAntwort) ? letzteAntwort : undefined;
914
+ return {
915
+ ...open(id, steps, letzteAntwort, vorherGrund ?? offenerGrund(stoerung, erklaerend)),
916
+ clarified: true,
917
+ };
918
+ };
919
+ /** Warum eine Antwort, die sonst entschiede, hier nichts sagt. */
920
+ const vorbehalt = () => {
921
+ if (!vorgeschichteBekannt)
922
+ return 'der bisherige Klaerweg ist nicht bekannt, ein Storno kann nachgeschickt sein';
923
+ if (vorherGestoert)
924
+ return `nach der Stoerung beim hobex-Host (${vorherGrund}) kann ein Storno nachgeschickt sein`;
925
+ return 'das Terminal meldet eine Stoerung beim hobex-Host';
926
+ };
927
+ while (elapsedMs() < clarifyBudgetMs) {
928
+ if (wait > 0) {
929
+ await sleep(Math.min(wait, clarifyBudgetMs - elapsedMs()));
930
+ if (elapsedMs() >= clarifyBudgetMs)
931
+ break;
932
+ }
933
+ let status;
934
+ try {
935
+ status = await withinBudget(elapsedMs, () => client.status({ ...target, transactionId: id }), clarifyBudgetMs - elapsedMs());
936
+ transportFailures = 0;
937
+ letzteAntwort = status;
938
+ }
939
+ catch (e) {
940
+ if (e instanceof errors_js_1.HpsPreflightError)
941
+ throw e;
942
+ transportFailures += 1;
943
+ steps.push(`Statusabfrage gescheitert (${transportFailures}): ${describe(e)}`);
944
+ noteUnexpected(e, id);
945
+ if (transportFailures >= maxTransportFailures) {
946
+ steps.push('Terminal antwortet nicht -- Ausgang bleibt offen');
947
+ return offen();
948
+ }
949
+ wait = nextWait(wait);
950
+ continue;
951
+ }
952
+ if ((0, transaction_response_js_1.isHostUncertain)(status))
953
+ stoerung ??= status;
954
+ // Wie in [resolve]: nach einer Stoerung beim Host -- vorher oder jetzt
955
+ // gemeldet -- entscheidet hoechstens noch die Genehmigung.
956
+ const gestoert = vorherGestoert || stoerung !== undefined;
957
+ if ((0, transaction_response_js_1.isApproved)(status)) {
958
+ if (regel.genehmigt) {
959
+ const settled = fromResponse(status, id, steps);
960
+ if (settled)
961
+ return { ...settled, clarified: true };
962
+ }
963
+ steps.push(`Status: genehmigt (${transaction_response_js_1.APPROVED_CODE}) -- ${vorbehalt()}, keine Aussage`);
964
+ }
965
+ else if ((0, transaction_response_js_1.isCanceled)(status) && regel.aufgehoben && (vorherGestoert || stoerung === undefined)) {
966
+ steps.push(`Status: Zahlung aufgehoben (${transaction_response_js_1.TRANSACTION_CANCELED_CODE}) -- es ist nichts belastet`);
967
+ emit('resolved', steps[steps.length - 1], id);
968
+ return { outcome: 'declined', transactionId: id, response: status, reason: 'canceled', clarified: true, steps: [...steps] };
969
+ }
970
+ else if (regel.abgelehnt && !gestoert && (0, transaction_response_js_1.isConclusiveAsStatus)(status)) {
971
+ const settled = fromResponse(status, id, steps);
972
+ if (settled)
973
+ return { ...settled, clarified: true };
974
+ }
975
+ else if ((0, transaction_response_js_1.isConclusiveAsStatus)(status)) {
976
+ const info = (0, transaction_response_js_1.hpsCodeInfo)(status.responseCode);
977
+ const was = (0, transaction_response_js_1.isCanceled)(status) ? 'aufgehoben' : 'abgelehnt';
978
+ steps.push(`Status: ${was} (${info.code} "${info.title}") -- ${vorbehalt()}, keine Aussage`);
979
+ }
980
+ else {
981
+ steps.push(statusOhneErgebnis(status) ?? 'Status: noch kein Ergebniscode');
982
+ }
983
+ ohneAussage += 1;
984
+ if (ohneAussage >= 2) {
985
+ steps.push('Statusabfrage zweimal ohne Aussage -- das Terminal kann es nicht sagen, Ausgang bleibt offen');
986
+ return offen();
987
+ }
988
+ wait = nextWait(wait);
989
+ }
990
+ steps.push('Ausgang bleibt offen');
991
+ return offen();
992
+ }
993
+ return { pay, refund, cancel, clarifyPayment };
994
+ }
995
+ /** Erster Eintrag im Nachweis einer spaeten Nachfrage: was sie entscheiden darf. */
996
+ function nachfrageAnfang(previous, regel) {
997
+ const anfang = 'Spaete Nachfrage beim Terminal -- nur lesend, ohne Abbruch und ohne Storno';
998
+ if (previous === null)
999
+ return `${anfang}; der bisherige Klaerweg ist nicht bekannt, keine Antwort entscheidet`;
1000
+ if (previous !== 'beforeResolve' && previous.clarified === true) {
1001
+ return `${anfang}; als Vorgeschichte kam das Ergebnis einer frueheren Nachfrage, nicht das der Zahlung -- `
1002
+ + 'der Klaerweg der Zahlung bleibt unbekannt, keine Antwort entscheidet';
1003
+ }
1004
+ if (previous === 'beforeResolve') {
1005
+ return `${anfang}; die Klaerung der Zahlung hatte nicht begonnen, es wurde kein Storno nachgeschickt`;
1006
+ }
1007
+ if (previous.reason !== undefined && (0, transaction_response_js_1.isHostUncertainReason)(previous.reason)) {
1008
+ return regel.aufgehoben
1009
+ ? `${anfang}; nach der Stoerung beim hobex-Host (${previous.reason}) wurde ein Storno versucht, `
1010
+ + `entscheidet nur "aufgehoben" (${transaction_response_js_1.TRANSACTION_CANCELED_CODE})`
1011
+ : `${anfang}; nach der Stoerung beim hobex-Host (${previous.reason}) entscheidet keine Antwort`;
1012
+ }
1013
+ return `${anfang}; die Klaerung der Zahlung endete offen ohne Stoerung beim hobex-Host`;
858
1014
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Technik von hobex fuer Haendler mit hobex-Terminal, rund um die Uhr
3
+ * erreichbar. Quelle: Angabe des Inhabers am 11.11.2026 („hobex Technik
4
+ * 0662 225588“); es ist die Durchwahl 88 der Zentrale +43 662 2255-0 (hobex,
5
+ * „Zahlen & Fakten“).
6
+ *
7
+ * `phone` international (fuer einen `tel:`-Link nur Ziffern und `+` daraus
8
+ * nehmen), `display` so, wie man sie in Oesterreich liest und waehlt.
9
+ * Gedacht fuer die Stellen, an denen hobex helfen kann: Stoerung beim
10
+ * hobex-Host, Terminal nicht betriebsbereit, TID passt nicht, das Terminal hat
11
+ * geantwortet und kennt den Ausgang nicht -- nie fuer Fehler im eigenen Netz
12
+ * oder an Kasseneck Connect. Die Kasse zeigt sie in einem eigenen Fenster mit
13
+ * den Angaben, die hobex fragt (Beschriftungen `hobex_help.*` im Katalog).
14
+ */
15
+ export declare const HOBEX_SUPPORT: Readonly<{
16
+ readonly phone: "+43 662 2255-88";
17
+ readonly display: "0662 2255-88";
18
+ readonly availability: "24/7";
19
+ }>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HOBEX_SUPPORT = void 0;
4
+ /**
5
+ * Technik von hobex fuer Haendler mit hobex-Terminal, rund um die Uhr
6
+ * erreichbar. Quelle: Angabe des Inhabers am 11.11.2026 („hobex Technik
7
+ * 0662 225588“); es ist die Durchwahl 88 der Zentrale +43 662 2255-0 (hobex,
8
+ * „Zahlen & Fakten“).
9
+ *
10
+ * `phone` international (fuer einen `tel:`-Link nur Ziffern und `+` daraus
11
+ * nehmen), `display` so, wie man sie in Oesterreich liest und waehlt.
12
+ * Gedacht fuer die Stellen, an denen hobex helfen kann: Stoerung beim
13
+ * hobex-Host, Terminal nicht betriebsbereit, TID passt nicht, das Terminal hat
14
+ * geantwortet und kennt den Ausgang nicht -- nie fuer Fehler im eigenen Netz
15
+ * oder an Kasseneck Connect. Die Kasse zeigt sie in einem eigenen Fenster mit
16
+ * den Angaben, die hobex fragt (Beschriftungen `hobex_help.*` im Katalog).
17
+ */
18
+ exports.HOBEX_SUPPORT = Object.freeze({
19
+ phone: '+43 662 2255-88',
20
+ display: '0662 2255-88',
21
+ availability: '24/7',
22
+ });
@@ -59,7 +59,7 @@ const tecs_codes_js_1 = require("./tecs-codes.js");
59
59
  /** Der Satz fuer den Bediener je Grund, deutsch. */
60
60
  exports.HPS_REASON_HINTS = {
61
61
  approved: 'Vom Terminal genehmigt.',
62
- approvedWithCondition: 'Das Terminal meldet eine Genehmigung mit Vorbehalt (etwa nur über einen Teilbetrag). Ob und in welcher Höhe belastet wurde, bitte am Terminalbeleg prüfen – nicht erneut kassieren, bevor es geklärt ist.',
62
+ approvedWithCondition: 'Das Terminal meldet eine Genehmigung mit Vorbehalt (etwa nur über einen Teilbetrag). Ob und in welcher Höhe belastet wurde, weiß hobex – nicht erneut kassieren, bevor es geklärt ist.',
63
63
  aborted: 'Der Vorgang wurde abgebrochen. Es wurde kein Geld bewegt.',
64
64
  noCard: 'Es wurde keine Karte vorgehalten. Es wurde kein Geld bewegt – bitte erneut versuchen.',
65
65
  cardReadFailed: 'Die Karte konnte nicht gelesen werden. Es wurde kein Geld bewegt – bitte erneut versuchen, notfalls die Karte stecken statt auflegen.',
@@ -43,4 +43,4 @@
43
43
  export { StripeLinkMode, type StripeLinkModeKey } from '../enums/index.js';
44
44
  export { type CreateStripeLinkOptions, type StripeCaptureResult, createStripeLink, stripeCaptureIntent, } from './stripe.js';
45
45
  export { type HobexPayOptions, type HobexRefundOptions, type HobexTransactionIdOptions, hobexPay, hobexRefund, newHobexTransactionId, } from './hobex.js';
46
- export { type CardPaymentOutcome, type HpsConnectClient, type HpsConnectCancelOptions, type HpsConnectClientOptions, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, type HpsCancelOptions, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, type HpsPaymentOptions, type HpsPayments, type HpsPaymentResult, type HpsPaymentsOptions, type HpsRefundOptions, type HpsTransactionIdGeneratorOptions, type HpsTransactionResponse, ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
46
+ export { type CardPaymentOutcome, type HpsConnectClient, type HpsConnectCancelOptions, type HpsConnectClientOptions, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, type HpsCancelOptions, type HpsClarifyOptions, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, type HpsPaymentOptions, type HpsPayments, type HpsPaymentResult, type HpsPaymentsOptions, type HpsRefundOptions, type HpsTransactionIdGeneratorOptions, type HpsTransactionResponse, ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HOBEX_SUPPORT, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
@@ -42,7 +42,7 @@
42
42
  * nichts zu entscheiden.
43
43
  */
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.TRANSACTION_CANCELED_CODE = exports.TERMINAL_BUSY_HTTP_STATUS = exports.NOT_FOUND_HTTP_STATUS = exports.TECHNICAL_ERROR_CODE = exports.TERMINAL_UNREACHABLE_CONNECT_CODES = exports.PREFLIGHT_CONNECT_CODES = exports.parseHpsTransactionResponse = exports.NO_STATEMENT_CODE = exports.NOT_ABORTABLE_CODE = exports.newHpsTransactionId = exports.MAX_TRANSACTION_ID_LENGTH = exports.mayRetrySafely = exports.isValidHpsTransactionId = exports.isUnknownCode = exports.isTechnicalError = exports.isNotAbortable = exports.isNoStatement = exports.isInProgress = exports.isHostUncertainResult = exports.isHostUncertain = exports.isConclusiveAsStatus = exports.isConclusive = exports.isApproved = exports.INVALID_TRANSACTION_CODE = exports.HpsTransactionIdError = exports.HpsPreflightError = exports.HpsConnectTransportError = exports.HpsConnectTerminalError = exports.HpsConnectException = exports.HpsClarifyTimeoutError = exports.hobexReceiptFromHps = exports.hpsCodeReason = exports.hpsCodeInfo = exports.HPS_REASON_HINTS = exports.HPS_MEASURED_CODES = exports.HPS_CODES = exports.createHpsTransactionIdGenerator = exports.createHpsPayments = exports.createHpsConnectClient = exports.CARD_NOT_PRESENT_CODE = exports.APPROVED_CODE = exports.ABORTED_CODE = exports.newHobexTransactionId = exports.hobexRefund = exports.hobexPay = exports.stripeCaptureIntent = exports.createStripeLink = exports.StripeLinkMode = void 0;
45
+ exports.TRANSACTION_CANCELED_CODE = exports.TERMINAL_BUSY_HTTP_STATUS = exports.NOT_FOUND_HTTP_STATUS = exports.TECHNICAL_ERROR_CODE = exports.TERMINAL_UNREACHABLE_CONNECT_CODES = exports.PREFLIGHT_CONNECT_CODES = exports.parseHpsTransactionResponse = exports.NO_STATEMENT_CODE = exports.NOT_ABORTABLE_CODE = exports.newHpsTransactionId = exports.MAX_TRANSACTION_ID_LENGTH = exports.mayRetrySafely = exports.isValidHpsTransactionId = exports.isUnknownCode = exports.isTechnicalError = exports.isNotAbortable = exports.isNoStatement = exports.isInProgress = exports.isHostUncertainResult = exports.isHostUncertain = exports.isConclusiveAsStatus = exports.isConclusive = exports.isApproved = exports.INVALID_TRANSACTION_CODE = exports.HpsTransactionIdError = exports.HpsPreflightError = exports.HpsConnectTransportError = exports.HpsConnectTerminalError = exports.HpsConnectException = exports.HpsClarifyTimeoutError = exports.hobexReceiptFromHps = exports.hpsCodeReason = exports.hpsCodeInfo = exports.HPS_REASON_HINTS = exports.HPS_MEASURED_CODES = exports.HPS_CODES = exports.HOBEX_SUPPORT = exports.createHpsTransactionIdGenerator = exports.createHpsPayments = exports.createHpsConnectClient = exports.CARD_NOT_PRESENT_CODE = exports.APPROVED_CODE = exports.ABORTED_CODE = exports.newHobexTransactionId = exports.hobexRefund = exports.hobexPay = exports.stripeCaptureIntent = exports.createStripeLink = exports.StripeLinkMode = void 0;
46
46
  var index_js_1 = require("../enums/index.js");
47
47
  Object.defineProperty(exports, "StripeLinkMode", { enumerable: true, get: function () { return index_js_1.StripeLinkMode; } });
48
48
  var stripe_js_1 = require("./stripe.js");
@@ -59,6 +59,7 @@ Object.defineProperty(exports, "CARD_NOT_PRESENT_CODE", { enumerable: true, get:
59
59
  Object.defineProperty(exports, "createHpsConnectClient", { enumerable: true, get: function () { return index_js_2.createHpsConnectClient; } });
60
60
  Object.defineProperty(exports, "createHpsPayments", { enumerable: true, get: function () { return index_js_2.createHpsPayments; } });
61
61
  Object.defineProperty(exports, "createHpsTransactionIdGenerator", { enumerable: true, get: function () { return index_js_2.createHpsTransactionIdGenerator; } });
62
+ Object.defineProperty(exports, "HOBEX_SUPPORT", { enumerable: true, get: function () { return index_js_2.HOBEX_SUPPORT; } });
62
63
  Object.defineProperty(exports, "HPS_CODES", { enumerable: true, get: function () { return index_js_2.HPS_CODES; } });
63
64
  Object.defineProperty(exports, "HPS_MEASURED_CODES", { enumerable: true, get: function () { return index_js_2.HPS_MEASURED_CODES; } });
64
65
  Object.defineProperty(exports, "HPS_REASON_HINTS", { enumerable: true, get: function () { return index_js_2.HPS_REASON_HINTS; } });
@@ -21,7 +21,7 @@ import { KasseneckApiError } from '../client/errors.js';
21
21
  * ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
22
22
  * Rueckfallzweig.
23
23
  */
24
- export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "deposit_follows_item", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_in_use", "deposit_type_not_found", "deposit_type_not_issued", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "filler_role_required", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_deposit", "invalid_deposit_quantity", "invalid_discount_preset", "invalid_item_kind", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "too_many_deposit_types", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
24
+ export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "deposit_follows_item", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_in_use", "deposit_type_not_found", "deposit_type_not_issued", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "filler_role_required", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_deposit", "invalid_deposit_quantity", "invalid_discount_preset", "invalid_item_kind", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_a_person_login", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "too_many_deposit_types", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
25
25
  export type PosErrorCode = typeof POS_ERROR_CODES[number];
26
26
  export declare function isPosErrorCode(value: unknown): value is PosErrorCode;
27
27
  /** Der Code eines geworfenen Fehlers, wenn er in [POS_ERROR_CODES] steht; sonst `undefined`. */
@@ -81,6 +81,7 @@ exports.POS_ERROR_CODES = Object.freeze([
81
81
  'method_not_allowed',
82
82
  'mfa_required',
83
83
  'module_inactive',
84
+ 'not_a_person_login',
84
85
  'not_found',
85
86
  'not_permitted',
86
87
  'note_required',
@@ -6,7 +6,7 @@
6
6
  * die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
7
7
  * und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
8
8
  */
9
- export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, tipKeptFor, type TipKeptDecision, DISCOUNT_PRESET_KIND, type PosDiscountPreset, type PosDiscountPresetKind, POS_BUSINESS_OPTIONAL_LISTS, posTipKinds, posTipStart, posCartWidth, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, TIP_KEPT_MODE, type PosTipKeptMode, CART_WIDTH, type PosTipKind, type PosCartWidth, CHECKOUT_MODE, CARD_PROVIDER, RECEIPT_OUTPUT, LAYOUT, CATEGORY_POSITION, TILE_HEIGHT, PRINTER_TYPE, TERMINAL_VIA, TERMINAL_TYPE, PAPER_SIZE, CODE_PAGE, CUT, DRAWER_AUTO_OPEN, QR_MODE, LOGO_SIZE, SETTINGS_FONT_SIZE, TILE_STYLE, AUTO_LOGOUT_MINUTES, DISCOUNT, WATERMARK_SIDE, WATERMARK_STRENGTH, LOGO_SCALE, WATERMARK_SCALE, DONE_SCREEN_SECONDS, } from './settings.js';
9
+ export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, posTipCardKeptByDefault, posTipCardKeptMode, posTipSelfPayout, tipKeptFor, type TipKeptDecision, type TipPaymentKind, DISCOUNT_PRESET_KIND, type PosDiscountPreset, type PosDiscountPresetKind, POS_BUSINESS_OPTIONAL_LISTS, posTipKinds, posTipStart, posCartWidth, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, TIP_KEPT_MODE, TIP_CARD_KEPT_MODE, type PosTipKeptMode, CART_WIDTH, type PosTipKind, type PosCartWidth, CHECKOUT_MODE, CARD_PROVIDER, RECEIPT_OUTPUT, LAYOUT, CATEGORY_POSITION, TILE_HEIGHT, PRINTER_TYPE, TERMINAL_VIA, TERMINAL_TYPE, PAPER_SIZE, CODE_PAGE, CUT, DRAWER_AUTO_OPEN, QR_MODE, LOGO_SIZE, SETTINGS_FONT_SIZE, TILE_STYLE, AUTO_LOGOUT_MINUTES, DISCOUNT, WATERMARK_SIDE, WATERMARK_STRENGTH, LOGO_SCALE, WATERMARK_SCALE, DONE_SCREEN_SECONDS, } from './settings.js';
10
10
  export { type ArticleGroup, type ArticleGroupPayload, fromArticleGroupPayload, type PosArticle, type PosArticlePayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, type QuantityRule, type QuantityDefaults, quantityRuleForUnit, quantityDefaults, allowedQuantity, isBookableArticle, tilePrompts, } from './artikel.js';
11
11
  export { REFERENCE_MODES, type ReferenceMode, type PosReference, REFERENCE_INPUT_MAX, REFERENCE_LABEL_MAX, REFERENCE_HINT_MAX, REFERENCE_PATTERN_MAX, REFERENCE_PATTERN_TEMPLATES, cleanReferenceText, isValidReferencePattern, isDigitsOnlyPattern, type ReferenceCheckResult, checkReference, referenceLineName, fromReferencePayload, } from './kachel-referenz.js';
12
12
  export { ADD_ONS_MAX, ADD_ON_BLOCK_REASONS, type AddOnBlockReason, isSelectableAddOn, addOnsFor, addOnReferencesValid, addOnsOfItem, addOnRemap, addOnDisplayOrder, orderAddOnLines, } from './zusaetze.js';
@@ -19,7 +19,7 @@ export { distributeDiscount } from '../receipt/discount.js';
19
19
  export { cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, type VoucherPerms, type RegisterScope, type RegisterUserPerms } from '../register/pairing.js';
20
20
  export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STATUSES, type PrintJobSource, PRINT_JOB_SOURCES, isPrintJobFinished, type CreatePrintJobOptions, listMyPrinters, createPrintJob, getPrintJob, } from './drucker.js';
21
21
  export { type PrinterCatalogEntry, type PrinterCatalogValues, type PrinterCatalogValueField, type PrinterCatalogApproval, type PrinterDeviceTest, type PrinterCatalogSettings, type PrinterCatalogDeviceSettings, type PrinterCatalogCut, type PrinterCatalogQrMode, printerCatalogEntry, printerCatalogSettings, } from './drucker-katalog.js';
22
- export { listMyTipRecipients } from './trinkgeld.js';
22
+ export { listMyTipRecipients, getMyTipBalance, tipStatus, type GetMyTipBalanceOptions, type TipStatus, type TipStatusKind } from './trinkgeld.js';
23
23
  export { posDiscountPresets, discountPresetChipText, discountChipsFromPresets, checkDiscountPresets, discountBlockLines, INVALID_DISCOUNT_PRESET, DISCOUNT_PRESETS_MAX, DISCOUNT_PRESET_NAME_MAX, DISCOUNT_PRESET_PERCENT_BP, DISCOUNT_PRESET_AMOUNT_CENTS, DISCOUNT_PRESET_MESSAGES, type DiscountPresetReason, type DiscountPresetError, type DiscountPresetsCheck, type DiscountBlockLine, type DiscountTotal, } from './rabatt-vorlagen.js';
24
24
  export { depFolderName } from './dep.js';
25
25
  export { type RegisterInspectionInfo, type RegisterInspectionSignature, type InspectionSignatureStatus, type InspectionInfoRow, type InspectionInfoRowKey, type InspectionInfoSection, type InspectionInfoLinesOptions, getRegisterInspectionInfo, inspectionInfoRows, inspectionInfoLines, } from './kasseninfo.js';
@@ -31,9 +31,9 @@ export type { Stocktake, StocktakeItem, StocktakeCount, StocktakeCountResult, St
31
31
  export type { StocktakeStatus } from '../inventory/vertrag.js';
32
32
  export { VOUCHER_KINDS, VOUCHER_STATUSES, checkVoucher, reprintVoucherLabel, VOUCHER_SETTINGS_DEFAULTS, posVoucherSettingsFromWire, VOUCHER_PAYOUTS, VOUCHER_TYPE_KINDS, VOUCHER_AMOUNT_MODES, VOUCHER_TYPE_VALIDITY_PATTERNS, EXTERNAL_VOUCHERS, type PosExternalVouchers, type VoucherKind, type VoucherStatus, type VoucherValidity, type VoucherArticle, type VoucherCheck, type PosVoucherSettings, type PosVoucherReturnType, type VoucherPayout, type VoucherTypeKind, type PosVoucherType, type VoucherLabelTemplate, } from './gutschein.js';
33
33
  export { type GetMyDrawerStateOptions, type OpenMyShiftOptions, type RecordMyCashMovementOptions, type DrawerOpeningEntry, type LogMyDrawerOpeningsOptions, type GetMyShiftReportOptions, type TipPayout, type CloseMyShiftOptions, type AfterCountOption, type RecordMyShiftCountOptions, getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, recordMyShiftCount, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, type ShiftTipLine, type ShiftTipLineKey, } from './schicht.js';
34
- export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, type AfterCountType, type AfterCount, EXPECTED_PART_KEYS, DIFFERENCE_PART_TYPES, type ExpectedPartKey, type ShiftExpectedPart, type DifferencePartType, type ShiftDifferencePart, type LastShift, type ShiftCountResult, type EurDenomination, type MovementType, type ManualMovementType, type CashLocation, type OpeningReason, type ManualOpeningReason, type ShiftReceiptKind, type ShiftStatus, type ShiftActorRole, type Denominations, type ShiftActor, type DrawerInfo, type DrawerRights, type NonCashAmount, type ShiftTipTotals, type ShiftTip, type ShiftOwnerTip, type ShiftDiscount, type ShiftRunningTotals, type ShiftReconciliation, type Shift, type TipClaim, type DrawerOpening, type DrawerState, type CashMovement, type ShiftReceiptHeader, type ShiftReceiptMovement, type ShiftReceiptTip, type ShiftSummaryReceipt, type CashMovementReceipt, type ShiftReceipt, type OpenShiftResult, type CashMovementResult, type DrawerOpeningsResult, type ShiftReport, type CloseShiftResult, } from './schicht-typen.js';
34
+ export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, type AfterCountType, type AfterCount, EXPECTED_PART_KEYS, DIFFERENCE_PART_TYPES, type ExpectedPartKey, type ShiftExpectedPart, type DifferencePartType, type ShiftDifferencePart, type LastShift, type ShiftCountResult, type EurDenomination, type MovementType, type ManualMovementType, type CashLocation, type OpeningReason, type ManualOpeningReason, type ShiftReceiptKind, type ShiftStatus, type ShiftActorRole, type Denominations, type ShiftActor, type DrawerInfo, type DrawerRights, type NonCashAmount, type ShiftTipTotals, type ShiftTip, type ShiftOwnerTip, type ShiftDiscount, type ShiftRunningTotals, type ShiftReconciliation, type Shift, type TipClaim, type DrawerOpening, type DrawerState, type CashMovement, type ShiftReceiptHeader, type ShiftReceiptMovement, type ShiftReceiptTip, TIP_CLAIM_SCOPES, type TipClaimScope, type TipBalance, type TipBalanceOtherDrawer, type ShiftSummaryReceipt, type CashMovementReceipt, type ShiftReceipt, type OpenShiftResult, type CashMovementResult, type DrawerOpeningsResult, type ShiftReport, type CloseShiftResult, } from './schicht-typen.js';
35
35
  export { type ShiftReceiptLayoutOptions, shiftReceiptLayout, cashMovementLayout } from '../receipt/shift-sheet.js';
36
36
  export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputKind, type ReceiptOutputResult } from '../models/receipt-output.js';
37
37
  export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
38
- export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, DEPOSIT_ERROR_MESSAGES, depositErrorMessage, EXTERNAL_VOUCHER_TILE_MESSAGES, EXTERNAL_VOUCHER_ARTICLE_MESSAGES, externalVoucherArticleErrorMessage, EXTERNAL_VOUCHERS_LABELS, EXTERNAL_VOUCHER_KIND_LABELS, TIP_KEPT_MODE_LABELS, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
38
+ export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, DEPOSIT_ERROR_MESSAGES, depositErrorMessage, EXTERNAL_VOUCHER_TILE_MESSAGES, EXTERNAL_VOUCHER_ARTICLE_MESSAGES, externalVoucherArticleErrorMessage, EXTERNAL_VOUCHERS_LABELS, EXTERNAL_VOUCHER_KIND_LABELS, TIP_KEPT_MODE_LABELS, TIP_CLAIM_SCOPE_LABELS, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
39
39
  export { roundUpSuggestions } from './aufrunden.js';