@kreiseck/kasseneck-api 1.31.0 → 1.32.1
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.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/client/aufrufe.d.ts +3 -3
- package/dist/cjs/client/aufrufe.js +8 -0
- package/dist/cjs/client/receipts.d.ts +11 -0
- package/dist/cjs/client/receipts.js +28 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +8 -5
- package/dist/cjs/models/index.d.ts +1 -1
- package/dist/cjs/models/index.js +5 -2
- package/dist/cjs/models/receipt-errors.d.ts +1 -1
- package/dist/cjs/models/receipt-errors.js +9 -0
- package/dist/cjs/models/receipt-item.d.ts +44 -2
- package/dist/cjs/models/receipt-item.js +56 -1
- package/dist/cjs/models/receipt.d.ts +17 -0
- package/dist/cjs/models/receipt.js +9 -0
- package/dist/cjs/pos/artikel.d.ts +14 -0
- package/dist/cjs/pos/artikel.js +3 -0
- package/dist/cjs/pos/client.d.ts +1 -0
- package/dist/cjs/pos/client.js +3 -0
- package/dist/cjs/pos/errors.d.ts +1 -1
- package/dist/cjs/pos/errors.js +12 -0
- package/dist/cjs/pos/fremdgutschein-artikel.d.ts +3 -2
- package/dist/cjs/pos/fremdgutschein-artikel.js +4 -2
- package/dist/cjs/pos/index.d.ts +4 -2
- package/dist/cjs/pos/index.js +24 -4
- package/dist/cjs/pos/leergut.d.ts +60 -0
- package/dist/cjs/pos/leergut.js +82 -0
- package/dist/cjs/pos/pfand.d.ts +144 -0
- package/dist/cjs/pos/pfand.js +382 -0
- package/dist/cjs/pos/settings.d.ts +3 -7
- package/dist/cjs/pos/settings.js +7 -0
- package/dist/cjs/pos/texte.d.ts +72 -0
- package/dist/cjs/pos/texte.js +42 -1
- package/dist/cjs/receipt/discount.js +3 -0
- package/dist/cjs/receipt/due.d.ts +6 -0
- package/dist/cjs/receipt/due.js +16 -5
- package/dist/cjs/receipt/gutschein-plan.d.ts +7 -1
- package/dist/cjs/receipt/gutschein-plan.js +16 -2
- package/dist/cjs/receipt/layout.js +108 -2
- package/dist/cjs/register/pairing.d.ts +15 -1
- package/dist/cjs/register/pairing.js +14 -1
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +72 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/aufrufe.d.ts +3 -3
- package/dist/esm/client/aufrufe.js +8 -0
- package/dist/esm/client/receipts.d.ts +11 -0
- package/dist/esm/client/receipts.js +29 -3
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/esm/models/receipt-errors.d.ts +1 -1
- package/dist/esm/models/receipt-errors.js +9 -0
- package/dist/esm/models/receipt-item.d.ts +44 -2
- package/dist/esm/models/receipt-item.js +54 -1
- package/dist/esm/models/receipt.d.ts +17 -0
- package/dist/esm/models/receipt.js +9 -0
- package/dist/esm/pos/artikel.d.ts +14 -0
- package/dist/esm/pos/artikel.js +3 -0
- package/dist/esm/pos/client.d.ts +1 -0
- package/dist/esm/pos/client.js +3 -0
- package/dist/esm/pos/errors.d.ts +1 -1
- package/dist/esm/pos/errors.js +12 -0
- package/dist/esm/pos/fremdgutschein-artikel.d.ts +3 -2
- package/dist/esm/pos/fremdgutschein-artikel.js +4 -2
- package/dist/esm/pos/index.d.ts +4 -2
- package/dist/esm/pos/index.js +4 -2
- package/dist/esm/pos/leergut.d.ts +60 -0
- package/dist/esm/pos/leergut.js +77 -0
- package/dist/esm/pos/pfand.d.ts +144 -0
- package/dist/esm/pos/pfand.js +371 -0
- package/dist/esm/pos/settings.d.ts +3 -7
- package/dist/esm/pos/settings.js +7 -0
- package/dist/esm/pos/texte.d.ts +72 -0
- package/dist/esm/pos/texte.js +40 -0
- package/dist/esm/receipt/discount.js +4 -1
- package/dist/esm/receipt/due.d.ts +6 -0
- package/dist/esm/receipt/due.js +17 -6
- package/dist/esm/receipt/gutschein-plan.d.ts +7 -1
- package/dist/esm/receipt/gutschein-plan.js +14 -2
- package/dist/esm/receipt/layout.js +109 -3
- package/dist/esm/register/pairing.d.ts +15 -1
- package/dist/esm/register/pairing.js +13 -1
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +72 -4
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/deposit-cases.json +4758 -0
- package/fixtures/expected/deposit-return.grid32.txt +28 -0
- package/fixtures/expected/deposit-return.grid48.txt +28 -0
- package/fixtures/expected/deposit-return.lines.json +275 -0
- package/fixtures/expected/deposit-return.sheet32.json +194 -0
- package/fixtures/expected/deposit-return.sheet48.json +194 -0
- package/fixtures/expected/deposit.grid32.txt +34 -0
- package/fixtures/expected/deposit.grid48.txt +32 -0
- package/fixtures/expected/deposit.lines.json +316 -0
- package/fixtures/expected/deposit.sheet32.json +230 -0
- package/fixtures/expected/deposit.sheet48.json +218 -0
- package/fixtures/external-voucher-article-cases.json +20 -0
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/manifest.json +16 -0
- package/fixtures/pos-texts.json +66 -1
- package/fixtures/receipts/deposit-return.json +63 -0
- package/fixtures/receipts/deposit.json +83 -0
- package/fixtures/return-code-cases.json +1338 -0
- package/fixtures/surface.json +45 -4
- package/fixtures/v3/antworten/belege.json +2 -2
- package/fixtures/v3/antworten/belegmail.json +2 -2
- package/fixtures/v3/antworten/berichte.json +2 -2
- package/fixtures/v3/antworten/kasse-belege.json +2 -2
- package/fixtures/v3/antworten/kasse.json +428 -13
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +2 -2
- package/fixtures/v3/antworten/storno.json +2 -2
- package/fixtures/v3/stored/belege.json +2 -2
- package/fixtures/v3/stored/kasse.json +42 -4
- package/fixtures/v3/stored/rechnungen.json +2 -2
- package/fixtures/v3/v3-vokabular.json +808 -27
- package/fixtures/v3/zahlbetrag-faelle.json +187 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ Was vor 0.7.0 geschah, steht in der Commit-Historie (`git log`); ab hier wird
|
|
|
4
4
|
es hier geführt. Ein Eintrag nennt die Änderung **und ihren Grund** —
|
|
5
5
|
nur der Grund überlebt den nächsten Umbau.
|
|
6
6
|
|
|
7
|
+
## 1.32.1 - unveröffentlicht
|
|
8
|
+
|
|
9
|
+
Fix: a deposit payout (a receipt whose amount due is negative because of returned empties) is no longer refused before sending. `sellReceipt`/`createReceipt` accept one negative cash payment when the items contain a `deposit_return` line, with no `tenderedCents` and no `tipCents`, and at most the sum of the return lines. Reason: the server allows this payout (`istLeergutAuszahlung`) but the client check demanded `amountCents > 0` unless the receipt was a voucher payout. Without empties a negative payment is still refused; empties with a positive amount stay an ordinary sale.
|
|
10
|
+
|
|
11
|
+
Fix: an article marked as external voucher with a non-empty deposit list is refused (`article_external_voucher_invalid`, reason `deposit`), like the backend; an empty or missing list stays allowed. Reason: the client check did not know the deposit rule of `pruefeArtikel`.
|
|
12
|
+
|
|
13
|
+
## 1.32.0 - unveröffentlicht
|
|
14
|
+
|
|
15
|
+
Deposit and returnable empties at the till (backend November 2026): the server adds the deposit lines, the till previews them, takes empties back, and the bon prints them. Additive; articles, groups, settings and receipts without the new fields read, send and print exactly as before (all existing goldens unchanged).
|
|
16
|
+
|
|
17
|
+
- **Receipt lines** `ReceiptItem.kind` `'deposit'` / `'deposit_return'` (stored `pfand` / `pfand_rueckgabe`), with `depositTypeId` (`pfandartId`), `depositFor` (`pfandZu`), `depositKind` (`pfandArt`, `single_use | reusable` from `einweg | mehrweg`), `perUnit` (`jeStueck`), `gtin`, `ean`, `ownFilling` (`eigen`), `codes`; `isDepositItem`, `isDepositReturnItem`. A deposit line sent with an `articleId` is refused (`invalid_deposit`); a deposit without `articleId` and a return line are allowed. Read deposit lines carry `perUnit` and `depositKind`, which the server sets: do not send them back as a wish to `createReceipt`. Reason: the deposit belongs to the article and the server books it; the till only shows it.
|
|
18
|
+
- **Create options** `autoDeposits?` and `onPremises?` (booleans, sent only when given). Receipt level `Receipt.onPremises` (`vorOrt`) and `Receipt.sharedReturnPoint` `{ name, address }` (`pfandStelle`).
|
|
19
|
+
- **Deposit data** (`./pos`): lists and types `DEPOSIT_KINDS` / `DepositKind` (`single_use | reusable`), `DEPOSIT_TYPES` / `DepositContainerType`, `DEPOSIT_RETURN_MODES` / `DepositReturnMode`, `DEPOSIT_ON_PREMISES_DEFAULTS` / `DepositOnPremisesDefault`; types `DepositAmount`, `DepositType`, `DepositSettings`, `DepositEntry`, `DepositSharedReturnPoint`, `CashRegisterDeposit`; readers `posDepositSettingsFromWire`, `depositEntriesFromWire`, `cashRegisterDepositFromWire`. `PosArticle.deposits` and `ArticleGroup.deposits` (`DepositEntry[] | null`, always set by the reader), `PosSettings.deposit` (absent without block), `cashregister.deposit` from `listRegisterUsersForDevice`. Permission `RegisterUserPerms.depositReturn` and `depositReturnOf(perms)` (root and `./pos`; missing = allowed, only an explicit `false` blocks).
|
|
20
|
+
- **Preview like the server** (`./pos`): `depositsFor(article, group)` (article before group, `[]` = no deposit, external voucher articles none), `depositAmountOn(type, day)`, `viennaDay(nowMs)`, `withDepositLines(items, input)` (same floating-point steps as the server; result `DepositPreviewResult`: `{ ok: true, items }` or `{ ok: false, code }` with `DepositPreviewErrorCode`), `depositReturnLine(type, quantity, options)`; types `DepositPreviewInput`, `DepositPreviewItem`, `DepositPreviewLine`, `DepositPreviewArticle`. Cases `fixtures/deposit-cases.json`: byte for byte the backend's `deposit-cases.json`.
|
|
21
|
+
- **Return codes** (`./pos`): `learnReturnCode(transport, { gtin, depositTypeId })` (`learnMyLeergutCode`), `listReturnCodes(transport)` (`listMyLeergutCodes`), `matchReturnCode(code, input)` -> `ReturnCodeMatch` (`{ entries: ReturnCodeEntry[] }` or `{ unknown: true }`) with `ReturnCodeInput` (`articles: ReturnCodeArticle[]`, `groups: ReturnCodeGroup[]`, learned `ReturnCode[]`, deposit types); order: learned, GTIN at a deposit entry, article `ean`/`number`/`internalCode`, else unknown. Cases `fixtures/return-code-cases.json` belong to this package (invented, check-digit-correct GTINs).
|
|
22
|
+
- **Till calls:** `learnMyLeergutCode` and `listMyLeergutCodes` join `ALL_CALLS` and `POS_CALLS` (the till way only, for register users with the permission `depositReturn`); `learnMyLeergutCode` is in `UNKNOWN_OUTCOME_CALLS`, `listMyLeergutCodes` is read-only in `CALLS_WITHOUT_EFFECT`.
|
|
23
|
+
- **Amount due:** `receiptDueCents` / `receiptDueBreakdown` keep deposit and empties out of discount and voucher cover, put them unreduced into the bucket of their rate (single-use at 0 % = zero) after the promo step; `distributeDiscount` skips them; vouchers never cover deposit or return lines. `ReceiptDueBreakdown.payout?: 'deposit'` marks a pure empties payout. Reason: deposit is a pass-through, no discount base and no voucher currency.
|
|
24
|
+
- **Bon:** deposit as a sub line (` + `) below its item and add-ons, empties as an own line with a negative amount, line „Pfand, nicht steuerbar“ below the tax table (only with single-use at 0 %), footer „Leergut-Rückgabe: <name>, <address>“, a pure empties receipt titled „Leergut-Rückgabe“ and „Bar ausgezahlt“. New goldens `deposit` and `deposit-return`.
|
|
25
|
+
- **Errors:** `RECEIPT_ERROR_CODES` gains `deposit_not_enabled`, `deposit_return_not_offered`, `deposit_set_by_server`, `deposit_type_not_found`, `deposit_type_not_issued`, `invalid_deposit`, `invalid_deposit_quantity`, `invalid_item_kind`; `POS_ERROR_CODES` gains `deposit_follows_item`, `deposit_not_enabled`, `deposit_return_not_offered`, `deposit_set_by_server`, `deposit_type_in_use`, `deposit_type_not_found`, `deposit_type_not_issued`, `filler_role_required`, `invalid_deposit`, `invalid_deposit_quantity`, `invalid_item_kind`, `too_many_deposit_types`. `deposit_follows_item` (cancellation) is not in `CANCELLATION_ERROR_CODES`, yet `depositErrorMessage` knows it. Stored vocabulary `deposit`/`deposit_return`, `single_use`/`reusable` and the field names above in `./stored`.
|
|
26
|
+
- **Texts:** `DEPOSIT_ERROR_MESSAGES` (code -> message key) / `depositErrorMessage(code)` (returns the message key, `undefined` for any other code; resolve it with `messageText`; eight codes, short sentences without legal language; also `depositErrors` in `pos-texts.json`), message `deposit.changed`, labels `deposit.return`, `.payout`, `.offset`, `.unknown_code`, `.over_usual`, `.on_premises`, `.takeaway`, `.sum`.
|
|
27
|
+
- Contract `v3` re-fetched (deposit blocks, fields, catalogs and codes), `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json` and `hobex-hps-codes.json` regenerated for the version.
|
|
28
|
+
|
|
7
29
|
## 1.31.0 - unveröffentlicht
|
|
8
30
|
|
|
9
31
|
External vouchers at the till: a tile sells an external voucher, the payment screen redeems one through the same code field, the payout sheet switches between own and external, the cancellation flow warns. Additive; articles, groups and receipts without the new field read, print and send exactly as before (all existing goldens unchanged).
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* umhuellt, muss ihn weiterhin absetzen koennen.
|
|
14
14
|
*/
|
|
15
15
|
import type { FileOrData, FileOrDataCallOptions, PdfOrData, TransportBodyFields, TransportCallOptions } from './transport.js';
|
|
16
|
-
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady"];
|
|
16
|
+
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady"];
|
|
17
17
|
export type ApiCall = typeof ALL_CALLS[number];
|
|
18
18
|
/**
|
|
19
19
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -29,7 +29,7 @@ export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "can
|
|
|
29
29
|
* die fuenf DEP-Aufrufe); die Kasse ruft sie trotzdem ueber diesen Weg (ein Dialekt
|
|
30
30
|
* je Client, Nachtrag §5.2).
|
|
31
31
|
*/
|
|
32
|
-
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState"];
|
|
32
|
+
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes"];
|
|
33
33
|
export type PublicCall = typeof PUBLIC_CALLS[number];
|
|
34
34
|
export type PosCall = typeof POS_CALLS[number];
|
|
35
35
|
/**
|
|
@@ -50,7 +50,7 @@ export type PosCall = typeof POS_CALLS[number];
|
|
|
50
50
|
* [ALL_CALLS], [PUBLIC_CALLS] und [POS_CALLS] steht entweder hier oder in
|
|
51
51
|
* [CALLS_WITHOUT_EFFECT] (Waechter `test/ausgang-einordnung.test.ts`).
|
|
52
52
|
*/
|
|
53
|
-
export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "getTerminalCode", "hobexPayApi", "hobexRefundApi", "issueInvoice", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyShiftCount", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "registerTerminalDevice", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
|
|
53
|
+
export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "getTerminalCode", "hobexPayApi", "hobexRefundApi", "issueInvoice", "learnMyLeergutCode", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyShiftCount", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "registerTerminalDevice", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
|
|
54
54
|
/** Warum ein Aufruf keine Wirkung hat, die ein Zeitlimit offen lassen koennte. */
|
|
55
55
|
export type CallWithoutEffectReason = 'read' | 'repeatable';
|
|
56
56
|
/**
|
|
@@ -157,6 +157,9 @@ exports.ALL_CALLS = [
|
|
|
157
157
|
'getRegisterInspectionInfo',
|
|
158
158
|
// Connect-Bestand (./pos): welche Connect-Version an welchem Kassengeraet laeuft; nur ueber den Kassenweg.
|
|
159
159
|
'reportConnectState',
|
|
160
|
+
// Leergut-Codes (Pfand, ./pos): Codes lernen und lesen; nur ueber den Kassenweg.
|
|
161
|
+
'learnMyLeergutCode',
|
|
162
|
+
'listMyLeergutCodes',
|
|
160
163
|
// Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
|
|
161
164
|
'registerTerminalDevice',
|
|
162
165
|
'getTerminalAccess',
|
|
@@ -370,6 +373,9 @@ exports.POS_CALLS = [
|
|
|
370
373
|
'getRegisterInspectionInfo',
|
|
371
374
|
// Connect-Bestand: nur ueber den Kassenweg, jeder Kassen-Benutzer.
|
|
372
375
|
'reportConnectState',
|
|
376
|
+
// Leergut-Codes lernen und lesen: Kassen-Benutzer mit dem Recht depositReturn.
|
|
377
|
+
'learnMyLeergutCode',
|
|
378
|
+
'listMyLeergutCodes',
|
|
373
379
|
];
|
|
374
380
|
/**
|
|
375
381
|
* Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
|
|
@@ -421,6 +427,7 @@ exports.UNKNOWN_OUTCOME_CALLS = [
|
|
|
421
427
|
'hobexPayApi',
|
|
422
428
|
'hobexRefundApi',
|
|
423
429
|
'issueInvoice',
|
|
430
|
+
'learnMyLeergutCode',
|
|
424
431
|
'logMyDrawerOpenings',
|
|
425
432
|
'logReceiptOutputs',
|
|
426
433
|
'openMyShift',
|
|
@@ -503,6 +510,7 @@ exports.CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
503
510
|
generateFullReceiptId: 'read',
|
|
504
511
|
getCashregisterReport: 'read',
|
|
505
512
|
getArticle: 'read',
|
|
513
|
+
listMyLeergutCodes: 'read',
|
|
506
514
|
getCustomer: 'read',
|
|
507
515
|
getCustomerCredentials: 'read',
|
|
508
516
|
getCustomerSignatureStatus: 'read',
|
|
@@ -66,6 +66,17 @@ export interface ReceiptCommonOptions {
|
|
|
66
66
|
* Hauptlade der Kasse. Leer oder kein Text: wirft vor dem Senden.
|
|
67
67
|
*/
|
|
68
68
|
drawerId?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Pfand & Leergut: der Server setzt die Pfandzeilen aus den Artikeln (`deposits`) selbst und rechnet den Betrag.
|
|
71
|
+
* Ohne Angabe gilt die Vorgabe des Servers (an, solange der Betrieb Pfand eingeschaltet hat). Mit `false` setzt er
|
|
72
|
+
* keine; ausdrueckliche Zeilen `deposit` ohne `articleId` und `deposit_return` bleiben erlaubt.
|
|
73
|
+
*/
|
|
74
|
+
autoDeposits?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Pfand & Leergut: der Verkauf wird vor Ort verzehrt (`true`) oder mitgenommen (`false`). Ohne Angabe gilt die
|
|
77
|
+
* Vorgabe der Kasse (`CashRegisterDeposit.onPremisesDefault`). Nur ein Wahrheitswert; anderes wirft vor dem Senden.
|
|
78
|
+
*/
|
|
79
|
+
onPremises?: boolean;
|
|
69
80
|
/**
|
|
70
81
|
* Schutz vor einem zweiten Beleg, wenn die Antwort verloren geht (Netzabbruch,
|
|
71
82
|
* Zeitablauf, `outcome: 'unknown'`). Gilt je Kasse: dieselbe Anfrage mit
|
|
@@ -120,6 +120,16 @@ function createReceiptParams(options) {
|
|
|
120
120
|
if (items?.some((item) => item.kind === 'voucher' || item.kind === 'voucher_float') ?? false) {
|
|
121
121
|
throw eingabefehler('voucher_invalid: Gutschein-Positionen (kind voucher, voucher_float) setzt nur der Server.');
|
|
122
122
|
}
|
|
123
|
+
// Pfandzeilen setzt der Server aus den Artikeln: eine Zeile `deposit` mit `articleId` waere doppelt gemeint.
|
|
124
|
+
if (items?.some((item) => item.kind === 'deposit' && item.articleId != null && item.articleId !== '') ?? false) {
|
|
125
|
+
throw eingabefehler('invalid_deposit: Eine Pfandzeile (kind deposit) traegt keine articleId; der Server setzt sie aus dem Artikel (autoDeposits).');
|
|
126
|
+
}
|
|
127
|
+
for (const feld of ['autoDeposits', 'onPremises']) {
|
|
128
|
+
const wert = options[feld];
|
|
129
|
+
if (wert !== undefined && typeof wert !== 'boolean') {
|
|
130
|
+
throw eingabefehler(`${feld} muss true oder false sein (oder weglassen).`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
123
133
|
if (typ.needsItems) {
|
|
124
134
|
// Ein reiner Gutscheinverkauf ist ein Umsatz ohne Positionen, deshalb
|
|
125
135
|
// zaehlt er hier wie eine Position (wie im Flutter-Vorbild).
|
|
@@ -180,7 +190,14 @@ function createReceiptParams(options) {
|
|
|
180
190
|
// Wie der Server erst nach dem Anhaengen des Trinkgelds: eine Trinkgeldzeile ist keine Gutscheinzeile.
|
|
181
191
|
const nurAuszahlung = (vouchers?.length ?? 0) > 0 && vouchers.every((v) => v.action === index_js_1.VoucherAction.payout)
|
|
182
192
|
&& (items?.length ?? 0) === 0 && options.tip == null;
|
|
183
|
-
|
|
193
|
+
// Leergut-Auszahlung (Server pfand-core istLeergutAuszahlung): Leergut auf dem Beleg und eine negative Zahlung.
|
|
194
|
+
const leergut = (items ?? []).filter(index_js_2.isDepositReturnItem);
|
|
195
|
+
const leergutAuszahlung = leergut.length > 0 && Array.isArray(options.payments)
|
|
196
|
+
&& options.payments.some((z) => typeof z?.amountCents === 'number' && z.amountCents < 0);
|
|
197
|
+
const leergutSummeCents = leergutAuszahlung
|
|
198
|
+
? leergut.reduce((summe, p) => summe + Math.abs((0, index_js_2.receiptItemTotalCents)(p)), 0)
|
|
199
|
+
: undefined;
|
|
200
|
+
params['payments'] = gepruefteZahlungen(options.payments, false, 'createReceipt', nurAuszahlung || leergutAuszahlung, false, leergutSummeCents);
|
|
184
201
|
}
|
|
185
202
|
else if (options.payments != null) {
|
|
186
203
|
throw eingabefehler(`payments sind bei receiptType "${typ.value}" nicht erlaubt.`);
|
|
@@ -212,6 +229,10 @@ function createReceiptParams(options) {
|
|
|
212
229
|
if (options.idempotencyKey != null) {
|
|
213
230
|
params['idempotencyKey'] = belegSchluessel(options.idempotencyKey);
|
|
214
231
|
}
|
|
232
|
+
if (options.autoDeposits !== undefined)
|
|
233
|
+
params['autoDeposits'] = options.autoDeposits;
|
|
234
|
+
if (options.onPremises !== undefined)
|
|
235
|
+
params['onPremises'] = options.onPremises;
|
|
215
236
|
return params;
|
|
216
237
|
}
|
|
217
238
|
/** Hoechstlaenge des `idempotencyKey` am Beleg, wie am Server (beleg-idempotenz-core `SCHLUESSEL_MAX`). */
|
|
@@ -867,7 +888,7 @@ const MAX_ZAHLUNGEN = 20;
|
|
|
867
888
|
* (Summe, Anbieter-Pflicht und Trinkgeld prueft der Server). Wirft, bevor
|
|
868
889
|
* etwas hinausgeht.
|
|
869
890
|
*/
|
|
870
|
-
function gepruefteZahlungen(roh, storno, functionName, auszahlung = false, stornoAuszahlung = false) {
|
|
891
|
+
function gepruefteZahlungen(roh, storno, functionName, auszahlung = false, stornoAuszahlung = false, leergutSummeCents) {
|
|
871
892
|
const fehler = (grund) => new errors_js_1.KasseneckValidationError(functionName, grund, 'request');
|
|
872
893
|
if (!Array.isArray(roh))
|
|
873
894
|
throw fehler('payments muss eine Liste sein.');
|
|
@@ -888,6 +909,11 @@ function gepruefteZahlungen(roh, storno, functionName, auszahlung = false, storn
|
|
|
888
909
|
throw fehler('Auszahlung: tenderedCents ist nicht moeglich.');
|
|
889
910
|
if (e['tipCents'] !== undefined)
|
|
890
911
|
throw fehler('Auszahlung: tipCents ist nicht moeglich.');
|
|
912
|
+
// Leergut-Auszahlung: Ware zahlt nie aus, hoechstens die Leergutsumme (der Server prueft ebenso).
|
|
913
|
+
const b = e['amountCents'];
|
|
914
|
+
if (leergutSummeCents !== undefined && typeof b === 'number' && -b > leergutSummeCents) {
|
|
915
|
+
throw fehler('Auszahlung: der Betrag ist hoeher als die Leergutsumme des Belegs.');
|
|
916
|
+
}
|
|
891
917
|
}
|
|
892
918
|
}
|
|
893
919
|
return roh.map((eintrag, i) => {
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
|
|
2
|
-
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
2
|
+
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
3
3
|
export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
|
|
6
|
-
export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, } from './pos/index.js';
|
|
6
|
+
export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, } from './pos/index.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = void 0;
|
|
3
|
+
exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isDepositReturnItem = exports.isDepositItem = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
|
|
4
|
+
exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = void 0;
|
|
5
|
+
exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = void 0;
|
|
6
|
+
exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = void 0;
|
|
7
|
+
exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = void 0;
|
|
8
8
|
var index_js_1 = require("./enums/index.js");
|
|
9
9
|
Object.defineProperty(exports, "ReceiptType", { enumerable: true, get: function () { return index_js_1.ReceiptType; } });
|
|
10
10
|
Object.defineProperty(exports, "VatRate", { enumerable: true, get: function () { return index_js_1.VatRate; } });
|
|
@@ -22,6 +22,8 @@ Object.defineProperty(exports, "negateReceiptItem", { enumerable: true, get: fun
|
|
|
22
22
|
Object.defineProperty(exports, "isTipItem", { enumerable: true, get: function () { return index_js_2.isTipItem; } });
|
|
23
23
|
Object.defineProperty(exports, "isVoucherItem", { enumerable: true, get: function () { return index_js_2.isVoucherItem; } });
|
|
24
24
|
Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: function () { return index_js_2.isVoucherFloatItem; } });
|
|
25
|
+
Object.defineProperty(exports, "isDepositItem", { enumerable: true, get: function () { return index_js_2.isDepositItem; } });
|
|
26
|
+
Object.defineProperty(exports, "isDepositReturnItem", { enumerable: true, get: function () { return index_js_2.isDepositReturnItem; } });
|
|
25
27
|
Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return index_js_2.toVoucherPayload; } });
|
|
26
28
|
Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return index_js_2.fromVoucherPayload; } });
|
|
27
29
|
Object.defineProperty(exports, "voucherIsValid", { enumerable: true, get: function () { return index_js_2.voucherIsValid; } });
|
|
@@ -223,3 +225,4 @@ Object.defineProperty(exports, "cancelScopeOf", { enumerable: true, get: functio
|
|
|
223
225
|
Object.defineProperty(exports, "receiptsScopeOf", { enumerable: true, get: function () { return index_js_4.receiptsScopeOf; } });
|
|
224
226
|
Object.defineProperty(exports, "stockViewOf", { enumerable: true, get: function () { return index_js_4.stockViewOf; } });
|
|
225
227
|
Object.defineProperty(exports, "voucherPermsOf", { enumerable: true, get: function () { return index_js_4.voucherPermsOf; } });
|
|
228
|
+
Object.defineProperty(exports, "depositReturnOf", { enumerable: true, get: function () { return index_js_4.depositReturnOf; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isDiscountItem, isVoucherItem, isVoucherFloatItem, } from './receipt-item.js';
|
|
1
|
+
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isDiscountItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, } from './receipt-item.js';
|
|
2
2
|
export { type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, isNewFormVoucher, voucherServerFields, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, } from './voucher.js';
|
|
3
3
|
export { type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, readRegistrationInfo, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, } from './receipt.js';
|
|
4
4
|
export { type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, } from './cancellation.js';
|
package/dist/cjs/models/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.readRegistrationInfo = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherServerFields = exports.isNewFormVoucher = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isDepositReturnItem = exports.isDepositItem = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isDiscountItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = void 0;
|
|
4
|
+
exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isManualReceiptErrorCode = exports.MANUAL_RECEIPT_ERROR_CODES = exports.readManualReceipt = exports.MANUAL_RECEIPT_REASONS = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.asksRefundTip = void 0;
|
|
5
|
+
exports.hobexReceiptNeedsSignature = void 0;
|
|
5
6
|
var receipt_item_js_1 = require("./receipt-item.js");
|
|
6
7
|
Object.defineProperty(exports, "toReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.toReceiptItemPayload; } });
|
|
7
8
|
Object.defineProperty(exports, "fromReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.fromReceiptItemPayload; } });
|
|
@@ -12,6 +13,8 @@ Object.defineProperty(exports, "isTipItem", { enumerable: true, get: function ()
|
|
|
12
13
|
Object.defineProperty(exports, "isDiscountItem", { enumerable: true, get: function () { return receipt_item_js_1.isDiscountItem; } });
|
|
13
14
|
Object.defineProperty(exports, "isVoucherItem", { enumerable: true, get: function () { return receipt_item_js_1.isVoucherItem; } });
|
|
14
15
|
Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: function () { return receipt_item_js_1.isVoucherFloatItem; } });
|
|
16
|
+
Object.defineProperty(exports, "isDepositItem", { enumerable: true, get: function () { return receipt_item_js_1.isDepositItem; } });
|
|
17
|
+
Object.defineProperty(exports, "isDepositReturnItem", { enumerable: true, get: function () { return receipt_item_js_1.isDepositReturnItem; } });
|
|
15
18
|
var voucher_js_1 = require("./voucher.js");
|
|
16
19
|
Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return voucher_js_1.toVoucherPayload; } });
|
|
17
20
|
Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return voucher_js_1.fromVoucherPayload; } });
|
|
@@ -18,7 +18,7 @@ import { KasseneckApiError } from '../client/errors.js';
|
|
|
18
18
|
* ...) stehen in [PAYMENT_ERROR_CODES]. Ein Code ausserhalb bleibt ueber
|
|
19
19
|
* `KasseneckApiError.code` lesbar.
|
|
20
20
|
*/
|
|
21
|
-
export declare const RECEIPT_ERROR_CODES: readonly ["cancellation_reference_unavailable", "cashregister_closed", "cashregister_decommissioned", "final_receipt_expired", "final_receipt_not_allowed", "idempotency_conflict", "invalid_add_on_reference", "module_inactive", "not_permitted", "receipt_limit_exceeded", "receipt_not_found", "receipt_outcome_unknown", "receipt_type_invalid", "server_error", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "voucher_balance_changed", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing", "response_unreadable"];
|
|
21
|
+
export declare const RECEIPT_ERROR_CODES: readonly ["cancellation_reference_unavailable", "cashregister_closed", "cashregister_decommissioned", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_not_found", "deposit_type_not_issued", "final_receipt_expired", "final_receipt_not_allowed", "idempotency_conflict", "invalid_add_on_reference", "invalid_deposit", "invalid_deposit_quantity", "invalid_item_kind", "module_inactive", "not_permitted", "receipt_limit_exceeded", "receipt_not_found", "receipt_outcome_unknown", "receipt_type_invalid", "server_error", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "voucher_balance_changed", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing", "response_unreadable"];
|
|
22
22
|
export type ReceiptErrorCode = (typeof RECEIPT_ERROR_CODES)[number];
|
|
23
23
|
export declare function isReceiptErrorCode(value: unknown): value is ReceiptErrorCode;
|
|
24
24
|
/** Der Code eines geworfenen Fehlers, wenn er in [RECEIPT_ERROR_CODES] steht; sonst `undefined`. */
|
|
@@ -29,6 +29,12 @@ exports.RECEIPT_ERROR_CODES = Object.freeze([
|
|
|
29
29
|
'cancellation_reference_unavailable',
|
|
30
30
|
'cashregister_closed',
|
|
31
31
|
'cashregister_decommissioned',
|
|
32
|
+
// Seit Pfand & Leergut Teil 2: Pfandzeilen an createReceipt (Antworten des Servers, errorCodes.registerHandlersByEndpoint).
|
|
33
|
+
'deposit_not_enabled',
|
|
34
|
+
'deposit_return_not_offered',
|
|
35
|
+
'deposit_set_by_server',
|
|
36
|
+
'deposit_type_not_found',
|
|
37
|
+
'deposit_type_not_issued',
|
|
32
38
|
'final_receipt_expired',
|
|
33
39
|
'final_receipt_not_allowed',
|
|
34
40
|
// Seit 1.15.0 (Vertrag): derselbe idempotencyKey mit anderem Inhalt, nichts geschrieben. Seit 1.22.0 sendet
|
|
@@ -36,6 +42,9 @@ exports.RECEIPT_ERROR_CODES = Object.freeze([
|
|
|
36
42
|
'idempotency_conflict',
|
|
37
43
|
// Seit 1.27.0 (Zusatz-Kacheln): addOnOf zeigt nicht nach vorne auf eine Warenposition, die selbst kein Zusatz ist.
|
|
38
44
|
'invalid_add_on_reference',
|
|
45
|
+
'invalid_deposit',
|
|
46
|
+
'invalid_deposit_quantity',
|
|
47
|
+
'invalid_item_kind',
|
|
39
48
|
'module_inactive',
|
|
40
49
|
'not_permitted',
|
|
41
50
|
'receipt_limit_exceeded',
|
|
@@ -36,7 +36,7 @@ export interface ReceiptItem {
|
|
|
36
36
|
* negative Entgeltminderungen je Steuersatz; die Kennzeichnung steuert nur
|
|
37
37
|
* die Bon-Darstellung (Summenzeile mit Aufteilung), nie die Beträge.
|
|
38
38
|
*/
|
|
39
|
-
kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float';
|
|
39
|
+
kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return';
|
|
40
40
|
/** Empfaenger der Trinkgeld-Position; `null` = nicht zugeordnet. */
|
|
41
41
|
recipient?: TipRecipient | null;
|
|
42
42
|
/** Zahlart der Trinkgeld-Position (kann von der des Belegs abweichen). */
|
|
@@ -67,7 +67,31 @@ export interface ReceiptItem {
|
|
|
67
67
|
* Warenposition, die selbst kein Zusatz ist (`invalid_add_on_reference`).
|
|
68
68
|
*/
|
|
69
69
|
addOnOf?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Pfand & Leergut: Pfandart (Kennung aus `getKasseSettings` `deposit.depositTypes[].id`); nur an
|
|
72
|
+
* `deposit`- und `deposit_return`-Zeilen. Der Server setzt Pfandzeilen aus den Artikeln und rechnet
|
|
73
|
+
* den Betrag selbst; bei einer ausdruecklichen Zeile des Aufrufers (ohne `articleId`) prueft er sie.
|
|
74
|
+
*/
|
|
75
|
+
depositTypeId?: string;
|
|
76
|
+
/** Index der Warenposition im selben Beleg, zu der die Pfandzeile gehoert (nur `deposit`). */
|
|
77
|
+
depositFor?: number;
|
|
78
|
+
/** Art der Pfandart zum Belegzeitpunkt: Einweg oder Mehrweg. */
|
|
79
|
+
depositKind?: 'single_use' | 'reusable';
|
|
80
|
+
/** Pfand je Stueck in Cent bei einer Pfandzeile; der Zeilenpreis ist Menge mal dieser Betrag. */
|
|
81
|
+
perUnit?: number;
|
|
82
|
+
/** Strichcode des Gebindes (GTIN), falls bekannt. */
|
|
83
|
+
gtin?: string;
|
|
84
|
+
/** Strichcode des Artikels (EAN), falls bekannt. */
|
|
85
|
+
ean?: string;
|
|
86
|
+
/** Das Gebinde wurde im Betrieb selbst befuellt (eigene Abfuellung). */
|
|
87
|
+
ownFilling?: boolean;
|
|
88
|
+
/** Gelernte Leergut-Codes der Zeile (Code -> Menge); nur an `deposit_return`. */
|
|
89
|
+
codes?: Record<string, number>;
|
|
70
90
|
}
|
|
91
|
+
/** Pfandzeile (Pfand zum Verkauf)? Die eine Erkennungsstelle — niemand prueft `kind` selbst. */
|
|
92
|
+
export declare function isDepositItem(item: ReceiptItem | ReceiptItemPayloadRead): boolean;
|
|
93
|
+
/** Leergutzeile (Ruecknahme, negativer Betrag)? */
|
|
94
|
+
export declare function isDepositReturnItem(item: ReceiptItem | ReceiptItemPayloadRead): boolean;
|
|
71
95
|
/** Empfaenger einer Trinkgeld-Position (Kassen-Benutzer, Snapshot des Namens). */
|
|
72
96
|
export interface TipRecipient {
|
|
73
97
|
registerUserId: string;
|
|
@@ -97,7 +121,7 @@ export interface ReceiptItemPayload {
|
|
|
97
121
|
unitPriceCents: number;
|
|
98
122
|
vatRate: number;
|
|
99
123
|
/** Trinkgeld-/Rabatt-/Gutschein-Kennzeichnung, siehe [ReceiptItem.kind]. */
|
|
100
|
-
kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float';
|
|
124
|
+
kind?: 'tip' | 'discount' | 'voucher' | 'voucher_float' | 'deposit' | 'deposit_return';
|
|
101
125
|
recipient?: TipRecipient | null;
|
|
102
126
|
paymentMethod?: string;
|
|
103
127
|
receivedImmediately?: boolean;
|
|
@@ -107,6 +131,15 @@ export interface ReceiptItemPayload {
|
|
|
107
131
|
articleId?: string;
|
|
108
132
|
/** Hauptposition eines Zusatzes, siehe [ReceiptItem.addOnOf]. */
|
|
109
133
|
addOnOf?: number;
|
|
134
|
+
/** Pfandzeile, siehe [ReceiptItem.depositTypeId] und die folgenden Felder. */
|
|
135
|
+
depositTypeId?: string;
|
|
136
|
+
depositFor?: number;
|
|
137
|
+
depositKind?: 'single_use' | 'reusable';
|
|
138
|
+
perUnit?: number;
|
|
139
|
+
gtin?: string;
|
|
140
|
+
ean?: string;
|
|
141
|
+
ownFilling?: boolean;
|
|
142
|
+
codes?: Record<string, number>;
|
|
110
143
|
}
|
|
111
144
|
/**
|
|
112
145
|
* Nutzlast-Form, die dieses Paket **liest** — v2 und v1 nebeneinander, alles
|
|
@@ -154,6 +187,15 @@ export interface ReceiptItemPayloadRead {
|
|
|
154
187
|
returnDisposition?: string | null;
|
|
155
188
|
/** Hauptposition eines Zusatzes, siehe [ReceiptItem.addOnOf]. */
|
|
156
189
|
addOnOf?: number | null;
|
|
190
|
+
/** Pfandzeile, siehe [ReceiptItem.depositTypeId] und die folgenden Felder. */
|
|
191
|
+
depositTypeId?: string | null;
|
|
192
|
+
depositFor?: number | null;
|
|
193
|
+
depositKind?: string | null;
|
|
194
|
+
perUnit?: number | null;
|
|
195
|
+
gtin?: string | null;
|
|
196
|
+
ean?: string | null;
|
|
197
|
+
ownFilling?: boolean | null;
|
|
198
|
+
codes?: Record<string, number> | null;
|
|
157
199
|
}
|
|
158
200
|
export declare function toReceiptItemPayload(item: ReceiptItem): ReceiptItemPayload;
|
|
159
201
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDepositItem = isDepositItem;
|
|
4
|
+
exports.isDepositReturnItem = isDepositReturnItem;
|
|
3
5
|
exports.isTipItem = isTipItem;
|
|
4
6
|
exports.isDiscountItem = isDiscountItem;
|
|
5
7
|
exports.isVoucherItem = isVoucherItem;
|
|
@@ -12,6 +14,14 @@ exports.negateReceiptItem = negateReceiptItem;
|
|
|
12
14
|
const index_js_1 = require("../enums/index.js");
|
|
13
15
|
const enum_payload_js_1 = require("./enum-payload.js");
|
|
14
16
|
const cancellation_js_1 = require("./cancellation.js");
|
|
17
|
+
/** Pfandzeile (Pfand zum Verkauf)? Die eine Erkennungsstelle — niemand prueft `kind` selbst. */
|
|
18
|
+
function isDepositItem(item) {
|
|
19
|
+
return item != null && item.kind === 'deposit';
|
|
20
|
+
}
|
|
21
|
+
/** Leergutzeile (Ruecknahme, negativer Betrag)? */
|
|
22
|
+
function isDepositReturnItem(item) {
|
|
23
|
+
return item != null && item.kind === 'deposit_return';
|
|
24
|
+
}
|
|
15
25
|
/** Trinkgeld-Position? Die eine Erkennungsstelle — niemand prueft `kind` selbst. */
|
|
16
26
|
function isTipItem(item) {
|
|
17
27
|
return item != null && item.kind === 'tip';
|
|
@@ -65,6 +75,28 @@ function toReceiptItemPayload(item) {
|
|
|
65
75
|
// (createReceipt weist sie als voucher_invalid ab).
|
|
66
76
|
if (item.kind === 'voucher' || item.kind === 'voucher_float')
|
|
67
77
|
nutzlast.kind = item.kind;
|
|
78
|
+
// Pfand & Leergut: Kennzeichen und Felder reisen mit (Cache schreibt gelesene Belege wieder; ein Wunsch an
|
|
79
|
+
// den Server traegt `deposit` nie mit `articleId`, siehe createReceiptParams).
|
|
80
|
+
if (item.kind === 'deposit' || item.kind === 'deposit_return') {
|
|
81
|
+
nutzlast.kind = item.kind;
|
|
82
|
+
if (typeof item.depositTypeId === 'string' && item.depositTypeId !== '')
|
|
83
|
+
nutzlast.depositTypeId = item.depositTypeId;
|
|
84
|
+
if (istIndex(item.depositFor))
|
|
85
|
+
nutzlast.depositFor = item.depositFor;
|
|
86
|
+
if (item.depositKind === 'single_use' || item.depositKind === 'reusable')
|
|
87
|
+
nutzlast.depositKind = item.depositKind;
|
|
88
|
+
if (typeof item.perUnit === 'number' && Number.isFinite(item.perUnit))
|
|
89
|
+
nutzlast.perUnit = item.perUnit;
|
|
90
|
+
if (typeof item.gtin === 'string' && item.gtin !== '')
|
|
91
|
+
nutzlast.gtin = item.gtin;
|
|
92
|
+
if (typeof item.ean === 'string' && item.ean !== '')
|
|
93
|
+
nutzlast.ean = item.ean;
|
|
94
|
+
if (typeof item.ownFilling === 'boolean')
|
|
95
|
+
nutzlast.ownFilling = item.ownFilling;
|
|
96
|
+
const codes = leergutCodes(item.codes);
|
|
97
|
+
if (codes != null)
|
|
98
|
+
nutzlast.codes = codes;
|
|
99
|
+
}
|
|
68
100
|
// Artikel-Verweis reist mit (Erloesgruppen im Bericht); leere Werte nicht.
|
|
69
101
|
if (item.articleId != null && item.articleId !== '')
|
|
70
102
|
nutzlast.articleId = item.articleId;
|
|
@@ -114,7 +146,19 @@ function fromReceiptItemPayload(payload) {
|
|
|
114
146
|
? { kind: 'discount' }
|
|
115
147
|
: payload.kind === 'voucher' || payload.kind === 'voucher_float'
|
|
116
148
|
? { kind: payload.kind }
|
|
117
|
-
:
|
|
149
|
+
: payload.kind === 'deposit' || payload.kind === 'deposit_return'
|
|
150
|
+
? {
|
|
151
|
+
kind: payload.kind,
|
|
152
|
+
...(typeof payload.depositTypeId === 'string' && payload.depositTypeId !== '' ? { depositTypeId: payload.depositTypeId } : {}),
|
|
153
|
+
...(istIndex(payload.depositFor) ? { depositFor: payload.depositFor } : {}),
|
|
154
|
+
...(payload.depositKind === 'single_use' || payload.depositKind === 'reusable' ? { depositKind: payload.depositKind } : {}),
|
|
155
|
+
...(typeof payload.perUnit === 'number' && Number.isFinite(payload.perUnit) ? { perUnit: payload.perUnit } : {}),
|
|
156
|
+
...(typeof payload.gtin === 'string' && payload.gtin !== '' ? { gtin: payload.gtin } : {}),
|
|
157
|
+
...(typeof payload.ean === 'string' && payload.ean !== '' ? { ean: payload.ean } : {}),
|
|
158
|
+
...(typeof payload.ownFilling === 'boolean' ? { ownFilling: payload.ownFilling } : {}),
|
|
159
|
+
...(leergutCodes(payload.codes) != null ? { codes: leergutCodes(payload.codes) } : {}),
|
|
160
|
+
}
|
|
161
|
+
: {}),
|
|
118
162
|
// Artikel-Verweis erhalten (Storno-Spiegelung schreibt ihn wieder mit).
|
|
119
163
|
...(typeof payload.articleId === 'string' && payload.articleId !== '' ? { articleId: payload.articleId } : {}),
|
|
120
164
|
// Lager: Bezug und Rueckgabe-Wahl einer Storno-Zeile (nur gelesen; ein
|
|
@@ -125,6 +169,17 @@ function fromReceiptItemPayload(payload) {
|
|
|
125
169
|
...(istIndex(payload.addOnOf) ? { addOnOf: payload.addOnOf } : {}),
|
|
126
170
|
};
|
|
127
171
|
}
|
|
172
|
+
/** Gelernte Codes (Code -> ganze Menge >= 1); ohne brauchbaren Eintrag `undefined`. */
|
|
173
|
+
function leergutCodes(wert) {
|
|
174
|
+
if (wert === null || typeof wert !== 'object' || Array.isArray(wert))
|
|
175
|
+
return undefined;
|
|
176
|
+
const raus = {};
|
|
177
|
+
for (const [code, menge] of Object.entries(wert)) {
|
|
178
|
+
if (code !== '' && Number.isInteger(menge) && menge >= 1)
|
|
179
|
+
raus[code] = menge;
|
|
180
|
+
}
|
|
181
|
+
return Object.keys(raus).length > 0 ? raus : undefined;
|
|
182
|
+
}
|
|
128
183
|
function istIndex(wert) {
|
|
129
184
|
return Number.isInteger(wert) && wert >= 0;
|
|
130
185
|
}
|
|
@@ -79,6 +79,18 @@ export interface Receipt {
|
|
|
79
79
|
registrationInfo?: RegistrationInfo;
|
|
80
80
|
/** Nur an nacherfassten Belegen: der Handbeleg (siehe [ManualReceipt]). */
|
|
81
81
|
manualReceipt?: ManualReceipt;
|
|
82
|
+
/** Pfand & Leergut: der Kunde trinkt/verzehrt vor Ort (gespeichert `vorOrt`); nur ein Wahrheitswert. */
|
|
83
|
+
onPremises?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Gemeinsame Ruecknahmestelle fuer Leergut (gespeichert `pfandStelle`); der Server stempelt sie nur, wenn die
|
|
86
|
+
* Kasse `returns: 'shared'` hat und der Beleg Pfand traegt. Der Bon druckt daraus die Fusszeile.
|
|
87
|
+
*/
|
|
88
|
+
sharedReturnPoint?: SharedReturnPoint;
|
|
89
|
+
}
|
|
90
|
+
/** Gemeinsame Ruecknahmestelle fuer Leergut (Name und Anschrift, wie der Server sie am Beleg stempelt). */
|
|
91
|
+
export interface SharedReturnPoint {
|
|
92
|
+
name: string;
|
|
93
|
+
address: string;
|
|
82
94
|
}
|
|
83
95
|
/** Registrierdaten von Signaturkarte und Kasse (Zeitstempel oder `null`, wenn unbekannt). */
|
|
84
96
|
export interface RegistrationInfo {
|
|
@@ -131,6 +143,11 @@ export interface ReceiptPayloadRead extends Omit<ReceiptPayload, 'items' | 'vouc
|
|
|
131
143
|
cashregisterRegisteredAt?: string | null;
|
|
132
144
|
} | null;
|
|
133
145
|
manualReceipt?: unknown;
|
|
146
|
+
onPremises?: boolean | null;
|
|
147
|
+
sharedReturnPoint?: {
|
|
148
|
+
name?: string | null;
|
|
149
|
+
address?: string | null;
|
|
150
|
+
} | null;
|
|
134
151
|
}
|
|
135
152
|
/**
|
|
136
153
|
* Schreibt die Nutzlast in der **neuen** Form — sie **normalisiert, statt zu
|