@kreiseck/kasseneck-api 1.35.1 → 1.37.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 +45 -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 +3 -3
- package/dist/cjs/client/aufrufe.js +15 -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 +4 -4
- 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/payments/hobex-hps/index.d.ts +2 -1
- package/dist/cjs/payments/hobex-hps/index.js +3 -1
- package/dist/cjs/payments/hobex-hps/outcome.d.ts +10 -0
- package/dist/cjs/payments/hobex-hps/payments.d.ts +54 -0
- package/dist/cjs/payments/hobex-hps/payments.js +157 -1
- package/dist/cjs/payments/hobex-hps/support.d.ts +19 -0
- package/dist/cjs/payments/hobex-hps/support.js +22 -0
- package/dist/cjs/payments/hobex-hps/transaction-response.js +1 -1
- package/dist/cjs/payments/index.d.ts +1 -1
- package/dist/cjs/payments/index.js +2 -1
- package/dist/cjs/pos/errors.d.ts +1 -1
- package/dist/cjs/pos/errors.js +1 -0
- package/dist/cjs/pos/index.d.ts +4 -4
- package/dist/cjs/pos/index.js +13 -5
- package/dist/cjs/pos/schicht-lesen.d.ts +3 -1
- package/dist/cjs/pos/schicht-lesen.js +23 -1
- package/dist/cjs/pos/schicht-typen.d.ts +39 -4
- package/dist/cjs/pos/schicht-typen.js +7 -2
- package/dist/cjs/pos/schicht.d.ts +6 -4
- package/dist/cjs/pos/schicht.js +6 -3
- package/dist/cjs/pos/settings.d.ts +37 -8
- package/dist/cjs/pos/settings.js +34 -10
- package/dist/cjs/pos/texte.d.ts +249 -2
- package/dist/cjs/pos/texte.js +139 -4
- package/dist/cjs/pos/trinkgeld.d.ts +30 -0
- package/dist/cjs/pos/trinkgeld.js +30 -0
- package/dist/cjs/receipt/shift-sheet.js +6 -1
- package/dist/cjs/register/pairing.d.ts +4 -0
- package/dist/cjs/register/pairing.js +2 -0
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +12 -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 +3 -3
- package/dist/esm/client/aufrufe.js +15 -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 +4 -4
- 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/payments/hobex-hps/index.d.ts +2 -1
- package/dist/esm/payments/hobex-hps/index.js +1 -0
- package/dist/esm/payments/hobex-hps/outcome.d.ts +10 -0
- package/dist/esm/payments/hobex-hps/payments.d.ts +54 -0
- package/dist/esm/payments/hobex-hps/payments.js +158 -2
- package/dist/esm/payments/hobex-hps/support.d.ts +19 -0
- package/dist/esm/payments/hobex-hps/support.js +19 -0
- package/dist/esm/payments/hobex-hps/transaction-response.js +1 -1
- package/dist/esm/payments/index.d.ts +1 -1
- package/dist/esm/payments/index.js +1 -1
- package/dist/esm/pos/errors.d.ts +1 -1
- package/dist/esm/pos/errors.js +1 -0
- package/dist/esm/pos/index.d.ts +4 -4
- package/dist/esm/pos/index.js +5 -5
- package/dist/esm/pos/schicht-lesen.d.ts +3 -1
- package/dist/esm/pos/schicht-lesen.js +22 -1
- package/dist/esm/pos/schicht-typen.d.ts +39 -4
- package/dist/esm/pos/schicht-typen.js +6 -1
- package/dist/esm/pos/schicht.d.ts +6 -4
- package/dist/esm/pos/schicht.js +6 -3
- package/dist/esm/pos/settings.d.ts +37 -8
- package/dist/esm/pos/settings.js +30 -9
- package/dist/esm/pos/texte.d.ts +249 -2
- package/dist/esm/pos/texte.js +138 -3
- package/dist/esm/pos/trinkgeld.d.ts +30 -0
- package/dist/esm/pos/trinkgeld.js +28 -0
- package/dist/esm/receipt/shift-sheet.js +6 -1
- package/dist/esm/register/pairing.d.ts +4 -0
- package/dist/esm/register/pairing.js +2 -0
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +12 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/duplicate-cases.json +1 -1
- package/fixtures/expected/duplicate.shift-close.hex +1 -1
- package/fixtures/expected/shift-close-card-tips.grid32.txt +44 -0
- package/fixtures/expected/shift-close-card-tips.grid48.txt +40 -0
- package/fixtures/expected/shift-close-card-tips.lines.json +479 -0
- package/fixtures/expected/shift-close-put-in.grid32.txt +1 -1
- package/fixtures/expected/shift-close-put-in.grid48.txt +1 -1
- package/fixtures/expected/shift-close-put-in.lines.json +1 -1
- package/fixtures/expected/shift-close-take-out.grid32.txt +1 -1
- package/fixtures/expected/shift-close-take-out.grid48.txt +1 -1
- package/fixtures/expected/shift-close-take-out.lines.json +1 -1
- package/fixtures/expected/shift-close.grid32.txt +1 -1
- package/fixtures/expected/shift-close.grid48.txt +1 -1
- package/fixtures/expected/shift-close.lines.json +1 -1
- package/fixtures/expected/shift-interim-card-tips.grid32.txt +34 -0
- package/fixtures/expected/shift-interim-card-tips.grid48.txt +31 -0
- package/fixtures/expected/shift-interim-card-tips.lines.json +344 -0
- package/fixtures/hobex-hps-codes.json +2 -2
- 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 +300 -3
- package/fixtures/renames-1.0.json +10 -0
- package/fixtures/shift-ablauf-cases.json +4 -4
- package/fixtures/shift-cases.json +4 -2
- package/fixtures/shift-receipts-card-tips.json +73 -0
- package/fixtures/shift-receipts.json +9 -9
- package/fixtures/stored/card-tip-cases.json +132 -0
- package/fixtures/surface.json +33 -8
- 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 +240 -3
- 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 +459 -17
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
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
|
/**
|
|
@@ -126,7 +126,7 @@ export interface TipOptions {
|
|
|
126
126
|
* Bar-Trinkgeld „gleich behalten“: die Mitarbeiterin steckt das Trinkgeld
|
|
127
127
|
* beim Verkauf gleich ein. Der Beleg bleibt, wie er ist (signiert, im DEP);
|
|
128
128
|
* nur im Kassenstand zaehlt der Betrag nicht ins Bar-Soll und gilt sofort als
|
|
129
|
-
* „
|
|
129
|
+
* „genommen“. Nur `true` geht hinaus. Der Server nimmt es nur bei
|
|
130
130
|
* Mitarbeiter-Trinkgeld, bar und sofort erhalten; sonst faellt es still weg.
|
|
131
131
|
* Vorbelegung des Schalters: [posTipKeptByDefault] der Kassen-Einstellungen.
|
|
132
132
|
*/
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
|
|
2
2
|
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, 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
|
-
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';
|
|
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, 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, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
|
|
6
6
|
export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, } from './pos/index.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
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.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isDepositReturnItem = exports.isDepositItem = 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
4
|
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 = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = void 0;
|
|
5
5
|
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 = exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = void 0;
|
|
6
|
-
exports.
|
|
7
|
-
exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = void 0;
|
|
6
|
+
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.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 = exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = void 0;
|
|
7
|
+
exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = 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; } });
|
|
@@ -195,6 +195,8 @@ Object.defineProperty(exports, "TERMINAL_ERROR_CODES", { enumerable: true, get:
|
|
|
195
195
|
Object.defineProperty(exports, "TERMINAL_LABEL_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_LABEL_MAX; } });
|
|
196
196
|
Object.defineProperty(exports, "TERMINAL_APP_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_APP_MAX; } });
|
|
197
197
|
Object.defineProperty(exports, "TERMINAL_REQUESTED_BY_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_REQUESTED_BY_MAX; } });
|
|
198
|
+
Object.defineProperty(exports, "EWP_REASONS", { enumerable: true, get: function () { return index_js_3.EWP_REASONS; } });
|
|
199
|
+
Object.defineProperty(exports, "EWP_WARNING_CODES", { enumerable: true, get: function () { return index_js_3.EWP_WARNING_CODES; } });
|
|
198
200
|
Object.defineProperty(exports, "getCashboxStatus", { enumerable: true, get: function () { return index_js_3.getCashboxStatus; } });
|
|
199
201
|
Object.defineProperty(exports, "getSignatureStatus", { enumerable: true, get: function () { return index_js_3.getSignatureStatus; } });
|
|
200
202
|
Object.defineProperty(exports, "createKasseneckApi", { enumerable: true, get: function () { return index_js_3.createKasseneckApi; } });
|
|
@@ -14,8 +14,8 @@ export { createInvoiceApi, type InvoiceApi, type InvoiceApiOptions } from './api
|
|
|
14
14
|
export { invoiceKeyAuth, type InvoiceKeyAuthOptions } from './auth.js';
|
|
15
15
|
export { isInvoiceError, isInvoiceErrorCode, invoiceErrorCode, invoiceFieldErrors, type InvoiceApiErrorCode, type InvoiceFieldError, } from './fehler.js';
|
|
16
16
|
export { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoice, getInvoicePdf, getInvoiceSetupStatus, getInvoiceXml, issueInvoice, listBrands, listInvoices, previewInvoice, recordInvoicePayment, searchCustomers, updateCustomer, } from './endpunkte.js';
|
|
17
|
-
export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceSupplyDateProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
|
|
17
|
+
export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, InvoiceItemDepositInput, InvoiceItemDeposit, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceSupplyDateProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
|
|
18
18
|
export { INVOICE_TEXTS, invoiceText, type InvoiceTextKey } from './texte.js';
|
|
19
19
|
export { computeInvoiceTotals, ZERO_RATED_TAX_SCHEMES, type TotalsItem } from './summen.js';
|
|
20
20
|
export { proratedPriceMicros, MAX_AMOUNT_CENTS, itemFromEuro, formatUnitPrice, CalcError, calculateInvoice, roundDiv, vatRateMapKey, formatVatRate, type CalcResult, type CalcErrorCode, type CalcOptions, type CalcItem, type RateTotal, type ItemConversion, type ConversionReason, type LineAmount, } from './calc.js';
|
|
21
|
-
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, type InvoiceEndpoint, type InvoiceErrorCode, type InvoiceRequestErrorCode, type CreditNoteReason, type ReturnDisposition, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type EInvoiceMissingCode, type WriteOffReasonCode, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type FieldFormat, type Field, } from './vertrag.js';
|
|
21
|
+
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, DEPOSIT_ITEM_FIELD, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, type InvoiceEndpoint, type InvoiceErrorCode, type InvoiceRequestErrorCode, type CreditNoteReason, type ReturnDisposition, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type EInvoiceMissingCode, type WriteOffReasonCode, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type FieldFormat, type Field, } from './vertrag.js';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.WRITE_OFF_REASON_CODES = exports.EINVOICE_MISSING_CODES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_REQUEST_ERROR_CODES = exports.INVOICE_ERROR_CODES = exports.INVOICE_ENDPOINTS = exports.INVOICE_CONTRACT_VERSION = exports.formatVatRate = exports.vatRateMapKey = exports.roundDiv = exports.calculateInvoice = exports.CalcError = exports.formatUnitPrice = exports.itemFromEuro = exports.MAX_AMOUNT_CENTS = exports.proratedPriceMicros = exports.ZERO_RATED_TAX_SCHEMES = exports.computeInvoiceTotals = exports.invoiceText = exports.INVOICE_TEXTS = exports.updateCustomer = exports.searchCustomers = exports.recordInvoicePayment = exports.previewInvoice = exports.listInvoices = exports.listBrands = exports.issueInvoice = exports.getInvoiceXml = exports.getInvoiceSetupStatus = exports.getInvoicePdf = exports.getInvoice = exports.getCustomer = exports.createCustomer = exports.createCreditNote = exports.cancelInvoice = exports.invoiceFieldErrors = exports.invoiceErrorCode = exports.isInvoiceErrorCode = exports.isInvoiceError = exports.invoiceKeyAuth = exports.createInvoiceApi = void 0;
|
|
16
|
-
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.ITEM_PRICE_EXACTLY_ONE = exports.RETURN_DISPOSITIONS = exports.CREDIT_NOTE_ITEM_FIELDS = exports.INVOICE_ITEM_FIELDS = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.REVERSE_CHARGE_REASONS = exports.ITEM_KINDS = void 0;
|
|
16
|
+
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.ITEM_PRICE_EXACTLY_ONE = exports.RETURN_DISPOSITIONS = exports.DEPOSIT_ITEM_FIELD = exports.CREDIT_NOTE_ITEM_FIELDS = exports.INVOICE_ITEM_FIELDS = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.REVERSE_CHARGE_REASONS = exports.ITEM_KINDS = void 0;
|
|
17
17
|
var api_js_1 = require("./api.js");
|
|
18
18
|
Object.defineProperty(exports, "createInvoiceApi", { enumerable: true, get: function () { return api_js_1.createInvoiceApi; } });
|
|
19
19
|
var auth_js_1 = require("./auth.js");
|
|
@@ -82,6 +82,7 @@ Object.defineProperty(exports, "CUSTOMER_FIELDS", { enumerable: true, get: funct
|
|
|
82
82
|
Object.defineProperty(exports, "ITEM_FIELDS", { enumerable: true, get: function () { return vertrag_js_1.ITEM_FIELDS; } });
|
|
83
83
|
Object.defineProperty(exports, "INVOICE_ITEM_FIELDS", { enumerable: true, get: function () { return vertrag_js_1.INVOICE_ITEM_FIELDS; } });
|
|
84
84
|
Object.defineProperty(exports, "CREDIT_NOTE_ITEM_FIELDS", { enumerable: true, get: function () { return vertrag_js_1.CREDIT_NOTE_ITEM_FIELDS; } });
|
|
85
|
+
Object.defineProperty(exports, "DEPOSIT_ITEM_FIELD", { enumerable: true, get: function () { return vertrag_js_1.DEPOSIT_ITEM_FIELD; } });
|
|
85
86
|
Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return vertrag_js_1.RETURN_DISPOSITIONS; } });
|
|
86
87
|
Object.defineProperty(exports, "ITEM_PRICE_EXACTLY_ONE", { enumerable: true, get: function () { return vertrag_js_1.ITEM_PRICE_EXACTLY_ONE; } });
|
|
87
88
|
Object.defineProperty(exports, "INVOICE_REQUESTS", { enumerable: true, get: function () { return vertrag_js_1.INVOICE_REQUESTS; } });
|
|
@@ -45,6 +45,10 @@ declare const DE: {
|
|
|
45
45
|
readonly 'pdf.totals.included_vat': "darin {rate}% USt von {net} netto";
|
|
46
46
|
readonly 'pdf.totals.grand_total.invoice': "Gesamtbetrag";
|
|
47
47
|
readonly 'pdf.totals.grand_total.credit_note': "Gutschriftsbetrag";
|
|
48
|
+
readonly 'pdf.totals.single_use_deposit': "0 % Einwegpfand, nicht steuerbar";
|
|
49
|
+
readonly 'pdf.totals.head_rate': "Satz";
|
|
50
|
+
readonly 'pdf.totals.head_net': "Netto";
|
|
51
|
+
readonly 'pdf.totals.head_vat': "USt";
|
|
48
52
|
readonly 'tax.small_business': "Gemäß § 6 Abs. 1 Z 27 UStG wird keine Umsatzsteuer verrechnet (Kleinunternehmer).";
|
|
49
53
|
readonly 'tax.intra_community_supply.title': "Steuerfreie innergemeinschaftliche Lieferung. ";
|
|
50
54
|
readonly 'tax.intra_community_supply.text': "Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.";
|
|
@@ -117,6 +121,7 @@ declare const DE: {
|
|
|
117
121
|
readonly 'einvoice.exemption.intra_community_supply': "Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG";
|
|
118
122
|
readonly 'einvoice.exemption.outside_scope': "Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
|
|
119
123
|
readonly 'einvoice.exemption.export_third_country': "Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG";
|
|
124
|
+
readonly 'einvoice.exemption.single_use_deposit': "Pfand Einweg, nicht steuerbar (UStR Rz 8)";
|
|
120
125
|
readonly 'einvoice.payable_until': "Zahlbar bis {date}";
|
|
121
126
|
readonly 'unit_symbol.piece': "Stk";
|
|
122
127
|
readonly 'unit_symbol.pair': "Paar";
|
|
@@ -32,6 +32,10 @@ const DE = {
|
|
|
32
32
|
'pdf.totals.included_vat': 'darin {rate}% USt von {net} netto',
|
|
33
33
|
'pdf.totals.grand_total.invoice': 'Gesamtbetrag',
|
|
34
34
|
'pdf.totals.grand_total.credit_note': 'Gutschriftsbetrag',
|
|
35
|
+
'pdf.totals.single_use_deposit': '0 % Einwegpfand, nicht steuerbar',
|
|
36
|
+
'pdf.totals.head_rate': 'Satz',
|
|
37
|
+
'pdf.totals.head_net': 'Netto',
|
|
38
|
+
'pdf.totals.head_vat': 'USt',
|
|
35
39
|
'tax.small_business': 'Gemäß § 6 Abs. 1 Z 27 UStG wird keine Umsatzsteuer verrechnet (Kleinunternehmer).',
|
|
36
40
|
'tax.intra_community_supply.title': 'Steuerfreie innergemeinschaftliche Lieferung. ',
|
|
37
41
|
'tax.intra_community_supply.text': 'Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.',
|
|
@@ -112,6 +116,7 @@ const DE = {
|
|
|
112
116
|
'einvoice.exemption.intra_community_supply': 'Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG',
|
|
113
117
|
'einvoice.exemption.outside_scope': 'Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
|
|
114
118
|
'einvoice.exemption.export_third_country': 'Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG',
|
|
119
|
+
'einvoice.exemption.single_use_deposit': 'Pfand Einweg, nicht steuerbar (UStR Rz 8)',
|
|
115
120
|
'einvoice.payable_until': 'Zahlbar bis {date}',
|
|
116
121
|
'unit_symbol.piece': 'Stk',
|
|
117
122
|
'unit_symbol.pair': 'Paar',
|
|
@@ -242,6 +247,10 @@ const EN = {
|
|
|
242
247
|
'pdf.totals.included_vat': 'incl. {rate}% VAT on {net} net',
|
|
243
248
|
'pdf.totals.grand_total.invoice': 'Total',
|
|
244
249
|
'pdf.totals.grand_total.credit_note': 'Credit total',
|
|
250
|
+
'pdf.totals.single_use_deposit': '0 % single-use deposit, not subject to VAT',
|
|
251
|
+
'pdf.totals.head_rate': 'Rate',
|
|
252
|
+
'pdf.totals.head_net': 'Net',
|
|
253
|
+
'pdf.totals.head_vat': 'VAT',
|
|
245
254
|
'tax.small_business': 'No VAT charged pursuant to § 6 (1) no. 27 UStG (small business exemption).',
|
|
246
255
|
'tax.intra_community_supply.title': 'VAT-exempt intra-Community supply. ',
|
|
247
256
|
'tax.intra_community_supply.text': 'Pursuant to Art. 6 (1) UStG (Art. 138 of VAT Directive 2006/112/EC). The acquisition is taxed by the customer in the country of destination.',
|
|
@@ -314,6 +323,7 @@ const EN = {
|
|
|
314
323
|
'einvoice.exemption.intra_community_supply': 'VAT-exempt intra-Community supply pursuant to Art. 6 (1) UStG',
|
|
315
324
|
'einvoice.exemption.outside_scope': 'Outside the scope of VAT – place of supply abroad (§ 3a (6) UStG)',
|
|
316
325
|
'einvoice.exemption.export_third_country': 'VAT-exempt export delivery pursuant to § 6 (1) no. 1 UStG',
|
|
326
|
+
'einvoice.exemption.single_use_deposit': 'Single-use deposit, not subject to VAT (UStR para. 8)',
|
|
317
327
|
'einvoice.payable_until': 'Payable by {date}',
|
|
318
328
|
'unit_symbol.piece': 'pcs',
|
|
319
329
|
'unit_symbol.pair': 'pair',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Wiener Kalender.
|
|
7
7
|
*/
|
|
8
8
|
import type { CreditNoteReason, CustomerType, DocType, EInvoiceFormat, EInvoiceMissingCode, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, ReturnDisposition, TaxScheme, VatRatePercent, WriteOffReasonCode } from './vertrag.js';
|
|
9
|
+
import type { DepositKind } from '../pos/pfand.js';
|
|
9
10
|
export interface CustomerInput {
|
|
10
11
|
type: CustomerType;
|
|
11
12
|
name: string;
|
|
@@ -89,11 +90,30 @@ export interface InvoiceItemInput {
|
|
|
89
90
|
/** Artikel aus dem Artikelstamm; bestandsgefuehrt bucht das Ausstellen ihn vom Lager ab. */
|
|
90
91
|
articleId?: string;
|
|
91
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Pfandangabe an einer Position (`deposit`, seit 1.36.0): die Position ist eine
|
|
95
|
+
* Pfandzeile zu der Position `depositFor` derselben Anfrage. Die Pfandarten des
|
|
96
|
+
* Betriebs liefert `listDepositTypes`. Ohne eingeschaltetes Pfand antwortet der
|
|
97
|
+
* Server mit `deposit_not_enabled`.
|
|
98
|
+
*/
|
|
99
|
+
export interface InvoiceItemDepositInput {
|
|
100
|
+
/** Kennung der Pfandart (`DepositType.id`). */
|
|
101
|
+
depositTypeId: string;
|
|
102
|
+
/** Index der Position in `items`, zu der dieses Pfand gehoert (0 bis 499). */
|
|
103
|
+
depositFor: number;
|
|
104
|
+
/** GTIN der Verpackung, 8 bis 14 Ziffern (fuer die EWP-Meldung). */
|
|
105
|
+
gtin?: string;
|
|
106
|
+
/** Eigene Abfuellung (Mehrweg des Betriebs selbst). */
|
|
107
|
+
ownFilling?: boolean;
|
|
108
|
+
}
|
|
92
109
|
/**
|
|
93
110
|
* Eine Position beim Ausstellen (`issueInvoice`): dazu optional die
|
|
94
|
-
* Reservierung aus der Lager-API, die diese Position einloest
|
|
111
|
+
* Reservierung aus der Lager-API, die diese Position einloest, und die
|
|
112
|
+
* Pfandangabe.
|
|
95
113
|
*/
|
|
96
114
|
export interface IssueInvoiceItemInput extends InvoiceItemInput {
|
|
115
|
+
/** Diese Position ist eine Pfandzeile (siehe [InvoiceItemDepositInput]). */
|
|
116
|
+
deposit?: InvoiceItemDepositInput;
|
|
97
117
|
/**
|
|
98
118
|
* Kennung aus `createReservation` (`./inventory`); braucht `articleId`.
|
|
99
119
|
* Geprueft beim Ausstellen (`reservation_not_found`, `reservation_mismatch`,
|
|
@@ -104,6 +124,8 @@ export interface IssueInvoiceItemInput extends InvoiceItemInput {
|
|
|
104
124
|
}
|
|
105
125
|
/** Eine Gutschriftsposition: wie eine Rechnungsposition (ohne Reservierung), dazu die Rueckgabe-Wahl. */
|
|
106
126
|
export interface CreditNoteItemInput extends InvoiceItemInput {
|
|
127
|
+
/** Diese Position ist eine Pfandzeile (siehe [InvoiceItemDepositInput]). */
|
|
128
|
+
deposit?: InvoiceItemDepositInput;
|
|
107
129
|
/** Wohin die Ware dieser Position geht; fehlt = Vorgabe des Aufrufs bzw. `restock`. */
|
|
108
130
|
returnDisposition?: ReturnDisposition;
|
|
109
131
|
}
|
|
@@ -333,6 +355,17 @@ export interface InvoiceItem {
|
|
|
333
355
|
unitPriceMicros?: number;
|
|
334
356
|
vatRate: number;
|
|
335
357
|
discountPct: number;
|
|
358
|
+
/** Nur an Pfandzeilen: die Pfandangabe, wie der Server sie fuehrt (siehe [InvoiceItemDeposit]). */
|
|
359
|
+
deposit?: InvoiceItemDeposit;
|
|
360
|
+
}
|
|
361
|
+
/** Die Pfandangabe einer gespeicherten Position (`getInvoice`): wie gesendet, dazu die Art der Pfandart. */
|
|
362
|
+
export interface InvoiceItemDeposit {
|
|
363
|
+
depositTypeId: string;
|
|
364
|
+
/** Einweg oder Mehrweg, vom Server aus der Pfandart gesetzt. */
|
|
365
|
+
depositKind: DepositKind;
|
|
366
|
+
depositFor: number;
|
|
367
|
+
gtin?: string;
|
|
368
|
+
ownFilling?: boolean;
|
|
336
369
|
}
|
|
337
370
|
/**
|
|
338
371
|
* Eine gebuchte Zahlung in `getInvoice`. Bei Altbestand kann jede Angabe ausser
|
|
@@ -27,7 +27,7 @@ export type InvoiceEndpoint = (typeof INVOICE_ENDPOINTS)[number];
|
|
|
27
27
|
* Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
|
|
28
28
|
* aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
|
|
29
29
|
*/
|
|
30
|
-
export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken"];
|
|
30
|
+
export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken", "deposit_not_enabled", "deposit_type_not_found", "deposit_set_by_server", "invalid_deposit_quantity", "invalid_deposit"];
|
|
31
31
|
export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
|
|
32
32
|
/**
|
|
33
33
|
* Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
|
|
@@ -210,6 +210,7 @@ export type Field = {
|
|
|
210
210
|
min?: number;
|
|
211
211
|
max: number;
|
|
212
212
|
format?: FieldFormat;
|
|
213
|
+
pattern?: string;
|
|
213
214
|
} | {
|
|
214
215
|
type: 'integer';
|
|
215
216
|
required: boolean;
|
|
@@ -270,9 +271,17 @@ export declare const CUSTOMER_FIELDS: Readonly<Record<string, Field>>;
|
|
|
270
271
|
* die bisher gerundet eingereicht werden mussten.
|
|
271
272
|
*/
|
|
272
273
|
export declare const ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
274
|
+
/**
|
|
275
|
+
* Pfandangabe an einer Position (seit 1.36.0, `deposit`): die Position ist eine
|
|
276
|
+
* Pfandzeile zu der Position `depositFor` (Index in `items`, 0 bis 499). Gleich
|
|
277
|
+
* dem Feld `DEPOSIT_FELD` des Backends. Zeile fuer Zeile Pfand sendet das
|
|
278
|
+
* Fremdsystem selbst; zu einer Position mit `articleId` leitet der Server das
|
|
279
|
+
* Pfand ab (`deposit_set_by_server`).
|
|
280
|
+
*/
|
|
281
|
+
export declare const DEPOSIT_ITEM_FIELD: Field;
|
|
273
282
|
/**
|
|
274
283
|
* Eine Rechnungsposition beim Ausstellen: die gemeinsamen Positionsfelder plus
|
|
275
|
-
* `reservationId` (seit 1.5.0). Die Reservierung aus der Lager-API
|
|
284
|
+
* `reservationId` (seit 1.5.0) und `deposit` (seit 1.36.0). Die Reservierung aus der Lager-API
|
|
276
285
|
* (`createReservation`) wird beim Ausstellen geprueft und beim Buchen der
|
|
277
286
|
* Rechnung eingeloest; die Position braucht dazu `articleId`. Unbekannt =
|
|
278
287
|
* `reservation_not_found`, schon eingeloest oder freigegeben =
|
|
@@ -287,8 +296,8 @@ export declare const INVOICE_ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
|
287
296
|
export declare const ITEM_PRICE_EXACTLY_ONE: readonly (readonly string[])[];
|
|
288
297
|
/**
|
|
289
298
|
* Eine Gutschriftsposition: die gemeinsamen Positionsfelder plus
|
|
290
|
-
* `returnDisposition` (wohin die zurueckgenommene Ware geht)
|
|
291
|
-
* `reservationId`. An einer Rechnungsposition weist der Server
|
|
299
|
+
* `returnDisposition` (wohin die zurueckgenommene Ware geht) und `deposit`
|
|
300
|
+
* (seit 1.36.0), ohne `reservationId`. An einer Rechnungsposition weist der Server
|
|
292
301
|
* `returnDisposition` als unbekannt ab.
|
|
293
302
|
*/
|
|
294
303
|
export declare const CREDIT_NOTE_ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* Nummer, Summen — ist bewusst **nicht** setzbar.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.PAYMENT_FIELDS = exports.CREDIT_NOTE_ITEM_FIELDS = exports.ITEM_PRICE_EXACTLY_ONE = exports.INVOICE_ITEM_FIELDS = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.WRITE_OFF_REASON_CODES = exports.EINVOICE_MISSING_CODES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.ITEM_KINDS = exports.REVERSE_CHARGE_REASONS = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_REQUEST_ERROR_CODES = exports.INVOICE_ERROR_CODES = exports.INVOICE_ENDPOINTS = exports.INVOICE_CONTRACT_VERSION = exports.RETURN_DISPOSITIONS = void 0;
|
|
22
|
+
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.PAYMENT_FIELDS = exports.CREDIT_NOTE_ITEM_FIELDS = exports.ITEM_PRICE_EXACTLY_ONE = exports.INVOICE_ITEM_FIELDS = exports.DEPOSIT_ITEM_FIELD = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.WRITE_OFF_REASON_CODES = exports.EINVOICE_MISSING_CODES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.ITEM_KINDS = exports.REVERSE_CHARGE_REASONS = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_REQUEST_ERROR_CODES = exports.INVOICE_ERROR_CODES = exports.INVOICE_ENDPOINTS = exports.INVOICE_CONTRACT_VERSION = exports.RETURN_DISPOSITIONS = void 0;
|
|
23
23
|
const cancellation_js_1 = require("../models/cancellation.js");
|
|
24
24
|
Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return cancellation_js_1.RETURN_DISPOSITIONS; } });
|
|
25
25
|
exports.INVOICE_CONTRACT_VERSION = 2;
|
|
@@ -82,6 +82,12 @@ exports.INVOICE_ERROR_CODES = [
|
|
|
82
82
|
'reservation_not_active', // schon eingeloest oder freigegeben
|
|
83
83
|
// Seit 1.15.0 (Vertrag): die Rechnungsnummer ist schon vergeben (§ 11 Abs. 1 Z 3 lit. h UStG), nichts ausgestellt.
|
|
84
84
|
'invoice_number_taken',
|
|
85
|
+
// Seit 1.36.0 (Vertrag): Pfand an Positionen (`items[].deposit`), hinten angehaengt.
|
|
86
|
+
'deposit_not_enabled', // Pfand ist fuer dieses Konto nicht eingeschaltet
|
|
87
|
+
'deposit_type_not_found', // die Pfandart gibt es nicht (oder ist stillgelegt)
|
|
88
|
+
'deposit_set_by_server', // das Pfand zu einer Artikelposition leitet der Server selbst ab
|
|
89
|
+
'invalid_deposit_quantity', // die Pfandmenge passt nicht zur Menge der Position
|
|
90
|
+
'invalid_deposit', // sonstige Pfandangabe unzulaessig, `index` nennt die Position
|
|
85
91
|
];
|
|
86
92
|
/**
|
|
87
93
|
* Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
|
|
@@ -450,9 +456,26 @@ exports.ITEM_FIELDS = Object.freeze({
|
|
|
450
456
|
*/
|
|
451
457
|
articleId: id,
|
|
452
458
|
});
|
|
459
|
+
/**
|
|
460
|
+
* Pfandangabe an einer Position (seit 1.36.0, `deposit`): die Position ist eine
|
|
461
|
+
* Pfandzeile zu der Position `depositFor` (Index in `items`, 0 bis 499). Gleich
|
|
462
|
+
* dem Feld `DEPOSIT_FELD` des Backends. Zeile fuer Zeile Pfand sendet das
|
|
463
|
+
* Fremdsystem selbst; zu einer Position mit `articleId` leitet der Server das
|
|
464
|
+
* Pfand ab (`deposit_set_by_server`).
|
|
465
|
+
*/
|
|
466
|
+
exports.DEPOSIT_ITEM_FIELD = Object.freeze({
|
|
467
|
+
type: 'object',
|
|
468
|
+
required: false,
|
|
469
|
+
fields: Object.freeze({
|
|
470
|
+
depositTypeId: { type: 'string', required: true, min: 1, max: 128 },
|
|
471
|
+
depositFor: { type: 'integer', required: true, min: 0, max: 499 },
|
|
472
|
+
gtin: { type: 'string', required: false, min: 8, max: 14, pattern: '^[0-9]{8,14}$' },
|
|
473
|
+
ownFilling: { type: 'boolean', required: false },
|
|
474
|
+
}),
|
|
475
|
+
});
|
|
453
476
|
/**
|
|
454
477
|
* Eine Rechnungsposition beim Ausstellen: die gemeinsamen Positionsfelder plus
|
|
455
|
-
* `reservationId` (seit 1.5.0). Die Reservierung aus der Lager-API
|
|
478
|
+
* `reservationId` (seit 1.5.0) und `deposit` (seit 1.36.0). Die Reservierung aus der Lager-API
|
|
456
479
|
* (`createReservation`) wird beim Ausstellen geprueft und beim Buchen der
|
|
457
480
|
* Rechnung eingeloest; die Position braucht dazu `articleId`. Unbekannt =
|
|
458
481
|
* `reservation_not_found`, schon eingeloest oder freigegeben =
|
|
@@ -462,7 +485,7 @@ exports.ITEM_FIELDS = Object.freeze({
|
|
|
462
485
|
* `reservation_expired`. Weniger verkauft als reserviert gibt den Rest frei.
|
|
463
486
|
* Gutschriften kennen das Feld nicht (`validation`).
|
|
464
487
|
*/
|
|
465
|
-
exports.INVOICE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, reservationId: id });
|
|
488
|
+
exports.INVOICE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, reservationId: id, deposit: exports.DEPOSIT_ITEM_FIELD });
|
|
466
489
|
/** Genau einer der beiden Preise je Position (§ 9.1). */
|
|
467
490
|
exports.ITEM_PRICE_EXACTLY_ONE = Object.freeze([
|
|
468
491
|
Object.freeze(['unitPriceCents']),
|
|
@@ -481,11 +504,11 @@ const positionen = {
|
|
|
481
504
|
const returnDisposition = { type: 'enum', required: false, values: cancellation_js_1.RETURN_DISPOSITIONS };
|
|
482
505
|
/**
|
|
483
506
|
* Eine Gutschriftsposition: die gemeinsamen Positionsfelder plus
|
|
484
|
-
* `returnDisposition` (wohin die zurueckgenommene Ware geht)
|
|
485
|
-
* `reservationId`. An einer Rechnungsposition weist der Server
|
|
507
|
+
* `returnDisposition` (wohin die zurueckgenommene Ware geht) und `deposit`
|
|
508
|
+
* (seit 1.36.0), ohne `reservationId`. An einer Rechnungsposition weist der Server
|
|
486
509
|
* `returnDisposition` als unbekannt ab.
|
|
487
510
|
*/
|
|
488
|
-
exports.CREDIT_NOTE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, returnDisposition });
|
|
511
|
+
exports.CREDIT_NOTE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, returnDisposition, deposit: exports.DEPOSIT_ITEM_FIELD });
|
|
489
512
|
const gutschriftPositionen = {
|
|
490
513
|
type: 'list',
|
|
491
514
|
required: true,
|
|
@@ -21,7 +21,8 @@ export { type HpsConnectCancelOptions, type HpsConnectClient, type HpsConnectCli
|
|
|
21
21
|
export { HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, } from './errors.js';
|
|
22
22
|
export { type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, } from './events.js';
|
|
23
23
|
export { type CardPaymentOutcome, type HpsPaymentResult, isHostUncertainResult, mayRetrySafely, } from './outcome.js';
|
|
24
|
-
export { type HpsCancelOptions, type HpsPaymentOptions, type HpsPayments, type HpsPaymentsOptions, type HpsRefundOptions, createHpsPayments, } from './payments.js';
|
|
24
|
+
export { type HpsCancelOptions, type HpsClarifyOptions, type HpsPaymentOptions, type HpsPayments, type HpsPaymentsOptions, type HpsRefundOptions, createHpsPayments, } from './payments.js';
|
|
25
25
|
export { MAX_TRANSACTION_ID_LENGTH, createHpsTransactionIdGenerator, isValidHpsTransactionId, newHpsTransactionId, type HpsTransactionIdGeneratorOptions, } from './transaction-id.js';
|
|
26
26
|
export { ABORTED_CODE, APP_SELECT_FAILED_CODE, APPROVED_CODE, BAD_REQUEST_CODE, CARD_DECLINED_CODE, CARD_INFO_NOT_ENTERED_CODE, CARD_NOT_PRESENT_CODE, CARD_NOT_SUPPORTED_CODE, CARD_READ_FAILED_CODE, CHIP_DATA_MISMATCH_CODE, COMPLETION_FAILED_CODE, DIAGNOSIS_FAILED_CODE, HOST_COMMUNICATION_FAILED_CODE, HOST_STEP_FAILED_CODE, HOST_TIMEOUT_REVERSED_CODE, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, INTERNAL_ERROR_CODE, INVALID_MESSAGE_TYPE_CODE, INVALID_TID_DOCUMENTED_CODE, INVALID_TX_TYPE_CODE, MAX_RETRIES_EXCEEDED_CODE, NOT_FOUND_CODE, PASSWORD_NOT_ENTERED_CODE, REFUND_DISABLED_CODE, REFUND_PASSWORD_INVALID_CODE, SCEP_ENROLLMENT_FAILED_CODE, TERMINAL_BLOCKED_CODE, TERMINAL_BUSY_CODE, TIP_SELECTION_FAILED_CODE, UNSUPPORTED_USER_DATA_CODE, hpsCodeInfo, hpsCodeReason, isHostUncertain, isHostUncertainReason, INVALID_TRANSACTION_CODE, NOT_ABORTABLE_CODE, INVALID_AMOUNT_CODE, AMOUNT_OUT_OF_RANGE_CODE, INVALID_TID_CODE, WRONG_PIN_CODE, NO_STATEMENT_CODE, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, isApproved, isCanceled, isConclusive, isConclusiveAsStatus, isInProgress, isNoStatement, isNotAbortable, needsReversal, normalizeHpsCode, isTechnicalError, isUnknownCode, parseHpsTransactionResponse, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsTransactionResponse, } from './transaction-response.js';
|
|
27
27
|
export { hobexReceiptFromHps } from './receipt.js';
|
|
28
|
+
export { HOBEX_SUPPORT } from './support.js';
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.hpsCodeReason = exports.hpsCodeInfo = exports.UNSUPPORTED_USER_DATA_CODE = exports.TIP_SELECTION_FAILED_CODE = exports.TERMINAL_BUSY_CODE = exports.TERMINAL_BLOCKED_CODE = exports.SCEP_ENROLLMENT_FAILED_CODE = exports.REFUND_PASSWORD_INVALID_CODE = exports.REFUND_DISABLED_CODE = exports.PASSWORD_NOT_ENTERED_CODE = exports.NOT_FOUND_CODE = exports.MAX_RETRIES_EXCEEDED_CODE = exports.INVALID_TX_TYPE_CODE = exports.INVALID_TID_DOCUMENTED_CODE = exports.INVALID_MESSAGE_TYPE_CODE = exports.INTERNAL_ERROR_CODE = exports.HPS_REASON_HINTS = exports.HPS_MEASURED_CODES = exports.HPS_CODES = exports.HOST_TIMEOUT_REVERSED_CODE = exports.HOST_STEP_FAILED_CODE = exports.HOST_COMMUNICATION_FAILED_CODE = exports.DIAGNOSIS_FAILED_CODE = exports.COMPLETION_FAILED_CODE = exports.CHIP_DATA_MISMATCH_CODE = exports.CARD_READ_FAILED_CODE = exports.CARD_NOT_SUPPORTED_CODE = exports.CARD_NOT_PRESENT_CODE = exports.CARD_INFO_NOT_ENTERED_CODE = exports.CARD_DECLINED_CODE = exports.BAD_REQUEST_CODE = exports.APPROVED_CODE = exports.APP_SELECT_FAILED_CODE = exports.ABORTED_CODE = exports.newHpsTransactionId = exports.isValidHpsTransactionId = exports.createHpsTransactionIdGenerator = exports.MAX_TRANSACTION_ID_LENGTH = exports.createHpsPayments = exports.mayRetrySafely = exports.isHostUncertainResult = exports.TERMINAL_UNREACHABLE_CONNECT_CODES = exports.PREFLIGHT_CONNECT_CODES = exports.HpsTransactionIdError = exports.HpsPreflightError = exports.HpsConnectTransportError = exports.HpsConnectTerminalError = exports.HpsConnectException = exports.HpsClarifyTimeoutError = exports.createHpsConnectClient = void 0;
|
|
23
|
-
exports.hobexReceiptFromHps = exports.parseHpsTransactionResponse = exports.isUnknownCode = exports.isTechnicalError = exports.normalizeHpsCode = exports.needsReversal = exports.isNotAbortable = exports.isNoStatement = exports.isInProgress = exports.isConclusiveAsStatus = exports.isConclusive = exports.isCanceled = exports.isApproved = exports.TRANSACTION_CANCELED_CODE = exports.TERMINAL_BUSY_HTTP_STATUS = exports.NOT_FOUND_HTTP_STATUS = exports.TECHNICAL_ERROR_CODE = exports.NO_STATEMENT_CODE = exports.WRONG_PIN_CODE = exports.INVALID_TID_CODE = exports.AMOUNT_OUT_OF_RANGE_CODE = exports.INVALID_AMOUNT_CODE = exports.NOT_ABORTABLE_CODE = exports.INVALID_TRANSACTION_CODE = exports.isHostUncertainReason = exports.isHostUncertain = void 0;
|
|
23
|
+
exports.HOBEX_SUPPORT = exports.hobexReceiptFromHps = exports.parseHpsTransactionResponse = exports.isUnknownCode = exports.isTechnicalError = exports.normalizeHpsCode = exports.needsReversal = exports.isNotAbortable = exports.isNoStatement = exports.isInProgress = exports.isConclusiveAsStatus = exports.isConclusive = exports.isCanceled = exports.isApproved = exports.TRANSACTION_CANCELED_CODE = exports.TERMINAL_BUSY_HTTP_STATUS = exports.NOT_FOUND_HTTP_STATUS = exports.TECHNICAL_ERROR_CODE = exports.NO_STATEMENT_CODE = exports.WRONG_PIN_CODE = exports.INVALID_TID_CODE = exports.AMOUNT_OUT_OF_RANGE_CODE = exports.INVALID_AMOUNT_CODE = exports.NOT_ABORTABLE_CODE = exports.INVALID_TRANSACTION_CODE = exports.isHostUncertainReason = exports.isHostUncertain = void 0;
|
|
24
24
|
var connect_client_js_1 = require("./connect-client.js");
|
|
25
25
|
Object.defineProperty(exports, "createHpsConnectClient", { enumerable: true, get: function () { return connect_client_js_1.createHpsConnectClient; } });
|
|
26
26
|
var errors_js_1 = require("./errors.js");
|
|
@@ -104,3 +104,5 @@ Object.defineProperty(exports, "isUnknownCode", { enumerable: true, get: functio
|
|
|
104
104
|
Object.defineProperty(exports, "parseHpsTransactionResponse", { enumerable: true, get: function () { return transaction_response_js_1.parseHpsTransactionResponse; } });
|
|
105
105
|
var receipt_js_1 = require("./receipt.js");
|
|
106
106
|
Object.defineProperty(exports, "hobexReceiptFromHps", { enumerable: true, get: function () { return receipt_js_1.hobexReceiptFromHps; } });
|
|
107
|
+
var support_js_1 = require("./support.js");
|
|
108
|
+
Object.defineProperty(exports, "HOBEX_SUPPORT", { enumerable: true, get: function () { return support_js_1.HOBEX_SUPPORT; } });
|
|
@@ -48,6 +48,16 @@ export interface HpsPaymentResult {
|
|
|
48
48
|
* Terminal etwas sagte) und bei einer Aufhebung, die nicht gegriffen hat.
|
|
49
49
|
*/
|
|
50
50
|
readonly reason?: HpsCodeReason;
|
|
51
|
+
/**
|
|
52
|
+
* Gesetzt, wenn dieses Ergebnis aus einer SPAETEN Nachfrage stammt
|
|
53
|
+
* (`HpsPayments.clarifyPayment`). Ein solches Ergebnis taugt nicht als
|
|
54
|
+
* `previous` einer weiteren Nachfrage: die Vorgeschichte einer Zahlung ist
|
|
55
|
+
* das Ergebnis von `pay`, und das bleibt sie -- ein `reason` aus der
|
|
56
|
+
* Nachfrage selbst (etwa `noStatement`) sagt nichts darueber, ob die
|
|
57
|
+
* Klaerung von `pay` ein Storno nachgeschickt hat. Die Nachfrage weist ein
|
|
58
|
+
* so markiertes `previous` deshalb zurueck: keine Antwort entscheidet.
|
|
59
|
+
*/
|
|
60
|
+
readonly clarified?: true;
|
|
51
61
|
/**
|
|
52
62
|
* Verlauf der Klaerung, in Reihenfolge — der Nachweis, der im
|
|
53
63
|
* Belastungsstreit gelesen wird. Behauptet nie eine Ursache, die nicht
|
|
@@ -219,11 +219,65 @@ export interface HpsCancelOptions {
|
|
|
219
219
|
currency?: string;
|
|
220
220
|
language?: string;
|
|
221
221
|
}
|
|
222
|
+
export interface HpsClarifyOptions {
|
|
223
|
+
/** Kennung der Zahlung aus [HpsPayments.pay] -- keine Gutschrift, keine Aufhebung. */
|
|
224
|
+
transactionId: string;
|
|
225
|
+
/**
|
|
226
|
+
* Was ueber die bisherige Klaerung dieser Zahlung feststeht. Davon haengt
|
|
227
|
+
* ab, was eine Antwort des Terminals jetzt noch beweist, siehe
|
|
228
|
+
* [HpsPayments.clarifyPayment]:
|
|
229
|
+
*
|
|
230
|
+
* - das `unresolved`-Ergebnis von [HpsPayments.pay] (es zaehlen `reason` und
|
|
231
|
+
* `clarified`). NIE das Ergebnis einer Nachfrage: dessen `reason` stammt
|
|
232
|
+
* aus der Nachfrage, nicht aus der Zahlung, und wuerde eine unbekannte
|
|
233
|
+
* Vorgeschichte reinwaschen -- ein mit `clarified` markiertes Ergebnis
|
|
234
|
+
* zaehlt deshalb wie `null`;
|
|
235
|
+
* - `'beforeResolve'`: die Zahlung wurde gestartet, ihre Klaerung hat aber
|
|
236
|
+
* nie begonnen -- etwa weil die Seite waehrend des Kartenflows abriss. Es
|
|
237
|
+
* wurde dann sicher kein Storno nachgeschickt. Nur angeben, wenn das
|
|
238
|
+
* Beobachter-Ereignis `resolving` nachweislich nie kam (es wird vor dem
|
|
239
|
+
* ersten Abbruch- oder Storno-Aufruf gemeldet); im Zweifel `null`;
|
|
240
|
+
* - `null`: nicht bekannt (etwa ein Eintrag aus einer aelteren Fassung, oder
|
|
241
|
+
* die Seite riss waehrend der Klaerung ab).
|
|
242
|
+
*/
|
|
243
|
+
previous: Pick<HpsPaymentResult, 'reason' | 'clarified'> | 'beforeResolve' | null;
|
|
244
|
+
}
|
|
222
245
|
export interface HpsPayments {
|
|
223
246
|
pay(options: HpsPaymentOptions): Promise<HpsPaymentResult>;
|
|
224
247
|
/** Gutschrift, geklaert wie [pay] -- siehe Klassendoku oben. */
|
|
225
248
|
refund(options: HpsRefundOptions): Promise<HpsPaymentResult>;
|
|
226
249
|
/** Aufhebung (Storno/Void) einer bestehenden Zahlung -- eigener Klaerweg, siehe Klassendoku oben. */
|
|
227
250
|
cancel(options: HpsCancelOptions): Promise<HpsPaymentResult>;
|
|
251
|
+
/**
|
|
252
|
+
* Fragt den Ausgang einer Zahlung SPAETER noch einmal ab -- etwa wenn der
|
|
253
|
+
* Kassier eine unklare Karte klaert. Liest nur: kein Abbruch, kein Storno,
|
|
254
|
+
* kein neuer Vorgang. Das Ergebnis hat dieselbe Form wie das von [pay].
|
|
255
|
+
*
|
|
256
|
+
* Entschieden wird nur, was nach [HpsClarifyOptions.previous] feststeht
|
|
257
|
+
* ([nachfrageRegel]):
|
|
258
|
+
*
|
|
259
|
+
* | bisher | `'0'` | `9011` | andere Ablehnung |
|
|
260
|
+
* |---|---|---|---|
|
|
261
|
+
* | `'beforeResolve'`, oder offen ohne Stoerung beim Host | `approved` | `declined` | `declined` |
|
|
262
|
+
* | Stoerung beim Host, Storno sicher versucht (`hostFault`, `hostTimeout`) | offen | `declined` | offen |
|
|
263
|
+
* | andere Stoerung beim Host | offen | offen | offen |
|
|
264
|
+
* | `null` oder Ergebnis einer Nachfrage (`clarified`) | offen | offen | offen |
|
|
265
|
+
*
|
|
266
|
+
* Nach einer Stoerung beim Host kann die Klaerung von [pay] ein Storno
|
|
267
|
+
* nachgeschickt haben -- auch wenn der erste Code keines verlangte, denn
|
|
268
|
+
* ein spaeterer Status kann es noch ausloesen. Ein `'0'` beweist dann
|
|
269
|
+
* nichts (siehe Klassendoku, "Storno nach ausbleibender Host-Antwort").
|
|
270
|
+
* `9011` (aufgehoben) heisst nur dann sicher "nichts belastet", wenn ein
|
|
271
|
+
* Storno sicher versucht wurde -- wie in der Klaerung von [pay]. `9027`
|
|
272
|
+
* bleibt hier immer ohne Aussage: die Zwei-9027-Regel braucht die Antwort
|
|
273
|
+
* auf die Zahlung selbst. Meldet der Status selbst eine Stoerung beim
|
|
274
|
+
* Host, entscheidet danach nur noch `'0'`.
|
|
275
|
+
*
|
|
276
|
+
* Sagt der Status zweimal in Folge nichts, endet die Nachfrage sofort als
|
|
277
|
+
* `unresolved` -- die Zahlung ist laengst beendet, das Terminal wird es
|
|
278
|
+
* auch spaeter nicht wissen. Budget: ein Sechstel von
|
|
279
|
+
* [HpsPaymentsOptions.resolveBudgetMs] (Vorgabe 15 s).
|
|
280
|
+
*/
|
|
281
|
+
clarifyPayment(options: HpsClarifyOptions): Promise<HpsPaymentResult>;
|
|
228
282
|
}
|
|
229
283
|
export declare function createHpsPayments(client: HpsConnectClient, target: HpsConnectTarget, options?: HpsPaymentsOptions): HpsPayments;
|