@kreiseck/kasseneck-api 1.28.0 → 1.30.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.
- package/CHANGELOG.md +27 -0
- package/README.md +111 -0
- package/dist/cjs/client/api.d.ts +15 -0
- package/dist/cjs/client/api.js +8 -0
- package/dist/cjs/client/aufrufe.d.ts +3 -3
- package/dist/cjs/client/aufrufe.js +28 -0
- package/dist/cjs/client/index.d.ts +1 -0
- package/dist/cjs/client/index.js +17 -1
- package/dist/cjs/client/list-receipts.d.ts +5 -0
- package/dist/cjs/client/list-receipts.js +5 -1
- package/dist/cjs/client/receipts.d.ts +6 -0
- package/dist/cjs/client/receipts.js +1 -0
- package/dist/cjs/client/terminal.d.ts +206 -0
- package/dist/cjs/client/terminal.js +288 -0
- package/dist/cjs/enums/voucher-type.d.ts +5 -1
- package/dist/cjs/enums/voucher-type.js +5 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +28 -4
- package/dist/cjs/inventory/index.d.ts +2 -2
- package/dist/cjs/inventory/index.js +3 -2
- package/dist/cjs/inventory/typen.d.ts +39 -1
- package/dist/cjs/inventory/vertrag.d.ts +13 -2
- package/dist/cjs/inventory/vertrag.js +16 -1
- package/dist/cjs/inventory/webhook.d.ts +3 -0
- package/dist/cjs/inventory/webhook.js +39 -0
- package/dist/cjs/models/index.d.ts +1 -1
- package/dist/cjs/models/index.js +10 -2
- package/dist/cjs/models/voucher.d.ts +78 -2
- package/dist/cjs/models/voucher.js +127 -5
- package/dist/cjs/pos/gutschein.d.ts +13 -0
- package/dist/cjs/pos/gutschein.js +5 -1
- package/dist/cjs/pos/index.d.ts +1 -1
- package/dist/cjs/pos/index.js +3 -2
- package/dist/cjs/pos/texte.d.ts +20 -0
- package/dist/cjs/pos/texte.js +11 -0
- package/dist/cjs/receipt/due.d.ts +8 -1
- package/dist/cjs/receipt/due.js +1 -0
- package/dist/cjs/receipt/gutschein-plan.d.ts +11 -1
- package/dist/cjs/receipt/gutschein-plan.js +116 -1
- package/dist/cjs/receipt/layout.js +39 -6
- package/dist/cjs/stored/draht.js +5 -0
- package/dist/cjs/stored/vokabular.d.ts +3 -1
- package/dist/cjs/stored/vokabular.js +15 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/api.d.ts +15 -0
- package/dist/esm/client/api.js +8 -0
- package/dist/esm/client/aufrufe.d.ts +3 -3
- package/dist/esm/client/aufrufe.js +28 -0
- package/dist/esm/client/index.d.ts +1 -0
- package/dist/esm/client/index.js +1 -0
- package/dist/esm/client/list-receipts.d.ts +5 -0
- package/dist/esm/client/list-receipts.js +5 -2
- package/dist/esm/client/receipts.d.ts +6 -0
- package/dist/esm/client/receipts.js +1 -0
- package/dist/esm/client/terminal.d.ts +206 -0
- package/dist/esm/client/terminal.js +278 -0
- package/dist/esm/enums/voucher-type.d.ts +5 -1
- package/dist/esm/enums/voucher-type.js +5 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/inventory/index.d.ts +2 -2
- package/dist/esm/inventory/index.js +1 -1
- package/dist/esm/inventory/typen.d.ts +39 -1
- package/dist/esm/inventory/vertrag.d.ts +13 -2
- package/dist/esm/inventory/vertrag.js +15 -0
- package/dist/esm/inventory/webhook.d.ts +3 -0
- package/dist/esm/inventory/webhook.js +39 -0
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/esm/models/voucher.d.ts +78 -2
- package/dist/esm/models/voucher.js +122 -4
- package/dist/esm/pos/gutschein.d.ts +13 -0
- package/dist/esm/pos/gutschein.js +4 -0
- package/dist/esm/pos/index.d.ts +1 -1
- package/dist/esm/pos/index.js +1 -1
- package/dist/esm/pos/texte.d.ts +20 -0
- package/dist/esm/pos/texte.js +11 -0
- package/dist/esm/receipt/due.d.ts +8 -1
- package/dist/esm/receipt/due.js +1 -0
- package/dist/esm/receipt/gutschein-plan.d.ts +11 -1
- package/dist/esm/receipt/gutschein-plan.js +117 -2
- package/dist/esm/receipt/layout.js +40 -7
- package/dist/esm/stored/draht.js +6 -1
- package/dist/esm/stored/vokabular.d.ts +3 -1
- package/dist/esm/stored/vokabular.js +14 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/expected/voucher-external-redeem.grid32.txt +30 -0
- package/fixtures/expected/voucher-external-redeem.grid48.txt +27 -0
- package/fixtures/expected/voucher-external-redeem.lines.json +280 -0
- package/fixtures/expected/voucher-external-redeem.sheet32.json +206 -0
- package/fixtures/expected/voucher-external-redeem.sheet48.json +188 -0
- package/fixtures/expected/voucher-external-sale.grid32.txt +27 -0
- package/fixtures/expected/voucher-external-sale.grid48.txt +26 -0
- package/fixtures/expected/voucher-external-sale.lines.json +256 -0
- package/fixtures/expected/voucher-external-sale.sheet32.json +188 -0
- package/fixtures/expected/voucher-external-sale.sheet48.json +182 -0
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/manifest.json +16 -0
- package/fixtures/pos-texts.json +22 -2
- package/fixtures/receipt-due-voucher-generated.json +2 -2
- package/fixtures/receipts/voucher-external-redeem.json +85 -0
- package/fixtures/receipts/voucher-external-sale.json +80 -0
- package/fixtures/stored/voucher-cases.json +2800 -0
- package/fixtures/surface.json +32 -4
- package/fixtures/v3/antworten/belege.json +4 -3
- package/fixtures/v3/antworten/belegmail.json +2 -2
- package/fixtures/v3/antworten/berichte.json +2 -2
- package/fixtures/v3/antworten/kasse-belege.json +4 -3
- package/fixtures/v3/antworten/kasse.json +16 -10
- package/fixtures/v3/antworten/lager.json +6 -3
- package/fixtures/v3/antworten/rechnungen.json +2 -2
- package/fixtures/v3/antworten/storno.json +2 -2
- package/fixtures/v3/stored/belege.json +2 -2
- package/fixtures/v3/stored/kasse.json +3 -3
- package/fixtures/v3/stored/rechnungen.json +2 -2
- package/fixtures/v3/v3-vokabular.json +222 -10
- package/fixtures/v3/zahlbetrag-faelle.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ 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.30.0 - 2026-11-07
|
|
8
|
+
|
|
9
|
+
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).
|
|
10
|
+
|
|
11
|
+
- **External vouchers** (`Voucher.source: 'external'`, `Voucher.number`): a voucher of another system (merchandise management, web shop) sold, redeemed or paid out at the till. Wish `{ source: 'external', action: 'sell' | 'redeem' | 'payout', type: 'multi_purpose' | 'single_purpose', number, amountCents }`, single-purpose with `vatRateBp` (`EXTERNAL_VOUCHER_VAT_RATES_BP`: the till's rates, `0` = sold exempt), optional `taxedWith` on redeem/payout (1 to 40 characters), payout with `reason`. No balance, no check, no code: the business states kind, rate and amount. Reason: a brewery with its own merchandise management sells and redeems its vouchers at the till; tax must be right and its system books the balance from `receipt.created`.
|
|
12
|
+
- **Number rule** `normalizeExternalVoucherNumber` / `checkExternalVoucherNumber`, twin of `gutschein-core.normiereFremdnummer`/`istEigenerCode`: trim a fixed set of white space (ASCII, U+00A0, U+1680, U+2000–U+200A, U+2028, U+2029, U+202F, U+205F, U+3000, U+FEFF; not U+0085), no Unicode normalisation, then `^[A-Za-z0-9\-_./]{1,40}$`; a valid own voucher code is refused first (`external_voucher_number_is_own_code`), also with `.`, `_` or `/` between its groups (`7148.FGQA.935K`; only the check reads them as `-`, the number keeps its spelling); look-alikes such as the Kelvin sign U+212A are never folded and make the number invalid. `EXTERNAL_VOUCHER_NUMBER_MAX`, `EXTERNAL_VOUCHER_TAXED_WITH_MAX`, `VOUCHER_SOURCES`, `isExternalVoucher`, `externalVoucherIsValid`.
|
|
13
|
+
- **Own wishes** (`voucherIsValid`, `wunschFormGueltig`): `number`, `taxedWith`, `vatRateBp` and `source` are refused when present at all, also as `null` (the server answers `voucher_invalid`); before only a non-null `taxedWith`/`vatRateBp` was.
|
|
14
|
+
- **Amount due** (`receiptDueCents`, `receiptDueBreakdown`): external vouchers go through the same tax path as own ones (multi-purpose as flow, single-purpose as minus line in its rate, exempt or small business spread over the basket, payout in its bucket), without balance. New option `externalVouchers` (else `voucherSettings.externalVouchers`; without either only the server checks the release): `off` → `external_voucher_not_enabled`, single-purpose without `all` → `external_voucher_type_not_enabled`, plus `external_voucher_number_invalid`, `external_voucher_number_is_own_code`, `external_voucher_duplicate` in the order of the server.
|
|
15
|
+
- **Receipt layout** (bon, PDF, mail): `Gutschein Nr. <number>` instead of the mask; redemption of a single-purpose voucher with the hint ` Einzweck, versteuert mit <taxedWith>` (only with `taxedWith`), multi-purpose after „Zwischensumme“, payout `Auszahlung Gutschein Nr. …` with its reason; never „Rest am Gutschein“. Sale lines come from the server (`Gutschein Nr. W-77 (Mehrzweckgutschein)`, `(Einzweckgutschein 20 %)`). New goldens `voucher-external-redeem` (the example of the spec) and `voucher-external-sale`.
|
|
16
|
+
- **Settings:** `PosVoucherSettings.externalVouchers` (`off | multi_purpose | all`, `EXTERNAL_VOUCHERS`, type `PosExternalVouchers`): always set by the reader, missing or unknown is `off` (closes only the external voucher, never the block).
|
|
17
|
+
- **Texts:** messages `voucher_error.external_not_enabled`, `.external_type_not_enabled`, `.external_number_invalid`, `.external_number_is_own_code`, `.external_duplicate` (words of the backend), mapped by code in `VOUCHER_ERROR_MESSAGES`.
|
|
18
|
+
- **Receipt webhooks:** `INVENTORY_WEBHOOK_EVENTS` gains `receipt.created` and `receipt.cancelled` (`RECEIPT_WEBHOOK_EVENTS`); `parseInventoryWebhookEvent` reads them into `ReceiptCreatedEventData` (`receipt` as `listReceipts` `view: 'full'`, optional `truncated`/`hint`) and `ReceiptCancelledEventData` (`cancellationOf`, `cancelledItems[] { index, quantity }`, `refunds[] { refundOf, amountCents, method }`). Signature check unchanged. `INVENTORY_ERROR_CODES` gains `webhook_event_not_available` (after `server_error`, where the contract has it): an event whose module the account lacks.
|
|
19
|
+
- **Deprecated:** the value voucher of the old form with a freely typed code, at wish level only (new type `LegacyValueVoucherWish`, `@deprecated`; `VoucherType.value` stays undeprecated, receipts carry it for every multi-purpose entry); the server still accepts it and answers with `deprecation`, now read into `ReceiptWithCompany.deprecation`.
|
|
20
|
+
- `./stored`: voucher entries translate `quelle`/`nummer` to `source` (`external`)/`number` (`ZUSATZ_KATALOGE.GUTSCHEIN_QUELLE`, generated from the contract).
|
|
21
|
+
- Contract cases `fixtures/stored/voucher-cases.json`: byte for byte the backend's `gutschein-faelle.json` (inner form); amount due, buckets, rejection code and bon lines of every external case are tested against it. Contract `v3` re-fetched (`GUTSCHEIN_QUELLE`, `externalVouchers`, `deprecation`, receipt events, the six codes), `receipt-due-voucher-generated.json` re-generated (only `_source` changed).
|
|
22
|
+
|
|
23
|
+
## 1.29.0 - 2026-11-07
|
|
24
|
+
|
|
25
|
+
Card terminal on the phone: Kasseneck keeps the terminal app's accounts, the terminal IDs (TID) of each business and the code the provider mails when a TID moves to another device. Any app gets access, TID and code over `/v3`; nobody at the device types e-mail, password or TID. Additive.
|
|
26
|
+
|
|
27
|
+
- **Seven calls** (root and `createKasseneckApi`, only on `/v3`, `PUBLIC_CALLS` now 120; not on the register path yet): `registerTerminalDevice({ label, platform, app, requestedBy? })` -> `{ deviceId, deviceSecret }` (the secret only in this answer); `getTerminalAccess({ deviceId, deviceSecret, platform?, app?, label? })` -> `TerminalAccess` (`available: true`, `username`, `password`, `terminalId`, `terminalName`, `accountId`, `autoCode`, `codeFormat { length, labels }`, `setup { state, since }`, `updatedAt`) or `{ available: false, reason: 'no_free_terminal', terminals[] }` with the TIDs of the own business; `claimTerminal({ …, terminalId, label? })` -> `TerminalAccess`; `requestTerminalCode({ …, platform, requestedBy? })` -> `{ status }`; `getTerminalCode({ deviceId, deviceSecret })` -> `{ status, code?, source?, validUntil?, setup }`; `reportTerminalLogin({ …, terminalId, success, newOnDevice })` and `reportTerminalReady({ … })` answer nothing. Sign-in is the business's `api_key` alone; the `cashregister-token` of `apiKeyAuth` is ignored, an app without a register can use `inventoryKeyAuth`. Reason: three apps share one terminal account and moved TIDs by typing credentials and asking support for the code.
|
|
28
|
+
- **Secrets:** `deviceSecret`, `password` and `code` never appear in an error of this package (the device secret goes to the transport as a secret parameter, response checks name only the missing field). Callers must never log them and keep `deviceSecret` in the device's secure storage.
|
|
29
|
+
- **Form checked before sending** (`KasseneckValidationError`, `scope: 'request'`): `label` 1-60, `app` 1-40, `requestedBy` 1-80 characters (spaces at the edges do not count, as on the server), `platform` `android|ios`, `deviceId`/`deviceSecret`/`terminalId` not empty, `success`/`newOnDevice` booleans; only set optional fields go out. A later setup state, code status or source arrives unchanged (`(string & {})`).
|
|
30
|
+
- **Outcome after a timeout:** only `registerTerminalDevice` (a retry registers another device) and `getTerminalCode` (on Android the answer consumes the code) report `outcome: 'unknown'`. The other five are repeatable and stay `'rejected'`: `getTerminalAccess` (a retry returns the same assignment), `claimTerminal` (claiming the same TID again changes nothing), `requestTerminalCode` (an open request younger than 6 minutes stays, no new one) and `reportTerminalLogin`/`reportTerminalReady` (the same state written again). Same classification as the Dart package.
|
|
31
|
+
- **`TERMINAL_ERROR_CODES`** equal to `errorCodes.terminal` of the contract (order included, pinned by a test): `terminal_not_enabled`, `terminal_test_environment`, `terminal_device_unknown`, `terminal_device_blocked`, `invalid_terminal_device`, `too_many_terminal_devices`, `terminal_not_in_business`, `terminal_code_manual`, `terminal_code_rate_limited`, `terminal_not_assigned`, `server_error`. Lists `TERMINAL_PLATFORMS`, `TERMINAL_SETUP_STATES`, `TERMINAL_CODE_STATUSES`, `TERMINAL_CODE_SOURCES`.
|
|
32
|
+
- Contract `v3` re-fetched from the backend (the seven endpoints, `errorCodes.terminal`).
|
|
33
|
+
|
|
7
34
|
## 1.28.0 - 2026-11-06
|
|
8
35
|
|
|
9
36
|
Shift flow of the till: start a shift, count in between, close in steps, tip kinds, column width. Additive; every field below is sent by the server only when it applies, a reader without them behaves as before (all existing goldens unchanged).
|
package/README.md
CHANGED
|
@@ -819,6 +819,20 @@ cancellation may have been booked: read the original again, never retry.
|
|
|
819
819
|
|
|
820
820
|
`createCancelReceipt` and cancelling through `createReceipt` are gone in 1.0.
|
|
821
821
|
|
|
822
|
+
**External vouchers.** Vouchers of another system (merchandise management,
|
|
823
|
+
web shop) are sold, redeemed and paid out with `source: 'external'`:
|
|
824
|
+
`{ source: 'external', action, type: 'multi_purpose' | 'single_purpose', number,
|
|
825
|
+
amountCents }`, a single-purpose voucher with `vatRateBp` (the rate it was sold
|
|
826
|
+
with, `0` = sold exempt) and optionally `taxedWith` when redeemed or paid out,
|
|
827
|
+
a payout with `reason`. Kasseneck keeps no balance: the business says kind,
|
|
828
|
+
rate and amount, its own system books the balance (`receipt.created`). The
|
|
829
|
+
account must allow it (`getKasseSettings` `vouchers.externalVouchers`: `off`,
|
|
830
|
+
`multi_purpose`, `all`). `checkExternalVoucherNumber` checks the number like
|
|
831
|
+
the server (1 to 40 characters `A–Z a–z 0–9 - _ . /` after trimming; an own
|
|
832
|
+
voucher code is refused). The receipt shows `Gutschein Nr. <number>`, never a
|
|
833
|
+
remaining balance. A value voucher of the old form with a freely typed `code`
|
|
834
|
+
(`type: 'value'`) still works but is deprecated (`deprecation` in the answer).
|
|
835
|
+
|
|
822
836
|
**Vouchers.** A value voucher is only mirrored on a full cancellation (without
|
|
823
837
|
`items`); it cannot be split. A discount voucher is already part of the
|
|
824
838
|
original's turnover, and **every** cancellation takes it back in proportion to
|
|
@@ -1218,6 +1232,90 @@ this README.
|
|
|
1218
1232
|
Terminals that can only be driven through a vendor's Android SDK cannot be
|
|
1219
1233
|
reached from a browser and are not part of this package.
|
|
1220
1234
|
|
|
1235
|
+
### Card terminal on the phone: access, terminal ID and code
|
|
1236
|
+
|
|
1237
|
+
For a card terminal that runs as an app on the phone, Kasseneck keeps the
|
|
1238
|
+
terminal app's login, the terminal IDs (TID) of each business and the code the
|
|
1239
|
+
provider mails when a TID moves to another device. The app gets all three from
|
|
1240
|
+
here; nobody at the device types e-mail, password or TID. Only on `/v3`, not on
|
|
1241
|
+
the register path yet. Sign-in is the business's `api_key` alone: the
|
|
1242
|
+
`cashregister-token` of `apiKeyAuth` is ignored, and an app without a register
|
|
1243
|
+
can sign in with `inventoryKeyAuth` from `./inventory`. A business gets access
|
|
1244
|
+
only once Kasseneck has assigned it at least one TID, and never in the test
|
|
1245
|
+
environment (`kr_test_`).
|
|
1246
|
+
|
|
1247
|
+
```ts
|
|
1248
|
+
// Once per device; keep deviceSecret in the device's secure storage.
|
|
1249
|
+
const device = await api.registerTerminalDevice({ label: 'Pixel 8 - Livia', platform: 'android', app: 'karteck/1.6.21' });
|
|
1250
|
+
|
|
1251
|
+
// On every start and at least once a day.
|
|
1252
|
+
const access = await api.getTerminalAccess({ ...device, app: 'karteck/1.6.22' });
|
|
1253
|
+
if (!access.available) {
|
|
1254
|
+
// No free TID: show access.terminals (TIDs of the own business) and let the user pick one.
|
|
1255
|
+
const taken = await api.claimTerminal({ ...device, terminalId: access.terminals[0]!.terminalId });
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
// The terminal app asks for the code after a TID moved: let Kasseneck read it from the mailbox.
|
|
1259
|
+
if (access.available && access.autoCode) {
|
|
1260
|
+
await api.requestTerminalCode({ ...device, platform: 'android' });
|
|
1261
|
+
const code = await api.getTerminalCode(device); // poll until status 'found'
|
|
1262
|
+
}
|
|
1263
|
+
await api.reportTerminalLogin({ ...device, terminalId: '12345678', success: true, newOnDevice: true });
|
|
1264
|
+
await api.reportTerminalReady(device);
|
|
1265
|
+
```
|
|
1266
|
+
|
|
1267
|
+
- **`registerTerminalDevice({ label, platform, app, requestedBy? })`**:
|
|
1268
|
+
`label` 1-60 characters, `platform` `android` or `ios`, `app` 1-40 (app and
|
|
1269
|
+
version), `requestedBy` up to 80 (written to the log). Answers
|
|
1270
|
+
`{ deviceId, deviceSecret }`; the secret comes only in this answer. At most
|
|
1271
|
+
20 devices per business and 10 registrations per day
|
|
1272
|
+
(`too_many_terminal_devices`). After a lost answer (`outcome: 'unknown'`) a
|
|
1273
|
+
retry registers another device.
|
|
1274
|
+
- **`getTerminalAccess({ deviceId, deviceSecret, platform?, app?, label? })`**:
|
|
1275
|
+
the device keeps its TID; without one it gets a free TID of its business.
|
|
1276
|
+
Answers `TerminalAccess` (`available: true`, `username`, `password`,
|
|
1277
|
+
`terminalId`, `terminalName`, `accountId`, `autoCode`, `codeFormat { length, labels }`
|
|
1278
|
+
for checking a pasted code, `setup { state, since }`, `updatedAt`) or, when no
|
|
1279
|
+
TID is free, `{ available: false, reason: 'no_free_terminal', terminals }`
|
|
1280
|
+
with `{ terminalId, name, lastUsedBy, lastUsedAt }` of the own business only.
|
|
1281
|
+
The optional fields update what the device shows in the log. Repeatable.
|
|
1282
|
+
- **`claimTerminal({ deviceId, deviceSecret, terminalId, label? })`** moves a
|
|
1283
|
+
TID of the own business to this device (the previous device loses it) and
|
|
1284
|
+
answers `TerminalAccess`. Unknown and foreign TIDs get the same answer,
|
|
1285
|
+
`terminal_not_in_business`.
|
|
1286
|
+
- **`requestTerminalCode({ deviceId, deviceSecret, platform, requestedBy? })`**
|
|
1287
|
+
only when `autoCode` is `true` (otherwise `terminal_code_manual`: the app asks
|
|
1288
|
+
the user for the code). An open request younger than 6 minutes stays, so a
|
|
1289
|
+
double tap does no harm; at most 6 requests per device and hour
|
|
1290
|
+
(`terminal_code_rate_limited`). Answers `{ status }`.
|
|
1291
|
+
- **`getTerminalCode({ deviceId, deviceSecret })`** answers
|
|
1292
|
+
`{ status, code?, source?, validUntil?, setup }`; `status` is `none` (no
|
|
1293
|
+
request), `searching`, `found`, `delivered`, `unclear`, `no_code` or
|
|
1294
|
+
`expired`. The `code` (case matters, never change it) comes with `found`; on
|
|
1295
|
+
Android this answer consumes it, on iOS it stays readable until `validUntil`.
|
|
1296
|
+
After a lost answer (`outcome: 'unknown'`) the code may be gone: request a new
|
|
1297
|
+
one. Without a request the call still reports the `setup` state.
|
|
1298
|
+
- **`reportTerminalLogin({ deviceId, deviceSecret, terminalId, success, newOnDevice })`**
|
|
1299
|
+
and **`reportTerminalReady({ deviceId, deviceSecret })`** report the login in
|
|
1300
|
+
the terminal app (`newOnDevice`: first login of this TID on this device) and
|
|
1301
|
+
the finished setup. Both answer nothing.
|
|
1302
|
+
- **After a timeout:** only `registerTerminalDevice` and `getTerminalCode`
|
|
1303
|
+
report `outcome: 'unknown'`. The other five are repeatable: claiming the same
|
|
1304
|
+
TID again changes nothing, an open code request younger than 6 minutes stays
|
|
1305
|
+
(no new one), and both reports write the same state again.
|
|
1306
|
+
- **Secrets:** `deviceSecret`, `password` and `code` never appear in an error of
|
|
1307
|
+
this package. **Never log them** in the app, and do not keep the password or
|
|
1308
|
+
the code longer than the terminal app needs them.
|
|
1309
|
+
- **Errors** (`KasseneckApiError.code`, `TERMINAL_ERROR_CODES`, the list
|
|
1310
|
+
`errorCodes.terminal` of the contract): `terminal_not_enabled` (no TID
|
|
1311
|
+
assigned to the business), `terminal_test_environment`,
|
|
1312
|
+
`terminal_device_unknown` (id or secret wrong, same answer for both),
|
|
1313
|
+
`terminal_device_blocked`, `invalid_terminal_device`,
|
|
1314
|
+
`too_many_terminal_devices`, `terminal_not_in_business`,
|
|
1315
|
+
`terminal_code_manual`, `terminal_code_rate_limited`, `terminal_not_assigned`
|
|
1316
|
+
(call `getTerminalAccess` first), `server_error`, plus the codes of sign-in and
|
|
1317
|
+
edge. A later setup state, code status or source arrives unchanged.
|
|
1318
|
+
|
|
1221
1319
|
## Partner API (`./partner`)
|
|
1222
1320
|
|
|
1223
1321
|
For software vendors who build Kasseneck into their own product: create
|
|
@@ -1789,6 +1887,19 @@ app.post('/kasseneck-webhook', express.raw({ type: '*/*' }), async (req, res) =>
|
|
|
1789
1887
|
the change; `released` and `redeemed` also fire for a partial release or
|
|
1790
1888
|
redemption (status still `active`). Deduplicate on `event.id`; deliveries
|
|
1791
1889
|
are retried after 1 min, 5 min, 30 min, 2 h and 12 h.
|
|
1890
|
+
- **Receipt events.** `receipt.created` fires for every newly signed receipt
|
|
1891
|
+
of every kind (sale, cancellation, start, zero, monthly, annual, final),
|
|
1892
|
+
`receipt.cancelled` additionally for every cancellation receipt, with
|
|
1893
|
+
`cancellationOf` (receipt id of the original, `null` for the deprecated
|
|
1894
|
+
cancellation without reference), `cancelledItems` and `refunds`. The receipt
|
|
1895
|
+
is the one `listReceipts` returns with `view: 'full'`
|
|
1896
|
+
(`RECEIPT_WEBHOOK_EVENTS`, `ReceiptCreatedEventData`,
|
|
1897
|
+
`ReceiptCancelledEventData`). The event id is fixed per receipt and event;
|
|
1898
|
+
the receipt number runs on per register, so a gap is fetched with
|
|
1899
|
+
`listReceipts`. A receipt too large for a delivery comes without `items`,
|
|
1900
|
+
with `truncated: true` and a `hint`. Every account may manage webhooks; an
|
|
1901
|
+
event needs its module (`receipt.*` the register, the others inventory),
|
|
1902
|
+
otherwise `webhook_event_not_available`.
|
|
1792
1903
|
- **Safety net without webhooks.** `listStock({ changedSince })` and
|
|
1793
1904
|
`listArticles({ updatedSince })` are sorted by `updatedAt` ascending and
|
|
1794
1905
|
include the boundary, so remembering the last `updatedAt` and asking again
|
package/dist/cjs/client/api.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type TransportOptions } from './transport.js';
|
|
|
5
5
|
import { type CashregisterReportPeriod, type ReportV2, type ReportV2Options } from './reports.js';
|
|
6
6
|
import { type CashboxStatus, type SignatureStatus } from './status.js';
|
|
7
7
|
import { type CreateDepExportOptions, type CreateDepExportResult, type DepExport, type DepExportFile, type DepHandoverLink, type GetDepExportFileOptions, type RevokedDepHandoverLink, type WaitForDepExportOptions } from './dep-export.js';
|
|
8
|
+
import { type ClaimTerminalOptions, type GetTerminalAccessOptions, type RegisteredTerminalDevice, type RegisterTerminalDeviceOptions, type ReportTerminalLoginOptions, type RequestTerminalCodeOptions, type TerminalAccess, type TerminalAccessResult, type TerminalCode, type TerminalCodeRequest, type TerminalDeviceCredentials } from './terminal.js';
|
|
8
9
|
import { type ListedReceipt, type ListReceiptsOptions, type ListReceiptsPage, type ListReceiptsView } from './list-receipts.js';
|
|
9
10
|
import { type SendReceiptEmailOptions, type SendReceiptEmailResult, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type ListMyReceiptsOptions, type ReceiptList, type ReceiptWithCompany, type SellReceiptOptions, type CancelReceiptOptions, type CancelReceiptResult } from './receipts.js';
|
|
10
11
|
/**
|
|
@@ -80,6 +81,20 @@ export interface KasseneckApi {
|
|
|
80
81
|
revokeDepHandoverLink(options: {
|
|
81
82
|
linkId: string;
|
|
82
83
|
}): Promise<RevokedDepHandoverLink>;
|
|
84
|
+
/** Geraet fuer das Kartenterminal am Handy einmal anmelden (`registerTerminalDevice`, nur /v3); `deviceSecret` nur in dieser Antwort. */
|
|
85
|
+
registerTerminalDevice(options: RegisterTerminalDeviceOptions): Promise<RegisteredTerminalDevice>;
|
|
86
|
+
/** Zugang und TID fuer das Geraet, oder die TIDs des eigenen Betriebs, wenn keine frei ist (`getTerminalAccess`). */
|
|
87
|
+
getTerminalAccess(options: GetTerminalAccessOptions): Promise<TerminalAccessResult>;
|
|
88
|
+
/** TID des eigenen Betriebs auf dieses Geraet uebernehmen (`claimTerminal`). */
|
|
89
|
+
claimTerminal(options: ClaimTerminalOptions): Promise<TerminalAccess>;
|
|
90
|
+
/** Code fuer die TID aus dem Postfach anfragen (`requestTerminalCode`, nur bei `autoCode`). */
|
|
91
|
+
requestTerminalCode(options: RequestTerminalCodeOptions): Promise<TerminalCodeRequest>;
|
|
92
|
+
/** Stand der Code-Anfrage und der Einrichtung, bei `found` mit Code (`getTerminalCode`). */
|
|
93
|
+
getTerminalCode(options: TerminalDeviceCredentials): Promise<TerminalCode>;
|
|
94
|
+
/** Ausgang der Anmeldung in der Terminal-App melden (`reportTerminalLogin`). */
|
|
95
|
+
reportTerminalLogin(options: ReportTerminalLoginOptions): Promise<void>;
|
|
96
|
+
/** Terminal-App fertig eingerichtet melden (`reportTerminalReady`). */
|
|
97
|
+
reportTerminalReady(options: TerminalDeviceCredentials): Promise<void>;
|
|
83
98
|
/** Kassenbericht als PDF (v2): abgeschlossener Monat, Tag oder Zeitraum (Endpunkt `getCashregisterReport`). */
|
|
84
99
|
getCashregisterReport(options: CashregisterReportPeriod): Promise<Uint8Array>;
|
|
85
100
|
/** @deprecated Since 1.10.0: use getCashregisterReport. Tagesbericht als PDF (Kalendertag nach Wiener Zeit). */
|
package/dist/cjs/client/api.js
CHANGED
|
@@ -7,6 +7,7 @@ const transport_js_1 = require("./transport.js");
|
|
|
7
7
|
const reports_js_1 = require("./reports.js");
|
|
8
8
|
const status_js_1 = require("./status.js");
|
|
9
9
|
const dep_export_js_1 = require("./dep-export.js");
|
|
10
|
+
const terminal_js_1 = require("./terminal.js");
|
|
10
11
|
const list_receipts_js_1 = require("./list-receipts.js");
|
|
11
12
|
const receipts_js_1 = require("./receipts.js");
|
|
12
13
|
const cashregisters_js_1 = require("./cashregisters.js");
|
|
@@ -49,6 +50,13 @@ function createKasseneckApi(options) {
|
|
|
49
50
|
getDepExportFile: (o) => (0, dep_export_js_1.getDepExportFile)(rufenDatei, holen, o),
|
|
50
51
|
createDepHandoverLink: (o) => (0, dep_export_js_1.createDepHandoverLink)(rufen, o),
|
|
51
52
|
revokeDepHandoverLink: (o) => (0, dep_export_js_1.revokeDepHandoverLink)(rufen, o),
|
|
53
|
+
registerTerminalDevice: (o) => (0, terminal_js_1.registerTerminalDevice)(rufen, o),
|
|
54
|
+
getTerminalAccess: (o) => (0, terminal_js_1.getTerminalAccess)(rufen, o),
|
|
55
|
+
claimTerminal: (o) => (0, terminal_js_1.claimTerminal)(rufen, o),
|
|
56
|
+
requestTerminalCode: (o) => (0, terminal_js_1.requestTerminalCode)(rufen, o),
|
|
57
|
+
getTerminalCode: (o) => (0, terminal_js_1.getTerminalCode)(rufen, o),
|
|
58
|
+
reportTerminalLogin: (o) => (0, terminal_js_1.reportTerminalLogin)(rufen, o),
|
|
59
|
+
reportTerminalReady: (o) => (0, terminal_js_1.reportTerminalReady)(rufen, o),
|
|
52
60
|
getCashregisterReport: (options) => (0, reports_js_1.getCashregisterReport)(rufenBinaer, options),
|
|
53
61
|
downloadDailyReport: (date) => (0, reports_js_1.downloadDailyReport)(rufenBinaer, date),
|
|
54
62
|
downloadMonthlyReport: (reportMonth) => (0, reports_js_1.downloadMonthlyReport)(rufenBinaer, reportMonth),
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* umhuellt, muss ihn weiterhin absetzen koennen.
|
|
14
14
|
*/
|
|
15
15
|
import type { FileOrData, FileOrDataCallOptions, PdfOrData, TransportBodyFields, TransportCallOptions } from './transport.js';
|
|
16
|
-
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState"];
|
|
16
|
+
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady"];
|
|
17
17
|
export type ApiCall = typeof ALL_CALLS[number];
|
|
18
18
|
/**
|
|
19
19
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -21,7 +21,7 @@ export type ApiCall = typeof ALL_CALLS[number];
|
|
|
21
21
|
* (`fixtures/v3/v3-vokabular.json`, `endpoints.public`, umbenannt nach
|
|
22
22
|
* `names`). Ein Test haelt beide Listen deckungsgleich.
|
|
23
23
|
*/
|
|
24
|
-
export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "cancelReceipt", "sendReceiptEmail", "generateFullReceiptId", "downloadReceipt", "getFirstReceiptDate", "getReportV2", "downloadReport", "downloadDailyReport", "getCashregisterReport", "createPaymentLinkStripe", "stripeCaptureIntent", "hobexPayApi", "hobexRefundApi", "hobexGetStatus", "financeWebService", "listMyTipRecipients", "getPartnerInfo", "createPartnerCustomer", "checkPartnerCustomerEmail", "listPartnerCustomers", "getPartnerCustomer", "sendPartnerCustomerFonLink", "createPartnerWebhook", "updatePartnerWebhook", "deletePartnerWebhook", "listPartnerWebhooks", "sendPartnerWebhookTest", "rotatePartnerWebhookSecret", "listPartnerWebhookDeliveries", "requestCustomerSignature", "getCustomerSignatureStatus", "createCustomerCashregister", "activateCashregister", "listCustomerCashregisters", "getCustomerCredentials", "reportCustomerContract", "getPartnerBilling", "getPartnerBillingMonth", "createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml", "getInvoiceSetupStatus", "listBrands", "recordInvoicePayment", "createInvoiceItem", "updateInvoiceItem", "withdrawInvoiceItem", "getInvoiceItem", "listInvoiceItems", "setCustomerMandate", "revokeCustomerMandate", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listReceipts", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink"];
|
|
24
|
+
export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "cancelReceipt", "sendReceiptEmail", "generateFullReceiptId", "downloadReceipt", "getFirstReceiptDate", "getReportV2", "downloadReport", "downloadDailyReport", "getCashregisterReport", "createPaymentLinkStripe", "stripeCaptureIntent", "hobexPayApi", "hobexRefundApi", "hobexGetStatus", "financeWebService", "listMyTipRecipients", "getPartnerInfo", "createPartnerCustomer", "checkPartnerCustomerEmail", "listPartnerCustomers", "getPartnerCustomer", "sendPartnerCustomerFonLink", "createPartnerWebhook", "updatePartnerWebhook", "deletePartnerWebhook", "listPartnerWebhooks", "sendPartnerWebhookTest", "rotatePartnerWebhookSecret", "listPartnerWebhookDeliveries", "requestCustomerSignature", "getCustomerSignatureStatus", "createCustomerCashregister", "activateCashregister", "listCustomerCashregisters", "getCustomerCredentials", "reportCustomerContract", "getPartnerBilling", "getPartnerBillingMonth", "createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml", "getInvoiceSetupStatus", "listBrands", "recordInvoicePayment", "createInvoiceItem", "updateInvoiceItem", "withdrawInvoiceItem", "getInvoiceItem", "listInvoiceItems", "setCustomerMandate", "revokeCustomerMandate", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listReceipts", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady"];
|
|
25
25
|
/**
|
|
26
26
|
* Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
|
|
27
27
|
* Web-Kasse: gleicher Ursprung `/api/v3`), in der Reihenfolge von
|
|
@@ -50,7 +50,7 @@ export type PosCall = typeof POS_CALLS[number];
|
|
|
50
50
|
* [ALL_CALLS], [PUBLIC_CALLS] und [POS_CALLS] steht entweder hier oder in
|
|
51
51
|
* [CALLS_WITHOUT_EFFECT] (Waechter `test/ausgang-einordnung.test.ts`).
|
|
52
52
|
*/
|
|
53
|
-
export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "hobexPayApi", "hobexRefundApi", "issueInvoice", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyShiftCount", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
|
|
53
|
+
export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "getTerminalCode", "hobexPayApi", "hobexRefundApi", "issueInvoice", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyShiftCount", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "registerTerminalDevice", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
|
|
54
54
|
/** Warum ein Aufruf keine Wirkung hat, die ein Zeitlimit offen lassen koennte. */
|
|
55
55
|
export type CallWithoutEffectReason = 'read' | 'repeatable';
|
|
56
56
|
/**
|
|
@@ -157,6 +157,14 @@ exports.ALL_CALLS = [
|
|
|
157
157
|
'getRegisterInspectionInfo',
|
|
158
158
|
// Connect-Bestand (./pos): welche Connect-Version an welchem Kassengeraet laeuft; nur ueber den Kassenweg.
|
|
159
159
|
'reportConnectState',
|
|
160
|
+
// Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
|
|
161
|
+
'registerTerminalDevice',
|
|
162
|
+
'getTerminalAccess',
|
|
163
|
+
'claimTerminal',
|
|
164
|
+
'requestTerminalCode',
|
|
165
|
+
'getTerminalCode',
|
|
166
|
+
'reportTerminalLogin',
|
|
167
|
+
'reportTerminalReady',
|
|
160
168
|
];
|
|
161
169
|
/**
|
|
162
170
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -287,6 +295,14 @@ exports.PUBLIC_CALLS = [
|
|
|
287
295
|
'getDepExportFile',
|
|
288
296
|
'createDepHandoverLink',
|
|
289
297
|
'revokeDepHandoverLink',
|
|
298
|
+
// Kartenterminal am Handy (api_key + Geraete-Ausweis), nur unter /v3; am Kassenweg noch nicht.
|
|
299
|
+
'registerTerminalDevice',
|
|
300
|
+
'getTerminalAccess',
|
|
301
|
+
'claimTerminal',
|
|
302
|
+
'requestTerminalCode',
|
|
303
|
+
'getTerminalCode',
|
|
304
|
+
'reportTerminalLogin',
|
|
305
|
+
'reportTerminalReady',
|
|
290
306
|
];
|
|
291
307
|
/**
|
|
292
308
|
* Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
|
|
@@ -400,6 +416,8 @@ exports.UNKNOWN_OUTCOME_CALLS = [
|
|
|
400
416
|
'deleteWebhook',
|
|
401
417
|
'extendReservation',
|
|
402
418
|
'financeWebService',
|
|
419
|
+
// Auf Android verbraucht die Antwort den Code: nach einem Zeitlimit kann er zugestellt und weg sein.
|
|
420
|
+
'getTerminalCode',
|
|
403
421
|
'hobexPayApi',
|
|
404
422
|
'hobexRefundApi',
|
|
405
423
|
'issueInvoice',
|
|
@@ -416,6 +434,7 @@ exports.UNKNOWN_OUTCOME_CALLS = [
|
|
|
416
434
|
'recordStockLoss',
|
|
417
435
|
'recordStocktakeCount',
|
|
418
436
|
'recountStocktake',
|
|
437
|
+
'registerTerminalDevice',
|
|
419
438
|
'releaseReservation',
|
|
420
439
|
'reportConnectState',
|
|
421
440
|
'reportCustomerContract',
|
|
@@ -474,6 +493,8 @@ exports.UNKNOWN_OUTCOME_CALLS = [
|
|
|
474
493
|
exports.CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
475
494
|
checkPartnerCustomerEmail: 'read',
|
|
476
495
|
checkVoucher: 'read',
|
|
496
|
+
// Kartenterminal: dieselbe TID noch einmal uebernehmen aendert nichts am Server.
|
|
497
|
+
claimTerminal: 'repeatable',
|
|
477
498
|
downloadDailyReport: 'read',
|
|
478
499
|
downloadReceipt: 'read',
|
|
479
500
|
downloadReport: 'read',
|
|
@@ -516,6 +537,8 @@ exports.CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
516
537
|
getStocktake: 'read',
|
|
517
538
|
getSignatureCardOrder: 'read',
|
|
518
539
|
getStocktakePdf: 'read',
|
|
540
|
+
// Behaelt die TID des Geraets bzw. vergibt eine freie; eine Wiederholung liefert dieselbe Zuordnung und bucht nichts.
|
|
541
|
+
getTerminalAccess: 'repeatable',
|
|
519
542
|
getVariantGroup: 'read',
|
|
520
543
|
hobexGetStatus: 'read',
|
|
521
544
|
listArticles: 'read',
|
|
@@ -554,7 +577,12 @@ exports.CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
554
577
|
registerPinLogin: 'repeatable',
|
|
555
578
|
registerUserLogin: 'repeatable',
|
|
556
579
|
renewRegisterSession: 'repeatable',
|
|
580
|
+
// Kartenterminal: Anmeldung und Einrichtung melden schreiben denselben Stand noch einmal.
|
|
581
|
+
reportTerminalLogin: 'repeatable',
|
|
582
|
+
reportTerminalReady: 'repeatable',
|
|
557
583
|
reprintVoucherLabel: 'repeatable',
|
|
584
|
+
// Eine offene Code-Anfrage juenger als 6 Minuten bleibt; eine Wiederholung legt keine neue an.
|
|
585
|
+
requestTerminalCode: 'repeatable',
|
|
558
586
|
searchCustomers: 'read',
|
|
559
587
|
});
|
|
560
588
|
const MIT_WIRKUNG = new Set(exports.UNKNOWN_OUTCOME_CALLS);
|
|
@@ -6,6 +6,7 @@ export { type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, ty
|
|
|
6
6
|
export { listMyCashregisters } from './cashregisters.js';
|
|
7
7
|
export { 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, } from './list-receipts.js';
|
|
8
8
|
export { 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, } from './dep-export.js';
|
|
9
|
+
export { 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, } from './terminal.js';
|
|
9
10
|
export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, type CashregisterReportPeriod, type ReportV2, type ReportV2Metadata, type ReportV2Options } from './reports.js';
|
|
10
11
|
export { type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, } from './status.js';
|
|
11
12
|
export { type KasseneckApi, createKasseneckApi } from './api.js';
|
package/dist/cjs/client/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
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.listMyCashregisters = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = 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.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.DEFAULT_TIMEOUT_MS = exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = void 0;
|
|
4
|
-
exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = 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;
|
|
4
|
+
exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = 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;
|
|
5
5
|
var auth_js_1 = require("./auth.js");
|
|
6
6
|
Object.defineProperty(exports, "apiKeyAuth", { enumerable: true, get: function () { return auth_js_1.apiKeyAuth; } });
|
|
7
7
|
Object.defineProperty(exports, "registerUserAuth", { enumerable: true, get: function () { return auth_js_1.registerUserAuth; } });
|
|
@@ -78,6 +78,22 @@ Object.defineProperty(exports, "DEP_EXPORT_POLL_FACTOR", { enumerable: true, get
|
|
|
78
78
|
Object.defineProperty(exports, "DEP_EXPORT_POLL_MAX_MS", { enumerable: true, get: function () { return dep_export_js_1.DEP_EXPORT_POLL_MAX_MS; } });
|
|
79
79
|
Object.defineProperty(exports, "DEP_EXPORT_WAIT_TIMEOUT_MS", { enumerable: true, get: function () { return dep_export_js_1.DEP_EXPORT_WAIT_TIMEOUT_MS; } });
|
|
80
80
|
Object.defineProperty(exports, "DEP_EXPORT_DOWNLOAD_TIMEOUT_MS", { enumerable: true, get: function () { return dep_export_js_1.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS; } });
|
|
81
|
+
var terminal_js_1 = require("./terminal.js");
|
|
82
|
+
Object.defineProperty(exports, "registerTerminalDevice", { enumerable: true, get: function () { return terminal_js_1.registerTerminalDevice; } });
|
|
83
|
+
Object.defineProperty(exports, "getTerminalAccess", { enumerable: true, get: function () { return terminal_js_1.getTerminalAccess; } });
|
|
84
|
+
Object.defineProperty(exports, "claimTerminal", { enumerable: true, get: function () { return terminal_js_1.claimTerminal; } });
|
|
85
|
+
Object.defineProperty(exports, "requestTerminalCode", { enumerable: true, get: function () { return terminal_js_1.requestTerminalCode; } });
|
|
86
|
+
Object.defineProperty(exports, "getTerminalCode", { enumerable: true, get: function () { return terminal_js_1.getTerminalCode; } });
|
|
87
|
+
Object.defineProperty(exports, "reportTerminalLogin", { enumerable: true, get: function () { return terminal_js_1.reportTerminalLogin; } });
|
|
88
|
+
Object.defineProperty(exports, "reportTerminalReady", { enumerable: true, get: function () { return terminal_js_1.reportTerminalReady; } });
|
|
89
|
+
Object.defineProperty(exports, "TERMINAL_PLATFORMS", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_PLATFORMS; } });
|
|
90
|
+
Object.defineProperty(exports, "TERMINAL_SETUP_STATES", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_SETUP_STATES; } });
|
|
91
|
+
Object.defineProperty(exports, "TERMINAL_CODE_STATUSES", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_CODE_STATUSES; } });
|
|
92
|
+
Object.defineProperty(exports, "TERMINAL_CODE_SOURCES", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_CODE_SOURCES; } });
|
|
93
|
+
Object.defineProperty(exports, "TERMINAL_ERROR_CODES", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_ERROR_CODES; } });
|
|
94
|
+
Object.defineProperty(exports, "TERMINAL_LABEL_MAX", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_LABEL_MAX; } });
|
|
95
|
+
Object.defineProperty(exports, "TERMINAL_APP_MAX", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_APP_MAX; } });
|
|
96
|
+
Object.defineProperty(exports, "TERMINAL_REQUESTED_BY_MAX", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_REQUESTED_BY_MAX; } });
|
|
81
97
|
var reports_js_1 = require("./reports.js");
|
|
82
98
|
Object.defineProperty(exports, "downloadDailyReport", { enumerable: true, get: function () { return reports_js_1.downloadDailyReport; } });
|
|
83
99
|
Object.defineProperty(exports, "downloadMonthlyReport", { enumerable: true, get: function () { return reports_js_1.downloadMonthlyReport; } });
|
|
@@ -216,6 +216,11 @@ export interface ListReceiptsPage<V extends ListReceiptsView = 'summary'> {
|
|
|
216
216
|
}
|
|
217
217
|
/** Zeile `view: summary` vom Draht. */
|
|
218
218
|
export declare function fromListReceiptsSummaryPayload(payload: Record<string, unknown>): ListReceiptsSummary;
|
|
219
|
+
/**
|
|
220
|
+
* Ein Beleg der vollen Ansicht vom Draht: das Belegdokument und die Zusaetze, die `getReceipt` in der Huelle traegt.
|
|
221
|
+
* Paketintern auch fuer die Beleg-Webhooks (dieselbe Darstellung, `parseInventoryWebhookEvent`).
|
|
222
|
+
*/
|
|
223
|
+
export declare function vollerBeleg(roh: Record<string, unknown>): ListedFullReceipt;
|
|
219
224
|
/**
|
|
220
225
|
* Ein Beleg der vollen Ansicht mit den Druck- und Anzeigedaten seiner Seite, in derselben Form wie
|
|
221
226
|
* `getReceiptWithCompany` (ohne `outputs`): der Kopf der Version des Belegs aus `headers` (Nullbelege ohne
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LIST_RECEIPTS_ERROR_CODES = exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = exports.LIST_RECEIPTS_VIEWS = void 0;
|
|
4
4
|
exports.fromListReceiptsSummaryPayload = fromListReceiptsSummaryPayload;
|
|
5
|
+
exports.vollerBeleg = vollerBeleg;
|
|
5
6
|
exports.listedReceiptWithCompany = listedReceiptWithCompany;
|
|
6
7
|
exports.listReceipts = listReceipts;
|
|
7
8
|
exports.listAllReceipts = listAllReceipts;
|
|
@@ -227,7 +228,10 @@ function kopfdaten(roh) {
|
|
|
227
228
|
return { ...(0, index_js_2.fromReceiptCompanyPayload)(roh), label: typeof label === 'string' ? label : '' };
|
|
228
229
|
}
|
|
229
230
|
const LOGO_STUFEN = ['S', 'M', 'L', 'XL'];
|
|
230
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* Ein Beleg der vollen Ansicht vom Draht: das Belegdokument und die Zusaetze, die `getReceipt` in der Huelle traegt.
|
|
233
|
+
* Paketintern auch fuer die Beleg-Webhooks (dieselbe Darstellung, `parseInventoryWebhookEvent`).
|
|
234
|
+
*/
|
|
231
235
|
function vollerBeleg(roh) {
|
|
232
236
|
const beleg = (0, index_js_2.fromReceiptPayload)(roh);
|
|
233
237
|
if (typeof roh['testSignature'] === 'boolean')
|
|
@@ -280,6 +280,12 @@ export interface ReceiptWithCompany {
|
|
|
280
280
|
* neuer Beleg). Fehlt sonst, auch beim ersten Verkauf mit Schluessel.
|
|
281
281
|
*/
|
|
282
282
|
replayed?: true;
|
|
283
|
+
/**
|
|
284
|
+
* Nur nach einem Verkauf auf einem veralteten Weg (Server 2026-11: Wertgutschein der Altform mit frei getipptem
|
|
285
|
+
* Code, `type: 'value'`): der Hinweis des Servers (englisch). Der Beleg gilt; kuenftig den Gutschein als
|
|
286
|
+
* Fremdgutschein (`source: 'external'`) bzw. als eigenen ueber eine Sorte senden. Fehlt sonst.
|
|
287
|
+
*/
|
|
288
|
+
deprecation?: string;
|
|
283
289
|
}
|
|
284
290
|
/**
|
|
285
291
|
* Das Zeilenmodell zum Drucken und Anzeigen eines Belegs aus einer Antwort.
|
|
@@ -1063,6 +1063,7 @@ function belegMitFirmaAusHuelle(daten, functionName) {
|
|
|
1063
1063
|
...(outputs !== undefined ? { outputs } : {}),
|
|
1064
1064
|
// Nur genau true: ohne Wiederholung bleibt die Form des Ergebnisses wie bisher.
|
|
1065
1065
|
...(d.replayed === true ? { replayed: true } : {}),
|
|
1066
|
+
...(typeof d.deprecation === 'string' && d.deprecation !== '' ? { deprecation: d.deprecation } : {}),
|
|
1066
1067
|
};
|
|
1067
1068
|
}
|
|
1068
1069
|
/**
|