@kreiseck/kasseneck-api 1.35.1 → 1.36.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 +22 -10
- package/dist/cjs/client/api.d.ts +15 -1
- package/dist/cjs/client/api.js +4 -0
- package/dist/cjs/client/aufrufe.d.ts +2 -2
- package/dist/cjs/client/aufrufe.js +10 -0
- package/dist/cjs/client/auth.d.ts +9 -3
- package/dist/cjs/client/auth.js +5 -4
- package/dist/cjs/client/ewp.d.ts +125 -0
- package/dist/cjs/client/ewp.js +95 -0
- package/dist/cjs/client/index.d.ts +1 -0
- package/dist/cjs/client/index.js +4 -1
- package/dist/cjs/client/list-deposit-types.d.ts +3 -0
- package/dist/cjs/client/list-deposit-types.js +3 -0
- package/dist/cjs/client/receipts.d.ts +3 -3
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/invoice/index.d.ts +2 -2
- package/dist/cjs/invoice/index.js +2 -1
- package/dist/cjs/invoice/texte.d.ts +5 -0
- package/dist/cjs/invoice/texte.js +10 -0
- package/dist/cjs/invoice/typen.d.ts +34 -1
- package/dist/cjs/invoice/vertrag.d.ts +13 -4
- package/dist/cjs/invoice/vertrag.js +29 -6
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/api.d.ts +15 -1
- package/dist/esm/client/api.js +4 -0
- package/dist/esm/client/aufrufe.d.ts +2 -2
- package/dist/esm/client/aufrufe.js +10 -0
- package/dist/esm/client/auth.d.ts +9 -3
- package/dist/esm/client/auth.js +5 -4
- package/dist/esm/client/ewp.d.ts +125 -0
- package/dist/esm/client/ewp.js +89 -0
- package/dist/esm/client/index.d.ts +1 -0
- package/dist/esm/client/index.js +1 -0
- package/dist/esm/client/list-deposit-types.d.ts +3 -0
- package/dist/esm/client/list-deposit-types.js +3 -0
- package/dist/esm/client/receipts.d.ts +3 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/invoice/index.d.ts +2 -2
- package/dist/esm/invoice/index.js +1 -1
- package/dist/esm/invoice/texte.d.ts +5 -0
- package/dist/esm/invoice/texte.js +10 -0
- package/dist/esm/invoice/typen.d.ts +34 -1
- package/dist/esm/invoice/vertrag.d.ts +13 -4
- package/dist/esm/invoice/vertrag.js +28 -5
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api-examples/issue-error-deposit.json +39 -0
- package/fixtures/invoice-api-examples/issue-invoice-deposit.json +55 -0
- package/fixtures/invoice-api.schema.json +65 -2
- package/fixtures/invoice-texts.json +11 -1
- package/fixtures/pos-texts.json +1 -1
- package/fixtures/surface.json +13 -4
- package/fixtures/v3/antworten/belege.json +1 -1
- package/fixtures/v3/antworten/belegmail.json +1 -1
- package/fixtures/v3/antworten/berichte.json +1 -1
- package/fixtures/v3/antworten/kasse-belege.json +1 -1
- package/fixtures/v3/antworten/kasse.json +2 -2
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +1 -1
- package/fixtures/v3/antworten/storno.json +1 -1
- package/fixtures/v3/stored/belege.json +1 -1
- package/fixtures/v3/stored/kasse.json +2 -2
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +358 -5
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,19 @@ 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.36.0 - unveröffentlicht
|
|
8
|
+
|
|
9
|
+
Deposit on invoice and credit-note positions, and the EWP report (single-use deposit report) through the API key. Additive; every existing call, invoice and golden behaves as before.
|
|
10
|
+
|
|
11
|
+
- **`items[].deposit` on `issueInvoice` and `createCreditNote`:** a position that carries `deposit` is a deposit line for the position `depositFor` (index in `items`, 0 to 499). Types `InvoiceItemDepositInput` (`depositTypeId`, `depositFor`, optional `gtin` of 8 to 14 digits, optional `ownFilling`) at `IssueInvoiceItemInput.deposit` and `CreditNoteItemInput.deposit`; `InvoiceItemDeposit` (the same plus `depositKind`, `single_use | reusable`, set by the server) at `InvoiceItem.deposit`, read with `getInvoice` and absent on every position without deposit. The contract field `DEPOSIT_ITEM_FIELD` (`./invoice`) equals the backend field field by field; the string field type of the contract knows `pattern` now (the GTIN), written to `fixtures/invoice-api.schema.json` as `pattern`. The five error codes `deposit_not_enabled`, `deposit_type_not_found`, `deposit_set_by_server`, `invalid_deposit_quantity` and `invalid_deposit` are appended to `INVOICE_ERROR_CODES`; the existing order is unchanged. New examples `issue-invoice-deposit.json` and `issue-error-deposit.json`. Reason: a merchandise system that invoices beverages must be able to bill the deposit as its own lines, and the server prints and reports them.
|
|
12
|
+
- **Texts for the invoice with single-use deposit** (`fixtures/invoice-texts.json`, de and en): `pdf.totals.single_use_deposit`, `pdf.totals.head_rate`, `pdf.totals.head_net`, `pdf.totals.head_vat` (head of the tax table, which gets a 0 % row for single-use deposit) and `einvoice.exemption.single_use_deposit` (UStR Rz 8). Same wording as the backend.
|
|
13
|
+
- **EWP report** (`/v3`, API key, only for businesses with the filler role; no cash-register token needed): `getEwpReport({ month })` returns the report of a month `YYYY-MM` (`dueDate`, `provisional`, `test`, `lines[]` per GTIN with `domestic`, `foreign` and `sources` of the quantity, `warnings[]`, `extraQuantities[]`, `downloadedAt`); `downloadEwpReport({ month })` returns the CSV for the upload (`{ csv, filename, contentType }`, calls `getEwpReport` with `format: 'csv'`; a closed month counts as downloaded afterwards); `setEwpExtraQuantities({ month, extraQuantities })` replaces the extra quantities of the month (own consumption, sampling, donation ...; an empty list clears them) and returns the new report. Types `EwpReport`, `EwpLine`, `EwpWarning` (`code`: `gtin_not_registered`, `foreign_not_reportable`, `master_data_missing`, `negative_quantity`, `invalid_posting`; `country` is `null` for an extra quantity without a country), `EwpExtraQuantity` (`by` is the uid of the login or `'api'`), `EwpExtraQuantityInput`, and the lists `EWP_REASONS` (`own_consumption`, `sampling`, `donation`, `theft`, `free_goods`, `stocktake`, `return`, `external_system`, `other`) and `EWP_WARNING_CODES`. An answer that is not a report throws `KasseneckValidationError` (scope `response`), an empty or missing month and an `extraQuantities` that is not a list throw before sending (scope `request`). Both calls are repeatable (`CALLS_WITHOUT_EFFECT`, `'repeatable'`), not "unknown outcome". Reason: the report is due on the 5th of the following month, and a merchandise system that fills the beverages itself reports from its own data.
|
|
14
|
+
- **`apiKeyAuth` needs no cash-register token for calls without a register (listDepositTypes, EWP report):** `cashregisterToken` is optional; without it the header `cashregister-token` is not sent, an empty or blank text still throws `KasseneckAuthError`, and a call that needs a cash register answers `cashregister_token_missing`. Reason: an integrator with only an API key and no register must be able to use the deposit and EWP calls. A token that is passed behaves as before.
|
|
15
|
+
- **Corrections of doc comments (no change of behavior):** The server derives deposit from the articles only when `autoDeposits` is `true`, not by default (the comment said the opposite). `listDepositTypes` and `apiKeyAuth` say that those calls need no cash-register token.
|
|
16
|
+
- **Contract:** `fixtures/v3/*` taken over from the backend (vocabulary entries `getEwpReport`, `setEwpExtraQuantities`, the five deposit error codes), `fixtures/surface.json` lists both calls. In the tests, the deposit types of `listDepositTypes` have the shape the server sends (`active`, no container type and rate 0 for single-use).
|
|
17
|
+
- `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json`, `hobex-hps-codes.json` and `invoice-api.schema.json` regenerated for the version.
|
|
18
|
+
|
|
19
|
+
## 1.35.1 - 2026-11-10
|
|
8
20
|
|
|
9
21
|
Fixes in the hobex HPS card payment through Kasseneck Connect (`./payments`). The first two were measured at the test terminal 3600335 (HPS 1.14.4, firmware 7.3.6, `tecstest.hobex.at`) on 10.11.2026; the reversal fix follows from the same lesson.
|
|
10
22
|
|
|
@@ -14,7 +26,7 @@ Fixes in the hobex HPS card payment through Kasseneck Connect (`./payments`). Th
|
|
|
14
26
|
- **Contract:** new file `fixtures/hobex-hps-cases.json` with the TID cases, receipt cases (`hobexReceiptFromHps` + `hobexReceiptToCardPaymentData` on the full measured payment answer and on a status answer in the v2 form from the shortened 10.11. notes: `aid`, `cvm` as number, `currency: null`; whether `transactionId` is missing there is assumed, not measured, so it is checked with and without) and the clarification cases built from the measured answers, among them the reversal cases (and `reversalAnswers`: every listed answer to the void, once with an approval and once with `9011` in the status), a later approval after two `9027`, a till abort answered with `100002` and an abort answered with HTTP 404; the Dart twin computes the same cases. Card data in the contract and in the tests is a test card (`541333******0021`, expiry `2912`); the real card data of the test terminal (number, expiry, cryptogram, VU) is removed from `fixtures/` and `test/`, in `fixtures/receipts/card-hobex-hps.json` the expiry only (the printed bon and all goldens are unchanged, only its input hash in `manifest.json` moves); real approval and receipt numbers of the test terminal in the tests and doc comments are replaced by invented ones or dropped.
|
|
15
27
|
- `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json`, `hobex-hps-codes.json` and `invoice-api.schema.json` regenerated for the version.
|
|
16
28
|
|
|
17
|
-
## 1.35.0 -
|
|
29
|
+
## 1.35.0 - 2026-11-10
|
|
18
30
|
|
|
19
31
|
Printer catalog for setting up a receipt printer through Kasseneck Connect with one click. Additive; every existing call, receipt and golden behaves as before.
|
|
20
32
|
|
|
@@ -26,7 +38,7 @@ Printer catalog for setting up a receipt printer through Kasseneck Connect with
|
|
|
26
38
|
- **Values only from the device settings:** `cut` is `partial` or `none` (what the till offers), `qrMode` `escpos` or `raster` (`auto` means "not decided" and says nothing about a model), and `charsPerLine` must match the factory paper size (`CHARS_PER_PAPER_SIZE`: 32 for `mm58`, 48 for `mm80`).
|
|
27
39
|
- **Contract:** new file `fixtures/printer-catalog.json` with the entries, the value sets and the test cases (normalization, lookup with the shipped catalog, with every entry approved, with some approved and with a catalog of its own with overlapping manufacturers, proposals, catalog problems such as a match name in two entries, a paper size wider than the printer or an incomplete device test). The Dart twin computes the same cases. The catalog itself is checked only by the tests; at run time nothing is repaired or dropped silently.
|
|
28
40
|
|
|
29
|
-
## 1.34.0 -
|
|
41
|
+
## 1.34.0 - 2026-11-09
|
|
30
42
|
|
|
31
43
|
Read the deposit types of a business with the API key: new `listDepositTypes()` on the API client (`/v3` only, right `read`, no effect). Additive; every existing call, receipt and golden behaves as before.
|
|
32
44
|
|
|
@@ -34,7 +46,7 @@ Read the deposit types of a business with the API key: new `listDepositTypes()`
|
|
|
34
46
|
- **Contract:** `unfixTerminal` and the codes `terminal_fixed`, `terminal_device_fixed` (fixed TID per device) are known by name (call lists, `TERMINAL_ERROR_CODES`); a typed method follows. `listDepositTypes` needs no till token.
|
|
35
47
|
- `fixtures/v3/*` taken over from the backend (vocabulary entry `listDepositTypes`), `fixtures/surface.json` lists the call.
|
|
36
48
|
|
|
37
|
-
## 1.33.0 -
|
|
49
|
+
## 1.33.0 - 2026-11-09
|
|
38
50
|
|
|
39
51
|
Card terminal and the browser till on a Mac (Chrome as an installed app, Hobex HPS and printer through Kasseneck Connect). Additive; receipts, bons and every existing call behave as before (all goldens unchanged).
|
|
40
52
|
|
|
@@ -43,13 +55,13 @@ Card terminal and the browser till on a Mac (Chrome as an installed app, Hobex H
|
|
|
43
55
|
- **Texts (browser till only):** message `connect.local_network_blocked` (Chrome's "Local network access" denied for the till: the till finds no Connect, and installing does not help; the sentence gives the way to allow it), messages `terminal.several_found` (placeholder `hosts`) and `terminal.tid_not_found` (`hosts`, `tid`) for a terminal search with several hits where no single one confirms the TID of the device.
|
|
44
56
|
- `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json`, `hobex-hps-codes.json` and `invoice-api.schema.json` regenerated for the version.
|
|
45
57
|
|
|
46
|
-
## 1.32.1 -
|
|
58
|
+
## 1.32.1 - 2026-11-09
|
|
47
59
|
|
|
48
60
|
Fix: a deposit payout (a receipt whose amount due is negative because of returned empties) is no longer refused before sending. `sellReceipt`/`createReceipt` accept one negative cash payment when the items contain a `deposit_return` line, with no `tenderedCents` and no `tipCents`, and at most the sum of the return lines. Reason: the server allows this payout (`istLeergutAuszahlung`) but the client check demanded `amountCents > 0` unless the receipt was a voucher payout. Without empties a negative payment is still refused; empties with a positive amount stay an ordinary sale.
|
|
49
61
|
|
|
50
62
|
Fix: an article marked as external voucher with a non-empty deposit list is refused (`article_external_voucher_invalid`, reason `deposit`), like the backend; an empty or missing list stays allowed. Reason: the client check did not know the deposit rule of `pruefeArtikel`.
|
|
51
63
|
|
|
52
|
-
## 1.32.0 -
|
|
64
|
+
## 1.32.0 - 2026-11-09
|
|
53
65
|
|
|
54
66
|
Deposit and returnable empties at the till (backend November 2026): the server adds the deposit lines, the till previews them, takes empties back, and the bon prints them. Additive; articles, groups, settings and receipts without the new fields read, send and print exactly as before (all existing goldens unchanged).
|
|
55
67
|
|
|
@@ -65,7 +77,7 @@ Deposit and returnable empties at the till (backend November 2026): the server a
|
|
|
65
77
|
- **Texts:** `DEPOSIT_ERROR_MESSAGES` (code -> message key) / `depositErrorMessage(code)` (returns the message key, `undefined` for any other code; resolve it with `messageText`; eight codes, short sentences without legal language; also `depositErrors` in `pos-texts.json`), message `deposit.changed`, labels `deposit.return`, `.payout`, `.offset`, `.unknown_code`, `.over_usual`, `.on_premises`, `.takeaway`, `.sum`.
|
|
66
78
|
- Contract `v3` re-fetched (deposit blocks, fields, catalogs and codes), `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json` and `hobex-hps-codes.json` regenerated for the version.
|
|
67
79
|
|
|
68
|
-
## 1.31.0 -
|
|
80
|
+
## 1.31.0 - 2026-11-08
|
|
69
81
|
|
|
70
82
|
External vouchers at the till: a tile sells an external voucher, the payment screen redeems one through the same code field, the payout sheet switches between own and external, the cancellation flow warns. Additive; articles, groups and receipts without the new field read, print and send exactly as before (all existing goldens unchanged).
|
|
71
83
|
|
|
@@ -109,7 +121,7 @@ Card terminal on the phone: Kasseneck keeps the terminal app's accounts, the ter
|
|
|
109
121
|
- **`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`.
|
|
110
122
|
- Contract `v3` re-fetched from the backend (the seven endpoints, `errorCodes.terminal`).
|
|
111
123
|
|
|
112
|
-
## 1.28.0 - 2026-11-
|
|
124
|
+
## 1.28.0 - 2026-11-07
|
|
113
125
|
|
|
114
126
|
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).
|
|
115
127
|
|
|
@@ -172,7 +184,7 @@ Kasseneck Connect inventory: the register reports which Connect version runs at
|
|
|
172
184
|
- **`POS_CALLS` gains `reportConnectState`** (now 49; only on the register path), classified as unknown outcome on a timeout like `logReceiptOutputs`. `reportConnectState(transport, report)` (`./pos`) sends exactly `deviceId`, `version`, `os`, `osVersion`, `arch`, `features`, `httpsTrusted` and `bluetooth` (`ConnectStateReport`); `osVersion`, `arch`, `httpsTrusted` and `bluetooth` may be `null`, `features` may be empty (older Connect versions know none of them). The form is checked before sending (`KasseneckValidationError`, `scope: 'request'`; an unknown field is rejected, so nothing that names the computer or a person slips in); what the server does not accept it rejects with `invalid_connect_report`. Answer: nothing. Reason: Connect itself never talks to Kasseneck; the register knows account and device and reads Connect's status anyway.
|
|
173
185
|
- **`getKasseSettings`** (`/v3`) now carries `connect { minimumVersion, deadline }` (both `null` without a requirement); read by the register to show the update hint. Contract v3 fetched again from the backend.
|
|
174
186
|
|
|
175
|
-
## 1.23.0 - 2026-
|
|
187
|
+
## 1.23.0 - 2026-11-01
|
|
176
188
|
|
|
177
189
|
The tab *Prüfung* at the register (*Kassennachschau*, stage 2b): the register info for the inspector on screen and as a printout, the words of the tab (register info, zero receipt, DEP) and two DEP sentences without legal wording. Additive.
|
|
178
190
|
|
|
@@ -298,7 +310,7 @@ Receipt lists page by page: `listReceipts` and `listAllReceipts` for the new pub
|
|
|
298
310
|
- **`LIST_RECEIPTS_ERROR_CODES`**: `invalid_date`, `invalid_range`, `range_too_long`, `invalid_limit`, `invalid_order`, `invalid_view`, `invalid_cursor`, `server_error` (plus the codes of sign-in and edge). `listReceipts` is a read (`outcome: 'rejected'` after a timeout), in `PUBLIC_CALLS` (now 108) and in the contract `surface.json`.
|
|
299
311
|
- Contract re-fetched from the backend (`listReceipts` in `endpoints.public`, schema with `cancellationStatus`/`cancellationReason` catalogues). Also from it: `idempotency_conflict` in `RECEIPT_ERROR_CODES` (readable only; this package sends no `idempotencyKey` on receipts yet), `invoice_number_taken` at the end of `INVOICE_ERROR_CODES` (`fixtures/invoice-api.schema.json` rewritten), and the old settings field `vouchers.label`, which the package does not read (registers before voucher stage 4b).
|
|
300
312
|
|
|
301
|
-
## 1.14.0 - 2026-10-
|
|
313
|
+
## 1.14.0 - 2026-10-24
|
|
302
314
|
|
|
303
315
|
Vouchers at the register, catch-up: the receipt rules of the voucher form, words for the register navigation, the drawer reason of a voucher payout and three shortcut actions; in addition the line `Duplikat am:` on every reprint (`markAsDuplicate`) and the receipt outputs (`logReceiptOutputs`, `outputs` from `getReceipt`, words for the receipt detail). Additive, with one type narrowing (see below).
|
|
304
316
|
|
package/dist/cjs/client/api.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { type CashregisterReportPeriod, type ReportV2, type ReportV2Options } fr
|
|
|
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
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';
|
|
9
|
+
import { type EwpExtraQuantityInput, type EwpReport, type EwpReportFile } from './ewp.js';
|
|
9
10
|
import type { DepositSettings } from '../pos/pfand.js';
|
|
10
11
|
import { type ListedReceipt, type ListReceiptsOptions, type ListReceiptsPage, type ListReceiptsView } from './list-receipts.js';
|
|
11
12
|
import { type SendReceiptEmailOptions, type SendReceiptEmailResult, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type ListMyReceiptsOptions, type ReceiptList, type ReceiptWithCompany, type SellReceiptOptions, type CancelReceiptOptions, type CancelReceiptResult } from './receipts.js';
|
|
@@ -64,8 +65,21 @@ export interface KasseneckApi {
|
|
|
64
65
|
listReceipts<V extends ListReceiptsView = 'summary'>(options: ListReceiptsOptions<V>): Promise<ListReceiptsPage<V>>;
|
|
65
66
|
/** Alle Belege eines Tages oder Zeitraums, Seite fuer Seite geholt (hoechstens 100 Seiten). */
|
|
66
67
|
listAllReceipts<V extends ListReceiptsView = 'summary'>(options: ListReceiptsOptions<V>): AsyncGenerator<ListedReceipt<V>, void, undefined>;
|
|
67
|
-
/** Pfandarten des Betriebs (`listDepositTypes`, nur /v3
|
|
68
|
+
/** Pfandarten des Betriebs (`listDepositTypes`, nur /v3; braucht kein Kassen-Token); `null` = Pfand aus, dann keine Pfandzeilen senden. */
|
|
68
69
|
listDepositTypes(): Promise<DepositSettings | null>;
|
|
70
|
+
/** EWP-Meldung eines Monats (`getEwpReport`, nur /v3, Abfueller-Betrieb, ohne Kassen-Token): Zeilen je GTIN, Warnungen, Zusatzmengen. */
|
|
71
|
+
getEwpReport(options: {
|
|
72
|
+
month: string;
|
|
73
|
+
}): Promise<EwpReport>;
|
|
74
|
+
/** CSV der EWP-Meldung eines Monats (`getEwpReport` mit `format: 'csv'`); ein abgeschlossener Monat gilt danach als heruntergeladen. */
|
|
75
|
+
downloadEwpReport(options: {
|
|
76
|
+
month: string;
|
|
77
|
+
}): Promise<EwpReportFile>;
|
|
78
|
+
/** Zusatzmengen eines Monats ersetzen (`setEwpExtraQuantities`); eine leere Liste leert sie. Antwort ist die neue Meldung. */
|
|
79
|
+
setEwpExtraQuantities(options: {
|
|
80
|
+
month: string;
|
|
81
|
+
extraQuantities: EwpExtraQuantityInput[];
|
|
82
|
+
}): Promise<EwpReport>;
|
|
69
83
|
/** DEP-Export fuer die Kassennachschau einstellen (`createDepExport`, nur /v3); antwortet sofort, der Export laeuft im Hintergrund. */
|
|
70
84
|
createDepExport(options?: CreateDepExportOptions): Promise<CreateDepExportResult>;
|
|
71
85
|
/** Zustand, Kennzahlen, Befund und Pruefer-Links eines Exports (`getDepExport`). */
|
package/dist/cjs/client/api.js
CHANGED
|
@@ -9,6 +9,7 @@ const status_js_1 = require("./status.js");
|
|
|
9
9
|
const dep_export_js_1 = require("./dep-export.js");
|
|
10
10
|
const terminal_js_1 = require("./terminal.js");
|
|
11
11
|
const list_deposit_types_js_1 = require("./list-deposit-types.js");
|
|
12
|
+
const ewp_js_1 = require("./ewp.js");
|
|
12
13
|
const list_receipts_js_1 = require("./list-receipts.js");
|
|
13
14
|
const receipts_js_1 = require("./receipts.js");
|
|
14
15
|
const cashregisters_js_1 = require("./cashregisters.js");
|
|
@@ -46,6 +47,9 @@ function createKasseneckApi(options) {
|
|
|
46
47
|
listReceipts: (o) => (0, list_receipts_js_1.listReceipts)(rufen, o),
|
|
47
48
|
listAllReceipts: (o) => (0, list_receipts_js_1.listAllReceipts)(rufen, o),
|
|
48
49
|
listDepositTypes: () => (0, list_deposit_types_js_1.listDepositTypes)(rufen),
|
|
50
|
+
getEwpReport: (o) => (0, ewp_js_1.getEwpReport)(rufen, o),
|
|
51
|
+
downloadEwpReport: (o) => (0, ewp_js_1.downloadEwpReport)(rufen, o),
|
|
52
|
+
setEwpExtraQuantities: (o) => (0, ewp_js_1.setEwpExtraQuantities)(rufen, o),
|
|
49
53
|
createDepExport: (o) => (0, dep_export_js_1.createDepExport)(rufen, o),
|
|
50
54
|
getDepExport: (o) => (0, dep_export_js_1.getDepExport)(rufen, o),
|
|
51
55
|
waitForDepExport: (o) => (0, dep_export_js_1.waitForDepExport)(rufen, o),
|
|
@@ -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", "learnMyLeergutCode", "listMyLeergutCodes", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes"];
|
|
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", "learnMyLeergutCode", "listMyLeergutCodes", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
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", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes"];
|
|
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", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
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
|
|
@@ -172,6 +172,9 @@ exports.ALL_CALLS = [
|
|
|
172
172
|
'unfixTerminal',
|
|
173
173
|
// Pfandarten des Betriebs lesen, nur unter /v3.
|
|
174
174
|
'listDepositTypes',
|
|
175
|
+
// EWP-Meldung (Einwegpfand) lesen und Zusatzmengen setzen, nur unter /v3.
|
|
176
|
+
'getEwpReport',
|
|
177
|
+
'setEwpExtraQuantities',
|
|
175
178
|
];
|
|
176
179
|
/**
|
|
177
180
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -314,6 +317,9 @@ exports.PUBLIC_CALLS = [
|
|
|
314
317
|
'unfixTerminal',
|
|
315
318
|
// Pfandarten des Betriebs lesen, nur unter /v3.
|
|
316
319
|
'listDepositTypes',
|
|
320
|
+
// EWP-Meldung (Einwegpfand) lesen und Zusatzmengen setzen, nur unter /v3.
|
|
321
|
+
'getEwpReport',
|
|
322
|
+
'setEwpExtraQuantities',
|
|
317
323
|
];
|
|
318
324
|
/**
|
|
319
325
|
* Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
|
|
@@ -517,6 +523,10 @@ exports.CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
517
523
|
endRegisterSession: 'repeatable',
|
|
518
524
|
generateFullReceiptId: 'read',
|
|
519
525
|
getCashregisterReport: 'read',
|
|
526
|
+
// EWP-Meldung: Lesen vermerkt bei der CSV eines abgeschlossenen Monats nur den Abruf (`downloadedAt`); Setzen ersetzt die
|
|
527
|
+
// ganze Liste der Zusatzmengen, eine Wiederholung aendert nichts mehr.
|
|
528
|
+
getEwpReport: 'repeatable',
|
|
529
|
+
setEwpExtraQuantities: 'repeatable',
|
|
520
530
|
getArticle: 'read',
|
|
521
531
|
listMyLeergutCodes: 'read',
|
|
522
532
|
getCustomer: 'read',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* keiner ist der bevorzugte:
|
|
4
4
|
*
|
|
5
5
|
* - `apiKeyAuth` — der Weg der Geraete, POS-Apps und Dritten: der `api_key` als
|
|
6
|
-
* Bearer plus die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
6
|
+
* Bearer plus (fuer Aufrufe an einer Kasse) die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
7
7
|
* `kasseneck_api`).
|
|
8
8
|
* - `registerUserAuth` — der Weg der Browser-Kasse: ein Kassen-Benutzer, per
|
|
9
9
|
* PIN an einem gekoppelten Geraet angemeldet. ID-Token als Bearer,
|
|
@@ -35,8 +35,14 @@ export type KasseneckAuth = () => AuthCredentials | Promise<AuthCredentials>;
|
|
|
35
35
|
export interface ApiKeyAuthOptions {
|
|
36
36
|
/** API-Schluessel im Format `kr_<env>_<...>` (opak). */
|
|
37
37
|
apiKey: string;
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Kassen-Token der Kasse, an der gearbeitet wird (`cb_<env>_<...>`). Optional: Aufrufe, die dem
|
|
40
|
+
* Betrieb statt einer Kasse gelten, brauchen ihn nicht (`listDepositTypes`, `getEwpReport`,
|
|
41
|
+
* `setEwpExtraQuantities`); ohne Token geht die Kopfzeile `cashregister-token` nicht mit.
|
|
42
|
+
* Ein Aufruf, der eine Kasse braucht, antwortet ohne Token mit `cashregister_token_missing`.
|
|
43
|
+
* Ein leerer Text oder nur Leerraum wirft sofort.
|
|
44
|
+
*/
|
|
45
|
+
cashregisterToken?: string;
|
|
40
46
|
}
|
|
41
47
|
export interface RegisterUserAuthOptions {
|
|
42
48
|
/** Liefert ein gueltiges ID-Token des Anmeldediensts; wird pro Anfrage befragt. */
|
package/dist/cjs/client/auth.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* keiner ist der bevorzugte:
|
|
5
5
|
*
|
|
6
6
|
* - `apiKeyAuth` — der Weg der Geraete, POS-Apps und Dritten: der `api_key` als
|
|
7
|
-
* Bearer plus die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
7
|
+
* Bearer plus (fuer Aufrufe an einer Kasse) die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
8
8
|
* `kasseneck_api`).
|
|
9
9
|
* - `registerUserAuth` — der Weg der Browser-Kasse: ein Kassen-Benutzer, per
|
|
10
10
|
* PIN an einem gekoppelten Geraet angemeldet. ID-Token als Bearer,
|
|
@@ -33,8 +33,9 @@ function apiKeyAuth(options) {
|
|
|
33
33
|
if (!options.apiKey) {
|
|
34
34
|
throw new errors_js_1.KasseneckAuthError('apiKeyAuth: apiKey fehlt');
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const gegeben = options.cashregisterToken !== undefined && options.cashregisterToken !== null;
|
|
37
|
+
if (gegeben && (typeof options.cashregisterToken !== 'string' || options.cashregisterToken.trim() === '')) {
|
|
38
|
+
throw new errors_js_1.KasseneckAuthError('apiKeyAuth: cashregisterToken ist leer');
|
|
38
39
|
}
|
|
39
40
|
const { apiKey, cashregisterToken } = options;
|
|
40
41
|
// Pro Aufruf ein frisches Objekt: der Transport (oder ein Aufrufer) darf
|
|
@@ -42,7 +43,7 @@ function apiKeyAuth(options) {
|
|
|
42
43
|
return () => ({
|
|
43
44
|
headers: {
|
|
44
45
|
Authorization: `Bearer ${apiKey}`,
|
|
45
|
-
'cashregister-token': cashregisterToken,
|
|
46
|
+
...(cashregisterToken ? { 'cashregister-token': cashregisterToken } : {}),
|
|
46
47
|
},
|
|
47
48
|
params: {},
|
|
48
49
|
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { InternerTransport } from './aufrufe.js';
|
|
2
|
+
/**
|
|
3
|
+
* EWP-Meldung (Einwegpfand-Meldung, Pfand Teil 5): die Monatsmeldung der
|
|
4
|
+
* Einweg-Verpackungen je GTIN, die ein Abfuellbetrieb dem Pfandsystem meldet
|
|
5
|
+
* (Faelligkeit der 5. des Folgemonats). Nur unter `/v3`, API-Schluessel, nur
|
|
6
|
+
* Betriebe mit der Rolle Abfueller (sonst `filler_role_required`).
|
|
7
|
+
*
|
|
8
|
+
* Die Meldung entsteht aus drei Quellen (`sources`): den Belegen der Kassen,
|
|
9
|
+
* den Rechnungen und den Lieferscheinen, dazu die Zusatzmengen, die das
|
|
10
|
+
* Fremdsystem selbst nachtraegt (Haustrunk, Muster, Spende ...). Der laufende
|
|
11
|
+
* Monat ist vorlaeufig (`provisional`).
|
|
12
|
+
*
|
|
13
|
+
* Mengen sind ganze Stueck. `downloadEwpReport` liefert die CSV fuer den Upload
|
|
14
|
+
* beim Pfandsystem; erst der Abruf eines abgeschlossenen Monats wird als
|
|
15
|
+
* heruntergeladen vermerkt (`downloadedAt`).
|
|
16
|
+
*/
|
|
17
|
+
/** Gruende einer Zusatzmenge, in der Reihenfolge des Backends. */
|
|
18
|
+
export declare const EWP_REASONS: readonly ["own_consumption", "sampling", "donation", "theft", "free_goods", "stocktake", "return", "external_system", "other"];
|
|
19
|
+
export type EwpReason = (typeof EWP_REASONS)[number];
|
|
20
|
+
/** Warnungen der Meldung; welche Angaben eine Warnung traegt, steht an [EwpWarning]. */
|
|
21
|
+
export declare const EWP_WARNING_CODES: readonly ["gtin_not_registered", "foreign_not_reportable", "master_data_missing", "negative_quantity", "invalid_posting"];
|
|
22
|
+
export type EwpWarningCode = (typeof EWP_WARNING_CODES)[number];
|
|
23
|
+
/** Stammdaten einer GTIN fuer die Meldung; fehlende Angaben kommen als leerer Text. */
|
|
24
|
+
export interface EwpMasterData {
|
|
25
|
+
barcodeType: string;
|
|
26
|
+
productOrigin: string;
|
|
27
|
+
depositFee: string;
|
|
28
|
+
producerFee: string;
|
|
29
|
+
ecoImpact: string;
|
|
30
|
+
intBarcodeUsage: string;
|
|
31
|
+
}
|
|
32
|
+
/** Woher die Menge einer Zeile kommt (Stueck): Kasse, Rechnungen, Lieferscheine, Zusatzmengen. */
|
|
33
|
+
export interface EwpLineSources {
|
|
34
|
+
register: number;
|
|
35
|
+
invoices: number;
|
|
36
|
+
deliveryNotes: number;
|
|
37
|
+
extra: number;
|
|
38
|
+
}
|
|
39
|
+
/** Eine Zeile der Meldung: eine registrierte GTIN mit ihren Mengen im Inland und Ausland. */
|
|
40
|
+
export interface EwpLine {
|
|
41
|
+
gtin: string;
|
|
42
|
+
name: string;
|
|
43
|
+
masterData?: EwpMasterData;
|
|
44
|
+
domestic: number;
|
|
45
|
+
foreign: number;
|
|
46
|
+
sources: EwpLineSources;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Eine Warnung zur Meldung; sie sperrt nichts. Welche Angaben dabei stehen:
|
|
50
|
+
* - `gtin_not_registered`: `gtin`, `quantity` (die GTIN ist nicht registriert, ihre Menge steht nicht in `lines`)
|
|
51
|
+
* - `foreign_not_reportable`: `gtin`, `country`, `quantity` (Auslandsmenge, die nicht gemeldet wird: an eine oesterreichische GTIN
|
|
52
|
+
* oder in ein Land ausserhalb des relevanten Auslands; `country` ist `null` bei einer Zusatzmenge ohne Land)
|
|
53
|
+
* - `master_data_missing`: `gtin`, `fields` (die fehlenden Stammdaten)
|
|
54
|
+
* - `negative_quantity`: `gtin`, `column` (`domestic` oder `foreign`), `amount`
|
|
55
|
+
* - `invalid_posting`: `count` (nicht lesbare Posten)
|
|
56
|
+
*/
|
|
57
|
+
export interface EwpWarning {
|
|
58
|
+
code: EwpWarningCode;
|
|
59
|
+
gtin?: string;
|
|
60
|
+
country?: string | null;
|
|
61
|
+
quantity?: number;
|
|
62
|
+
fields?: string[];
|
|
63
|
+
count?: number;
|
|
64
|
+
column?: 'domestic' | 'foreign';
|
|
65
|
+
amount?: number;
|
|
66
|
+
}
|
|
67
|
+
/** Eine Zusatzmenge, wie die Meldung sie fuehrt. */
|
|
68
|
+
export interface EwpExtraQuantity {
|
|
69
|
+
gtin: string;
|
|
70
|
+
domestic: number;
|
|
71
|
+
foreign: number;
|
|
72
|
+
reason: EwpReason;
|
|
73
|
+
text: string | null;
|
|
74
|
+
/** Zeitpunkt des Eintrags (Millisekunden). */
|
|
75
|
+
at: number;
|
|
76
|
+
/** Kennung des Absenders: die uid der Anmeldung im Panel, `'api'` fuer einen API-Schluessel; bei Altbestand `null`. */
|
|
77
|
+
by: string | null;
|
|
78
|
+
}
|
|
79
|
+
/** Eine Zusatzmenge beim Setzen. `text` hoechstens 200 Zeichen. */
|
|
80
|
+
export interface EwpExtraQuantityInput {
|
|
81
|
+
gtin: string;
|
|
82
|
+
domestic: number;
|
|
83
|
+
foreign: number;
|
|
84
|
+
reason: EwpReason;
|
|
85
|
+
text?: string | null;
|
|
86
|
+
}
|
|
87
|
+
/** Die Meldung eines Monats (`getEwpReport`). */
|
|
88
|
+
export interface EwpReport {
|
|
89
|
+
/** Meldemonat `YYYY-MM`. */
|
|
90
|
+
month: string;
|
|
91
|
+
/** Faelligkeit `YYYY-MM-DD` (der 5. des Folgemonats). */
|
|
92
|
+
dueDate: string;
|
|
93
|
+
/** Der Monat laeuft noch. */
|
|
94
|
+
provisional: boolean;
|
|
95
|
+
/** Die Meldung stammt aus der Test-Umgebung (`kr_test_`-Schluessel). */
|
|
96
|
+
test: boolean;
|
|
97
|
+
lines: EwpLine[];
|
|
98
|
+
warnings: EwpWarning[];
|
|
99
|
+
extraQuantities: EwpExtraQuantity[];
|
|
100
|
+
/** Zeitpunkt (Millisekunden) des letzten CSV-Abrufs eines abgeschlossenen Monats, sonst `null`. */
|
|
101
|
+
downloadedAt: number | null;
|
|
102
|
+
}
|
|
103
|
+
/** Die CSV der Meldung (`downloadEwpReport`). */
|
|
104
|
+
export interface EwpReportFile {
|
|
105
|
+
csv: string;
|
|
106
|
+
filename: string;
|
|
107
|
+
contentType: string;
|
|
108
|
+
}
|
|
109
|
+
/** Meldung eines Monats lesen (`getEwpReport`). */
|
|
110
|
+
export declare function getEwpReport(transport: InternerTransport, options: {
|
|
111
|
+
month: string;
|
|
112
|
+
}): Promise<EwpReport>;
|
|
113
|
+
/** CSV der Meldung laden (`getEwpReport` mit `format: 'csv'`). */
|
|
114
|
+
export declare function downloadEwpReport(transport: InternerTransport, options: {
|
|
115
|
+
month: string;
|
|
116
|
+
}): Promise<EwpReportFile>;
|
|
117
|
+
/**
|
|
118
|
+
* Zusatzmengen eines Monats ersetzen (`setEwpExtraQuantities`): die gesendete Liste
|
|
119
|
+
* ist die ganze Liste, eine leere leert sie. Unveraenderte Eintraege behalten
|
|
120
|
+
* `at` und `by`. Antwort ist die neu gerechnete Meldung.
|
|
121
|
+
*/
|
|
122
|
+
export declare function setEwpExtraQuantities(transport: InternerTransport, options: {
|
|
123
|
+
month: string;
|
|
124
|
+
extraQuantities: EwpExtraQuantityInput[];
|
|
125
|
+
}): Promise<EwpReport>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EWP_WARNING_CODES = exports.EWP_REASONS = void 0;
|
|
4
|
+
exports.getEwpReport = getEwpReport;
|
|
5
|
+
exports.downloadEwpReport = downloadEwpReport;
|
|
6
|
+
exports.setEwpExtraQuantities = setEwpExtraQuantities;
|
|
7
|
+
const errors_js_1 = require("./errors.js");
|
|
8
|
+
/**
|
|
9
|
+
* EWP-Meldung (Einwegpfand-Meldung, Pfand Teil 5): die Monatsmeldung der
|
|
10
|
+
* Einweg-Verpackungen je GTIN, die ein Abfuellbetrieb dem Pfandsystem meldet
|
|
11
|
+
* (Faelligkeit der 5. des Folgemonats). Nur unter `/v3`, API-Schluessel, nur
|
|
12
|
+
* Betriebe mit der Rolle Abfueller (sonst `filler_role_required`).
|
|
13
|
+
*
|
|
14
|
+
* Die Meldung entsteht aus drei Quellen (`sources`): den Belegen der Kassen,
|
|
15
|
+
* den Rechnungen und den Lieferscheinen, dazu die Zusatzmengen, die das
|
|
16
|
+
* Fremdsystem selbst nachtraegt (Haustrunk, Muster, Spende ...). Der laufende
|
|
17
|
+
* Monat ist vorlaeufig (`provisional`).
|
|
18
|
+
*
|
|
19
|
+
* Mengen sind ganze Stueck. `downloadEwpReport` liefert die CSV fuer den Upload
|
|
20
|
+
* beim Pfandsystem; erst der Abruf eines abgeschlossenen Monats wird als
|
|
21
|
+
* heruntergeladen vermerkt (`downloadedAt`).
|
|
22
|
+
*/
|
|
23
|
+
/** Gruende einer Zusatzmenge, in der Reihenfolge des Backends. */
|
|
24
|
+
exports.EWP_REASONS = Object.freeze([
|
|
25
|
+
'own_consumption',
|
|
26
|
+
'sampling',
|
|
27
|
+
'donation',
|
|
28
|
+
'theft',
|
|
29
|
+
'free_goods',
|
|
30
|
+
'stocktake',
|
|
31
|
+
'return',
|
|
32
|
+
'external_system',
|
|
33
|
+
'other',
|
|
34
|
+
]);
|
|
35
|
+
/** Warnungen der Meldung; welche Angaben eine Warnung traegt, steht an [EwpWarning]. */
|
|
36
|
+
exports.EWP_WARNING_CODES = Object.freeze([
|
|
37
|
+
'gtin_not_registered',
|
|
38
|
+
'foreign_not_reportable',
|
|
39
|
+
'master_data_missing',
|
|
40
|
+
'negative_quantity',
|
|
41
|
+
'invalid_posting',
|
|
42
|
+
]);
|
|
43
|
+
/** Meldung eines Monats lesen (`getEwpReport`). */
|
|
44
|
+
async function getEwpReport(transport, options) {
|
|
45
|
+
const month = monat('getEwpReport', options);
|
|
46
|
+
return meldung('getEwpReport', await transport('getEwpReport', { month }));
|
|
47
|
+
}
|
|
48
|
+
/** CSV der Meldung laden (`getEwpReport` mit `format: 'csv'`). */
|
|
49
|
+
async function downloadEwpReport(transport, options) {
|
|
50
|
+
const month = monat('downloadEwpReport', options);
|
|
51
|
+
const daten = await transport('getEwpReport', { month, format: 'csv' });
|
|
52
|
+
if (!istObjekt(daten))
|
|
53
|
+
throw antwortfehler('downloadEwpReport', 'Antwort ist kein Objekt');
|
|
54
|
+
const { csv, filename, contentType } = daten;
|
|
55
|
+
if (typeof csv !== 'string' || typeof filename !== 'string' || typeof contentType !== 'string') {
|
|
56
|
+
throw antwortfehler('downloadEwpReport', 'Antwort ohne csv, filename und contentType');
|
|
57
|
+
}
|
|
58
|
+
return { csv, filename, contentType };
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Zusatzmengen eines Monats ersetzen (`setEwpExtraQuantities`): die gesendete Liste
|
|
62
|
+
* ist die ganze Liste, eine leere leert sie. Unveraenderte Eintraege behalten
|
|
63
|
+
* `at` und `by`. Antwort ist die neu gerechnete Meldung.
|
|
64
|
+
*/
|
|
65
|
+
async function setEwpExtraQuantities(transport, options) {
|
|
66
|
+
const month = monat('setEwpExtraQuantities', options);
|
|
67
|
+
if (!Array.isArray(options.extraQuantities)) {
|
|
68
|
+
throw new errors_js_1.KasseneckValidationError('setEwpExtraQuantities', 'extraQuantities muss eine Liste sein', 'request');
|
|
69
|
+
}
|
|
70
|
+
return meldung('setEwpExtraQuantities', await transport('setEwpExtraQuantities', { month, extraQuantities: options.extraQuantities }));
|
|
71
|
+
}
|
|
72
|
+
function monat(aufruf, options) {
|
|
73
|
+
const month = options?.month;
|
|
74
|
+
if (typeof month !== 'string' || month === '')
|
|
75
|
+
throw new errors_js_1.KasseneckValidationError(aufruf, 'month fehlt (Monat als JJJJ-MM)', 'request');
|
|
76
|
+
return month;
|
|
77
|
+
}
|
|
78
|
+
function istObjekt(wert) {
|
|
79
|
+
return wert !== null && typeof wert === 'object' && !Array.isArray(wert);
|
|
80
|
+
}
|
|
81
|
+
function antwortfehler(aufruf, grund) {
|
|
82
|
+
return new errors_js_1.KasseneckValidationError(aufruf, grund, 'response');
|
|
83
|
+
}
|
|
84
|
+
/** Prueft die Form, die der Aufrufer braucht, und reicht die Antwort sonst unveraendert durch. */
|
|
85
|
+
function meldung(aufruf, daten) {
|
|
86
|
+
if (!istObjekt(daten))
|
|
87
|
+
throw antwortfehler(aufruf, 'Antwort ist kein Objekt');
|
|
88
|
+
if (typeof daten['month'] !== 'string')
|
|
89
|
+
throw antwortfehler(aufruf, 'Antwort ohne month');
|
|
90
|
+
for (const feld of ['lines', 'warnings', 'extraQuantities']) {
|
|
91
|
+
if (!Array.isArray(daten[feld]))
|
|
92
|
+
throw antwortfehler(aufruf, `Antwort ohne Liste ${feld}`);
|
|
93
|
+
}
|
|
94
|
+
return daten;
|
|
95
|
+
}
|
|
@@ -7,6 +7,7 @@ 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
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';
|
|
10
|
+
export { EWP_REASONS, EWP_WARNING_CODES, type EwpReason, type EwpWarningCode, type EwpMasterData, type EwpLineSources, type EwpLine, type EwpWarning, type EwpExtraQuantity, type EwpExtraQuantityInput, type EwpReport, type EwpReportFile, } from './ewp.js';
|
|
10
11
|
export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, type CashregisterReportPeriod, type ReportV2, type ReportV2Metadata, type ReportV2Options } from './reports.js';
|
|
11
12
|
export { type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, } from './status.js';
|
|
12
13
|
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.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;
|
|
4
|
+
exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.EWP_WARNING_CODES = exports.EWP_REASONS = 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; } });
|
|
@@ -94,6 +94,9 @@ Object.defineProperty(exports, "TERMINAL_ERROR_CODES", { enumerable: true, get:
|
|
|
94
94
|
Object.defineProperty(exports, "TERMINAL_LABEL_MAX", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_LABEL_MAX; } });
|
|
95
95
|
Object.defineProperty(exports, "TERMINAL_APP_MAX", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_APP_MAX; } });
|
|
96
96
|
Object.defineProperty(exports, "TERMINAL_REQUESTED_BY_MAX", { enumerable: true, get: function () { return terminal_js_1.TERMINAL_REQUESTED_BY_MAX; } });
|
|
97
|
+
var ewp_js_1 = require("./ewp.js");
|
|
98
|
+
Object.defineProperty(exports, "EWP_REASONS", { enumerable: true, get: function () { return ewp_js_1.EWP_REASONS; } });
|
|
99
|
+
Object.defineProperty(exports, "EWP_WARNING_CODES", { enumerable: true, get: function () { return ewp_js_1.EWP_WARNING_CODES; } });
|
|
97
100
|
var reports_js_1 = require("./reports.js");
|
|
98
101
|
Object.defineProperty(exports, "downloadDailyReport", { enumerable: true, get: function () { return reports_js_1.downloadDailyReport; } });
|
|
99
102
|
Object.defineProperty(exports, "downloadMonthlyReport", { enumerable: true, get: function () { return reports_js_1.downloadMonthlyReport; } });
|
|
@@ -2,6 +2,9 @@ import { type DepositSettings } from '../pos/pfand.js';
|
|
|
2
2
|
import type { InternerTransport } from './aufrufe.js';
|
|
3
3
|
/**
|
|
4
4
|
* Pfandarten des Betriebs lesen (`listDepositTypes`, nur unter `/v3`, API-Schluessel).
|
|
5
|
+
* Der Aufruf braucht **kein Kassen-Token**: er gilt dem Betrieb, nicht einer Kasse.
|
|
6
|
+
* `apiKeyAuth` darf deshalb ohne `cashregisterToken` gebaut werden; der Server
|
|
7
|
+
* liest das Token bei diesem Aufruf nicht.
|
|
5
8
|
* Die Antwort ist der Block `deposit` aus `getKasseSettings`. Pfand aus ist kein
|
|
6
9
|
* Fehler: `null`, dann darf ein Fremdsystem keine Pfandzeilen schicken. Eine
|
|
7
10
|
* Antwort, in der `deposit` weder `null` noch ein Objekt ist, wirft
|
|
@@ -5,6 +5,9 @@ const pfand_js_1 = require("../pos/pfand.js");
|
|
|
5
5
|
const errors_js_1 = require("./errors.js");
|
|
6
6
|
/**
|
|
7
7
|
* Pfandarten des Betriebs lesen (`listDepositTypes`, nur unter `/v3`, API-Schluessel).
|
|
8
|
+
* Der Aufruf braucht **kein Kassen-Token**: er gilt dem Betrieb, nicht einer Kasse.
|
|
9
|
+
* `apiKeyAuth` darf deshalb ohne `cashregisterToken` gebaut werden; der Server
|
|
10
|
+
* liest das Token bei diesem Aufruf nicht.
|
|
8
11
|
* Die Antwort ist der Block `deposit` aus `getKasseSettings`. Pfand aus ist kein
|
|
9
12
|
* Fehler: `null`, dann darf ein Fremdsystem keine Pfandzeilen schicken. Eine
|
|
10
13
|
* Antwort, in der `deposit` weder `null` noch ein Objekt ist, wirft
|
|
@@ -67,9 +67,9 @@ export interface ReceiptCommonOptions {
|
|
|
67
67
|
*/
|
|
68
68
|
drawerId?: string;
|
|
69
69
|
/**
|
|
70
|
-
* Pfand & Leergut: der Server
|
|
71
|
-
* Ohne Angabe
|
|
72
|
-
*
|
|
70
|
+
* Pfand & Leergut: nur mit `true` leitet der Server die Pfandzeilen aus den Artikeln (`deposits`) selbst ab und
|
|
71
|
+
* rechnet den Betrag. Ohne Angabe (Vorgabe) und mit `false` leitet er keine ab; ausdrueckliche Zeilen `deposit` ohne
|
|
72
|
+
* `articleId` und `deposit_return` bleiben in jedem Fall erlaubt.
|
|
73
73
|
*/
|
|
74
74
|
autoDeposits?: boolean;
|
|
75
75
|
/**
|