@kreiseck/kasseneck-api 1.7.1 → 1.10.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 (125) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/README.md +170 -1
  3. package/dist/cjs/client/api.d.ts +5 -3
  4. package/dist/cjs/client/api.js +1 -0
  5. package/dist/cjs/client/aufrufe.d.ts +9 -7
  6. package/dist/cjs/client/aufrufe.js +60 -2
  7. package/dist/cjs/client/errors.js +3 -0
  8. package/dist/cjs/client/index.d.ts +2 -2
  9. package/dist/cjs/client/index.js +3 -1
  10. package/dist/cjs/client/reports.d.ts +26 -0
  11. package/dist/cjs/client/reports.js +47 -0
  12. package/dist/cjs/client/transport.d.ts +27 -3
  13. package/dist/cjs/client/transport.js +29 -3
  14. package/dist/cjs/index.d.ts +1 -1
  15. package/dist/cjs/index.js +4 -2
  16. package/dist/cjs/inventory/api.d.ts +21 -2
  17. package/dist/cjs/inventory/api.js +22 -3
  18. package/dist/cjs/inventory/fehler.d.ts +6 -0
  19. package/dist/cjs/inventory/fehler.js +12 -0
  20. package/dist/cjs/inventory/index.d.ts +6 -4
  21. package/dist/cjs/inventory/index.js +33 -3
  22. package/dist/cjs/inventory/inventur.d.ts +104 -0
  23. package/dist/cjs/inventory/inventur.js +245 -0
  24. package/dist/cjs/inventory/lesen.d.ts +20 -1
  25. package/dist/cjs/inventory/lesen.js +307 -0
  26. package/dist/cjs/inventory/typen.d.ts +410 -1
  27. package/dist/cjs/inventory/vertrag.d.ts +94 -8
  28. package/dist/cjs/inventory/vertrag.js +118 -5
  29. package/dist/cjs/invoice/index.d.ts +1 -1
  30. package/dist/cjs/invoice/typen.d.ts +12 -0
  31. package/dist/cjs/invoice/vertrag.d.ts +1 -1
  32. package/dist/cjs/invoice/vertrag.js +3 -0
  33. package/dist/cjs/models/cancellation.d.ts +1 -1
  34. package/dist/cjs/models/cancellation.js +3 -0
  35. package/dist/cjs/models/payment-errors.d.ts +1 -1
  36. package/dist/cjs/models/payment-errors.js +3 -0
  37. package/dist/cjs/models/receipt-email.d.ts +1 -1
  38. package/dist/cjs/models/receipt-email.js +3 -0
  39. package/dist/cjs/models/receipt-errors.d.ts +1 -1
  40. package/dist/cjs/models/receipt-errors.js +3 -0
  41. package/dist/cjs/pos/errors.d.ts +4 -3
  42. package/dist/cjs/pos/errors.js +24 -2
  43. package/dist/cjs/pos/index.d.ts +4 -1
  44. package/dist/cjs/pos/index.js +9 -2
  45. package/dist/cjs/pos/inventur.d.ts +104 -0
  46. package/dist/cjs/pos/inventur.js +117 -0
  47. package/dist/cjs/pos/texte.d.ts +82 -0
  48. package/dist/cjs/pos/texte.js +35 -0
  49. package/dist/cjs/register/errors.d.ts +1 -1
  50. package/dist/cjs/register/errors.js +3 -0
  51. package/dist/cjs/stored/vokabular.d.ts +1 -1
  52. package/dist/cjs/stored/vokabular.js +1 -1
  53. package/dist/cjs/version.d.ts +1 -1
  54. package/dist/cjs/version.js +1 -1
  55. package/dist/esm/client/api.d.ts +5 -3
  56. package/dist/esm/client/api.js +2 -1
  57. package/dist/esm/client/aufrufe.d.ts +9 -7
  58. package/dist/esm/client/aufrufe.js +60 -2
  59. package/dist/esm/client/errors.js +3 -0
  60. package/dist/esm/client/index.d.ts +2 -2
  61. package/dist/esm/client/index.js +2 -2
  62. package/dist/esm/client/reports.d.ts +26 -0
  63. package/dist/esm/client/reports.js +46 -0
  64. package/dist/esm/client/transport.d.ts +27 -3
  65. package/dist/esm/client/transport.js +28 -3
  66. package/dist/esm/index.d.ts +1 -1
  67. package/dist/esm/index.js +1 -1
  68. package/dist/esm/inventory/api.d.ts +21 -2
  69. package/dist/esm/inventory/api.js +23 -4
  70. package/dist/esm/inventory/fehler.d.ts +6 -0
  71. package/dist/esm/inventory/fehler.js +11 -0
  72. package/dist/esm/inventory/index.d.ts +6 -4
  73. package/dist/esm/inventory/index.js +5 -3
  74. package/dist/esm/inventory/inventur.d.ts +104 -0
  75. package/dist/esm/inventory/inventur.js +226 -0
  76. package/dist/esm/inventory/lesen.d.ts +20 -1
  77. package/dist/esm/inventory/lesen.js +301 -0
  78. package/dist/esm/inventory/typen.d.ts +410 -1
  79. package/dist/esm/inventory/vertrag.d.ts +94 -8
  80. package/dist/esm/inventory/vertrag.js +117 -4
  81. package/dist/esm/invoice/index.d.ts +1 -1
  82. package/dist/esm/invoice/typen.d.ts +12 -0
  83. package/dist/esm/invoice/vertrag.d.ts +1 -1
  84. package/dist/esm/invoice/vertrag.js +3 -0
  85. package/dist/esm/models/cancellation.d.ts +1 -1
  86. package/dist/esm/models/cancellation.js +3 -0
  87. package/dist/esm/models/payment-errors.d.ts +1 -1
  88. package/dist/esm/models/payment-errors.js +3 -0
  89. package/dist/esm/models/receipt-email.d.ts +1 -1
  90. package/dist/esm/models/receipt-email.js +3 -0
  91. package/dist/esm/models/receipt-errors.d.ts +1 -1
  92. package/dist/esm/models/receipt-errors.js +3 -0
  93. package/dist/esm/pos/errors.d.ts +4 -3
  94. package/dist/esm/pos/errors.js +24 -2
  95. package/dist/esm/pos/index.d.ts +4 -1
  96. package/dist/esm/pos/index.js +2 -1
  97. package/dist/esm/pos/inventur.d.ts +104 -0
  98. package/dist/esm/pos/inventur.js +109 -0
  99. package/dist/esm/pos/texte.d.ts +82 -0
  100. package/dist/esm/pos/texte.js +35 -0
  101. package/dist/esm/register/errors.d.ts +1 -1
  102. package/dist/esm/register/errors.js +3 -0
  103. package/dist/esm/stored/vokabular.d.ts +1 -1
  104. package/dist/esm/stored/vokabular.js +1 -1
  105. package/dist/esm/version.d.ts +1 -1
  106. package/dist/esm/version.js +1 -1
  107. package/fixtures/hobex-hps-codes.json +1 -1
  108. package/fixtures/invoice-api.schema.json +1 -1
  109. package/fixtures/invoice-texts.json +1 -1
  110. package/fixtures/pos-texts.json +94 -1
  111. package/fixtures/stocktake-quantity-cases.json +55 -0
  112. package/fixtures/surface.json +157 -8
  113. package/fixtures/v3/antworten/belege.json +1 -1
  114. package/fixtures/v3/antworten/belegmail.json +1 -1
  115. package/fixtures/v3/antworten/kasse-belege.json +1 -1
  116. package/fixtures/v3/antworten/kasse.json +2958 -3
  117. package/fixtures/v3/antworten/lager.json +1727 -3
  118. package/fixtures/v3/antworten/rechnungen.json +14 -6
  119. package/fixtures/v3/antworten/storno.json +1 -1
  120. package/fixtures/v3/stored/belege.json +1 -1
  121. package/fixtures/v3/stored/kasse.json +414 -3
  122. package/fixtures/v3/stored/rechnungen.json +1 -1
  123. package/fixtures/v3/v3-vokabular.json +530 -8
  124. package/fixtures/v3/zahlbetrag-faelle.json +1 -1
  125. package/package.json +1 -1
@@ -1,20 +1,22 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Der Vertrag der Lager-API (Backend Stufe 5a lesen, 5b schreiben und
4
- * reservieren, 5c Varianten) als Daten: Endpunkte, Wertkataloge, Ereignisse, Fehler- und
5
- * Hinweiscodes, englisch wie am Draht `/v3`.
4
+ * reservieren, 5c Varianten, Lager-Kern Stufe 3 Inventur) als Daten:
5
+ * Endpunkte, Wertkataloge, Ereignisse, Fehler- und Hinweiscodes, englisch wie
6
+ * am Draht `/v3`.
6
7
  *
7
8
  * Quelle ist der Vertrags-Export des Backends (`fixtures/v3/v3-vokabular.json`):
8
9
  * `endpoints.public`, die Kataloge `STANDORT_TYP`, `BEWEGUNG_ART`,
9
10
  * `BEWEGUNG_QUELLE`, `LAGER_ZUSTAND`, `LAGER_URSACHE`, `ZUSTELLUNG`,
10
11
  * `LAGER_ABGANG_GRUND`, `LAGER_ENTNAHME_ART`, `LAGER_NEBENKOSTEN_ART`,
11
- * `LAGER_VERTEILUNG`, `RESERVIERUNG_STATUS`, dazu `events`, `errorCodes.inventory`
12
+ * `LAGER_VERTEILUNG`, `RESERVIERUNG_STATUS`, die Inventur-Kataloge `INVENTUR_*`,
13
+ * dazu `events`, `errorCodes.inventory`
12
14
  * und `warningCodes.inventory`. `test/inventory.test.ts` haelt jede Liste
13
15
  * deckungsgleich mit dieser Datei; nichts hier wird geraten.
14
16
  */
15
17
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.VARIANT_GROUP_ACTIVE_MAX = exports.VARIANT_MATRIX_MAX = exports.VARIANT_VALUES_MAX = exports.VARIANT_ATTRIBUTES_MAX = exports.RESERVATION_MINUTES_MAX = exports.RESERVATION_MINUTES_MIN = exports.INVENTORY_IDEMPOTENCY_KEY_MAX = exports.RESERVATION_STATUSES = exports.LANDED_COST_ALLOCATIONS = exports.LANDED_COST_TYPES = exports.WITHDRAWAL_TYPES = exports.STOCK_LOSS_REASONS = exports.STOCK_KINDS = exports.INVENTORY_WARNING_CODES = exports.INVENTORY_REQUEST_ERROR_CODES = exports.INVENTORY_ERROR_CODES = exports.INVENTORY_LIST_LIMIT_MAX = exports.INVENTORY_WEBHOOK_LIMIT = exports.INVENTORY_WEBHOOK_ENVELOPE_FIELDS = exports.INVENTORY_WEBHOOK_EVENTS = exports.WEBHOOK_DELIVERY_STATUSES = exports.STOCK_CHANGE_CAUSES = exports.STOCK_CONDITIONS = exports.STOCK_MOVEMENT_SOURCES = exports.STOCK_MOVEMENT_TYPES = exports.LOCATION_TYPES = exports.INVENTORY_ENDPOINTS = void 0;
17
- /** Die 32 Endpunkte (14 aus 5a, 13 aus 5b, 5 aus 5c), in der Reihenfolge von `endpoints.public`. */
18
+ exports.STOCKTAKE_COUNTS_PER_ITEM_MAX = exports.STOCKTAKE_RECOUNT_ITEMS_MAX = exports.STOCKTAKE_ITEMS_MAX = exports.STOCKTAKE_INVENTORY_AS_OF = exports.STOCKTAKE_ACTOR_TYPES = exports.STOCKTAKE_SOURCES = exports.STOCKTAKE_NOT_BOOKED_REASONS = exports.STOCKTAKE_CHECK_REASONS = exports.STOCKTAKE_SCOPE_TYPES = exports.STOCKTAKE_TYPES = exports.STOCKTAKE_STATUSES = exports.VARIANT_GROUP_ACTIVE_MAX = exports.VARIANT_MATRIX_MAX = exports.VARIANT_VALUES_MAX = exports.VARIANT_ATTRIBUTES_MAX = exports.RESERVATION_MINUTES_MAX = exports.RESERVATION_MINUTES_MIN = exports.INVENTORY_IDEMPOTENCY_KEY_MAX = exports.RESERVATION_STATUSES = exports.LANDED_COST_ALLOCATIONS = exports.LANDED_COST_TYPES = exports.WITHDRAWAL_TYPES = exports.STOCK_LOSS_REASONS = exports.STOCK_KINDS = exports.INVENTORY_WARNING_CODES = exports.INVENTORY_REQUEST_ERROR_CODES = exports.INVENTORY_ERROR_CODES = exports.INVENTORY_LIST_LIMIT_MAX = exports.INVENTORY_WEBHOOK_LIMIT = exports.INVENTORY_WEBHOOK_ENVELOPE_FIELDS = exports.INVENTORY_WEBHOOK_EVENTS = exports.WEBHOOK_DELIVERY_STATUSES = exports.STOCK_CHANGE_CAUSES = exports.STOCK_CONDITIONS = exports.STOCK_MOVEMENT_SOURCES = exports.STOCK_MOVEMENT_TYPES = exports.LOCATION_TYPES = exports.INVENTORY_ENDPOINTS = void 0;
19
+ /** Die 44 Endpunkte (14 aus 5a, 13 aus 5b, 5 aus 5c, 12 der Inventur), in der Reihenfolge von `endpoints.public`. */
18
20
  exports.INVENTORY_ENDPOINTS = [
19
21
  'getArticle',
20
22
  'listArticles',
@@ -48,6 +50,18 @@ exports.INVENTORY_ENDPOINTS = [
48
50
  'getVariantGroup',
49
51
  'listVariantGroups',
50
52
  'addVariant',
53
+ 'createStocktake',
54
+ 'listStocktakes',
55
+ 'getStocktake',
56
+ 'listStocktakeItems',
57
+ 'recordStocktakeCount',
58
+ 'voidStocktakeCount',
59
+ 'listStocktakeCounts',
60
+ 'reviewStocktake',
61
+ 'recountStocktake',
62
+ 'closeStocktake',
63
+ 'cancelStocktake',
64
+ 'getStocktakePdf',
51
65
  ];
52
66
  /** Art eines Standorts (Katalog `STANDORT_TYP`). */
53
67
  exports.LOCATION_TYPES = ['warehouse', 'store', 'vehicle', 'other'];
@@ -177,6 +191,22 @@ exports.INVENTORY_LIST_LIMIT_MAX = 200;
177
191
  * `too_many_positions` traegt bei Varianten `field` (`variants`,
178
192
  * `createMatrix` bzw. `externalIds` bei `addVariant`): die Anfrage braeuchte
179
193
  * mehr Schreibvorgaenge, als in einen Vorgang passen; geschrieben wurde nichts.
194
+ *
195
+ * Seit 1.8.0 dahinter die Codes der Inventur: `stocktake_not_found`,
196
+ * `stocktake_not_open` (Zaehlen oder Stornieren ausserhalb der Zaehlung bzw.
197
+ * an einer Position, die nicht zum Nachzaehlen frei ist), `stocktake_closed`
198
+ * (abgeschlossen oder abgebrochen: nichts mehr schreibbar),
199
+ * `stocktake_not_in_review` (Nachzaehlen und Abschluss nur in `review`),
200
+ * `stocktake_closing` (der Abschluss bucht gerade), `stocktake_location_busy`
201
+ * (am Standort laeuft schon eine Inventur; `data.stocktakeId` nennt sie),
202
+ * `stocktake_review_running` (die Pruefung rechnet noch), `stocktake_recount_open`
203
+ * (Abschluss, solange Positionen zum Nachzaehlen offen sind: erst nachzaehlen,
204
+ * dann erneut pruefen), `article_not_in_scope`, `article_not_tracked`,
205
+ * `count_not_found`, `count_already_voided`, `serial_already_counted` (dieselbe
206
+ * Seriennummer zweimal in einer Runde), `too_many_counts` (mehr als
207
+ * [STOCKTAKE_COUNTS_PER_ITEM_MAX] Zaehlungen je Position und Runde) und
208
+ * `stocktake_not_closed` (das Protokoll gibt es erst nach dem Abschluss, auch
209
+ * nicht fuer eine abgebrochene Inventur).
180
210
  */
181
211
  exports.INVENTORY_ERROR_CODES = [
182
212
  'validation',
@@ -245,6 +275,21 @@ exports.INVENTORY_ERROR_CODES = [
245
275
  'invalid_variant_attributes',
246
276
  'variant_group_inactive',
247
277
  'variant_limit',
278
+ 'stocktake_not_found',
279
+ 'stocktake_not_open',
280
+ 'stocktake_closed',
281
+ 'stocktake_not_in_review',
282
+ 'stocktake_closing',
283
+ 'stocktake_location_busy',
284
+ 'stocktake_review_running',
285
+ 'stocktake_recount_open',
286
+ 'article_not_in_scope',
287
+ 'article_not_tracked',
288
+ 'count_not_found',
289
+ 'count_already_voided',
290
+ 'serial_already_counted',
291
+ 'too_many_counts',
292
+ 'stocktake_not_closed',
248
293
  ];
249
294
  /**
250
295
  * Codes, die Anmeldung und Rand auf jedem Lager-Aufruf erzeugen koennen,
@@ -257,6 +302,8 @@ exports.INVENTORY_REQUEST_ERROR_CODES = [
257
302
  'account_not_found',
258
303
  'admin_required',
259
304
  'api_not_approved',
305
+ 'app_check_invalid',
306
+ 'app_check_missing',
260
307
  'cashregister_not_assigned',
261
308
  'cashregister_not_found',
262
309
  'cashregister_token_invalid',
@@ -267,6 +314,7 @@ exports.INVENTORY_REQUEST_ERROR_CODES = [
267
314
  'method_not_allowed',
268
315
  'mfa_required',
269
316
  'not_found',
317
+ 'password_change_required',
270
318
  'register_user_no_business',
271
319
  'register_user_not_allowed',
272
320
  'register_user_not_found',
@@ -286,12 +334,24 @@ exports.INVENTORY_REQUEST_ERROR_CODES = [
286
334
  * `below_minimum` misst am verfuegbaren Bestand (`onHand − reserved`) gegen den
287
335
  * Mindestbestand des Standorts, `reservation_exceeded` meldet eine Rechnung, die
288
336
  * mehr verkauft als reserviert war.
337
+ *
338
+ * Seit 1.8.0 die Hinweise der Inventur, je mit der Zahl der Positionen
339
+ * (`items`): `defect_capped` (eine Fehlmenge im Zustand `defective` reichte
340
+ * ueber den Defektbestand, der Rest blieb ungebucht), `uncounted_items` (nicht
341
+ * gezaehlt und darum nicht gebucht), `not_booked` (nicht oder nicht ganz
342
+ * gebucht, Grund an der Position, `notBooked`) und `recount_uncounted`
343
+ * (Positionen zum Nachzaehlen blieben ungezaehlt; die Antwort von
344
+ * `closeStocktake` traegt ihn).
289
345
  */
290
346
  exports.INVENTORY_WARNING_CODES = [
291
347
  'insufficient_stock',
292
348
  'below_minimum',
293
349
  'return_exceeds_sale',
294
350
  'reservation_exceeded',
351
+ 'defect_capped',
352
+ 'uncounted_items',
353
+ 'not_booked',
354
+ 'recount_uncounted',
295
355
  ];
296
356
  /**
297
357
  * Bestandsart eines Artikels (`stockKind`): `quantity` = Menge, `serial` =
@@ -337,3 +397,56 @@ exports.VARIANT_ATTRIBUTES_MAX = 3;
337
397
  exports.VARIANT_VALUES_MAX = 30;
338
398
  exports.VARIANT_MATRIX_MAX = 100;
339
399
  exports.VARIANT_GROUP_ACTIVE_MAX = 250;
400
+ // ---- Inventur (Lager-Kern Stufe 3, seit 1.8.0) ----------------------------------
401
+ /**
402
+ * Stand einer Inventur (Katalog `INVENTUR_STATUS`). Gezaehlt wird in
403
+ * `counting`; `review` rechnet Soll und Differenz (erst ab hier sichtbar,
404
+ * blind); `closing` bucht den Abschluss in Teilen; `closed` und `cancelled`
405
+ * sind endgueltig. `creating` steht nur, solange eine grosse Anlage ihre
406
+ * Positionen schreibt.
407
+ */
408
+ exports.STOCKTAKE_STATUSES = ['creating', 'counting', 'review', 'closing', 'closed', 'cancelled'];
409
+ /**
410
+ * Art einer Inventur (Katalog `INVENTUR_ART`): `key_date` zu einem Stichtag
411
+ * (`keyDate`), `perpetual` (permanente Inventur, ohne Stichtag).
412
+ */
413
+ exports.STOCKTAKE_TYPES = ['key_date', 'perpetual'];
414
+ /** Umfang einer Inventur (Katalog `INVENTUR_UMFANG`): alle bestandsgefuehrten Artikel des Standorts, Artikelgruppen oder genannte Artikel. */
415
+ exports.STOCKTAKE_SCOPE_TYPES = ['all', 'groups', 'articles'];
416
+ /**
417
+ * Warum eine Position in der Pruefung „pruefen“ traegt (Katalog
418
+ * `INVENTUR_PRUEFGRUND`): Bewegung zwischen der ersten und letzten Zaehlung,
419
+ * Zaehlung mehr als 10 Tage vom Stichtag, Seriennummern weichen ab, nicht gezaehlt.
420
+ */
421
+ exports.STOCKTAKE_CHECK_REASONS = ['movements_between_counts', 'far_from_key_date', 'serial_mismatch', 'not_counted'];
422
+ /**
423
+ * Warum eine Position nicht oder nicht ganz gebucht wurde (`notBooked.code`,
424
+ * Katalog `INVENTUR_NICHT_GEBUCHT`). Dazu kommen Codes, die schon englisch
425
+ * sind (`serial_not_in_stock`, `serial_already_exists`, `article_not_found`);
426
+ * das Modell laesst darum jeden Text stehen.
427
+ */
428
+ exports.STOCKTAKE_NOT_BOOKED_REASONS = ['serial_mismatch', 'recount_open', 'defect_capped'];
429
+ /** Woher eine Zaehlung bzw. Inventur kam (Katalog `INVENTUR_QUELLE`). */
430
+ exports.STOCKTAKE_SOURCES = ['register', 'panel', 'api'];
431
+ /** Wer handelte (Katalog `INVENTUR_AKTEUR`): Inhaber, Kasseneck-Admin, Kassen-Benutzer, API-Schluessel. */
432
+ exports.STOCKTAKE_ACTOR_TYPES = ['owner', 'admin', 'register_user', 'api'];
433
+ /**
434
+ * Zu welchem Zeitpunkt das Inventar im Protokoll steht (Katalog
435
+ * `INVENTUR_INVENTAR_ZUM`): `key_date` (auf das Ende des Stichtags
436
+ * fortgeschrieben, Abschluss nach dem Stichtag) oder `count_date` (Menge zur
437
+ * Aufnahme: permanente Inventur oder Abschluss vor dem Stichtag).
438
+ */
439
+ exports.STOCKTAKE_INVENTORY_AS_OF = ['key_date', 'count_date'];
440
+ /**
441
+ * Grenzen einer Inventur, wie das Backend sie prueft. Wie bei den Varianten
442
+ * prueft das Paket sie **nicht** vor dem Senden:
443
+ *
444
+ * - [STOCKTAKE_ITEMS_MAX] Positionen je Inventur (`too_many_positions`;
445
+ * groessere Bestaende in mehreren Inventuren nacheinander),
446
+ * - [STOCKTAKE_RECOUNT_ITEMS_MAX] Positionen je `recountStocktake`,
447
+ * - [STOCKTAKE_COUNTS_PER_ITEM_MAX] Zaehlungen je Position und Runde
448
+ * (`too_many_counts`), hoechstens so viele Seriennummern je Zaehlung.
449
+ */
450
+ exports.STOCKTAKE_ITEMS_MAX = 5000;
451
+ exports.STOCKTAKE_RECOUNT_ITEMS_MAX = 200;
452
+ exports.STOCKTAKE_COUNTS_PER_ITEM_MAX = 200;
@@ -14,7 +14,7 @@ export { createInvoiceApi, type InvoiceApi, type InvoiceApiOptions } from './api
14
14
  export { invoiceKeyAuth, type InvoiceKeyAuthOptions } from './auth.js';
15
15
  export { isInvoiceError, isInvoiceErrorCode, invoiceErrorCode, invoiceFieldErrors, type InvoiceApiErrorCode, type InvoiceFieldError, } from './fehler.js';
16
16
  export { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoice, getInvoicePdf, getInvoiceSetupStatus, getInvoiceXml, issueInvoice, listBrands, listInvoices, previewInvoice, recordInvoicePayment, searchCustomers, updateCustomer, } from './endpunkte.js';
17
- export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
17
+ export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceSupplyDateProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
18
18
  export { INVOICE_TEXTS, invoiceText, type InvoiceTextKey } from './texte.js';
19
19
  export { computeInvoiceTotals, ZERO_RATED_TAX_SCHEMES, type TotalsItem } from './summen.js';
20
20
  export { proratedPriceMicros, MAX_AMOUNT_CENTS, itemFromEuro, formatUnitPrice, CalcError, calculateInvoice, roundDiv, vatRateMapKey, formatVatRate, type CalcResult, type CalcErrorCode, type CalcOptions, type CalcItem, type RateTotal, type ItemConversion, type ConversionReason, type LineAmount, } from './calc.js';
@@ -277,6 +277,18 @@ export interface InvoiceVatIdProof {
277
277
  level: 1 | 2;
278
278
  /** Pruefcode fuer die oeffentliche Pruefseite (auf dem PDF als QR); `null`, wenn keiner vergeben wurde. */
279
279
  code: string | null;
280
+ /** `true`, wenn erst nach dem Leistungstag geprueft wurde (kein Nachweis am oder vor dem Leistungstag). */
281
+ afterSupplyDate: boolean;
282
+ /** Pruefung am oder vor dem Leistungstag (ohne Pruefcode); `null`, wenn es keine gibt. */
283
+ supplyDateProof: InvoiceSupplyDateProof | null;
284
+ }
285
+ /** Nachweis am oder vor dem Leistungstag: wann, wer, welche Stufe. */
286
+ export interface InvoiceSupplyDateProof {
287
+ /** Wiener Tag der Pruefung (`YYYY-MM-DD`). */
288
+ checkedOn: string;
289
+ source: 'finanzonline' | 'vies';
290
+ /** Stufe der Pruefung: 1 = nur UID, 2 = UID mit Name und Anschrift. */
291
+ level: 1 | 2;
280
292
  }
281
293
  /** Ausgestellt ohne Ergebnis der UID-Pruefung, das Risiko traegt der Aussteller. */
282
294
  export interface InvoiceVatIdRisk {
@@ -37,7 +37,7 @@ export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
37
37
  * genau der Katalog des Servers (das Backend vergleicht ihn mit dem Schema);
38
38
  * die Helfer in `./invoice` erkennen beide Listen.
39
39
  */
40
- export declare const INVOICE_REQUEST_ERROR_CODES: readonly ["account_not_found", "admin_required", "api_not_approved", "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", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing"];
40
+ export declare const INVOICE_REQUEST_ERROR_CODES: readonly ["account_not_found", "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", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing"];
41
41
  export type InvoiceRequestErrorCode = (typeof INVOICE_REQUEST_ERROR_CODES)[number];
42
42
  /** Gruende einer Gutschrift. Der Server druckt den deutschen Anzeigetext. */
43
43
  export declare const CREDIT_NOTE_REASONS: readonly ["cancellation", "price_reduction", "return", "incorrect_invoice", "other"];
@@ -93,6 +93,8 @@ exports.INVOICE_REQUEST_ERROR_CODES = [
93
93
  'account_not_found',
94
94
  'admin_required',
95
95
  'api_not_approved',
96
+ 'app_check_invalid',
97
+ 'app_check_missing',
96
98
  'cashregister_not_assigned',
97
99
  'cashregister_not_found',
98
100
  'cashregister_token_invalid',
@@ -103,6 +105,7 @@ exports.INVOICE_REQUEST_ERROR_CODES = [
103
105
  'method_not_allowed',
104
106
  'mfa_required',
105
107
  'not_found',
108
+ 'password_change_required',
106
109
  'register_user_no_business',
107
110
  'register_user_not_allowed',
108
111
  'register_user_not_found',
@@ -53,7 +53,7 @@ export declare function isReturnDisposition(value: unknown): value is ReturnDisp
53
53
  * [PAYMENT_ERROR_CODES]. Ein Code ausserhalb bleibt ueber
54
54
  * `KasseneckApiError.code` lesbar.
55
55
  */
56
- export declare const CANCELLATION_ERROR_CODES: readonly ["receipt_not_found", "receipt_type_not_cancellable", "training_receipt", "already_cancelled", "invalid_line", "quantity_exceeds_remaining", "unknown_reason", "note_too_long", "invalid_items", "cashregister_not_assigned", "not_permitted", "own_receipts_only", "cashregister_incomplete", "cancellation_failed", "cancellation_payments_required", "cancellation_refund_exceeds_payment", "cancellation_refund_reference_required", "cancellation_refund_reference_unknown", "cancellation_outcome_unknown", "invalid_return_disposition", "account_not_found", "admin_required", "api_not_approved", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing", "response_unreadable"];
56
+ export declare const CANCELLATION_ERROR_CODES: readonly ["receipt_not_found", "receipt_type_not_cancellable", "training_receipt", "already_cancelled", "invalid_line", "quantity_exceeds_remaining", "unknown_reason", "note_too_long", "invalid_items", "cashregister_not_assigned", "not_permitted", "own_receipts_only", "cashregister_incomplete", "cancellation_failed", "cancellation_payments_required", "cancellation_refund_exceeds_payment", "cancellation_refund_reference_required", "cancellation_refund_reference_unknown", "cancellation_outcome_unknown", "invalid_return_disposition", "account_not_found", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "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", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing", "response_unreadable"];
57
57
  export type CancellationErrorCode = (typeof CANCELLATION_ERROR_CODES)[number];
58
58
  export declare function isCancellationErrorCode(value: unknown): value is CancellationErrorCode;
59
59
  /** Der Code eines geworfenen Fehlers, wenn er in [CANCELLATION_ERROR_CODES] steht; sonst `undefined`. */
@@ -89,6 +89,8 @@ exports.CANCELLATION_ERROR_CODES = Object.freeze([
89
89
  'account_not_found',
90
90
  'admin_required',
91
91
  'api_not_approved',
92
+ 'app_check_invalid',
93
+ 'app_check_missing',
92
94
  'cashregister_not_found',
93
95
  'cashregister_token_invalid',
94
96
  'cashregister_token_missing',
@@ -98,6 +100,7 @@ exports.CANCELLATION_ERROR_CODES = Object.freeze([
98
100
  'method_not_allowed',
99
101
  'mfa_required',
100
102
  'not_found',
103
+ 'password_change_required',
101
104
  'register_user_no_business',
102
105
  'register_user_not_allowed',
103
106
  'register_user_not_found',
@@ -19,7 +19,7 @@ import { KasseneckApiError } from '../client/errors.js';
19
19
  * ...) und zuletzt `route_missing` (Code des Pakets). Ein Code ausserhalb
20
20
  * bleibt ueber `KasseneckApiError.code` lesbar.
21
21
  */
22
- export declare const PAYMENT_ERROR_CODES: readonly ["payments_invalid", "payment_method_invalid", "payment_amount_invalid", "payment_tendered_invalid", "payment_provider_invalid", "payment_provider_not_allowed", "payments_sum_mismatch", "payments_due_negative", "payments_not_allowed", "payments_conflict", "payments_required", "payment_method_not_supported", "tip_payment_method_invalid", "tip_payment_method_required", "tip_exceeds_payment", "payment_refund_not_allowed", "payment_tip_invalid", "tip_conflict", "account_not_found", "admin_required", "api_not_approved", "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", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
22
+ export declare const PAYMENT_ERROR_CODES: readonly ["payments_invalid", "payment_method_invalid", "payment_amount_invalid", "payment_tendered_invalid", "payment_provider_invalid", "payment_provider_not_allowed", "payments_sum_mismatch", "payments_due_negative", "payments_not_allowed", "payments_conflict", "payments_required", "payment_method_not_supported", "tip_payment_method_invalid", "tip_payment_method_required", "tip_exceeds_payment", "payment_refund_not_allowed", "payment_tip_invalid", "tip_conflict", "account_not_found", "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", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
23
23
  export type PaymentErrorCode = (typeof PAYMENT_ERROR_CODES)[number];
24
24
  /** Erkennt einen Code aus [PAYMENT_ERROR_CODES], exakt (klein, wie unter `/v3`). */
25
25
  export declare function isPaymentErrorCode(value: unknown): value is PaymentErrorCode;
@@ -49,6 +49,8 @@ exports.PAYMENT_ERROR_CODES = Object.freeze([
49
49
  'account_not_found',
50
50
  'admin_required',
51
51
  'api_not_approved',
52
+ 'app_check_invalid',
53
+ 'app_check_missing',
52
54
  'cashregister_not_assigned',
53
55
  'cashregister_not_found',
54
56
  'cashregister_token_invalid',
@@ -59,6 +61,7 @@ exports.PAYMENT_ERROR_CODES = Object.freeze([
59
61
  'method_not_allowed',
60
62
  'mfa_required',
61
63
  'not_found',
64
+ 'password_change_required',
62
65
  'register_user_no_business',
63
66
  'register_user_not_allowed',
64
67
  'register_user_not_found',
@@ -11,7 +11,7 @@ export type ReceiptEmailSendErrorCode = (typeof RECEIPT_EMAIL_SEND_ERROR_CODES)[
11
11
  * als [KasseneckApiError.code] durch; ein Code ausserhalb bleibt dort lesbar.
12
12
  * Zuletzt `route_missing` (Code des Pakets).
13
13
  */
14
- export declare const RECEIPT_EMAIL_ERROR_CODES: readonly ["invalid_address", "receipt_not_found", "too_many_requests", "send_failed", "account_not_found", "admin_required", "api_not_approved", "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", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
14
+ export declare const RECEIPT_EMAIL_ERROR_CODES: readonly ["invalid_address", "receipt_not_found", "too_many_requests", "send_failed", "account_not_found", "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", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
15
15
  export type ReceiptEmailErrorCode = (typeof RECEIPT_EMAIL_ERROR_CODES)[number];
16
16
  export declare function isReceiptEmailErrorCode(value: unknown): value is ReceiptEmailErrorCode;
17
17
  /** Der Code eines geworfenen Fehlers, wenn er in [RECEIPT_EMAIL_ERROR_CODES] steht; sonst `undefined`. */
@@ -28,6 +28,8 @@ exports.RECEIPT_EMAIL_ERROR_CODES = Object.freeze([
28
28
  'account_not_found',
29
29
  'admin_required',
30
30
  'api_not_approved',
31
+ 'app_check_invalid',
32
+ 'app_check_missing',
31
33
  'cashregister_not_assigned',
32
34
  'cashregister_not_found',
33
35
  'cashregister_token_invalid',
@@ -38,6 +40,7 @@ exports.RECEIPT_EMAIL_ERROR_CODES = Object.freeze([
38
40
  'method_not_allowed',
39
41
  'mfa_required',
40
42
  'not_found',
43
+ 'password_change_required',
41
44
  'register_user_no_business',
42
45
  'register_user_not_allowed',
43
46
  'register_user_not_found',
@@ -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", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "account_not_found", "admin_required", "api_not_approved", "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", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "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", "module_inactive", "not_permitted", "receipt_limit_exceeded", "receipt_not_found", "receipt_outcome_unknown", "receipt_type_invalid", "signature_incomplete", "signature_missing", "signing_failed", "small_business_vat_not_allowed", "tip_invalid", "tip_not_allowed", "tip_recipient_unknown", "validation", "account_not_found", "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", "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`. */
@@ -47,6 +47,8 @@ exports.RECEIPT_ERROR_CODES = Object.freeze([
47
47
  'account_not_found',
48
48
  'admin_required',
49
49
  'api_not_approved',
50
+ 'app_check_invalid',
51
+ 'app_check_missing',
50
52
  'cashregister_not_assigned',
51
53
  'cashregister_not_found',
52
54
  'cashregister_token_invalid',
@@ -57,6 +59,7 @@ exports.RECEIPT_ERROR_CODES = Object.freeze([
57
59
  'method_not_allowed',
58
60
  'mfa_required',
59
61
  'not_found',
62
+ 'password_change_required',
60
63
  'register_user_no_business',
61
64
  'register_user_not_allowed',
62
65
  'register_user_not_found',
@@ -1,12 +1,13 @@
1
1
  import { KasseneckApiError } from '../client/errors.js';
2
2
  /**
3
3
  * Fehler der Kassen-Aufrufe um den Verkauf herum (Einstellungen, Logo,
4
- * Artikel, Drucker, Trinkgeld-Empfaenger, Lager) auswerten: am `code`, nie am Text.
4
+ * Artikel, Drucker, Trinkgeld-Empfaenger, Lager, Inventur zaehlen) auswerten:
5
+ * am `code`, nie am Text.
5
6
  * Belege, Storno und Belegmail haben eigene Listen (`RECEIPT_ERROR_CODES`,
6
7
  * `CANCELLATION_ERROR_CODES`, `RECEIPT_EMAIL_ERROR_CODES`), die Anmeldung
7
8
  * `REGISTER_ERROR_CODES` im Unterpfad `./register`.
8
9
  *
9
- * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser dreizehn Endpunkte in
10
+ * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser achtzehn Endpunkte in
10
11
  * `fixtures/v3/antworten/kasse.json` und ihre Handler-Codes); ein Test haelt
11
12
  * die Liste deckungsgleich. `validation` traegt `data.errors[]` mit dem
12
13
  * aeusseren Feldpfad (`business.theme`, `device.shortcuts.splitPayment`).
@@ -19,7 +20,7 @@ import { KasseneckApiError } from '../client/errors.js';
19
20
  * ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
20
21
  * Rueckfallzweig.
21
22
  */
22
- export declare const POS_ERROR_CODES: readonly ["account_not_found", "admin_required", "api_not_approved", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "device_not_found", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_found", "not_permitted", "print_job_not_found", "print_layout_failed", "printer_not_found", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "server_error", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
23
+ export declare const POS_ERROR_CODES: readonly ["account_not_found", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "count_already_voided", "count_not_found", "device_not_found", "dialect_mismatch", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_cursor", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_found", "not_permitted", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "too_many_counts", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
23
24
  export type PosErrorCode = typeof POS_ERROR_CODES[number];
24
25
  export declare function isPosErrorCode(value: unknown): value is PosErrorCode;
25
26
  /** Der Code eines geworfenen Fehlers, wenn er in [POS_ERROR_CODES] steht; sonst `undefined`. */
@@ -8,12 +8,13 @@ exports.posFieldErrors = posFieldErrors;
8
8
  const errors_js_1 = require("../client/errors.js");
9
9
  /**
10
10
  * Fehler der Kassen-Aufrufe um den Verkauf herum (Einstellungen, Logo,
11
- * Artikel, Drucker, Trinkgeld-Empfaenger, Lager) auswerten: am `code`, nie am Text.
11
+ * Artikel, Drucker, Trinkgeld-Empfaenger, Lager, Inventur zaehlen) auswerten:
12
+ * am `code`, nie am Text.
12
13
  * Belege, Storno und Belegmail haben eigene Listen (`RECEIPT_ERROR_CODES`,
13
14
  * `CANCELLATION_ERROR_CODES`, `RECEIPT_EMAIL_ERROR_CODES`), die Anmeldung
14
15
  * `REGISTER_ERROR_CODES` im Unterpfad `./register`.
15
16
  *
16
- * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser dreizehn Endpunkte in
17
+ * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser achtzehn Endpunkte in
17
18
  * `fixtures/v3/antworten/kasse.json` und ihre Handler-Codes); ein Test haelt
18
19
  * die Liste deckungsgleich. `validation` traegt `data.errors[]` mit dem
19
20
  * aeusseren Feldpfad (`business.theme`, `device.shortcuts.splitPayment`).
@@ -30,13 +31,25 @@ exports.POS_ERROR_CODES = Object.freeze([
30
31
  'account_not_found',
31
32
  'admin_required',
32
33
  'api_not_approved',
34
+ 'app_check_invalid',
35
+ 'app_check_missing',
36
+ 'article_not_found',
37
+ 'article_not_in_scope',
38
+ 'article_not_tracked',
33
39
  'cashregister_not_assigned',
34
40
  'cashregister_not_found',
35
41
  'cashregister_token_invalid',
36
42
  'cashregister_token_missing',
43
+ 'count_already_voided',
44
+ 'count_not_found',
37
45
  'device_not_found',
38
46
  'dialect_mismatch',
47
+ 'idempotency_conflict',
48
+ 'idempotency_key_required',
39
49
  'internal_translation_error',
50
+ 'invalid_cursor',
51
+ 'invalid_quantity',
52
+ 'invalid_serial',
40
53
  'live_not_enabled',
41
54
  'location_inactive',
42
55
  'location_not_found',
@@ -48,6 +61,7 @@ exports.POS_ERROR_CODES = Object.freeze([
48
61
  'module_inactive',
49
62
  'not_found',
50
63
  'not_permitted',
64
+ 'password_change_required',
51
65
  'print_job_not_found',
52
66
  'print_layout_failed',
53
67
  'printer_not_found',
@@ -55,9 +69,17 @@ exports.POS_ERROR_CODES = Object.freeze([
55
69
  'register_user_not_allowed',
56
70
  'register_user_not_found',
57
71
  'response_translation_failed',
72
+ 'serial_already_counted',
73
+ 'serial_not_allowed',
74
+ 'serial_required',
58
75
  'server_error',
59
76
  'session_expired',
60
77
  'session_other_cashregister',
78
+ 'stocktake_closed',
79
+ 'stocktake_closing',
80
+ 'stocktake_not_found',
81
+ 'stocktake_not_open',
82
+ 'too_many_counts',
61
83
  'unauthorized',
62
84
  'user_disabled',
63
85
  'user_verification_failed',
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
3
3
  * Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
4
- * Standort der Kasse). Die Aufrufe heissen 1:1 wie
4
+ * Standort der Kasse), Inventur zaehlen. Die Aufrufe heissen 1:1 wie
5
5
  * die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
6
6
  * und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
7
7
  */
@@ -14,5 +14,8 @@ export { cancelScopeOf, receiptsScopeOf, stockViewOf, type RegisterScope, type R
14
14
  export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STATUSES, type PrintJobSource, PRINT_JOB_SOURCES, isPrintJobFinished, type CreatePrintJobOptions, listMyPrinters, createPrintJob, getPrintJob, } from './drucker.js';
15
15
  export { listMyTipRecipients } from './trinkgeld.js';
16
16
  export { STOCK_LOCATION_TYPES, type StockLocationType, type StockLocation, type StockLocationAddress, type StockLevel, type StockValue, type StockList, type ListMyStockOptions, type SetMyCashregisterStockLocationOptions, type CashregisterStockLocation, listMyStockLocations, listMyStock, setMyCashregisterStockLocation, } from './lager.js';
17
+ export { type ListMyStocktakesOptions, type ListMyStocktakeItemsOptions, type ListMyStocktakeCountsOptions, type RecordMyStocktakeCountOptions, type VoidMyStocktakeCountOptions, listMyStocktakes, listMyStocktakeItems, listMyStocktakeCounts, recordMyStocktakeCount, voidMyStocktakeCount, parseQuantityMilli, } from './inventur.js';
18
+ export type { Stocktake, StocktakeItem, StocktakeCount, StocktakeCountResult, StocktakeItemPage, StocktakeCountPage, StocktakeActor, StocktakeProgress, StocktakeReview, StocktakeRecount, StocktakeScope, } from '../inventory/typen.js';
19
+ export type { StocktakeStatus } from '../inventory/vertrag.js';
17
20
  export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
18
21
  export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, LABELS, labelText, RETURN_DISPOSITION_LABELS, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPosSettings = exports.allowedQuantity = exports.quantityDefaults = exports.quantityRuleForUnit = exports.QUANTITY_RULES = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.DONE_SCREEN_SECONDS = exports.WATERMARK_SCALE = exports.LOGO_SCALE = exports.WATERMARK_STRENGTH = exports.WATERMARK_SIDE = exports.DISCOUNT = exports.AUTO_LOGOUT_MINUTES = exports.TILE_STYLE = exports.SETTINGS_FONT_SIZE = exports.LOGO_SIZE = exports.QR_MODE = exports.DRAWER_AUTO_OPEN = exports.CUT = exports.CODE_PAGE = exports.PAPER_SIZE = exports.TERMINAL_TYPE = exports.TERMINAL_VIA = exports.PRINTER_TYPE = exports.TILE_HEIGHT = exports.CATEGORY_POSITION = exports.LAYOUT = exports.RECEIPT_OUTPUT = exports.CARD_PROVIDER = exports.CHECKOUT_MODE = exports.TIP_MODE = exports.QUANTITY = exports.WATERMARK = exports.FONT_SIZE = exports.THEME = exports.posShortcutConflict = exports.POS_SHORTCUT_SHARED_PAIRS = exports.posSettingsChanges = exports.unknownPosSettingValues = exports.sanitizePosSettings = exports.mergePosSettings = exports.POS_DEVICE_VALUES = exports.POS_BUSINESS_VALUES = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = void 0;
4
- exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = void 0;
4
+ exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.parseQuantityMilli = exports.voidMyStocktakeCount = exports.recordMyStocktakeCount = exports.listMyStocktakeCounts = exports.listMyStocktakeItems = exports.listMyStocktakes = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = void 0;
5
5
  /**
6
6
  * Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
7
7
  * Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
8
- * Standort der Kasse). Die Aufrufe heissen 1:1 wie
8
+ * Standort der Kasse), Inventur zaehlen. Die Aufrufe heissen 1:1 wie
9
9
  * die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
10
10
  * und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
11
11
  */
@@ -95,6 +95,13 @@ Object.defineProperty(exports, "STOCK_LOCATION_TYPES", { enumerable: true, get:
95
95
  Object.defineProperty(exports, "listMyStockLocations", { enumerable: true, get: function () { return lager_js_1.listMyStockLocations; } });
96
96
  Object.defineProperty(exports, "listMyStock", { enumerable: true, get: function () { return lager_js_1.listMyStock; } });
97
97
  Object.defineProperty(exports, "setMyCashregisterStockLocation", { enumerable: true, get: function () { return lager_js_1.setMyCashregisterStockLocation; } });
98
+ var inventur_js_1 = require("./inventur.js");
99
+ Object.defineProperty(exports, "listMyStocktakes", { enumerable: true, get: function () { return inventur_js_1.listMyStocktakes; } });
100
+ Object.defineProperty(exports, "listMyStocktakeItems", { enumerable: true, get: function () { return inventur_js_1.listMyStocktakeItems; } });
101
+ Object.defineProperty(exports, "listMyStocktakeCounts", { enumerable: true, get: function () { return inventur_js_1.listMyStocktakeCounts; } });
102
+ Object.defineProperty(exports, "recordMyStocktakeCount", { enumerable: true, get: function () { return inventur_js_1.recordMyStocktakeCount; } });
103
+ Object.defineProperty(exports, "voidMyStocktakeCount", { enumerable: true, get: function () { return inventur_js_1.voidMyStocktakeCount; } });
104
+ Object.defineProperty(exports, "parseQuantityMilli", { enumerable: true, get: function () { return inventur_js_1.parseQuantityMilli; } });
98
105
  // Rueckgabe-Wahl beim Storno (Kassen-Dialog); dieselbe Liste wie an der Wurzel.
99
106
  var cancellation_js_1 = require("../models/cancellation.js");
100
107
  Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return cancellation_js_1.RETURN_DISPOSITIONS; } });