@kreiseck/kasseneck-api 1.37.0 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -1
- package/README.md +19 -1
- package/dist/cjs/client/aufrufe.d.ts +2 -2
- package/dist/cjs/client/aufrufe.js +12 -0
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +6 -5
- package/dist/cjs/invoice/texte.d.ts +18 -1
- package/dist/cjs/invoice/texte.js +43 -2
- package/dist/cjs/invoice/vertrag.d.ts +1 -1
- package/dist/cjs/invoice/vertrag.js +1 -0
- package/dist/cjs/models/cancellation.d.ts +1 -1
- package/dist/cjs/models/cancellation.js +2 -0
- package/dist/cjs/models/index.d.ts +2 -1
- package/dist/cjs/models/index.js +6 -3
- package/dist/cjs/models/invoice-payment-ref.d.ts +42 -0
- package/dist/cjs/models/invoice-payment-ref.js +38 -0
- package/dist/cjs/models/receipt-item.d.ts +10 -2
- package/dist/cjs/models/receipt-item.js +14 -1
- package/dist/cjs/models/receipt.d.ts +7 -0
- package/dist/cjs/models/receipt.js +6 -0
- package/dist/cjs/payments/hobex-hps/connect-client.d.ts +17 -0
- package/dist/cjs/payments/hobex-hps/connect-client.js +17 -0
- package/dist/cjs/payments/hobex-hps/index.d.ts +1 -1
- package/dist/cjs/payments/index.d.ts +1 -1
- package/dist/cjs/pos/client.js +2 -1
- package/dist/cjs/pos/index.d.ts +1 -1
- package/dist/cjs/pos/index.js +7 -5
- package/dist/cjs/pos/schicht-lesen.js +5 -0
- package/dist/cjs/pos/schicht-typen.d.ts +11 -0
- package/dist/cjs/pos/settings.d.ts +14 -1
- package/dist/cjs/pos/settings.js +16 -2
- package/dist/cjs/pos/texte.d.ts +400 -2
- package/dist/cjs/pos/texte.js +152 -3
- package/dist/cjs/receipt/index.d.ts +1 -0
- package/dist/cjs/receipt/index.js +4 -2
- package/dist/cjs/receipt/layout.d.ts +2 -2
- package/dist/cjs/receipt/layout.js +106 -117
- package/dist/cjs/receipt/shift-sheet.js +6 -1
- package/dist/cjs/receipt/vermerke.d.ts +80 -0
- package/dist/cjs/receipt/vermerke.js +167 -0
- package/dist/cjs/register/errors.d.ts +1 -1
- package/dist/cjs/register/errors.js +4 -0
- package/dist/cjs/register/index.d.ts +1 -1
- package/dist/cjs/register/index.js +3 -1
- package/dist/cjs/register/pairing.d.ts +51 -0
- package/dist/cjs/register/pairing.js +59 -0
- package/dist/cjs/stored/draht.js +25 -1
- package/dist/cjs/stored/einstellungen.js +5 -2
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +22 -2
- 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 +12 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/invoice/texte.d.ts +18 -1
- package/dist/esm/invoice/texte.js +43 -2
- package/dist/esm/invoice/vertrag.d.ts +1 -1
- package/dist/esm/invoice/vertrag.js +1 -0
- package/dist/esm/models/cancellation.d.ts +1 -1
- package/dist/esm/models/cancellation.js +2 -0
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +2 -1
- package/dist/esm/models/invoice-payment-ref.d.ts +42 -0
- package/dist/esm/models/invoice-payment-ref.js +35 -0
- package/dist/esm/models/receipt-item.d.ts +10 -2
- package/dist/esm/models/receipt-item.js +13 -1
- package/dist/esm/models/receipt.d.ts +7 -0
- package/dist/esm/models/receipt.js +6 -0
- package/dist/esm/payments/hobex-hps/connect-client.d.ts +17 -0
- package/dist/esm/payments/hobex-hps/connect-client.js +17 -0
- package/dist/esm/payments/hobex-hps/index.d.ts +1 -1
- package/dist/esm/payments/index.d.ts +1 -1
- package/dist/esm/pos/client.js +3 -2
- package/dist/esm/pos/index.d.ts +1 -1
- package/dist/esm/pos/index.js +1 -1
- package/dist/esm/pos/schicht-lesen.js +5 -0
- package/dist/esm/pos/schicht-typen.d.ts +11 -0
- package/dist/esm/pos/settings.d.ts +14 -1
- package/dist/esm/pos/settings.js +14 -1
- package/dist/esm/pos/texte.d.ts +400 -2
- package/dist/esm/pos/texte.js +152 -3
- package/dist/esm/receipt/index.d.ts +1 -0
- package/dist/esm/receipt/index.js +1 -0
- package/dist/esm/receipt/layout.d.ts +2 -2
- package/dist/esm/receipt/layout.js +103 -113
- package/dist/esm/receipt/shift-sheet.js +6 -1
- package/dist/esm/receipt/vermerke.d.ts +80 -0
- package/dist/esm/receipt/vermerke.js +155 -0
- package/dist/esm/register/errors.d.ts +1 -1
- package/dist/esm/register/errors.js +4 -0
- package/dist/esm/register/index.d.ts +1 -1
- package/dist/esm/register/index.js +1 -1
- package/dist/esm/register/pairing.d.ts +51 -0
- package/dist/esm/register/pairing.js +57 -0
- package/dist/esm/stored/draht.js +25 -1
- package/dist/esm/stored/einstellungen.js +6 -3
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +22 -2
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/expected/invoice-payment-cancellation.grid32.txt +28 -0
- package/fixtures/expected/invoice-payment-cancellation.grid48.txt +26 -0
- package/fixtures/expected/invoice-payment-cancellation.lines.json +189 -0
- package/fixtures/expected/invoice-payment-cancellation.sheet32.json +194 -0
- package/fixtures/expected/invoice-payment-cancellation.sheet48.json +182 -0
- package/fixtures/expected/invoice-payment-manual-receipt.grid32.txt +30 -0
- package/fixtures/expected/invoice-payment-manual-receipt.grid48.txt +29 -0
- package/fixtures/expected/invoice-payment-manual-receipt.lines.json +199 -0
- package/fixtures/expected/invoice-payment-manual-receipt.sheet32.json +206 -0
- package/fixtures/expected/invoice-payment-manual-receipt.sheet48.json +200 -0
- package/fixtures/expected/invoice-payment-normal.grid32.txt +22 -0
- package/fixtures/expected/invoice-payment-normal.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-normal.lines.json +192 -0
- package/fixtures/expected/invoice-payment-normal.sheet32.json +158 -0
- package/fixtures/expected/invoice-payment-normal.sheet48.json +152 -0
- package/fixtures/expected/invoice-payment-outage.grid32.txt +23 -0
- package/fixtures/expected/invoice-payment-outage.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-outage.lines.json +172 -0
- package/fixtures/expected/invoice-payment-outage.sheet32.json +164 -0
- package/fixtures/expected/invoice-payment-outage.sheet48.json +152 -0
- package/fixtures/expected/invoice-payment-partial.grid32.txt +20 -0
- package/fixtures/expected/invoice-payment-partial.grid48.txt +20 -0
- package/fixtures/expected/invoice-payment-partial.lines.json +162 -0
- package/fixtures/expected/invoice-payment-partial.sheet32.json +146 -0
- package/fixtures/expected/invoice-payment-partial.sheet48.json +146 -0
- package/fixtures/expected/invoice-payment-refund.grid32.txt +20 -0
- package/fixtures/expected/invoice-payment-refund.grid48.txt +20 -0
- package/fixtures/expected/invoice-payment-refund.lines.json +162 -0
- package/fixtures/expected/invoice-payment-refund.sheet32.json +146 -0
- package/fixtures/expected/invoice-payment-refund.sheet48.json +146 -0
- package/fixtures/expected/invoice-payment-see-invoice.grid32.txt +22 -0
- package/fixtures/expected/invoice-payment-see-invoice.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-see-invoice.lines.json +192 -0
- package/fixtures/expected/invoice-payment-see-invoice.sheet32.json +158 -0
- package/fixtures/expected/invoice-payment-see-invoice.sheet48.json +152 -0
- package/fixtures/expected/invoice-payment-training.grid32.txt +30 -0
- package/fixtures/expected/invoice-payment-training.grid48.txt +27 -0
- package/fixtures/expected/invoice-payment-training.lines.json +183 -0
- package/fixtures/expected/invoice-payment-training.sheet32.json +206 -0
- package/fixtures/expected/invoice-payment-training.sheet48.json +188 -0
- package/fixtures/expected/invoice-payment-without-vat.grid32.txt +20 -0
- package/fixtures/expected/invoice-payment-without-vat.grid48.txt +19 -0
- package/fixtures/expected/invoice-payment-without-vat.lines.json +162 -0
- package/fixtures/expected/invoice-payment-without-vat.sheet32.json +146 -0
- package/fixtures/expected/invoice-payment-without-vat.sheet48.json +140 -0
- package/fixtures/expected/invoice-payment-zero-percent.grid32.txt +22 -0
- package/fixtures/expected/invoice-payment-zero-percent.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-zero-percent.lines.json +192 -0
- package/fixtures/expected/invoice-payment-zero-percent.sheet32.json +158 -0
- package/fixtures/expected/invoice-payment-zero-percent.sheet48.json +152 -0
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +3 -2
- package/fixtures/invoice-texts.json +37 -3
- package/fixtures/manifest.json +80 -0
- package/fixtures/pos-message-cases.json +3 -0
- package/fixtures/pos-texts.json +458 -1
- package/fixtures/receipt-due-generated.json +3 -3
- package/fixtures/receipt-due-voucher-generated.json +5 -5
- package/fixtures/receipts/invoice-payment-cancellation.json +70 -0
- package/fixtures/receipts/invoice-payment-manual-receipt.json +69 -0
- package/fixtures/receipts/invoice-payment-normal.json +65 -0
- package/fixtures/receipts/invoice-payment-outage.json +63 -0
- package/fixtures/receipts/invoice-payment-partial.json +63 -0
- package/fixtures/receipts/invoice-payment-refund.json +63 -0
- package/fixtures/receipts/invoice-payment-see-invoice.json +65 -0
- package/fixtures/receipts/invoice-payment-training.json +63 -0
- package/fixtures/receipts/invoice-payment-without-vat.json +63 -0
- package/fixtures/receipts/invoice-payment-zero-percent.json +65 -0
- package/fixtures/surface.json +16 -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 +702 -127
- 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 +210 -4
- package/fixtures/v3/stored/rechnungen.json +2 -2
- package/fixtures/v3/v3-vokabular.json +237 -20
- package/fixtures/v3/zahlbetrag-faelle.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SIGNATUR_AUSGEFALLEN = exports.TESTSIGNATUR_TEXT = exports.TESTKASSE_TEXT = void 0;
|
|
4
|
+
exports.receiptSignatureFailed = receiptSignatureFailed;
|
|
5
|
+
exports.belegtyp = belegtyp;
|
|
6
|
+
exports.testkasseVermerk = testkasseVermerk;
|
|
7
|
+
exports.testsignaturVermerk = testsignaturVermerk;
|
|
8
|
+
exports.trainingVermerk = trainingVermerk;
|
|
9
|
+
exports.stornoVermerk = stornoVermerk;
|
|
10
|
+
exports.nacherfassungTeile = nacherfassungTeile;
|
|
11
|
+
exports.signaturausfallVermerk = signaturausfallVermerk;
|
|
12
|
+
exports.receiptNotes = receiptNotes;
|
|
13
|
+
const index_js_1 = require("../models/index.js");
|
|
14
|
+
const vienna_time_js_1 = require("../vienna-time.js");
|
|
15
|
+
const errors_js_1 = require("../client/errors.js");
|
|
16
|
+
// ------------------------------------------------------------------- Texte
|
|
17
|
+
exports.TESTKASSE_TEXT = 'TESTKASSE — kein gültiger Beleg';
|
|
18
|
+
exports.TESTSIGNATUR_TEXT = 'TESTSIGNATUR — kein gültiger Beleg';
|
|
19
|
+
/** Text, den das Backend statt einer Signatur ablegt, wenn die Karte ausfaellt. */
|
|
20
|
+
exports.SIGNATUR_AUSGEFALLEN = 'Sicherheitseinrichtung ausgefallen';
|
|
21
|
+
/**
|
|
22
|
+
* Derselbe Text base64url-kodiert -- so steht er als dritter JWS-Teil im Feld
|
|
23
|
+
* `sig` (Zwilling von `RKSVService.isSigSuccess`). Fest hinterlegt statt zur
|
|
24
|
+
* Laufzeit kodiert: `btoa`/`Buffer` sind in Browser und Node verschieden zu
|
|
25
|
+
* haben, und der Wert ist unveraenderlich.
|
|
26
|
+
*/
|
|
27
|
+
const SIGNATUR_AUSGEFALLEN_BASE64URL = 'U2ljaGVyaGVpdHNlaW5yaWNodHVuZyBhdXNnZWZhbGxlbg';
|
|
28
|
+
/** Erklaerung am Trainingsbeleg (Wortlaut mit dem Betreiber abgestimmt). */
|
|
29
|
+
const TRAINING_ERKLAERUNG = [
|
|
30
|
+
'Trainingsbuchung — kein Kauf, keine Zahlung, keine steuerliche Buchung.',
|
|
31
|
+
'Sollten Sie diesen Beleg als Kunde erhalten haben, sagen Sie bitte dem Betrieb Bescheid.',
|
|
32
|
+
];
|
|
33
|
+
/** Grund-Zeile nach einem Ausfall der Kasse; `other` druckt den eigenen Text. */
|
|
34
|
+
const NACHERFASSUNG_GRUND = {
|
|
35
|
+
network_outage: 'Internet', power_outage: 'Strom', device_failure: 'Gerät defekt', system_outage: 'Störung',
|
|
36
|
+
};
|
|
37
|
+
// ------------------------------------------------------------ Hilfsregeln
|
|
38
|
+
/** Wurde der Beleg ohne funktionierende Signatureinheit ausgestellt? */
|
|
39
|
+
function receiptSignatureFailed(receipt) {
|
|
40
|
+
return receipt.sig.split('.')[2] === SIGNATUR_AUSGEFALLEN_BASE64URL;
|
|
41
|
+
}
|
|
42
|
+
/** Belegtyp als Zeichenkette (Enum-Objekt oder roher Serverwert). */
|
|
43
|
+
function belegtyp(receipt) {
|
|
44
|
+
return typeof receipt.receiptType === 'object' ? receipt.receiptType.value : String(receipt.receiptType ?? '');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Datum des stornierten Originals: „11.08.2026, 09:02 Uhr". Ein unlesbarer
|
|
48
|
+
* Zeitstempel am BEZUG ist kein Grund, den Storno-Bon zu verweigern (der
|
|
49
|
+
* Beleg selbst ist gueltig) -- dann bleibt die Zeile weg.
|
|
50
|
+
*/
|
|
51
|
+
function originalDatum(timeStamp) {
|
|
52
|
+
try {
|
|
53
|
+
const t = (0, vienna_time_js_1.toViennaWallClock)((0, vienna_time_js_1.parseServerTimeStamp)(timeStamp));
|
|
54
|
+
const zwei = (n) => String(n).padStart(2, '0');
|
|
55
|
+
return `${zwei(t.day)}.${zwei(t.month)}.${t.year}, ${zwei(t.hour)}:${zwei(t.minute)} Uhr`;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Grund eines Stornos lesbar -- aus dem EINEN Katalog des Modells
|
|
63
|
+
* (`CANCELLATION_REASONS`, derselbe, den die Kasse anbietet und das Backend
|
|
64
|
+
* annimmt). Unbekannter Code (Fremdclient): sichtbar, aber ohne zu werfen.
|
|
65
|
+
*/
|
|
66
|
+
function stornoGrundText(code) {
|
|
67
|
+
if (!code)
|
|
68
|
+
return null;
|
|
69
|
+
return (0, index_js_1.isCancellationReason)(code) ? index_js_1.CANCELLATION_REASONS[code] : code;
|
|
70
|
+
}
|
|
71
|
+
/** `YYYY-MM-DD` als `TT.MM.JJJJ`; anderes bleibt, wie es kam. */
|
|
72
|
+
function handbelegDatum(tag) {
|
|
73
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(tag);
|
|
74
|
+
return m ? `${m[3]}.${m[2]}.${m[1]}` : tag;
|
|
75
|
+
}
|
|
76
|
+
// ---------------------------------------------------------------- Bausteine
|
|
77
|
+
function testkasseVermerk() {
|
|
78
|
+
return { kind: 'test_cashregister', title: exports.TESTKASSE_TEXT, lines: [] };
|
|
79
|
+
}
|
|
80
|
+
function testsignaturVermerk() {
|
|
81
|
+
return { kind: 'test_signature', title: exports.TESTSIGNATUR_TEXT, lines: [] };
|
|
82
|
+
}
|
|
83
|
+
/** Trainingsbeleg: Titel und Erklaerung; sonst `null`. */
|
|
84
|
+
function trainingVermerk(receipt) {
|
|
85
|
+
return belegtyp(receipt) === 'training' ? { kind: 'training', title: 'TRAININGSBELEG', lines: [...TRAINING_ERKLAERUNG] } : null;
|
|
86
|
+
}
|
|
87
|
+
/** Stornobeleg: Bezug, Datum des Originals (wenn der Bezug es traegt, Backend seit 2026-09-04) und Grund; sonst `null`. */
|
|
88
|
+
function stornoVermerk(receipt) {
|
|
89
|
+
if (belegtyp(receipt) !== 'cancellation')
|
|
90
|
+
return null;
|
|
91
|
+
const zeilen = [receipt.cancellationOf ? `Stornobuchung zu Beleg ${receipt.cancellationOf.receiptId}` : 'Stornobuchung'];
|
|
92
|
+
const datum = receipt.cancellationOf?.timeStamp ? originalDatum(receipt.cancellationOf.timeStamp) : null;
|
|
93
|
+
if (datum)
|
|
94
|
+
zeilen.push(`vom ${datum}`);
|
|
95
|
+
const grund = stornoGrundText(typeof receipt.cancellationReason === 'string' ? receipt.cancellationReason : undefined);
|
|
96
|
+
if (grund)
|
|
97
|
+
zeilen.push(`Grund: ${grund}`);
|
|
98
|
+
return { kind: 'cancellation', title: 'STORNOBELEG', lines: zeilen };
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Nacherfassung eines Handbelegs (manualReceipt): Art, Grund, Nummer und Tag
|
|
102
|
+
* des Handbelegs bzw. der Handbelege eines Tagessammelbelegs. Ohne Handbeleg `null`.
|
|
103
|
+
*/
|
|
104
|
+
function nacherfassungTeile(receipt) {
|
|
105
|
+
const m = receipt.manualReceipt;
|
|
106
|
+
if (!m)
|
|
107
|
+
return null;
|
|
108
|
+
const anlass = [m.reason === 'outside_premises' ? 'Leistung außer Haus' : 'nach Ausfall der Kasse'];
|
|
109
|
+
const grund = m.reason === 'other' ? m.note : NACHERFASSUNG_GRUND[m.reason];
|
|
110
|
+
if (grund)
|
|
111
|
+
anlass.push(`Grund: ${grund}`);
|
|
112
|
+
const tag = handbelegDatum(m.date);
|
|
113
|
+
if (m.numberTo) {
|
|
114
|
+
return {
|
|
115
|
+
title: 'NACHERFASSUNG',
|
|
116
|
+
anlass,
|
|
117
|
+
handbeleg: ['Tagessammelbeleg', `Handbelege Nr. ${m.number} bis ${m.numberTo}`, `${m.count ? `${m.count} Belege ` : ''}vom ${tag}`],
|
|
118
|
+
ustHinweis: 'USt: Duplikat der Handbelege',
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
title: 'NACHERFASSUNG',
|
|
123
|
+
anlass,
|
|
124
|
+
handbeleg: [`Handbeleg Nr. ${m.number}`, `vom ${tag}${m.time ? `, ${m.time} Uhr` : ''}`],
|
|
125
|
+
ustHinweis: 'USt: Duplikat des Handbelegs',
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/** Signaturausfall (§ 17 Abs. 4 RKSV): der Vermerk ohne Zeilen; sonst `null`. */
|
|
129
|
+
function signaturausfallVermerk(receipt) {
|
|
130
|
+
return receiptSignatureFailed(receipt) ? { kind: 'signature_outage', title: exports.SIGNATUR_AUSGEFALLEN, lines: [] } : null;
|
|
131
|
+
}
|
|
132
|
+
// ------------------------------------------------------------------ Ausgabe
|
|
133
|
+
const OPTIONEN = new Set(['testCashregister', 'testSignature']);
|
|
134
|
+
const OPTIONEN_ALT = { testKasse: 'testCashregister', testSignatur: 'testSignature' };
|
|
135
|
+
/**
|
|
136
|
+
* Die Vermerke eines Belegs in fester Reihenfolge: Testkasse, Testsignatur,
|
|
137
|
+
* Training, Storno, Nacherfassung, Signaturausfall. Ein gewoehnlicher Beleg
|
|
138
|
+
* hat keine (`[]`).
|
|
139
|
+
*
|
|
140
|
+
* Ob Testkasse oder Testsignatur, weiss nur der Aufrufer (er kennt das Konto),
|
|
141
|
+
* wie bei [buildReceiptLayout]. Eine unbekannte Option wirft
|
|
142
|
+
* (`KasseneckValidationError`, `scope: 'request'`): eine alte deutsche
|
|
143
|
+
* (`testKasse`) darf nie still wegfallen, sonst saehe ein Testbeleg gueltig aus.
|
|
144
|
+
*
|
|
145
|
+
* Firmendaten kennt diese Ausgabe nicht; der USt-Hinweis der Nacherfassung
|
|
146
|
+
* („USt: Duplikat …“) gehoert darum nicht zum Vermerk (siehe [NacherfassungTeile]).
|
|
147
|
+
*/
|
|
148
|
+
function receiptNotes(receipt, options = {}) {
|
|
149
|
+
for (const name of Object.keys(options)) {
|
|
150
|
+
if (OPTIONEN.has(name))
|
|
151
|
+
continue;
|
|
152
|
+
const neu = OPTIONEN_ALT[name];
|
|
153
|
+
throw new errors_js_1.KasseneckValidationError('receiptNotes', neu !== undefined ? `Option "${name}" heisst "${neu}"` : `Unbekannte Option "${name}"`, 'request');
|
|
154
|
+
}
|
|
155
|
+
const vermerke = [
|
|
156
|
+
options.testCashregister ? testkasseVermerk() : null,
|
|
157
|
+
options.testSignature ? testsignaturVermerk() : null,
|
|
158
|
+
trainingVermerk(receipt),
|
|
159
|
+
stornoVermerk(receipt),
|
|
160
|
+
(() => {
|
|
161
|
+
const teile = nacherfassungTeile(receipt);
|
|
162
|
+
return teile ? { kind: 'manual_receipt', title: teile.title, lines: [...teile.anlass, ...teile.handbeleg] } : null;
|
|
163
|
+
})(),
|
|
164
|
+
signaturausfallVermerk(receipt),
|
|
165
|
+
];
|
|
166
|
+
return vermerke.filter((v) => v !== null);
|
|
167
|
+
}
|
|
@@ -22,7 +22,7 @@ import { KasseneckApiError } from '../client/errors.js';
|
|
|
22
22
|
* ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
|
|
23
23
|
* Rueckfallzweig.
|
|
24
24
|
*/
|
|
25
|
-
export declare const REGISTER_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_in_use", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "device_bound_elsewhere", "device_not_found", "device_not_paired", "device_takeover_required", "dialect_mismatch", "internal_translation_error", "licenses_exhausted", "live_not_enabled", "location_outside", "location_required", "login_failed", "login_mode_select_user", "login_unavailable", "method_not_allowed", "mfa_required", "not_found", "pairing_code_expired", "pairing_code_unknown", "pairing_code_used", "pairing_failed", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "register_user_only", "response_translation_failed", "second_factor_required", "session_ended", "session_expired", "session_not_running", "session_other_cashregister", "too_many_attempts", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
|
|
25
|
+
export declare const REGISTER_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_in_use", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "device_bound_elsewhere", "device_not_found", "device_not_paired", "device_takeover_required", "dialect_mismatch", "internal_translation_error", "invalid_terminal_address", "licenses_exhausted", "live_not_enabled", "location_outside", "location_required", "login_failed", "login_mode_select_user", "login_unavailable", "method_not_allowed", "mfa_required", "not_found", "pairing_code_expired", "pairing_code_unknown", "pairing_code_used", "pairing_failed", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "register_user_only", "response_translation_failed", "second_factor_required", "server_error", "session_ended", "session_expired", "session_not_running", "session_other_cashregister", "terminal_id_mismatch", "too_many_attempts", "too_many_changes", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
|
|
26
26
|
export type RegisterErrorCode = typeof REGISTER_ERROR_CODES[number];
|
|
27
27
|
export declare function isRegisterErrorCode(value: unknown): value is RegisterErrorCode;
|
|
28
28
|
/** Der Code eines geworfenen Fehlers, wenn es einer der Kassen-Anmeldung ist; sonst `undefined`. */
|
|
@@ -49,6 +49,7 @@ exports.REGISTER_ERROR_CODES = Object.freeze([
|
|
|
49
49
|
'device_takeover_required',
|
|
50
50
|
'dialect_mismatch',
|
|
51
51
|
'internal_translation_error',
|
|
52
|
+
'invalid_terminal_address',
|
|
52
53
|
'licenses_exhausted',
|
|
53
54
|
'live_not_enabled',
|
|
54
55
|
'location_outside',
|
|
@@ -70,11 +71,14 @@ exports.REGISTER_ERROR_CODES = Object.freeze([
|
|
|
70
71
|
'register_user_only',
|
|
71
72
|
'response_translation_failed',
|
|
72
73
|
'second_factor_required',
|
|
74
|
+
'server_error',
|
|
73
75
|
'session_ended',
|
|
74
76
|
'session_expired',
|
|
75
77
|
'session_not_running',
|
|
76
78
|
'session_other_cashregister',
|
|
79
|
+
'terminal_id_mismatch',
|
|
77
80
|
'too_many_attempts',
|
|
81
|
+
'too_many_changes',
|
|
78
82
|
'unauthorized',
|
|
79
83
|
'user_disabled',
|
|
80
84
|
'user_verification_failed',
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
* daraus entstehende ID-Token und `sitzung.sessionId` ergeben zusammen
|
|
60
60
|
* `registerUserAuth` — ab da laeuft alles Weitere ueber den ueblichen Weg.
|
|
61
61
|
*/
|
|
62
|
-
export { type RegisterDeviceConnection, type RegisterDeviceCredentials, type PairRegisterDeviceOptions, type PairedRegisterDevice, type RegisterUserKind, type RegisterUserSummary, type RegisterUserPerms, REGISTER_PERMS, type RegisterScope, type RegisterUser, type RegisterUserSession, type ListRegisterUsersForDeviceOptions, type RegisterUserLoginOptions, type RegisterPinLoginOptions, type RegisterPinPolicy, type RegisterLoginMode, type RegisterDeviceUsers, type RegisterClientInfo, type RegisterGeo, type RegisterDeviceInfo, type RegisterSession, type RegisterSessionOverview, type ListRegisterSessionsForDeviceOptions, pairRegisterDevice, listRegisterUsersForDevice, listRegisterSessionsForDevice, unpairRegisterDevice, registerUserLogin, registerPinLogin, } from './pairing.js';
|
|
62
|
+
export { type RegisterDeviceConnection, type RegisterDeviceCredentials, type PairRegisterDeviceOptions, type PairedRegisterDevice, type RegisterUserKind, type RegisterUserSummary, type RegisterUserPerms, REGISTER_PERMS, type RegisterScope, type RegisterUser, type RegisterUserSession, type ListRegisterUsersForDeviceOptions, type RegisterUserLoginOptions, type RegisterPinLoginOptions, type RegisterPinPolicy, type RegisterLoginMode, type RegisterDeviceUsers, type RegisterClientInfo, type RegisterGeo, type RegisterDeviceInfo, type RegisterSession, type RegisterSessionOverview, type ListRegisterSessionsForDeviceOptions, type ReportMyTerminalAddressOptions, type ReportedTerminalAddress, type ReportMyRegisterClientOptions, type ReportedRegisterClient, pairRegisterDevice, listRegisterUsersForDevice, listRegisterSessionsForDevice, reportMyTerminalAddress, reportMyRegisterClient, unpairRegisterDevice, registerUserLogin, registerPinLogin, } from './pairing.js';
|
|
63
63
|
export { renewRegisterSession, endRegisterSession } from './session.js';
|
|
64
64
|
export { REGISTER_ERROR_CODES, type RegisterErrorCode, isRegisterErrorCode, registerErrorCode, registerFieldErrors, type RegisterFieldError, isRegisterError, type RegisterErrorDetails, registerErrorDetails, } from './errors.js';
|
|
@@ -61,12 +61,14 @@
|
|
|
61
61
|
* `registerUserAuth` — ab da laeuft alles Weitere ueber den ueblichen Weg.
|
|
62
62
|
*/
|
|
63
63
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
|
-
exports.registerErrorDetails = exports.isRegisterError = exports.registerFieldErrors = exports.registerErrorCode = exports.isRegisterErrorCode = exports.REGISTER_ERROR_CODES = exports.endRegisterSession = exports.renewRegisterSession = exports.registerPinLogin = exports.registerUserLogin = exports.unpairRegisterDevice = exports.listRegisterSessionsForDevice = exports.listRegisterUsersForDevice = exports.pairRegisterDevice = exports.REGISTER_PERMS = void 0;
|
|
64
|
+
exports.registerErrorDetails = exports.isRegisterError = exports.registerFieldErrors = exports.registerErrorCode = exports.isRegisterErrorCode = exports.REGISTER_ERROR_CODES = exports.endRegisterSession = exports.renewRegisterSession = exports.registerPinLogin = exports.registerUserLogin = exports.unpairRegisterDevice = exports.reportMyRegisterClient = exports.reportMyTerminalAddress = exports.listRegisterSessionsForDevice = exports.listRegisterUsersForDevice = exports.pairRegisterDevice = exports.REGISTER_PERMS = void 0;
|
|
65
65
|
var pairing_js_1 = require("./pairing.js");
|
|
66
66
|
Object.defineProperty(exports, "REGISTER_PERMS", { enumerable: true, get: function () { return pairing_js_1.REGISTER_PERMS; } });
|
|
67
67
|
Object.defineProperty(exports, "pairRegisterDevice", { enumerable: true, get: function () { return pairing_js_1.pairRegisterDevice; } });
|
|
68
68
|
Object.defineProperty(exports, "listRegisterUsersForDevice", { enumerable: true, get: function () { return pairing_js_1.listRegisterUsersForDevice; } });
|
|
69
69
|
Object.defineProperty(exports, "listRegisterSessionsForDevice", { enumerable: true, get: function () { return pairing_js_1.listRegisterSessionsForDevice; } });
|
|
70
|
+
Object.defineProperty(exports, "reportMyTerminalAddress", { enumerable: true, get: function () { return pairing_js_1.reportMyTerminalAddress; } });
|
|
71
|
+
Object.defineProperty(exports, "reportMyRegisterClient", { enumerable: true, get: function () { return pairing_js_1.reportMyRegisterClient; } });
|
|
70
72
|
Object.defineProperty(exports, "unpairRegisterDevice", { enumerable: true, get: function () { return pairing_js_1.unpairRegisterDevice; } });
|
|
71
73
|
Object.defineProperty(exports, "registerUserLogin", { enumerable: true, get: function () { return pairing_js_1.registerUserLogin; } });
|
|
72
74
|
Object.defineProperty(exports, "registerPinLogin", { enumerable: true, get: function () { return pairing_js_1.registerPinLogin; } });
|
|
@@ -354,6 +354,57 @@ export declare function pairRegisterDevice(options: PairRegisterDeviceOptions):
|
|
|
354
354
|
* Geraet meldet Erfolg. Danach das Geraet lokal vergessen.
|
|
355
355
|
*/
|
|
356
356
|
export declare function unpairRegisterDevice(options: ListRegisterUsersForDeviceOptions): Promise<void>;
|
|
357
|
+
/** Eingabe von [reportMyTerminalAddress]: Ausweis des Geraets plus die Adresse, unter der das Terminal geantwortet hat. */
|
|
358
|
+
export interface ReportMyTerminalAddressOptions extends RegisterDeviceConnection, RegisterDeviceCredentials {
|
|
359
|
+
/** Terminal-ID (TID) der Kasse; der Server schreibt nur, wenn sie zur Einrichtung dieses Geraets passt. */
|
|
360
|
+
tid: string;
|
|
361
|
+
/** IPv4-Adresse, unter der das Terminal antwortet. */
|
|
362
|
+
host: string;
|
|
363
|
+
/** Port, 1 bis 65535. */
|
|
364
|
+
port: number;
|
|
365
|
+
}
|
|
366
|
+
/** Antwort von [reportMyTerminalAddress]: ob der Server die Adresse geaendert hat (`false` = war schon so). */
|
|
367
|
+
export interface ReportedTerminalAddress {
|
|
368
|
+
changed: boolean;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Meldet still, dass das Kartenterminal der Kasse unter einer neuen Adresse
|
|
372
|
+
* antwortet (nur Kassenweg `/api/v3`, Ausweis des Geraets wie bei
|
|
373
|
+
* [listRegisterUsersForDevice]; keine Sitzung einer Person noetig).
|
|
374
|
+
*
|
|
375
|
+
* Der Server schreibt genau zwei Felder (IP und Port des Terminals) und nur,
|
|
376
|
+
* wenn die TID zur Einrichtung dieses Geraets passt; jede Aenderung steht im
|
|
377
|
+
* Kassen-Protokoll. Antwort `{ changed }`. Wiederholen ist gefahrlos: dieselbe
|
|
378
|
+
* Adresse noch einmal meldet `changed: false`. Die Kasse zeigt dazu nichts an.
|
|
379
|
+
*
|
|
380
|
+
* Fehlercodes: `terminal_id_mismatch`, `invalid_terminal_address`,
|
|
381
|
+
* `too_many_changes` (heute zu oft geaendert), dazu `device_not_paired`.
|
|
382
|
+
* Geprueft wird hier nur die Form; die Adresse beurteilt der Server.
|
|
383
|
+
*/
|
|
384
|
+
export declare function reportMyTerminalAddress(options: ReportMyTerminalAddressOptions): Promise<ReportedTerminalAddress>;
|
|
385
|
+
/** Eingabe von [reportMyRegisterClient]: Ausweis des Geraets plus die Bau-Kennung der laufenden Kasse. */
|
|
386
|
+
export interface ReportMyRegisterClientOptions extends RegisterDeviceConnection, RegisterDeviceCredentials {
|
|
387
|
+
/** Bau-Kennung der Kasse, z. B. `1.39.0/2026-11-13T18:20Z` (Browser) oder `kasse-app/1.0.3+34` (App). */
|
|
388
|
+
app: string;
|
|
389
|
+
}
|
|
390
|
+
/** Antwort von [reportMyRegisterClient]: ob der Server die Kennung geschrieben hat (`false` = unveraendert und jung genug). */
|
|
391
|
+
export interface ReportedRegisterClient {
|
|
392
|
+
written: boolean;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Meldet still, welche Fassung der Kasse auf diesem Geraet laeuft (nur
|
|
396
|
+
* Kassenweg `/api/v3`, Ausweis des Geraets wie bei [listRegisterUsersForDevice];
|
|
397
|
+
* keine Sitzung einer Person noetig). Gedacht fuer den Start, nach der
|
|
398
|
+
* Anmeldung und einen Takt von etwa 15 Minuten.
|
|
399
|
+
*
|
|
400
|
+
* Der Server schreibt die kuerzbare Kennung nur, wenn sie sich geaendert hat
|
|
401
|
+
* oder die letzte Meldung mindestens 10 Minuten alt ist; sonst `written: false`.
|
|
402
|
+
* Wiederholen ist gefahrlos. Die Kasse zeigt dazu nichts an.
|
|
403
|
+
*
|
|
404
|
+
* Fehlercodes: `device_not_paired` (falsches Geheimnis, unbekanntes oder
|
|
405
|
+
* gesperrtes Geraet), `server_error`. Geprueft wird hier nur die Form.
|
|
406
|
+
*/
|
|
407
|
+
export declare function reportMyRegisterClient(options: ReportMyRegisterClientOptions): Promise<ReportedRegisterClient>;
|
|
357
408
|
/** Eine laufende Sitzung an einer Kasse -- Zeile in der Auswahl. */
|
|
358
409
|
export interface RegisterSession {
|
|
359
410
|
id: string;
|
|
@@ -8,6 +8,8 @@ exports.depositReturnOf = depositReturnOf;
|
|
|
8
8
|
exports.voucherPermsOf = voucherPermsOf;
|
|
9
9
|
exports.pairRegisterDevice = pairRegisterDevice;
|
|
10
10
|
exports.unpairRegisterDevice = unpairRegisterDevice;
|
|
11
|
+
exports.reportMyTerminalAddress = reportMyTerminalAddress;
|
|
12
|
+
exports.reportMyRegisterClient = reportMyRegisterClient;
|
|
11
13
|
exports.listRegisterSessionsForDevice = listRegisterSessionsForDevice;
|
|
12
14
|
exports.listRegisterUsersForDevice = listRegisterUsersForDevice;
|
|
13
15
|
exports.registerUserLogin = registerUserLogin;
|
|
@@ -162,6 +164,63 @@ async function unpairRegisterDevice(options) {
|
|
|
162
164
|
pflicht(name, 'deviceSecret', deviceSecret);
|
|
163
165
|
await transportFuer(verbindung)(name, { ownerUid, deviceId, deviceSecret }, undefined, [deviceSecret]);
|
|
164
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Meldet still, dass das Kartenterminal der Kasse unter einer neuen Adresse
|
|
169
|
+
* antwortet (nur Kassenweg `/api/v3`, Ausweis des Geraets wie bei
|
|
170
|
+
* [listRegisterUsersForDevice]; keine Sitzung einer Person noetig).
|
|
171
|
+
*
|
|
172
|
+
* Der Server schreibt genau zwei Felder (IP und Port des Terminals) und nur,
|
|
173
|
+
* wenn die TID zur Einrichtung dieses Geraets passt; jede Aenderung steht im
|
|
174
|
+
* Kassen-Protokoll. Antwort `{ changed }`. Wiederholen ist gefahrlos: dieselbe
|
|
175
|
+
* Adresse noch einmal meldet `changed: false`. Die Kasse zeigt dazu nichts an.
|
|
176
|
+
*
|
|
177
|
+
* Fehlercodes: `terminal_id_mismatch`, `invalid_terminal_address`,
|
|
178
|
+
* `too_many_changes` (heute zu oft geaendert), dazu `device_not_paired`.
|
|
179
|
+
* Geprueft wird hier nur die Form; die Adresse beurteilt der Server.
|
|
180
|
+
*/
|
|
181
|
+
async function reportMyTerminalAddress(options) {
|
|
182
|
+
const { ownerUid, deviceId, deviceSecret, tid, host, port, ...verbindung } = options;
|
|
183
|
+
const name = 'reportMyTerminalAddress';
|
|
184
|
+
pflicht(name, 'ownerUid', ownerUid);
|
|
185
|
+
pflicht(name, 'deviceId', deviceId);
|
|
186
|
+
pflicht(name, 'deviceSecret', deviceSecret);
|
|
187
|
+
pflicht(name, 'tid', tid);
|
|
188
|
+
pflicht(name, 'host', host);
|
|
189
|
+
if (typeof port !== 'number' || !Number.isInteger(port) || port < 1 || port > 65535) {
|
|
190
|
+
throw new errors_js_1.KasseneckValidationError(name, 'port muss eine ganze Zahl von 1 bis 65535 sein', 'request');
|
|
191
|
+
}
|
|
192
|
+
const daten = await transportFuer(verbindung)(name, { ownerUid, deviceId, deviceSecret, tid, host, port }, undefined, [deviceSecret]);
|
|
193
|
+
if (typeof daten?.changed !== 'boolean') {
|
|
194
|
+
throw antwortfehler(name, 'Antwort enthaelt kein changed');
|
|
195
|
+
}
|
|
196
|
+
return { changed: daten.changed };
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Meldet still, welche Fassung der Kasse auf diesem Geraet laeuft (nur
|
|
200
|
+
* Kassenweg `/api/v3`, Ausweis des Geraets wie bei [listRegisterUsersForDevice];
|
|
201
|
+
* keine Sitzung einer Person noetig). Gedacht fuer den Start, nach der
|
|
202
|
+
* Anmeldung und einen Takt von etwa 15 Minuten.
|
|
203
|
+
*
|
|
204
|
+
* Der Server schreibt die kuerzbare Kennung nur, wenn sie sich geaendert hat
|
|
205
|
+
* oder die letzte Meldung mindestens 10 Minuten alt ist; sonst `written: false`.
|
|
206
|
+
* Wiederholen ist gefahrlos. Die Kasse zeigt dazu nichts an.
|
|
207
|
+
*
|
|
208
|
+
* Fehlercodes: `device_not_paired` (falsches Geheimnis, unbekanntes oder
|
|
209
|
+
* gesperrtes Geraet), `server_error`. Geprueft wird hier nur die Form.
|
|
210
|
+
*/
|
|
211
|
+
async function reportMyRegisterClient(options) {
|
|
212
|
+
const { ownerUid, deviceId, deviceSecret, app, ...verbindung } = options;
|
|
213
|
+
const name = 'reportMyRegisterClient';
|
|
214
|
+
pflicht(name, 'ownerUid', ownerUid);
|
|
215
|
+
pflicht(name, 'deviceId', deviceId);
|
|
216
|
+
pflicht(name, 'deviceSecret', deviceSecret);
|
|
217
|
+
pflicht(name, 'app', app);
|
|
218
|
+
const daten = await transportFuer(verbindung)(name, { ownerUid, deviceId, deviceSecret, app }, undefined, [deviceSecret]);
|
|
219
|
+
if (typeof daten?.written !== 'boolean') {
|
|
220
|
+
throw antwortfehler(name, 'Antwort enthaelt kein written');
|
|
221
|
+
}
|
|
222
|
+
return { written: daten.written };
|
|
223
|
+
}
|
|
165
224
|
/**
|
|
166
225
|
* Welche Sitzungen haelt diese Kasse gerade?
|
|
167
226
|
*
|
package/dist/cjs/stored/draht.js
CHANGED
|
@@ -246,6 +246,30 @@ function _storedReceiptInner(doc, functionName) {
|
|
|
246
246
|
function pruefangabenDerHuelle(p) {
|
|
247
247
|
return { karteRegistriertAm: alsIso(p.karteRegistriertAm), kasseRegistriertAm: alsIso(p.kasseRegistriertAm) };
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Steuerhinweis der Zahlung auf Rechnung: innen `steuerhinweis` (`inkl_ust` | `null_prozent` | `siehe_rechnung`),
|
|
251
|
+
* aussen `taxNote` (`incl_vat` | `zero_percent` | `see_invoice`). Der Vertrags-Export kennt die Umbenennung und den
|
|
252
|
+
* Wertekatalog inzwischen; diese Zeile bleibt trotzdem, weil sie bewusst deutsche UND englische Werte annimmt
|
|
253
|
+
* (Huellen kommen innen wie aussen vor). Ein anderer oder fehlender Wert ergibt keinen Hinweis; das alte Feld
|
|
254
|
+
* `includesVat` faellt weg.
|
|
255
|
+
*/
|
|
256
|
+
const STEUERHINWEIS_AUSSEN = {
|
|
257
|
+
inkl_ust: 'incl_vat', null_prozent: 'zero_percent', siehe_rechnung: 'see_invoice',
|
|
258
|
+
incl_vat: 'incl_vat', zero_percent: 'zero_percent', see_invoice: 'see_invoice',
|
|
259
|
+
};
|
|
260
|
+
function rechnungszahlungNachAussen(beleg) {
|
|
261
|
+
if (!Array.isArray(beleg.invoicePayments))
|
|
262
|
+
return beleg;
|
|
263
|
+
const invoicePayments = beleg.invoicePayments.map((e) => {
|
|
264
|
+
if (!(0, exports.istObjekt)(e))
|
|
265
|
+
return e;
|
|
266
|
+
const { steuerhinweis, taxNote, includesVat: _alt, ...rest } = e;
|
|
267
|
+
const roh = steuerhinweis ?? taxNote;
|
|
268
|
+
const aussen = typeof roh === 'string' && (0, exports.hat)(STEUERHINWEIS_AUSSEN, roh) ? STEUERHINWEIS_AUSSEN[roh] : undefined;
|
|
269
|
+
return aussen === undefined ? rest : { ...rest, taxNote: aussen };
|
|
270
|
+
});
|
|
271
|
+
return { ...beleg, invoicePayments };
|
|
272
|
+
}
|
|
249
273
|
/**
|
|
250
274
|
* Eine Beleg-Huelle der inneren Form (`receipt`, Betriebsfelder, `kopfId`,
|
|
251
275
|
* `pruefangaben`, `testKasse` ...) in die Drahtform von `getReceipt` unter
|
|
@@ -254,7 +278,7 @@ function pruefangabenDerHuelle(p) {
|
|
|
254
278
|
function _receiptEnvelopeToWire(huelle) {
|
|
255
279
|
const schema = vokabular_js_1.SCHEMAS.getReceipt;
|
|
256
280
|
const draht = werteNachAussen(schluesselNachAussen(huelle, schema.data), schema.werte);
|
|
257
|
-
return (0, exports.istObjekt)(draht.receipt) ? { ...draht, receipt: belegGutscheineNachAussen(belegRueckgabeNachAussen(draht.receipt)) } : draht;
|
|
281
|
+
return (0, exports.istObjekt)(draht.receipt) ? { ...draht, receipt: rechnungszahlungNachAussen(belegGutscheineNachAussen(belegRueckgabeNachAussen(draht.receipt))) } : draht;
|
|
258
282
|
}
|
|
259
283
|
/**
|
|
260
284
|
* Ein Belegdokument (`users/{uid}/cashregisters/{id}/receipts/{id}`) in der
|
|
@@ -53,7 +53,10 @@ const PRUEFER = {
|
|
|
53
53
|
* gueltiger Text gespeichert sind; sonst fehlen sie still, ohne Eintrag in
|
|
54
54
|
* `weggelassen` (der Server meldet sie dann auch nicht).
|
|
55
55
|
*/
|
|
56
|
-
const GERAET_OPTIONAL = Object.fromEntries(
|
|
56
|
+
const GERAET_OPTIONAL = Object.fromEntries([
|
|
57
|
+
...settings_js_1.POS_DEVICE_OPTIONAL_FIELDS.map((feld) => [feld, (v) => (0, settings_js_1._optionalerWert)(v, false)]),
|
|
58
|
+
...settings_js_1.POS_DEVICE_OPTIONAL_SWITCHES.map((feld) => [feld, (v) => typeof v === 'boolean']),
|
|
59
|
+
]);
|
|
57
60
|
/**
|
|
58
61
|
* Optionale Betriebs-Schalter (Zwilling von `BETRIEB_OPTIONAL` und
|
|
59
62
|
* `mischeBetrieb`): sie gehen nur hinaus, wenn sie als Wahrheitswert
|
|
@@ -294,6 +297,6 @@ exports._PRUEFER_FELDER = Object.freeze({
|
|
|
294
297
|
device: [...new Set([...Object.keys(PRUEFER.device), ...Object.keys(settings_js_1.POS_DEVICE_VALUES), ...Object.keys(GERAET_OPTIONAL), 'shortcuts'])],
|
|
295
298
|
standard: {
|
|
296
299
|
business: [...Object.keys(settings_js_1.POS_BUSINESS_DEFAULTS), ...settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS, ...settings_js_1.POS_BUSINESS_OPTIONAL_CHOICES, ...settings_js_1.POS_BUSINESS_OPTIONAL_LISTS],
|
|
297
|
-
device: [...Object.keys(settings_js_1.POS_DEVICE_DEFAULTS), ...settings_js_1.POS_DEVICE_OPTIONAL_FIELDS, ...settings_js_1.POS_DEVICE_OPTIONAL_CHOICES],
|
|
300
|
+
device: [...Object.keys(settings_js_1.POS_DEVICE_DEFAULTS), ...settings_js_1.POS_DEVICE_OPTIONAL_FIELDS, ...settings_js_1.POS_DEVICE_OPTIONAL_SWITCHES, ...settings_js_1.POS_DEVICE_OPTIONAL_CHOICES],
|
|
298
301
|
},
|
|
299
302
|
});
|
|
@@ -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 = "ab188a33a1f0d07b187347e0293b935e41435fa61dc1078cd164b10cc2be5f46";
|
|
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 = "ab188a33a1f0d07b187347e0293b935e41435fa61dc1078cd164b10cc2be5f46";
|
|
8
8
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
9
9
|
exports.SCHEMAS = {
|
|
10
10
|
"getReceipt": {
|
|
@@ -45,7 +45,18 @@ exports.SCHEMAS = {
|
|
|
45
45
|
"sharedReturnPoint": {
|
|
46
46
|
"__": "pfandStelle",
|
|
47
47
|
"address": "adresse"
|
|
48
|
-
}
|
|
48
|
+
},
|
|
49
|
+
"invoicePayments": [
|
|
50
|
+
{
|
|
51
|
+
"__": "rechnungszahlung",
|
|
52
|
+
"invoiceNumber": "nummer",
|
|
53
|
+
"customerId": "kundeId",
|
|
54
|
+
"amountCents": "betragCents",
|
|
55
|
+
"partial": "teil",
|
|
56
|
+
"paidOn": "zahlungVom",
|
|
57
|
+
"taxNote": "steuerhinweis"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
49
60
|
},
|
|
50
61
|
"taxNumber": "taxnr",
|
|
51
62
|
"vatId": "uid",
|
|
@@ -115,6 +126,9 @@ exports.SCHEMAS = {
|
|
|
115
126
|
"receipt.items[].depositKind": {
|
|
116
127
|
"$catalog": "PFAND_ART"
|
|
117
128
|
},
|
|
129
|
+
"receipt.invoicePayments[].taxNote": {
|
|
130
|
+
"$catalog": "RECHNUNGSZAHLUNG_STEUERHINWEIS"
|
|
131
|
+
},
|
|
118
132
|
"issuedVouchers[].type": {
|
|
119
133
|
"$catalog": "GUTSCHEIN_ART"
|
|
120
134
|
},
|
|
@@ -250,6 +264,7 @@ exports.SCHEMAS = {
|
|
|
250
264
|
"terminalVia": "terminalVia",
|
|
251
265
|
"terminalType": "terminalArt",
|
|
252
266
|
"shortcutHints": "tastenMarken",
|
|
267
|
+
"printerHint": "druckerHinweis",
|
|
253
268
|
"cartWidth": "korbBreite"
|
|
254
269
|
},
|
|
255
270
|
"vouchers": {
|
|
@@ -856,6 +871,11 @@ exports.KATALOGE = {
|
|
|
856
871
|
"glas": "glass",
|
|
857
872
|
"sonstiges": "other"
|
|
858
873
|
},
|
|
874
|
+
"RECHNUNGSZAHLUNG_STEUERHINWEIS": {
|
|
875
|
+
"inkl_ust": "incl_vat",
|
|
876
|
+
"null_prozent": "zero_percent",
|
|
877
|
+
"siehe_rechnung": "see_invoice"
|
|
878
|
+
},
|
|
859
879
|
"REFERENZ_STUFE": {
|
|
860
880
|
"fragen": "optional",
|
|
861
881
|
"pflicht": "required"
|
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", "getMyTipBalance", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
16
|
+
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance", "reportMyTerminalAddress", "reportMyRegisterClient", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
17
17
|
export type ApiCall = typeof ALL_CALLS[number];
|
|
18
18
|
/**
|
|
19
19
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -29,7 +29,7 @@ export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "can
|
|
|
29
29
|
* die fuenf DEP-Aufrufe); die Kasse ruft sie trotzdem ueber diesen Weg (ein Dialekt
|
|
30
30
|
* je Client, Nachtrag §5.2).
|
|
31
31
|
*/
|
|
32
|
-
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance"];
|
|
32
|
+
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance", "reportMyTerminalAddress", "reportMyRegisterClient"];
|
|
33
33
|
export type PublicCall = typeof PUBLIC_CALLS[number];
|
|
34
34
|
export type PosCall = typeof POS_CALLS[number];
|
|
35
35
|
/**
|
|
@@ -156,6 +156,10 @@ export const ALL_CALLS = [
|
|
|
156
156
|
'listMyLeergutCodes',
|
|
157
157
|
// „Mein Trinkgeld“ (./pos): Stand der angemeldeten Person; nur ueber den Kassenweg.
|
|
158
158
|
'getMyTipBalance',
|
|
159
|
+
// Neue Adresse des Kartenterminals still melden (./register, Ausweis des Geraets); nur ueber den Kassenweg.
|
|
160
|
+
'reportMyTerminalAddress',
|
|
161
|
+
// Laufende Fassung der Kasse still melden (./register, Ausweis des Geraets); nur ueber den Kassenweg.
|
|
162
|
+
'reportMyRegisterClient',
|
|
159
163
|
// Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
|
|
160
164
|
'registerTerminalDevice',
|
|
161
165
|
'getTerminalAccess',
|
|
@@ -388,6 +392,10 @@ export const POS_CALLS = [
|
|
|
388
392
|
'listMyLeergutCodes',
|
|
389
393
|
// „Mein Trinkgeld“: nur ueber den Kassenweg, nur persoenliche Anmeldung.
|
|
390
394
|
'getMyTipBalance',
|
|
395
|
+
// Neue Adresse des Kartenterminals melden: nur ueber den Kassenweg, Ausweis des Geraets (keine Sitzung).
|
|
396
|
+
'reportMyTerminalAddress',
|
|
397
|
+
// Laufende Fassung melden: nur ueber den Kassenweg, Ausweis des Geraets (keine Sitzung).
|
|
398
|
+
'reportMyRegisterClient',
|
|
391
399
|
];
|
|
392
400
|
/**
|
|
393
401
|
* Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
|
|
@@ -604,6 +612,10 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
604
612
|
registerUserLogin: 'repeatable',
|
|
605
613
|
renewRegisterSession: 'repeatable',
|
|
606
614
|
// Kartenterminal: Anmeldung und Einrichtung melden schreiben denselben Stand noch einmal.
|
|
615
|
+
// Dieselbe Adresse noch einmal gemeldet aendert nichts (`changed: false`); der Tageszaehler zaehlt nur echte Aenderungen.
|
|
616
|
+
reportMyTerminalAddress: 'repeatable',
|
|
617
|
+
// Dieselbe Kennung noch einmal gemeldet schreibt nichts (`written: false`).
|
|
618
|
+
reportMyRegisterClient: 'repeatable',
|
|
607
619
|
reportTerminalLogin: 'repeatable',
|
|
608
620
|
reportTerminalReady: 'repeatable',
|
|
609
621
|
// Kartenterminal: die feste Bindung noch einmal loesen aendert nichts am Server.
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
|
|
2
|
-
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
2
|
+
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, isInvoicePaymentItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type InvoicePaymentRef, type InvoicePaymentTaxNote, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
3
3
|
export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, EWP_REASONS, EWP_WARNING_CODES, type EwpReason, type EwpWarningCode, type EwpMasterData, type EwpLineSources, type EwpLine, type EwpWarning, type EwpExtraQuantity, type EwpExtraQuantityInput, type EwpReport, type EwpReportFile, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
|