@kreiseck/kasseneck-api 1.36.0 → 1.37.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.
- package/CHANGELOG.md +24 -1
- package/dist/cjs/client/aufrufe.d.ts +2 -2
- package/dist/cjs/client/aufrufe.js +5 -0
- package/dist/cjs/client/receipts.d.ts +1 -1
- package/dist/cjs/payments/hobex-hps/index.d.ts +2 -1
- package/dist/cjs/payments/hobex-hps/index.js +3 -1
- package/dist/cjs/payments/hobex-hps/outcome.d.ts +10 -0
- package/dist/cjs/payments/hobex-hps/payments.d.ts +54 -0
- package/dist/cjs/payments/hobex-hps/payments.js +157 -1
- package/dist/cjs/payments/hobex-hps/support.d.ts +19 -0
- package/dist/cjs/payments/hobex-hps/support.js +22 -0
- package/dist/cjs/payments/hobex-hps/transaction-response.js +1 -1
- package/dist/cjs/payments/index.d.ts +1 -1
- package/dist/cjs/payments/index.js +2 -1
- package/dist/cjs/pos/errors.d.ts +1 -1
- package/dist/cjs/pos/errors.js +1 -0
- package/dist/cjs/pos/index.d.ts +4 -4
- package/dist/cjs/pos/index.js +13 -5
- package/dist/cjs/pos/schicht-lesen.d.ts +3 -1
- package/dist/cjs/pos/schicht-lesen.js +23 -1
- package/dist/cjs/pos/schicht-typen.d.ts +39 -4
- package/dist/cjs/pos/schicht-typen.js +7 -2
- package/dist/cjs/pos/schicht.d.ts +6 -4
- package/dist/cjs/pos/schicht.js +6 -3
- package/dist/cjs/pos/settings.d.ts +37 -8
- package/dist/cjs/pos/settings.js +34 -10
- package/dist/cjs/pos/texte.d.ts +249 -2
- package/dist/cjs/pos/texte.js +139 -4
- package/dist/cjs/pos/trinkgeld.d.ts +30 -0
- package/dist/cjs/pos/trinkgeld.js +30 -0
- package/dist/cjs/receipt/shift-sheet.js +6 -1
- package/dist/cjs/register/pairing.d.ts +4 -0
- package/dist/cjs/register/pairing.js +2 -0
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +12 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/aufrufe.d.ts +2 -2
- package/dist/esm/client/aufrufe.js +5 -0
- package/dist/esm/client/receipts.d.ts +1 -1
- package/dist/esm/payments/hobex-hps/index.d.ts +2 -1
- package/dist/esm/payments/hobex-hps/index.js +1 -0
- package/dist/esm/payments/hobex-hps/outcome.d.ts +10 -0
- package/dist/esm/payments/hobex-hps/payments.d.ts +54 -0
- package/dist/esm/payments/hobex-hps/payments.js +158 -2
- package/dist/esm/payments/hobex-hps/support.d.ts +19 -0
- package/dist/esm/payments/hobex-hps/support.js +19 -0
- package/dist/esm/payments/hobex-hps/transaction-response.js +1 -1
- package/dist/esm/payments/index.d.ts +1 -1
- package/dist/esm/payments/index.js +1 -1
- package/dist/esm/pos/errors.d.ts +1 -1
- package/dist/esm/pos/errors.js +1 -0
- package/dist/esm/pos/index.d.ts +4 -4
- package/dist/esm/pos/index.js +5 -5
- package/dist/esm/pos/schicht-lesen.d.ts +3 -1
- package/dist/esm/pos/schicht-lesen.js +22 -1
- package/dist/esm/pos/schicht-typen.d.ts +39 -4
- package/dist/esm/pos/schicht-typen.js +6 -1
- package/dist/esm/pos/schicht.d.ts +6 -4
- package/dist/esm/pos/schicht.js +6 -3
- package/dist/esm/pos/settings.d.ts +37 -8
- package/dist/esm/pos/settings.js +30 -9
- package/dist/esm/pos/texte.d.ts +249 -2
- package/dist/esm/pos/texte.js +138 -3
- package/dist/esm/pos/trinkgeld.d.ts +30 -0
- package/dist/esm/pos/trinkgeld.js +28 -0
- package/dist/esm/receipt/shift-sheet.js +6 -1
- package/dist/esm/register/pairing.d.ts +4 -0
- package/dist/esm/register/pairing.js +2 -0
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +12 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/duplicate-cases.json +1 -1
- package/fixtures/expected/duplicate.shift-close.hex +1 -1
- package/fixtures/expected/shift-close-card-tips.grid32.txt +44 -0
- package/fixtures/expected/shift-close-card-tips.grid48.txt +40 -0
- package/fixtures/expected/shift-close-card-tips.lines.json +479 -0
- package/fixtures/expected/shift-close-put-in.grid32.txt +1 -1
- package/fixtures/expected/shift-close-put-in.grid48.txt +1 -1
- package/fixtures/expected/shift-close-put-in.lines.json +1 -1
- package/fixtures/expected/shift-close-take-out.grid32.txt +1 -1
- package/fixtures/expected/shift-close-take-out.grid48.txt +1 -1
- package/fixtures/expected/shift-close-take-out.lines.json +1 -1
- package/fixtures/expected/shift-close.grid32.txt +1 -1
- package/fixtures/expected/shift-close.grid48.txt +1 -1
- package/fixtures/expected/shift-close.lines.json +1 -1
- package/fixtures/expected/shift-interim-card-tips.grid32.txt +34 -0
- package/fixtures/expected/shift-interim-card-tips.grid48.txt +31 -0
- package/fixtures/expected/shift-interim-card-tips.lines.json +344 -0
- package/fixtures/hobex-hps-codes.json +2 -2
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/pos-texts.json +300 -3
- package/fixtures/renames-1.0.json +10 -0
- package/fixtures/shift-ablauf-cases.json +4 -4
- package/fixtures/shift-cases.json +4 -2
- package/fixtures/shift-receipts-card-tips.json +73 -0
- package/fixtures/shift-receipts.json +9 -9
- package/fixtures/stored/card-tip-cases.json +132 -0
- package/fixtures/surface.json +21 -5
- package/fixtures/v3/antworten/belege.json +1 -1
- package/fixtures/v3/antworten/belegmail.json +1 -1
- package/fixtures/v3/antworten/berichte.json +1 -1
- package/fixtures/v3/antworten/kasse-belege.json +1 -1
- package/fixtures/v3/antworten/kasse.json +240 -3
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +1 -1
- package/fixtures/v3/antworten/storno.json +1 -1
- package/fixtures/v3/stored/belege.json +1 -1
- package/fixtures/v3/stored/kasse.json +2 -2
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +103 -14
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
|
@@ -143,6 +143,11 @@ function shiftReceiptLayout(receipt, options = {}) {
|
|
|
143
143
|
zeilen.push(text((0, texte_js_1.labelText)('shift_receipt.opening_not_counted')));
|
|
144
144
|
if (bon.cashSalesCents !== null)
|
|
145
145
|
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.cash_sales'), bon.cashSalesCents));
|
|
146
|
+
// Kartentrinkgeld bar aus der Lade genommen (Spec keck 2026-11-11-kartentrinkgeld, § 4.3): verlaesst die Lade ohne
|
|
147
|
+
// Bewegung; ohne diese Zeile ginge Start + Bar + Bewegungen nicht im Soll auf. Steht wie die Bewegungen auch blind.
|
|
148
|
+
// Fehlt ohne Karten-direkt (Feld fehlt oder 0) -- der Bon bleibt dann Byte fuer Byte wie bisher.
|
|
149
|
+
if (bon.cardTipsTakenCents !== undefined && bon.cardTipsTakenCents !== 0)
|
|
150
|
+
zeilen.push(betrag((0, texte_js_1.labelText)('shift.part_card_tips_taken'), -bon.cardTipsTakenCents));
|
|
146
151
|
if (bon.cashCancellationsCents !== null)
|
|
147
152
|
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.cash_cancellations'), bon.cashCancellationsCents));
|
|
148
153
|
// Summe der Zwischenzaehlungs-Differenzen: damit Start + Bar + Bewegungen + diese = Soll aufgeht.
|
|
@@ -202,7 +207,7 @@ function shiftReceiptLayout(receipt, options = {}) {
|
|
|
202
207
|
zeilen.push(anzahl((0, texte_js_1.labelText)('shift_receipt.receipts'), bon.receiptCount));
|
|
203
208
|
zeilen.push(anzahl((0, texte_js_1.labelText)('shift_receipt.cancellations'), bon.cancellationCount));
|
|
204
209
|
zeilen.push(anzahl((0, texte_js_1.labelText)('shift_receipt.openings_without_sale'), bon.openingsWithoutSale));
|
|
205
|
-
// Trinkgeld je Mitarbeiter (shiftTipLines): verdient immer, ueber Lohn,
|
|
210
|
+
// Trinkgeld je Mitarbeiter (shiftTipLines): verdient immer, ueber Lohn, genommen und offen
|
|
206
211
|
// nur ungleich 0; wer ueberall 0 hat, entfaellt, ohne Mitarbeiter auch die Ueberschrift.
|
|
207
212
|
const trinkgeld = bon.tips.map((t) => ({ t, z: (0, schicht_js_1.shiftTipLines)(t) })).filter(({ z }) => z.length > 0);
|
|
208
213
|
if (trinkgeld.length > 0) {
|
|
@@ -144,12 +144,16 @@ export interface RegisterDeviceUsers {
|
|
|
144
144
|
* statt an createReceipt zu scheitern. Fehlt das Feld, gilt bereit.
|
|
145
145
|
* `stockLocationId`: Lager-Standort der Kasse, fehlt = Standard-Standort.
|
|
146
146
|
* `deposit`: Pfand & Leergut der Kasse (Ruecknahme, Vorgaben); fehlt, solange der Betrieb kein Pfand eingeschaltet hat.
|
|
147
|
+
* `cardTips`: Kartentrinkgeld laeuft an diesem Konto ueber die Kasse (Spec 2026-11-11-kartentrinkgeld, § 7): die
|
|
148
|
+
* Kasse zeigt die Karten-Stufe, die Trinkgeld-Zeile nach dem Kassieren und „Mein Trinkgeld“. Nur `true`, sonst fehlt
|
|
149
|
+
* es -- ohne bleibt die Kasse genau wie bisher.
|
|
147
150
|
*/
|
|
148
151
|
cashregister?: {
|
|
149
152
|
ready: boolean;
|
|
150
153
|
reason?: string | null;
|
|
151
154
|
stockLocationId?: string;
|
|
152
155
|
deposit?: CashRegisterDeposit;
|
|
156
|
+
cardTips?: true;
|
|
153
157
|
};
|
|
154
158
|
/** Das Geraet haengt an der Test-Umgebung des Betriebs. */
|
|
155
159
|
testEnvironment: boolean;
|
|
@@ -257,6 +257,8 @@ function kasseBereit(wert) {
|
|
|
257
257
|
reason: typeof roh['reason'] === 'string' ? roh['reason'] : null,
|
|
258
258
|
...(typeof standort === 'string' && standort !== '' ? { stockLocationId: standort } : {}),
|
|
259
259
|
...((0, pfand_js_1.cashRegisterDepositFromWire)(roh['deposit']) ? { deposit: (0, pfand_js_1.cashRegisterDepositFromWire)(roh['deposit']) } : {}),
|
|
260
|
+
// Nur ein echtes `true` schaltet die Oberflaeche um; alles andere (fehlt, false, Muell) laesst sie wie bisher.
|
|
261
|
+
...(roh['cardTips'] === true ? { cardTips: true } : {}),
|
|
260
262
|
};
|
|
261
263
|
}
|
|
262
264
|
/** Die Regel aus der Antwort — oder `null`, wenn keine brauchbare kommt. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
2
|
-
export declare const VOKABULAR_QUELLE = "
|
|
2
|
+
export declare const VOKABULAR_QUELLE = "78eb90dbffbd44f2b16d78963d35c6e977245f5f53bb171a19b73b15d5cb0a3c";
|
|
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.ZUSATZ_KATALOGE = 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 = "
|
|
7
|
+
exports.VOKABULAR_QUELLE = "78eb90dbffbd44f2b16d78963d35c6e977245f5f53bb171a19b73b15d5cb0a3c";
|
|
8
8
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
9
9
|
exports.SCHEMAS = {
|
|
10
10
|
"getReceipt": {
|
|
@@ -173,6 +173,9 @@ exports.SCHEMAS = {
|
|
|
173
173
|
"tipKeptMode": "tgDirektModus",
|
|
174
174
|
"tipKinds": "tgArten",
|
|
175
175
|
"tipStart": "tgStart",
|
|
176
|
+
"tipCardKeptByDefault": "tgKarteDirekt",
|
|
177
|
+
"tipCardKeptMode": "tgKarteModus",
|
|
178
|
+
"tipSelfPayout": "tgSelbstAuszahlen",
|
|
176
179
|
"checkoutMode": "kassierenModus",
|
|
177
180
|
"receiptOutput": "belegAusgabe",
|
|
178
181
|
"doneScreenSeconds": "fertigSekunden",
|
|
@@ -389,6 +392,9 @@ exports.SCHEMAS = {
|
|
|
389
392
|
"business.tipKeptMode": {
|
|
390
393
|
"$catalog": "KASSE_BETRIEB_WERTE.tipKeptMode"
|
|
391
394
|
},
|
|
395
|
+
"business.tipCardKeptMode": {
|
|
396
|
+
"$catalog": "KASSE_BETRIEB_WERTE.tipCardKeptMode"
|
|
397
|
+
},
|
|
392
398
|
"business.discountPresets[].kind": {
|
|
393
399
|
"$catalog": "KASSE_BETRIEB_WERTE.discountPresets[].kind"
|
|
394
400
|
},
|
|
@@ -757,6 +763,11 @@ exports.KATALOGE = {
|
|
|
757
763
|
"streifen": "stripe",
|
|
758
764
|
"voll": "full"
|
|
759
765
|
},
|
|
766
|
+
"KASSE_BETRIEB_WERTE.tipCardKeptMode": {
|
|
767
|
+
"fragen": "ask",
|
|
768
|
+
"immer": "always",
|
|
769
|
+
"nie": "never"
|
|
770
|
+
},
|
|
760
771
|
"KASSE_BETRIEB_WERTE.tipKeptMode": {
|
|
761
772
|
"fragen": "ask",
|
|
762
773
|
"immer": "always",
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* umhuellt, muss ihn weiterhin absetzen koennen.
|
|
14
14
|
*/
|
|
15
15
|
import type { FileOrData, FileOrDataCallOptions, PdfOrData, TransportBodyFields, TransportCallOptions } from './transport.js';
|
|
16
|
-
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
16
|
+
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
17
17
|
export type ApiCall = typeof ALL_CALLS[number];
|
|
18
18
|
/**
|
|
19
19
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -29,7 +29,7 @@ export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "can
|
|
|
29
29
|
* die fuenf DEP-Aufrufe); die Kasse ruft sie trotzdem ueber diesen Weg (ein Dialekt
|
|
30
30
|
* je Client, Nachtrag §5.2).
|
|
31
31
|
*/
|
|
32
|
-
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes"];
|
|
32
|
+
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance"];
|
|
33
33
|
export type PublicCall = typeof PUBLIC_CALLS[number];
|
|
34
34
|
export type PosCall = typeof POS_CALLS[number];
|
|
35
35
|
/**
|
|
@@ -154,6 +154,8 @@ export const ALL_CALLS = [
|
|
|
154
154
|
// Leergut-Codes (Pfand, ./pos): Codes lernen und lesen; nur ueber den Kassenweg.
|
|
155
155
|
'learnMyLeergutCode',
|
|
156
156
|
'listMyLeergutCodes',
|
|
157
|
+
// „Mein Trinkgeld“ (./pos): Stand der angemeldeten Person; nur ueber den Kassenweg.
|
|
158
|
+
'getMyTipBalance',
|
|
157
159
|
// Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
|
|
158
160
|
'registerTerminalDevice',
|
|
159
161
|
'getTerminalAccess',
|
|
@@ -384,6 +386,8 @@ export const POS_CALLS = [
|
|
|
384
386
|
// Leergut-Codes lernen und lesen: Kassen-Benutzer mit dem Recht depositReturn.
|
|
385
387
|
'learnMyLeergutCode',
|
|
386
388
|
'listMyLeergutCodes',
|
|
389
|
+
// „Mein Trinkgeld“: nur ueber den Kassenweg, nur persoenliche Anmeldung.
|
|
390
|
+
'getMyTipBalance',
|
|
387
391
|
];
|
|
388
392
|
/**
|
|
389
393
|
* Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
|
|
@@ -543,6 +547,7 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
543
547
|
getInvoiceXml: 'read',
|
|
544
548
|
getKasseSettings: 'read',
|
|
545
549
|
getMyDrawerState: 'read',
|
|
550
|
+
getMyTipBalance: 'read',
|
|
546
551
|
getMyShiftReport: 'read',
|
|
547
552
|
getPartnerBilling: 'read',
|
|
548
553
|
getPartnerBillingMonth: 'read',
|
|
@@ -126,7 +126,7 @@ export interface TipOptions {
|
|
|
126
126
|
* Bar-Trinkgeld „gleich behalten“: die Mitarbeiterin steckt das Trinkgeld
|
|
127
127
|
* beim Verkauf gleich ein. Der Beleg bleibt, wie er ist (signiert, im DEP);
|
|
128
128
|
* nur im Kassenstand zaehlt der Betrag nicht ins Bar-Soll und gilt sofort als
|
|
129
|
-
* „
|
|
129
|
+
* „genommen“. Nur `true` geht hinaus. Der Server nimmt es nur bei
|
|
130
130
|
* Mitarbeiter-Trinkgeld, bar und sofort erhalten; sonst faellt es still weg.
|
|
131
131
|
* Vorbelegung des Schalters: [posTipKeptByDefault] der Kassen-Einstellungen.
|
|
132
132
|
*/
|
|
@@ -21,7 +21,8 @@ export { type HpsConnectCancelOptions, type HpsConnectClient, type HpsConnectCli
|
|
|
21
21
|
export { HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, } from './errors.js';
|
|
22
22
|
export { type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, } from './events.js';
|
|
23
23
|
export { type CardPaymentOutcome, type HpsPaymentResult, isHostUncertainResult, mayRetrySafely, } from './outcome.js';
|
|
24
|
-
export { type HpsCancelOptions, type HpsPaymentOptions, type HpsPayments, type HpsPaymentsOptions, type HpsRefundOptions, createHpsPayments, } from './payments.js';
|
|
24
|
+
export { type HpsCancelOptions, type HpsClarifyOptions, type HpsPaymentOptions, type HpsPayments, type HpsPaymentsOptions, type HpsRefundOptions, createHpsPayments, } from './payments.js';
|
|
25
25
|
export { MAX_TRANSACTION_ID_LENGTH, createHpsTransactionIdGenerator, isValidHpsTransactionId, newHpsTransactionId, type HpsTransactionIdGeneratorOptions, } from './transaction-id.js';
|
|
26
26
|
export { ABORTED_CODE, APP_SELECT_FAILED_CODE, APPROVED_CODE, BAD_REQUEST_CODE, CARD_DECLINED_CODE, CARD_INFO_NOT_ENTERED_CODE, CARD_NOT_PRESENT_CODE, CARD_NOT_SUPPORTED_CODE, CARD_READ_FAILED_CODE, CHIP_DATA_MISMATCH_CODE, COMPLETION_FAILED_CODE, DIAGNOSIS_FAILED_CODE, HOST_COMMUNICATION_FAILED_CODE, HOST_STEP_FAILED_CODE, HOST_TIMEOUT_REVERSED_CODE, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, INTERNAL_ERROR_CODE, INVALID_MESSAGE_TYPE_CODE, INVALID_TID_DOCUMENTED_CODE, INVALID_TX_TYPE_CODE, MAX_RETRIES_EXCEEDED_CODE, NOT_FOUND_CODE, PASSWORD_NOT_ENTERED_CODE, REFUND_DISABLED_CODE, REFUND_PASSWORD_INVALID_CODE, SCEP_ENROLLMENT_FAILED_CODE, TERMINAL_BLOCKED_CODE, TERMINAL_BUSY_CODE, TIP_SELECTION_FAILED_CODE, UNSUPPORTED_USER_DATA_CODE, hpsCodeInfo, hpsCodeReason, isHostUncertain, isHostUncertainReason, INVALID_TRANSACTION_CODE, NOT_ABORTABLE_CODE, INVALID_AMOUNT_CODE, AMOUNT_OUT_OF_RANGE_CODE, INVALID_TID_CODE, WRONG_PIN_CODE, NO_STATEMENT_CODE, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, isApproved, isCanceled, isConclusive, isConclusiveAsStatus, isInProgress, isNoStatement, isNotAbortable, needsReversal, normalizeHpsCode, isTechnicalError, isUnknownCode, parseHpsTransactionResponse, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsTransactionResponse, } from './transaction-response.js';
|
|
27
27
|
export { hobexReceiptFromHps } from './receipt.js';
|
|
28
|
+
export { HOBEX_SUPPORT } from './support.js';
|
|
@@ -24,3 +24,4 @@ export { createHpsPayments, } from './payments.js';
|
|
|
24
24
|
export { MAX_TRANSACTION_ID_LENGTH, createHpsTransactionIdGenerator, isValidHpsTransactionId, newHpsTransactionId, } from './transaction-id.js';
|
|
25
25
|
export { ABORTED_CODE, APP_SELECT_FAILED_CODE, APPROVED_CODE, BAD_REQUEST_CODE, CARD_DECLINED_CODE, CARD_INFO_NOT_ENTERED_CODE, CARD_NOT_PRESENT_CODE, CARD_NOT_SUPPORTED_CODE, CARD_READ_FAILED_CODE, CHIP_DATA_MISMATCH_CODE, COMPLETION_FAILED_CODE, DIAGNOSIS_FAILED_CODE, HOST_COMMUNICATION_FAILED_CODE, HOST_STEP_FAILED_CODE, HOST_TIMEOUT_REVERSED_CODE, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, INTERNAL_ERROR_CODE, INVALID_MESSAGE_TYPE_CODE, INVALID_TID_DOCUMENTED_CODE, INVALID_TX_TYPE_CODE, MAX_RETRIES_EXCEEDED_CODE, NOT_FOUND_CODE, PASSWORD_NOT_ENTERED_CODE, REFUND_DISABLED_CODE, REFUND_PASSWORD_INVALID_CODE, SCEP_ENROLLMENT_FAILED_CODE, TERMINAL_BLOCKED_CODE, TERMINAL_BUSY_CODE, TIP_SELECTION_FAILED_CODE, UNSUPPORTED_USER_DATA_CODE, hpsCodeInfo, hpsCodeReason, isHostUncertain, isHostUncertainReason, INVALID_TRANSACTION_CODE, NOT_ABORTABLE_CODE, INVALID_AMOUNT_CODE, AMOUNT_OUT_OF_RANGE_CODE, INVALID_TID_CODE, WRONG_PIN_CODE, NO_STATEMENT_CODE, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, isApproved, isCanceled, isConclusive, isConclusiveAsStatus, isInProgress, isNoStatement, isNotAbortable, needsReversal, normalizeHpsCode, isTechnicalError, isUnknownCode, parseHpsTransactionResponse, } from './transaction-response.js';
|
|
26
26
|
export { hobexReceiptFromHps } from './receipt.js';
|
|
27
|
+
export { HOBEX_SUPPORT } from './support.js';
|
|
@@ -48,6 +48,16 @@ export interface HpsPaymentResult {
|
|
|
48
48
|
* Terminal etwas sagte) und bei einer Aufhebung, die nicht gegriffen hat.
|
|
49
49
|
*/
|
|
50
50
|
readonly reason?: HpsCodeReason;
|
|
51
|
+
/**
|
|
52
|
+
* Gesetzt, wenn dieses Ergebnis aus einer SPAETEN Nachfrage stammt
|
|
53
|
+
* (`HpsPayments.clarifyPayment`). Ein solches Ergebnis taugt nicht als
|
|
54
|
+
* `previous` einer weiteren Nachfrage: die Vorgeschichte einer Zahlung ist
|
|
55
|
+
* das Ergebnis von `pay`, und das bleibt sie -- ein `reason` aus der
|
|
56
|
+
* Nachfrage selbst (etwa `noStatement`) sagt nichts darueber, ob die
|
|
57
|
+
* Klaerung von `pay` ein Storno nachgeschickt hat. Die Nachfrage weist ein
|
|
58
|
+
* so markiertes `previous` deshalb zurueck: keine Antwort entscheidet.
|
|
59
|
+
*/
|
|
60
|
+
readonly clarified?: true;
|
|
51
61
|
/**
|
|
52
62
|
* Verlauf der Klaerung, in Reihenfolge — der Nachweis, der im
|
|
53
63
|
* Belastungsstreit gelesen wird. Behauptet nie eine Ursache, die nicht
|
|
@@ -219,11 +219,65 @@ export interface HpsCancelOptions {
|
|
|
219
219
|
currency?: string;
|
|
220
220
|
language?: string;
|
|
221
221
|
}
|
|
222
|
+
export interface HpsClarifyOptions {
|
|
223
|
+
/** Kennung der Zahlung aus [HpsPayments.pay] -- keine Gutschrift, keine Aufhebung. */
|
|
224
|
+
transactionId: string;
|
|
225
|
+
/**
|
|
226
|
+
* Was ueber die bisherige Klaerung dieser Zahlung feststeht. Davon haengt
|
|
227
|
+
* ab, was eine Antwort des Terminals jetzt noch beweist, siehe
|
|
228
|
+
* [HpsPayments.clarifyPayment]:
|
|
229
|
+
*
|
|
230
|
+
* - das `unresolved`-Ergebnis von [HpsPayments.pay] (es zaehlen `reason` und
|
|
231
|
+
* `clarified`). NIE das Ergebnis einer Nachfrage: dessen `reason` stammt
|
|
232
|
+
* aus der Nachfrage, nicht aus der Zahlung, und wuerde eine unbekannte
|
|
233
|
+
* Vorgeschichte reinwaschen -- ein mit `clarified` markiertes Ergebnis
|
|
234
|
+
* zaehlt deshalb wie `null`;
|
|
235
|
+
* - `'beforeResolve'`: die Zahlung wurde gestartet, ihre Klaerung hat aber
|
|
236
|
+
* nie begonnen -- etwa weil die Seite waehrend des Kartenflows abriss. Es
|
|
237
|
+
* wurde dann sicher kein Storno nachgeschickt. Nur angeben, wenn das
|
|
238
|
+
* Beobachter-Ereignis `resolving` nachweislich nie kam (es wird vor dem
|
|
239
|
+
* ersten Abbruch- oder Storno-Aufruf gemeldet); im Zweifel `null`;
|
|
240
|
+
* - `null`: nicht bekannt (etwa ein Eintrag aus einer aelteren Fassung, oder
|
|
241
|
+
* die Seite riss waehrend der Klaerung ab).
|
|
242
|
+
*/
|
|
243
|
+
previous: Pick<HpsPaymentResult, 'reason' | 'clarified'> | 'beforeResolve' | null;
|
|
244
|
+
}
|
|
222
245
|
export interface HpsPayments {
|
|
223
246
|
pay(options: HpsPaymentOptions): Promise<HpsPaymentResult>;
|
|
224
247
|
/** Gutschrift, geklaert wie [pay] -- siehe Klassendoku oben. */
|
|
225
248
|
refund(options: HpsRefundOptions): Promise<HpsPaymentResult>;
|
|
226
249
|
/** Aufhebung (Storno/Void) einer bestehenden Zahlung -- eigener Klaerweg, siehe Klassendoku oben. */
|
|
227
250
|
cancel(options: HpsCancelOptions): Promise<HpsPaymentResult>;
|
|
251
|
+
/**
|
|
252
|
+
* Fragt den Ausgang einer Zahlung SPAETER noch einmal ab -- etwa wenn der
|
|
253
|
+
* Kassier eine unklare Karte klaert. Liest nur: kein Abbruch, kein Storno,
|
|
254
|
+
* kein neuer Vorgang. Das Ergebnis hat dieselbe Form wie das von [pay].
|
|
255
|
+
*
|
|
256
|
+
* Entschieden wird nur, was nach [HpsClarifyOptions.previous] feststeht
|
|
257
|
+
* ([nachfrageRegel]):
|
|
258
|
+
*
|
|
259
|
+
* | bisher | `'0'` | `9011` | andere Ablehnung |
|
|
260
|
+
* |---|---|---|---|
|
|
261
|
+
* | `'beforeResolve'`, oder offen ohne Stoerung beim Host | `approved` | `declined` | `declined` |
|
|
262
|
+
* | Stoerung beim Host, Storno sicher versucht (`hostFault`, `hostTimeout`) | offen | `declined` | offen |
|
|
263
|
+
* | andere Stoerung beim Host | offen | offen | offen |
|
|
264
|
+
* | `null` oder Ergebnis einer Nachfrage (`clarified`) | offen | offen | offen |
|
|
265
|
+
*
|
|
266
|
+
* Nach einer Stoerung beim Host kann die Klaerung von [pay] ein Storno
|
|
267
|
+
* nachgeschickt haben -- auch wenn der erste Code keines verlangte, denn
|
|
268
|
+
* ein spaeterer Status kann es noch ausloesen. Ein `'0'` beweist dann
|
|
269
|
+
* nichts (siehe Klassendoku, "Storno nach ausbleibender Host-Antwort").
|
|
270
|
+
* `9011` (aufgehoben) heisst nur dann sicher "nichts belastet", wenn ein
|
|
271
|
+
* Storno sicher versucht wurde -- wie in der Klaerung von [pay]. `9027`
|
|
272
|
+
* bleibt hier immer ohne Aussage: die Zwei-9027-Regel braucht die Antwort
|
|
273
|
+
* auf die Zahlung selbst. Meldet der Status selbst eine Stoerung beim
|
|
274
|
+
* Host, entscheidet danach nur noch `'0'`.
|
|
275
|
+
*
|
|
276
|
+
* Sagt der Status zweimal in Folge nichts, endet die Nachfrage sofort als
|
|
277
|
+
* `unresolved` -- die Zahlung ist laengst beendet, das Terminal wird es
|
|
278
|
+
* auch spaeter nicht wissen. Budget: ein Sechstel von
|
|
279
|
+
* [HpsPaymentsOptions.resolveBudgetMs] (Vorgabe 15 s).
|
|
280
|
+
*/
|
|
281
|
+
clarifyPayment(options: HpsClarifyOptions): Promise<HpsPaymentResult>;
|
|
228
282
|
}
|
|
229
283
|
export declare function createHpsPayments(client: HpsConnectClient, target: HpsConnectTarget, options?: HpsPaymentsOptions): HpsPayments;
|
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
import { HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsPreflightError, } from './errors.js';
|
|
2
2
|
import { newHpsTransactionId } from './transaction-id.js';
|
|
3
|
-
import { APPROVED_CODE, hpsCodeInfo, hpsCodeReason, isApproved, isCanceled, isConclusive, isConclusiveAsStatus, isHostUncertain, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, needsReversal, NOT_ABORTABLE_CODE, NOT_FOUND_CODE, TECHNICAL_ERROR_CODE, TRANSACTION_CANCELED_CODE, } from './transaction-response.js';
|
|
3
|
+
import { APPROVED_CODE, HPS_CODES, hpsCodeInfo, hpsCodeReason, isApproved, isCanceled, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainReason, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, needsReversal, NOT_ABORTABLE_CODE, NOT_FOUND_CODE, TECHNICAL_ERROR_CODE, TRANSACTION_CANCELED_CODE, } from './transaction-response.js';
|
|
4
4
|
/** Teiler, mit dem das Abbruchbudget aus [HpsPaymentsOptions.resolveBudgetMs] entsteht. */
|
|
5
5
|
const ABORT_BUDGET_DIVISOR = 6;
|
|
6
|
+
/** Teiler fuer das Budget von [HpsPayments.clarifyPayment]: bei der Vorgabe 15 s. */
|
|
7
|
+
const CLARIFY_BUDGET_DIVISOR = 6;
|
|
8
|
+
/**
|
|
9
|
+
* `true`, wenn die Klaerung von [HpsPayments.pay] bei diesem Grund sicher ein
|
|
10
|
+
* Storno versucht hat: der Grund kommt von der ersten Stoerung beim Host
|
|
11
|
+
* ([offenerGrund]), und JEDER Code mit diesem Grund verlangt ein Storno. Aus
|
|
12
|
+
* der Tabelle gerechnet, damit ein neuer Code ohne Storno die Regel nicht
|
|
13
|
+
* still bricht.
|
|
14
|
+
*/
|
|
15
|
+
function stornoSicherVersucht(reason) {
|
|
16
|
+
const codes = HPS_CODES.filter((c) => c.reason === reason);
|
|
17
|
+
return codes.length > 0 && codes.every((c) => c.sendReversal);
|
|
18
|
+
}
|
|
19
|
+
/** Siehe Tabelle an [HpsPayments.clarifyPayment]. */
|
|
20
|
+
function nachfrageRegel(previous) {
|
|
21
|
+
if (previous === null || (previous !== 'beforeResolve' && previous.clarified === true)) {
|
|
22
|
+
return { genehmigt: false, aufgehoben: false, abgelehnt: false };
|
|
23
|
+
}
|
|
24
|
+
if (previous === 'beforeResolve')
|
|
25
|
+
return { genehmigt: true, aufgehoben: true, abgelehnt: true };
|
|
26
|
+
const reason = previous.reason;
|
|
27
|
+
if (reason !== undefined && isHostUncertainReason(reason)) {
|
|
28
|
+
return { genehmigt: false, aufgehoben: stornoSicherVersucht(reason), abgelehnt: false };
|
|
29
|
+
}
|
|
30
|
+
return { genehmigt: true, aufgehoben: true, abgelehnt: true };
|
|
31
|
+
}
|
|
6
32
|
/**
|
|
7
33
|
* Teiler fuer das Budget des nachgeschickten Stornos: ein Drittel, bei der
|
|
8
34
|
* Vorgabe 30 s. Ein Storno geht ueber den Host und darf Sekunden brauchen.
|
|
@@ -50,6 +76,7 @@ export function createHpsPayments(client, target, options = {}) {
|
|
|
50
76
|
const observer = options.observer;
|
|
51
77
|
const abortBudgetMs = Math.trunc(resolveBudgetMs / ABORT_BUDGET_DIVISOR);
|
|
52
78
|
const reversalBudgetMs = Math.trunc(resolveBudgetMs / REVERSAL_BUDGET_DIVISOR);
|
|
79
|
+
const clarifyBudgetMs = Math.trunc(resolveBudgetMs / CLARIFY_BUDGET_DIVISOR);
|
|
53
80
|
function emit(kind, message, transactionId) {
|
|
54
81
|
if (!observer)
|
|
55
82
|
return;
|
|
@@ -851,5 +878,134 @@ export function createHpsPayments(client, target, options = {}) {
|
|
|
851
878
|
}
|
|
852
879
|
return resolveCancel(id, steps, res);
|
|
853
880
|
}
|
|
854
|
-
|
|
881
|
+
/**
|
|
882
|
+
* Spaete Nachfrage zu einer Zahlung, siehe [HpsPayments.clarifyPayment].
|
|
883
|
+
* Liest nur den Status -- nie ein Abbruch, nie ein Storno. Wirft wie [pay]
|
|
884
|
+
* nur [HpsPreflightError]: Connect hat die Abfrage abgewiesen, bevor sie
|
|
885
|
+
* das Terminal erreichte (etwa `terminal_unreachable`).
|
|
886
|
+
*/
|
|
887
|
+
async function clarifyPayment(clarifyOptions) {
|
|
888
|
+
const id = clarifyOptions.transactionId;
|
|
889
|
+
const previous = clarifyOptions.previous;
|
|
890
|
+
const regel = nachfrageRegel(previous);
|
|
891
|
+
// Ein Nachfrage-Ergebnis als Vorgeschichte zaehlt wie "nicht bekannt" --
|
|
892
|
+
// auch sein `reason` (siehe [HpsPaymentResult.clarified]).
|
|
893
|
+
const vorgeschichteBekannt = previous !== null && (previous === 'beforeResolve' || previous.clarified !== true);
|
|
894
|
+
const vorherGrund = vorgeschichteBekannt && typeof previous === 'object' ? previous.reason : undefined;
|
|
895
|
+
const vorherGestoert = vorherGrund !== undefined && isHostUncertainReason(vorherGrund);
|
|
896
|
+
const steps = [nachfrageAnfang(previous, regel)];
|
|
897
|
+
emit('resolving', steps[0], id);
|
|
898
|
+
const start = now();
|
|
899
|
+
const elapsedMs = () => now() - start;
|
|
900
|
+
let wait = 0;
|
|
901
|
+
let transportFailures = 0;
|
|
902
|
+
let ohneAussage = 0;
|
|
903
|
+
// Die erste Stoerung beim Host, die der Status in DIESER Nachfrage meldet.
|
|
904
|
+
let stoerung;
|
|
905
|
+
let letzteAntwort;
|
|
906
|
+
// Ein schluessiger Code, der hier nicht entscheiden durfte (`'0'`, `9011`, eine
|
|
907
|
+
// Ablehnung), erklaert den offenen Ausgang nicht -- sonst stuende etwa „genehmigt“
|
|
908
|
+
// als Grund an einem offenen Ergebnis (Geraetetest 11.11.2026, Vorgeschichte unbekannt).
|
|
909
|
+
const offen = () => {
|
|
910
|
+
const erklaerend = letzteAntwort && !isConclusiveAsStatus(letzteAntwort) ? letzteAntwort : undefined;
|
|
911
|
+
return {
|
|
912
|
+
...open(id, steps, letzteAntwort, vorherGrund ?? offenerGrund(stoerung, erklaerend)),
|
|
913
|
+
clarified: true,
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
/** Warum eine Antwort, die sonst entschiede, hier nichts sagt. */
|
|
917
|
+
const vorbehalt = () => {
|
|
918
|
+
if (!vorgeschichteBekannt)
|
|
919
|
+
return 'der bisherige Klaerweg ist nicht bekannt, ein Storno kann nachgeschickt sein';
|
|
920
|
+
if (vorherGestoert)
|
|
921
|
+
return `nach der Stoerung beim hobex-Host (${vorherGrund}) kann ein Storno nachgeschickt sein`;
|
|
922
|
+
return 'das Terminal meldet eine Stoerung beim hobex-Host';
|
|
923
|
+
};
|
|
924
|
+
while (elapsedMs() < clarifyBudgetMs) {
|
|
925
|
+
if (wait > 0) {
|
|
926
|
+
await sleep(Math.min(wait, clarifyBudgetMs - elapsedMs()));
|
|
927
|
+
if (elapsedMs() >= clarifyBudgetMs)
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
let status;
|
|
931
|
+
try {
|
|
932
|
+
status = await withinBudget(elapsedMs, () => client.status({ ...target, transactionId: id }), clarifyBudgetMs - elapsedMs());
|
|
933
|
+
transportFailures = 0;
|
|
934
|
+
letzteAntwort = status;
|
|
935
|
+
}
|
|
936
|
+
catch (e) {
|
|
937
|
+
if (e instanceof HpsPreflightError)
|
|
938
|
+
throw e;
|
|
939
|
+
transportFailures += 1;
|
|
940
|
+
steps.push(`Statusabfrage gescheitert (${transportFailures}): ${describe(e)}`);
|
|
941
|
+
noteUnexpected(e, id);
|
|
942
|
+
if (transportFailures >= maxTransportFailures) {
|
|
943
|
+
steps.push('Terminal antwortet nicht -- Ausgang bleibt offen');
|
|
944
|
+
return offen();
|
|
945
|
+
}
|
|
946
|
+
wait = nextWait(wait);
|
|
947
|
+
continue;
|
|
948
|
+
}
|
|
949
|
+
if (isHostUncertain(status))
|
|
950
|
+
stoerung ??= status;
|
|
951
|
+
// Wie in [resolve]: nach einer Stoerung beim Host -- vorher oder jetzt
|
|
952
|
+
// gemeldet -- entscheidet hoechstens noch die Genehmigung.
|
|
953
|
+
const gestoert = vorherGestoert || stoerung !== undefined;
|
|
954
|
+
if (isApproved(status)) {
|
|
955
|
+
if (regel.genehmigt) {
|
|
956
|
+
const settled = fromResponse(status, id, steps);
|
|
957
|
+
if (settled)
|
|
958
|
+
return { ...settled, clarified: true };
|
|
959
|
+
}
|
|
960
|
+
steps.push(`Status: genehmigt (${APPROVED_CODE}) -- ${vorbehalt()}, keine Aussage`);
|
|
961
|
+
}
|
|
962
|
+
else if (isCanceled(status) && regel.aufgehoben && (vorherGestoert || stoerung === undefined)) {
|
|
963
|
+
steps.push(`Status: Zahlung aufgehoben (${TRANSACTION_CANCELED_CODE}) -- es ist nichts belastet`);
|
|
964
|
+
emit('resolved', steps[steps.length - 1], id);
|
|
965
|
+
return { outcome: 'declined', transactionId: id, response: status, reason: 'canceled', clarified: true, steps: [...steps] };
|
|
966
|
+
}
|
|
967
|
+
else if (regel.abgelehnt && !gestoert && isConclusiveAsStatus(status)) {
|
|
968
|
+
const settled = fromResponse(status, id, steps);
|
|
969
|
+
if (settled)
|
|
970
|
+
return { ...settled, clarified: true };
|
|
971
|
+
}
|
|
972
|
+
else if (isConclusiveAsStatus(status)) {
|
|
973
|
+
const info = hpsCodeInfo(status.responseCode);
|
|
974
|
+
const was = isCanceled(status) ? 'aufgehoben' : 'abgelehnt';
|
|
975
|
+
steps.push(`Status: ${was} (${info.code} "${info.title}") -- ${vorbehalt()}, keine Aussage`);
|
|
976
|
+
}
|
|
977
|
+
else {
|
|
978
|
+
steps.push(statusOhneErgebnis(status) ?? 'Status: noch kein Ergebniscode');
|
|
979
|
+
}
|
|
980
|
+
ohneAussage += 1;
|
|
981
|
+
if (ohneAussage >= 2) {
|
|
982
|
+
steps.push('Statusabfrage zweimal ohne Aussage -- das Terminal kann es nicht sagen, Ausgang bleibt offen');
|
|
983
|
+
return offen();
|
|
984
|
+
}
|
|
985
|
+
wait = nextWait(wait);
|
|
986
|
+
}
|
|
987
|
+
steps.push('Ausgang bleibt offen');
|
|
988
|
+
return offen();
|
|
989
|
+
}
|
|
990
|
+
return { pay, refund, cancel, clarifyPayment };
|
|
991
|
+
}
|
|
992
|
+
/** Erster Eintrag im Nachweis einer spaeten Nachfrage: was sie entscheiden darf. */
|
|
993
|
+
function nachfrageAnfang(previous, regel) {
|
|
994
|
+
const anfang = 'Spaete Nachfrage beim Terminal -- nur lesend, ohne Abbruch und ohne Storno';
|
|
995
|
+
if (previous === null)
|
|
996
|
+
return `${anfang}; der bisherige Klaerweg ist nicht bekannt, keine Antwort entscheidet`;
|
|
997
|
+
if (previous !== 'beforeResolve' && previous.clarified === true) {
|
|
998
|
+
return `${anfang}; als Vorgeschichte kam das Ergebnis einer frueheren Nachfrage, nicht das der Zahlung -- `
|
|
999
|
+
+ 'der Klaerweg der Zahlung bleibt unbekannt, keine Antwort entscheidet';
|
|
1000
|
+
}
|
|
1001
|
+
if (previous === 'beforeResolve') {
|
|
1002
|
+
return `${anfang}; die Klaerung der Zahlung hatte nicht begonnen, es wurde kein Storno nachgeschickt`;
|
|
1003
|
+
}
|
|
1004
|
+
if (previous.reason !== undefined && isHostUncertainReason(previous.reason)) {
|
|
1005
|
+
return regel.aufgehoben
|
|
1006
|
+
? `${anfang}; nach der Stoerung beim hobex-Host (${previous.reason}) wurde ein Storno versucht, `
|
|
1007
|
+
+ `entscheidet nur "aufgehoben" (${TRANSACTION_CANCELED_CODE})`
|
|
1008
|
+
: `${anfang}; nach der Stoerung beim hobex-Host (${previous.reason}) entscheidet keine Antwort`;
|
|
1009
|
+
}
|
|
1010
|
+
return `${anfang}; die Klaerung der Zahlung endete offen ohne Stoerung beim hobex-Host`;
|
|
855
1011
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Technik von hobex fuer Haendler mit hobex-Terminal, rund um die Uhr
|
|
3
|
+
* erreichbar. Quelle: Angabe des Inhabers am 11.11.2026 („hobex Technik
|
|
4
|
+
* 0662 225588“); es ist die Durchwahl 88 der Zentrale +43 662 2255-0 (hobex,
|
|
5
|
+
* „Zahlen & Fakten“).
|
|
6
|
+
*
|
|
7
|
+
* `phone` international (fuer einen `tel:`-Link nur Ziffern und `+` daraus
|
|
8
|
+
* nehmen), `display` so, wie man sie in Oesterreich liest und waehlt.
|
|
9
|
+
* Gedacht fuer die Stellen, an denen hobex helfen kann: Stoerung beim
|
|
10
|
+
* hobex-Host, Terminal nicht betriebsbereit, TID passt nicht, das Terminal hat
|
|
11
|
+
* geantwortet und kennt den Ausgang nicht -- nie fuer Fehler im eigenen Netz
|
|
12
|
+
* oder an Kasseneck Connect. Die Kasse zeigt sie in einem eigenen Fenster mit
|
|
13
|
+
* den Angaben, die hobex fragt (Beschriftungen `hobex_help.*` im Katalog).
|
|
14
|
+
*/
|
|
15
|
+
export declare const HOBEX_SUPPORT: Readonly<{
|
|
16
|
+
readonly phone: "+43 662 2255-88";
|
|
17
|
+
readonly display: "0662 2255-88";
|
|
18
|
+
readonly availability: "24/7";
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Technik von hobex fuer Haendler mit hobex-Terminal, rund um die Uhr
|
|
3
|
+
* erreichbar. Quelle: Angabe des Inhabers am 11.11.2026 („hobex Technik
|
|
4
|
+
* 0662 225588“); es ist die Durchwahl 88 der Zentrale +43 662 2255-0 (hobex,
|
|
5
|
+
* „Zahlen & Fakten“).
|
|
6
|
+
*
|
|
7
|
+
* `phone` international (fuer einen `tel:`-Link nur Ziffern und `+` daraus
|
|
8
|
+
* nehmen), `display` so, wie man sie in Oesterreich liest und waehlt.
|
|
9
|
+
* Gedacht fuer die Stellen, an denen hobex helfen kann: Stoerung beim
|
|
10
|
+
* hobex-Host, Terminal nicht betriebsbereit, TID passt nicht, das Terminal hat
|
|
11
|
+
* geantwortet und kennt den Ausgang nicht -- nie fuer Fehler im eigenen Netz
|
|
12
|
+
* oder an Kasseneck Connect. Die Kasse zeigt sie in einem eigenen Fenster mit
|
|
13
|
+
* den Angaben, die hobex fragt (Beschriftungen `hobex_help.*` im Katalog).
|
|
14
|
+
*/
|
|
15
|
+
export const HOBEX_SUPPORT = Object.freeze({
|
|
16
|
+
phone: '+43 662 2255-88',
|
|
17
|
+
display: '0662 2255-88',
|
|
18
|
+
availability: '24/7',
|
|
19
|
+
});
|
|
@@ -40,7 +40,7 @@ import { TECS_CODES } from './tecs-codes.js';
|
|
|
40
40
|
/** Der Satz fuer den Bediener je Grund, deutsch. */
|
|
41
41
|
export const HPS_REASON_HINTS = {
|
|
42
42
|
approved: 'Vom Terminal genehmigt.',
|
|
43
|
-
approvedWithCondition: 'Das Terminal meldet eine Genehmigung mit Vorbehalt (etwa nur über einen Teilbetrag). Ob und in welcher Höhe belastet wurde,
|
|
43
|
+
approvedWithCondition: 'Das Terminal meldet eine Genehmigung mit Vorbehalt (etwa nur über einen Teilbetrag). Ob und in welcher Höhe belastet wurde, weiß hobex – nicht erneut kassieren, bevor es geklärt ist.',
|
|
44
44
|
aborted: 'Der Vorgang wurde abgebrochen. Es wurde kein Geld bewegt.',
|
|
45
45
|
noCard: 'Es wurde keine Karte vorgehalten. Es wurde kein Geld bewegt – bitte erneut versuchen.',
|
|
46
46
|
cardReadFailed: 'Die Karte konnte nicht gelesen werden. Es wurde kein Geld bewegt – bitte erneut versuchen, notfalls die Karte stecken statt auflegen.',
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
export { StripeLinkMode, type StripeLinkModeKey } from '../enums/index.js';
|
|
44
44
|
export { type CreateStripeLinkOptions, type StripeCaptureResult, createStripeLink, stripeCaptureIntent, } from './stripe.js';
|
|
45
45
|
export { type HobexPayOptions, type HobexRefundOptions, type HobexTransactionIdOptions, hobexPay, hobexRefund, newHobexTransactionId, } from './hobex.js';
|
|
46
|
-
export { type CardPaymentOutcome, type HpsConnectClient, type HpsConnectCancelOptions, type HpsConnectClientOptions, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, type HpsCancelOptions, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, type HpsPaymentOptions, type HpsPayments, type HpsPaymentResult, type HpsPaymentsOptions, type HpsRefundOptions, type HpsTransactionIdGeneratorOptions, type HpsTransactionResponse, ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
|
|
46
|
+
export { type CardPaymentOutcome, type HpsConnectClient, type HpsConnectCancelOptions, type HpsConnectClientOptions, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, type HpsCancelOptions, type HpsClarifyOptions, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, type HpsPaymentOptions, type HpsPayments, type HpsPaymentResult, type HpsPaymentsOptions, type HpsRefundOptions, type HpsTransactionIdGeneratorOptions, type HpsTransactionResponse, ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HOBEX_SUPPORT, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
export { StripeLinkMode } from '../enums/index.js';
|
|
44
44
|
export { createStripeLink, stripeCaptureIntent, } from './stripe.js';
|
|
45
45
|
export { hobexPay, hobexRefund, newHobexTransactionId, } from './hobex.js';
|
|
46
|
-
export { ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
|
|
46
|
+
export { ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HOBEX_SUPPORT, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
|
package/dist/esm/pos/errors.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { KasseneckApiError } from '../client/errors.js';
|
|
|
21
21
|
* ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
|
|
22
22
|
* Rueckfallzweig.
|
|
23
23
|
*/
|
|
24
|
-
export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "deposit_follows_item", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_in_use", "deposit_type_not_found", "deposit_type_not_issued", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "filler_role_required", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_deposit", "invalid_deposit_quantity", "invalid_discount_preset", "invalid_item_kind", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "too_many_deposit_types", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
|
|
24
|
+
export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "deposit_follows_item", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_in_use", "deposit_type_not_found", "deposit_type_not_issued", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "filler_role_required", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_deposit", "invalid_deposit_quantity", "invalid_discount_preset", "invalid_item_kind", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_a_person_login", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "too_many_deposit_types", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
|
|
25
25
|
export type PosErrorCode = typeof POS_ERROR_CODES[number];
|
|
26
26
|
export declare function isPosErrorCode(value: unknown): value is PosErrorCode;
|
|
27
27
|
/** Der Code eines geworfenen Fehlers, wenn er in [POS_ERROR_CODES] steht; sonst `undefined`. */
|