@kreiseck/kasseneck-api 1.14.0 → 1.16.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 (57) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +72 -2
  3. package/dist/cjs/client/api.d.ts +5 -0
  4. package/dist/cjs/client/api.js +3 -0
  5. package/dist/cjs/client/aufrufe.d.ts +2 -2
  6. package/dist/cjs/client/aufrufe.js +4 -0
  7. package/dist/cjs/client/index.d.ts +1 -0
  8. package/dist/cjs/client/index.js +12 -1
  9. package/dist/cjs/client/list-receipts.d.ts +217 -0
  10. package/dist/cjs/client/list-receipts.js +298 -0
  11. package/dist/cjs/index.d.ts +1 -1
  12. package/dist/cjs/index.js +11 -2
  13. package/dist/cjs/invoice/vertrag.d.ts +1 -1
  14. package/dist/cjs/invoice/vertrag.js +2 -0
  15. package/dist/cjs/models/receipt-errors.d.ts +1 -1
  16. package/dist/cjs/models/receipt-errors.js +3 -0
  17. package/dist/cjs/stored/vokabular.d.ts +1 -1
  18. package/dist/cjs/stored/vokabular.js +14 -2
  19. package/dist/cjs/version.d.ts +1 -1
  20. package/dist/cjs/version.js +1 -1
  21. package/dist/esm/client/api.d.ts +5 -0
  22. package/dist/esm/client/api.js +3 -0
  23. package/dist/esm/client/aufrufe.d.ts +2 -2
  24. package/dist/esm/client/aufrufe.js +4 -0
  25. package/dist/esm/client/index.d.ts +1 -0
  26. package/dist/esm/client/index.js +1 -0
  27. package/dist/esm/client/list-receipts.d.ts +217 -0
  28. package/dist/esm/client/list-receipts.js +292 -0
  29. package/dist/esm/index.d.ts +1 -1
  30. package/dist/esm/index.js +1 -1
  31. package/dist/esm/invoice/vertrag.d.ts +1 -1
  32. package/dist/esm/invoice/vertrag.js +2 -0
  33. package/dist/esm/models/receipt-errors.d.ts +1 -1
  34. package/dist/esm/models/receipt-errors.js +3 -0
  35. package/dist/esm/stored/vokabular.d.ts +1 -1
  36. package/dist/esm/stored/vokabular.js +14 -2
  37. package/dist/esm/version.d.ts +1 -1
  38. package/dist/esm/version.js +1 -1
  39. package/fixtures/hobex-hps-codes.json +1 -1
  40. package/fixtures/invoice-api.schema.json +3 -2
  41. package/fixtures/invoice-texts.json +1 -1
  42. package/fixtures/pos-texts.json +1 -1
  43. package/fixtures/receipt-due-voucher-generated.json +1 -1
  44. package/fixtures/surface.json +6 -3
  45. package/fixtures/v3/antworten/belege.json +1 -1
  46. package/fixtures/v3/antworten/belegmail.json +1 -1
  47. package/fixtures/v3/antworten/kasse-belege.json +1 -1
  48. package/fixtures/v3/antworten/kasse.json +75 -10
  49. package/fixtures/v3/antworten/lager.json +1 -1
  50. package/fixtures/v3/antworten/rechnungen.json +1 -1
  51. package/fixtures/v3/antworten/storno.json +1 -1
  52. package/fixtures/v3/stored/belege.json +1 -1
  53. package/fixtures/v3/stored/kasse.json +151 -381
  54. package/fixtures/v3/stored/rechnungen.json +142 -2
  55. package/fixtures/v3/v3-vokabular.json +103 -11
  56. package/fixtures/v3/zahlbetrag-faelle.json +1 -1
  57. package/package.json +1 -1
@@ -0,0 +1,298 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ 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 = void 0;
4
+ exports.fromListReceiptsSummaryPayload = fromListReceiptsSummaryPayload;
5
+ exports.listReceipts = listReceipts;
6
+ exports.listAllReceipts = listAllReceipts;
7
+ const index_js_1 = require("../enums/index.js");
8
+ const index_js_2 = require("../models/index.js");
9
+ const enum_payload_js_1 = require("../models/enum-payload.js");
10
+ const errors_js_1 = require("./errors.js");
11
+ /**
12
+ * Belege einer Kasse auflisten (`listReceipts`, nur unter `/v3`): ein Tag oder
13
+ * ein Zeitraum von hoechstens 31 Kalendertagen, Seite fuer Seite ueber einen
14
+ * undurchsichtigen Cursor. Nachfolger von `getReportV2` fuer Listen;
15
+ * `getReportV2` bleibt fuer Berichte.
16
+ *
17
+ * **Anmeldung wie `getReportV2`:** API-Schluessel plus `cashregister-token`
18
+ * (`apiKeyAuth`); die Kasse kommt aus dem Token, nie aus einem Parameter.
19
+ * Kassen-Bediener (Geraet + PIN) weist der Server ab; die Kasse hat dafuer
20
+ * `listMyReceipts` am Kassenweg. Dieses Paket bildet das nicht nach, wer darf,
21
+ * entscheidet allein das Backend.
22
+ *
23
+ * Zeiten sind die **Wiener Wanduhr** als Text, wie `timeStamp` am Beleg; der
24
+ * Server vergleicht sie als Text. Ein Tag ist ein Kalendertag, auch an den
25
+ * Tagen der Zeitumstellung, und die Grenze von 31 Tagen zaehlt Kalendertage,
26
+ * nicht 31 x 24 Stunden. Die Pruefung hier rechnet darum ohne Zeitzone, genau
27
+ * wie der Server (`beleg-liste-core.js`).
28
+ */
29
+ /** Ansicht einer Seite: `summary` eine schlanke Zeile je Beleg, `full` das gespeicherte Belegdokument. */
30
+ exports.LIST_RECEIPTS_VIEWS = Object.freeze(['summary', 'full']);
31
+ /** Reihenfolge: `desc` neueste zuerst (Vorgabe des Servers), `asc` aelteste zuerst. */
32
+ exports.LIST_RECEIPTS_ORDERS = Object.freeze(['desc', 'asc']);
33
+ /** Groesste Seite, die der Server liefert (`limit`); ohne Angabe nimmt er 100. */
34
+ exports.LIST_RECEIPTS_LIMIT_MAX = 500;
35
+ /** Laengster Zeitraum in Kalendertagen (`to` hoechstens `from` + 31 Tage). */
36
+ exports.LIST_RECEIPTS_DAYS_MAX = 31;
37
+ /**
38
+ * So viele Seiten holt [listAllReceipts] hoechstens, dann bricht er mit
39
+ * Fehler ab. Schutz gegen einen Cursor, der nie endet; mit der Seitengroesse
40
+ * des Helfers (500) sind das 50.000 Belege, mehr als jede Kasse in 31 Tagen
41
+ * ausstellt.
42
+ */
43
+ exports.LIST_ALL_RECEIPTS_MAX_PAGES = 100;
44
+ /**
45
+ * Fehlercodes von `listReceipts` (`code` des [KasseneckApiError]), dazu die
46
+ * gemeinsamen Codes von Anmeldung und Rand (Kassen-Token, Live-Gate,
47
+ * API-Freigabe). Ein Code ausserhalb bleibt ueber `KasseneckApiError.code`
48
+ * lesbar. Die Regeln der ersten sieben prueft dieses Paket schon vor dem
49
+ * Senden (ausser `invalid_cursor`: ob ein Cursor zur Abfrage passt, weiss nur
50
+ * der Server).
51
+ */
52
+ exports.LIST_RECEIPTS_ERROR_CODES = Object.freeze([
53
+ 'invalid_date', // kein Datum JJJJ-MM-TT bzw. Zeitpunkt JJJJ-MM-TTThh:mm:ss, oder unmoeglich (2026-02-30)
54
+ 'invalid_range', // nicht genau eine Form (date ODER from + to), oder to nicht nach from
55
+ 'range_too_long', // mehr als 31 Kalendertage
56
+ 'invalid_limit', // keine ganze Zahl von 1 bis 500 (der Server kappt nie still)
57
+ 'invalid_order', // weder desc noch asc
58
+ 'invalid_view', // weder summary noch full
59
+ 'invalid_cursor', // veraendert, fremde Kasse, oder Zeitfenster/order/view anders als auf Seite 1
60
+ 'server_error',
61
+ ]);
62
+ const TAG = /^(\d{4})-(\d{2})-(\d{2})$/;
63
+ const ZEIT = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/;
64
+ /** Kalendertag als UTC-Mitternacht (nur zum Rechnen mit Tagen; auch fuer Jahre unter 100). */
65
+ function utcTag(jahr, monat, tag) {
66
+ const d = new Date(Date.UTC(2000, 0, 1));
67
+ d.setUTCFullYear(jahr, monat - 1, tag);
68
+ return d;
69
+ }
70
+ /** Ein echtes Kalenderdatum (2026-02-30 nicht)? */
71
+ function kalendertag(jahr, monat, tag) {
72
+ const d = utcTag(jahr, monat, tag);
73
+ return d.getUTCFullYear() === jahr && d.getUTCMonth() === monat - 1 && d.getUTCDate() === tag;
74
+ }
75
+ const zwei = (n) => String(n).padStart(2, '0');
76
+ /** Wanduhr-Text `YYYY-MM-DDTHH:mm:ss` aus einem Tag oder Zeitpunkt; sonst `null`. */
77
+ function wanduhr(wert) {
78
+ if (typeof wert !== 'string')
79
+ return null;
80
+ const t = TAG.exec(wert);
81
+ if (t)
82
+ return kalendertag(+t[1], +t[2], +t[3]) ? `${wert}T00:00:00` : null;
83
+ const z = ZEIT.exec(wert);
84
+ if (z && kalendertag(+z[1], +z[2], +z[3]) && +z[4] <= 23 && +z[5] <= 59 && +z[6] <= 59)
85
+ return wert;
86
+ return null;
87
+ }
88
+ /** Wanduhr-Text plus ganze Kalendertage, Uhrzeit bleibt (ohne Zeitzone gerechnet). */
89
+ function plusTage(zeit, tage) {
90
+ const [datum, uhr] = zeit.split('T');
91
+ const [j, m, t] = datum.split('-').map(Number);
92
+ const d = utcTag(j, m, t + tage);
93
+ return `${String(d.getUTCFullYear()).padStart(4, '0')}-${zwei(d.getUTCMonth() + 1)}-${zwei(d.getUTCDate())}T${uhr}`;
94
+ }
95
+ const gesetzt = (v) => v !== undefined && v !== null;
96
+ /** Fehler in der Eingabe des Aufrufers: es geht keine Anfrage raus. */
97
+ function eingabefehler(grund) {
98
+ return new errors_js_1.KasseneckValidationError('listReceipts', grund, 'request');
99
+ }
100
+ /** Antwort meldet Erfolg, traegt aber nicht, was der Aufruf zusagt. */
101
+ function antwortfehler(grund) {
102
+ return new errors_js_1.KasseneckValidationError('listReceipts', grund, 'response');
103
+ }
104
+ /**
105
+ * Prueft die Eingabe nach den Regeln des Servers und gibt die Parameter
106
+ * zurueck, die hinausgehen (nur gesetzte Felder, Werte unveraendert, damit
107
+ * Folgeseiten dasselbe Fenster senden).
108
+ */
109
+ function parameter(options) {
110
+ if (options == null || typeof options !== 'object')
111
+ throw eingabefehler('Optionen fehlen (date oder from und to)');
112
+ const o = options;
113
+ const raus = {};
114
+ if (gesetzt(o.date)) {
115
+ if (gesetzt(o.from) || gesetzt(o.to))
116
+ throw eingabefehler('entweder date oder from und to angeben, nicht beides');
117
+ if (typeof o.date !== 'string' || !TAG.test(o.date) || wanduhr(o.date) === null) {
118
+ throw eingabefehler(`date muss ein Datum YYYY-MM-DD sein, war "${String(o.date)}"`);
119
+ }
120
+ raus['date'] = o.date;
121
+ }
122
+ else {
123
+ if (!gesetzt(o.from) || !gesetzt(o.to))
124
+ throw eingabefehler('Zeitraum fehlt: date oder from und to angeben');
125
+ const von = wanduhr(o.from);
126
+ if (von === null)
127
+ throw eingabefehler(`from muss YYYY-MM-DD oder YYYY-MM-DDTHH:mm:ss sein, war "${String(o.from)}"`);
128
+ const bis = wanduhr(o.to);
129
+ if (bis === null)
130
+ throw eingabefehler(`to muss YYYY-MM-DD oder YYYY-MM-DDTHH:mm:ss sein, war "${String(o.to)}"`);
131
+ if (bis <= von)
132
+ throw eingabefehler('to muss nach from liegen (to ist ausschliesslich)');
133
+ if (bis > plusTage(von, exports.LIST_RECEIPTS_DAYS_MAX)) {
134
+ throw eingabefehler(`Zeitraum hoechstens ${exports.LIST_RECEIPTS_DAYS_MAX} Kalendertage (to hoechstens from + ${exports.LIST_RECEIPTS_DAYS_MAX} Tage)`);
135
+ }
136
+ raus['from'] = o.from;
137
+ raus['to'] = o.to;
138
+ }
139
+ if (gesetzt(o.limit)) {
140
+ if (!Number.isInteger(o.limit) || o.limit < 1 || o.limit > exports.LIST_RECEIPTS_LIMIT_MAX) {
141
+ throw eingabefehler(`limit muss eine ganze Zahl von 1 bis ${exports.LIST_RECEIPTS_LIMIT_MAX} sein, war "${String(o.limit)}"`);
142
+ }
143
+ raus['limit'] = o.limit;
144
+ }
145
+ if (gesetzt(o.order)) {
146
+ if (!exports.LIST_RECEIPTS_ORDERS.includes(o.order))
147
+ throw eingabefehler(`order muss desc oder asc sein, war "${String(o.order)}"`);
148
+ raus['order'] = o.order;
149
+ }
150
+ if (gesetzt(o.view)) {
151
+ if (!exports.LIST_RECEIPTS_VIEWS.includes(o.view))
152
+ throw eingabefehler(`view muss summary oder full sein, war "${String(o.view)}"`);
153
+ raus['view'] = o.view;
154
+ }
155
+ if (gesetzt(o.cursor)) {
156
+ if (typeof o.cursor !== 'string' || o.cursor === '')
157
+ throw eingabefehler('cursor muss der nextCursor der vorigen Seite sein (nicht leerer Text)');
158
+ raus['cursor'] = o.cursor;
159
+ }
160
+ return raus;
161
+ }
162
+ const istObjekt = (w) => w != null && typeof w === 'object' && !Array.isArray(w);
163
+ const text = (w) => (typeof w === 'string' ? w : null);
164
+ // Ganze Cent; ein einzelner unbrauchbarer Betrag laesst die Liste nicht scheitern.
165
+ const cent = (w) => (typeof w === 'number' && Number.isInteger(w) ? w : 0);
166
+ function istStornoStand(w) {
167
+ return typeof w === 'string' && index_js_2.CANCELLATION_STATUSES.includes(w);
168
+ }
169
+ /** Zeile `view: summary` vom Draht. */
170
+ function fromListReceiptsSummaryPayload(payload) {
171
+ const brutto = istObjekt(payload['grossByRateCents']) ? payload['grossByRateCents'] : {};
172
+ const bediener = payload['operator'];
173
+ const bezug = payload['cancellationOf'];
174
+ return {
175
+ receiptId: text(payload['receiptId']),
176
+ counter: typeof payload['counter'] === 'number' ? payload['counter'] : null,
177
+ receiptType: typeof payload['receiptType'] === 'string' ? (0, enum_payload_js_1.readEnumKey)(index_js_1.ReceiptType, payload['receiptType']) : null,
178
+ zeroKind: text(payload['zeroKind']),
179
+ timeStamp: text(payload['timeStamp']),
180
+ totalCents: cent(payload['totalCents']),
181
+ grossByRateCents: {
182
+ standard: cent(brutto['standard']),
183
+ reduced1: cent(brutto['reduced1']),
184
+ reduced2: cent(brutto['reduced2']),
185
+ zero: cent(brutto['zero']),
186
+ special: cent(brutto['special']),
187
+ },
188
+ paymentMethod: typeof payload['paymentMethod'] === 'string' ? (0, enum_payload_js_1.readEnumKey)(index_js_1.KeckPaymentMethod, payload['paymentMethod']) : null,
189
+ ...(Array.isArray(payload['payments'])
190
+ ? { payments: payload['payments'].filter(istObjekt).map((z) => (0, index_js_2.fromReceiptPaymentPayload)(z)) }
191
+ : {}),
192
+ ...(typeof payload['tipCents'] === 'number' ? { tipCents: payload['tipCents'] } : {}),
193
+ operator: istObjekt(bediener) ? { name: typeof bediener['name'] === 'string' ? bediener['name'] : '' } : null,
194
+ cancellationOf: istObjekt(bezug) ? { receiptId: text(bezug['receiptId']), timeStamp: text(bezug['timeStamp']) } : null,
195
+ cancellationReason: text(payload['cancellationReason']),
196
+ cancellationStatus: istStornoStand(payload['cancellationStatus']) ? payload['cancellationStatus'] : 'unknown',
197
+ signatureOk: payload['signatureOk'] !== false,
198
+ customProjectId: text(payload['customProjectId']),
199
+ fullReceiptId: text(payload['fullReceiptId']),
200
+ };
201
+ }
202
+ function tagessumme(roh) {
203
+ if (roh === null)
204
+ return null;
205
+ if (!istObjekt(roh))
206
+ throw antwortfehler('daySummary ist weder ein Objekt noch null');
207
+ const saetze = Array.isArray(roh['revenueByRate']) ? roh['revenueByRate'] : [];
208
+ return {
209
+ date: typeof roh['date'] === 'string' ? roh['date'] : '',
210
+ receiptCount: cent(roh['receiptCount']),
211
+ revenueCents: cent(roh['revenueCents']),
212
+ revenueByRate: saetze.filter(istObjekt).map((z) => ({ rateBp: cent(z['rateBp']), grossCents: cent(z['grossCents']) })),
213
+ };
214
+ }
215
+ /** `metadata` der vollen Ansicht wie bei getReportV2: Firmendaten plus Bezeichnung der Kasse. */
216
+ function kopfdaten(roh) {
217
+ if (!istObjekt(roh))
218
+ throw antwortfehler('metadata ist kein Objekt');
219
+ const label = roh.label;
220
+ return { ...(0, index_js_2.fromReceiptCompanyPayload)(roh), label: typeof label === 'string' ? label : '' };
221
+ }
222
+ /**
223
+ * Eine Seite Belege der angemeldeten Kasse (`listReceipts`). Die Eingabe wird
224
+ * vor dem Senden nach den Regeln des Servers geprueft (genau eine Form des
225
+ * Zeitfensters, Datumsformat, hoechstens 31 Kalendertage, `limit` 1-500,
226
+ * `order`, `view`); ein Verstoss wirft [KasseneckValidationError] mit
227
+ * `scope: 'request'`, ohne dass etwas hinausgeht.
228
+ *
229
+ * Mit `view: 'full'` sind die Belege das gespeicherte Belegdokument
230
+ * ([Receipt], dieselbe Form wie `getReportV2`), sonst [ListReceiptsSummary].
231
+ * Alle Seiten auf einmal: [listAllReceipts].
232
+ */
233
+ async function listReceipts(transport, options) {
234
+ const params = parameter(options);
235
+ const voll = params['view'] === 'full';
236
+ const daten = await transport('listReceipts', params);
237
+ if (!istObjekt(daten))
238
+ throw antwortfehler('Antwort enthaelt keine Daten (data fehlt)');
239
+ const liste = daten['receipts'];
240
+ if (!Array.isArray(liste) || liste.some((b) => !istObjekt(b))) {
241
+ throw antwortfehler('Antwort enthaelt keine Belegliste (data.receipts fehlt)');
242
+ }
243
+ if (typeof daten['hasMore'] !== 'boolean')
244
+ throw antwortfehler('Antwort ohne hasMore');
245
+ const weiter = daten['nextCursor'];
246
+ // Ein `hasMore` ohne Cursor liesse den Aufrufer ratlos (oder einen Blaetterer im Kreis laufen).
247
+ if (daten['hasMore'] ? typeof weiter !== 'string' || weiter === '' : weiter !== null) {
248
+ throw antwortfehler('nextCursor passt nicht zu hasMore (Text bei hasMore, sonst null)');
249
+ }
250
+ const receipts = (voll
251
+ ? liste.map((b) => (0, index_js_2.fromReceiptPayload)(b))
252
+ : liste.map((b) => fromListReceiptsSummaryPayload(b)));
253
+ return {
254
+ receipts,
255
+ hasMore: daten['hasMore'],
256
+ nextCursor: daten['hasMore'] ? weiter : null,
257
+ ...('daySummary' in daten ? { daySummary: tagessumme(daten['daySummary']) } : {}),
258
+ ...(voll && 'metadata' in daten ? { metadata: kopfdaten(daten['metadata']) } : {}),
259
+ };
260
+ }
261
+ /**
262
+ * Alle Belege eines Tages oder Zeitraums, Seite fuer Seite: holt mit
263
+ * [listReceipts] die erste Seite, dann mit `cursor: nextCursor` und
264
+ * demselben Zeitfenster, `order` und `view` jede weitere, und liefert jeden
265
+ * Beleg einzeln, in der Reihenfolge des Servers. Jeder Beleg des Fensters
266
+ * kommt genau einmal.
267
+ *
268
+ * Ohne `limit` holt der Helfer Seiten zu 500 (weniger Aufrufe als die
269
+ * Vorgabe 100 des Servers). Mit `cursor` setzt er an dieser Stelle fort.
270
+ *
271
+ * Ein Fehler auf irgendeiner Seite bricht ab (der Fehler kommt im
272
+ * `for await` an); die bis dahin gelieferten Belege bleiben gueltig. Nach
273
+ * [LIST_ALL_RECEIPTS_MAX_PAGES] Seiten, oder wenn der Server denselben
274
+ * Cursor zweimal nennt, bricht er mit [KasseneckValidationError]
275
+ * (`scope: 'response'`) ab, statt endlos zu laufen.
276
+ *
277
+ * `daySummary` liefert der Helfer nicht; wer sie braucht, ruft die erste
278
+ * Seite mit [listReceipts].
279
+ */
280
+ async function* listAllReceipts(transport, options) {
281
+ // Frueh pruefen: ein Eingabefehler kommt beim ersten Schritt an, vor jedem Aufruf.
282
+ parameter(options);
283
+ const grund = { ...options, limit: options.limit ?? exports.LIST_RECEIPTS_LIMIT_MAX };
284
+ let cursor = options.cursor;
285
+ const gesehen = new Set();
286
+ for (let seite = 1; seite <= exports.LIST_ALL_RECEIPTS_MAX_PAGES; seite++) {
287
+ const page = await listReceipts(transport, { ...grund, cursor });
288
+ yield* page.receipts;
289
+ if (!page.hasMore)
290
+ return;
291
+ const weiter = page.nextCursor;
292
+ if (gesehen.has(weiter) || weiter === cursor)
293
+ throw antwortfehler('Server nennt denselben Cursor erneut; Abbruch statt Endlosschleife');
294
+ gesehen.add(weiter);
295
+ cursor = weiter;
296
+ }
297
+ throw antwortfehler(`mehr als ${exports.LIST_ALL_RECEIPTS_MAX_PAGES} Seiten; Zeitfenster kleiner waehlen`);
298
+ }
@@ -1,6 +1,6 @@
1
1
  export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
2
2
  export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
- export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
3
+ export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
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 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
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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
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.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.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 = void 0;
6
- exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = void 0;
5
+ exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = 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.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 = 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 = void 0;
7
7
  var index_js_1 = require("./enums/index.js");
8
8
  Object.defineProperty(exports, "ReceiptType", { enumerable: true, get: function () { return index_js_1.ReceiptType; } });
9
9
  Object.defineProperty(exports, "VatRate", { enumerable: true, get: function () { return index_js_1.VatRate; } });
@@ -139,6 +139,15 @@ Object.defineProperty(exports, "downloadDailyReport", { enumerable: true, get: f
139
139
  Object.defineProperty(exports, "downloadMonthlyReport", { enumerable: true, get: function () { return index_js_3.downloadMonthlyReport; } });
140
140
  Object.defineProperty(exports, "getCashregisterReport", { enumerable: true, get: function () { return index_js_3.getCashregisterReport; } });
141
141
  Object.defineProperty(exports, "getReportV2", { enumerable: true, get: function () { return index_js_3.getReportV2; } });
142
+ Object.defineProperty(exports, "listReceipts", { enumerable: true, get: function () { return index_js_3.listReceipts; } });
143
+ Object.defineProperty(exports, "listAllReceipts", { enumerable: true, get: function () { return index_js_3.listAllReceipts; } });
144
+ Object.defineProperty(exports, "fromListReceiptsSummaryPayload", { enumerable: true, get: function () { return index_js_3.fromListReceiptsSummaryPayload; } });
145
+ Object.defineProperty(exports, "LIST_RECEIPTS_VIEWS", { enumerable: true, get: function () { return index_js_3.LIST_RECEIPTS_VIEWS; } });
146
+ Object.defineProperty(exports, "LIST_RECEIPTS_ORDERS", { enumerable: true, get: function () { return index_js_3.LIST_RECEIPTS_ORDERS; } });
147
+ Object.defineProperty(exports, "LIST_RECEIPTS_LIMIT_MAX", { enumerable: true, get: function () { return index_js_3.LIST_RECEIPTS_LIMIT_MAX; } });
148
+ Object.defineProperty(exports, "LIST_RECEIPTS_DAYS_MAX", { enumerable: true, get: function () { return index_js_3.LIST_RECEIPTS_DAYS_MAX; } });
149
+ Object.defineProperty(exports, "LIST_ALL_RECEIPTS_MAX_PAGES", { enumerable: true, get: function () { return index_js_3.LIST_ALL_RECEIPTS_MAX_PAGES; } });
150
+ Object.defineProperty(exports, "LIST_RECEIPTS_ERROR_CODES", { enumerable: true, get: function () { return index_js_3.LIST_RECEIPTS_ERROR_CODES; } });
142
151
  Object.defineProperty(exports, "getCashboxStatus", { enumerable: true, get: function () { return index_js_3.getCashboxStatus; } });
143
152
  Object.defineProperty(exports, "getSignatureStatus", { enumerable: true, get: function () { return index_js_3.getSignatureStatus; } });
144
153
  Object.defineProperty(exports, "createKasseneckApi", { enumerable: true, get: function () { return index_js_3.createKasseneckApi; } });
@@ -27,7 +27,7 @@ export type InvoiceEndpoint = (typeof INVOICE_ENDPOINTS)[number];
27
27
  * Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
28
28
  * aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
29
29
  */
30
- export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active"];
30
+ export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken"];
31
31
  export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
32
32
  /**
33
33
  * Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
@@ -80,6 +80,8 @@ exports.INVOICE_ERROR_CODES = [
80
80
  'reservation_not_found', // unbekannt oder einem anderen Konto
81
81
  'reservation_mismatch', // keine offene Position mit gleichem Artikel am Lagerstandort der Rechnung
82
82
  'reservation_not_active', // schon eingeloest oder freigegeben
83
+ // Seit 1.15.0 (Vertrag): die Rechnungsnummer ist schon vergeben (§ 11 Abs. 1 Z 3 lit. h UStG), nichts ausgestellt.
84
+ 'invoice_number_taken',
83
85
  ];
84
86
  /**
85
87
  * Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
@@ -16,7 +16,7 @@ import { KasseneckApiError } from '../client/errors.js';
16
16
  * ...) stehen in [PAYMENT_ERROR_CODES]. Ein Code ausserhalb bleibt ueber
17
17
  * `KasseneckApiError.code` lesbar.
18
18
  */
19
- export declare const RECEIPT_ERROR_CODES: readonly ["cancellation_reference_unavailable", "cashregister_closed", "cashregister_decommissioned", "final_receipt_expired", "final_receipt_not_allowed", "module_inactive", "not_permitted", "receipt_limit_exceeded", "receipt_not_found", "receipt_outcome_unknown", "receipt_type_invalid", "server_error", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "voucher_balance_changed", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing", "response_unreadable"];
19
+ export declare const RECEIPT_ERROR_CODES: readonly ["cancellation_reference_unavailable", "cashregister_closed", "cashregister_decommissioned", "final_receipt_expired", "final_receipt_not_allowed", "idempotency_conflict", "module_inactive", "not_permitted", "receipt_limit_exceeded", "receipt_not_found", "receipt_outcome_unknown", "receipt_type_invalid", "server_error", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "voucher_balance_changed", "account_not_found", "action_confirmation_required", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "password_change_required", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing", "response_unreadable"];
20
20
  export type ReceiptErrorCode = (typeof RECEIPT_ERROR_CODES)[number];
21
21
  export declare function isReceiptErrorCode(value: unknown): value is ReceiptErrorCode;
22
22
  /** Der Code eines geworfenen Fehlers, wenn er in [RECEIPT_ERROR_CODES] steht; sonst `undefined`. */
@@ -29,6 +29,9 @@ exports.RECEIPT_ERROR_CODES = Object.freeze([
29
29
  'cashregister_decommissioned',
30
30
  'final_receipt_expired',
31
31
  'final_receipt_not_allowed',
32
+ // Seit 1.15.0 (Vertrag): derselbe idempotencyKey mit anderem Inhalt, nichts geschrieben. Der Server nimmt den
33
+ // Schluessel optional an; dieses Paket sendet (noch) keinen, der Code bleibt damit nur lesbar.
34
+ 'idempotency_conflict',
32
35
  'module_inactive',
33
36
  'not_permitted',
34
37
  'receipt_limit_exceeded',
@@ -1,5 +1,5 @@
1
1
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
2
- export declare const VOKABULAR_QUELLE = "328c8d0ff0f496f8f6b7d9ed78673e7666980e38586ec7efacb442e6906d898a";
2
+ export declare const VOKABULAR_QUELLE = "d11de425770bc431be9766199e4c9b3e712eb8e0eea84658f771a0f79d98e90e";
3
3
  /** Schema-Notation des Vertrags: Blatt 'aussen': 'innen', Objekt { __: 'innen', ... }, Liste [ { __: 'innen', ... } ]. */
4
4
  export type SchemaEintrag = string | SchemaObjekt | readonly [SchemaObjekt];
5
5
  export interface SchemaObjekt {
@@ -4,7 +4,7 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
6
6
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
7
- exports.VOKABULAR_QUELLE = "328c8d0ff0f496f8f6b7d9ed78673e7666980e38586ec7efacb442e6906d898a";
7
+ exports.VOKABULAR_QUELLE = "d11de425770bc431be9766199e4c9b3e712eb8e0eea84658f771a0f79d98e90e";
8
8
  /** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
9
9
  exports.SCHEMAS = {
10
10
  "getReceipt": {
@@ -205,7 +205,19 @@ exports.SCHEMAS = {
205
205
  "__": "gutscheine",
206
206
  "sale": "verkauf",
207
207
  "valueVoucherType": "wertArt",
208
- "vatRateBp": "satzBp"
208
+ "vatRateBp": "satzBp",
209
+ "label": {
210
+ "__": "etikett",
211
+ "size": "groesse",
212
+ "fields": {
213
+ "__": "felder",
214
+ "business": "betrieb",
215
+ "value": "wert",
216
+ "validity": "gueltigkeit",
217
+ "checkPage": "pruefseite"
218
+ },
219
+ "freeText": "freitext"
220
+ }
209
221
  }
210
222
  },
211
223
  "werte": {
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export declare const PACKAGE_VERSION = "1.14.0";
7
+ export declare const PACKAGE_VERSION = "1.16.0";
@@ -7,4 +7,4 @@ exports.PACKAGE_VERSION = void 0;
7
7
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
8
8
  * beim Anheben der Version beide Stellen aendern.
9
9
  */
10
- exports.PACKAGE_VERSION = '1.14.0';
10
+ exports.PACKAGE_VERSION = '1.16.0';
@@ -4,6 +4,7 @@ import { type HobexPayOptions, type HobexRefundOptions } from '../payments/hobex
4
4
  import { type TransportOptions } from './transport.js';
5
5
  import { type CashregisterReportPeriod, type ReportV2, type ReportV2Options } from './reports.js';
6
6
  import { type CashboxStatus, type SignatureStatus } from './status.js';
7
+ import { type ListedReceipt, type ListReceiptsOptions, type ListReceiptsPage, type ListReceiptsView } from './list-receipts.js';
7
8
  import { type SendReceiptEmailOptions, type SendReceiptEmailResult, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type ListMyReceiptsOptions, type ReceiptList, type ReceiptWithCompany, type SellReceiptOptions, type CancelReceiptOptions, type CancelReceiptResult } from './receipts.js';
8
9
  /**
9
10
  * Schlichte Factory ueber den Endpunkt-Funktionen: bindet einen Transport
@@ -56,6 +57,10 @@ export interface KasseneckApi {
56
57
  listMyCashregisters(): Promise<Cashregister[]>;
57
58
  /** Rohdaten eines Zeitraums: Belege und Firmendaten (`getReportV2`). */
58
59
  getReportV2(options: ReportV2Options): Promise<ReportV2>;
60
+ /** Eine Seite Belege eines Tages oder Zeitraums (`listReceipts`, hoechstens 31 Tage, blaetterbar). */
61
+ listReceipts<V extends ListReceiptsView = 'summary'>(options: ListReceiptsOptions<V>): Promise<ListReceiptsPage<V>>;
62
+ /** Alle Belege eines Tages oder Zeitraums, Seite fuer Seite geholt (hoechstens 100 Seiten). */
63
+ listAllReceipts<V extends ListReceiptsView = 'summary'>(options: ListReceiptsOptions<V>): AsyncGenerator<ListedReceipt<V>, void, undefined>;
59
64
  /** Kassenbericht als PDF (v2): abgeschlossener Monat, Tag oder Zeitraum (Endpunkt `getCashregisterReport`). */
60
65
  getCashregisterReport(options: CashregisterReportPeriod): Promise<Uint8Array>;
61
66
  /** @deprecated Since 1.10.0: use getCashregisterReport. Tagesbericht als PDF (Kalendertag nach Wiener Zeit). */
@@ -3,6 +3,7 @@ import { hobexPay, hobexRefund } from '../payments/hobex.js';
3
3
  import { createTransport, createBinaryTransport } from './transport.js';
4
4
  import { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2 } from './reports.js';
5
5
  import { getCashboxStatus, getSignatureStatus } from './status.js';
6
+ import { listAllReceipts, listReceipts } from './list-receipts.js';
6
7
  import { sellReceipt, sellReceiptWithCompany, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, sendReceiptEmail, logReceiptOutputs, } from './receipts.js';
7
8
  import { listMyCashregisters } from './cashregisters.js';
8
9
  import { renewRegisterSession, endRegisterSession } from '../register/session.js';
@@ -25,6 +26,8 @@ export function createKasseneckApi(options) {
25
26
  logReceiptOutputs: (o) => logReceiptOutputs(rufen, o),
26
27
  listMyCashregisters: () => listMyCashregisters(rufen),
27
28
  getReportV2: (o) => getReportV2(rufen, o),
29
+ listReceipts: (o) => listReceipts(rufen, o),
30
+ listAllReceipts: (o) => listAllReceipts(rufen, o),
28
31
  getCashregisterReport: (options) => getCashregisterReport(rufenBinaer, options),
29
32
  downloadDailyReport: (date) => downloadDailyReport(rufenBinaer, date),
30
33
  downloadMonthlyReport: (reportMonth) => downloadMonthlyReport(rufenBinaer, reportMonth),
@@ -13,7 +13,7 @@
13
13
  * umhuellt, muss ihn weiterhin absetzen koennen.
14
14
  */
15
15
  import type { PdfOrData, TransportBodyFields, TransportCallOptions } from './transport.js';
16
- export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "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", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "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", "logReceiptOutputs"];
16
+ export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "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", "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", "logReceiptOutputs"];
17
17
  export type ApiCall = typeof ALL_CALLS[number];
18
18
  /**
19
19
  * Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
@@ -21,7 +21,7 @@ export type ApiCall = typeof ALL_CALLS[number];
21
21
  * (`fixtures/v3/v3-vokabular.json`, `endpoints.public`, umbenannt nach
22
22
  * `names`). Ein Test haelt beide Listen deckungsgleich.
23
23
  */
24
- export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "cancelReceipt", "sendReceiptEmail", "generateFullReceiptId", "downloadReceipt", "getFirstReceiptDate", "getReportV2", "downloadReport", "downloadDailyReport", "getCashregisterReport", "createPaymentLinkStripe", "stripeCaptureIntent", "hobexPayApi", "hobexRefundApi", "hobexGetStatus", "financeWebService", "listMyTipRecipients", "getPartnerInfo", "createPartnerCustomer", "checkPartnerCustomerEmail", "listPartnerCustomers", "getPartnerCustomer", "sendPartnerCustomerFonLink", "createPartnerWebhook", "updatePartnerWebhook", "deletePartnerWebhook", "listPartnerWebhooks", "sendPartnerWebhookTest", "rotatePartnerWebhookSecret", "listPartnerWebhookDeliveries", "requestCustomerSignature", "getCustomerSignatureStatus", "createCustomerCashregister", "activateCashregister", "listCustomerCashregisters", "getCustomerCredentials", "reportCustomerContract", "getPartnerBilling", "getPartnerBillingMonth", "createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml", "getInvoiceSetupStatus", "listBrands", "recordInvoicePayment", "createInvoiceItem", "updateInvoiceItem", "withdrawInvoiceItem", "getInvoiceItem", "listInvoiceItems", "setCustomerMandate", "revokeCustomerMandate", "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"];
24
+ export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "cancelReceipt", "sendReceiptEmail", "generateFullReceiptId", "downloadReceipt", "getFirstReceiptDate", "getReportV2", "downloadReport", "downloadDailyReport", "getCashregisterReport", "createPaymentLinkStripe", "stripeCaptureIntent", "hobexPayApi", "hobexRefundApi", "hobexGetStatus", "financeWebService", "listMyTipRecipients", "getPartnerInfo", "createPartnerCustomer", "checkPartnerCustomerEmail", "listPartnerCustomers", "getPartnerCustomer", "sendPartnerCustomerFonLink", "createPartnerWebhook", "updatePartnerWebhook", "deletePartnerWebhook", "listPartnerWebhooks", "sendPartnerWebhookTest", "rotatePartnerWebhookSecret", "listPartnerWebhookDeliveries", "requestCustomerSignature", "getCustomerSignatureStatus", "createCustomerCashregister", "activateCashregister", "listCustomerCashregisters", "getCustomerCredentials", "reportCustomerContract", "getPartnerBilling", "getPartnerBillingMonth", "createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml", "getInvoiceSetupStatus", "listBrands", "recordInvoicePayment", "createInvoiceItem", "updateInvoiceItem", "withdrawInvoiceItem", "getInvoiceItem", "listInvoiceItems", "setCustomerMandate", "revokeCustomerMandate", "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", "listReceipts"];
25
25
  /**
26
26
  * Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
27
27
  * Web-Kasse: gleicher Ursprung `/api/v3`), in der Reihenfolge von
@@ -49,6 +49,7 @@ export const ALL_CALLS = [
49
49
  'listPartnerCustomers',
50
50
  'listPartnerWebhookDeliveries',
51
51
  'listPartnerWebhooks',
52
+ 'listReceipts',
52
53
  'listRegisterUsersForDevice',
53
54
  'listRegisterSessionsForDevice',
54
55
  'pairRegisterDevice',
@@ -262,6 +263,8 @@ export const PUBLIC_CALLS = [
262
263
  'getStocktakePdf',
263
264
  'orderSignatureCard',
264
265
  'getSignatureCardOrder',
266
+ // Belege einer Kasse auflisten, nur unter /v3 (Nachfolger von getReportV2 fuer Listen).
267
+ 'listReceipts',
265
268
  ];
266
269
  /**
267
270
  * Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
@@ -489,6 +492,7 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
489
492
  listPartnerCustomers: 'read',
490
493
  listPartnerWebhookDeliveries: 'read',
491
494
  listPartnerWebhooks: 'read',
495
+ listReceipts: 'read',
492
496
  listRegisterSessionsForDevice: 'read',
493
497
  listRegisterUsersForDevice: 'read',
494
498
  listReservations: 'read',
@@ -4,6 +4,7 @@ export { ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS
4
4
  export { KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, } from './errors.js';
5
5
  export { type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, type CancelReceiptResult, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, } from './receipts.js';
6
6
  export { listMyCashregisters } from './cashregisters.js';
7
+ export { listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, } from './list-receipts.js';
7
8
  export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, type CashregisterReportPeriod, type ReportV2, type ReportV2Metadata, type ReportV2Options } from './reports.js';
8
9
  export { type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, } from './status.js';
9
10
  export { type KasseneckApi, createKasseneckApi } from './api.js';
@@ -4,6 +4,7 @@ export { ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, } from './au
4
4
  export { KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, } from './errors.js';
5
5
  export { sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, } from './receipts.js';
6
6
  export { listMyCashregisters } from './cashregisters.js';
7
+ export { listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, } from './list-receipts.js';
7
8
  export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2 } from './reports.js';
8
9
  export { getCashboxStatus, getSignatureStatus, } from './status.js';
9
10
  export { createKasseneckApi } from './api.js';