@kreiseck/kasseneck-api 1.10.1 → 1.11.1

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 (152) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/dist/cjs/client/aufrufe.d.ts +5 -5
  3. package/dist/cjs/client/aufrufe.js +22 -2
  4. package/dist/cjs/client/errors.js +2 -0
  5. package/dist/cjs/client/receipts.d.ts +34 -1
  6. package/dist/cjs/client/receipts.js +34 -1
  7. package/dist/cjs/index.d.ts +1 -1
  8. package/dist/cjs/index.js +11 -3
  9. package/dist/cjs/inventory/vertrag.d.ts +1 -1
  10. package/dist/cjs/inventory/vertrag.js +2 -0
  11. package/dist/cjs/invoice/vertrag.d.ts +1 -1
  12. package/dist/cjs/invoice/vertrag.js +2 -0
  13. package/dist/cjs/models/cancellation.d.ts +49 -1
  14. package/dist/cjs/models/cancellation.js +139 -1
  15. package/dist/cjs/models/index.d.ts +2 -2
  16. package/dist/cjs/models/index.js +10 -2
  17. package/dist/cjs/models/payment-errors.d.ts +1 -1
  18. package/dist/cjs/models/payment-errors.js +2 -0
  19. package/dist/cjs/models/receipt-email.d.ts +1 -1
  20. package/dist/cjs/models/receipt-email.js +2 -0
  21. package/dist/cjs/models/receipt-errors.d.ts +1 -1
  22. package/dist/cjs/models/receipt-errors.js +2 -0
  23. package/dist/cjs/models/receipt-item.d.ts +10 -0
  24. package/dist/cjs/models/receipt-item.js +3 -0
  25. package/dist/cjs/models/receipt.d.ts +19 -1
  26. package/dist/cjs/models/receipt.js +28 -4
  27. package/dist/cjs/pos/client.js +10 -0
  28. package/dist/cjs/pos/errors.d.ts +4 -3
  29. package/dist/cjs/pos/errors.js +21 -2
  30. package/dist/cjs/pos/index.d.ts +6 -2
  31. package/dist/cjs/pos/index.js +33 -3
  32. package/dist/cjs/pos/schicht-lesen.d.ts +39 -0
  33. package/dist/cjs/pos/schicht-lesen.js +405 -0
  34. package/dist/cjs/pos/schicht-typen.d.ts +380 -0
  35. package/dist/cjs/pos/schicht-typen.js +59 -0
  36. package/dist/cjs/pos/schicht.d.ts +208 -0
  37. package/dist/cjs/pos/schicht.js +235 -0
  38. package/dist/cjs/pos/settings.d.ts +37 -1
  39. package/dist/cjs/pos/settings.js +43 -3
  40. package/dist/cjs/pos/texte.d.ts +627 -0
  41. package/dist/cjs/pos/texte.js +236 -0
  42. package/dist/cjs/react/index.js +1 -1
  43. package/dist/cjs/receipt/grid.js +2 -2
  44. package/dist/cjs/receipt/layout.d.ts +5 -0
  45. package/dist/cjs/receipt/layout.js +14 -5
  46. package/dist/cjs/receipt/shift-sheet.d.ts +33 -0
  47. package/dist/cjs/receipt/shift-sheet.js +207 -0
  48. package/dist/cjs/register/errors.d.ts +1 -1
  49. package/dist/cjs/register/errors.js +2 -0
  50. package/dist/cjs/stored/draht.d.ts +1 -1
  51. package/dist/cjs/stored/draht.js +4 -3
  52. package/dist/cjs/stored/einstellungen.js +26 -3
  53. package/dist/cjs/stored/vokabular.d.ts +1 -1
  54. package/dist/cjs/stored/vokabular.js +118 -12
  55. package/dist/cjs/version.d.ts +1 -1
  56. package/dist/cjs/version.js +1 -1
  57. package/dist/esm/client/aufrufe.d.ts +5 -5
  58. package/dist/esm/client/aufrufe.js +22 -2
  59. package/dist/esm/client/errors.js +2 -0
  60. package/dist/esm/client/receipts.d.ts +34 -1
  61. package/dist/esm/client/receipts.js +35 -2
  62. package/dist/esm/index.d.ts +1 -1
  63. package/dist/esm/index.js +1 -1
  64. package/dist/esm/inventory/vertrag.d.ts +1 -1
  65. package/dist/esm/inventory/vertrag.js +2 -0
  66. package/dist/esm/invoice/vertrag.d.ts +1 -1
  67. package/dist/esm/invoice/vertrag.js +2 -0
  68. package/dist/esm/models/cancellation.d.ts +49 -1
  69. package/dist/esm/models/cancellation.js +132 -0
  70. package/dist/esm/models/index.d.ts +2 -2
  71. package/dist/esm/models/index.js +2 -2
  72. package/dist/esm/models/payment-errors.d.ts +1 -1
  73. package/dist/esm/models/payment-errors.js +2 -0
  74. package/dist/esm/models/receipt-email.d.ts +1 -1
  75. package/dist/esm/models/receipt-email.js +2 -0
  76. package/dist/esm/models/receipt-errors.d.ts +1 -1
  77. package/dist/esm/models/receipt-errors.js +2 -0
  78. package/dist/esm/models/receipt-item.d.ts +10 -0
  79. package/dist/esm/models/receipt-item.js +3 -0
  80. package/dist/esm/models/receipt.d.ts +19 -1
  81. package/dist/esm/models/receipt.js +27 -4
  82. package/dist/esm/pos/client.js +11 -1
  83. package/dist/esm/pos/errors.d.ts +4 -3
  84. package/dist/esm/pos/errors.js +21 -2
  85. package/dist/esm/pos/index.d.ts +6 -2
  86. package/dist/esm/pos/index.js +7 -2
  87. package/dist/esm/pos/schicht-lesen.d.ts +39 -0
  88. package/dist/esm/pos/schicht-lesen.js +392 -0
  89. package/dist/esm/pos/schicht-typen.d.ts +380 -0
  90. package/dist/esm/pos/schicht-typen.js +56 -0
  91. package/dist/esm/pos/schicht.d.ts +208 -0
  92. package/dist/esm/pos/schicht.js +222 -0
  93. package/dist/esm/pos/settings.d.ts +37 -1
  94. package/dist/esm/pos/settings.js +40 -2
  95. package/dist/esm/pos/texte.d.ts +627 -0
  96. package/dist/esm/pos/texte.js +236 -0
  97. package/dist/esm/react/index.js +1 -1
  98. package/dist/esm/receipt/grid.js +2 -2
  99. package/dist/esm/receipt/layout.d.ts +5 -0
  100. package/dist/esm/receipt/layout.js +15 -6
  101. package/dist/esm/receipt/shift-sheet.d.ts +33 -0
  102. package/dist/esm/receipt/shift-sheet.js +203 -0
  103. package/dist/esm/register/errors.d.ts +1 -1
  104. package/dist/esm/register/errors.js +2 -0
  105. package/dist/esm/stored/draht.d.ts +1 -1
  106. package/dist/esm/stored/draht.js +4 -3
  107. package/dist/esm/stored/einstellungen.js +27 -4
  108. package/dist/esm/stored/vokabular.d.ts +1 -1
  109. package/dist/esm/stored/vokabular.js +118 -12
  110. package/dist/esm/version.d.ts +1 -1
  111. package/dist/esm/version.js +1 -1
  112. package/fixtures/cancellation-tip-cases.json +679 -0
  113. package/fixtures/expected/cash-movement.grid32.txt +15 -0
  114. package/fixtures/expected/cash-movement.grid48.txt +15 -0
  115. package/fixtures/expected/cash-movement.lines.json +171 -0
  116. package/fixtures/expected/shift-close-blind.grid32.txt +28 -0
  117. package/fixtures/expected/shift-close-blind.grid48.txt +27 -0
  118. package/fixtures/expected/shift-close-blind.lines.json +275 -0
  119. package/fixtures/expected/shift-close-put-in.grid32.txt +38 -0
  120. package/fixtures/expected/shift-close-put-in.grid48.txt +35 -0
  121. package/fixtures/expected/shift-close-put-in.lines.json +403 -0
  122. package/fixtures/expected/shift-close-take-out.grid32.txt +38 -0
  123. package/fixtures/expected/shift-close-take-out.grid48.txt +35 -0
  124. package/fixtures/expected/shift-close-take-out.lines.json +403 -0
  125. package/fixtures/expected/shift-close.grid32.txt +37 -0
  126. package/fixtures/expected/shift-close.grid48.txt +35 -0
  127. package/fixtures/expected/shift-close.lines.json +413 -0
  128. package/fixtures/expected/shift-interim.grid32.txt +28 -0
  129. package/fixtures/expected/shift-interim.grid48.txt +27 -0
  130. package/fixtures/expected/shift-interim.lines.json +293 -0
  131. package/fixtures/hobex-hps-codes.json +1 -1
  132. package/fixtures/invoice-api.schema.json +1 -1
  133. package/fixtures/invoice-texts.json +1 -1
  134. package/fixtures/pos-message-cases.json +45 -0
  135. package/fixtures/pos-texts.json +723 -1
  136. package/fixtures/receipt-due-generated.json +1 -1
  137. package/fixtures/shift-cases.json +87 -0
  138. package/fixtures/shift-receipts.json +41 -0
  139. package/fixtures/surface.json +119 -3
  140. package/fixtures/v3/antworten/belege.json +1 -1
  141. package/fixtures/v3/antworten/belegmail.json +1 -1
  142. package/fixtures/v3/antworten/kasse-belege.json +1 -1
  143. package/fixtures/v3/antworten/kasse.json +10874 -4865
  144. package/fixtures/v3/antworten/lager.json +1 -1
  145. package/fixtures/v3/antworten/rechnungen.json +1 -1
  146. package/fixtures/v3/antworten/storno.json +1 -1
  147. package/fixtures/v3/stored/belege.json +18 -6
  148. package/fixtures/v3/stored/kasse.json +4667 -183
  149. package/fixtures/v3/stored/rechnungen.json +1 -1
  150. package/fixtures/v3/v3-vokabular.json +739 -32
  151. package/fixtures/v3/zahlbetrag-faelle.json +1 -1
  152. package/package.json +1 -1
@@ -1,13 +1,14 @@
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, Inventur zaehlen) auswerten:
4
+ * Artikel, Drucker, Trinkgeld-Empfaenger, Lager, Inventur zaehlen, Schicht,
5
+ * Kassenstand und Lade-Protokoll) auswerten:
5
6
  * am `code`, nie am Text.
6
7
  * Belege, Storno und Belegmail haben eigene Listen (`RECEIPT_ERROR_CODES`,
7
8
  * `CANCELLATION_ERROR_CODES`, `RECEIPT_EMAIL_ERROR_CODES`), die Anmeldung
8
9
  * `REGISTER_ERROR_CODES` im Unterpfad `./register`.
9
10
  *
10
- * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser achtzehn Endpunkte in
11
+ * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser 24 Endpunkte in
11
12
  * `fixtures/v3/antworten/kasse.json` und ihre Handler-Codes); ein Test haelt
12
13
  * die Liste deckungsgleich. `validation` traegt `data.errors[]` mit dem
13
14
  * aeusseren Feldpfad (`business.theme`, `device.shortcuts.splitPayment`).
@@ -20,7 +21,7 @@ import { KasseneckApiError } from '../client/errors.js';
20
21
  * ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
21
22
  * Rueckfallzweig.
22
23
  */
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"];
24
+ export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
24
25
  export type PosErrorCode = typeof POS_ERROR_CODES[number];
25
26
  export declare function isPosErrorCode(value: unknown): value is PosErrorCode;
26
27
  /** Der Code eines geworfenen Fehlers, wenn er in [POS_ERROR_CODES] steht; sonst `undefined`. */
@@ -8,13 +8,14 @@ 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, Inventur zaehlen) auswerten:
11
+ * Artikel, Drucker, Trinkgeld-Empfaenger, Lager, Inventur zaehlen, Schicht,
12
+ * Kassenstand und Lade-Protokoll) auswerten:
12
13
  * am `code`, nie am Text.
13
14
  * Belege, Storno und Belegmail haben eigene Listen (`RECEIPT_ERROR_CODES`,
14
15
  * `CANCELLATION_ERROR_CODES`, `RECEIPT_EMAIL_ERROR_CODES`), die Anmeldung
15
16
  * `REGISTER_ERROR_CODES` im Unterpfad `./register`.
16
17
  *
17
- * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser achtzehn Endpunkte in
18
+ * Abgeleitet aus dem Vertrags-Export (Fehlerfaelle dieser 24 Endpunkte in
18
19
  * `fixtures/v3/antworten/kasse.json` und ihre Handler-Codes); ein Test haelt
19
20
  * die Liste deckungsgleich. `validation` traegt `data.errors[]` mit dem
20
21
  * aeusseren Feldpfad (`business.theme`, `device.shortcuts.splitPayment`).
@@ -29,25 +30,34 @@ const errors_js_1 = require("../client/errors.js");
29
30
  */
30
31
  exports.POS_ERROR_CODES = Object.freeze([
31
32
  'account_not_found',
33
+ 'action_confirmation_required',
32
34
  'admin_required',
35
+ 'after_count_not_permitted',
33
36
  'api_not_approved',
34
37
  'app_check_invalid',
35
38
  'app_check_missing',
36
39
  'article_not_found',
37
40
  'article_not_in_scope',
38
41
  'article_not_tracked',
42
+ 'cash_movement_exceeds_balance',
39
43
  'cashregister_not_assigned',
40
44
  'cashregister_not_found',
41
45
  'cashregister_token_invalid',
42
46
  'cashregister_token_missing',
47
+ 'comment_required',
43
48
  'count_already_voided',
44
49
  'count_not_found',
45
50
  'device_not_found',
46
51
  'dialect_mismatch',
52
+ 'drawer_inactive',
53
+ 'drawer_not_found',
47
54
  'idempotency_conflict',
48
55
  'idempotency_key_required',
49
56
  'internal_translation_error',
57
+ 'invalid_amount',
50
58
  'invalid_cursor',
59
+ 'invalid_denominations',
60
+ 'invalid_movement_type',
51
61
  'invalid_quantity',
52
62
  'invalid_serial',
53
63
  'live_not_enabled',
@@ -61,25 +71,34 @@ exports.POS_ERROR_CODES = Object.freeze([
61
71
  'module_inactive',
62
72
  'not_found',
63
73
  'not_permitted',
74
+ 'note_required',
64
75
  'password_change_required',
65
76
  'print_job_not_found',
66
77
  'print_layout_failed',
67
78
  'printer_not_found',
79
+ 'recount_exhausted',
68
80
  'register_user_no_business',
69
81
  'register_user_not_allowed',
70
82
  'register_user_not_found',
71
83
  'response_translation_failed',
84
+ 'second_factor_required',
72
85
  'serial_already_counted',
73
86
  'serial_not_allowed',
74
87
  'serial_required',
75
88
  'server_error',
76
89
  'session_expired',
77
90
  'session_other_cashregister',
91
+ 'shift_already_open',
92
+ 'shift_closed',
93
+ 'shift_mode_off',
94
+ 'shift_not_open',
78
95
  'stocktake_closed',
79
96
  'stocktake_closing',
80
97
  'stocktake_not_found',
81
98
  'stocktake_not_open',
99
+ 'tip_payout_exceeds_claim',
82
100
  'too_many_counts',
101
+ 'transfer_same_drawer',
83
102
  'unauthorized',
84
103
  'user_disabled',
85
104
  'user_verification_failed',
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
3
3
  * Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
4
- * Standort der Kasse), Inventur zaehlen. Die Aufrufe heissen 1:1 wie
4
+ * Standort der Kasse), Inventur zaehlen, Schicht, Kassenstand und
5
+ * Lade-Protokoll mit ihren Bons. Die Aufrufe heissen 1:1 wie
5
6
  * die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
6
7
  * und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
7
8
  */
8
- export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, CHECKOUT_MODE, CARD_PROVIDER, RECEIPT_OUTPUT, LAYOUT, CATEGORY_POSITION, TILE_HEIGHT, PRINTER_TYPE, TERMINAL_VIA, TERMINAL_TYPE, PAPER_SIZE, CODE_PAGE, CUT, DRAWER_AUTO_OPEN, QR_MODE, LOGO_SIZE, SETTINGS_FONT_SIZE, TILE_STYLE, AUTO_LOGOUT_MINUTES, DISCOUNT, WATERMARK_SIDE, WATERMARK_STRENGTH, LOGO_SCALE, WATERMARK_SCALE, DONE_SCREEN_SECONDS, } from './settings.js';
9
+ export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, posTipKeptByDefault, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, CHECKOUT_MODE, CARD_PROVIDER, RECEIPT_OUTPUT, LAYOUT, CATEGORY_POSITION, TILE_HEIGHT, PRINTER_TYPE, TERMINAL_VIA, TERMINAL_TYPE, PAPER_SIZE, CODE_PAGE, CUT, DRAWER_AUTO_OPEN, QR_MODE, LOGO_SIZE, SETTINGS_FONT_SIZE, TILE_STYLE, AUTO_LOGOUT_MINUTES, DISCOUNT, WATERMARK_SIDE, WATERMARK_STRENGTH, LOGO_SCALE, WATERMARK_SCALE, DONE_SCREEN_SECONDS, } from './settings.js';
9
10
  export { type ArticleGroup, type ArticleGroupPayload, fromArticleGroupPayload, type PosArticle, type PosArticlePayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, type QuantityRule, type QuantityDefaults, quantityRuleForUnit, quantityDefaults, allowedQuantity, } from './artikel.js';
10
11
  export { getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, setMyPosLogo, posSettingsFromWire, type SetMyPosLogoOptions, } from './client.js';
11
12
  export { POS_ERROR_CODES, type PosErrorCode, isPosErrorCode, posErrorCode, isPosError, type PosFieldError, posFieldErrors, } from './errors.js';
@@ -17,5 +18,8 @@ export { STOCK_LOCATION_TYPES, type StockLocationType, type StockLocation, type
17
18
  export { type ListMyStocktakesOptions, type ListMyStocktakeItemsOptions, type ListMyStocktakeCountsOptions, type RecordMyStocktakeCountOptions, type VoidMyStocktakeCountOptions, listMyStocktakes, listMyStocktakeItems, listMyStocktakeCounts, recordMyStocktakeCount, voidMyStocktakeCount, parseQuantityMilli, } from './inventur.js';
18
19
  export type { Stocktake, StocktakeItem, StocktakeCount, StocktakeCountResult, StocktakeItemPage, StocktakeCountPage, StocktakeActor, StocktakeProgress, StocktakeReview, StocktakeRecount, StocktakeScope, } from '../inventory/typen.js';
19
20
  export type { StocktakeStatus } from '../inventory/vertrag.js';
21
+ export { type GetMyDrawerStateOptions, type OpenMyShiftOptions, type RecordMyCashMovementOptions, type DrawerOpeningEntry, type LogMyDrawerOpeningsOptions, type GetMyShiftReportOptions, type TipPayout, type CloseMyShiftOptions, type AfterCountOption, getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, type ShiftTipLine, type ShiftTipLineKey, } from './schicht.js';
22
+ export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, type AfterCountType, type AfterCount, type EurDenomination, type MovementType, type ManualMovementType, type CashLocation, type OpeningReason, type ManualOpeningReason, type ShiftReceiptKind, type ShiftStatus, type ShiftActorRole, type Denominations, type ShiftActor, type DrawerInfo, type DrawerRights, type NonCashAmount, type ShiftTipTotals, type ShiftTip, type ShiftRunningTotals, type ShiftReconciliation, type Shift, type TipClaim, type DrawerOpening, type DrawerState, type CashMovement, type ShiftReceiptHeader, type ShiftReceiptMovement, type ShiftReceiptTip, type ShiftSummaryReceipt, type CashMovementReceipt, type ShiftReceipt, type OpenShiftResult, type CashMovementResult, type DrawerOpeningsResult, type ShiftReport, type CloseShiftResult, } from './schicht-typen.js';
23
+ export { type ShiftReceiptLayoutOptions, shiftReceiptLayout, cashMovementLayout } from '../receipt/shift-sheet.js';
20
24
  export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
21
25
  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,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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.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;
3
+ 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.posTipKeptByDefault = exports.POS_BUSINESS_OPTIONAL_FIELDS = exports.POS_DEVICE_OPTIONAL_FIELDS = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = void 0;
4
+ exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = exports.shiftTipLines = exports.newIdempotencyKey = exports.parseCentsAllowZero = exports.sumDenominations = exports.closeMyShift = exports.getMyShiftReport = exports.logMyDrawerOpenings = exports.recordMyCashMovement = exports.openMyShift = exports.getMyDrawerState = 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 = exports.getPosSettings = exports.allowedQuantity = exports.quantityDefaults = void 0;
5
+ 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.cashMovementLayout = exports.shiftReceiptLayout = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = void 0;
5
6
  /**
6
7
  * Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
7
8
  * Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
8
- * Standort der Kasse), Inventur zaehlen. Die Aufrufe heissen 1:1 wie
9
+ * Standort der Kasse), Inventur zaehlen, Schicht, Kassenstand und
10
+ * Lade-Protokoll mit ihren Bons. Die Aufrufe heissen 1:1 wie
9
11
  * die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
10
12
  * und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
11
13
  */
@@ -14,6 +16,9 @@ Object.defineProperty(exports, "POS_SHORTCUT_ACTIONS", { enumerable: true, get:
14
16
  Object.defineProperty(exports, "POS_SHORTCUT_DEFAULTS", { enumerable: true, get: function () { return settings_js_1.POS_SHORTCUT_DEFAULTS; } });
15
17
  Object.defineProperty(exports, "POS_BUSINESS_DEFAULTS", { enumerable: true, get: function () { return settings_js_1.POS_BUSINESS_DEFAULTS; } });
16
18
  Object.defineProperty(exports, "POS_DEVICE_DEFAULTS", { enumerable: true, get: function () { return settings_js_1.POS_DEVICE_DEFAULTS; } });
19
+ Object.defineProperty(exports, "POS_DEVICE_OPTIONAL_FIELDS", { enumerable: true, get: function () { return settings_js_1.POS_DEVICE_OPTIONAL_FIELDS; } });
20
+ Object.defineProperty(exports, "POS_BUSINESS_OPTIONAL_FIELDS", { enumerable: true, get: function () { return settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS; } });
21
+ Object.defineProperty(exports, "posTipKeptByDefault", { enumerable: true, get: function () { return settings_js_1.posTipKeptByDefault; } });
17
22
  Object.defineProperty(exports, "POS_BUSINESS_VALUES", { enumerable: true, get: function () { return settings_js_1.POS_BUSINESS_VALUES; } });
18
23
  Object.defineProperty(exports, "POS_DEVICE_VALUES", { enumerable: true, get: function () { return settings_js_1.POS_DEVICE_VALUES; } });
19
24
  Object.defineProperty(exports, "mergePosSettings", { enumerable: true, get: function () { return settings_js_1.mergePosSettings; } });
@@ -102,6 +107,31 @@ Object.defineProperty(exports, "listMyStocktakeCounts", { enumerable: true, get:
102
107
  Object.defineProperty(exports, "recordMyStocktakeCount", { enumerable: true, get: function () { return inventur_js_1.recordMyStocktakeCount; } });
103
108
  Object.defineProperty(exports, "voidMyStocktakeCount", { enumerable: true, get: function () { return inventur_js_1.voidMyStocktakeCount; } });
104
109
  Object.defineProperty(exports, "parseQuantityMilli", { enumerable: true, get: function () { return inventur_js_1.parseQuantityMilli; } });
110
+ // Schicht, Kassenstand und Lade-Protokoll (1.9.0): Aufrufe, Kataloge, Helfer, Bons.
111
+ var schicht_js_1 = require("./schicht.js");
112
+ Object.defineProperty(exports, "getMyDrawerState", { enumerable: true, get: function () { return schicht_js_1.getMyDrawerState; } });
113
+ Object.defineProperty(exports, "openMyShift", { enumerable: true, get: function () { return schicht_js_1.openMyShift; } });
114
+ Object.defineProperty(exports, "recordMyCashMovement", { enumerable: true, get: function () { return schicht_js_1.recordMyCashMovement; } });
115
+ Object.defineProperty(exports, "logMyDrawerOpenings", { enumerable: true, get: function () { return schicht_js_1.logMyDrawerOpenings; } });
116
+ Object.defineProperty(exports, "getMyShiftReport", { enumerable: true, get: function () { return schicht_js_1.getMyShiftReport; } });
117
+ Object.defineProperty(exports, "closeMyShift", { enumerable: true, get: function () { return schicht_js_1.closeMyShift; } });
118
+ Object.defineProperty(exports, "sumDenominations", { enumerable: true, get: function () { return schicht_js_1.sumDenominations; } });
119
+ Object.defineProperty(exports, "parseCentsAllowZero", { enumerable: true, get: function () { return schicht_js_1.parseCentsAllowZero; } });
120
+ Object.defineProperty(exports, "newIdempotencyKey", { enumerable: true, get: function () { return schicht_js_1.newIdempotencyKey; } });
121
+ Object.defineProperty(exports, "shiftTipLines", { enumerable: true, get: function () { return schicht_js_1.shiftTipLines; } });
122
+ Object.defineProperty(exports, "durationText", { enumerable: true, get: function () { return schicht_js_1.durationText; } });
123
+ var schicht_typen_js_1 = require("./schicht-typen.js");
124
+ Object.defineProperty(exports, "EUR_DENOMINATIONS", { enumerable: true, get: function () { return schicht_typen_js_1.EUR_DENOMINATIONS; } });
125
+ Object.defineProperty(exports, "MOVEMENT_TYPES", { enumerable: true, get: function () { return schicht_typen_js_1.MOVEMENT_TYPES; } });
126
+ Object.defineProperty(exports, "MANUAL_MOVEMENT_TYPES", { enumerable: true, get: function () { return schicht_typen_js_1.MANUAL_MOVEMENT_TYPES; } });
127
+ Object.defineProperty(exports, "CASH_LOCATIONS", { enumerable: true, get: function () { return schicht_typen_js_1.CASH_LOCATIONS; } });
128
+ Object.defineProperty(exports, "OPENING_REASONS", { enumerable: true, get: function () { return schicht_typen_js_1.OPENING_REASONS; } });
129
+ Object.defineProperty(exports, "MANUAL_OPENING_REASONS", { enumerable: true, get: function () { return schicht_typen_js_1.MANUAL_OPENING_REASONS; } });
130
+ Object.defineProperty(exports, "SHIFT_RECEIPT_KINDS", { enumerable: true, get: function () { return schicht_typen_js_1.SHIFT_RECEIPT_KINDS; } });
131
+ Object.defineProperty(exports, "AFTER_COUNT_TYPES", { enumerable: true, get: function () { return schicht_typen_js_1.AFTER_COUNT_TYPES; } });
132
+ var shift_sheet_js_1 = require("../receipt/shift-sheet.js");
133
+ Object.defineProperty(exports, "shiftReceiptLayout", { enumerable: true, get: function () { return shift_sheet_js_1.shiftReceiptLayout; } });
134
+ Object.defineProperty(exports, "cashMovementLayout", { enumerable: true, get: function () { return shift_sheet_js_1.cashMovementLayout; } });
105
135
  // Rueckgabe-Wahl beim Storno (Kassen-Dialog); dieselbe Liste wie an der Wurzel.
106
136
  var cancellation_js_1 = require("../models/cancellation.js");
107
137
  Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return cancellation_js_1.RETURN_DISPOSITIONS; } });
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Leser der Schicht-Antworten: aus dem Draht `/v3` werden die Modelle in
3
+ * `schicht-typen.ts`. Paketintern, nicht Teil der Oberflaeche.
4
+ *
5
+ * Regel wie beim Lager: ein Betrag, eine Anzahl oder eine Nummer ist eine
6
+ * Ganzzahl, eine Kennung ein nicht leerer Text, sonst endet der Aufruf mit
7
+ * `KasseneckValidationError`. Ein Ersatzwert wie `0` waere eine falsche
8
+ * Aussage („nichts in der Lade“ statt „Antwort kaputt“). Texte sind
9
+ * nachsichtiger: ein fehlender oder fremder Wert wird `null`.
10
+ *
11
+ * Felder, die nur mit Recht kommen (`expectedCents`, `runningTotals` …),
12
+ * stehen im Modell genau dann, wenn der Server sie sendet.
13
+ */
14
+ import { type ValidationScope } from '../client/errors.js';
15
+ import type { CashMovement, CashMovementReceipt, CashMovementResult, DrawerOpeningsResult, OpenShiftResult, ShiftReport, CloseShiftResult, DrawerState, Shift, ShiftSummaryReceipt } from './schicht-typen.js';
16
+ type Roh = Record<string, unknown>;
17
+ /** Wer liest (fuer die Meldung) und wo im Rumpf. */
18
+ export interface Ort {
19
+ name: string;
20
+ pfad: string;
21
+ /** `response` fuer Antworten, `request` fuer Bon-Daten, die ein Aufrufer uebergibt. */
22
+ scope: ValidationScope;
23
+ }
24
+ /** Ein Objekt, das da sein muss. */
25
+ export declare function pflichtObjekt(ort: Ort, w: unknown): Roh;
26
+ /** Eine Schicht; was nur mit `cashView` kommt, steht nur, wenn gesendet. */
27
+ export declare function schicht(ort: Ort, w: unknown): Shift;
28
+ export declare function ladeStand(ort: Ort, w: unknown): DrawerState;
29
+ export declare function bewegung(ort: Ort, w: unknown): CashMovement;
30
+ /** Bon-Daten eines Z- oder X-Bons; eine andere Art ist ein Fehler. */
31
+ export declare function schichtBon(ort: Ort, w: unknown): ShiftSummaryReceipt;
32
+ /** Bon-Daten einer Kassenbewegung; eine andere Art ist ein Fehler. */
33
+ export declare function bewegungsBon(ort: Ort, w: unknown): CashMovementReceipt;
34
+ export declare function abschluss(ort: Ort, w: unknown): CloseShiftResult;
35
+ export declare function geoeffnet(ort: Ort, w: unknown): OpenShiftResult;
36
+ export declare function gebucht(ort: Ort, w: unknown): CashMovementResult;
37
+ export declare function gemeldet(ort: Ort, w: unknown): DrawerOpeningsResult;
38
+ export declare function bericht(ort: Ort, w: unknown): ShiftReport;
39
+ export {};