@kreiseck/kasseneck-api 1.19.0 → 1.21.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 (67) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +70 -1
  3. package/dist/cjs/client/api.d.ts +19 -0
  4. package/dist/cjs/client/api.js +18 -0
  5. package/dist/cjs/client/aufrufe.d.ts +9 -6
  6. package/dist/cjs/client/aufrufe.js +29 -2
  7. package/dist/cjs/client/dep-export.d.ts +242 -0
  8. package/dist/cjs/client/dep-export.js +337 -0
  9. package/dist/cjs/client/index.d.ts +2 -1
  10. package/dist/cjs/client/index.js +21 -2
  11. package/dist/cjs/client/transport.d.ts +39 -4
  12. package/dist/cjs/client/transport.js +40 -5
  13. package/dist/cjs/index.d.ts +1 -1
  14. package/dist/cjs/index.js +20 -2
  15. package/dist/cjs/pos/dep.d.ts +10 -0
  16. package/dist/cjs/pos/dep.js +27 -0
  17. package/dist/cjs/pos/index.d.ts +1 -0
  18. package/dist/cjs/pos/index.js +5 -2
  19. package/dist/cjs/pos/texte.d.ts +109 -0
  20. package/dist/cjs/pos/texte.js +42 -0
  21. package/dist/cjs/stored/vokabular.d.ts +1 -1
  22. package/dist/cjs/stored/vokabular.js +1 -1
  23. package/dist/cjs/version.d.ts +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/esm/client/api.d.ts +19 -0
  26. package/dist/esm/client/api.js +19 -1
  27. package/dist/esm/client/aufrufe.d.ts +9 -6
  28. package/dist/esm/client/aufrufe.js +29 -2
  29. package/dist/esm/client/dep-export.d.ts +242 -0
  30. package/dist/esm/client/dep-export.js +326 -0
  31. package/dist/esm/client/index.d.ts +2 -1
  32. package/dist/esm/client/index.js +2 -1
  33. package/dist/esm/client/transport.d.ts +39 -4
  34. package/dist/esm/client/transport.js +39 -5
  35. package/dist/esm/index.d.ts +1 -1
  36. package/dist/esm/index.js +1 -1
  37. package/dist/esm/pos/dep.d.ts +10 -0
  38. package/dist/esm/pos/dep.js +24 -0
  39. package/dist/esm/pos/index.d.ts +1 -0
  40. package/dist/esm/pos/index.js +2 -0
  41. package/dist/esm/pos/texte.d.ts +109 -0
  42. package/dist/esm/pos/texte.js +42 -0
  43. package/dist/esm/stored/vokabular.d.ts +1 -1
  44. package/dist/esm/stored/vokabular.js +1 -1
  45. package/dist/esm/version.d.ts +1 -1
  46. package/dist/esm/version.js +1 -1
  47. package/fixtures/dep-folder-cases.json +14 -0
  48. package/fixtures/hobex-hps-codes.json +1 -1
  49. package/fixtures/invoice-api.schema.json +1 -1
  50. package/fixtures/invoice-texts.json +1 -1
  51. package/fixtures/pos-message-cases.json +9 -0
  52. package/fixtures/pos-texts.json +127 -1
  53. package/fixtures/surface.json +23 -3
  54. package/fixtures/v3/antworten/belege.json +1 -1
  55. package/fixtures/v3/antworten/belegmail.json +1 -1
  56. package/fixtures/v3/antworten/berichte.json +1 -1
  57. package/fixtures/v3/antworten/kasse-belege.json +1 -1
  58. package/fixtures/v3/antworten/kasse.json +802 -3
  59. package/fixtures/v3/antworten/lager.json +1 -1
  60. package/fixtures/v3/antworten/rechnungen.json +1 -1
  61. package/fixtures/v3/antworten/storno.json +1 -1
  62. package/fixtures/v3/stored/belege.json +1 -1
  63. package/fixtures/v3/stored/kasse.json +153 -6
  64. package/fixtures/v3/stored/rechnungen.json +1 -1
  65. package/fixtures/v3/v3-vokabular.json +219 -9
  66. package/fixtures/v3/zahlbetrag-faelle.json +1 -1
  67. package/package.json +1 -1
@@ -104,6 +104,37 @@ export function createPdfOrDataTransport(options) {
104
104
  const kern = createCore(options);
105
105
  return (functionName, params) => kern(functionName, params, undefined, undefined, undefined, alsBytes, pdfOderDatenAuswerten);
106
106
  }
107
+ /**
108
+ * Vierter Einstiegspunkt, fuer Aufrufe, deren Datei kein PDF ist (DEP-JSON,
109
+ * CSV, ZIP: `getDepExportFile`). Die Antwort wird nur als Bytes gelesen.
110
+ * Entschieden wird an der Kopfzeile `Content-Disposition: attachment` — eine
111
+ * Datei ist hier selbst JSON und liesse sich am Inhalt nicht von der
112
+ * Erfolgshuelle trennen. Ohne diese Kopfzeile gilt der Rumpf als Huelle
113
+ * (Erfolg: `{ data }`, Fehler: derselbe fachliche Fehler wie auf dem JSON-Weg).
114
+ */
115
+ export function createFileOrDataTransport(options) {
116
+ const kern = createCore(options);
117
+ return (functionName, params, aufruf) => kern(functionName, params, undefined, undefined, undefined, alsRohAntwort, dateiOderDatenAuswerten, aufruf?.timeoutMs);
118
+ }
119
+ const alsRohAntwort = async (antwort, functionName) => ({
120
+ bytes: await alsBytes(antwort, functionName),
121
+ disposition: antwort.headers.get('content-disposition'),
122
+ });
123
+ /** Dateiname aus `Content-Disposition`; nur der letzte Pfadteil, ohne Steuerzeichen. `null`, wenn keiner da ist. */
124
+ function dateinameAusKopf(disposition) {
125
+ const treffer = /filename\s*=\s*"([^"]*)"|filename\s*=\s*([^;\s]+)/i.exec(disposition);
126
+ const roh = treffer ? (treffer[1] ?? treffer[2] ?? '') : '';
127
+ // eslint-disable-next-line no-control-regex
128
+ const name = (roh.split(/[\\/]/).pop() ?? '').replace(/[\u0000-\u001f\u007f]/g, '').trim();
129
+ return name === '' || name === '.' || name === '..' ? null : name;
130
+ }
131
+ function dateiOderDatenAuswerten(roh, functionName, statusCode, inhaltstyp, geheimnisse, unlesbar) {
132
+ if (roh.disposition !== null && /^\s*attachment\b/i.test(roh.disposition)) {
133
+ return { file: { bytes: roh.bytes, fileName: dateinameAusKopf(roh.disposition), contentType: inhaltstyp } };
134
+ }
135
+ const text = new TextDecoder('utf-8').decode(roh.bytes);
136
+ return { data: jsonAuswerten(text, functionName, statusCode, inhaltstyp, geheimnisse, unlesbar) };
137
+ }
107
138
  /**
108
139
  * Gemeinsamer Kern aller Einstiegspunkte: Anmeldung, Zeitlimit, Anfrage und
109
140
  * HTTP-Status. Was danach mit dem Rumpf geschieht, entscheiden `lesen` und
@@ -113,20 +144,23 @@ function createCore(options) {
113
144
  const oeffentlicheBasis = v3Basis('baseUrl', options.baseUrl) ?? DEFAULT_BASE_URL;
114
145
  const kassenBasis = v3Basis('posBaseUrl', options.posBaseUrl) ?? POS_BASE_URL;
115
146
  const kassenweg = isRegisterUserAuth(options.auth);
116
- const zeitlimitMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
147
+ const standardZeitlimitMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
117
148
  const holen = options.fetch ?? globalesFetch();
118
149
  const kennung = options.clientHeader ?? `kasseneck-api/${PACKAGE_VERSION}`;
119
150
  pruefeKennung(kennung);
120
151
  const kopfzeilenSenden = options.omitKasseneckHeaders !== true;
121
152
  /**
122
- * Basis je Aufruf. Die 27 reinen Kassenaufrufe gehen immer an den
153
+ * Basis je Aufruf. Die 36 reinen Kassenaufrufe gehen immer an den
123
154
  * Kassenweg (unter der oeffentlichen Basis gibt es sie nicht), und die
124
- * Kassen-Anmeldung ruft alle 33 Aufrufe des Kassenwegs dort, auch die sechs
125
- * oeffentlichen (Kanal `app`). Was der Kassenweg gar nicht fuehrt
155
+ * Kassen-Anmeldung ruft alle 47 Aufrufe des Kassenwegs dort, auch die elf
156
+ * oeffentlichen (Kanal `app`, darunter die DEP-Aufrufe). Was der Kassenweg gar nicht fuehrt
126
157
  * (Berichte, Zahlungen, FinanzOnline), geht an die oeffentliche Basis.
127
158
  */
128
159
  const basisFuer = (functionName) => isPosOnlyCall(functionName) || (kassenweg && isPosCall(functionName)) ? kassenBasis : oeffentlicheBasis;
129
- return async function aufrufen(functionName, params = {}, extraBodyFields, secretParams, callOptions, lesen, auswerten) {
160
+ return async function aufrufen(functionName, params = {}, extraBodyFields, secretParams, callOptions, lesen, auswerten,
161
+ // Zeitlimit nur dieses Aufrufs (Datei-oder-Daten-Weg); sonst das des Transports.
162
+ eigenesZeitlimitMs) {
163
+ const zeitlimitMs = eigenesZeitlimitMs ?? standardZeitlimitMs;
130
164
  // Die URL nennt die Backend-Funktion, die Fehler nennen den **Vorgang**:
131
165
  // `financeWebService` fuehrt ein Dutzend verschiedener Vorgaenge unter einem
132
166
  // Endpunkt, und ein Fehler, der nur "financeWebService" sagt, verschweigt
@@ -1,6 +1,6 @@
1
1
  export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
2
2
  export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
- export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, 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, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
3
+ export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
4
4
  export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
6
6
  export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, } from './pos/index.js';
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { ReceiptType, VatRate, KeckPaymentMethod, CreditCardProvider, VoucherType, VoucherAction, StripeLinkMode, } from './enums/index.js';
2
2
  export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, isVoucherItem, isVoucherFloatItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_LOG_KINDS, RECEIPT_OUTPUT_RESULTS, RECEIPT_OUTPUT_ENTRIES_MAX, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, RECEIPT_OUTPUT_ERROR_CODES, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
3
- export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, createTransport, createBinaryTransport, createPdfOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, listMyCashregisters, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, 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, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
3
+ export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, listMyCashregisters, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, 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, 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, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
4
4
  export { receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock } from './vienna-time.js';
6
6
  export { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, } from './pos/index.js';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Prüfung (DEP) bei der Kassennachschau an der Kasse (Spec dep-nachschau, Stufe 2): der Ordner, in den Web-Kasse
3
+ * und Kassen-App DEP, Übergabeprotokoll und Positionen auf den USB-Stick legen. Beide Kassen benennen ihn gleich;
4
+ * die Prüffälle stehen in `fixtures/dep-folder-cases.json` (auch im Dart-Zwilling).
5
+ */
6
+ /**
7
+ * `DEP_<Kassen-ID>_<von>_<bis>` (Tage JJJJ-MM-TT, wie der Export sie nennt). Ohne Anfang `DEP_<id>_bis_<bis>`, ohne
8
+ * Ende `DEP_<id>_ab_<von>`, ohne beides `DEP_<id>_alles`. Was ein Stick nicht als Namen nimmt, wird zu `_`.
9
+ */
10
+ export declare function depFolderName(cashregisterId: string, from?: string | null, to?: string | null): string;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Prüfung (DEP) bei der Kassennachschau an der Kasse (Spec dep-nachschau, Stufe 2): der Ordner, in den Web-Kasse
3
+ * und Kassen-App DEP, Übergabeprotokoll und Positionen auf den USB-Stick legen. Beide Kassen benennen ihn gleich;
4
+ * die Prüffälle stehen in `fixtures/dep-folder-cases.json` (auch im Dart-Zwilling).
5
+ */
6
+ /** Zeichen, die FAT32 und exFAT in Namen nicht erlauben, Steuerzeichen und Leerraum. */
7
+ const UNERLAUBT = /[\\/:*?"<>|\u0000-\u001f\u007f\s]/g;
8
+ const teil = (s) => s.trim().replace(UNERLAUBT, '_');
9
+ /**
10
+ * `DEP_<Kassen-ID>_<von>_<bis>` (Tage JJJJ-MM-TT, wie der Export sie nennt). Ohne Anfang `DEP_<id>_bis_<bis>`, ohne
11
+ * Ende `DEP_<id>_ab_<von>`, ohne beides `DEP_<id>_alles`. Was ein Stick nicht als Namen nimmt, wird zu `_`.
12
+ */
13
+ export function depFolderName(cashregisterId, from, to) {
14
+ const id = teil(String(cashregisterId ?? '')) || 'Kasse';
15
+ const von = typeof from === 'string' && from.trim() ? teil(from) : null;
16
+ const bis = typeof to === 'string' && to.trim() ? teil(to) : null;
17
+ if (von && bis)
18
+ return `DEP_${id}_${von}_${bis}`;
19
+ if (bis)
20
+ return `DEP_${id}_bis_${bis}`;
21
+ if (von)
22
+ return `DEP_${id}_ab_${von}`;
23
+ return `DEP_${id}_alles`;
24
+ }
@@ -14,6 +14,7 @@ export { distributeDiscount } from '../receipt/discount.js';
14
14
  export { cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, type VoucherPerms, type RegisterScope, type RegisterUserPerms } from '../register/pairing.js';
15
15
  export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STATUSES, type PrintJobSource, PRINT_JOB_SOURCES, isPrintJobFinished, type CreatePrintJobOptions, listMyPrinters, createPrintJob, getPrintJob, } from './drucker.js';
16
16
  export { listMyTipRecipients } from './trinkgeld.js';
17
+ export { depFolderName } from './dep.js';
17
18
  export { STOCK_LOCATION_TYPES, type StockLocationType, type StockLocation, type StockLocationAddress, type StockLevel, type StockValue, type StockList, type ListMyStockOptions, type SetMyCashregisterStockLocationOptions, type CashregisterStockLocation, listMyStockLocations, listMyStock, setMyCashregisterStockLocation, } from './lager.js';
18
19
  export { type ListMyStocktakesOptions, type ListMyStocktakeItemsOptions, type ListMyStocktakeCountsOptions, type RecordMyStocktakeCountOptions, type VoidMyStocktakeCountOptions, listMyStocktakes, listMyStocktakeItems, listMyStocktakeCounts, recordMyStocktakeCount, voidMyStocktakeCount, parseQuantityMilli, } from './inventur.js';
19
20
  export type { Stocktake, StocktakeItem, StocktakeCount, StocktakeCountResult, StocktakeItemPage, StocktakeCountPage, StocktakeActor, StocktakeProgress, StocktakeReview, StocktakeRecount, StocktakeScope, } from '../inventory/typen.js';
@@ -18,6 +18,8 @@ export { distributeDiscount } from '../receipt/discount.js';
18
18
  export { cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf } from '../register/pairing.js';
19
19
  export { PRINT_JOB_STATUSES, PRINT_JOB_SOURCES, isPrintJobFinished, listMyPrinters, createPrintJob, getPrintJob, } from './drucker.js';
20
20
  export { listMyTipRecipients } from './trinkgeld.js';
21
+ // Prüfung (DEP) an der Kasse: Ordner auf dem USB-Stick (gleich in Web-Kasse und Kassen-App).
22
+ export { depFolderName } from './dep.js';
21
23
  export { STOCK_LOCATION_TYPES, listMyStockLocations, listMyStock, setMyCashregisterStockLocation, } from './lager.js';
22
24
  export { listMyStocktakes, listMyStocktakeItems, listMyStocktakeCounts, recordMyStocktakeCount, voidMyStocktakeCount, parseQuantityMilli, } from './inventur.js';
23
25
  // Gutschein pruefen und Etikett nachdrucken an der Kasse; Gutschein-Sorten (Stufe 4b, 1.17.0).
@@ -802,6 +802,47 @@ declare const MELDUNGEN_ROH: {
802
802
  readonly text: "Es fehlen {amount} bis zum Wechselgeld von {total}.";
803
803
  readonly placeholders: readonly ["amount", "total"];
804
804
  };
805
+ readonly 'dep.manager_only': {
806
+ readonly text: "Den Export für die Prüfung macht der Chef. Ist er nicht da, darf die Behörde bis zu zwei Werktage warten.";
807
+ };
808
+ readonly 'dep.offline': {
809
+ readonly text: "Ohne Internet ist kein Export möglich. Die Behörde muss dann bis zu zwei Werktage warten; der Export geht später hier oder unter mein.kasseneck.at.";
810
+ };
811
+ readonly 'dep.creating': {
812
+ readonly text: "Wird erstellt …";
813
+ };
814
+ readonly 'dep.running': {
815
+ readonly text: "Für diese Kasse läuft schon ein Export. Bitte kurz warten, er wird gleich fertig.";
816
+ };
817
+ readonly 'dep.failed': {
818
+ readonly text: "Der Export ist fehlgeschlagen. Bitte erneut erstellen.";
819
+ };
820
+ readonly 'dep.too_many_exports': {
821
+ readonly text: "Heute sind an diesem Konto keine weiteren Exporte möglich – morgen geht es wieder. Ein schon erstellter Export bleibt nutzbar.";
822
+ };
823
+ readonly 'dep.period_invalid': {
824
+ readonly text: "Bitte einen gültigen Zeitraum wählen: „Von“ nicht in der Zukunft, „Bis“ nicht vor „Von“.";
825
+ };
826
+ readonly 'dep.usb_hint': {
827
+ readonly text: "USB-Stick anstecken (FAT32 oder exFAT). Der Prüfer behält den Stick.";
828
+ };
829
+ readonly 'dep.saved': {
830
+ readonly text: "Gespeichert im Ordner {folder}.";
831
+ readonly placeholders: readonly ["folder"];
832
+ };
833
+ readonly 'dep.save_failed': {
834
+ readonly text: "Speichern hat nicht geklappt. Bitte den Stick prüfen und erneut speichern.";
835
+ };
836
+ readonly 'dep.zip_fallback': {
837
+ readonly text: "Dieser Browser kann keinen Ordner wählen – der Export kommt als ZIP-Datei in den Download-Ordner.";
838
+ readonly only: readonly ["web"];
839
+ };
840
+ readonly 'dep.code_once': {
841
+ readonly text: "Code und QR-Code gibt es nur auf diesem Bildschirm. Wer zurückgeht, erstellt beim nächsten Mal einen neuen Link.";
842
+ };
843
+ readonly 'dep.revoked': {
844
+ readonly text: "Der Link ist widerrufen.";
845
+ };
805
846
  readonly 'app.not_in_browser': {
806
847
  readonly text: "Die Kassen-App läuft nicht im Browser – dafür gibt es kasse.kasseneck.at.";
807
848
  readonly only: readonly ["app"];
@@ -935,6 +976,18 @@ export declare const ERROR_CODE_RULES: readonly [{
935
976
  readonly kind: "api";
936
977
  readonly codes: readonly ["drawer_inactive"];
937
978
  readonly key: "drawer.inactive";
979
+ }, {
980
+ readonly kind: "api";
981
+ readonly codes: readonly ["manager_only"];
982
+ readonly key: "dep.manager_only";
983
+ }, {
984
+ readonly kind: "api";
985
+ readonly codes: readonly ["export_running"];
986
+ readonly key: "dep.running";
987
+ }, {
988
+ readonly kind: "api";
989
+ readonly codes: readonly ["too_many_exports"];
990
+ readonly key: "dep.too_many_exports";
938
991
  }];
939
992
  /**
940
993
  * Regeln je Ausgang, nach den Code-Regeln und vor der Regel der Art: eine
@@ -1848,6 +1901,9 @@ declare const BESCHRIFTUNGEN_ROH: {
1848
1901
  readonly 'nav.stocktake': {
1849
1902
  readonly text: "Inventur";
1850
1903
  };
1904
+ readonly 'nav.dep': {
1905
+ readonly text: "Prüfung (DEP)";
1906
+ };
1851
1907
  readonly 'nav.settings': {
1852
1908
  readonly text: "Einstellungen";
1853
1909
  };
@@ -2133,6 +2189,59 @@ declare const BESCHRIFTUNGEN_ROH: {
2133
2189
  readonly 'receipt.output_failed': {
2134
2190
  readonly text: "fehlgeschlagen";
2135
2191
  };
2192
+ readonly 'dep.title': {
2193
+ readonly text: "Prüfung (DEP)";
2194
+ };
2195
+ readonly 'dep.period': {
2196
+ readonly text: "Zeitraum";
2197
+ };
2198
+ readonly 'dep.period_all': {
2199
+ readonly text: "Alles seit Inbetriebnahme";
2200
+ };
2201
+ readonly 'dep.period_year': {
2202
+ readonly text: "Ein Jahr";
2203
+ };
2204
+ readonly 'dep.period_quarter': {
2205
+ readonly text: "Ein Quartal";
2206
+ };
2207
+ readonly 'dep.period_custom': {
2208
+ readonly text: "Eigener Zeitraum";
2209
+ };
2210
+ readonly 'dep.from': {
2211
+ readonly text: "Von";
2212
+ };
2213
+ readonly 'dep.to': {
2214
+ readonly text: "Bis";
2215
+ };
2216
+ readonly 'dep.create': {
2217
+ readonly text: "Export erstellen";
2218
+ };
2219
+ readonly 'dep.receipts': {
2220
+ readonly text: "{count} Belege";
2221
+ readonly placeholders: readonly ["count"];
2222
+ };
2223
+ readonly 'dep.save_usb': {
2224
+ readonly text: "Auf USB-Stick speichern";
2225
+ };
2226
+ readonly 'dep.handover_link': {
2227
+ readonly text: "Link für den Prüfer";
2228
+ };
2229
+ readonly 'dep.code': {
2230
+ readonly text: "Code";
2231
+ };
2232
+ readonly 'dep.valid_until': {
2233
+ readonly text: "gültig bis {date}";
2234
+ readonly placeholders: readonly ["date"];
2235
+ };
2236
+ readonly 'dep.revoke': {
2237
+ readonly text: "Widerrufen";
2238
+ };
2239
+ readonly 'dep.checksum': {
2240
+ readonly text: "Prüfsumme (SHA-256)";
2241
+ };
2242
+ readonly 'dep.new_export': {
2243
+ readonly text: "Neuer Export";
2244
+ };
2136
2245
  };
2137
2246
  export type LabelKey = keyof typeof BESCHRIFTUNGEN_ROH;
2138
2247
  export declare const LABELS: Record<LabelKey, TextEntry>;
@@ -385,6 +385,22 @@ const MELDUNGEN_ROH = {
385
385
  // Wechselgeld der Lade (1.11.0): beim Öffnen der Schicht liegt weniger in der Lade als eingestellt.
386
386
  // `{amount}` was fehlt, `{total}` das eingestellte Wechselgeld, beide samt Euro-Zeichen.
387
387
  'shift.change_float_missing': { text: 'Es fehlen {amount} bis zum Wechselgeld von {total}.', placeholders: ['amount', 'total'] },
388
+ // --- Prüfung (DEP) bei der Kassennachschau ---------------------------------
389
+ // Nur der Chef exportiert (Inhaber oder Recht „Einstellungen“); ein Kassier
390
+ // sieht nur den Hinweis. Ohne Internet gilt die Frist von zwei Werktagen.
391
+ 'dep.manager_only': { text: 'Den Export für die Prüfung macht der Chef. Ist er nicht da, darf die Behörde bis zu zwei Werktage warten.' },
392
+ 'dep.offline': { text: 'Ohne Internet ist kein Export möglich. Die Behörde muss dann bis zu zwei Werktage warten; der Export geht später hier oder unter mein.kasseneck.at.' },
393
+ 'dep.creating': { text: 'Wird erstellt …' },
394
+ 'dep.running': { text: 'Für diese Kasse läuft schon ein Export. Bitte kurz warten, er wird gleich fertig.' },
395
+ 'dep.failed': { text: 'Der Export ist fehlgeschlagen. Bitte erneut erstellen.' },
396
+ 'dep.too_many_exports': { text: 'Heute sind an diesem Konto keine weiteren Exporte möglich – morgen geht es wieder. Ein schon erstellter Export bleibt nutzbar.' },
397
+ 'dep.period_invalid': { text: 'Bitte einen gültigen Zeitraum wählen: „Von“ nicht in der Zukunft, „Bis“ nicht vor „Von“.' },
398
+ 'dep.usb_hint': { text: 'USB-Stick anstecken (FAT32 oder exFAT). Der Prüfer behält den Stick.' },
399
+ 'dep.saved': { text: 'Gespeichert im Ordner {folder}.', placeholders: ['folder'] },
400
+ 'dep.save_failed': { text: 'Speichern hat nicht geklappt. Bitte den Stick prüfen und erneut speichern.' },
401
+ 'dep.zip_fallback': { text: 'Dieser Browser kann keinen Ordner wählen – der Export kommt als ZIP-Datei in den Download-Ordner.', only: ['web'] },
402
+ 'dep.code_once': { text: 'Code und QR-Code gibt es nur auf diesem Bildschirm. Wer zurückgeht, erstellt beim nächsten Mal einen neuen Link.' },
403
+ 'dep.revoked': { text: 'Der Link ist widerrufen.' },
388
404
  // --- Nur App -------------------------------------------------------------
389
405
  'app.not_in_browser': { text: 'Die Kassen-App läuft nicht im Browser – dafür gibt es kasse.kasseneck.at.', only: ['app'] },
390
406
  'app.open_in_browser': { text: 'Bitte im Browser öffnen: {target}', placeholders: ['target'], only: ['app'] },
@@ -455,6 +471,13 @@ export const ERROR_CODE_RULES = [
455
471
  { kind: 'api', codes: ['invalid_amount'], key: 'amount.invalid' },
456
472
  { kind: 'api', codes: ['drawer_not_found'], key: 'drawer.not_found' },
457
473
  { kind: 'api', codes: ['drawer_inactive'], key: 'drawer.inactive' },
474
+ // Prüfung (DEP, 1.21.0): nur der Chef; die Tagesgrenze und ein laufender
475
+ // Export sagen, was zu tun ist. Der Server hat nichts angelegt. Bewusst
476
+ // ohne export_failed (kommt auch von Zahlungswegen mit unklarem Ausgang)
477
+ // und ohne too_many_links (der Satz des Backends nennt die Grenze).
478
+ { kind: 'api', codes: ['manager_only'], key: 'dep.manager_only' },
479
+ { kind: 'api', codes: ['export_running'], key: 'dep.running' },
480
+ { kind: 'api', codes: ['too_many_exports'], key: 'dep.too_many_exports' },
458
481
  ];
459
482
  /**
460
483
  * Regeln je Ausgang, nach den Code-Regeln und vor der Regel der Art: eine
@@ -933,6 +956,7 @@ const BESCHRIFTUNGEN_ROH = {
933
956
  'nav.vouchers': { text: 'Gutscheine' },
934
957
  'nav.open_drawer': { text: 'Kassenlade öffnen' },
935
958
  'nav.stocktake': { text: 'Inventur' },
959
+ 'nav.dep': { text: 'Prüfung (DEP)' },
936
960
  'nav.settings': { text: 'Einstellungen' },
937
961
  'nav.settings_locked': { text: 'nur mit Chef-Anmeldung' },
938
962
  'nav.logout': { text: 'Abmelden' },
@@ -1034,6 +1058,24 @@ const BESCHRIFTUNGEN_ROH = {
1034
1058
  'receipt.output_pdf_shared': { text: 'PDF geteilt' },
1035
1059
  'receipt.output_opened': { text: 'Link geöffnet ({count}×)', placeholders: ['count'] },
1036
1060
  'receipt.output_failed': { text: 'fehlgeschlagen' },
1061
+ // --- Prüfung (DEP) bei der Kassennachschau -----------------------------------
1062
+ 'dep.title': { text: 'Prüfung (DEP)' },
1063
+ 'dep.period': { text: 'Zeitraum' },
1064
+ 'dep.period_all': { text: 'Alles seit Inbetriebnahme' },
1065
+ 'dep.period_year': { text: 'Ein Jahr' },
1066
+ 'dep.period_quarter': { text: 'Ein Quartal' },
1067
+ 'dep.period_custom': { text: 'Eigener Zeitraum' },
1068
+ 'dep.from': { text: 'Von' },
1069
+ 'dep.to': { text: 'Bis' },
1070
+ 'dep.create': { text: 'Export erstellen' },
1071
+ 'dep.receipts': { text: '{count} Belege', placeholders: ['count'] },
1072
+ 'dep.save_usb': { text: 'Auf USB-Stick speichern' },
1073
+ 'dep.handover_link': { text: 'Link für den Prüfer' },
1074
+ 'dep.code': { text: 'Code' },
1075
+ 'dep.valid_until': { text: 'gültig bis {date}', placeholders: ['date'] },
1076
+ 'dep.revoke': { text: 'Widerrufen' },
1077
+ 'dep.checksum': { text: 'Prüfsumme (SHA-256)' },
1078
+ 'dep.new_export': { text: 'Neuer Export' },
1037
1079
  };
1038
1080
  export const LABELS = BESCHRIFTUNGEN_ROH;
1039
1081
  /**
@@ -1,5 +1,5 @@
1
1
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
2
- export declare const VOKABULAR_QUELLE = "f9d375a30bfb51addc8405dd6f5c24928ebc628166ae5ebf2b0c43d9f19701dd";
2
+ export declare const VOKABULAR_QUELLE = "ff400b73f31d963cb2051ca8b7a06cef0bf126483b528320e2a503a6035a7c59";
3
3
  /** Schema-Notation des Vertrags: Blatt 'aussen': 'innen', Objekt { __: 'innen', ... }, Liste [ { __: 'innen', ... } ]. */
4
4
  export type SchemaEintrag = string | SchemaObjekt | readonly [SchemaObjekt];
5
5
  export interface SchemaObjekt {
@@ -1,7 +1,7 @@
1
1
  // Erzeugt von scripts/stored-vokabular.mjs aus fixtures/v3/v3-vokabular.json.
2
2
  // Nicht von Hand aendern: test/stored.test.ts vergleicht mit dem Vertrag.
3
3
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
4
- export const VOKABULAR_QUELLE = "f9d375a30bfb51addc8405dd6f5c24928ebc628166ae5ebf2b0c43d9f19701dd";
4
+ export const VOKABULAR_QUELLE = "ff400b73f31d963cb2051ca8b7a06cef0bf126483b528320e2a503a6035a7c59";
5
5
  /** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
6
6
  export const SCHEMAS = {
7
7
  "getReceipt": {
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export declare const PACKAGE_VERSION = "1.19.0";
7
+ export declare const PACKAGE_VERSION = "1.21.0";
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export const PACKAGE_VERSION = '1.19.0';
7
+ export const PACKAGE_VERSION = '1.21.0';
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 1,
3
+ "note": "Ordner für den USB-Stick bei der Prüfung (DEP): depFolderName(cashregisterId, from, to). Web-Kasse, Kassen-App und der Dart-Zwilling benennen ihn gleich.",
4
+ "cases": [
5
+ { "name": "Zeitraum mit Anfang und Ende", "cashregisterId": "KECK-1", "from": "2026-07-01", "to": "2026-09-30", "expected": "DEP_KECK-1_2026-07-01_2026-09-30" },
6
+ { "name": "ein Tag", "cashregisterId": "KECK-1", "from": "2026-10-31", "to": "2026-10-31", "expected": "DEP_KECK-1_2026-10-31_2026-10-31" },
7
+ { "name": "alles seit Inbetriebnahme", "cashregisterId": "KECK-1", "from": null, "to": null, "expected": "DEP_KECK-1_alles" },
8
+ { "name": "nur Ende", "cashregisterId": "KECK-1", "from": null, "to": "2026-10-31", "expected": "DEP_KECK-1_bis_2026-10-31" },
9
+ { "name": "nur Anfang", "cashregisterId": "KECK-1", "from": "2026-01-01", "to": null, "expected": "DEP_KECK-1_ab_2026-01-01" },
10
+ { "name": "leere Texte wie fehlend", "cashregisterId": "KECK-1", "from": "", "to": " ", "expected": "DEP_KECK-1_alles" },
11
+ { "name": "Zeichen, die ein Stick nicht nimmt, werden zu _", "cashregisterId": "Theke 1/2:\"A\"", "from": "2026-07-01", "to": "2026-07-31", "expected": "DEP_Theke_1_2__A__2026-07-01_2026-07-31" },
12
+ { "name": "ohne Kassen-ID", "cashregisterId": "", "from": "2026-07-01", "to": "2026-07-31", "expected": "DEP_Kasse_2026-07-01_2026-07-31" }
13
+ ]
14
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.19.0",
2
+ "version": "1.21.0",
3
3
  "measuredOn": {
4
4
  "tid": "3600335",
5
5
  "hpsVersion": "1.10.0",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "Kasseneck Rechnungs-API",
4
4
  "version": 2,
5
- "package": "1.19.0",
5
+ "package": "1.21.0",
6
6
  "endpoints": {
7
7
  "createCustomer": {
8
8
  "request": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.19.0",
2
+ "version": "1.21.0",
3
3
  "languages": [
4
4
  "de",
5
5
  "en"
@@ -28,6 +28,15 @@
28
28
  { "name": "api response_unreadable: Erfolg gemeldet, Antwort unlesbar, Ausgang unklar",
29
29
  "error": { "kind": "api", "code": "response_unreadable", "serverMessage": "Erfolg gemeldet, Antwort aber unlesbar (Antwort nicht lesbar). Der Vorgang kann ausgefuehrt sein: nicht wiederholen, sondern nachlesen." },
30
30
  "fallback": "Ersatz.", "expected": { "key": "server.response_unreadable" } },
31
+ { "name": "api manager_only: Prüfung (DEP), der Satz der Kasse statt des Backends",
32
+ "error": { "kind": "api", "code": "manager_only", "serverMessage": "Den Export für die Prüfung macht der Chef." },
33
+ "fallback": "Ersatz.", "expected": { "key": "dep.manager_only" } },
34
+ { "name": "api export_running: Prüfung (DEP), der Satz der Kasse statt des Backends",
35
+ "error": { "kind": "api", "code": "export_running", "serverMessage": "Für diese Kasse läuft bereits ein Export." },
36
+ "fallback": "Ersatz.", "expected": { "key": "dep.running" } },
37
+ { "name": "api too_many_exports: Prüfung (DEP), der Satz der Kasse statt des Backends",
38
+ "error": { "kind": "api", "code": "too_many_exports", "serverMessage": "Zu viele Exporte heute." },
39
+ "fallback": "Ersatz.", "expected": { "key": "dep.too_many_exports" } },
31
40
  { "name": "api shift_not_open: Schicht und Kassenstand, der Satz der Kasse statt des Backends",
32
41
  "error": { "kind": "api", "code": "shift_not_open", "serverMessage": "Keine offene Schicht gefunden." },
33
42
  "fallback": "Ersatz.", "expected": { "key": "shift.required" } },
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.19.0",
2
+ "version": "1.21.0",
3
3
  "messages": {
4
4
  "network.no_connection": {
5
5
  "text": "Keine Verbindung zum Server. Bitte die Internetverbindung prüfen und erneut versuchen."
@@ -940,6 +940,51 @@
940
940
  "total"
941
941
  ]
942
942
  },
943
+ "dep.manager_only": {
944
+ "text": "Den Export für die Prüfung macht der Chef. Ist er nicht da, darf die Behörde bis zu zwei Werktage warten."
945
+ },
946
+ "dep.offline": {
947
+ "text": "Ohne Internet ist kein Export möglich. Die Behörde muss dann bis zu zwei Werktage warten; der Export geht später hier oder unter mein.kasseneck.at."
948
+ },
949
+ "dep.creating": {
950
+ "text": "Wird erstellt …"
951
+ },
952
+ "dep.running": {
953
+ "text": "Für diese Kasse läuft schon ein Export. Bitte kurz warten, er wird gleich fertig."
954
+ },
955
+ "dep.failed": {
956
+ "text": "Der Export ist fehlgeschlagen. Bitte erneut erstellen."
957
+ },
958
+ "dep.too_many_exports": {
959
+ "text": "Heute sind an diesem Konto keine weiteren Exporte möglich – morgen geht es wieder. Ein schon erstellter Export bleibt nutzbar."
960
+ },
961
+ "dep.period_invalid": {
962
+ "text": "Bitte einen gültigen Zeitraum wählen: „Von“ nicht in der Zukunft, „Bis“ nicht vor „Von“."
963
+ },
964
+ "dep.usb_hint": {
965
+ "text": "USB-Stick anstecken (FAT32 oder exFAT). Der Prüfer behält den Stick."
966
+ },
967
+ "dep.saved": {
968
+ "text": "Gespeichert im Ordner {folder}.",
969
+ "placeholders": [
970
+ "folder"
971
+ ]
972
+ },
973
+ "dep.save_failed": {
974
+ "text": "Speichern hat nicht geklappt. Bitte den Stick prüfen und erneut speichern."
975
+ },
976
+ "dep.zip_fallback": {
977
+ "text": "Dieser Browser kann keinen Ordner wählen – der Export kommt als ZIP-Datei in den Download-Ordner.",
978
+ "only": [
979
+ "web"
980
+ ]
981
+ },
982
+ "dep.code_once": {
983
+ "text": "Code und QR-Code gibt es nur auf diesem Bildschirm. Wer zurückgeht, erstellt beim nächsten Mal einen neuen Link."
984
+ },
985
+ "dep.revoked": {
986
+ "text": "Der Link ist widerrufen."
987
+ },
943
988
  "app.not_in_browser": {
944
989
  "text": "Die Kassen-App läuft nicht im Browser – dafür gibt es kasse.kasseneck.at.",
945
990
  "only": [
@@ -1105,6 +1150,27 @@
1105
1150
  "drawer_inactive"
1106
1151
  ],
1107
1152
  "key": "drawer.inactive"
1153
+ },
1154
+ {
1155
+ "kind": "api",
1156
+ "codes": [
1157
+ "manager_only"
1158
+ ],
1159
+ "key": "dep.manager_only"
1160
+ },
1161
+ {
1162
+ "kind": "api",
1163
+ "codes": [
1164
+ "export_running"
1165
+ ],
1166
+ "key": "dep.running"
1167
+ },
1168
+ {
1169
+ "kind": "api",
1170
+ "codes": [
1171
+ "too_many_exports"
1172
+ ],
1173
+ "key": "dep.too_many_exports"
1108
1174
  }
1109
1175
  ],
1110
1176
  "errorOutcomeRules": [
@@ -1997,6 +2063,9 @@
1997
2063
  "nav.stocktake": {
1998
2064
  "text": "Inventur"
1999
2065
  },
2066
+ "nav.dep": {
2067
+ "text": "Prüfung (DEP)"
2068
+ },
2000
2069
  "nav.settings": {
2001
2070
  "text": "Einstellungen"
2002
2071
  },
@@ -2335,6 +2404,63 @@
2335
2404
  },
2336
2405
  "receipt.output_failed": {
2337
2406
  "text": "fehlgeschlagen"
2407
+ },
2408
+ "dep.title": {
2409
+ "text": "Prüfung (DEP)"
2410
+ },
2411
+ "dep.period": {
2412
+ "text": "Zeitraum"
2413
+ },
2414
+ "dep.period_all": {
2415
+ "text": "Alles seit Inbetriebnahme"
2416
+ },
2417
+ "dep.period_year": {
2418
+ "text": "Ein Jahr"
2419
+ },
2420
+ "dep.period_quarter": {
2421
+ "text": "Ein Quartal"
2422
+ },
2423
+ "dep.period_custom": {
2424
+ "text": "Eigener Zeitraum"
2425
+ },
2426
+ "dep.from": {
2427
+ "text": "Von"
2428
+ },
2429
+ "dep.to": {
2430
+ "text": "Bis"
2431
+ },
2432
+ "dep.create": {
2433
+ "text": "Export erstellen"
2434
+ },
2435
+ "dep.receipts": {
2436
+ "text": "{count} Belege",
2437
+ "placeholders": [
2438
+ "count"
2439
+ ]
2440
+ },
2441
+ "dep.save_usb": {
2442
+ "text": "Auf USB-Stick speichern"
2443
+ },
2444
+ "dep.handover_link": {
2445
+ "text": "Link für den Prüfer"
2446
+ },
2447
+ "dep.code": {
2448
+ "text": "Code"
2449
+ },
2450
+ "dep.valid_until": {
2451
+ "text": "gültig bis {date}",
2452
+ "placeholders": [
2453
+ "date"
2454
+ ]
2455
+ },
2456
+ "dep.revoke": {
2457
+ "text": "Widerrufen"
2458
+ },
2459
+ "dep.checksum": {
2460
+ "text": "Prüfsumme (SHA-256)"
2461
+ },
2462
+ "dep.new_export": {
2463
+ "text": "Neuer Export"
2338
2464
  }
2339
2465
  },
2340
2466
  "returnDispositionLabels": {