@kreiseck/kasseneck-api 1.29.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 +16 -0
- package/README.md +27 -0
- 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/enums/voucher-type.d.ts +5 -1
- package/dist/cjs/enums/voucher-type.js +5 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +13 -5
- 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/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/enums/voucher-type.d.ts +5 -1
- package/dist/esm/enums/voucher-type.js +5 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- 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 +14 -2
- 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 +169 -8
- package/fixtures/v3/zahlbetrag-faelle.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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
|
+
|
|
7
23
|
## 1.29.0 - 2026-11-07
|
|
8
24
|
|
|
9
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.
|
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
|
|
@@ -1873,6 +1887,19 @@ app.post('/kasseneck-webhook', express.raw({ type: '*/*' }), async (req, res) =>
|
|
|
1873
1887
|
the change; `released` and `redeemed` also fire for a partial release or
|
|
1874
1888
|
redemption (status still `active`). Deduplicate on `event.id`; deliveries
|
|
1875
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`.
|
|
1876
1903
|
- **Safety net without webhooks.** `listStock({ changedSince })` and
|
|
1877
1904
|
`listArticles({ updatedSince })` are sorted by `updatedAt` ascending and
|
|
1878
1905
|
include the boundary, so remembering the last `updatedAt` and asking again
|
|
@@ -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
|
/**
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
* Gutscheinart — Zwilling von `VoucherType` in kasseneck_api/lib/enums/voucher_type.dart.
|
|
3
3
|
*/
|
|
4
4
|
export declare const VoucherType: {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Altform: Wertgutschein (Wert im Cent, Code frei). Gelesene Belege tragen `value` fuer jeden
|
|
7
|
+
* Mehrzweck-Eintrag (eigen und fremd); dort ist der Wert gueltig. Als Wunsch mit frei getipptem Code
|
|
8
|
+
* veraltet: siehe [LegacyValueVoucherWish].
|
|
9
|
+
*/
|
|
6
10
|
readonly value: "value";
|
|
7
11
|
/** Altform: Rabatt-/Aktionsgutschein. */
|
|
8
12
|
readonly promo: "promo";
|
|
@@ -5,7 +5,11 @@ exports.VoucherType = void 0;
|
|
|
5
5
|
* Gutscheinart — Zwilling von `VoucherType` in kasseneck_api/lib/enums/voucher_type.dart.
|
|
6
6
|
*/
|
|
7
7
|
exports.VoucherType = {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Altform: Wertgutschein (Wert im Cent, Code frei). Gelesene Belege tragen `value` fuer jeden
|
|
10
|
+
* Mehrzweck-Eintrag (eigen und fremd); dort ist der Wert gueltig. Als Wunsch mit frei getipptem Code
|
|
11
|
+
* veraltet: siehe [LegacyValueVoucherWish].
|
|
12
|
+
*/
|
|
9
13
|
value: 'value',
|
|
10
14
|
/** Altform: Rabatt-/Aktionsgutschein. */
|
|
11
15
|
promo: 'promo',
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
|
|
2
|
-
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
2
|
+
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
3
3
|
export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.voucherPermsOf = exports.stockViewOf = void 0;
|
|
3
|
+
exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
|
|
4
|
+
exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = void 0;
|
|
5
|
+
exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = void 0;
|
|
6
|
+
exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = void 0;
|
|
7
|
+
exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = void 0;
|
|
8
8
|
var index_js_1 = require("./enums/index.js");
|
|
9
9
|
Object.defineProperty(exports, "ReceiptType", { enumerable: true, get: function () { return index_js_1.ReceiptType; } });
|
|
10
10
|
Object.defineProperty(exports, "VatRate", { enumerable: true, get: function () { return index_js_1.VatRate; } });
|
|
@@ -25,6 +25,14 @@ Object.defineProperty(exports, "isVoucherFloatItem", { enumerable: true, get: fu
|
|
|
25
25
|
Object.defineProperty(exports, "toVoucherPayload", { enumerable: true, get: function () { return index_js_2.toVoucherPayload; } });
|
|
26
26
|
Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: function () { return index_js_2.fromVoucherPayload; } });
|
|
27
27
|
Object.defineProperty(exports, "voucherIsValid", { enumerable: true, get: function () { return index_js_2.voucherIsValid; } });
|
|
28
|
+
Object.defineProperty(exports, "VOUCHER_SOURCES", { enumerable: true, get: function () { return index_js_2.VOUCHER_SOURCES; } });
|
|
29
|
+
Object.defineProperty(exports, "isExternalVoucher", { enumerable: true, get: function () { return index_js_2.isExternalVoucher; } });
|
|
30
|
+
Object.defineProperty(exports, "externalVoucherIsValid", { enumerable: true, get: function () { return index_js_2.externalVoucherIsValid; } });
|
|
31
|
+
Object.defineProperty(exports, "normalizeExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.normalizeExternalVoucherNumber; } });
|
|
32
|
+
Object.defineProperty(exports, "checkExternalVoucherNumber", { enumerable: true, get: function () { return index_js_2.checkExternalVoucherNumber; } });
|
|
33
|
+
Object.defineProperty(exports, "EXTERNAL_VOUCHER_NUMBER_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_NUMBER_MAX; } });
|
|
34
|
+
Object.defineProperty(exports, "EXTERNAL_VOUCHER_TAXED_WITH_MAX", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_TAXED_WITH_MAX; } });
|
|
35
|
+
Object.defineProperty(exports, "EXTERNAL_VOUCHER_VAT_RATES_BP", { enumerable: true, get: function () { return index_js_2.EXTERNAL_VOUCHER_VAT_RATES_BP; } });
|
|
28
36
|
Object.defineProperty(exports, "toReceiptPayload", { enumerable: true, get: function () { return index_js_2.toReceiptPayload; } });
|
|
29
37
|
Object.defineProperty(exports, "fromReceiptPayload", { enumerable: true, get: function () { return index_js_2.fromReceiptPayload; } });
|
|
30
38
|
Object.defineProperty(exports, "receiptSubSumCents", { enumerable: true, get: function () { return index_js_2.receiptSubSumCents; } });
|
|
@@ -21,5 +21,5 @@ export { changeStockCondition, createArticle, createReservation, deactivateArtic
|
|
|
21
21
|
export { addVariant, createVariantGroup, getVariantGroup, iterateVariantGroups, listVariantGroups, updateVariantGroup, } from './varianten.js';
|
|
22
22
|
export { cancelStocktake, closeStocktake, createStocktake, getStocktake, getStocktakePdf, iterateStocktakeCounts, iterateStocktakeItems, iterateStocktakes, listStocktakeCounts, listStocktakeItems, listStocktakes, recordStocktakeCount, recountStocktake, reviewStocktake, voidStocktakeCount, } from './inventur.js';
|
|
23
23
|
export { verifyInventoryWebhookSignature, parseInventoryWebhookEvent, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_TOLERANCE_SEC, type VerifyInventoryWebhookOptions, } from './webhook.js';
|
|
24
|
-
export type { AddVariantRequest, Article, CancelStocktakeRequest, CloseStocktakeRequest, CloseStocktakeResult, CreateStocktakeRequest, RecordStocktakeCountRequest, RecountStocktakeRequest, ReviewStocktakeRequest, Stocktake, StocktakeActor, StocktakeCancellation, StocktakeClosing, StocktakeCount, StocktakeCountListQuery, StocktakeCountPage, StocktakeCountResult, StocktakeInventoryLine, StocktakeItem, StocktakeItemListQuery, StocktakeItemPage, StocktakeListQuery, StocktakeNotBooked, StocktakePage, StocktakePdf, StocktakePdfDownload, StocktakePdfInfo, StocktakeProgress, StocktakeRecount, StocktakeReview, StocktakeScope, StocktakeScopeInput, StocktakeSeal, StocktakeTotals, StocktakeWarning, VoidStocktakeCountRequest, ArticleInput, ArticleListQuery, ArticleLookup, ArticlePage, ChangeStockConditionRequest, CreateArticleRequest, CreateInventoryWebhookOptions, CreateReservationRequest, CreateVariantGroupRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptItem, GoodsReceiptPreview, GoodsReceiptPreviewLine, GoodsReceiptPreviewRequest, InventoryShortfall, InventoryWarning, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookEnvelope, InventoryWebhookEvent, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestDelivery, InventoryWebhookTestResult, InventoryWebhookWithSecret, LandedCost, Location, LocationAddress, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationItem, ReleaseReservationRequest, Reservation, ReservationItem, ReservationItemInput, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockBelowMinimumEventData, StockChangedEventData, StockItem, StockLevel, StockListQuery, StockMovement, StockMovementLot, StockMovementPage, StockMovementQuery, StockMovementSourceRef, StockOperation, StockPage, StockResult, StockValue, TransferStockRequest, UpdateArticleRequest, UpdateVariantGroupRequest, VariantAttribute, VariantGroup, VariantGroupDefaults, VariantGroupDefaultsInput, VariantGroupListQuery, VariantGroupMember, VariantGroupPage, VariantInput, } from './typen.js';
|
|
25
|
-
export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, STOCKTAKE_STATUSES, STOCKTAKE_TYPES, STOCKTAKE_SCOPE_TYPES, STOCKTAKE_CHECK_REASONS, STOCKTAKE_NOT_BOOKED_REASONS, STOCKTAKE_SOURCES, STOCKTAKE_ACTOR_TYPES, STOCKTAKE_INVENTORY_AS_OF, STOCKTAKE_ITEMS_MAX, STOCKTAKE_RECOUNT_ITEMS_MAX, STOCKTAKE_COUNTS_PER_ITEM_MAX, type StocktakeStatus, type StocktakeType, type StocktakeScopeType, type StocktakeCheckReason, type StocktakeNotBookedReason, type StocktakeSource, type StocktakeActorType, type StocktakeInventoryAsOf, type InventoryEndpoint, type InventoryErrorCode, type InventoryRequestErrorCode, type InventoryWebhookEventType, type LocationType, type StockMovementType, type StockMovementSource, type StockCondition, type StockChangeCause, type WebhookDeliveryStatus, type InventoryWarningCode, type StockKind, type StockLossReason, type WithdrawalType, type LandedCostType, type LandedCostAllocation, type ReservationStatus, } from './vertrag.js';
|
|
24
|
+
export type { AddVariantRequest, Article, CancelStocktakeRequest, CloseStocktakeRequest, CloseStocktakeResult, CreateStocktakeRequest, RecordStocktakeCountRequest, RecountStocktakeRequest, ReviewStocktakeRequest, Stocktake, StocktakeActor, StocktakeCancellation, StocktakeClosing, StocktakeCount, StocktakeCountListQuery, StocktakeCountPage, StocktakeCountResult, StocktakeInventoryLine, StocktakeItem, StocktakeItemListQuery, StocktakeItemPage, StocktakeListQuery, StocktakeNotBooked, StocktakePage, StocktakePdf, StocktakePdfDownload, StocktakePdfInfo, StocktakeProgress, StocktakeRecount, StocktakeReview, StocktakeScope, StocktakeScopeInput, StocktakeSeal, StocktakeTotals, StocktakeWarning, VoidStocktakeCountRequest, ArticleInput, ArticleListQuery, ArticleLookup, ArticlePage, ChangeStockConditionRequest, CreateArticleRequest, CreateInventoryWebhookOptions, CreateReservationRequest, CreateVariantGroupRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptItem, GoodsReceiptPreview, GoodsReceiptPreviewLine, GoodsReceiptPreviewRequest, InventoryShortfall, InventoryWarning, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookEnvelope, InventoryWebhookEvent, ReceiptCreatedEventData, ReceiptCancelledEventData, ReceiptCancelledItem, ReceiptRefund, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestDelivery, InventoryWebhookTestResult, InventoryWebhookWithSecret, LandedCost, Location, LocationAddress, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationItem, ReleaseReservationRequest, Reservation, ReservationItem, ReservationItemInput, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockBelowMinimumEventData, StockChangedEventData, StockItem, StockLevel, StockListQuery, StockMovement, StockMovementLot, StockMovementPage, StockMovementQuery, StockMovementSourceRef, StockOperation, StockPage, StockResult, StockValue, TransferStockRequest, UpdateArticleRequest, UpdateVariantGroupRequest, VariantAttribute, VariantGroup, VariantGroupDefaults, VariantGroupDefaultsInput, VariantGroupListQuery, VariantGroupMember, VariantGroupPage, VariantInput, } from './typen.js';
|
|
25
|
+
export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, RECEIPT_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, STOCKTAKE_STATUSES, STOCKTAKE_TYPES, STOCKTAKE_SCOPE_TYPES, STOCKTAKE_CHECK_REASONS, STOCKTAKE_NOT_BOOKED_REASONS, STOCKTAKE_SOURCES, STOCKTAKE_ACTOR_TYPES, STOCKTAKE_INVENTORY_AS_OF, STOCKTAKE_ITEMS_MAX, STOCKTAKE_RECOUNT_ITEMS_MAX, STOCKTAKE_COUNTS_PER_ITEM_MAX, type StocktakeStatus, type StocktakeType, type StocktakeScopeType, type StocktakeCheckReason, type StocktakeNotBookedReason, type StocktakeSource, type StocktakeActorType, type StocktakeInventoryAsOf, type InventoryEndpoint, type InventoryErrorCode, type InventoryRequestErrorCode, type InventoryWebhookEventType, type ReceiptWebhookEventType, type LocationType, type StockMovementType, type StockMovementSource, type StockCondition, type StockChangeCause, type WebhookDeliveryStatus, type InventoryWarningCode, type StockKind, type StockLossReason, type WithdrawalType, type LandedCostType, type LandedCostAllocation, type ReservationStatus, } from './vertrag.js';
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.closeStocktake = exports.cancelStocktake = exports.updateVariantGroup = exports.listVariantGroups = exports.iterateVariantGroups = exports.getVariantGroup = exports.createVariantGroup = exports.addVariant = exports.updateArticle = exports.transferStock = exports.reverseStockMovement = exports.releaseReservation = exports.recordStockLoss = exports.receiveGoods = exports.previewGoodsReceipt = exports.listReservations = exports.iterateReservations = exports.getReservation = exports.extendReservation = exports.deactivateArticle = exports.createReservation = exports.createArticle = exports.changeStockCondition = exports.updateWebhook = exports.sendWebhookTest = exports.rotateWebhookSecret = exports.lookupArticleByCode = exports.listWebhooks = exports.listWebhookDeliveries = exports.listStockMovements = exports.listStock = exports.listLocations = exports.listArticles = exports.iterateStockMovements = exports.iterateStock = exports.iterateArticles = exports.getStock = exports.getArticle = exports.deleteWebhook = exports.createWebhook = exports.isInventoryWarningCode = exports.inventoryBusyStocktakeId = exports.inventoryShortfalls = exports.inventoryRetryAfterSec = exports.inventoryFieldErrors = exports.inventoryErrorCode = exports.isInventoryErrorCode = exports.isInventoryError = exports.inventoryKeyAuth = exports.createInventoryClient = void 0;
|
|
19
|
-
exports.
|
|
20
|
-
exports.STOCKTAKE_COUNTS_PER_ITEM_MAX = exports.STOCKTAKE_RECOUNT_ITEMS_MAX = exports.STOCKTAKE_ITEMS_MAX = exports.STOCKTAKE_INVENTORY_AS_OF = exports.STOCKTAKE_ACTOR_TYPES = exports.STOCKTAKE_SOURCES = exports.STOCKTAKE_NOT_BOOKED_REASONS = void 0;
|
|
19
|
+
exports.STOCKTAKE_SCOPE_TYPES = exports.STOCKTAKE_TYPES = exports.STOCKTAKE_STATUSES = exports.VARIANT_GROUP_ACTIVE_MAX = exports.VARIANT_MATRIX_MAX = exports.VARIANT_VALUES_MAX = exports.VARIANT_ATTRIBUTES_MAX = exports.RESERVATION_MINUTES_MAX = exports.RESERVATION_MINUTES_MIN = exports.INVENTORY_IDEMPOTENCY_KEY_MAX = exports.RESERVATION_STATUSES = exports.LANDED_COST_ALLOCATIONS = exports.LANDED_COST_TYPES = exports.WITHDRAWAL_TYPES = exports.STOCK_LOSS_REASONS = exports.STOCK_KINDS = exports.INVENTORY_WARNING_CODES = exports.WEBHOOK_DELIVERY_STATUSES = exports.STOCK_CHANGE_CAUSES = exports.STOCK_CONDITIONS = exports.STOCK_MOVEMENT_SOURCES = exports.STOCK_MOVEMENT_TYPES = exports.LOCATION_TYPES = exports.INVENTORY_LIST_LIMIT_MAX = exports.INVENTORY_WEBHOOK_LIMIT = exports.INVENTORY_WEBHOOK_ENVELOPE_FIELDS = exports.RECEIPT_WEBHOOK_EVENTS = exports.INVENTORY_WEBHOOK_EVENTS = exports.INVENTORY_REQUEST_ERROR_CODES = exports.INVENTORY_ERROR_CODES = exports.INVENTORY_ENDPOINTS = exports.WEBHOOK_TOLERANCE_SEC = exports.WEBHOOK_DELIVERY_HEADER = exports.WEBHOOK_EVENT_HEADER = exports.WEBHOOK_SIGNATURE_HEADER = exports.parseInventoryWebhookEvent = exports.verifyInventoryWebhookSignature = exports.voidStocktakeCount = exports.reviewStocktake = exports.recountStocktake = exports.recordStocktakeCount = exports.listStocktakes = exports.listStocktakeItems = exports.listStocktakeCounts = exports.iterateStocktakes = exports.iterateStocktakeItems = exports.iterateStocktakeCounts = exports.getStocktakePdf = exports.getStocktake = exports.createStocktake = void 0;
|
|
20
|
+
exports.STOCKTAKE_COUNTS_PER_ITEM_MAX = exports.STOCKTAKE_RECOUNT_ITEMS_MAX = exports.STOCKTAKE_ITEMS_MAX = exports.STOCKTAKE_INVENTORY_AS_OF = exports.STOCKTAKE_ACTOR_TYPES = exports.STOCKTAKE_SOURCES = exports.STOCKTAKE_NOT_BOOKED_REASONS = exports.STOCKTAKE_CHECK_REASONS = void 0;
|
|
21
21
|
var api_js_1 = require("./api.js");
|
|
22
22
|
Object.defineProperty(exports, "createInventoryClient", { enumerable: true, get: function () { return api_js_1.createInventoryClient; } });
|
|
23
23
|
var auth_js_1 = require("./auth.js");
|
|
@@ -100,6 +100,7 @@ Object.defineProperty(exports, "INVENTORY_ENDPOINTS", { enumerable: true, get: f
|
|
|
100
100
|
Object.defineProperty(exports, "INVENTORY_ERROR_CODES", { enumerable: true, get: function () { return vertrag_js_1.INVENTORY_ERROR_CODES; } });
|
|
101
101
|
Object.defineProperty(exports, "INVENTORY_REQUEST_ERROR_CODES", { enumerable: true, get: function () { return vertrag_js_1.INVENTORY_REQUEST_ERROR_CODES; } });
|
|
102
102
|
Object.defineProperty(exports, "INVENTORY_WEBHOOK_EVENTS", { enumerable: true, get: function () { return vertrag_js_1.INVENTORY_WEBHOOK_EVENTS; } });
|
|
103
|
+
Object.defineProperty(exports, "RECEIPT_WEBHOOK_EVENTS", { enumerable: true, get: function () { return vertrag_js_1.RECEIPT_WEBHOOK_EVENTS; } });
|
|
103
104
|
Object.defineProperty(exports, "INVENTORY_WEBHOOK_ENVELOPE_FIELDS", { enumerable: true, get: function () { return vertrag_js_1.INVENTORY_WEBHOOK_ENVELOPE_FIELDS; } });
|
|
104
105
|
Object.defineProperty(exports, "INVENTORY_WEBHOOK_LIMIT", { enumerable: true, get: function () { return vertrag_js_1.INVENTORY_WEBHOOK_LIMIT; } });
|
|
105
106
|
Object.defineProperty(exports, "INVENTORY_LIST_LIMIT_MAX", { enumerable: true, get: function () { return vertrag_js_1.INVENTORY_LIST_LIMIT_MAX; } });
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* Tag) `YYYY-MM-DD`.
|
|
12
12
|
*/
|
|
13
13
|
import type { InventoryWarningCode, InventoryWebhookEventType, LandedCostAllocation, LandedCostType, LocationType, ReservationStatus, StockChangeCause, StockCondition, StockKind, StockLossReason, StockMovementSource, StockMovementType, StocktakeActorType, StocktakeCheckReason, StocktakeInventoryAsOf, StocktakeNotBookedReason, StocktakeScopeType, StocktakeSource, StocktakeStatus, StocktakeType, WebhookDeliveryStatus, WithdrawalType } from './vertrag.js';
|
|
14
|
+
import type { ListedFullReceipt } from '../client/list-receipts.js';
|
|
14
15
|
/**
|
|
15
16
|
* Ein Artikel, wie `getArticle`, `listArticles`, `lookupArticleByCode` und die
|
|
16
17
|
* Ereignisse `article.*` ihn senden.
|
|
@@ -355,7 +356,44 @@ export interface InventoryWebhookEnvelope<T extends InventoryWebhookEventType, D
|
|
|
355
356
|
test: boolean;
|
|
356
357
|
data: D;
|
|
357
358
|
}
|
|
358
|
-
|
|
359
|
+
/**
|
|
360
|
+
* Nutzlast von `receipt.created` (Beleg-Webhooks): der Beleg wie `listReceipts` mit `view: 'full'` (dieselbe
|
|
361
|
+
* Darstellung, auch Fremdgutscheine mit Nummer, eigene maskiert). Ist der Beleg fuer eine Zustellung zu gross,
|
|
362
|
+
* fehlen seine Positionen (`receipt.items` leer), `truncated` ist `true` und `hint` sagt, ihn mit `getReceipt`
|
|
363
|
+
* zu holen.
|
|
364
|
+
*/
|
|
365
|
+
export interface ReceiptCreatedEventData {
|
|
366
|
+
receipt: ListedFullReceipt;
|
|
367
|
+
/** Nur bei einer gekuerzten Zustellung: `true` (die Positionen fehlen). */
|
|
368
|
+
truncated?: true;
|
|
369
|
+
/** Nur bei einer gekuerzten Zustellung: Hinweis (deutsch). */
|
|
370
|
+
hint?: string;
|
|
371
|
+
}
|
|
372
|
+
/** Eine stornierte Position aus dem Storno-Beleg (`cancelledItems[]`). */
|
|
373
|
+
export interface ReceiptCancelledItem {
|
|
374
|
+
/** Index der Position im Original; `null`, wenn der Storno-Beleg ihn nicht traegt (Positionen ohne Artikel). */
|
|
375
|
+
index: number | null;
|
|
376
|
+
quantity: number | null;
|
|
377
|
+
}
|
|
378
|
+
/** Eine Rueckzahlung des Storno-Belegs (`refunds[]`): Betrag positiv in Cent. */
|
|
379
|
+
export interface ReceiptRefund {
|
|
380
|
+
/** Kennung der Zahlung im Original (`payments[].id`); `null` ohne Bezug (etwa bar zurueck). */
|
|
381
|
+
refundOf: string | null;
|
|
382
|
+
amountCents: number | null;
|
|
383
|
+
/** Zahlart wie in `payments[].method`. */
|
|
384
|
+
method: string | null;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Nutzlast von `receipt.cancelled`: der Storno-Beleg wie bei `receipt.created`, dazu Bezug, stornierte Positionen
|
|
388
|
+
* und Rueckzahlungen, abgeleitet aus dem Storno-Beleg selbst. `cancellationOf` ist die Beleg-ID des Originals;
|
|
389
|
+
* der veraltete Storno ohne Bezug traegt `null`.
|
|
390
|
+
*/
|
|
391
|
+
export interface ReceiptCancelledEventData extends ReceiptCreatedEventData {
|
|
392
|
+
cancellationOf: string | null;
|
|
393
|
+
cancelledItems: ReceiptCancelledItem[];
|
|
394
|
+
refunds: ReceiptRefund[];
|
|
395
|
+
}
|
|
396
|
+
export type InventoryWebhookEvent = InventoryWebhookEnvelope<'stock.changed', StockChangedEventData> | InventoryWebhookEnvelope<'stock.below_minimum', StockBelowMinimumEventData> | InventoryWebhookEnvelope<'article.created', Article> | InventoryWebhookEnvelope<'article.updated', Article> | InventoryWebhookEnvelope<'article.deactivated', Article> | InventoryWebhookEnvelope<'reservation.expired', Reservation> | InventoryWebhookEnvelope<'reservation.released', Reservation> | InventoryWebhookEnvelope<'reservation.redeemed', Reservation> | InventoryWebhookEnvelope<'variant_group.created', VariantGroup> | InventoryWebhookEnvelope<'variant_group.updated', VariantGroup> | InventoryWebhookEnvelope<'receipt.created', ReceiptCreatedEventData> | InventoryWebhookEnvelope<'receipt.cancelled', ReceiptCancelledEventData>;
|
|
359
397
|
/**
|
|
360
398
|
* Die Felder eines Artikels beim Anlegen. Bei der Anlage heisst `null` „nicht
|
|
361
399
|
* angegeben“ (ausser bei `name`, der Pflicht ist).
|
|
@@ -58,9 +58,20 @@ export type WebhookDeliveryStatus = (typeof WEBHOOK_DELIVERY_STATUSES)[number];
|
|
|
58
58
|
* Variantengruppe wie `getVariantGroup`; `updated` kommt nur bei einer aussen
|
|
59
59
|
* sichtbaren Aenderung (neuer Wert, neue oder stillgelegte Variante, Name,
|
|
60
60
|
* Vorgaben, Stilllegen der Gruppe).
|
|
61
|
+
* `receipt.created` und `receipt.cancelled` (Beleg-Webhooks, Server 2026-11) tragen den Beleg wie
|
|
62
|
+
* `listReceipts` mit `view: 'full'` ([RECEIPT_WEBHOOK_EVENTS]); sie brauchen das Modul Registrierkasse, nicht
|
|
63
|
+
* das Lager (sonst `webhook_event_not_available` beim Anlegen oder Aendern).
|
|
61
64
|
*/
|
|
62
|
-
export declare const INVENTORY_WEBHOOK_EVENTS: readonly ["stock.changed", "stock.below_minimum", "article.created", "article.updated", "article.deactivated", "reservation.expired", "reservation.released", "reservation.redeemed", "variant_group.created", "variant_group.updated"];
|
|
65
|
+
export declare const INVENTORY_WEBHOOK_EVENTS: readonly ["stock.changed", "stock.below_minimum", "article.created", "article.updated", "article.deactivated", "reservation.expired", "reservation.released", "reservation.redeemed", "variant_group.created", "variant_group.updated", "receipt.created", "receipt.cancelled"];
|
|
63
66
|
export type InventoryWebhookEventType = (typeof INVENTORY_WEBHOOK_EVENTS)[number];
|
|
67
|
+
/**
|
|
68
|
+
* Die Beleg-Ereignisse der Konto-Webhooks: `receipt.created` fuer jeden neu signierten Beleg jeder Art (auch den
|
|
69
|
+
* Storno-Beleg), `receipt.cancelled` zusaetzlich fuer jeden Storno-Beleg. Ein Storno bringt also beide. Die
|
|
70
|
+
* Ereignis-ID ist je Beleg und Ereignis fest: darauf entdoppeln. Fehlt eine fortlaufende Belegnummer einer Kasse,
|
|
71
|
+
* den Zeitraum mit `listReceipts` nachholen.
|
|
72
|
+
*/
|
|
73
|
+
export declare const RECEIPT_WEBHOOK_EVENTS: readonly ["receipt.created", "receipt.cancelled"];
|
|
74
|
+
export type ReceiptWebhookEventType = (typeof RECEIPT_WEBHOOK_EVENTS)[number];
|
|
64
75
|
/**
|
|
65
76
|
* Die Felder der Huelle jeder Zustellung, in der Reihenfolge am Draht. Statt
|
|
66
77
|
* `partnerId` (Partner-Webhooks) traegt sie `accountId`; `test` steht nur auf
|
|
@@ -117,7 +128,7 @@ export declare const INVENTORY_LIST_LIMIT_MAX = 200;
|
|
|
117
128
|
* `stocktake_not_closed` (das Protokoll gibt es erst nach dem Abschluss, auch
|
|
118
129
|
* nicht fuer eine abgebrochene Inventur).
|
|
119
130
|
*/
|
|
120
|
-
export declare const INVENTORY_ERROR_CODES: readonly ["validation", "invalid_cursor", "article_not_found", "webhook_not_found", "webhook_limit", "invalid_webhook_url", "event_not_subscribed", "webhook_inactive", "inventory_api_not_enabled", "module_inactive", "rate_limited", "server_error", "idempotency_key_required", "idempotency_conflict", "location_not_found", "location_inactive", "invalid_location", "invalid_locations", "invalid_transfer", "operation_not_found", "already_reversed", "reversal_not_possible", "reversal_not_supported", "exceeds_stock", "no_positions", "too_many_positions", "invalid_step", "invalid_quantity", "invalid_amount", "invalid_price", "negative_value", "invalid_reason", "note_required", "withdrawal_type_required", "invalid_method", "invalid_stock_kind", "invalid_minimum", "invalid_dimensions", "weight_missing", "invalid_landed_cost", "invalid_distribution", "landed_costs_mismatch", "return_totals_mismatch", "lot_not_found", "invalid_serial", "serial_required", "serial_not_allowed", "serial_already_exists", "serial_not_in_stock", "code_taken", "external_id_taken", "group_not_found", "revenue_group_not_found", "stock_kind_locked", "article_inactive", "invalid_position", "invalid_condition", "reason_required", "insufficient_available", "reservation_not_found", "reservation_not_active", "variant_group_not_found", "variant_already_exists", "invalid_variant_attributes", "variant_group_inactive", "variant_limit", "stocktake_not_found", "stocktake_not_open", "stocktake_closed", "stocktake_not_in_review", "stocktake_closing", "stocktake_location_busy", "stocktake_review_running", "stocktake_recount_open", "article_not_in_scope", "article_not_tracked", "count_not_found", "count_already_voided", "serial_already_counted", "too_many_counts", "stocktake_not_closed"];
|
|
131
|
+
export declare const INVENTORY_ERROR_CODES: readonly ["validation", "invalid_cursor", "article_not_found", "webhook_not_found", "webhook_limit", "invalid_webhook_url", "event_not_subscribed", "webhook_inactive", "inventory_api_not_enabled", "module_inactive", "rate_limited", "server_error", "webhook_event_not_available", "idempotency_key_required", "idempotency_conflict", "location_not_found", "location_inactive", "invalid_location", "invalid_locations", "invalid_transfer", "operation_not_found", "already_reversed", "reversal_not_possible", "reversal_not_supported", "exceeds_stock", "no_positions", "too_many_positions", "invalid_step", "invalid_quantity", "invalid_amount", "invalid_price", "negative_value", "invalid_reason", "note_required", "withdrawal_type_required", "invalid_method", "invalid_stock_kind", "invalid_minimum", "invalid_dimensions", "weight_missing", "invalid_landed_cost", "invalid_distribution", "landed_costs_mismatch", "return_totals_mismatch", "lot_not_found", "invalid_serial", "serial_required", "serial_not_allowed", "serial_already_exists", "serial_not_in_stock", "code_taken", "external_id_taken", "group_not_found", "revenue_group_not_found", "stock_kind_locked", "article_inactive", "invalid_position", "invalid_condition", "reason_required", "insufficient_available", "reservation_not_found", "reservation_not_active", "variant_group_not_found", "variant_already_exists", "invalid_variant_attributes", "variant_group_inactive", "variant_limit", "stocktake_not_found", "stocktake_not_open", "stocktake_closed", "stocktake_not_in_review", "stocktake_closing", "stocktake_location_busy", "stocktake_review_running", "stocktake_recount_open", "article_not_in_scope", "article_not_tracked", "count_not_found", "count_already_voided", "serial_already_counted", "too_many_counts", "stocktake_not_closed"];
|
|
121
132
|
export type InventoryErrorCode = (typeof INVENTORY_ERROR_CODES)[number];
|
|
122
133
|
/**
|
|
123
134
|
* Codes, die Anmeldung und Rand auf jedem Lager-Aufruf erzeugen koennen,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* deckungsgleich mit dieser Datei; nichts hier wird geraten.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.STOCKTAKE_COUNTS_PER_ITEM_MAX = exports.STOCKTAKE_RECOUNT_ITEMS_MAX = exports.STOCKTAKE_ITEMS_MAX = exports.STOCKTAKE_INVENTORY_AS_OF = exports.STOCKTAKE_ACTOR_TYPES = exports.STOCKTAKE_SOURCES = exports.STOCKTAKE_NOT_BOOKED_REASONS = exports.STOCKTAKE_CHECK_REASONS = exports.STOCKTAKE_SCOPE_TYPES = exports.STOCKTAKE_TYPES = exports.STOCKTAKE_STATUSES = exports.VARIANT_GROUP_ACTIVE_MAX = exports.VARIANT_MATRIX_MAX = exports.VARIANT_VALUES_MAX = exports.VARIANT_ATTRIBUTES_MAX = exports.RESERVATION_MINUTES_MAX = exports.RESERVATION_MINUTES_MIN = exports.INVENTORY_IDEMPOTENCY_KEY_MAX = exports.RESERVATION_STATUSES = exports.LANDED_COST_ALLOCATIONS = exports.LANDED_COST_TYPES = exports.WITHDRAWAL_TYPES = exports.STOCK_LOSS_REASONS = exports.STOCK_KINDS = exports.INVENTORY_WARNING_CODES = exports.INVENTORY_REQUEST_ERROR_CODES = exports.INVENTORY_ERROR_CODES = exports.INVENTORY_LIST_LIMIT_MAX = exports.INVENTORY_WEBHOOK_LIMIT = exports.INVENTORY_WEBHOOK_ENVELOPE_FIELDS = exports.INVENTORY_WEBHOOK_EVENTS = exports.WEBHOOK_DELIVERY_STATUSES = exports.STOCK_CHANGE_CAUSES = exports.STOCK_CONDITIONS = exports.STOCK_MOVEMENT_SOURCES = exports.STOCK_MOVEMENT_TYPES = exports.LOCATION_TYPES = exports.INVENTORY_ENDPOINTS = void 0;
|
|
18
|
+
exports.STOCKTAKE_COUNTS_PER_ITEM_MAX = exports.STOCKTAKE_RECOUNT_ITEMS_MAX = exports.STOCKTAKE_ITEMS_MAX = exports.STOCKTAKE_INVENTORY_AS_OF = exports.STOCKTAKE_ACTOR_TYPES = exports.STOCKTAKE_SOURCES = exports.STOCKTAKE_NOT_BOOKED_REASONS = exports.STOCKTAKE_CHECK_REASONS = exports.STOCKTAKE_SCOPE_TYPES = exports.STOCKTAKE_TYPES = exports.STOCKTAKE_STATUSES = exports.VARIANT_GROUP_ACTIVE_MAX = exports.VARIANT_MATRIX_MAX = exports.VARIANT_VALUES_MAX = exports.VARIANT_ATTRIBUTES_MAX = exports.RESERVATION_MINUTES_MAX = exports.RESERVATION_MINUTES_MIN = exports.INVENTORY_IDEMPOTENCY_KEY_MAX = exports.RESERVATION_STATUSES = exports.LANDED_COST_ALLOCATIONS = exports.LANDED_COST_TYPES = exports.WITHDRAWAL_TYPES = exports.STOCK_LOSS_REASONS = exports.STOCK_KINDS = exports.INVENTORY_WARNING_CODES = exports.INVENTORY_REQUEST_ERROR_CODES = exports.INVENTORY_ERROR_CODES = exports.INVENTORY_LIST_LIMIT_MAX = exports.INVENTORY_WEBHOOK_LIMIT = exports.INVENTORY_WEBHOOK_ENVELOPE_FIELDS = exports.RECEIPT_WEBHOOK_EVENTS = exports.INVENTORY_WEBHOOK_EVENTS = exports.WEBHOOK_DELIVERY_STATUSES = exports.STOCK_CHANGE_CAUSES = exports.STOCK_CONDITIONS = exports.STOCK_MOVEMENT_SOURCES = exports.STOCK_MOVEMENT_TYPES = exports.LOCATION_TYPES = exports.INVENTORY_ENDPOINTS = void 0;
|
|
19
19
|
/** Die 44 Endpunkte (14 aus 5a, 13 aus 5b, 5 aus 5c, 12 der Inventur), in der Reihenfolge von `endpoints.public`. */
|
|
20
20
|
exports.INVENTORY_ENDPOINTS = [
|
|
21
21
|
'getArticle',
|
|
@@ -139,6 +139,9 @@ exports.WEBHOOK_DELIVERY_STATUSES = ['delivered', 'pending', 'failed', 'dropped'
|
|
|
139
139
|
* Variantengruppe wie `getVariantGroup`; `updated` kommt nur bei einer aussen
|
|
140
140
|
* sichtbaren Aenderung (neuer Wert, neue oder stillgelegte Variante, Name,
|
|
141
141
|
* Vorgaben, Stilllegen der Gruppe).
|
|
142
|
+
* `receipt.created` und `receipt.cancelled` (Beleg-Webhooks, Server 2026-11) tragen den Beleg wie
|
|
143
|
+
* `listReceipts` mit `view: 'full'` ([RECEIPT_WEBHOOK_EVENTS]); sie brauchen das Modul Registrierkasse, nicht
|
|
144
|
+
* das Lager (sonst `webhook_event_not_available` beim Anlegen oder Aendern).
|
|
142
145
|
*/
|
|
143
146
|
exports.INVENTORY_WEBHOOK_EVENTS = [
|
|
144
147
|
'stock.changed',
|
|
@@ -151,7 +154,16 @@ exports.INVENTORY_WEBHOOK_EVENTS = [
|
|
|
151
154
|
'reservation.redeemed',
|
|
152
155
|
'variant_group.created',
|
|
153
156
|
'variant_group.updated',
|
|
157
|
+
'receipt.created',
|
|
158
|
+
'receipt.cancelled',
|
|
154
159
|
];
|
|
160
|
+
/**
|
|
161
|
+
* Die Beleg-Ereignisse der Konto-Webhooks: `receipt.created` fuer jeden neu signierten Beleg jeder Art (auch den
|
|
162
|
+
* Storno-Beleg), `receipt.cancelled` zusaetzlich fuer jeden Storno-Beleg. Ein Storno bringt also beide. Die
|
|
163
|
+
* Ereignis-ID ist je Beleg und Ereignis fest: darauf entdoppeln. Fehlt eine fortlaufende Belegnummer einer Kasse,
|
|
164
|
+
* den Zeitraum mit `listReceipts` nachholen.
|
|
165
|
+
*/
|
|
166
|
+
exports.RECEIPT_WEBHOOK_EVENTS = ['receipt.created', 'receipt.cancelled'];
|
|
155
167
|
/**
|
|
156
168
|
* Die Felder der Huelle jeder Zustellung, in der Reihenfolge am Draht. Statt
|
|
157
169
|
* `partnerId` (Partner-Webhooks) traegt sie `accountId`; `test` steht nur auf
|
|
@@ -221,6 +233,9 @@ exports.INVENTORY_ERROR_CODES = [
|
|
|
221
233
|
'module_inactive',
|
|
222
234
|
'rate_limited',
|
|
223
235
|
'server_error',
|
|
236
|
+
// Seit Beleg-Webhooks (Server 2026-11, Stelle wie im Vertrag): ein Ereignis, dessen Modul dem Konto fehlt
|
|
237
|
+
// (`receipt.*` ohne Registrierkasse, `stock.*` u. a. ohne Lager), laesst sich nicht abonnieren; mit `field: 'events'`.
|
|
238
|
+
'webhook_event_not_available',
|
|
224
239
|
'idempotency_key_required',
|
|
225
240
|
'idempotency_conflict',
|
|
226
241
|
'location_not_found',
|
|
@@ -46,6 +46,9 @@ export declare function verifyInventoryWebhookSignature(secret: string | readonl
|
|
|
46
46
|
* - `variant_group.created|updated` tragen die Gruppe wie `getVariantGroup`
|
|
47
47
|
* (seit 1.6.0). Zwei Zustellungen koennen sich ueberholen: den Stand nur
|
|
48
48
|
* uebernehmen, wenn `data.updatedAt` neuer ist als der gespeicherte.
|
|
49
|
+
* - `receipt.created|cancelled` (Beleg-Webhooks) tragen den Beleg wie
|
|
50
|
+
* `listReceipts` mit `view: 'full'` ([ReceiptCreatedEventData],
|
|
51
|
+
* [ReceiptCancelledEventData]).
|
|
49
52
|
* - Ein Rumpf, der keine Huelle ist, oder eine Bruchzahl in einer Menge wirft
|
|
50
53
|
* `KasseneckValidationError` (`scope: 'response'`).
|
|
51
54
|
*
|
|
@@ -22,6 +22,7 @@ const errors_js_1 = require("../client/errors.js");
|
|
|
22
22
|
const webhook_signatur_js_1 = require("../partner/webhook-signatur.js");
|
|
23
23
|
const lesen_js_1 = require("./lesen.js");
|
|
24
24
|
const vertrag_js_1 = require("./vertrag.js");
|
|
25
|
+
const list_receipts_js_1 = require("../client/list-receipts.js");
|
|
25
26
|
var webhook_signatur_js_2 = require("../partner/webhook-signatur.js");
|
|
26
27
|
Object.defineProperty(exports, "WEBHOOK_SIGNATURE_HEADER", { enumerable: true, get: function () { return webhook_signatur_js_2.WEBHOOK_SIGNATURE_HEADER; } });
|
|
27
28
|
Object.defineProperty(exports, "WEBHOOK_EVENT_HEADER", { enumerable: true, get: function () { return webhook_signatur_js_2.WEBHOOK_EVENT_HEADER; } });
|
|
@@ -72,6 +73,9 @@ function kaputt(grund) {
|
|
|
72
73
|
* - `variant_group.created|updated` tragen die Gruppe wie `getVariantGroup`
|
|
73
74
|
* (seit 1.6.0). Zwei Zustellungen koennen sich ueberholen: den Stand nur
|
|
74
75
|
* uebernehmen, wenn `data.updatedAt` neuer ist als der gespeicherte.
|
|
76
|
+
* - `receipt.created|cancelled` (Beleg-Webhooks) tragen den Beleg wie
|
|
77
|
+
* `listReceipts` mit `view: 'full'` ([ReceiptCreatedEventData],
|
|
78
|
+
* [ReceiptCancelledEventData]).
|
|
75
79
|
* - Ein Rumpf, der keine Huelle ist, oder eine Bruchzahl in einer Menge wirft
|
|
76
80
|
* `KasseneckValidationError` (`scope: 'response'`).
|
|
77
81
|
*
|
|
@@ -116,7 +120,42 @@ function parseInventoryWebhookEvent(rawBody) {
|
|
|
116
120
|
case 'variant_group.created':
|
|
117
121
|
case 'variant_group.updated':
|
|
118
122
|
return { ...huelle, type: huelle.type, data: (0, lesen_js_1.variantengruppe)(ort, data) };
|
|
123
|
+
case 'receipt.created':
|
|
124
|
+
return { ...huelle, type: huelle.type, data: belegDaten(data) };
|
|
125
|
+
case 'receipt.cancelled':
|
|
126
|
+
return { ...huelle, type: huelle.type, data: stornoDaten(data) };
|
|
119
127
|
default:
|
|
120
128
|
return { ...huelle, type: huelle.type, data: (0, lesen_js_1.artikel)(ort, data) };
|
|
121
129
|
}
|
|
122
130
|
}
|
|
131
|
+
/** `data` von `receipt.created`: der Beleg der vollen Ansicht, bei einer gekuerzten Zustellung mit Hinweis. */
|
|
132
|
+
function belegDaten(data) {
|
|
133
|
+
const beleg = (0, lesen_js_1.objekt)(data['receipt']);
|
|
134
|
+
if (!beleg)
|
|
135
|
+
throw kaputt('Ereignis ohne data.receipt');
|
|
136
|
+
return {
|
|
137
|
+
receipt: (0, list_receipts_js_1.vollerBeleg)(beleg),
|
|
138
|
+
...(data['truncated'] === true ? { truncated: true } : {}),
|
|
139
|
+
...(typeof data['hint'] === 'string' ? { hint: data['hint'] } : {}),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
const ganzOderNull = (w) => (typeof w === 'number' && Number.isInteger(w) ? w : null);
|
|
143
|
+
const textOderNull = (w) => (typeof w === 'string' && w !== '' ? w : null);
|
|
144
|
+
/** `data` von `receipt.cancelled`: dazu Bezug, stornierte Positionen und Rueckzahlungen aus dem Storno-Beleg. */
|
|
145
|
+
function stornoDaten(data) {
|
|
146
|
+
const { cancellationOf, cancelledItems, refunds } = data;
|
|
147
|
+
if (cancellationOf !== null && typeof cancellationOf !== 'string')
|
|
148
|
+
throw kaputt('data.cancellationOf ist weder Text noch null');
|
|
149
|
+
if (!Array.isArray(cancelledItems) || cancelledItems.some((x) => !(0, lesen_js_1.objekt)(x)))
|
|
150
|
+
throw kaputt('data.cancelledItems ist keine Liste von Positionen');
|
|
151
|
+
if (!Array.isArray(refunds) || refunds.some((x) => !(0, lesen_js_1.objekt)(x)))
|
|
152
|
+
throw kaputt('data.refunds ist keine Liste von Rueckzahlungen');
|
|
153
|
+
return {
|
|
154
|
+
...belegDaten(data),
|
|
155
|
+
cancellationOf: cancellationOf === '' ? null : cancellationOf,
|
|
156
|
+
cancelledItems: cancelledItems.map((p) => ({ index: ganzOderNull(p['index']), quantity: ganzOderNull(p['quantity']) })),
|
|
157
|
+
refunds: refunds.map((r) => ({
|
|
158
|
+
refundOf: textOderNull(r['refundOf']), amountCents: ganzOderNull(r['amountCents']), method: textOderNull(r['method']),
|
|
159
|
+
})),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isDiscountItem, isVoucherItem, isVoucherFloatItem, } from './receipt-item.js';
|
|
2
|
-
export { type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, isNewFormVoucher, voucherServerFields } from './voucher.js';
|
|
2
|
+
export { type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, isNewFormVoucher, voucherServerFields, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, } from './voucher.js';
|
|
3
3
|
export { type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, readRegistrationInfo, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, } from './receipt.js';
|
|
4
4
|
export { type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, } from './cancellation.js';
|
|
5
5
|
export { type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, } from './receipt-payment.js';
|
package/dist/cjs/models/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isManualReceiptErrorCode = exports.MANUAL_RECEIPT_ERROR_CODES = exports.readManualReceipt = exports.MANUAL_RECEIPT_REASONS = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = void 0;
|
|
3
|
+
exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.readRegistrationInfo = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherServerFields = exports.isNewFormVoucher = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isDiscountItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = void 0;
|
|
4
|
+
exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isManualReceiptErrorCode = exports.MANUAL_RECEIPT_ERROR_CODES = exports.readManualReceipt = exports.MANUAL_RECEIPT_REASONS = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = exports.isPaymentErrorCode = void 0;
|
|
5
5
|
var receipt_item_js_1 = require("./receipt-item.js");
|
|
6
6
|
Object.defineProperty(exports, "toReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.toReceiptItemPayload; } });
|
|
7
7
|
Object.defineProperty(exports, "fromReceiptItemPayload", { enumerable: true, get: function () { return receipt_item_js_1.fromReceiptItemPayload; } });
|
|
@@ -18,6 +18,14 @@ Object.defineProperty(exports, "fromVoucherPayload", { enumerable: true, get: fu
|
|
|
18
18
|
Object.defineProperty(exports, "voucherIsValid", { enumerable: true, get: function () { return voucher_js_1.voucherIsValid; } });
|
|
19
19
|
Object.defineProperty(exports, "isNewFormVoucher", { enumerable: true, get: function () { return voucher_js_1.isNewFormVoucher; } });
|
|
20
20
|
Object.defineProperty(exports, "voucherServerFields", { enumerable: true, get: function () { return voucher_js_1.voucherServerFields; } });
|
|
21
|
+
Object.defineProperty(exports, "VOUCHER_SOURCES", { enumerable: true, get: function () { return voucher_js_1.VOUCHER_SOURCES; } });
|
|
22
|
+
Object.defineProperty(exports, "isExternalVoucher", { enumerable: true, get: function () { return voucher_js_1.isExternalVoucher; } });
|
|
23
|
+
Object.defineProperty(exports, "externalVoucherIsValid", { enumerable: true, get: function () { return voucher_js_1.externalVoucherIsValid; } });
|
|
24
|
+
Object.defineProperty(exports, "normalizeExternalVoucherNumber", { enumerable: true, get: function () { return voucher_js_1.normalizeExternalVoucherNumber; } });
|
|
25
|
+
Object.defineProperty(exports, "checkExternalVoucherNumber", { enumerable: true, get: function () { return voucher_js_1.checkExternalVoucherNumber; } });
|
|
26
|
+
Object.defineProperty(exports, "EXTERNAL_VOUCHER_NUMBER_MAX", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_NUMBER_MAX; } });
|
|
27
|
+
Object.defineProperty(exports, "EXTERNAL_VOUCHER_TAXED_WITH_MAX", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_TAXED_WITH_MAX; } });
|
|
28
|
+
Object.defineProperty(exports, "EXTERNAL_VOUCHER_VAT_RATES_BP", { enumerable: true, get: function () { return voucher_js_1.EXTERNAL_VOUCHER_VAT_RATES_BP; } });
|
|
21
29
|
var receipt_js_1 = require("./receipt.js");
|
|
22
30
|
Object.defineProperty(exports, "toReceiptPayload", { enumerable: true, get: function () { return receipt_js_1.toReceiptPayload; } });
|
|
23
31
|
Object.defineProperty(exports, "fromReceiptPayload", { enumerable: true, get: function () { return receipt_js_1.fromReceiptPayload; } });
|