@kreiseck/kasseneck-api 1.17.1 → 1.19.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 (208) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +20 -8
  3. package/dist/cjs/client/index.d.ts +1 -1
  4. package/dist/cjs/client/index.js +3 -2
  5. package/dist/cjs/client/list-receipts.d.ts +48 -5
  6. package/dist/cjs/client/list-receipts.js +68 -3
  7. package/dist/cjs/client/receipts.d.ts +6 -0
  8. package/dist/cjs/client/receipts.js +8 -2
  9. package/dist/cjs/index.d.ts +1 -1
  10. package/dist/cjs/index.js +3 -2
  11. package/dist/cjs/models/index.d.ts +1 -0
  12. package/dist/cjs/models/index.js +6 -1
  13. package/dist/cjs/models/manual-receipt.d.ts +45 -0
  14. package/dist/cjs/models/manual-receipt.js +58 -0
  15. package/dist/cjs/models/receipt-summary.d.ts +4 -0
  16. package/dist/cjs/models/receipt-summary.js +6 -0
  17. package/dist/cjs/models/receipt.d.ts +9 -3
  18. package/dist/cjs/models/receipt.js +6 -0
  19. package/dist/cjs/receipt/layout.js +57 -0
  20. package/dist/cjs/stored/vokabular.d.ts +1 -1
  21. package/dist/cjs/stored/vokabular.js +23 -2
  22. package/dist/cjs/version.d.ts +1 -1
  23. package/dist/cjs/version.js +1 -1
  24. package/dist/esm/client/index.d.ts +1 -1
  25. package/dist/esm/client/index.js +1 -1
  26. package/dist/esm/client/list-receipts.d.ts +48 -5
  27. package/dist/esm/client/list-receipts.js +67 -3
  28. package/dist/esm/client/receipts.d.ts +6 -0
  29. package/dist/esm/client/receipts.js +8 -2
  30. package/dist/esm/index.d.ts +1 -1
  31. package/dist/esm/index.js +1 -1
  32. package/dist/esm/models/index.d.ts +1 -0
  33. package/dist/esm/models/index.js +1 -0
  34. package/dist/esm/models/manual-receipt.d.ts +45 -0
  35. package/dist/esm/models/manual-receipt.js +53 -0
  36. package/dist/esm/models/receipt-summary.d.ts +4 -0
  37. package/dist/esm/models/receipt-summary.js +6 -0
  38. package/dist/esm/models/receipt.d.ts +9 -3
  39. package/dist/esm/models/receipt.js +6 -0
  40. package/dist/esm/receipt/layout.js +57 -0
  41. package/dist/esm/stored/vokabular.d.ts +1 -1
  42. package/dist/esm/stored/vokabular.js +23 -2
  43. package/dist/esm/version.d.ts +1 -1
  44. package/dist/esm/version.js +1 -1
  45. package/fixtures/expected/manual-receipt-range-device-failure-count.grid32.txt +36 -0
  46. package/fixtures/expected/manual-receipt-range-device-failure-count.grid48.txt +36 -0
  47. package/fixtures/expected/manual-receipt-range-device-failure-count.lines.json +299 -0
  48. package/fixtures/expected/manual-receipt-range-device-failure-count.sheet32.json +242 -0
  49. package/fixtures/expected/manual-receipt-range-device-failure-count.sheet48.json +242 -0
  50. package/fixtures/expected/manual-receipt-range-device-failure-no-count.grid32.txt +36 -0
  51. package/fixtures/expected/manual-receipt-range-device-failure-no-count.grid48.txt +36 -0
  52. package/fixtures/expected/manual-receipt-range-device-failure-no-count.lines.json +299 -0
  53. package/fixtures/expected/manual-receipt-range-device-failure-no-count.sheet32.json +242 -0
  54. package/fixtures/expected/manual-receipt-range-device-failure-no-count.sheet48.json +242 -0
  55. package/fixtures/expected/manual-receipt-range-network-outage-count.grid32.txt +33 -0
  56. package/fixtures/expected/manual-receipt-range-network-outage-count.grid48.txt +33 -0
  57. package/fixtures/expected/manual-receipt-range-network-outage-count.lines.json +259 -0
  58. package/fixtures/expected/manual-receipt-range-network-outage-count.sheet32.json +224 -0
  59. package/fixtures/expected/manual-receipt-range-network-outage-count.sheet48.json +224 -0
  60. package/fixtures/expected/manual-receipt-range-network-outage-no-count.grid32.txt +33 -0
  61. package/fixtures/expected/manual-receipt-range-network-outage-no-count.grid48.txt +33 -0
  62. package/fixtures/expected/manual-receipt-range-network-outage-no-count.lines.json +259 -0
  63. package/fixtures/expected/manual-receipt-range-network-outage-no-count.sheet32.json +224 -0
  64. package/fixtures/expected/manual-receipt-range-network-outage-no-count.sheet48.json +224 -0
  65. package/fixtures/expected/manual-receipt-range-other-count.grid32.txt +36 -0
  66. package/fixtures/expected/manual-receipt-range-other-count.grid48.txt +36 -0
  67. package/fixtures/expected/manual-receipt-range-other-count.lines.json +299 -0
  68. package/fixtures/expected/manual-receipt-range-other-count.sheet32.json +242 -0
  69. package/fixtures/expected/manual-receipt-range-other-count.sheet48.json +242 -0
  70. package/fixtures/expected/manual-receipt-range-other-no-count.grid32.txt +36 -0
  71. package/fixtures/expected/manual-receipt-range-other-no-count.grid48.txt +36 -0
  72. package/fixtures/expected/manual-receipt-range-other-no-count.lines.json +299 -0
  73. package/fixtures/expected/manual-receipt-range-other-no-count.sheet32.json +242 -0
  74. package/fixtures/expected/manual-receipt-range-other-no-count.sheet48.json +242 -0
  75. package/fixtures/expected/manual-receipt-range-power-outage-count.grid32.txt +37 -0
  76. package/fixtures/expected/manual-receipt-range-power-outage-count.grid48.txt +37 -0
  77. package/fixtures/expected/manual-receipt-range-power-outage-count.lines.json +305 -0
  78. package/fixtures/expected/manual-receipt-range-power-outage-count.sheet32.json +248 -0
  79. package/fixtures/expected/manual-receipt-range-power-outage-count.sheet48.json +248 -0
  80. package/fixtures/expected/manual-receipt-range-power-outage-no-count.grid32.txt +37 -0
  81. package/fixtures/expected/manual-receipt-range-power-outage-no-count.grid48.txt +37 -0
  82. package/fixtures/expected/manual-receipt-range-power-outage-no-count.lines.json +305 -0
  83. package/fixtures/expected/manual-receipt-range-power-outage-no-count.sheet32.json +248 -0
  84. package/fixtures/expected/manual-receipt-range-power-outage-no-count.sheet48.json +248 -0
  85. package/fixtures/expected/manual-receipt-range-system-outage-count.grid32.txt +33 -0
  86. package/fixtures/expected/manual-receipt-range-system-outage-count.grid48.txt +33 -0
  87. package/fixtures/expected/manual-receipt-range-system-outage-count.lines.json +259 -0
  88. package/fixtures/expected/manual-receipt-range-system-outage-count.sheet32.json +224 -0
  89. package/fixtures/expected/manual-receipt-range-system-outage-count.sheet48.json +224 -0
  90. package/fixtures/expected/manual-receipt-range-system-outage-no-count.grid32.txt +33 -0
  91. package/fixtures/expected/manual-receipt-range-system-outage-no-count.grid48.txt +33 -0
  92. package/fixtures/expected/manual-receipt-range-system-outage-no-count.lines.json +259 -0
  93. package/fixtures/expected/manual-receipt-range-system-outage-no-count.sheet32.json +224 -0
  94. package/fixtures/expected/manual-receipt-range-system-outage-no-count.sheet48.json +224 -0
  95. package/fixtures/expected/manual-receipt-single-device-failure-no-time.grid32.txt +31 -0
  96. package/fixtures/expected/manual-receipt-single-device-failure-no-time.grid48.txt +31 -0
  97. package/fixtures/expected/manual-receipt-single-device-failure-no-time.lines.json +253 -0
  98. package/fixtures/expected/manual-receipt-single-device-failure-no-time.sheet32.json +212 -0
  99. package/fixtures/expected/manual-receipt-single-device-failure-no-time.sheet48.json +212 -0
  100. package/fixtures/expected/manual-receipt-single-device-failure-time.grid32.txt +31 -0
  101. package/fixtures/expected/manual-receipt-single-device-failure-time.grid48.txt +31 -0
  102. package/fixtures/expected/manual-receipt-single-device-failure-time.lines.json +253 -0
  103. package/fixtures/expected/manual-receipt-single-device-failure-time.sheet32.json +212 -0
  104. package/fixtures/expected/manual-receipt-single-device-failure-time.sheet48.json +212 -0
  105. package/fixtures/expected/manual-receipt-single-network-outage-no-time.grid32.txt +32 -0
  106. package/fixtures/expected/manual-receipt-single-network-outage-no-time.grid48.txt +31 -0
  107. package/fixtures/expected/manual-receipt-single-network-outage-no-time.lines.json +253 -0
  108. package/fixtures/expected/manual-receipt-single-network-outage-no-time.sheet32.json +218 -0
  109. package/fixtures/expected/manual-receipt-single-network-outage-no-time.sheet48.json +212 -0
  110. package/fixtures/expected/manual-receipt-single-network-outage-time.grid32.txt +32 -0
  111. package/fixtures/expected/manual-receipt-single-network-outage-time.grid48.txt +31 -0
  112. package/fixtures/expected/manual-receipt-single-network-outage-time.lines.json +253 -0
  113. package/fixtures/expected/manual-receipt-single-network-outage-time.sheet32.json +218 -0
  114. package/fixtures/expected/manual-receipt-single-network-outage-time.sheet48.json +212 -0
  115. package/fixtures/expected/manual-receipt-single-other-no-time.grid32.txt +35 -0
  116. package/fixtures/expected/manual-receipt-single-other-no-time.grid48.txt +34 -0
  117. package/fixtures/expected/manual-receipt-single-other-no-time.lines.json +299 -0
  118. package/fixtures/expected/manual-receipt-single-other-no-time.sheet32.json +236 -0
  119. package/fixtures/expected/manual-receipt-single-other-no-time.sheet48.json +230 -0
  120. package/fixtures/expected/manual-receipt-single-other-time.grid32.txt +35 -0
  121. package/fixtures/expected/manual-receipt-single-other-time.grid48.txt +34 -0
  122. package/fixtures/expected/manual-receipt-single-other-time.lines.json +299 -0
  123. package/fixtures/expected/manual-receipt-single-other-time.sheet32.json +236 -0
  124. package/fixtures/expected/manual-receipt-single-other-time.sheet48.json +230 -0
  125. package/fixtures/expected/manual-receipt-single-outside-premises-no-time.grid32.txt +31 -0
  126. package/fixtures/expected/manual-receipt-single-outside-premises-no-time.grid48.txt +31 -0
  127. package/fixtures/expected/manual-receipt-single-outside-premises-no-time.lines.json +247 -0
  128. package/fixtures/expected/manual-receipt-single-outside-premises-no-time.sheet32.json +212 -0
  129. package/fixtures/expected/manual-receipt-single-outside-premises-no-time.sheet48.json +212 -0
  130. package/fixtures/expected/manual-receipt-single-outside-premises-time.grid32.txt +31 -0
  131. package/fixtures/expected/manual-receipt-single-outside-premises-time.grid48.txt +31 -0
  132. package/fixtures/expected/manual-receipt-single-outside-premises-time.lines.json +247 -0
  133. package/fixtures/expected/manual-receipt-single-outside-premises-time.sheet32.json +212 -0
  134. package/fixtures/expected/manual-receipt-single-outside-premises-time.sheet48.json +212 -0
  135. package/fixtures/expected/manual-receipt-single-power-outage-no-time.grid32.txt +35 -0
  136. package/fixtures/expected/manual-receipt-single-power-outage-no-time.grid48.txt +34 -0
  137. package/fixtures/expected/manual-receipt-single-power-outage-no-time.lines.json +299 -0
  138. package/fixtures/expected/manual-receipt-single-power-outage-no-time.sheet32.json +236 -0
  139. package/fixtures/expected/manual-receipt-single-power-outage-no-time.sheet48.json +230 -0
  140. package/fixtures/expected/manual-receipt-single-power-outage-time.grid32.txt +35 -0
  141. package/fixtures/expected/manual-receipt-single-power-outage-time.grid48.txt +34 -0
  142. package/fixtures/expected/manual-receipt-single-power-outage-time.lines.json +299 -0
  143. package/fixtures/expected/manual-receipt-single-power-outage-time.sheet32.json +236 -0
  144. package/fixtures/expected/manual-receipt-single-power-outage-time.sheet48.json +230 -0
  145. package/fixtures/expected/manual-receipt-single-small-business.grid32.txt +34 -0
  146. package/fixtures/expected/manual-receipt-single-small-business.grid48.txt +33 -0
  147. package/fixtures/expected/manual-receipt-single-small-business.lines.json +257 -0
  148. package/fixtures/expected/manual-receipt-single-small-business.sheet32.json +230 -0
  149. package/fixtures/expected/manual-receipt-single-small-business.sheet48.json +224 -0
  150. package/fixtures/expected/manual-receipt-single-system-outage-no-time.grid32.txt +32 -0
  151. package/fixtures/expected/manual-receipt-single-system-outage-no-time.grid48.txt +31 -0
  152. package/fixtures/expected/manual-receipt-single-system-outage-no-time.lines.json +253 -0
  153. package/fixtures/expected/manual-receipt-single-system-outage-no-time.sheet32.json +218 -0
  154. package/fixtures/expected/manual-receipt-single-system-outage-no-time.sheet48.json +212 -0
  155. package/fixtures/expected/manual-receipt-single-system-outage-time.grid32.txt +32 -0
  156. package/fixtures/expected/manual-receipt-single-system-outage-time.grid48.txt +31 -0
  157. package/fixtures/expected/manual-receipt-single-system-outage-time.lines.json +253 -0
  158. package/fixtures/expected/manual-receipt-single-system-outage-time.sheet32.json +218 -0
  159. package/fixtures/expected/manual-receipt-single-system-outage-time.sheet48.json +212 -0
  160. package/fixtures/expected/zero-outage-end-period.grid32.txt +35 -0
  161. package/fixtures/expected/zero-outage-end-period.grid48.txt +31 -0
  162. package/fixtures/expected/zero-outage-end-period.lines.json +230 -0
  163. package/fixtures/expected/zero-outage-end-period.sheet32.json +236 -0
  164. package/fixtures/expected/zero-outage-end-period.sheet48.json +212 -0
  165. package/fixtures/hobex-hps-codes.json +1 -1
  166. package/fixtures/invoice-api.schema.json +1 -1
  167. package/fixtures/invoice-texts.json +1 -1
  168. package/fixtures/manifest.json +192 -0
  169. package/fixtures/pos-texts.json +1 -1
  170. package/fixtures/receipts/manual-receipt-range-device-failure-count.json +56 -0
  171. package/fixtures/receipts/manual-receipt-range-device-failure-no-count.json +55 -0
  172. package/fixtures/receipts/manual-receipt-range-network-outage-count.json +50 -0
  173. package/fixtures/receipts/manual-receipt-range-network-outage-no-count.json +49 -0
  174. package/fixtures/receipts/manual-receipt-range-other-count.json +57 -0
  175. package/fixtures/receipts/manual-receipt-range-other-no-count.json +56 -0
  176. package/fixtures/receipts/manual-receipt-range-power-outage-count.json +56 -0
  177. package/fixtures/receipts/manual-receipt-range-power-outage-no-count.json +55 -0
  178. package/fixtures/receipts/manual-receipt-range-system-outage-count.json +50 -0
  179. package/fixtures/receipts/manual-receipt-range-system-outage-no-count.json +49 -0
  180. package/fixtures/receipts/manual-receipt-single-device-failure-no-time.json +48 -0
  181. package/fixtures/receipts/manual-receipt-single-device-failure-time.json +49 -0
  182. package/fixtures/receipts/manual-receipt-single-network-outage-no-time.json +49 -0
  183. package/fixtures/receipts/manual-receipt-single-network-outage-time.json +50 -0
  184. package/fixtures/receipts/manual-receipt-single-other-no-time.json +55 -0
  185. package/fixtures/receipts/manual-receipt-single-other-time.json +56 -0
  186. package/fixtures/receipts/manual-receipt-single-outside-premises-no-time.json +48 -0
  187. package/fixtures/receipts/manual-receipt-single-outside-premises-time.json +49 -0
  188. package/fixtures/receipts/manual-receipt-single-power-outage-no-time.json +54 -0
  189. package/fixtures/receipts/manual-receipt-single-power-outage-time.json +55 -0
  190. package/fixtures/receipts/manual-receipt-single-small-business.json +48 -0
  191. package/fixtures/receipts/manual-receipt-single-system-outage-no-time.json +49 -0
  192. package/fixtures/receipts/manual-receipt-single-system-outage-time.json +50 -0
  193. package/fixtures/receipts/zero-outage-end-period.json +43 -0
  194. package/fixtures/surface.json +1 -1
  195. package/fixtures/v3/antworten/belege.json +585 -9
  196. package/fixtures/v3/antworten/belegmail.json +2 -2
  197. package/fixtures/v3/antworten/berichte.json +2 -2
  198. package/fixtures/v3/antworten/kasse-belege.json +433 -3
  199. package/fixtures/v3/antworten/kasse.json +3 -3
  200. package/fixtures/v3/antworten/lager.json +1 -1
  201. package/fixtures/v3/antworten/rechnungen.json +2 -2
  202. package/fixtures/v3/antworten/storno.json +15 -3
  203. package/fixtures/v3/stored/belege.json +57 -3
  204. package/fixtures/v3/stored/kasse.json +3 -3
  205. package/fixtures/v3/stored/rechnungen.json +2 -2
  206. package/fixtures/v3/v3-vokabular.json +188 -11
  207. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  208. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { KeckPaymentMethod, ReceiptType } from '../enums/index.js';
2
2
  import { type CancellationStatus } from './cancellation.js';
3
3
  import { type ReceiptPayment, type ReceiptPaymentPayload } from './receipt-payment.js';
4
+ import { type ManualReceipt } from './manual-receipt.js';
4
5
  /**
5
6
  * Belegzeile einer Liste — die Form, die `listMyReceipts` liefert
6
7
  * (`projectReceiptForCustomer` in functions/index.js).
@@ -77,6 +78,8 @@ export interface ReceiptSummary {
77
78
  * (`providerPaymentId`, `providerData`) bleiben im Backend.
78
79
  */
79
80
  payments?: ReceiptPayment[];
81
+ /** Nur an nacherfassten Belegen: der Handbeleg. */
82
+ manualReceipt?: ManualReceipt;
80
83
  }
81
84
  export interface ReceiptSummaryPayload {
82
85
  receiptId?: string | null;
@@ -105,5 +108,6 @@ export interface ReceiptSummaryPayload {
105
108
  cancellationStatus?: string | null;
106
109
  zeroKind?: string | null;
107
110
  payments?: ReceiptPaymentPayload[] | null;
111
+ manualReceipt?: unknown;
108
112
  }
109
113
  export declare function fromReceiptSummaryPayload(payload: ReceiptSummaryPayload): ReceiptSummary;
@@ -8,6 +8,7 @@ const money_js_1 = require("../money.js");
8
8
  const enum_payload_js_1 = require("./enum-payload.js");
9
9
  const cancellation_js_1 = require("./cancellation.js");
10
10
  const receipt_payment_js_1 = require("./receipt-payment.js");
11
+ const manual_receipt_js_1 = require("./manual-receipt.js");
11
12
  /**
12
13
  * Belegzeile einer Liste — die Form, die `listMyReceipts` liefert
13
14
  * (`projectReceiptForCustomer` in functions/index.js).
@@ -58,8 +59,13 @@ function fromReceiptSummaryPayload(payload) {
58
59
  : { cancellationStatus: isCancellationStatus(payload.cancellationStatus) ? payload.cancellationStatus : 'unknown' }),
59
60
  ...(isZeroKind(payload.zeroKind) ? { zeroKind: payload.zeroKind } : {}),
60
61
  ...(Array.isArray(payload.payments) ? { payments: payload.payments.map(receipt_payment_js_1.fromReceiptPaymentPayload) } : {}),
62
+ ...handbelegFeld(payload.manualReceipt),
61
63
  };
62
64
  }
65
+ function handbelegFeld(roh) {
66
+ const manualReceipt = (0, manual_receipt_js_1.readManualReceipt)(roh);
67
+ return manualReceipt ? { manualReceipt } : {};
68
+ }
63
69
  function isCancellationStatus(wert) {
64
70
  return typeof wert === 'string' && cancellation_js_1.CANCELLATION_STATUSES.includes(wert);
65
71
  }
@@ -1,4 +1,5 @@
1
1
  import { ReceiptType, KeckPaymentMethod, CreditCardProvider } from '../enums/index.js';
2
+ import { type ManualReceipt } from './manual-receipt.js';
2
3
  import { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead } from './receipt-item.js';
3
4
  import { type Voucher, type VoucherPayload } from './voucher.js';
4
5
  import { type Cancellation, type CancellationOf, type CancellationReason } from './cancellation.js';
@@ -24,9 +25,11 @@ import { type ReceiptPayment, type ReceiptPaymentPayload } from './receipt-payme
24
25
  * **Zahlungen stehen in `payments`.** `paymentMethod` vergibt der Server
25
26
  * (`mixed` bei mehreren Zahlarten); gesendet wird es unter `/v3` nie. Die
26
27
  * Anbieterdaten (`payments[].providerPaymentId`/`providerData`, bei
27
- * Altbelegen `cardPaymentId`/`cardPaymentData`) liefert nur der Kassenweg
28
- * (Kanal `app`, `kasse.kasseneck.at/api/v3`); am oeffentlichen Weg fehlen
29
- * sie. Darum sind sie hier optional.
28
+ * Altbelegen `cardPaymentId`/`cardPaymentData`) bekommt nur der Betrieb
29
+ * selbst (API-Schluessel oder Kassen-Anmeldung, in beiden Kanaelen); ein
30
+ * Partner-Zugang nie. Darum sind sie hier optional. `providerData` ist die
31
+ * Rohform des Zahlungsanbieters ohne zugesagte Form; fuer Logik `provider`,
32
+ * `providerPaymentId` und `id` nehmen.
30
33
  */
31
34
  export interface Receipt {
32
35
  receiptId: string;
@@ -74,6 +77,8 @@ export interface Receipt {
74
77
  layoutRuleset?: number;
75
78
  /** Nur an Nullbelegen: Registrierdaten fuer den Block „Prüfangaben“. */
76
79
  registrationInfo?: RegistrationInfo;
80
+ /** Nur an nacherfassten Belegen: der Handbeleg (siehe [ManualReceipt]). */
81
+ manualReceipt?: ManualReceipt;
77
82
  }
78
83
  /** Registrierdaten von Signaturkarte und Kasse (Zeitstempel oder `null`, wenn unbekannt). */
79
84
  export interface RegistrationInfo {
@@ -125,6 +130,7 @@ export interface ReceiptPayloadRead extends Omit<ReceiptPayload, 'items' | 'vouc
125
130
  cardRegisteredAt?: string | null;
126
131
  cashregisterRegisteredAt?: string | null;
127
132
  } | null;
133
+ manualReceipt?: unknown;
128
134
  }
129
135
  /**
130
136
  * Schreibt die Nutzlast in der **neuen** Form — sie **normalisiert, statt zu
@@ -8,6 +8,7 @@ exports.receiptSubSumCents = receiptSubSumCents;
8
8
  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
+ const manual_receipt_js_1 = require("./manual-receipt.js");
11
12
  const receipt_item_js_1 = require("./receipt-item.js");
12
13
  const voucher_js_1 = require("./voucher.js");
13
14
  const cancellation_js_1 = require("./cancellation.js");
@@ -95,8 +96,13 @@ function fromReceiptPayload(payload) {
95
96
  ...(payload.registrationInfo != null && typeof payload.registrationInfo === 'object'
96
97
  ? { registrationInfo: readRegistrationInfo(payload.registrationInfo) }
97
98
  : {}),
99
+ ...handbelegFeld(payload.manualReceipt),
98
100
  };
99
101
  }
102
+ function handbelegFeld(roh) {
103
+ const manualReceipt = (0, manual_receipt_js_1.readManualReceipt)(roh);
104
+ return manualReceipt ? { manualReceipt } : {};
105
+ }
100
106
  /** Registrierdaten lesen; ein fehlender oder leerer Zeitstempel wird `null`. */
101
107
  function readRegistrationInfo(roh) {
102
108
  const zeit = (v) => (typeof v === 'string' && v !== '' ? v : null);
@@ -936,6 +936,49 @@ function stornoGrundText(code) {
936
936
  function receiptIsSmallBusinessConsistent(receipt) {
937
937
  return receipt.items.every((it) => Number(steuersatz(it.vat).rate) === 0);
938
938
  }
939
+ /** Grund-Zeile nach einem Ausfall der Kasse; `other` druckt den eigenen Text. */
940
+ const NACHERFASSUNG_GRUND = {
941
+ network_outage: 'Internet', power_outage: 'Strom', device_failure: 'Gerät defekt', system_outage: 'Störung',
942
+ };
943
+ /** `YYYY-MM-DD` als `TT.MM.JJJJ`; anderes bleibt, wie es kam. */
944
+ function handbelegDatum(tag) {
945
+ const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(tag);
946
+ return m ? `${m[3]}.${m[2]}.${m[1]}` : tag;
947
+ }
948
+ /**
949
+ * Block „NACHERFASSUNG“ (manualReceipt) unter dem Kopf: Art, Grund, Nummer
950
+ * und Tag des Handbelegs bzw. der Handbelege eines Tagessammelbelegs, dazu
951
+ * der Hinweis, dass der Beleg fuer die USt ein Duplikat ist
952
+ * (Registrierkassenerlass 3.3 Faelle 5 und 6, 2.4.11). Der Zeitstempel des Belegs bleibt der der
953
+ * Nacherfassung und steht wie immer unter „Datum:“. Kleinunternehmer
954
+ * (keine USt am Beleg) bekommen den USt-Hinweis nicht.
955
+ */
956
+ function nacherfassungBlock(receipt, company) {
957
+ const m = receipt.manualReceipt;
958
+ if (!m)
959
+ return [];
960
+ const aus = [bannerZeile('NACHERFASSUNG')];
961
+ aus.push(textZeile(m.reason === 'outside_premises' ? 'Leistung außer Haus' : 'nach Ausfall der Kasse', 'center'));
962
+ const grund = m.reason === 'other' ? m.note : NACHERFASSUNG_GRUND[m.reason];
963
+ if (grund)
964
+ aus.push(textZeile(`Grund: ${grund}`, 'center'));
965
+ aus.push({ kind: 'space', lines: 1 });
966
+ const tag = handbelegDatum(m.date);
967
+ if (m.numberTo) {
968
+ aus.push(textZeile('Tagessammelbeleg', 'center'));
969
+ aus.push(textZeile(`Handbelege Nr. ${m.number} bis ${m.numberTo}`, 'center'));
970
+ aus.push(textZeile(`${m.count ? `${m.count} Belege ` : ''}vom ${tag}`, 'center'));
971
+ if (!company.isSmallBusiness)
972
+ aus.push(textZeile('USt: Duplikat der Handbelege', 'center'));
973
+ }
974
+ else {
975
+ aus.push(textZeile(`Handbeleg Nr. ${m.number}`, 'center'));
976
+ aus.push(textZeile(`vom ${tag}${m.time ? `, ${m.time} Uhr` : ''}`, 'center'));
977
+ if (!company.isSmallBusiness)
978
+ aus.push(textZeile('USt: Duplikat des Handbelegs', 'center'));
979
+ }
980
+ return aus;
981
+ }
939
982
  /**
940
983
  * Belegart-Block unter dem Betriebskopf: Titel als Banner, Untertitel als
941
984
  * zentrierte Textzeilen. Verkaufsbelege bekommen keinen Block.
@@ -1023,6 +1066,12 @@ function buildReceiptLayout(receipt, company, options = {}) {
1023
1066
  lines.push({ kind: 'space', lines: 1 });
1024
1067
  lines.push(...belegart);
1025
1068
  }
1069
+ // --- Nacherfassung eines Handbelegs unter dem Kopf, vor den Pflichtangaben
1070
+ const nacherfassung = nullbeleg ? [] : nacherfassungBlock(receipt, company);
1071
+ if (nacherfassung.length > 0) {
1072
+ lines.push({ kind: 'space', lines: 1 });
1073
+ lines.push(...nacherfassung);
1074
+ }
1026
1075
  // --- Nullbeleg: reduziert (§ 132a Abs. 3 BAO / RKSV § 11 Abs. 1 -- Pflichtangaben
1027
1076
  // ja, Positionen/MwSt-Tabelle/Zahlungsart/Fusszeilen nein).
1028
1077
  if (nullbeleg) {
@@ -1038,6 +1087,14 @@ function buildReceiptLayout(receipt, company, options = {}) {
1038
1087
  lines.push(...pruefangabenBlock(receipt, options.registrationInfo ?? null));
1039
1088
  }
1040
1089
  lines.push({ kind: 'space', lines: 1 });
1090
+ // Sammelbeleg nach Signaturausfall: Beginn und Ende des Ausfalls muessen aus
1091
+ // dem Beleg hervorgehen (Registrierkassenerlass 3.6.1); der Server legt sie als
1092
+ // legalMessage ab. Andere Nullbelege nennen ihren Anlass schon im Titel.
1093
+ if (receipt.zeroKind === 'outage_end' && receipt.legalMessage.length > 0) {
1094
+ for (const zeile of receipt.legalMessage)
1095
+ lines.push(textZeile(zeile, 'center'));
1096
+ lines.push({ kind: 'space', lines: 1 });
1097
+ }
1041
1098
  if (receiptSignatureFailed(receipt)) {
1042
1099
  lines.push(textZeile(SIGNATUR_AUSGEFALLEN, 'center'));
1043
1100
  lines.push({ kind: 'space', lines: 1 });
@@ -1,5 +1,5 @@
1
1
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
2
- export declare const VOKABULAR_QUELLE = "3088cb472f3fef3ed4ff969bf0d37d051363714096616a9263270c58266bde14";
2
+ export declare const VOKABULAR_QUELLE = "f9d375a30bfb51addc8405dd6f5c24928ebc628166ae5ebf2b0c43d9f19701dd";
3
3
  /** Schema-Notation des Vertrags: Blatt 'aussen': 'innen', Objekt { __: 'innen', ... }, Liste [ { __: 'innen', ... } ]. */
4
4
  export type SchemaEintrag = string | SchemaObjekt | readonly [SchemaObjekt];
5
5
  export interface SchemaObjekt {
@@ -4,7 +4,7 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
6
6
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
7
- exports.VOKABULAR_QUELLE = "3088cb472f3fef3ed4ff969bf0d37d051363714096616a9263270c58266bde14";
7
+ exports.VOKABULAR_QUELLE = "f9d375a30bfb51addc8405dd6f5c24928ebc628166ae5ebf2b0c43d9f19701dd";
8
8
  /** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
9
9
  exports.SCHEMAS = {
10
10
  "getReceipt": {
@@ -24,7 +24,17 @@ exports.SCHEMAS = {
24
24
  "receivedImmediately": "sofortErhalten",
25
25
  "keptByEmployee": "direkt"
26
26
  }
27
- ]
27
+ ],
28
+ "manualReceipt": {
29
+ "__": "handbeleg",
30
+ "number": "nummer",
31
+ "numberTo": "nummerBis",
32
+ "count": "anzahl",
33
+ "date": "datum",
34
+ "time": "uhrzeit",
35
+ "reason": "grund",
36
+ "note": "grundText"
37
+ }
28
38
  },
29
39
  "taxNumber": "taxnr",
30
40
  "vatId": "uid",
@@ -80,6 +90,9 @@ exports.SCHEMAS = {
80
90
  "receipt.cancellationReason": {
81
91
  "$catalog": "STORNO_GRUND"
82
92
  },
93
+ "receipt.manualReceipt.reason": {
94
+ "$catalog": "HANDBELEG_GRUND"
95
+ },
83
96
  "layout.lines[].tone": {
84
97
  "$catalog": "LAYOUT_TON"
85
98
  },
@@ -570,6 +583,14 @@ exports.KATALOGE = {
570
583
  "unbefristet": "unlimited",
571
584
  "jahre": "years"
572
585
  },
586
+ "HANDBELEG_GRUND": {
587
+ "internet": "network_outage",
588
+ "strom": "power_outage",
589
+ "geraet": "device_failure",
590
+ "stoerung": "system_outage",
591
+ "sonstiges": "other",
592
+ "ausser_haus": "outside_premises"
593
+ },
573
594
  "KASSE_BETRIEB_WERTE.cardProvider": {
574
595
  "keiner": "none",
575
596
  "extern": "external",
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export declare const PACKAGE_VERSION = "1.17.1";
7
+ export declare const PACKAGE_VERSION = "1.19.0";
@@ -7,4 +7,4 @@ exports.PACKAGE_VERSION = void 0;
7
7
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
8
8
  * beim Anheben der Version beide Stellen aendern.
9
9
  */
10
- exports.PACKAGE_VERSION = '1.17.1';
10
+ exports.PACKAGE_VERSION = '1.19.0';
@@ -4,7 +4,7 @@ export { ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS
4
4
  export { 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, } from './errors.js';
5
5
  export { type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, type CancelReceiptResult, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, } from './receipts.js';
6
6
  export { listMyCashregisters } from './cashregisters.js';
7
- export { listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, 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, } from './list-receipts.js';
7
+ export { 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, type ListedFullReceipt, type ListReceiptsHeader, } from './list-receipts.js';
8
8
  export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, type CashregisterReportPeriod, type ReportV2, type ReportV2Metadata, type ReportV2Options } from './reports.js';
9
9
  export { type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, } from './status.js';
10
10
  export { type KasseneckApi, createKasseneckApi } from './api.js';
@@ -4,7 +4,7 @@ export { ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, } from './au
4
4
  export { KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, } from './errors.js';
5
5
  export { sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, } from './receipts.js';
6
6
  export { listMyCashregisters } from './cashregisters.js';
7
- export { listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, } from './list-receipts.js';
7
+ export { 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, } from './list-receipts.js';
8
8
  export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2 } from './reports.js';
9
9
  export { getCashboxStatus, getSignatureStatus, } from './status.js';
10
10
  export { createKasseneckApi } from './api.js';
@@ -1,6 +1,9 @@
1
1
  import { KeckPaymentMethod, ReceiptType } from '../enums/index.js';
2
- import { type CancellationReason, type CancellationStatus, type Receipt, type ReceiptPayment, type ZeroKind } from '../models/index.js';
2
+ import { type CancellationReason, type CancellationStatus, type Receipt, type ReceiptCompany, type ReceiptPayment, type ZeroKind } from '../models/index.js';
3
3
  import type { ReportV2Metadata } from './reports.js';
4
+ import type { ReceiptWithCompany } from './receipts.js';
5
+ import type { SheetLogoSize } from '../receipt/blatt.js';
6
+ import { type ManualReceipt } from '../models/manual-receipt.js';
4
7
  import type { InternerTransport } from './aufrufe.js';
5
8
  /**
6
9
  * Belege einer Kasse auflisten (`listReceipts`, nur unter `/v3`): ein Tag oder
@@ -143,9 +146,29 @@ export interface ListReceiptsSummary {
143
146
  customProjectId: string | null;
144
147
  /** Schluessel fuer `downloadReceipt` und den Beleg-Link, oder `null`. */
145
148
  fullReceiptId: string | null;
149
+ /** Nur an nacherfassten Belegen: der Handbeleg. */
150
+ manualReceipt?: ManualReceipt;
146
151
  }
147
- /** Ein Beleg der Liste je Ansicht: `full` das Belegdokument wie bei `getReportV2`, sonst die Zeile. */
148
- export type ListedReceipt<V extends ListReceiptsView = 'summary'> = V extends 'full' ? Receipt : ListReceiptsSummary;
152
+ /**
153
+ * Ein Beleg der vollen Ansicht: das Belegdokument wie bei `getReceipt`, dazu was `getReceipt` in der Huelle
154
+ * traegt, ausser `outputs` und dem Zeilenmodell `layout` (die gibt es nur einzeln ueber `getReceipt`).
155
+ * `headerVersionId` ist die Kopf-Version, die fuer diesen Beleg gilt (auch bei Altbelegen ohne gespeicherte
156
+ * Kennung); ihr Kopf steht in [ListReceiptsPage.headers]. Anbieterdaten der Zahlungen bekommt nur der Betrieb
157
+ * selbst (API-Schluessel oder Kassen-Anmeldung), nie ein Partner-Zugang.
158
+ * Druck- und Anzeigedaten wie bei `getReceiptWithCompany`: [listedReceiptWithCompany].
159
+ */
160
+ export interface ListedFullReceipt extends Receipt {
161
+ /** Produktionskonto mit Test-Signatureinheit (Aufdruck TESTSIGNATUR); fehlt bei einem Backend vor dem 30.10.2026. */
162
+ testSignature?: boolean;
163
+ }
164
+ /** Ein Eintrag in [ListReceiptsPage.headers]: Kopf und Fuss einer Kopf-Version (Felder wie die Huelle von `getReceipt`). */
165
+ export interface ListReceiptsHeader {
166
+ /** `null` nur, wenn das Konto noch keine Kopf-Version hat (dann der heutige Stand). */
167
+ headerVersionId: string | null;
168
+ company: ReceiptCompany;
169
+ }
170
+ /** Ein Beleg der Liste je Ansicht: `full` das Belegdokument wie bei `getReceipt`, sonst die Zeile. */
171
+ export type ListedReceipt<V extends ListReceiptsView = 'summary'> = V extends 'full' ? ListedFullReceipt : ListReceiptsSummary;
149
172
  /**
150
173
  * Tagessumme aus der Tagesstatistik der Kasse, nur bei `date` und nur auf
151
174
  * der ersten Seite. **Nicht die Summe der Liste:** `receiptCount` zaehlt jeden
@@ -180,9 +203,28 @@ export interface ListReceiptsPage<V extends ListReceiptsView = 'summary'> {
180
203
  * `getReportV2().metadata`. Bei der Kurzansicht fehlt das Feld.
181
204
  */
182
205
  metadata?: V extends 'full' ? ReportV2Metadata : never;
206
+ /**
207
+ * Nur bei `view: 'full'`: die Kopf-Versionen der Belege dieser Seite, je Version einmal, aelteste zuerst.
208
+ * Fuer den Druck gilt der Eintrag mit der `headerVersionId` des Belegs, nicht `metadata` (heutiger Stand).
209
+ * Fehlt bei einem Backend vor dem 30.10.2026.
210
+ */
211
+ headers?: V extends 'full' ? ListReceiptsHeader[] : never;
212
+ /** Nur bei `view: 'full'`: Belege einer Testumgebung (Aufdruck TESTKASSE), wie `getReceipt`. */
213
+ testCashregister?: V extends 'full' ? boolean : never;
214
+ /** Nur bei `view: 'full'`: Groesse des Firmenlogos (`logo_scale`), wie `getReceipt`. */
215
+ logoScale?: V extends 'full' ? SheetLogoSize : never;
183
216
  }
184
217
  /** Zeile `view: summary` vom Draht. */
185
218
  export declare function fromListReceiptsSummaryPayload(payload: Record<string, unknown>): ListReceiptsSummary;
219
+ /**
220
+ * Ein Beleg der vollen Ansicht mit den Druck- und Anzeigedaten seiner Seite, in derselben Form wie
221
+ * `getReceiptWithCompany` (ohne `outputs`): der Kopf der Version des Belegs aus `headers` (Nullbelege ohne
222
+ * Logo, wie beim Server), Testkennzeichen, Logo-Stufe. `layout` ist immer `null` -- die Liste traegt kein
223
+ * Zeilenmodell; [receiptLayoutFromResult] baut es dann mit denselben Angaben, oder `getReceiptWithCompany`
224
+ * holt das des Servers. Von einem Backend vor dem 30.10.2026 (ohne `headers`) kommt der Kopf aus
225
+ * `metadata`, dem heutigen Stand.
226
+ */
227
+ export declare function listedReceiptWithCompany(page: ListReceiptsPage<'full'>, receipt: ListedFullReceipt): ReceiptWithCompany;
186
228
  /**
187
229
  * Eine Seite Belege der angemeldeten Kasse (`listReceipts`). Die Eingabe wird
188
230
  * vor dem Senden nach den Regeln des Servers geprueft (genau eine Form des
@@ -190,8 +232,9 @@ export declare function fromListReceiptsSummaryPayload(payload: Record<string, u
190
232
  * `order`, `view`); ein Verstoss wirft [KasseneckValidationError] mit
191
233
  * `scope: 'request'`, ohne dass etwas hinausgeht.
192
234
  *
193
- * Mit `view: 'full'` sind die Belege das gespeicherte Belegdokument
194
- * ([Receipt], dieselbe Form wie `getReportV2`), sonst [ListReceiptsSummary].
235
+ * Mit `view: 'full'` sind die Belege das gespeicherte Belegdokument mit den
236
+ * Angaben, die `getReceipt` liefert ([ListedFullReceipt]; Kopf je Version in
237
+ * `headers`, ohne Zeilenmodell), sonst [ListReceiptsSummary].
195
238
  * Alle Seiten auf einmal: [listAllReceipts].
196
239
  */
197
240
  export declare function listReceipts<V extends ListReceiptsView = 'summary'>(transport: InternerTransport, options: ListReceiptsOptions<V>): Promise<ListReceiptsPage<V>>;
@@ -1,6 +1,7 @@
1
1
  import { KeckPaymentMethod, ReceiptType } from '../enums/index.js';
2
2
  import { CANCELLATION_STATUSES, fromReceiptCompanyPayload, fromReceiptPayload, fromReceiptPaymentPayload, } from '../models/index.js';
3
3
  import { readEnumKey } from '../models/enum-payload.js';
4
+ import { readManualReceipt } from '../models/manual-receipt.js';
4
5
  import { KasseneckValidationError } from './errors.js';
5
6
  /**
6
7
  * Belege einer Kasse auflisten (`listReceipts`, nur unter `/v3`): ein Tag oder
@@ -157,6 +158,10 @@ const istObjekt = (w) => w != null && typeof w === 'object' && !Array.isArray(w)
157
158
  const text = (w) => (typeof w === 'string' ? w : null);
158
159
  // Ganze Cent; ein einzelner unbrauchbarer Betrag laesst die Liste nicht scheitern.
159
160
  const cent = (w) => (typeof w === 'number' && Number.isInteger(w) ? w : 0);
161
+ function handbelegFeld(roh) {
162
+ const manualReceipt = readManualReceipt(roh);
163
+ return manualReceipt ? { manualReceipt } : {};
164
+ }
160
165
  function istStornoStand(w) {
161
166
  return typeof w === 'string' && CANCELLATION_STATUSES.includes(w);
162
167
  }
@@ -191,6 +196,7 @@ export function fromListReceiptsSummaryPayload(payload) {
191
196
  signatureOk: payload['signatureOk'] !== false,
192
197
  customProjectId: text(payload['customProjectId']),
193
198
  fullReceiptId: text(payload['fullReceiptId']),
199
+ ...handbelegFeld(payload['manualReceipt']),
194
200
  };
195
201
  }
196
202
  function tagessumme(roh) {
@@ -213,6 +219,57 @@ function kopfdaten(roh) {
213
219
  const label = roh.label;
214
220
  return { ...fromReceiptCompanyPayload(roh), label: typeof label === 'string' ? label : '' };
215
221
  }
222
+ const LOGO_STUFEN = ['S', 'M', 'L', 'XL'];
223
+ /** Ein Beleg der vollen Ansicht vom Draht: das Belegdokument und die Zusaetze, die `getReceipt` in der Huelle traegt. */
224
+ function vollerBeleg(roh) {
225
+ const beleg = fromReceiptPayload(roh);
226
+ if (typeof roh['testSignature'] === 'boolean')
227
+ beleg.testSignature = roh['testSignature'];
228
+ return beleg;
229
+ }
230
+ /** `headers` der vollen Ansicht: je Kopf-Version Kennung und Kopf. */
231
+ function koepfe(roh) {
232
+ if (!Array.isArray(roh) || roh.some((h) => !istObjekt(h)))
233
+ throw antwortfehler('headers ist keine Liste von Kopf-Versionen');
234
+ return roh.map((h) => ({
235
+ headerVersionId: typeof h['headerVersionId'] === 'string' && h['headerVersionId'] !== '' ? h['headerVersionId'] : null,
236
+ company: fromReceiptCompanyPayload(h),
237
+ }));
238
+ }
239
+ /**
240
+ * Ein Beleg der vollen Ansicht mit den Druck- und Anzeigedaten seiner Seite, in derselben Form wie
241
+ * `getReceiptWithCompany` (ohne `outputs`): der Kopf der Version des Belegs aus `headers` (Nullbelege ohne
242
+ * Logo, wie beim Server), Testkennzeichen, Logo-Stufe. `layout` ist immer `null` -- die Liste traegt kein
243
+ * Zeilenmodell; [receiptLayoutFromResult] baut es dann mit denselben Angaben, oder `getReceiptWithCompany`
244
+ * holt das des Servers. Von einem Backend vor dem 30.10.2026 (ohne `headers`) kommt der Kopf aus
245
+ * `metadata`, dem heutigen Stand.
246
+ */
247
+ export function listedReceiptWithCompany(page, receipt) {
248
+ const kennung = receipt.headerVersionId ?? null;
249
+ const eintrag = page.headers?.find((h) => h.headerVersionId === kennung);
250
+ let company;
251
+ if (eintrag)
252
+ company = { ...eintrag.company };
253
+ else if (page.metadata) {
254
+ const { label: _label, ...kopf } = page.metadata;
255
+ company = kopf;
256
+ }
257
+ else
258
+ company = fromReceiptCompanyPayload({});
259
+ const art = typeof receipt.receiptType === 'object' ? receipt.receiptType.value : receipt.receiptType;
260
+ if (art === ReceiptType.zero.value)
261
+ delete company.logoUrl;
262
+ return {
263
+ receipt,
264
+ company,
265
+ testCashregister: page.testCashregister === true,
266
+ testSignature: receipt.testSignature === true,
267
+ headerVersionId: kennung,
268
+ layout: null,
269
+ registrationInfo: receipt.registrationInfo ?? null,
270
+ logoScale: page.logoScale ?? 'M',
271
+ };
272
+ }
216
273
  /**
217
274
  * Eine Seite Belege der angemeldeten Kasse (`listReceipts`). Die Eingabe wird
218
275
  * vor dem Senden nach den Regeln des Servers geprueft (genau eine Form des
@@ -220,8 +277,9 @@ function kopfdaten(roh) {
220
277
  * `order`, `view`); ein Verstoss wirft [KasseneckValidationError] mit
221
278
  * `scope: 'request'`, ohne dass etwas hinausgeht.
222
279
  *
223
- * Mit `view: 'full'` sind die Belege das gespeicherte Belegdokument
224
- * ([Receipt], dieselbe Form wie `getReportV2`), sonst [ListReceiptsSummary].
280
+ * Mit `view: 'full'` sind die Belege das gespeicherte Belegdokument mit den
281
+ * Angaben, die `getReceipt` liefert ([ListedFullReceipt]; Kopf je Version in
282
+ * `headers`, ohne Zeilenmodell), sonst [ListReceiptsSummary].
225
283
  * Alle Seiten auf einmal: [listAllReceipts].
226
284
  */
227
285
  export async function listReceipts(transport, options) {
@@ -242,14 +300,20 @@ export async function listReceipts(transport, options) {
242
300
  throw antwortfehler('nextCursor passt nicht zu hasMore (Text bei hasMore, sonst null)');
243
301
  }
244
302
  const receipts = (voll
245
- ? liste.map((b) => fromReceiptPayload(b))
303
+ ? liste.map((b) => vollerBeleg(b))
246
304
  : liste.map((b) => fromListReceiptsSummaryPayload(b)));
305
+ const stufe = daten['logo_scale'];
247
306
  return {
248
307
  receipts,
249
308
  hasMore: daten['hasMore'],
250
309
  nextCursor: daten['hasMore'] ? weiter : null,
251
310
  ...('daySummary' in daten ? { daySummary: tagessumme(daten['daySummary']) } : {}),
252
311
  ...(voll && 'metadata' in daten ? { metadata: kopfdaten(daten['metadata']) } : {}),
312
+ ...(voll && 'headers' in daten ? { headers: koepfe(daten['headers']) } : {}),
313
+ ...(voll && 'testCashregister' in daten ? { testCashregister: (daten['testCashregister'] === true) } : {}),
314
+ ...(voll && 'logo_scale' in daten
315
+ ? { logoScale: (typeof stufe === 'string' && LOGO_STUFEN.includes(stufe) ? stufe : 'M') }
316
+ : {}),
253
317
  };
254
318
  }
255
319
  /**
@@ -1,4 +1,5 @@
1
1
  import { ReceiptType, type ReceiptTypeKey, KeckPaymentMethod, type KeckPaymentMethodKey } from '../enums/index.js';
2
+ import type { ManualReceipt } from '../models/manual-receipt.js';
2
3
  import { type Receipt, type ReceiptCompany, type ReceiptItem, type Voucher, type ReceiptSummary, type ReportMonth, type CancellationItem, type CancellationOf, type CancellationReason, type TipRefundSource, type ReturnDisposition, type ReceiptPaymentInput, type RegistrationInfo, type ReceiptEmailVia } from '../models/index.js';
3
4
  import { type ReceiptOutput, type ReceiptOutputEntryErrorCode, type ReceiptOutputLogKind, type ReceiptOutputResult } from '../models/receipt-output.js';
4
5
  import type { InternerTransport } from './aufrufe.js';
@@ -43,6 +44,11 @@ export interface ReceiptCommonOptions {
43
44
  legalMessage?: string[];
44
45
  /** Freier Bezeichner des Aufrufers (Projekt, Auftrag, Schicht). */
45
46
  customProjectId?: string;
47
+ /**
48
+ * Nacherfassung eines Handbelegs (siehe [ManualReceipt]); nur bei
49
+ * `standard`. Geprueft wird am Server, die Eingabe geht unveraendert hinaus.
50
+ */
51
+ manualReceipt?: ManualReceipt;
46
52
  /**
47
53
  * Trinkgeld in Cent — als Zahl (an den angemeldeten Kassen-Benutzer, Zahlart
48
54
  * des Belegs) oder als [TipOptions]. Das Backend bucht daraus signierte
@@ -173,6 +173,12 @@ export function createReceiptParams(options) {
173
173
  if (options.customProjectId != null) {
174
174
  params['customProjectId'] = options.customProjectId;
175
175
  }
176
+ if (options.manualReceipt != null) {
177
+ if (typ !== ReceiptType.standard) {
178
+ throw eingabefehler(`manualReceipt ist nur bei receiptType standard moeglich, nicht bei "${typ.value}".`);
179
+ }
180
+ params['manualReceipt'] = options.manualReceipt;
181
+ }
176
182
  if (options.customerDetails != null) {
177
183
  params['customerDetails'] = options.customerDetails.join('\n');
178
184
  }
@@ -899,7 +905,7 @@ export function cardRefundReference(receipt, paymentId) {
899
905
  throw new KasseneckValidationError('cancelReceipt', `Zahlung "${paymentId}" ist keine Kartenzahlung`, 'request');
900
906
  }
901
907
  if (typeof zahlung.providerPaymentId !== 'string' || zahlung.providerPaymentId === '') {
902
- throw new KasseneckValidationError('cancelReceipt', `Kennung der Kartenzahlung "${paymentId}" fehlt: sie kommt nur ueber den Kassenweg (registerUserAuth, kasse.kasseneck.at/api/v3), nicht ueber den oeffentlichen Weg`, 'request');
908
+ throw new KasseneckValidationError('cancelReceipt', `Kennung der Kartenzahlung "${paymentId}" fehlt: der Beleg kam ohne Anbieterdaten (sie bekommt nur der Betrieb selbst, mit API-Schluessel oder Kassen-Anmeldung, nie ein Partner-Zugang)`, 'request');
903
909
  }
904
910
  return zahlung.providerPaymentId;
905
911
  }
@@ -925,7 +931,7 @@ function pruefeKartenRueckbuchung(zahlungen, original) {
925
931
  const orig = original != null && typeof z['refundOf'] === 'string' ? original.payments?.find((o) => o.id === z['refundOf']) : undefined;
926
932
  if (typeof orig?.providerPaymentId === 'string' && orig.providerPaymentId !== '')
927
933
  return;
928
- throw new KasseneckValidationError('cancelReceipt', `Zahlung ${i + 1}: Karten-Rueckbuchung ohne Bezug: providerPaymentId der Erstattung am Terminal angeben (oder das Original ueber den Kassenweg lesen, dort traegt es die Kennung der Kartenzahlung)`, 'request');
934
+ throw new KasseneckValidationError('cancelReceipt', `Zahlung ${i + 1}: Karten-Rueckbuchung ohne Bezug: providerPaymentId der Erstattung am Terminal angeben (oder das Original mit Anbieterdaten lesen: API-Schluessel des Betriebs oder Kassen-Anmeldung, dort traegt es die Kennung der Kartenzahlung)`, 'request');
929
935
  });
930
936
  }
931
937
  /** Kartenanbieter pruefen — er stammt vom Aufrufer, nicht aus Serverdaten. */
@@ -1,6 +1,6 @@
1
1
  export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
2
2
  export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
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, 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, 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, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
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, 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, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
4
4
  export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
6
6
  export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, } from './pos/index.js';
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { ReceiptType, VatRate, KeckPaymentMethod, CreditCardProvider, VoucherType, VoucherAction, StripeLinkMode, } from './enums/index.js';
2
2
  export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, isVoucherItem, isVoucherFloatItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_LOG_KINDS, RECEIPT_OUTPUT_RESULTS, RECEIPT_OUTPUT_ENTRIES_MAX, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, RECEIPT_OUTPUT_ERROR_CODES, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
- export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, createTransport, createBinaryTransport, createPdfOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, listMyCashregisters, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
3
+ export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, createTransport, createBinaryTransport, createPdfOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, listMyCashregisters, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
4
4
  export { receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock } from './vienna-time.js';
6
6
  export { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, } from './pos/index.js';
@@ -10,6 +10,7 @@ export { RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS,
10
10
  export { type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, } from './receipt-company.js';
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
+ export { type ManualReceipt, type ManualReceiptReason, MANUAL_RECEIPT_REASONS, readManualReceipt, type ManualReceiptErrorCode, MANUAL_RECEIPT_ERROR_CODES, isManualReceiptErrorCode, } from './manual-receipt.js';
13
14
  export { type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, } from './report-month.js';
14
15
  export { type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, } from './stripe-url-session.js';
15
16
  export { type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './hobex-receipt.js';
@@ -10,6 +10,7 @@ export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_LOG_KINDS, RECEIPT_OUTPUT_RESULTS,
10
10
  export { fromReceiptCompanyPayload, receiptCompanyTaxInfo, } from './receipt-company.js';
11
11
  export { fromCashregisterPayload, } from './cashregister.js';
12
12
  export { fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind } from './receipt-summary.js';
13
+ export { MANUAL_RECEIPT_REASONS, readManualReceipt, MANUAL_RECEIPT_ERROR_CODES, isManualReceiptErrorCode, } from './manual-receipt.js';
13
14
  export { reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, } from './report-month.js';
14
15
  export { toStripeUrlSessionPayload, fromStripeUrlSessionPayload, } from './stripe-url-session.js';
15
16
  export { toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './hobex-receipt.js';