@kreiseck/kasseneck-api 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,34 @@ 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.7.1
8
+
9
+ `ReceiptSheetLines` pins `letter-spacing` and `word-spacing` to 0. Reason:
10
+ both are inherited, and the sheet is exactly `charsPerLine` × `1ch` wide with
11
+ `overflow: hidden` on every line. A page stylesheet that spaced its text (a
12
+ `tracking-*` utility, a `letter-spacing` on `body`) made every full line wider
13
+ than the sheet, and its last character was cut off. Same fix as the Dart twin
14
+ `KeckReceiptSheetWidget` in 10.6.1, where the Material 3 theme's 0.25 letter
15
+ spacing clipped "Kartenzahlung" to "Kartenzahlun".
16
+
17
+ The sheet's HTML gains `letter-spacing:0;word-spacing:0` in the `keck-blatt`
18
+ style, so the 264 `html.blatt.*` digests in `test/fixtures/druck-goldens.json`
19
+ are re-recorded; cross-check: with the addition removed each output matches its
20
+ old digest byte for byte. ESC/POS, ePOS, grid and sheet bytes are unchanged.
21
+ No public symbol changes.
22
+
23
+ ## 1.7.0
24
+
25
+ Register auto-logout: `Cashregister` gains the optional `autoLogout`
26
+ (`{ autoLogoutMinutes?: 0 | 1 | 5 | 15 | 30, logoutAfterSale?: boolean }`),
27
+ read from `listMyCashregisters`. Reason: the backend now reports a register's
28
+ own sign-out settings; a client that ignored them showed the operator's
29
+ defaults on a register that had its own. The field is absent when the register
30
+ has no values of its own (then the operator's values apply); a minutes value
31
+ outside 0/1/5/15/30 is dropped rather than passed on. Additive, no breaking
32
+ change; `fixtures/v3/` is the vendored contract at the backend state that
33
+ carries the field.
34
+
7
35
  ## 1.6.0
8
36
 
9
37
  Inventory API, variants: `./inventory` gains the five endpoints of backend
@@ -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, type Voucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, 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, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, 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, type Voucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, 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, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, 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, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, 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, downloadDailyReport, downloadMonthlyReport, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, 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, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
@@ -38,8 +38,23 @@ export interface Cashregister {
38
38
  signatureId?: string;
39
39
  /** Lager-Standort der Kasse (Lager-Kern Stufe 2); fehlt = Standard-Standort des Betriebs. */
40
40
  stockLocationId?: string;
41
+ /**
42
+ * Eigene Abmelde-Werte dieser Kasse; fehlt, wenn die Kasse keine eigenen hat
43
+ * (dann gelten die Werte des Betriebs).
44
+ */
45
+ autoLogout?: CashregisterAutoLogout;
41
46
  onboarding: CashregisterOnboarding;
42
47
  }
48
+ /**
49
+ * Automatisches Abmelden an der Kasse. Beide Felder sind einzeln optional: der
50
+ * Server sendet nur, was die Kasse selbst gesetzt hat.
51
+ */
52
+ export interface CashregisterAutoLogout {
53
+ /** Abmeldung nach Leerlauf in Minuten; `0` = aus. */
54
+ autoLogoutMinutes?: 0 | 1 | 5 | 15 | 30;
55
+ /** Nach jedem Verkauf abmelden. */
56
+ logoutAfterSale?: boolean;
57
+ }
43
58
  /**
44
59
  * Stand der Inbetriebnahme (RKSV): Kasse bei FinanzOnline registriert,
45
60
  * Startbeleg erzeugt, Startbeleg uebermittelt. Die drei Kennzeichen entscheiden
@@ -61,9 +76,15 @@ export interface CashregisterPayload {
61
76
  create_time?: string | null;
62
77
  signature_id?: string | null;
63
78
  stockLocationId?: string | null;
79
+ autoLogout?: CashregisterAutoLogoutPayload | null;
64
80
  token?: string | null;
65
81
  onboarding?: CashregisterOnboardingPayload | null;
66
82
  }
83
+ /** `autoLogout` am Draht `/v3`; die Namen sind dieselben wie am Modell. */
84
+ export interface CashregisterAutoLogoutPayload {
85
+ autoLogoutMinutes?: number | null;
86
+ logoutAfterSale?: boolean | null;
87
+ }
67
88
  /**
68
89
  * `onboarding` am Draht `/v3` (fixtures/v3/antworten/kasse.json): der
69
90
  * Startbeleg heisst dort `start_receipt_*`. Die inneren Namen
@@ -17,6 +17,7 @@ function fromCashregisterPayload(payload, id) {
17
17
  ...(payload.token ? { token: payload.token } : {}),
18
18
  ...(payload.signature_id ? { signatureId: payload.signature_id } : {}),
19
19
  ...(payload.stockLocationId ? { stockLocationId: payload.stockLocationId } : {}),
20
+ ...autoLogoutFeld(payload.autoLogout),
20
21
  onboarding: {
21
22
  cashboxRegistered: ob.cashbox_registered === true,
22
23
  startReceiptCreated: ob.start_receipt_created === true,
@@ -27,6 +28,25 @@ function fromCashregisterPayload(payload, id) {
27
28
  },
28
29
  };
29
30
  }
31
+ const AUTO_LOGOUT_MINUTEN = new Set([0, 1, 5, 15, 30]);
32
+ /**
33
+ * `autoLogout` gibt es nur, wenn die Nutzlast mindestens einen lesbaren Wert
34
+ * traegt. Eine Minutenzahl ausserhalb von 0/1/5/15/30 wird verworfen statt
35
+ * durchgereicht (ein neuer Server-Wert soll die Kasse nicht unlesbar machen).
36
+ */
37
+ function autoLogoutFeld(roh) {
38
+ if (roh === null || roh === undefined || typeof roh !== 'object') {
39
+ return {};
40
+ }
41
+ const wert = {};
42
+ if (typeof roh.autoLogoutMinutes === 'number' && AUTO_LOGOUT_MINUTEN.has(roh.autoLogoutMinutes)) {
43
+ wert.autoLogoutMinutes = roh.autoLogoutMinutes;
44
+ }
45
+ if (typeof roh.logoutAfterSale === 'boolean') {
46
+ wert.logoutAfterSale = roh.logoutAfterSale;
47
+ }
48
+ return Object.keys(wert).length === 0 ? {} : { autoLogout: wert };
49
+ }
30
50
  /**
31
51
  * Ein Zeitfeld, das es nur gibt, wenn die Nutzlast einen lesbaren Zeitstempel
32
52
  * traegt. `null` (der Normalfall aus `isoTs`) und unlesbarer Unsinn ergeben
@@ -7,7 +7,7 @@ export { type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, payment
7
7
  export { type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, } from './receipt-email.js';
8
8
  export { type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, } from './receipt-errors.js';
9
9
  export { type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, } from './receipt-company.js';
10
- export { type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, fromCashregisterPayload, } from './cashregister.js';
10
+ export { type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, } from './cashregister.js';
11
11
  export { type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind } from './receipt-summary.js';
12
12
  export { type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, } from './report-month.js';
13
13
  export { type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, } from './stripe-url-session.js';
@@ -92,6 +92,12 @@ function ReceiptSheetLines({ sheet: blatt, logoUrl, renderQr, qrHidden: qrVerdec
92
92
  width: `${z}ch`,
93
93
  fontFamily: 'var(--keck-blatt-schrift, "DM Mono", ui-monospace, Menlo, Consolas, monospace)',
94
94
  fontVariantLigatures: 'none',
95
+ // Ausdruecklich 0: `letter-spacing`/`word-spacing` erben sich, und das Blatt
96
+ // ist genau `charsPerLine` x 1ch breit. Ein Abstand aus dem Stylesheet der
97
+ // Seite (z. B. `tracking-wide`) machte jede volle Zeile breiter als das
98
+ // Blatt; `overflow: hidden` schnitt das letzte Zeichen ab.
99
+ letterSpacing: 0,
100
+ wordSpacing: 0,
95
101
  };
96
102
  return ((0, jsx_runtime_1.jsx)("div", { className: klasse, "data-zeichen": z, style: blattStil, children: blatt.blocks.map((b, i) => {
97
103
  switch (b.kind) {
@@ -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.6.0";
7
+ export declare const PACKAGE_VERSION = "1.7.1";
@@ -7,4 +7,4 @@ exports.PACKAGE_VERSION = void 0;
7
7
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
8
8
  * beim Anheben der Version beide Stellen aendern.
9
9
  */
10
- exports.PACKAGE_VERSION = '1.6.0';
10
+ exports.PACKAGE_VERSION = '1.7.1';
@@ -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, type Voucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, 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, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, 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, type Voucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, 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, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, 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, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, 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, downloadDailyReport, downloadMonthlyReport, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, 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, } from './receipt/due.js';
5
5
  export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
@@ -38,8 +38,23 @@ export interface Cashregister {
38
38
  signatureId?: string;
39
39
  /** Lager-Standort der Kasse (Lager-Kern Stufe 2); fehlt = Standard-Standort des Betriebs. */
40
40
  stockLocationId?: string;
41
+ /**
42
+ * Eigene Abmelde-Werte dieser Kasse; fehlt, wenn die Kasse keine eigenen hat
43
+ * (dann gelten die Werte des Betriebs).
44
+ */
45
+ autoLogout?: CashregisterAutoLogout;
41
46
  onboarding: CashregisterOnboarding;
42
47
  }
48
+ /**
49
+ * Automatisches Abmelden an der Kasse. Beide Felder sind einzeln optional: der
50
+ * Server sendet nur, was die Kasse selbst gesetzt hat.
51
+ */
52
+ export interface CashregisterAutoLogout {
53
+ /** Abmeldung nach Leerlauf in Minuten; `0` = aus. */
54
+ autoLogoutMinutes?: 0 | 1 | 5 | 15 | 30;
55
+ /** Nach jedem Verkauf abmelden. */
56
+ logoutAfterSale?: boolean;
57
+ }
43
58
  /**
44
59
  * Stand der Inbetriebnahme (RKSV): Kasse bei FinanzOnline registriert,
45
60
  * Startbeleg erzeugt, Startbeleg uebermittelt. Die drei Kennzeichen entscheiden
@@ -61,9 +76,15 @@ export interface CashregisterPayload {
61
76
  create_time?: string | null;
62
77
  signature_id?: string | null;
63
78
  stockLocationId?: string | null;
79
+ autoLogout?: CashregisterAutoLogoutPayload | null;
64
80
  token?: string | null;
65
81
  onboarding?: CashregisterOnboardingPayload | null;
66
82
  }
83
+ /** `autoLogout` am Draht `/v3`; die Namen sind dieselben wie am Modell. */
84
+ export interface CashregisterAutoLogoutPayload {
85
+ autoLogoutMinutes?: number | null;
86
+ logoutAfterSale?: boolean | null;
87
+ }
67
88
  /**
68
89
  * `onboarding` am Draht `/v3` (fixtures/v3/antworten/kasse.json): der
69
90
  * Startbeleg heisst dort `start_receipt_*`. Die inneren Namen
@@ -14,6 +14,7 @@ export function fromCashregisterPayload(payload, id) {
14
14
  ...(payload.token ? { token: payload.token } : {}),
15
15
  ...(payload.signature_id ? { signatureId: payload.signature_id } : {}),
16
16
  ...(payload.stockLocationId ? { stockLocationId: payload.stockLocationId } : {}),
17
+ ...autoLogoutFeld(payload.autoLogout),
17
18
  onboarding: {
18
19
  cashboxRegistered: ob.cashbox_registered === true,
19
20
  startReceiptCreated: ob.start_receipt_created === true,
@@ -24,6 +25,25 @@ export function fromCashregisterPayload(payload, id) {
24
25
  },
25
26
  };
26
27
  }
28
+ const AUTO_LOGOUT_MINUTEN = new Set([0, 1, 5, 15, 30]);
29
+ /**
30
+ * `autoLogout` gibt es nur, wenn die Nutzlast mindestens einen lesbaren Wert
31
+ * traegt. Eine Minutenzahl ausserhalb von 0/1/5/15/30 wird verworfen statt
32
+ * durchgereicht (ein neuer Server-Wert soll die Kasse nicht unlesbar machen).
33
+ */
34
+ function autoLogoutFeld(roh) {
35
+ if (roh === null || roh === undefined || typeof roh !== 'object') {
36
+ return {};
37
+ }
38
+ const wert = {};
39
+ if (typeof roh.autoLogoutMinutes === 'number' && AUTO_LOGOUT_MINUTEN.has(roh.autoLogoutMinutes)) {
40
+ wert.autoLogoutMinutes = roh.autoLogoutMinutes;
41
+ }
42
+ if (typeof roh.logoutAfterSale === 'boolean') {
43
+ wert.logoutAfterSale = roh.logoutAfterSale;
44
+ }
45
+ return Object.keys(wert).length === 0 ? {} : { autoLogout: wert };
46
+ }
27
47
  /**
28
48
  * Ein Zeitfeld, das es nur gibt, wenn die Nutzlast einen lesbaren Zeitstempel
29
49
  * traegt. `null` (der Normalfall aus `isoTs`) und unlesbarer Unsinn ergeben
@@ -7,7 +7,7 @@ export { type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, payment
7
7
  export { type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, } from './receipt-email.js';
8
8
  export { type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, } from './receipt-errors.js';
9
9
  export { type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, } from './receipt-company.js';
10
- export { type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, fromCashregisterPayload, } from './cashregister.js';
10
+ export { type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, } from './cashregister.js';
11
11
  export { type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind } from './receipt-summary.js';
12
12
  export { type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, } from './report-month.js';
13
13
  export { type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, } from './stripe-url-session.js';
@@ -86,6 +86,12 @@ export function ReceiptSheetLines({ sheet: blatt, logoUrl, renderQr, qrHidden: q
86
86
  width: `${z}ch`,
87
87
  fontFamily: 'var(--keck-blatt-schrift, "DM Mono", ui-monospace, Menlo, Consolas, monospace)',
88
88
  fontVariantLigatures: 'none',
89
+ // Ausdruecklich 0: `letter-spacing`/`word-spacing` erben sich, und das Blatt
90
+ // ist genau `charsPerLine` x 1ch breit. Ein Abstand aus dem Stylesheet der
91
+ // Seite (z. B. `tracking-wide`) machte jede volle Zeile breiter als das
92
+ // Blatt; `overflow: hidden` schnitt das letzte Zeichen ab.
93
+ letterSpacing: 0,
94
+ wordSpacing: 0,
89
95
  };
90
96
  return (_jsx("div", { className: klasse, "data-zeichen": z, style: blattStil, children: blatt.blocks.map((b, i) => {
91
97
  switch (b.kind) {
@@ -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.6.0";
7
+ export declare const PACKAGE_VERSION = "1.7.1";
@@ -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.6.0';
7
+ export const PACKAGE_VERSION = '1.7.1';
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.0",
2
+ "version": "1.7.1",
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.6.0",
5
+ "package": "1.7.1",
6
6
  "endpoints": {
7
7
  "createCustomer": {
8
8
  "request": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.0",
2
+ "version": "1.7.1",
3
3
  "languages": [
4
4
  "de",
5
5
  "en"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.0",
2
+ "version": "1.7.1",
3
3
  "messages": {
4
4
  "network.no_connection": {
5
5
  "text": "Keine Verbindung zum Server. Bitte die Internetverbindung prüfen und erneut versuchen."
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.0",
2
+ "version": "1.7.1",
3
3
  "baseUrls": {
4
4
  "public": "https://api.kasseneck.at/v3",
5
5
  "pos": "https://kasse.kasseneck.at/api/v3"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kreiseck/kasseneck-api",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "description": "Austrian fiscal cash register (RKSV) client for JavaScript and TypeScript: signed receipts, cancellations, card payments, receipt printing (ESC/POS), invoices, inventory. RKSV-Registrierkasse für JavaScript und TypeScript.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Kreiseck",