@kreiseck/kasseneck-api 1.28.0 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +111 -0
  3. package/dist/cjs/client/api.d.ts +15 -0
  4. package/dist/cjs/client/api.js +8 -0
  5. package/dist/cjs/client/aufrufe.d.ts +3 -3
  6. package/dist/cjs/client/aufrufe.js +28 -0
  7. package/dist/cjs/client/index.d.ts +1 -0
  8. package/dist/cjs/client/index.js +17 -1
  9. package/dist/cjs/client/list-receipts.d.ts +5 -0
  10. package/dist/cjs/client/list-receipts.js +5 -1
  11. package/dist/cjs/client/receipts.d.ts +6 -0
  12. package/dist/cjs/client/receipts.js +1 -0
  13. package/dist/cjs/client/terminal.d.ts +206 -0
  14. package/dist/cjs/client/terminal.js +288 -0
  15. package/dist/cjs/enums/voucher-type.d.ts +5 -1
  16. package/dist/cjs/enums/voucher-type.js +5 -1
  17. package/dist/cjs/index.d.ts +2 -2
  18. package/dist/cjs/index.js +28 -4
  19. package/dist/cjs/inventory/index.d.ts +2 -2
  20. package/dist/cjs/inventory/index.js +3 -2
  21. package/dist/cjs/inventory/typen.d.ts +39 -1
  22. package/dist/cjs/inventory/vertrag.d.ts +13 -2
  23. package/dist/cjs/inventory/vertrag.js +16 -1
  24. package/dist/cjs/inventory/webhook.d.ts +3 -0
  25. package/dist/cjs/inventory/webhook.js +39 -0
  26. package/dist/cjs/models/index.d.ts +1 -1
  27. package/dist/cjs/models/index.js +10 -2
  28. package/dist/cjs/models/voucher.d.ts +78 -2
  29. package/dist/cjs/models/voucher.js +127 -5
  30. package/dist/cjs/pos/gutschein.d.ts +13 -0
  31. package/dist/cjs/pos/gutschein.js +5 -1
  32. package/dist/cjs/pos/index.d.ts +1 -1
  33. package/dist/cjs/pos/index.js +3 -2
  34. package/dist/cjs/pos/texte.d.ts +20 -0
  35. package/dist/cjs/pos/texte.js +11 -0
  36. package/dist/cjs/receipt/due.d.ts +8 -1
  37. package/dist/cjs/receipt/due.js +1 -0
  38. package/dist/cjs/receipt/gutschein-plan.d.ts +11 -1
  39. package/dist/cjs/receipt/gutschein-plan.js +116 -1
  40. package/dist/cjs/receipt/layout.js +39 -6
  41. package/dist/cjs/stored/draht.js +5 -0
  42. package/dist/cjs/stored/vokabular.d.ts +3 -1
  43. package/dist/cjs/stored/vokabular.js +15 -2
  44. package/dist/cjs/version.d.ts +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/esm/client/api.d.ts +15 -0
  47. package/dist/esm/client/api.js +8 -0
  48. package/dist/esm/client/aufrufe.d.ts +3 -3
  49. package/dist/esm/client/aufrufe.js +28 -0
  50. package/dist/esm/client/index.d.ts +1 -0
  51. package/dist/esm/client/index.js +1 -0
  52. package/dist/esm/client/list-receipts.d.ts +5 -0
  53. package/dist/esm/client/list-receipts.js +5 -2
  54. package/dist/esm/client/receipts.d.ts +6 -0
  55. package/dist/esm/client/receipts.js +1 -0
  56. package/dist/esm/client/terminal.d.ts +206 -0
  57. package/dist/esm/client/terminal.js +278 -0
  58. package/dist/esm/enums/voucher-type.d.ts +5 -1
  59. package/dist/esm/enums/voucher-type.js +5 -1
  60. package/dist/esm/index.d.ts +2 -2
  61. package/dist/esm/index.js +2 -2
  62. package/dist/esm/inventory/index.d.ts +2 -2
  63. package/dist/esm/inventory/index.js +1 -1
  64. package/dist/esm/inventory/typen.d.ts +39 -1
  65. package/dist/esm/inventory/vertrag.d.ts +13 -2
  66. package/dist/esm/inventory/vertrag.js +15 -0
  67. package/dist/esm/inventory/webhook.d.ts +3 -0
  68. package/dist/esm/inventory/webhook.js +39 -0
  69. package/dist/esm/models/index.d.ts +1 -1
  70. package/dist/esm/models/index.js +1 -1
  71. package/dist/esm/models/voucher.d.ts +78 -2
  72. package/dist/esm/models/voucher.js +122 -4
  73. package/dist/esm/pos/gutschein.d.ts +13 -0
  74. package/dist/esm/pos/gutschein.js +4 -0
  75. package/dist/esm/pos/index.d.ts +1 -1
  76. package/dist/esm/pos/index.js +1 -1
  77. package/dist/esm/pos/texte.d.ts +20 -0
  78. package/dist/esm/pos/texte.js +11 -0
  79. package/dist/esm/receipt/due.d.ts +8 -1
  80. package/dist/esm/receipt/due.js +1 -0
  81. package/dist/esm/receipt/gutschein-plan.d.ts +11 -1
  82. package/dist/esm/receipt/gutschein-plan.js +117 -2
  83. package/dist/esm/receipt/layout.js +40 -7
  84. package/dist/esm/stored/draht.js +6 -1
  85. package/dist/esm/stored/vokabular.d.ts +3 -1
  86. package/dist/esm/stored/vokabular.js +14 -1
  87. package/dist/esm/version.d.ts +1 -1
  88. package/dist/esm/version.js +1 -1
  89. package/fixtures/expected/voucher-external-redeem.grid32.txt +30 -0
  90. package/fixtures/expected/voucher-external-redeem.grid48.txt +27 -0
  91. package/fixtures/expected/voucher-external-redeem.lines.json +280 -0
  92. package/fixtures/expected/voucher-external-redeem.sheet32.json +206 -0
  93. package/fixtures/expected/voucher-external-redeem.sheet48.json +188 -0
  94. package/fixtures/expected/voucher-external-sale.grid32.txt +27 -0
  95. package/fixtures/expected/voucher-external-sale.grid48.txt +26 -0
  96. package/fixtures/expected/voucher-external-sale.lines.json +256 -0
  97. package/fixtures/expected/voucher-external-sale.sheet32.json +188 -0
  98. package/fixtures/expected/voucher-external-sale.sheet48.json +182 -0
  99. package/fixtures/hobex-hps-codes.json +1 -1
  100. package/fixtures/invoice-api.schema.json +1 -1
  101. package/fixtures/invoice-texts.json +1 -1
  102. package/fixtures/manifest.json +16 -0
  103. package/fixtures/pos-texts.json +22 -2
  104. package/fixtures/receipt-due-voucher-generated.json +2 -2
  105. package/fixtures/receipts/voucher-external-redeem.json +85 -0
  106. package/fixtures/receipts/voucher-external-sale.json +80 -0
  107. package/fixtures/stored/voucher-cases.json +2800 -0
  108. package/fixtures/surface.json +32 -4
  109. package/fixtures/v3/antworten/belege.json +4 -3
  110. package/fixtures/v3/antworten/belegmail.json +2 -2
  111. package/fixtures/v3/antworten/berichte.json +2 -2
  112. package/fixtures/v3/antworten/kasse-belege.json +4 -3
  113. package/fixtures/v3/antworten/kasse.json +16 -10
  114. package/fixtures/v3/antworten/lager.json +6 -3
  115. package/fixtures/v3/antworten/rechnungen.json +2 -2
  116. package/fixtures/v3/antworten/storno.json +2 -2
  117. package/fixtures/v3/stored/belege.json +2 -2
  118. package/fixtures/v3/stored/kasse.json +3 -3
  119. package/fixtures/v3/stored/rechnungen.json +2 -2
  120. package/fixtures/v3/v3-vokabular.json +222 -10
  121. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  122. package/package.json +1 -1
@@ -0,0 +1,206 @@
1
+ import type { InternerTransport } from './aufrufe.js';
2
+ /**
3
+ * Kartenterminal am Handy (nur unter `/v3`): Kasseneck verwaltet die Zugaenge
4
+ * der Terminal-App, die Terminal-IDs (TID) je Betrieb und den Code, den der
5
+ * Anbieter beim Umzug einer TID auf ein anderes Geraet per E-Mail schickt.
6
+ * Die App holt sich Zugang, TID und Code von hier; am Geraet tippt niemand
7
+ * E-Mail, Passwort oder TID.
8
+ *
9
+ * **Anmeldung:** der `api_key` des Betriebs als Bearer. Ein `cashregister-token`
10
+ * (wie ihn `apiKeyAuth` mitsendet) stoert nicht, wird aber nicht gebraucht; eine
11
+ * App ohne Kasse nimmt eine Anmeldung nur mit dem Schluessel (etwa
12
+ * `inventoryKeyAuth` aus `./inventory`). Das Geraet weist sich zusaetzlich mit
13
+ * `deviceId` + `deviceSecret` aus, die es einmal mit [registerTerminalDevice]
14
+ * bekommt. Am Kassenweg gibt es die Aufrufe noch nicht.
15
+ *
16
+ * **Geheimnisse:** `deviceSecret`, `password` und `code` stehen nur in den
17
+ * Antworten bzw. Anfragen. Das Paket schreibt sie in kein Log und in keinen
18
+ * Fehler (das Geraetegeheimnis geht als `secretParams` an den Transport); die
19
+ * App darf sie ebenfalls nie loggen und speichert `deviceSecret` im sicheren
20
+ * Speicher des Geraets.
21
+ *
22
+ * Geprueft wird hier nur die Form; was der Server nicht annimmt, lehnt er mit
23
+ * einem Code aus [TERMINAL_ERROR_CODES] ab.
24
+ */
25
+ /** Plattform des Geraets. */
26
+ export declare const TERMINAL_PLATFORMS: readonly ["android", "ios"];
27
+ export type TerminalPlatform = (typeof TERMINAL_PLATFORMS)[number];
28
+ /**
29
+ * Einrichtungsstand der Terminal-App am Geraet: TID zugewiesen, wartet auf den
30
+ * Code, wird eingerichtet, bereit, fehlgeschlagen.
31
+ */
32
+ export declare const TERMINAL_SETUP_STATES: readonly ["assigned", "waiting_for_code", "setting_up", "ready", "failed"];
33
+ export type TerminalSetupState = (typeof TERMINAL_SETUP_STATES)[number];
34
+ /**
35
+ * Stand einer Code-Anfrage: keine Anfrage, sucht, gefunden, zugestellt,
36
+ * unklar (mehrere Geraete warteten gleichzeitig), kein Code gefunden,
37
+ * abgelaufen.
38
+ */
39
+ export declare const TERMINAL_CODE_STATUSES: readonly ["none", "searching", "found", "delivered", "unclear", "no_code", "expired"];
40
+ export type TerminalCodeStatus = (typeof TERMINAL_CODE_STATUSES)[number];
41
+ /** Woher ein Code kam: aus dem Postfach oder vom Support eingetragen. */
42
+ export declare const TERMINAL_CODE_SOURCES: readonly ["mailbox", "support"];
43
+ export type TerminalCodeSource = (typeof TERMINAL_CODE_SOURCES)[number];
44
+ /**
45
+ * Fehlercodes der sieben Aufrufe (`code` des [KasseneckApiError]) wie im
46
+ * Vertrag des Backends (`errorCodes.terminal` in `fixtures/v3/v3-vokabular.json`),
47
+ * in dessen Reihenfolge; dazu kommen die gemeinsamen Codes von Anmeldung und
48
+ * Rand. Ein Code ausserhalb bleibt ueber `KasseneckApiError.code` lesbar.
49
+ */
50
+ export declare const TERMINAL_ERROR_CODES: readonly ["terminal_not_enabled", "terminal_test_environment", "terminal_device_unknown", "terminal_device_blocked", "invalid_terminal_device", "too_many_terminal_devices", "terminal_not_in_business", "terminal_code_manual", "terminal_code_rate_limited", "terminal_not_assigned", "server_error"];
51
+ export type TerminalErrorCode = (typeof TERMINAL_ERROR_CODES)[number];
52
+ /** Laengen der Texte, die der Server annimmt (nach Abzug von Leerraum am Rand). */
53
+ export declare const TERMINAL_LABEL_MAX = 60;
54
+ export declare const TERMINAL_APP_MAX = 40;
55
+ export declare const TERMINAL_REQUESTED_BY_MAX = 80;
56
+ /** Ausweis des Geraets, aus [registerTerminalDevice]. */
57
+ export interface TerminalDeviceCredentials {
58
+ deviceId: string;
59
+ /** Geheimnis des Geraets: nur im sicheren Speicher ablegen, nie loggen. */
60
+ deviceSecret: string;
61
+ }
62
+ /** Eingabe von [registerTerminalDevice]. */
63
+ export interface RegisterTerminalDeviceOptions {
64
+ /** Anzeige des Geraets, 1 bis 60 Zeichen (etwa Modell und Fahrer). */
65
+ label: string;
66
+ platform: TerminalPlatform;
67
+ /** App und Version, 1 bis 40 Zeichen, z. B. `karteck/1.6.21`. */
68
+ app: string;
69
+ /** Wer das Geraet anmeldet, hoechstens 80 Zeichen; steht im Protokoll. */
70
+ requestedBy?: string;
71
+ }
72
+ /** Antwort von [registerTerminalDevice]. `deviceSecret` kommt nur in dieser Antwort, danach nie wieder. */
73
+ export type RegisteredTerminalDevice = TerminalDeviceCredentials;
74
+ /** Eingabe von [getTerminalAccess]: Ausweis, dazu optional neue Anzeigewerte des Geraets. */
75
+ export interface GetTerminalAccessOptions extends TerminalDeviceCredentials {
76
+ platform?: TerminalPlatform;
77
+ /** App und Version, 1 bis 40 Zeichen. */
78
+ app?: string;
79
+ /** Anzeige des Geraets, 1 bis 60 Zeichen. */
80
+ label?: string;
81
+ }
82
+ /** Eingabe von [claimTerminal]. */
83
+ export interface ClaimTerminalOptions extends TerminalDeviceCredentials {
84
+ /** TID aus `TerminalAccessUnavailable.terminals`. */
85
+ terminalId: string;
86
+ /** Anzeige des Geraets, 1 bis 60 Zeichen. */
87
+ label?: string;
88
+ }
89
+ /** Eingabe von [requestTerminalCode]. */
90
+ export interface RequestTerminalCodeOptions extends TerminalDeviceCredentials {
91
+ platform: TerminalPlatform;
92
+ /** Wer den Code anfragt, hoechstens 80 Zeichen; steht im Protokoll. */
93
+ requestedBy?: string;
94
+ }
95
+ /** Eingabe von [reportTerminalLogin]. */
96
+ export interface ReportTerminalLoginOptions extends TerminalDeviceCredentials {
97
+ /** TID, mit der sich die Terminal-App angemeldet hat. */
98
+ terminalId: string;
99
+ success: boolean;
100
+ /** Erste Anmeldung dieser TID auf diesem Geraet. */
101
+ newOnDevice: boolean;
102
+ }
103
+ /** Einrichtungsstand mit Zeitpunkt (ISO 8601, UTC). Ein spaeter ergaenzter Stand kommt unveraendert an. */
104
+ export interface TerminalSetup {
105
+ state: TerminalSetupState | (string & {});
106
+ since: string | null;
107
+ }
108
+ /** Wie die App einen eingefuegten Code prueft: Laenge und Bezeichnungen vor dem Code in der Mail. */
109
+ export interface TerminalCodeFormat {
110
+ length: number;
111
+ labels: string[];
112
+ }
113
+ /** Zugang fuer die Terminal-App ([getTerminalAccess], [claimTerminal]). */
114
+ export interface TerminalAccess {
115
+ available: true;
116
+ /** Login der Terminal-App. */
117
+ username: string;
118
+ /** Passwort der Terminal-App: nie loggen, nie dauerhaft ausserhalb des sicheren Speichers ablegen. */
119
+ password: string;
120
+ terminalId: string;
121
+ terminalName: string | null;
122
+ accountId: string;
123
+ /** `true`: der Code kommt automatisch ([requestTerminalCode]); sonst fragt die App den Menschen danach. */
124
+ autoCode: boolean;
125
+ codeFormat: TerminalCodeFormat;
126
+ setup: TerminalSetup;
127
+ /** Letzte Aenderung von Konto oder Zuordnung (ISO 8601), `null` unbekannt. */
128
+ updatedAt: string | null;
129
+ }
130
+ /** Eine TID des eigenen Betriebs, die gerade ein anderes Geraet nutzt. */
131
+ export interface TerminalListEntry {
132
+ terminalId: string;
133
+ name: string | null;
134
+ /** Anzeige des Geraets, das sie zuletzt nutzte. */
135
+ lastUsedBy: string | null;
136
+ lastUsedAt: string | null;
137
+ }
138
+ /** Keine TID frei: die TIDs des eigenen Betriebs zur Auswahl fuer [claimTerminal]. */
139
+ export interface TerminalAccessUnavailable {
140
+ available: false;
141
+ reason: 'no_free_terminal' | (string & {});
142
+ terminals: TerminalListEntry[];
143
+ }
144
+ /** Antwort von [getTerminalAccess]: Zugang oder Liste. */
145
+ export type TerminalAccessResult = TerminalAccess | TerminalAccessUnavailable;
146
+ /** Antwort von [requestTerminalCode]. */
147
+ export interface TerminalCodeRequest {
148
+ status: TerminalCodeStatus | (string & {});
149
+ }
150
+ /**
151
+ * Antwort von [getTerminalCode]. `code` (6 Zeichen, Gross-/Kleinschreibung
152
+ * zaehlt) nur bei `found` bzw. auf iOS auch bei `delivered` bis `validUntil`.
153
+ */
154
+ export interface TerminalCode {
155
+ status: TerminalCodeStatus | (string & {});
156
+ /** Der Code: nie loggen. */
157
+ code?: string;
158
+ source?: TerminalCodeSource | (string & {});
159
+ validUntil?: string | null;
160
+ setup: TerminalSetup;
161
+ }
162
+ /**
163
+ * Meldet ein Geraet einmal an (`registerTerminalDevice`) und liefert seinen
164
+ * Ausweis. `deviceSecret` steht nur in dieser Antwort: im sicheren Speicher
165
+ * ablegen, nie loggen. Hoechstens 20 Geraete je Betrieb und 10 Anmeldungen je
166
+ * Tag (`too_many_terminal_devices`). Eine Wiederholung nach unklarem Ausgang
167
+ * legt ein weiteres Geraet an.
168
+ */
169
+ export declare function registerTerminalDevice(transport: InternerTransport, options: RegisterTerminalDeviceOptions): Promise<RegisteredTerminalDevice>;
170
+ /**
171
+ * Zugang und TID fuer dieses Geraet (`getTerminalAccess`). Das Geraet behaelt
172
+ * seine TID; ohne eine bekommt es eine freie seines Betriebs. Ist keine frei,
173
+ * kommt `available: false` mit den TIDs des eigenen Betriebs zur Auswahl fuer
174
+ * [claimTerminal]. Die App ruft das bei jedem Start und mindestens einmal am
175
+ * Tag. `password` nie loggen.
176
+ */
177
+ export declare function getTerminalAccess(transport: InternerTransport, options: GetTerminalAccessOptions): Promise<TerminalAccessResult>;
178
+ /**
179
+ * Uebernimmt eine TID des eigenen Betriebs (`claimTerminal`); das Geraet, das
180
+ * sie bisher nutzte, verliert sie. Antwort wie [getTerminalAccess] mit
181
+ * Zugang. Eine fremde oder unbekannte TID ist `terminal_not_in_business`.
182
+ */
183
+ export declare function claimTerminal(transport: InternerTransport, options: ClaimTerminalOptions): Promise<TerminalAccess>;
184
+ /**
185
+ * Fragt den Code fuer die TID dieses Geraets an (`requestTerminalCode`); nur
186
+ * bei Konten mit Postfach (`TerminalAccess.autoCode`), sonst
187
+ * `terminal_code_manual`. Eine offene Anfrage juenger als 6 Minuten bleibt
188
+ * (doppeltes Tippen schadet nicht); hoechstens 6 Anfragen je Stunde
189
+ * (`terminal_code_rate_limited`). Den Code holt danach [getTerminalCode].
190
+ */
191
+ export declare function requestTerminalCode(transport: InternerTransport, options: RequestTerminalCodeOptions): Promise<TerminalCodeRequest>;
192
+ /**
193
+ * Stand der Code-Anfrage und der Einrichtung (`getTerminalCode`); ohne Anfrage
194
+ * `status: 'none'`. Bei `found` steht der Code genau in dieser Antwort: auf
195
+ * Android wird er dabei verbraucht (eine verlorene Antwort verliert ihn), auf
196
+ * iOS bleibt er bis `validUntil` lesbar. Den Code nie loggen.
197
+ */
198
+ export declare function getTerminalCode(transport: InternerTransport, options: TerminalDeviceCredentials): Promise<TerminalCode>;
199
+ /**
200
+ * Meldet den Ausgang der Anmeldung in der Terminal-App (`reportTerminalLogin`).
201
+ * Antwort: nichts. Eine andere als die zugewiesene TID schreibt der Server
202
+ * nicht.
203
+ */
204
+ export declare function reportTerminalLogin(transport: InternerTransport, options: ReportTerminalLoginOptions): Promise<void>;
205
+ /** Meldet, dass die Terminal-App fertig eingerichtet ist (`reportTerminalReady`). Antwort: nichts. */
206
+ export declare function reportTerminalReady(transport: InternerTransport, options: TerminalDeviceCredentials): Promise<void>;
@@ -0,0 +1,288 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = void 0;
4
+ exports.registerTerminalDevice = registerTerminalDevice;
5
+ exports.getTerminalAccess = getTerminalAccess;
6
+ exports.claimTerminal = claimTerminal;
7
+ exports.requestTerminalCode = requestTerminalCode;
8
+ exports.getTerminalCode = getTerminalCode;
9
+ exports.reportTerminalLogin = reportTerminalLogin;
10
+ exports.reportTerminalReady = reportTerminalReady;
11
+ const errors_js_1 = require("./errors.js");
12
+ /**
13
+ * Kartenterminal am Handy (nur unter `/v3`): Kasseneck verwaltet die Zugaenge
14
+ * der Terminal-App, die Terminal-IDs (TID) je Betrieb und den Code, den der
15
+ * Anbieter beim Umzug einer TID auf ein anderes Geraet per E-Mail schickt.
16
+ * Die App holt sich Zugang, TID und Code von hier; am Geraet tippt niemand
17
+ * E-Mail, Passwort oder TID.
18
+ *
19
+ * **Anmeldung:** der `api_key` des Betriebs als Bearer. Ein `cashregister-token`
20
+ * (wie ihn `apiKeyAuth` mitsendet) stoert nicht, wird aber nicht gebraucht; eine
21
+ * App ohne Kasse nimmt eine Anmeldung nur mit dem Schluessel (etwa
22
+ * `inventoryKeyAuth` aus `./inventory`). Das Geraet weist sich zusaetzlich mit
23
+ * `deviceId` + `deviceSecret` aus, die es einmal mit [registerTerminalDevice]
24
+ * bekommt. Am Kassenweg gibt es die Aufrufe noch nicht.
25
+ *
26
+ * **Geheimnisse:** `deviceSecret`, `password` und `code` stehen nur in den
27
+ * Antworten bzw. Anfragen. Das Paket schreibt sie in kein Log und in keinen
28
+ * Fehler (das Geraetegeheimnis geht als `secretParams` an den Transport); die
29
+ * App darf sie ebenfalls nie loggen und speichert `deviceSecret` im sicheren
30
+ * Speicher des Geraets.
31
+ *
32
+ * Geprueft wird hier nur die Form; was der Server nicht annimmt, lehnt er mit
33
+ * einem Code aus [TERMINAL_ERROR_CODES] ab.
34
+ */
35
+ /** Plattform des Geraets. */
36
+ exports.TERMINAL_PLATFORMS = Object.freeze(['android', 'ios']);
37
+ /**
38
+ * Einrichtungsstand der Terminal-App am Geraet: TID zugewiesen, wartet auf den
39
+ * Code, wird eingerichtet, bereit, fehlgeschlagen.
40
+ */
41
+ exports.TERMINAL_SETUP_STATES = Object.freeze(['assigned', 'waiting_for_code', 'setting_up', 'ready', 'failed']);
42
+ /**
43
+ * Stand einer Code-Anfrage: keine Anfrage, sucht, gefunden, zugestellt,
44
+ * unklar (mehrere Geraete warteten gleichzeitig), kein Code gefunden,
45
+ * abgelaufen.
46
+ */
47
+ exports.TERMINAL_CODE_STATUSES = Object.freeze(['none', 'searching', 'found', 'delivered', 'unclear', 'no_code', 'expired']);
48
+ /** Woher ein Code kam: aus dem Postfach oder vom Support eingetragen. */
49
+ exports.TERMINAL_CODE_SOURCES = Object.freeze(['mailbox', 'support']);
50
+ /**
51
+ * Fehlercodes der sieben Aufrufe (`code` des [KasseneckApiError]) wie im
52
+ * Vertrag des Backends (`errorCodes.terminal` in `fixtures/v3/v3-vokabular.json`),
53
+ * in dessen Reihenfolge; dazu kommen die gemeinsamen Codes von Anmeldung und
54
+ * Rand. Ein Code ausserhalb bleibt ueber `KasseneckApiError.code` lesbar.
55
+ */
56
+ exports.TERMINAL_ERROR_CODES = Object.freeze([
57
+ 'terminal_not_enabled', // dem Betrieb ist keine aktive TID zugeordnet
58
+ 'terminal_test_environment', // nur in der Live-Umgebung (kein kr_test_-Schluessel)
59
+ 'terminal_device_unknown', // deviceId oder deviceSecret falsch (gleiche Antwort fuer beides)
60
+ 'terminal_device_blocked', // das Geraet ist gesperrt
61
+ 'invalid_terminal_device', // Angaben zum Geraet unvollstaendig oder ungueltig
62
+ 'too_many_terminal_devices', // Obergrenze der Geraete je Betrieb oder der Anmeldungen je Tag erreicht
63
+ 'terminal_not_in_business', // die TID gibt es nicht oder sie gehoert einem anderen Betrieb (gleiche Antwort)
64
+ 'terminal_code_manual', // Konto ohne Postfach: die App fragt nach dem Code
65
+ 'terminal_code_rate_limited', // hoechstens 6 Code-Anfragen je Geraet und Stunde
66
+ 'terminal_not_assigned', // dem Geraet ist keine TID zugeordnet: zuerst getTerminalAccess
67
+ 'server_error',
68
+ ]);
69
+ /** Laengen der Texte, die der Server annimmt (nach Abzug von Leerraum am Rand). */
70
+ exports.TERMINAL_LABEL_MAX = 60;
71
+ exports.TERMINAL_APP_MAX = 40;
72
+ exports.TERMINAL_REQUESTED_BY_MAX = 80;
73
+ // ---- Hilfen -------------------------------------------------------------------------------------
74
+ function eingabefehler(name, grund) {
75
+ return new errors_js_1.KasseneckValidationError(name, grund, 'request');
76
+ }
77
+ function antwortfehler(name, grund) {
78
+ return new errors_js_1.KasseneckValidationError(name, grund, 'response');
79
+ }
80
+ const istObjekt = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
81
+ const istText = (v) => typeof v === 'string' && v.trim() !== '';
82
+ const textOderNull = (v) => (typeof v === 'string' ? v : null);
83
+ /** Pflichttext mit Hoechstlaenge (nach Abzug von Leerraum am Rand, wie der Server). */
84
+ function pruefeText(name, feld, wert, max) {
85
+ if (typeof wert !== 'string' || wert.trim() === '')
86
+ throw eingabefehler(name, `${feld} fehlt oder ist leer`);
87
+ if (wert.trim().length > max)
88
+ throw eingabefehler(name, `${feld}: hoechstens ${max} Zeichen`);
89
+ return wert;
90
+ }
91
+ function pruefePlattform(name, wert) {
92
+ if (!exports.TERMINAL_PLATFORMS.includes(wert))
93
+ throw eingabefehler(name, 'platform muss android oder ios sein');
94
+ return wert;
95
+ }
96
+ /** Ausweis des Geraets pruefen; die Meldung nennt nie das Geheimnis. */
97
+ function ausweis(name, options) {
98
+ if (!istObjekt(options))
99
+ throw eingabefehler(name, 'Anfrage muss ein Objekt sein');
100
+ if (!istText(options.deviceId))
101
+ throw eingabefehler(name, 'deviceId fehlt oder ist leer');
102
+ if (!istText(options.deviceSecret))
103
+ throw eingabefehler(name, 'deviceSecret fehlt oder ist leer');
104
+ return { params: { deviceId: options.deviceId, deviceSecret: options.deviceSecret }, geheim: options.deviceSecret };
105
+ }
106
+ /** Optionale Felder nur, wenn gesetzt. */
107
+ function optional(name, params, options) {
108
+ if (options.platform !== undefined)
109
+ params['platform'] = pruefePlattform(name, options.platform);
110
+ if (options.app !== undefined)
111
+ params['app'] = pruefeText(name, 'app', options.app, exports.TERMINAL_APP_MAX);
112
+ if (options.label !== undefined)
113
+ params['label'] = pruefeText(name, 'label', options.label, exports.TERMINAL_LABEL_MAX);
114
+ if (options.requestedBy !== undefined)
115
+ params['requestedBy'] = pruefeText(name, 'requestedBy', options.requestedBy, exports.TERMINAL_REQUESTED_BY_MAX);
116
+ }
117
+ function setupAus(name, wert) {
118
+ if (!istObjekt(wert) || typeof wert['state'] !== 'string')
119
+ throw antwortfehler(name, 'Antwort ohne setup.state');
120
+ return { state: wert['state'], since: textOderNull(wert['since']) };
121
+ }
122
+ /** Zugang aus der Antwort; die Meldungen nennen nie Login, Passwort oder TID. */
123
+ function zugangAus(name, d) {
124
+ if (!istText(d['username']) || !istText(d['password']) || !istText(d['terminalId']) || typeof d['accountId'] !== 'string') {
125
+ throw antwortfehler(name, 'Zugang unvollstaendig (username, password, terminalId, accountId)');
126
+ }
127
+ if (typeof d['autoCode'] !== 'boolean')
128
+ throw antwortfehler(name, 'Antwort ohne autoCode');
129
+ const format = d['codeFormat'];
130
+ if (!istObjekt(format) || !(typeof format['length'] === 'number' && Number.isSafeInteger(format['length']) && format['length'] > 0) ||
131
+ !Array.isArray(format['labels']) || !format['labels'].every((l) => typeof l === 'string')) {
132
+ throw antwortfehler(name, 'Antwort ohne gueltiges codeFormat (length, labels)');
133
+ }
134
+ return {
135
+ available: true,
136
+ username: d['username'],
137
+ password: d['password'],
138
+ terminalId: d['terminalId'],
139
+ terminalName: textOderNull(d['terminalName']),
140
+ accountId: d['accountId'],
141
+ autoCode: d['autoCode'],
142
+ codeFormat: { length: format['length'], labels: [...format['labels']] },
143
+ setup: setupAus(name, d['setup']),
144
+ updatedAt: textOderNull(d['updatedAt']),
145
+ };
146
+ }
147
+ function listeAus(name, d) {
148
+ const roh = d['terminals'];
149
+ if (typeof d['reason'] !== 'string' || !Array.isArray(roh))
150
+ throw antwortfehler(name, 'Antwort ohne reason oder terminals');
151
+ const terminals = [];
152
+ for (const t of roh) {
153
+ if (!istObjekt(t) || !istText(t['terminalId']))
154
+ throw antwortfehler(name, 'Eintrag in terminals ohne terminalId');
155
+ terminals.push({
156
+ terminalId: t['terminalId'],
157
+ name: textOderNull(t['name']),
158
+ lastUsedBy: textOderNull(t['lastUsedBy']),
159
+ lastUsedAt: textOderNull(t['lastUsedAt']),
160
+ });
161
+ }
162
+ return { available: false, reason: d['reason'], terminals };
163
+ }
164
+ async function zugangRufen(transport, name, params, geheim) {
165
+ const daten = await transport(name, params, undefined, [geheim]);
166
+ if (!istObjekt(daten) || typeof daten['available'] !== 'boolean')
167
+ throw antwortfehler(name, 'Antwort ohne available');
168
+ return daten['available'] ? zugangAus(name, daten) : listeAus(name, daten);
169
+ }
170
+ // ---- Aufrufe ------------------------------------------------------------------------------------
171
+ /**
172
+ * Meldet ein Geraet einmal an (`registerTerminalDevice`) und liefert seinen
173
+ * Ausweis. `deviceSecret` steht nur in dieser Antwort: im sicheren Speicher
174
+ * ablegen, nie loggen. Hoechstens 20 Geraete je Betrieb und 10 Anmeldungen je
175
+ * Tag (`too_many_terminal_devices`). Eine Wiederholung nach unklarem Ausgang
176
+ * legt ein weiteres Geraet an.
177
+ */
178
+ async function registerTerminalDevice(transport, options) {
179
+ const name = 'registerTerminalDevice';
180
+ if (!istObjekt(options))
181
+ throw eingabefehler(name, 'Anfrage muss ein Objekt sein');
182
+ const params = {
183
+ label: pruefeText(name, 'label', options.label, exports.TERMINAL_LABEL_MAX),
184
+ platform: pruefePlattform(name, options.platform),
185
+ app: pruefeText(name, 'app', options.app, exports.TERMINAL_APP_MAX),
186
+ };
187
+ optional(name, params, { requestedBy: options.requestedBy });
188
+ const daten = await transport(name, params);
189
+ if (!istObjekt(daten) || !istText(daten['deviceId']) || !istText(daten['deviceSecret'])) {
190
+ throw antwortfehler(name, 'Antwort ohne deviceId oder deviceSecret');
191
+ }
192
+ return { deviceId: daten['deviceId'], deviceSecret: daten['deviceSecret'] };
193
+ }
194
+ /**
195
+ * Zugang und TID fuer dieses Geraet (`getTerminalAccess`). Das Geraet behaelt
196
+ * seine TID; ohne eine bekommt es eine freie seines Betriebs. Ist keine frei,
197
+ * kommt `available: false` mit den TIDs des eigenen Betriebs zur Auswahl fuer
198
+ * [claimTerminal]. Die App ruft das bei jedem Start und mindestens einmal am
199
+ * Tag. `password` nie loggen.
200
+ */
201
+ async function getTerminalAccess(transport, options) {
202
+ const name = 'getTerminalAccess';
203
+ const { params, geheim } = ausweis(name, options);
204
+ optional(name, params, { platform: options.platform, app: options.app, label: options.label });
205
+ return zugangRufen(transport, name, params, geheim);
206
+ }
207
+ /**
208
+ * Uebernimmt eine TID des eigenen Betriebs (`claimTerminal`); das Geraet, das
209
+ * sie bisher nutzte, verliert sie. Antwort wie [getTerminalAccess] mit
210
+ * Zugang. Eine fremde oder unbekannte TID ist `terminal_not_in_business`.
211
+ */
212
+ async function claimTerminal(transport, options) {
213
+ const name = 'claimTerminal';
214
+ const { params, geheim } = ausweis(name, options);
215
+ if (!istText(options.terminalId))
216
+ throw eingabefehler(name, 'terminalId fehlt oder ist leer');
217
+ params['terminalId'] = options.terminalId;
218
+ optional(name, params, { label: options.label });
219
+ const ergebnis = await zugangRufen(transport, name, params, geheim);
220
+ if (!ergebnis.available)
221
+ throw antwortfehler(name, 'Antwort ohne Zugang');
222
+ return ergebnis;
223
+ }
224
+ /**
225
+ * Fragt den Code fuer die TID dieses Geraets an (`requestTerminalCode`); nur
226
+ * bei Konten mit Postfach (`TerminalAccess.autoCode`), sonst
227
+ * `terminal_code_manual`. Eine offene Anfrage juenger als 6 Minuten bleibt
228
+ * (doppeltes Tippen schadet nicht); hoechstens 6 Anfragen je Stunde
229
+ * (`terminal_code_rate_limited`). Den Code holt danach [getTerminalCode].
230
+ */
231
+ async function requestTerminalCode(transport, options) {
232
+ const name = 'requestTerminalCode';
233
+ const { params, geheim } = ausweis(name, options);
234
+ params['platform'] = pruefePlattform(name, options.platform);
235
+ optional(name, params, { requestedBy: options.requestedBy });
236
+ const daten = await transport(name, params, undefined, [geheim]);
237
+ if (!istObjekt(daten) || typeof daten['status'] !== 'string')
238
+ throw antwortfehler(name, 'Antwort ohne status');
239
+ return { status: daten['status'] };
240
+ }
241
+ /**
242
+ * Stand der Code-Anfrage und der Einrichtung (`getTerminalCode`); ohne Anfrage
243
+ * `status: 'none'`. Bei `found` steht der Code genau in dieser Antwort: auf
244
+ * Android wird er dabei verbraucht (eine verlorene Antwort verliert ihn), auf
245
+ * iOS bleibt er bis `validUntil` lesbar. Den Code nie loggen.
246
+ */
247
+ async function getTerminalCode(transport, options) {
248
+ const name = 'getTerminalCode';
249
+ const { params, geheim } = ausweis(name, options);
250
+ const daten = await transport(name, params, undefined, [geheim]);
251
+ if (!istObjekt(daten) || typeof daten['status'] !== 'string')
252
+ throw antwortfehler(name, 'Antwort ohne status');
253
+ const ergebnis = { status: daten['status'], setup: setupAus(name, daten['setup']) };
254
+ if (daten['code'] !== undefined && daten['code'] !== null) {
255
+ if (!istText(daten['code']))
256
+ throw antwortfehler(name, 'code ist kein Text');
257
+ ergebnis.code = daten['code'];
258
+ if (typeof daten['source'] === 'string')
259
+ ergebnis.source = daten['source'];
260
+ ergebnis.validUntil = textOderNull(daten['validUntil']);
261
+ }
262
+ return ergebnis;
263
+ }
264
+ /**
265
+ * Meldet den Ausgang der Anmeldung in der Terminal-App (`reportTerminalLogin`).
266
+ * Antwort: nichts. Eine andere als die zugewiesene TID schreibt der Server
267
+ * nicht.
268
+ */
269
+ async function reportTerminalLogin(transport, options) {
270
+ const name = 'reportTerminalLogin';
271
+ const { params, geheim } = ausweis(name, options);
272
+ if (!istText(options.terminalId))
273
+ throw eingabefehler(name, 'terminalId fehlt oder ist leer');
274
+ if (typeof options.success !== 'boolean')
275
+ throw eingabefehler(name, 'success muss true oder false sein');
276
+ if (typeof options.newOnDevice !== 'boolean')
277
+ throw eingabefehler(name, 'newOnDevice muss true oder false sein');
278
+ params['terminalId'] = options.terminalId;
279
+ params['success'] = options.success;
280
+ params['newOnDevice'] = options.newOnDevice;
281
+ await transport(name, params, undefined, [geheim]);
282
+ }
283
+ /** Meldet, dass die Terminal-App fertig eingerichtet ist (`reportTerminalReady`). Antwort: nichts. */
284
+ async function reportTerminalReady(transport, options) {
285
+ const name = 'reportTerminalReady';
286
+ const { params, geheim } = ausweis(name, options);
287
+ await transport(name, params, undefined, [geheim]);
288
+ }
@@ -2,7 +2,11 @@
2
2
  * Gutscheinart — Zwilling von `VoucherType` in kasseneck_api/lib/enums/voucher_type.dart.
3
3
  */
4
4
  export declare const VoucherType: {
5
- /** Altform: Wertgutschein (Wert im Cent, Code frei). */
5
+ /**
6
+ * Altform: Wertgutschein (Wert im Cent, Code frei). Gelesene Belege tragen `value` fuer jeden
7
+ * Mehrzweck-Eintrag (eigen und fremd); dort ist der Wert gueltig. Als Wunsch mit frei getipptem Code
8
+ * veraltet: siehe [LegacyValueVoucherWish].
9
+ */
6
10
  readonly value: "value";
7
11
  /** Altform: Rabatt-/Aktionsgutschein. */
8
12
  readonly promo: "promo";
@@ -5,7 +5,11 @@ exports.VoucherType = void 0;
5
5
  * Gutscheinart — Zwilling von `VoucherType` in kasseneck_api/lib/enums/voucher_type.dart.
6
6
  */
7
7
  exports.VoucherType = {
8
- /** Altform: Wertgutschein (Wert im Cent, Code frei). */
8
+ /**
9
+ * Altform: Wertgutschein (Wert im Cent, Code frei). Gelesene Belege tragen `value` fuer jeden
10
+ * Mehrzweck-Eintrag (eigen und fremd); dort ist der Wert gueltig. Als Wunsch mit frei getipptem Code
11
+ * veraltet: siehe [LegacyValueVoucherWish].
12
+ */
9
13
  value: 'value',
10
14
  /** Altform: Rabatt-/Aktionsgutschein. */
11
15
  promo: 'promo',
@@ -1,6 +1,6 @@
1
1
  export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
2
- export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
- export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, 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, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
2
+ export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
+ export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
4
4
  export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
6
6
  export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, } from './pos/index.js';
package/dist/cjs/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
4
- exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = void 0;
5
- exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = void 0;
6
- exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = void 0;
3
+ exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
4
+ exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = void 0;
5
+ exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = void 0;
6
+ exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = void 0;
7
+ exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = void 0;
7
8
  var index_js_1 = require("./enums/index.js");
8
9
  Object.defineProperty(exports, "ReceiptType", { enumerable: true, get: function () { return index_js_1.ReceiptType; } });
9
10
  Object.defineProperty(exports, "VatRate", { enumerable: true, get: function () { return index_js_1.VatRate; } });
@@ -24,6 +25,14 @@ Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: fu
24
25
  Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return index_js_2.toVoucherPayload; } });
25
26
  Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return index_js_2.fromVoucherPayload; } });
26
27
  Object.defineProperty(exports, "voucherIsValid", { enumerable: true, get: function () { return index_js_2.voucherIsValid; } });
28
+ Object.defineProperty(exports, "VOUCHER_SOURCES", { enumerable: true, get: function () { return index_js_2.VOUCHER_SOURCES; } });
29
+ Object.defineProperty(exports, "isExternalVoucher", { enumerable: true, get: function () { return index_js_2.isExternalVoucher; } });
30
+ Object.defineProperty(exports, "externalVoucherIsValid", { enumerable: true, get: function () { return index_js_2.externalVoucherIsValid; } });
31
+ Object.defineProperty(exports, "normalizeExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.normalizeExternalVoucherNumber; } });
32
+ Object.defineProperty(exports, "checkExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.checkExternalVoucherNumber; } });
33
+ Object.defineProperty(exports, "EXTERNAL_VOUCHER_NUMBER_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_NUMBER_MAX; } });
34
+ Object.defineProperty(exports, "EXTERNAL_VOUCHER_TAXED_WITH_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_TAXED_WITH_MAX; } });
35
+ Object.defineProperty(exports, "EXTERNAL_VOUCHER_VAT_RATES_BP", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_VAT_RATES_BP; } });
27
36
  Object.defineProperty(exports, "toReceiptPayload", { enumerable: true, get: function () { return index_js_2.toReceiptPayload; } });
28
37
  Object.defineProperty(exports, "fromReceiptPayload", { enumerable: true, get: function () { return index_js_2.fromReceiptPayload; } });
29
38
  Object.defineProperty(exports, "receiptSubSumCents", { enumerable: true, get: function () { return index_js_2.receiptSubSumCents; } });
@@ -167,6 +176,21 @@ Object.defineProperty(exports, "DEP_EXPORT_POLL_FACTOR", { enumerable: true, get
167
176
  Object.defineProperty(exports, "DEP_EXPORT_POLL_MAX_MS", { enumerable: true, get: function () { return index_js_3.DEP_EXPORT_POLL_MAX_MS; } });
168
177
  Object.defineProperty(exports, "DEP_EXPORT_WAIT_TIMEOUT_MS", { enumerable: true, get: function () { return index_js_3.DEP_EXPORT_WAIT_TIMEOUT_MS; } });
169
178
  Object.defineProperty(exports, "DEP_EXPORT_DOWNLOAD_TIMEOUT_MS", { enumerable: true, get: function () { return index_js_3.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS; } });
179
+ Object.defineProperty(exports, "registerTerminalDevice", { enumerable: true, get: function () { return index_js_3.registerTerminalDevice; } });
180
+ Object.defineProperty(exports, "getTerminalAccess", { enumerable: true, get: function () { return index_js_3.getTerminalAccess; } });
181
+ Object.defineProperty(exports, "claimTerminal", { enumerable: true, get: function () { return index_js_3.claimTerminal; } });
182
+ Object.defineProperty(exports, "requestTerminalCode", { enumerable: true, get: function () { return index_js_3.requestTerminalCode; } });
183
+ Object.defineProperty(exports, "getTerminalCode", { enumerable: true, get: function () { return index_js_3.getTerminalCode; } });
184
+ Object.defineProperty(exports, "reportTerminalLogin", { enumerable: true, get: function () { return index_js_3.reportTerminalLogin; } });
185
+ Object.defineProperty(exports, "reportTerminalReady", { enumerable: true, get: function () { return index_js_3.reportTerminalReady; } });
186
+ Object.defineProperty(exports, "TERMINAL_PLATFORMS", { enumerable: true, get: function () { return index_js_3.TERMINAL_PLATFORMS; } });
187
+ Object.defineProperty(exports, "TERMINAL_SETUP_STATES", { enumerable: true, get: function () { return index_js_3.TERMINAL_SETUP_STATES; } });
188
+ Object.defineProperty(exports, "TERMINAL_CODE_STATUSES", { enumerable: true, get: function () { return index_js_3.TERMINAL_CODE_STATUSES; } });
189
+ Object.defineProperty(exports, "TERMINAL_CODE_SOURCES", { enumerable: true, get: function () { return index_js_3.TERMINAL_CODE_SOURCES; } });
190
+ Object.defineProperty(exports, "TERMINAL_ERROR_CODES", { enumerable: true, get: function () { return index_js_3.TERMINAL_ERROR_CODES; } });
191
+ Object.defineProperty(exports, "TERMINAL_LABEL_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_LABEL_MAX; } });
192
+ Object.defineProperty(exports, "TERMINAL_APP_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_APP_MAX; } });
193
+ Object.defineProperty(exports, "TERMINAL_REQUESTED_BY_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_REQUESTED_BY_MAX; } });
170
194
  Object.defineProperty(exports, "getCashboxStatus", { enumerable: true, get: function () { return index_js_3.getCashboxStatus; } });
171
195
  Object.defineProperty(exports, "getSignatureStatus", { enumerable: true, get: function () { return index_js_3.getSignatureStatus; } });
172
196
  Object.defineProperty(exports, "createKasseneckApi", { enumerable: true, get: function () { return index_js_3.createKasseneckApi; } });