@kreiseck/kasseneck-api 1.30.0 → 1.31.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 (89) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/index.d.ts +1 -1
  3. package/dist/cjs/index.js +7 -5
  4. package/dist/cjs/models/index.d.ts +1 -1
  5. package/dist/cjs/models/index.js +4 -2
  6. package/dist/cjs/models/voucher.d.ts +18 -0
  7. package/dist/cjs/models/voucher.js +32 -1
  8. package/dist/cjs/pos/artikel.d.ts +12 -0
  9. package/dist/cjs/pos/artikel.js +2 -0
  10. package/dist/cjs/pos/client.js +11 -0
  11. package/dist/cjs/pos/errors.d.ts +1 -1
  12. package/dist/cjs/pos/errors.js +1 -0
  13. package/dist/cjs/pos/fremdgutschein-artikel.d.ts +66 -0
  14. package/dist/cjs/pos/fremdgutschein-artikel.js +74 -0
  15. package/dist/cjs/pos/index.d.ts +6 -3
  16. package/dist/cjs/pos/index.js +42 -4
  17. package/dist/cjs/pos/rabatt-vorlagen.d.ts +79 -0
  18. package/dist/cjs/pos/rabatt-vorlagen.js +156 -0
  19. package/dist/cjs/pos/schicht-lesen.js +8 -0
  20. package/dist/cjs/pos/schicht-typen.d.ts +15 -0
  21. package/dist/cjs/pos/settings.d.ts +69 -3
  22. package/dist/cjs/pos/settings.js +72 -5
  23. package/dist/cjs/pos/texte.d.ts +215 -0
  24. package/dist/cjs/pos/texte.js +124 -1
  25. package/dist/cjs/pos/zusaetze.d.ts +3 -3
  26. package/dist/cjs/pos/zusaetze.js +4 -2
  27. package/dist/cjs/receipt/shift-sheet.js +8 -0
  28. package/dist/cjs/stored/draht.js +1 -0
  29. package/dist/cjs/stored/einstellungen.js +50 -2
  30. package/dist/cjs/stored/vokabular.d.ts +1 -1
  31. package/dist/cjs/stored/vokabular.js +38 -4
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/index.d.ts +1 -1
  35. package/dist/esm/index.js +1 -1
  36. package/dist/esm/models/index.d.ts +1 -1
  37. package/dist/esm/models/index.js +1 -1
  38. package/dist/esm/models/voucher.d.ts +18 -0
  39. package/dist/esm/models/voucher.js +30 -0
  40. package/dist/esm/pos/artikel.d.ts +12 -0
  41. package/dist/esm/pos/artikel.js +2 -0
  42. package/dist/esm/pos/client.js +12 -1
  43. package/dist/esm/pos/errors.d.ts +1 -1
  44. package/dist/esm/pos/errors.js +1 -0
  45. package/dist/esm/pos/fremdgutschein-artikel.d.ts +66 -0
  46. package/dist/esm/pos/fremdgutschein-artikel.js +67 -0
  47. package/dist/esm/pos/index.d.ts +6 -3
  48. package/dist/esm/pos/index.js +7 -3
  49. package/dist/esm/pos/rabatt-vorlagen.d.ts +79 -0
  50. package/dist/esm/pos/rabatt-vorlagen.js +148 -0
  51. package/dist/esm/pos/schicht-lesen.js +8 -0
  52. package/dist/esm/pos/schicht-typen.d.ts +15 -0
  53. package/dist/esm/pos/settings.d.ts +69 -3
  54. package/dist/esm/pos/settings.js +67 -4
  55. package/dist/esm/pos/texte.d.ts +215 -0
  56. package/dist/esm/pos/texte.js +122 -0
  57. package/dist/esm/pos/zusaetze.d.ts +3 -3
  58. package/dist/esm/pos/zusaetze.js +4 -2
  59. package/dist/esm/receipt/shift-sheet.js +8 -0
  60. package/dist/esm/stored/draht.js +1 -0
  61. package/dist/esm/stored/einstellungen.js +52 -4
  62. package/dist/esm/stored/vokabular.d.ts +1 -1
  63. package/dist/esm/stored/vokabular.js +38 -4
  64. package/dist/esm/version.d.ts +1 -1
  65. package/dist/esm/version.js +1 -1
  66. package/fixtures/add-on-cases.json +6 -4
  67. package/fixtures/discount-preset-cases.json +1074 -0
  68. package/fixtures/external-voucher-article-cases.json +311 -0
  69. package/fixtures/hobex-hps-codes.json +1 -1
  70. package/fixtures/invoice-api.schema.json +1 -1
  71. package/fixtures/invoice-texts.json +1 -1
  72. package/fixtures/pos-texts.json +205 -1
  73. package/fixtures/receipt-due-voucher-generated.json +1 -1
  74. package/fixtures/renames-1.0.json +18 -0
  75. package/fixtures/surface.json +49 -4
  76. package/fixtures/v3/antworten/belege.json +1 -1
  77. package/fixtures/v3/antworten/belegmail.json +1 -1
  78. package/fixtures/v3/antworten/berichte.json +1 -1
  79. package/fixtures/v3/antworten/kasse-belege.json +1 -1
  80. package/fixtures/v3/antworten/kasse.json +2 -2
  81. package/fixtures/v3/antworten/lager.json +1 -1
  82. package/fixtures/v3/antworten/rechnungen.json +1 -1
  83. package/fixtures/v3/antworten/storno.json +1 -1
  84. package/fixtures/v3/stored/belege.json +1 -1
  85. package/fixtures/v3/stored/kasse.json +2 -2
  86. package/fixtures/v3/stored/rechnungen.json +1 -1
  87. package/fixtures/v3/v3-vokabular.json +95 -9
  88. package/fixtures/v3/zahlbetrag-faelle.json +1 -1
  89. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ Was vor 0.7.0 geschah, steht in der Commit-Historie (`git log`); ab hier wird
4
4
  es hier geführt. Ein Eintrag nennt die Änderung **und ihren Grund** —
5
5
  nur der Grund überlebt den nächsten Umbau.
6
6
 
7
+ ## 1.31.0 - unveröffentlicht
8
+
9
+ External vouchers at the till: a tile sells an external voucher, the payment screen redeems one through the same code field, the payout sheet switches between own and external, the cancellation flow warns. Additive; articles, groups and receipts without the new field read, print and send exactly as before (all existing goldens unchanged).
10
+
11
+ - **`PosArticle.externalVoucher`** (`'multi_purpose' | 'single_purpose' | null`, type `ArticleExternalVoucher`, stored `fremdgutschein` = `mehrzweck | einzweck`): the article is a tile for an external voucher. The till asks for the voucher number (and the amount without a price) and sends a `vouchers[]` entry `{ source: 'external', action: 'sell', type, number, amountCents, vatRateBp? }` instead of an item. The reader always sets it; an unknown value becomes `null` (as on the server's `/v3` edge, also in `./stored`). Reason: a business with its own voucher system sells its vouchers at the till; the tile replaces typing the kind every time.
12
+ - **Article rules** `checkExternalVoucherArticle` / `checkExternalVoucherValue`, twin of the backend's `fremdgutschein-artikel-core` (`pruefeArtikel`/`pruefeWert`): reasons `EXTERNAL_VOUCHER_ARTICLE_REASONS` in the server's order (`invalid_type`, `service_voucher`, `add_ons`, `stock_tracked`, `reference`, `asks_quantity`, `rate_required`, `invalid_rate`, `price_required`) – the `data.grund` of `article_external_voucher_invalid` (`ARTICLE_EXTERNAL_VOUCHER_INVALID`). Single-purpose needs a rate of the till (`ARTICLE_EXTERNAL_VOUCHER_VAT_RATES`, percent: 20, 13, 10, 4.9, 0, 19; 0 = sold exempt). Contract cases `fixtures/external-voucher-article-cases.json`, byte for byte the backend's `fremdgutschein-artikel-faelle.json` (for the article editor of the customer area and the Dart package). Saving articles stays in the customer area (`createMyArticle`/`updateMyArticle` with the inner name, no `/v3` edge); the inventory API `createArticle`/`updateArticle` does not carry the field, the server refuses it there.
13
+ - **Tile lock** `externalVoucherTileBlock(article, externalVouchers)`: `not_enabled` (release `off` or unknown) or `type_not_enabled` (single-purpose without `all`), the same rule the server applies to the receipt; sentences in `EXTERNAL_VOUCHER_TILE_MESSAGES`.
14
+ - **Own code look-alikes** `ownVoucherCodeShape(text)` -> `'valid' | 'checksum' | 'length' | 'none'` (`OWN_VOUCHER_CODE_SHAPES`, type `OwnVoucherCodeShape`, root and `./pos`): read like `checkExternalVoucherNumber` (edge trimmed, `.`, `_`, `/` as `-`, then the normalisation of `VoucherCode`). `checksum` = 12 characters of the code alphabet with a wrong check symbol, `length` = pattern `4-4-x` with real hyphens (never `.`, `_`, `/`: `WEIN.2026/7` asks nothing) but not 12 characters. Reason: a twelve-digit web shop number looks like an own code; the till asks („Sieht aus wie ein Kasseneck-Code, ist aber keiner. Als fremden Gutschein verwenden?“, `external_voucher.looks_like_own_code`, button `external_voucher.use_as_external`) instead of refusing it. Only `valid` is refused by the server (`external_voucher_number_is_own_code`).
15
+ - **Add-on tiles:** `isSelectableAddOn` gains the reason `external_voucher` (`ADD_ON_BLOCK_REASONS`): an external voucher article is never an add-on (it would be booked as a normal line). `fixtures/add-on-cases.json` re-copied from the backend's `zusatz-faelle.json` (article `fremd`).
16
+ - **Texts:** messages `external_voucher.not_enabled`, `external_voucher.type_not_enabled`, `external_voucher.looks_like_own_code`, `cancellation.external_voucher_check`, `settings.external_vouchers_hint`, `external_voucher_article.*` (one per reason plus `invalid`, mapped in `EXTERNAL_VOUCHER_ARTICLE_MESSAGES`, `externalVoucherArticleErrorMessage(code, reason)`); labels `external_voucher.number`, `.title`, `.kind`, `.kind_value`, `.kind_service`, `.rate`, `.taxed_with`, `.line_name`, `.use_as_external`, `voucher.payout_source_own`, `voucher.payout_source_external`, `settings.external_vouchers` with its three stages (`EXTERNAL_VOUCHERS_LABELS`), `article.external_voucher`; kind labels in `EXTERNAL_VOUCHER_KIND_LABELS`. Amount and reason reuse `tile_prompt.amount`, `voucher.amount` and `voucher.reason`. `fixtures/pos-texts.json` carries the four new mappings.
17
+ - **Tip kept in three modes:** optional `business.tipKeptMode` (`ask | always | never`, `TIP_KEPT_MODE`, type `PosTipKeptMode`, stored `tgDirektModus` = `fragen | immer | nie`; in `POS_BUSINESS_OPTIONAL_CHOICES`, missing or unknown = `ask`). `posTipKeptMode(business)` and the one rule for both tills `tipKeptFor(business, wanted?)` -> `{ showSwitch, kept }` (`TipKeptDecision`): `ask` shows the switch, preset `tipKeptByDefault`, a switch choice wins; `always`/`never` show no switch and keep / leave open. `kept` goes to the receipt as before (the server does not enforce the mode). Labels `tip_kept_mode.title`, `.always`, `.never`, `.ask` (`TIP_KEPT_MODE_LABELS`, also in `pos-texts.json` as `tipKeptModeLabels`), messages `tip.kept_hint` and `tip.open_hint` (the hints both tills had hard-coded). `stored-backend` now compares settings through `mischeBetrieb`/`mischeGeraet`, the merge `getKasseSettings` actually uses.
18
+ - **Discount presets (named discount chips):** optional `business.discountPresets` (`PosDiscountPreset` = `{ name, kind: 'percent' | 'amount', percentBp?, amountCents? }`, kinds in `DISCOUNT_PRESET_KIND`, type `PosDiscountPresetKind`; stored `rabattVorlagen` with `art` = `prozent | betrag`, `prozentBp`, `betragCents`; listed in `POS_BUSINESS_OPTIONAL_LISTS`). Present (even empty) the presets are the source of the chips and `discountChips` mirrors their percentages for older tills (`discountChipsFromPresets`: percentages in order, equal values once, amounts dropped); missing = `discountChips` as before. The reader keeps the entries that have the shape of a preset and drops a preset with an unknown kind. `posDiscountPresets(business)` is the effective list (stored presets, else the chips as unnamed percent presets), `discountPresetChipText(preset)` the chip text (`Stammkunde 5,00 €`, `Mitarbeiter-Rabatt 20 %`, `10,5 %`). `checkDiscountPresets(list)` -> `{ ok, value } | { ok: false, code: 'invalid_discount_preset', errors: [{ index, field, reason, message }] }` is the server's rule (at most 5, name 1-24 characters after trimming without control characters, unique ignoring case, percent 0.1-100 in steps of 0.1, amount 0.01-1,000,000.00 EUR, only the value field of the kind); `setMyPosSettings` runs it before sending. Error code `invalid_discount_preset` in `POS_ERROR_CODES`. `./stored` reads the stored list like the server (an invalid list is missing without a note, English kind or field names are unknown inside) and lets the chips follow the presets.
19
+ - **Discounts on the shift bon:** `ShiftRunningTotals.discounts` and `ShiftSummaryReceipt.discounts` (`ShiftDiscount` = `{ name, cents, count }`, display only, sent from the first discount on). `shiftReceiptLayout` prints the block `Rabatte` after the non-cash lines (`<name> (n×)`, the amount negative, from two entries on `Rabatte gesamt`, an empty name reads `Rabatt`, a name with amount 0 (fully cancelled) is left out like in the server's list; `discountBlockLines`); without discounts the bon is byte for byte the same. Cases `fixtures/discount-preset-cases.json` (effective list, chip text, mirror, check, bon block) are the backend's `discount-preset-cases.json`, byte for byte.
20
+ - **Texts:** labels `discount_presets.*` (title, name, percent, amount, add, remove, limit), `shift_receipt.discounts`, `.discounts_total`, `.discount_line`, `.discount_unnamed`; messages `discount_preset.*` (one per reason, `DISCOUNT_PRESET_MESSAGES`) and `discount.preset_over_total` (an amount chip above the discountable total).
21
+ - **Custom discount at the till:** optional `business.customDiscountAllowed` (boolean, stored `rabattFrei`; in `POS_BUSINESS_OPTIONAL_FIELDS`, sent only when stored, missing = `true`). `false` = the till offers only the discount chips, no free amount or percent field; `posCustomDiscountAllowed(business)` (`./pos`) returns the effective value. UI only, the server does not check receipts against it (older tills do not know the switch).
22
+ - Contract `v3` re-fetched (`externalVoucher` on articles, catalog `ARTIKEL_FREMDGUTSCHEIN`, `business.tipKeptMode`, `business.discountPresets`, `business.customDiscountAllowed`), `receipt-due-voucher-generated.json` re-generated (only `_source` changed), stored twin hashes re-pinned against the backend.
23
+
7
24
  ## 1.30.0 - 2026-11-07
8
25
 
9
26
  External vouchers and receipt webhooks (backend November 2026). Additive; receipts, requests and settings without the new fields read, send and print exactly as before (all existing goldens unchanged, the generated voucher due cases byte for byte the same).
@@ -1,5 +1,5 @@
1
1
  export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
2
- export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
2
+ export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
3
  export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
4
4
  export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
package/dist/cjs/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
4
- exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = void 0;
5
- exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = void 0;
6
- exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = void 0;
7
- exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = void 0;
3
+ exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
4
+ exports.registerUserAuth = exports.apiKeyAuth = exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = void 0;
5
+ exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = void 0;
6
+ exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = void 0;
7
+ exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = void 0;
8
8
  var index_js_1 = require("./enums/index.js");
9
9
  Object.defineProperty(exports, "ReceiptType", { enumerable: true, get: function () { return index_js_1.ReceiptType; } });
10
10
  Object.defineProperty(exports, "VatRate", { enumerable: true, get: function () { return index_js_1.VatRate; } });
@@ -30,6 +30,8 @@ Object.defineProperty(exports, "isExternalVoucher", { enumerable: true, get: fun
30
30
  Object.defineProperty(exports, "externalVoucherIsValid", { enumerable: true, get: function () { return index_js_2.externalVoucherIsValid; } });
31
31
  Object.defineProperty(exports, "normalizeExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.normalizeExternalVoucherNumber; } });
32
32
  Object.defineProperty(exports, "checkExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.checkExternalVoucherNumber; } });
33
+ Object.defineProperty(exports, "ownVoucherCodeShape", { enumerable: true, get: function () { return index_js_2.ownVoucherCodeShape; } });
34
+ Object.defineProperty(exports, "OWN_VOUCHER_CODE_SHAPES", { enumerable: true, get: function () { return index_js_2.OWN_VOUCHER_CODE_SHAPES; } });
33
35
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_NUMBER_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_NUMBER_MAX; } });
34
36
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_TAXED_WITH_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_TAXED_WITH_MAX; } });
35
37
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_VAT_RATES_BP", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_VAT_RATES_BP; } });
@@ -1,5 +1,5 @@
1
1
  export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isDiscountItem, isVoucherItem, isVoucherFloatItem, } from './receipt-item.js';
2
- export { type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, isNewFormVoucher, voucherServerFields, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, } from './voucher.js';
2
+ export { type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, isNewFormVoucher, voucherServerFields, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, } from './voucher.js';
3
3
  export { type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, readRegistrationInfo, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, } from './receipt.js';
4
4
  export { 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, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, } from './cancellation.js';
5
5
  export { type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, } from './receipt-payment.js';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = 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.readRegistrationInfo = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherServerFields = exports.isNewFormVoucher = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isDiscountItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = void 0;
4
- exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isManualReceiptErrorCode = exports.MANUAL_RECEIPT_ERROR_CODES = exports.readManualReceipt = exports.MANUAL_RECEIPT_REASONS = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = 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 = void 0;
3
+ exports.fromReceiptPaymentPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = 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.readRegistrationInfo = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherServerFields = exports.isNewFormVoucher = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isDiscountItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = void 0;
4
+ exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isManualReceiptErrorCode = exports.MANUAL_RECEIPT_ERROR_CODES = exports.readManualReceipt = exports.MANUAL_RECEIPT_REASONS = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = 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 = void 0;
5
5
  var receipt_item_js_1 = require("./receipt-item.js");
6
6
  Object.defineProperty(exports, "toReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.toReceiptItemPayload; } });
7
7
  Object.defineProperty(exports, "fromReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.fromReceiptItemPayload; } });
@@ -23,6 +23,8 @@ Object.defineProperty(exports, "isExternalVoucher", { enumerable: true, get: fun
23
23
  Object.defineProperty(exports, "externalVoucherIsValid", { enumerable: true, get: function () { return voucher_js_1.externalVoucherIsValid; } });
24
24
  Object.defineProperty(exports, "normalizeExternalVoucherNumber", { enumerable: true, get: function () { return voucher_js_1.normalizeExternalVoucherNumber; } });
25
25
  Object.defineProperty(exports, "checkExternalVoucherNumber", { enumerable: true, get: function () { return voucher_js_1.checkExternalVoucherNumber; } });
26
+ Object.defineProperty(exports, "ownVoucherCodeShape", { enumerable: true, get: function () { return voucher_js_1.ownVoucherCodeShape; } });
27
+ Object.defineProperty(exports, "OWN_VOUCHER_CODE_SHAPES", { enumerable: true, get: function () { return voucher_js_1.OWN_VOUCHER_CODE_SHAPES; } });
26
28
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_NUMBER_MAX", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_NUMBER_MAX; } });
27
29
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_TAXED_WITH_MAX", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_TAXED_WITH_MAX; } });
28
30
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_VAT_RATES_BP", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_VAT_RATES_BP; } });
@@ -242,6 +242,24 @@ export type ExternalVoucherNumberCheck = {
242
242
  * `external_voucher_number_is_own_code`, der Gutschein gehoert als eigener eingeloest –, danach die Form.
243
243
  */
244
244
  export declare function checkExternalVoucherNumber(text: unknown): ExternalVoucherNumberCheck;
245
+ /**
246
+ * Wie sehr eine Eingabe einem eigenen Gutscheincode gleicht ([ownVoucherCodeShape]): `valid` = gueltiger eigener
247
+ * Code; `checksum` = 12 Zeichen des Code-Alphabets mit falschem Pruefzeichen (z. B. eine zwoelfstellige
248
+ * Webshop-Nummer); `length` = Muster `4-4-x` mit echten Bindestrichen `-` (nie `.`, `_`, `/`), aber nicht 12 Zeichen;
249
+ * `none` = keine Aehnlichkeit.
250
+ */
251
+ export type OwnVoucherCodeShape = 'valid' | 'checksum' | 'length' | 'none';
252
+ export declare const OWN_VOUCHER_CODE_SHAPES: readonly OwnVoucherCodeShape[];
253
+ /**
254
+ * Form-Erkennung eigener Codes fuer das Feld „Code eingeben oder scannen“ (Web-Kasse und Kassen-App gleich):
255
+ * `valid` laeuft als eigener Gutschein, `checksum`/`length` fragt die Kasse nach („Sieht aus wie ein
256
+ * Kasseneck-Code, ist aber keiner. Als fremden Gutschein verwenden?“, `external_voucher.looks_like_own_code`),
257
+ * `none` geht bei Freigabe direkt in das Blatt „Fremder Gutschein“. Gelesen wie [checkExternalVoucherNumber]:
258
+ * Rand weg, `.`, `_`, `/` wie `-`, dann die Normalisierung von `VoucherCode` (gross, ohne Leerraum und `-`,
259
+ * O → 0, I/L → 1); `length` nur mit echten Bindestrichen. Eine Nachfrage weist nichts ab: der Server prueft die Fremdnummer selbst
260
+ * (`external_voucher_number_is_own_code` nur bei `valid`).
261
+ */
262
+ export declare function ownVoucherCodeShape(text: unknown): OwnVoucherCodeShape;
245
263
  /**
246
264
  * Ist der Fremdgutschein sendbar? Die Form wie `gutschein-beleg.pruefeFremd` (ohne die Freigabe des Kontos, die
247
265
  * kennt nur der Server bzw. `PosVoucherSettings.externalVouchers`): Aktion `sell`/`redeem`/`payout`, Art
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.GUTSCHEIN_SERVERFELDER = exports.VOUCHER_SOURCES = exports.NEUE_GUTSCHEINARTEN = void 0;
3
+ exports.OWN_VOUCHER_CODE_SHAPES = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.GUTSCHEIN_SERVERFELDER = exports.VOUCHER_SOURCES = exports.NEUE_GUTSCHEINARTEN = void 0;
4
4
  exports.isExternalVoucher = isExternalVoucher;
5
5
  exports.isNewFormVoucher = isNewFormVoucher;
6
6
  exports.istWertVerkauf = istWertVerkauf;
@@ -11,6 +11,7 @@ exports.fromVoucherPayload = fromVoucherPayload;
11
11
  exports.wunschFormGueltig = wunschFormGueltig;
12
12
  exports.normalizeExternalVoucherNumber = normalizeExternalVoucherNumber;
13
13
  exports.checkExternalVoucherNumber = checkExternalVoucherNumber;
14
+ exports.ownVoucherCodeShape = ownVoucherCodeShape;
14
15
  exports.externalVoucherIsValid = externalVoucherIsValid;
15
16
  const index_js_1 = require("../enums/index.js");
16
17
  const validator_1 = require("@kreiseck/validator");
@@ -285,6 +286,36 @@ function checkExternalVoucherNumber(text) {
285
286
  const number = normalizeExternalVoucherNumber(text);
286
287
  return number === null ? { ok: false, code: 'external_voucher_number_invalid' } : { ok: true, number };
287
288
  }
289
+ exports.OWN_VOUCHER_CODE_SHAPES = Object.freeze(['valid', 'checksum', 'length', 'none']);
290
+ /** Alphabet der eigenen Codes (Crockford-Base32 ohne U), nach der Normalisierung von `VoucherCode`. */
291
+ const CODE_ALPHABET = /^[0-9A-HJKMNP-TV-Z]+$/;
292
+ const CODE_GRUPPEN = /^[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]+$/;
293
+ /**
294
+ * Form-Erkennung eigener Codes fuer das Feld „Code eingeben oder scannen“ (Web-Kasse und Kassen-App gleich):
295
+ * `valid` laeuft als eigener Gutschein, `checksum`/`length` fragt die Kasse nach („Sieht aus wie ein
296
+ * Kasseneck-Code, ist aber keiner. Als fremden Gutschein verwenden?“, `external_voucher.looks_like_own_code`),
297
+ * `none` geht bei Freigabe direkt in das Blatt „Fremder Gutschein“. Gelesen wie [checkExternalVoucherNumber]:
298
+ * Rand weg, `.`, `_`, `/` wie `-`, dann die Normalisierung von `VoucherCode` (gross, ohne Leerraum und `-`,
299
+ * O → 0, I/L → 1); `length` nur mit echten Bindestrichen. Eine Nachfrage weist nichts ab: der Server prueft die Fremdnummer selbst
300
+ * (`external_voucher_number_is_own_code` nur bei `valid`).
301
+ */
302
+ function ownVoucherCodeShape(text) {
303
+ if (typeof text !== 'string')
304
+ return 'none';
305
+ const roh = text.replace(FREMD_RAND_MUSTER, '');
306
+ const t = roh.replace(/[._/]/g, '-');
307
+ if (t === '')
308
+ return 'none';
309
+ if (validator_1.VoucherCode.validate(t).ok)
310
+ return 'valid';
311
+ const s = t.toUpperCase().replace(/[\s-]/g, '').replace(/O/g, '0').replace(/[IL]/g, '1');
312
+ if (!CODE_ALPHABET.test(s))
313
+ return 'none';
314
+ if (s.length === 12)
315
+ return 'checksum';
316
+ // Falsche Laenge nur mit echten Bindestrichen: eigene Codes stehen immer so da, `WEIN.2026/7` ist keiner.
317
+ return CODE_GRUPPEN.test(roh) ? 'length' : 'none';
318
+ }
288
319
  /** Steuer- und Formatzeichen (`gutschein-core.STEUERZEICHEN`): nie in `taxedWith`. */
289
320
  const STEUERZEICHEN = /[\p{Cc}\p{Cf}]/u;
290
321
  /**
@@ -1,5 +1,6 @@
1
1
  import type { InternerTransport } from '../client/aufrufe.js';
2
2
  import { type PosReference } from './kachel-referenz.js';
3
+ import { type ArticleExternalVoucher } from './fremdgutschein-artikel.js';
3
4
  /**
4
5
  * Artikelgruppen (Kategorien der Kachel-Kasse) und Artikel in der Form, die
5
6
  * die Kacheln brauchen, Backend: `article-endpoints.js`
@@ -121,6 +122,16 @@ export interface PosArticle {
121
122
  * immer; wirksam wird es ueber [addOnsFor].
122
123
  */
123
124
  addOns?: string[] | null;
125
+ /**
126
+ * Kachel verkauft einen fremden Gutschein (1.31.0): `multi_purpose` =
127
+ * Wertgutschein, `single_purpose` = Leistungsgutschein mit dem Satz des
128
+ * Artikels; null = normaler Artikel. Die Kasse fragt die Gutscheinnummer ab
129
+ * und sendet einen `vouchers[]`-Eintrag statt einer Position; sperren ueber
130
+ * [externalVoucherTileBlock]. Vor `stockTracked` werten (ein Fremdgutschein
131
+ * fuehrt nie Bestand). Optional wie `addOns`, der Leser setzt es immer; ein
132
+ * unbekannter Wert wird null.
133
+ */
134
+ externalVoucher?: ArticleExternalVoucher | null;
124
135
  }
125
136
  /**
126
137
  * Kann die Kachel gebucht werden? Mit festem Preis immer, ohne Preis nur mit
@@ -161,6 +172,7 @@ export interface PosArticlePayload {
161
172
  askPrice?: boolean | null;
162
173
  reference?: unknown;
163
174
  addOns?: unknown;
175
+ externalVoucher?: unknown;
164
176
  }
165
177
  export declare function fromPosArticlePayload(p: PosArticlePayload): PosArticle;
166
178
  /**
@@ -14,6 +14,7 @@ exports.listMyArticleGroups = listMyArticleGroups;
14
14
  exports.listMyArticles = listMyArticles;
15
15
  const errors_js_1 = require("../client/errors.js");
16
16
  const kachel_referenz_js_1 = require("./kachel-referenz.js");
17
+ const fremdgutschein_artikel_js_1 = require("./fremdgutschein-artikel.js");
17
18
  /** Zusatzliste am Draht: nur eine Liste von Texten zaehlt, sonst null. Paketintern. */
18
19
  function addOnListe(wert) {
19
20
  return Array.isArray(wert) ? wert.filter((s) => typeof s === 'string' && s !== '') : null;
@@ -106,6 +107,7 @@ function fromPosArticlePayload(p) {
106
107
  askPrice: p.askPrice === true,
107
108
  reference: (0, kachel_referenz_js_1.fromReferencePayload)(p.reference),
108
109
  addOns: addOnListe(p.addOns),
110
+ externalVoucher: (0, fremdgutschein_artikel_js_1.isArticleExternalVoucher)(p.externalVoucher) ? p.externalVoucher : null,
109
111
  };
110
112
  }
111
113
  /**
@@ -7,6 +7,7 @@ exports.setMyRegisterDeviceSettings = setMyRegisterDeviceSettings;
7
7
  exports.setMyPosLogo = setMyPosLogo;
8
8
  const errors_js_1 = require("../client/errors.js");
9
9
  const gutschein_js_1 = require("./gutschein.js");
10
+ const rabatt_vorlagen_js_1 = require("./rabatt-vorlagen.js");
10
11
  const settings_js_1 = require("./settings.js");
11
12
  /*
12
13
  * Die Einstellungs-Aufrufe am Draht `/api/v3`: Parameter und Antwort heissen
@@ -151,6 +152,16 @@ function pruefeTeil(name, teil, block, standard, werte) {
151
152
  throw new errors_js_1.KasseneckValidationError(name, `${teil}.${schluessel}: true oder false erwartet`, 'request');
152
153
  continue;
153
154
  }
155
+ // Rabatt-Vorlagen: dieselbe Pruefung wie am Server, der erste Fehler mit Vorlage, Feld und Satz.
156
+ if (teil === 'business' && settings_js_1.POS_BUSINESS_OPTIONAL_LISTS.includes(schluessel)) {
157
+ const geprueft = (0, rabatt_vorlagen_js_1.checkDiscountPresets)(wert);
158
+ if (!geprueft.ok) {
159
+ const f = geprueft.errors[0];
160
+ const ort = `${teil}.${schluessel}${f.index === null ? '' : `[${f.index}]`}${f.field === null ? '' : `.${f.field}`}`;
161
+ throw new errors_js_1.KasseneckValidationError(name, `${ort}: ${f.message} (${rabatt_vorlagen_js_1.INVALID_DISCOUNT_PRESET})`, 'request');
162
+ }
163
+ continue;
164
+ }
154
165
  const wahl = teil === 'business' ? settings_js_1.POS_BUSINESS_OPTIONAL_CHOICES : settings_js_1.POS_DEVICE_OPTIONAL_CHOICES;
155
166
  if (!Object.prototype.hasOwnProperty.call(standard, schluessel) && !wahl.includes(schluessel)) {
156
167
  throw new errors_js_1.KasseneckValidationError(name, `${teil}.${schluessel}: unbekanntes Feld`, 'request');
@@ -21,7 +21,7 @@ import { KasseneckApiError } from '../client/errors.js';
21
21
  * ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
22
22
  * Rueckfallzweig.
23
23
  */
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
+ 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_discount_preset", "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"];
25
25
  export type PosErrorCode = typeof POS_ERROR_CODES[number];
26
26
  export declare function isPosErrorCode(value: unknown): value is PosErrorCode;
27
27
  /** Der Code eines geworfenen Fehlers, wenn er in [POS_ERROR_CODES] steht; sonst `undefined`. */
@@ -57,6 +57,7 @@ exports.POS_ERROR_CODES = Object.freeze([
57
57
  'invalid_amount',
58
58
  'invalid_cursor',
59
59
  'invalid_denominations',
60
+ 'invalid_discount_preset',
60
61
  'invalid_movement_type',
61
62
  'invalid_quantity',
62
63
  'invalid_serial',
@@ -0,0 +1,66 @@
1
+ import type { PosExternalVouchers } from './gutschein.js';
2
+ /**
3
+ * Artikel als fremder Gutschein (Fremdgutscheine an der Kasse, 1.31.0): der
4
+ * Chef legt einen Artikel als Kachel „fremder Gutschein“ an. Die Kasse fragt
5
+ * beim Antippen die Gutscheinnummer (und ohne Preis den Betrag) ab und sendet
6
+ * statt einer Position einen `vouchers[]`-Eintrag
7
+ * `{ source: 'external', action: 'sell', type: externalVoucher, number, amountCents, vatRateBp? }`.
8
+ *
9
+ * Die Regeln am Artikel rechnet das Backend (`functions-kasse/fremdgutschein-artikel-core.js`)
10
+ * beim Speichern (`createMyArticle`/`updateMyArticle`, Code `article_external_voucher_invalid`
11
+ * mit `data.grund`); der Artikel-Editor des Kundenbereichs prueft vorher gleich. Vertrag sind
12
+ * die Pruefaelle `fixtures/external-voucher-article-cases.json` (byte-gleich mit dem Backend).
13
+ */
14
+ /** Art des fremden Gutscheins am Artikel (`/v3` `externalVoucher`, gespeichert `fremdgutschein`). */
15
+ export type ArticleExternalVoucher = 'multi_purpose' | 'single_purpose';
16
+ export declare const ARTICLE_EXTERNAL_VOUCHER_TYPES: readonly ArticleExternalVoucher[];
17
+ /** Fehlercode beim Speichern eines Artikels, intern und unter `/v3` gleich. */
18
+ export declare const ARTICLE_EXTERNAL_VOUCHER_INVALID = "article_external_voucher_invalid";
19
+ /** Welche Regel verletzt ist (Antwortfeld `data.grund`), in der Reihenfolge, in der der Server prueft. */
20
+ export declare const EXTERNAL_VOUCHER_ARTICLE_REASONS: readonly ["invalid_type", "service_voucher", "add_ons", "stock_tracked", "reference", "asks_quantity", "rate_required", "invalid_rate", "price_required"];
21
+ export type ExternalVoucherArticleReason = typeof EXTERNAL_VOUCHER_ARTICLE_REASONS[number];
22
+ /**
23
+ * Ein Artikel im Editor (`/v3`-Form), soweit die Regeln ihn lesen. Bewusst
24
+ * `unknown` beim Wert: der Editor prueft auch, was nicht in den Typ passt.
25
+ */
26
+ export interface ExternalVoucherArticleInput {
27
+ externalVoucher?: unknown;
28
+ unitPriceCents?: number | null;
29
+ vatRate?: number | null;
30
+ askPrice?: boolean | null;
31
+ serviceVoucher?: boolean | null;
32
+ addOns?: readonly unknown[] | null;
33
+ stockTracked?: boolean | null;
34
+ reference?: unknown;
35
+ askQuantity?: boolean | null;
36
+ }
37
+ /**
38
+ * Saetze, mit denen ein Einzweckgutschein verkauft werden kann (Prozent wie
39
+ * `PosArticle.vatRate`; 0 = befreit verkauft): die Saetze der Kasse, Backend
40
+ * `article-groups-core.STEUERSAETZE`, dieselben wie [EXTERNAL_VOUCHER_VAT_RATES_BP] / 100.
41
+ */
42
+ export declare const ARTICLE_EXTERNAL_VOUCHER_VAT_RATES: readonly number[];
43
+ /** Ist der Wert eine Art fremder Gutschein? */
44
+ export declare function isArticleExternalVoucher(value: unknown): value is ArticleExternalVoucher;
45
+ /** Form des Werts beim Speichern: `null` heisst entfernen und ist gueltig. Zwilling von `pruefeWert`. */
46
+ export declare function checkExternalVoucherValue(value: unknown): ExternalVoucherArticleReason | null;
47
+ /**
48
+ * Regeln am wirksamen Artikelstand (Bestand + Aenderung), Zwilling von
49
+ * `pruefeArtikel`: `null` = passt. Ohne `externalVoucher` gilt keine Regel.
50
+ * Einzweck verlangt einen Satz der Kasse (0 = befreit verkauft), Mehrzweck ignoriert ihn;
51
+ * nie zusammen mit Leistungsgutschein, eigener Zusatzliste, Lagerbestand,
52
+ * Referenz oder Mengenabfrage (die Kasse fragt die Nummer selbst und bucht
53
+ * genau einen); ohne `askPrice` braucht er einen Preis ab 1 Cent.
54
+ */
55
+ export declare function checkExternalVoucherArticle(a: ExternalVoucherArticleInput): ExternalVoucherArticleReason | null;
56
+ /** Warum die Kachel eines fremden Gutscheins gesperrt ist. */
57
+ export type ExternalVoucherTileBlock = 'not_enabled' | 'type_not_enabled';
58
+ /**
59
+ * Darf die Kachel verkaufen? `null` = ja (auch fuer jeden Artikel ohne
60
+ * `externalVoucher`). Gesperrt bei Freigabe `off` (oder ohne Angabe) und bei
61
+ * Einzweck ohne `all` -- dieselbe Regel, mit der der Server den Beleg abweist
62
+ * (`external_voucher_not_enabled`, `external_voucher_type_not_enabled`).
63
+ */
64
+ export declare function externalVoucherTileBlock(article: {
65
+ externalVoucher?: ArticleExternalVoucher | null;
66
+ }, externalVouchers: PosExternalVouchers | null | undefined): ExternalVoucherTileBlock | null;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES = exports.EXTERNAL_VOUCHER_ARTICLE_REASONS = exports.ARTICLE_EXTERNAL_VOUCHER_INVALID = exports.ARTICLE_EXTERNAL_VOUCHER_TYPES = void 0;
4
+ exports.isArticleExternalVoucher = isArticleExternalVoucher;
5
+ exports.checkExternalVoucherValue = checkExternalVoucherValue;
6
+ exports.checkExternalVoucherArticle = checkExternalVoucherArticle;
7
+ exports.externalVoucherTileBlock = externalVoucherTileBlock;
8
+ exports.ARTICLE_EXTERNAL_VOUCHER_TYPES = Object.freeze(['multi_purpose', 'single_purpose']);
9
+ /** Fehlercode beim Speichern eines Artikels, intern und unter `/v3` gleich. */
10
+ exports.ARTICLE_EXTERNAL_VOUCHER_INVALID = 'article_external_voucher_invalid';
11
+ /** Welche Regel verletzt ist (Antwortfeld `data.grund`), in der Reihenfolge, in der der Server prueft. */
12
+ exports.EXTERNAL_VOUCHER_ARTICLE_REASONS = Object.freeze([
13
+ 'invalid_type', 'service_voucher', 'add_ons', 'stock_tracked', 'reference', 'asks_quantity', 'rate_required', 'invalid_rate', 'price_required',
14
+ ]);
15
+ /**
16
+ * Saetze, mit denen ein Einzweckgutschein verkauft werden kann (Prozent wie
17
+ * `PosArticle.vatRate`; 0 = befreit verkauft): die Saetze der Kasse, Backend
18
+ * `article-groups-core.STEUERSAETZE`, dieselben wie [EXTERNAL_VOUCHER_VAT_RATES_BP] / 100.
19
+ */
20
+ exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES = Object.freeze([20, 13, 10, 4.9, 0, 19]);
21
+ /** Ist der Wert eine Art fremder Gutschein? */
22
+ function isArticleExternalVoucher(value) {
23
+ return exports.ARTICLE_EXTERNAL_VOUCHER_TYPES.includes(value);
24
+ }
25
+ /** Form des Werts beim Speichern: `null` heisst entfernen und ist gueltig. Zwilling von `pruefeWert`. */
26
+ function checkExternalVoucherValue(value) {
27
+ return value === null || isArticleExternalVoucher(value) ? null : 'invalid_type';
28
+ }
29
+ /**
30
+ * Regeln am wirksamen Artikelstand (Bestand + Aenderung), Zwilling von
31
+ * `pruefeArtikel`: `null` = passt. Ohne `externalVoucher` gilt keine Regel.
32
+ * Einzweck verlangt einen Satz der Kasse (0 = befreit verkauft), Mehrzweck ignoriert ihn;
33
+ * nie zusammen mit Leistungsgutschein, eigener Zusatzliste, Lagerbestand,
34
+ * Referenz oder Mengenabfrage (die Kasse fragt die Nummer selbst und bucht
35
+ * genau einen); ohne `askPrice` braucht er einen Preis ab 1 Cent.
36
+ */
37
+ function checkExternalVoucherArticle(a) {
38
+ if (a.externalVoucher == null)
39
+ return null;
40
+ if (!isArticleExternalVoucher(a.externalVoucher))
41
+ return 'invalid_type';
42
+ if (a.serviceVoucher === true)
43
+ return 'service_voucher';
44
+ if (Array.isArray(a.addOns) && a.addOns.length > 0)
45
+ return 'add_ons';
46
+ if (a.stockTracked === true)
47
+ return 'stock_tracked';
48
+ if (a.reference)
49
+ return 'reference';
50
+ if (a.askQuantity === true)
51
+ return 'asks_quantity';
52
+ if (a.externalVoucher === 'single_purpose' && !(typeof a.vatRate === 'number' && Number.isFinite(a.vatRate)))
53
+ return 'rate_required';
54
+ if (a.externalVoucher === 'single_purpose' && !exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES.includes(a.vatRate))
55
+ return 'invalid_rate';
56
+ if (a.askPrice !== true && !(typeof a.unitPriceCents === 'number' && Number.isInteger(a.unitPriceCents) && a.unitPriceCents >= 1))
57
+ return 'price_required';
58
+ return null;
59
+ }
60
+ /**
61
+ * Darf die Kachel verkaufen? `null` = ja (auch fuer jeden Artikel ohne
62
+ * `externalVoucher`). Gesperrt bei Freigabe `off` (oder ohne Angabe) und bei
63
+ * Einzweck ohne `all` -- dieselbe Regel, mit der der Server den Beleg abweist
64
+ * (`external_voucher_not_enabled`, `external_voucher_type_not_enabled`).
65
+ */
66
+ function externalVoucherTileBlock(article, externalVouchers) {
67
+ if (article.externalVoucher == null)
68
+ return null;
69
+ if (externalVouchers !== 'multi_purpose' && externalVouchers !== 'all')
70
+ return 'not_enabled';
71
+ if (article.externalVoucher === 'single_purpose' && externalVouchers !== 'all')
72
+ return 'type_not_enabled';
73
+ return null;
74
+ }
@@ -6,16 +6,19 @@
6
6
  * die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
7
7
  * und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
8
8
  */
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, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posTipKinds, posTipStart, posCartWidth, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, CART_WIDTH, type PosTipKind, type PosCartWidth, 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, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, tipKeptFor, type TipKeptDecision, DISCOUNT_PRESET_KIND, type PosDiscountPreset, type PosDiscountPresetKind, POS_BUSINESS_OPTIONAL_LISTS, posTipKinds, posTipStart, posCartWidth, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, TIP_KEPT_MODE, type PosTipKeptMode, CART_WIDTH, type PosTipKind, type PosCartWidth, 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';
10
10
  export { type ArticleGroup, type ArticleGroupPayload, fromArticleGroupPayload, type PosArticle, type PosArticlePayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, type QuantityRule, type QuantityDefaults, quantityRuleForUnit, quantityDefaults, allowedQuantity, isBookableArticle, tilePrompts, } from './artikel.js';
11
11
  export { REFERENCE_MODES, type ReferenceMode, type PosReference, REFERENCE_INPUT_MAX, REFERENCE_LABEL_MAX, REFERENCE_HINT_MAX, REFERENCE_PATTERN_MAX, REFERENCE_PATTERN_TEMPLATES, cleanReferenceText, isValidReferencePattern, isDigitsOnlyPattern, type ReferenceCheckResult, checkReference, referenceLineName, fromReferencePayload, } from './kachel-referenz.js';
12
12
  export { ADD_ONS_MAX, ADD_ON_BLOCK_REASONS, type AddOnBlockReason, isSelectableAddOn, addOnsFor, addOnReferencesValid, addOnsOfItem, addOnRemap, addOnDisplayOrder, orderAddOnLines, } from './zusaetze.js';
13
+ export { ARTICLE_EXTERNAL_VOUCHER_TYPES, type ArticleExternalVoucher, ARTICLE_EXTERNAL_VOUCHER_INVALID, ARTICLE_EXTERNAL_VOUCHER_VAT_RATES, EXTERNAL_VOUCHER_ARTICLE_REASONS, type ExternalVoucherArticleReason, type ExternalVoucherArticleInput, isArticleExternalVoucher, checkExternalVoucherValue, checkExternalVoucherArticle, type ExternalVoucherTileBlock, externalVoucherTileBlock, } from './fremdgutschein-artikel.js';
14
+ export { ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape } from '../models/voucher.js';
13
15
  export { getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, setMyPosLogo, posSettingsFromWire, type SetMyPosLogoOptions, } from './client.js';
14
16
  export { POS_ERROR_CODES, type PosErrorCode, isPosErrorCode, posErrorCode, isPosError, type PosFieldError, posFieldErrors, } from './errors.js';
15
17
  export { distributeDiscount } from '../receipt/discount.js';
16
18
  export { cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, type VoucherPerms, type RegisterScope, type RegisterUserPerms } from '../register/pairing.js';
17
19
  export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STATUSES, type PrintJobSource, PRINT_JOB_SOURCES, isPrintJobFinished, type CreatePrintJobOptions, listMyPrinters, createPrintJob, getPrintJob, } from './drucker.js';
18
20
  export { listMyTipRecipients } from './trinkgeld.js';
21
+ export { posDiscountPresets, discountPresetChipText, discountChipsFromPresets, checkDiscountPresets, discountBlockLines, INVALID_DISCOUNT_PRESET, DISCOUNT_PRESETS_MAX, DISCOUNT_PRESET_NAME_MAX, DISCOUNT_PRESET_PERCENT_BP, DISCOUNT_PRESET_AMOUNT_CENTS, DISCOUNT_PRESET_MESSAGES, type DiscountPresetReason, type DiscountPresetError, type DiscountPresetsCheck, type DiscountBlockLine, type DiscountTotal, } from './rabatt-vorlagen.js';
19
22
  export { depFolderName } from './dep.js';
20
23
  export { type RegisterInspectionInfo, type RegisterInspectionSignature, type InspectionSignatureStatus, type InspectionInfoRow, type InspectionInfoRowKey, type InspectionInfoSection, type InspectionInfoLinesOptions, getRegisterInspectionInfo, inspectionInfoRows, inspectionInfoLines, } from './kasseninfo.js';
21
24
  export { type ConnectStateReport, reportConnectState } from './connect-bestand.js';
@@ -25,9 +28,9 @@ export type { Stocktake, StocktakeItem, StocktakeCount, StocktakeCountResult, St
25
28
  export type { StocktakeStatus } from '../inventory/vertrag.js';
26
29
  export { VOUCHER_KINDS, VOUCHER_STATUSES, checkVoucher, reprintVoucherLabel, VOUCHER_SETTINGS_DEFAULTS, posVoucherSettingsFromWire, VOUCHER_PAYOUTS, VOUCHER_TYPE_KINDS, VOUCHER_AMOUNT_MODES, VOUCHER_TYPE_VALIDITY_PATTERNS, EXTERNAL_VOUCHERS, type PosExternalVouchers, type VoucherKind, type VoucherStatus, type VoucherValidity, type VoucherArticle, type VoucherCheck, type PosVoucherSettings, type PosVoucherReturnType, type VoucherPayout, type VoucherTypeKind, type PosVoucherType, type VoucherLabelTemplate, } from './gutschein.js';
27
30
  export { type GetMyDrawerStateOptions, type OpenMyShiftOptions, type RecordMyCashMovementOptions, type DrawerOpeningEntry, type LogMyDrawerOpeningsOptions, type GetMyShiftReportOptions, type TipPayout, type CloseMyShiftOptions, type AfterCountOption, type RecordMyShiftCountOptions, getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, recordMyShiftCount, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, type ShiftTipLine, type ShiftTipLineKey, } from './schicht.js';
28
- 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, EXPECTED_PART_KEYS, DIFFERENCE_PART_TYPES, type ExpectedPartKey, type ShiftExpectedPart, type DifferencePartType, type ShiftDifferencePart, type LastShift, type ShiftCountResult, 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 ShiftOwnerTip, 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';
31
+ 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, EXPECTED_PART_KEYS, DIFFERENCE_PART_TYPES, type ExpectedPartKey, type ShiftExpectedPart, type DifferencePartType, type ShiftDifferencePart, type LastShift, type ShiftCountResult, 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 ShiftOwnerTip, type ShiftDiscount, 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';
29
32
  export { type ShiftReceiptLayoutOptions, shiftReceiptLayout, cashMovementLayout } from '../receipt/shift-sheet.js';
30
33
  export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputKind, type ReceiptOutputResult } from '../models/receipt-output.js';
31
34
  export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
32
- 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, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
35
+ 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, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, EXTERNAL_VOUCHER_TILE_MESSAGES, EXTERNAL_VOUCHER_ARTICLE_MESSAGES, externalVoucherArticleErrorMessage, EXTERNAL_VOUCHERS_LABELS, EXTERNAL_VOUCHER_KIND_LABELS, TIP_KEPT_MODE_LABELS, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
33
36
  export { roundUpSuggestions } from './aufrunden.js';