@kreiseck/kasseneck-api 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/README.md +70 -0
- package/dist/cjs/client/aufrufe.d.ts +5 -5
- package/dist/cjs/client/aufrufe.js +21 -2
- package/dist/cjs/client/errors.d.ts +1 -1
- package/dist/cjs/client/errors.js +2 -1
- package/dist/cjs/client/receipts.d.ts +9 -1
- package/dist/cjs/client/receipts.js +18 -3
- package/dist/cjs/client/transport.d.ts +3 -3
- package/dist/cjs/client/transport.js +2 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +6 -3
- package/dist/cjs/invoice/index.d.ts +2 -2
- package/dist/cjs/invoice/index.js +3 -1
- package/dist/cjs/invoice/texte.d.ts +5 -5
- package/dist/cjs/invoice/texte.js +10 -10
- package/dist/cjs/invoice/typen.d.ts +13 -2
- package/dist/cjs/invoice/vertrag.d.ts +10 -1
- package/dist/cjs/invoice/vertrag.js +39 -2
- package/dist/cjs/models/cancellation.d.ts +14 -2
- package/dist/cjs/models/cancellation.js +15 -1
- package/dist/cjs/models/cashregister.d.ts +3 -0
- package/dist/cjs/models/cashregister.js +1 -0
- package/dist/cjs/models/index.d.ts +1 -1
- package/dist/cjs/models/index.js +4 -2
- package/dist/cjs/models/payment-errors.d.ts +1 -1
- package/dist/cjs/models/payment-errors.js +1 -0
- package/dist/cjs/models/receipt-email.d.ts +1 -1
- package/dist/cjs/models/receipt-email.js +1 -0
- package/dist/cjs/models/receipt-errors.d.ts +1 -1
- package/dist/cjs/models/receipt-errors.js +1 -0
- package/dist/cjs/models/receipt-item.d.ts +9 -0
- package/dist/cjs/models/receipt-item.js +5 -0
- package/dist/cjs/models/receipt.d.ts +1 -1
- package/dist/cjs/models/receipt.js +6 -1
- package/dist/cjs/pos/artikel.d.ts +14 -0
- package/dist/cjs/pos/artikel.js +13 -2
- package/dist/cjs/pos/errors.d.ts +3 -3
- package/dist/cjs/pos/errors.js +6 -2
- package/dist/cjs/pos/index.d.ts +5 -2
- package/dist/cjs/pos/index.js +13 -2
- package/dist/cjs/pos/lager.d.ts +95 -0
- package/dist/cjs/pos/lager.js +160 -0
- package/dist/cjs/register/errors.d.ts +1 -1
- package/dist/cjs/register/errors.js +1 -0
- package/dist/cjs/register/pairing.d.ts +27 -1
- package/dist/cjs/register/pairing.js +18 -1
- package/dist/cjs/stored/draht.d.ts +4 -2
- package/dist/cjs/stored/draht.js +46 -5
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +5 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/aufrufe.d.ts +5 -5
- package/dist/esm/client/aufrufe.js +21 -2
- package/dist/esm/client/errors.d.ts +1 -1
- package/dist/esm/client/errors.js +2 -1
- package/dist/esm/client/receipts.d.ts +9 -1
- package/dist/esm/client/receipts.js +19 -4
- package/dist/esm/client/transport.d.ts +3 -3
- package/dist/esm/client/transport.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- 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 -5
- package/dist/esm/invoice/texte.js +10 -10
- package/dist/esm/invoice/typen.d.ts +13 -2
- package/dist/esm/invoice/vertrag.d.ts +10 -1
- package/dist/esm/invoice/vertrag.js +38 -1
- package/dist/esm/models/cancellation.d.ts +14 -2
- package/dist/esm/models/cancellation.js +13 -0
- package/dist/esm/models/cashregister.d.ts +3 -0
- package/dist/esm/models/cashregister.js +1 -0
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/esm/models/payment-errors.d.ts +1 -1
- package/dist/esm/models/payment-errors.js +1 -0
- package/dist/esm/models/receipt-email.d.ts +1 -1
- package/dist/esm/models/receipt-email.js +1 -0
- package/dist/esm/models/receipt-errors.d.ts +1 -1
- package/dist/esm/models/receipt-errors.js +1 -0
- package/dist/esm/models/receipt-item.d.ts +9 -0
- package/dist/esm/models/receipt-item.js +5 -0
- package/dist/esm/models/receipt.d.ts +1 -1
- package/dist/esm/models/receipt.js +6 -1
- package/dist/esm/pos/artikel.d.ts +14 -0
- package/dist/esm/pos/artikel.js +13 -3
- package/dist/esm/pos/errors.d.ts +3 -3
- package/dist/esm/pos/errors.js +6 -2
- package/dist/esm/pos/index.d.ts +5 -2
- package/dist/esm/pos/index.js +6 -2
- package/dist/esm/pos/lager.d.ts +95 -0
- package/dist/esm/pos/lager.js +154 -0
- package/dist/esm/register/errors.d.ts +1 -1
- package/dist/esm/register/errors.js +1 -0
- package/dist/esm/register/pairing.d.ts +27 -1
- package/dist/esm/register/pairing.js +17 -1
- package/dist/esm/stored/draht.d.ts +4 -2
- package/dist/esm/stored/draht.js +45 -4
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +5 -3
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api-examples/cancel-error-return-disposition.json +17 -0
- package/fixtures/invoice-api-examples/credit-error-return-disposition.json +26 -0
- package/fixtures/invoice-api-examples/credit-return-disposition.json +23 -0
- package/fixtures/invoice-api-examples/issue-error-return-disposition.json +25 -0
- package/fixtures/invoice-api-examples/issue-error-stock-id.json +27 -0
- package/fixtures/invoice-api-examples/issue-stock.json +22 -0
- package/fixtures/invoice-api.schema.json +37 -1
- package/fixtures/invoice-texts.json +11 -11
- package/fixtures/pos-texts.json +1 -1
- package/fixtures/surface.json +48 -4
- package/fixtures/v3/antworten/belege.json +1 -1
- package/fixtures/v3/antworten/belegmail.json +1 -1
- package/fixtures/v3/antworten/kasse-belege.json +1 -1
- package/fixtures/v3/antworten/kasse.json +662 -3
- 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 +58 -3
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +249 -16
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
|
|
6
6
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
7
|
-
exports.VOKABULAR_QUELLE = "
|
|
7
|
+
exports.VOKABULAR_QUELLE = "b1049e2f65e9261cf8f729481d9ce1e5afda2cf620333f38ae6bf1afb36c8712";
|
|
8
8
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
9
9
|
exports.SCHEMAS = {
|
|
10
10
|
"getReceipt": {
|
|
@@ -222,7 +222,8 @@ exports.SCHEMAS = {
|
|
|
222
222
|
"__": "kasse",
|
|
223
223
|
"visible": "sichtbar",
|
|
224
224
|
"sort": "sort"
|
|
225
|
-
}
|
|
225
|
+
},
|
|
226
|
+
"stockLocationIds": "standorte"
|
|
226
227
|
}
|
|
227
228
|
]
|
|
228
229
|
},
|
|
@@ -259,7 +260,8 @@ exports.ARTIKEL_FELDER = [
|
|
|
259
260
|
"revenueGroupId",
|
|
260
261
|
"active",
|
|
261
262
|
"groupId",
|
|
262
|
-
"tile"
|
|
263
|
+
"tile",
|
|
264
|
+
"stockLocationIds"
|
|
263
265
|
];
|
|
264
266
|
/** Wertkataloge innen (deutsch) -> aussen (englisch). */
|
|
265
267
|
exports.KATALOGE = {
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* umhuellt, muss ihn weiterhin absetzen koennen.
|
|
14
14
|
*/
|
|
15
15
|
import type { TransportBodyFields } from './transport.js';
|
|
16
|
-
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook"];
|
|
16
|
+
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook"];
|
|
17
17
|
export type ApiCall = typeof ALL_CALLS[number];
|
|
18
18
|
/**
|
|
19
19
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -21,20 +21,20 @@ export type ApiCall = typeof ALL_CALLS[number];
|
|
|
21
21
|
* (`fixtures/v3/v3-vokabular.json`, `endpoints.public`, umbenannt nach
|
|
22
22
|
* `names`). Ein Test haelt beide Listen deckungsgleich.
|
|
23
23
|
*/
|
|
24
|
-
export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "cancelReceipt", "sendReceiptEmail", "generateFullReceiptId", "downloadReceipt", "getFirstReceiptDate", "getReportV2", "downloadReport", "downloadDailyReport", "createPaymentLinkStripe", "stripeCaptureIntent", "hobexPayApi", "hobexRefundApi", "hobexGetStatus", "financeWebService", "listMyTipRecipients", "getPartnerInfo", "createPartnerCustomer", "checkPartnerCustomerEmail", "listPartnerCustomers", "getPartnerCustomer", "sendPartnerCustomerFonLink", "createPartnerWebhook", "updatePartnerWebhook", "deletePartnerWebhook", "listPartnerWebhooks", "sendPartnerWebhookTest", "rotatePartnerWebhookSecret", "listPartnerWebhookDeliveries", "requestCustomerSignature", "getCustomerSignatureStatus", "createCustomerCashregister", "activateCashregister", "listCustomerCashregisters", "getCustomerCredentials", "reportCustomerContract", "createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml", "getInvoiceSetupStatus", "listBrands", "recordInvoicePayment"];
|
|
24
|
+
export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "cancelReceipt", "sendReceiptEmail", "generateFullReceiptId", "downloadReceipt", "getFirstReceiptDate", "getReportV2", "downloadReport", "downloadDailyReport", "createPaymentLinkStripe", "stripeCaptureIntent", "hobexPayApi", "hobexRefundApi", "hobexGetStatus", "financeWebService", "listMyTipRecipients", "getPartnerInfo", "createPartnerCustomer", "checkPartnerCustomerEmail", "listPartnerCustomers", "getPartnerCustomer", "sendPartnerCustomerFonLink", "createPartnerWebhook", "updatePartnerWebhook", "deletePartnerWebhook", "listPartnerWebhooks", "sendPartnerWebhookTest", "rotatePartnerWebhookSecret", "listPartnerWebhookDeliveries", "requestCustomerSignature", "getCustomerSignatureStatus", "createCustomerCashregister", "activateCashregister", "listCustomerCashregisters", "getCustomerCredentials", "reportCustomerContract", "getPartnerBilling", "getPartnerBillingMonth", "createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml", "getInvoiceSetupStatus", "listBrands", "recordInvoicePayment", "createInvoiceItem", "updateInvoiceItem", "withdrawInvoiceItem", "getInvoiceItem", "listInvoiceItems", "setCustomerMandate", "revokeCustomerMandate"];
|
|
25
25
|
/**
|
|
26
26
|
* Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
|
|
27
27
|
* Web-Kasse: gleicher Ursprung `/api/v3`), in der Reihenfolge von
|
|
28
28
|
* `endpoints.register`. Sechs davon sind zugleich oeffentlich; die Kasse ruft
|
|
29
29
|
* sie trotzdem ueber diesen Weg (ein Dialekt je Client, Nachtrag §5.2).
|
|
30
30
|
*/
|
|
31
|
-
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients"];
|
|
31
|
+
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation"];
|
|
32
32
|
export type PublicCall = typeof PUBLIC_CALLS[number];
|
|
33
33
|
export type PosCall = typeof POS_CALLS[number];
|
|
34
|
-
/** Einer der
|
|
34
|
+
/** Einer der 28 Aufrufe des Kassenwegs. */
|
|
35
35
|
export declare function isPosCall(name: string): boolean;
|
|
36
36
|
/**
|
|
37
|
-
* Nur ueber den Kassenweg erreichbar (
|
|
37
|
+
* Nur ueber den Kassenweg erreichbar (22 Namen): unter `api.kasseneck.at/v3`
|
|
38
38
|
* gibt es sie nicht. Der Transport schickt sie darum ohne eigene Basis an
|
|
39
39
|
* [POS_BASE_URL] statt an die oeffentliche Basis.
|
|
40
40
|
*/
|
|
@@ -42,6 +42,8 @@ export const ALL_CALLS = [
|
|
|
42
42
|
'listMyCashregisters',
|
|
43
43
|
'listMyPrinters',
|
|
44
44
|
'listMyReceipts',
|
|
45
|
+
'listMyStock',
|
|
46
|
+
'listMyStockLocations',
|
|
45
47
|
'listMyTipRecipients',
|
|
46
48
|
'listPartnerCustomers',
|
|
47
49
|
'listPartnerWebhookDeliveries',
|
|
@@ -59,6 +61,7 @@ export const ALL_CALLS = [
|
|
|
59
61
|
'sendPartnerCustomerFonLink',
|
|
60
62
|
'sendPartnerWebhookTest',
|
|
61
63
|
'sendReceiptEmail',
|
|
64
|
+
'setMyCashregisterStockLocation',
|
|
62
65
|
'setMyKasseLogo',
|
|
63
66
|
'setMyKasseSettings',
|
|
64
67
|
'setMyRegisterDeviceSettings',
|
|
@@ -112,6 +115,8 @@ export const PUBLIC_CALLS = [
|
|
|
112
115
|
'listCustomerCashregisters',
|
|
113
116
|
'getCustomerCredentials',
|
|
114
117
|
'reportCustomerContract',
|
|
118
|
+
'getPartnerBilling',
|
|
119
|
+
'getPartnerBillingMonth',
|
|
115
120
|
'createCustomer',
|
|
116
121
|
'getCustomer',
|
|
117
122
|
'updateCustomer',
|
|
@@ -126,6 +131,16 @@ export const PUBLIC_CALLS = [
|
|
|
126
131
|
'getInvoiceSetupStatus',
|
|
127
132
|
'listBrands',
|
|
128
133
|
'recordInvoicePayment',
|
|
134
|
+
// Rechnungskorb und SEPA-Mandate (Backend keck#557): nur die Namen, damit
|
|
135
|
+
// die Liste dem Vertrag folgt; umhuellt sind sie in diesem Paket noch nicht
|
|
136
|
+
// (der offene Transport nimmt jeden Namen).
|
|
137
|
+
'createInvoiceItem',
|
|
138
|
+
'updateInvoiceItem',
|
|
139
|
+
'withdrawInvoiceItem',
|
|
140
|
+
'getInvoiceItem',
|
|
141
|
+
'listInvoiceItems',
|
|
142
|
+
'setCustomerMandate',
|
|
143
|
+
'revokeCustomerMandate',
|
|
129
144
|
];
|
|
130
145
|
/**
|
|
131
146
|
* Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
|
|
@@ -159,16 +174,20 @@ export const POS_CALLS = [
|
|
|
159
174
|
'createPrintJob',
|
|
160
175
|
'getPrintJob',
|
|
161
176
|
'listMyTipRecipients',
|
|
177
|
+
// Lager an der Kasse (Lager-Kern Stufe 2): nur ueber den Kassenweg.
|
|
178
|
+
'listMyStockLocations',
|
|
179
|
+
'listMyStock',
|
|
180
|
+
'setMyCashregisterStockLocation',
|
|
162
181
|
];
|
|
163
182
|
const OEFFENTLICH = new Set(PUBLIC_CALLS);
|
|
164
183
|
const KASSENWEG = new Set(POS_CALLS);
|
|
165
184
|
const NUR_KASSE = new Set(POS_CALLS.filter((name) => !OEFFENTLICH.has(name)));
|
|
166
|
-
/** Einer der
|
|
185
|
+
/** Einer der 28 Aufrufe des Kassenwegs. */
|
|
167
186
|
export function isPosCall(name) {
|
|
168
187
|
return KASSENWEG.has(name);
|
|
169
188
|
}
|
|
170
189
|
/**
|
|
171
|
-
* Nur ueber den Kassenweg erreichbar (
|
|
190
|
+
* Nur ueber den Kassenweg erreichbar (22 Namen): unter `api.kasseneck.at/v3`
|
|
172
191
|
* gibt es sie nicht. Der Transport schickt sie darum ohne eigene Basis an
|
|
173
192
|
* [POS_BASE_URL] statt an die oeffentliche Basis.
|
|
174
193
|
*/
|
|
@@ -117,7 +117,7 @@ export type ErrorOutcome = 'unknown' | 'rejected';
|
|
|
117
117
|
* v3, `errorCodes`; dieselbe Liste wie `paymentCallRejectedCodes` im
|
|
118
118
|
* Dart-Zwilling):
|
|
119
119
|
*
|
|
120
|
-
* - `errorCodes.auth` ohne die sieben des Partner-Zugangs (
|
|
120
|
+
* - `errorCodes.auth` ohne die sieben des Partner-Zugangs (19 Codes):
|
|
121
121
|
* Anmeldung und Pruefung in `checkRequest` laufen vor jeder Zeile des
|
|
122
122
|
* Handlers; `validation` heisst dort Pflichtfeld fehlt oder falscher Typ.
|
|
123
123
|
* Der Partner-Zugang trifft diese `api_key`-Aufrufe mit Kassen-Token nie.
|
|
@@ -231,7 +231,7 @@ const GELDWEGE = new Set(['hobexPayApi', 'hobexRefundApi', 'stripeCaptureIntent'
|
|
|
231
231
|
* v3, `errorCodes`; dieselbe Liste wie `paymentCallRejectedCodes` im
|
|
232
232
|
* Dart-Zwilling):
|
|
233
233
|
*
|
|
234
|
-
* - `errorCodes.auth` ohne die sieben des Partner-Zugangs (
|
|
234
|
+
* - `errorCodes.auth` ohne die sieben des Partner-Zugangs (19 Codes):
|
|
235
235
|
* Anmeldung und Pruefung in `checkRequest` laufen vor jeder Zeile des
|
|
236
236
|
* Handlers; `validation` heisst dort Pflichtfeld fehlt oder falscher Typ.
|
|
237
237
|
* Der Partner-Zugang trifft diese `api_key`-Aufrufe mit Kassen-Token nie.
|
|
@@ -260,6 +260,7 @@ export const PAYMENT_CALL_REJECTED_CODES = Object.freeze([
|
|
|
260
260
|
'cashregister_not_found',
|
|
261
261
|
'account_not_found',
|
|
262
262
|
'live_not_enabled',
|
|
263
|
+
'api_not_approved', // Live-API ohne Freigabe (Entwicklerbereich): vor dem Handler abgewiesen
|
|
263
264
|
'unauthorized',
|
|
264
265
|
'mfa_required',
|
|
265
266
|
'user_verification_failed',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReceiptType, type ReceiptTypeKey, KeckPaymentMethod, type KeckPaymentMethodKey } from '../enums/index.js';
|
|
2
|
-
import { type Receipt, type ReceiptCompany, type ReceiptItem, type Voucher, type ReceiptSummary, type ReportMonth, type CancellationItem, type CancellationOf, type CancellationReason, type ReceiptPaymentInput, type RegistrationInfo, type ReceiptEmailVia } from '../models/index.js';
|
|
2
|
+
import { type Receipt, type ReceiptCompany, type ReceiptItem, type Voucher, type ReceiptSummary, type ReportMonth, type CancellationItem, type CancellationOf, type CancellationReason, type ReturnDisposition, type ReceiptPaymentInput, type RegistrationInfo, type ReceiptEmailVia } from '../models/index.js';
|
|
3
3
|
import type { InternerTransport } from './aufrufe.js';
|
|
4
4
|
import { type ReceiptLayout } from '../receipt/layout.js';
|
|
5
5
|
import type { PosPaperSize } from '../printing/escpos.js';
|
|
@@ -114,6 +114,14 @@ export type CancelReceiptOptions = {
|
|
|
114
114
|
items?: CancellationItem[];
|
|
115
115
|
/** Interne Anmerkung (≤ 200 Zeichen), wird gespeichert, nie gedruckt. */
|
|
116
116
|
note?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Wohin die Ware der stornierten Artikelzeilen geht (Lager-Kern Stufe 2):
|
|
119
|
+
* Vorgabe fuer alle Positionen, je Position abweichend ueber
|
|
120
|
+
* `items[].returnDisposition`. Fehlt beides, bucht der Server `restock`.
|
|
121
|
+
* Zeilen ohne `articleId` bucht er nie. Ein falscher Wert geht nicht hinaus;
|
|
122
|
+
* der Server meldete ihn als `invalid_return_disposition`.
|
|
123
|
+
*/
|
|
124
|
+
returnDisposition?: ReturnDisposition;
|
|
117
125
|
/**
|
|
118
126
|
* Rueckzahlung je Zahlung (Betraege negativ, `refundOf` = `id` der
|
|
119
127
|
* Originalzahlung). Ohne Angabe spiegelt der Server die Restbetraege jeder
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReceiptType, KeckPaymentMethod, CreditCardProvider, VoucherAction, VoucherType, } from '../enums/index.js';
|
|
2
|
-
import { fromReceiptCompanyPayload, fromReceiptPayload, toReceiptItemPayload, toVoucherPayload, receiptItemIsValid, voucherIsValid, fromReceiptSummaryPayload, isCancellationReason, RECEIPT_EMAIL_VIAS, readRegistrationInfo, } from '../models/index.js';
|
|
2
|
+
import { fromReceiptCompanyPayload, fromReceiptPayload, toReceiptItemPayload, toVoucherPayload, receiptItemIsValid, voucherIsValid, fromReceiptSummaryPayload, isCancellationReason, isReturnDisposition, RETURN_DISPOSITIONS, RECEIPT_EMAIL_VIAS, readRegistrationInfo, } from '../models/index.js';
|
|
3
3
|
import { parseServerTimeStamp, toViennaWallClock } from '../vienna-time.js';
|
|
4
4
|
import { euroToCents } from '../money.js';
|
|
5
5
|
import { KasseneckValidationError, isKasseneckApiError, signiertGelesen } from './errors.js';
|
|
@@ -133,6 +133,12 @@ export function sellReceiptWithCompany(transport, options) {
|
|
|
133
133
|
return createReceiptWithCompany(transport, { ...options, receiptType: ReceiptType.standard });
|
|
134
134
|
}
|
|
135
135
|
const NOTE_MAX = 200;
|
|
136
|
+
/** Prueft eine Rueckgabe-Wahl (Vorgabe oder Position); `pfad` nennt das Feld in der Meldung. */
|
|
137
|
+
function pruefeRueckgabeWahl(wert, pfad) {
|
|
138
|
+
if (wert !== undefined && !isReturnDisposition(wert)) {
|
|
139
|
+
throw new KasseneckValidationError('cancelReceipt', `${pfad}: erlaubt sind ${RETURN_DISPOSITIONS.join(', ')}`, 'request');
|
|
140
|
+
}
|
|
141
|
+
}
|
|
136
142
|
/**
|
|
137
143
|
* Storno-Beleg zu einem bestehenden Beleg — voll oder in Teilen. Prueft die
|
|
138
144
|
* Eingabe, bevor etwas hinausgeht; der Server haelt die Restmengen und die
|
|
@@ -151,14 +157,16 @@ export async function cancelReceipt(transport, options) {
|
|
|
151
157
|
if (!isCancellationReason(options.reason)) {
|
|
152
158
|
throw new KasseneckValidationError('cancelReceipt', 'Storno-Grund fehlt oder ist unbekannt', 'request');
|
|
153
159
|
}
|
|
160
|
+
pruefeRueckgabeWahl(options.returnDisposition, 'returnDisposition');
|
|
154
161
|
if (options.items !== undefined) {
|
|
155
162
|
if (!Array.isArray(options.items) || options.items.length === 0) {
|
|
156
163
|
throw new KasseneckValidationError('cancelReceipt', 'items muss eine nicht leere Liste sein', 'request');
|
|
157
164
|
}
|
|
158
|
-
for (const pos of options.items) {
|
|
165
|
+
for (const [i, pos] of options.items.entries()) {
|
|
159
166
|
if (!Number.isInteger(pos.index) || pos.index < 0 || !Number.isInteger(pos.quantity) || pos.quantity < 1) {
|
|
160
167
|
throw new KasseneckValidationError('cancelReceipt', 'Storno-Menge muss eine ganze Zahl >= 1 sein', 'request');
|
|
161
168
|
}
|
|
169
|
+
pruefeRueckgabeWahl(pos.returnDisposition, `items[${i}].returnDisposition`);
|
|
162
170
|
}
|
|
163
171
|
}
|
|
164
172
|
if (options.note !== undefined && options.note.length > NOTE_MAX) {
|
|
@@ -173,8 +181,15 @@ export async function cancelReceipt(transport, options) {
|
|
|
173
181
|
if (zahlungen !== undefined)
|
|
174
182
|
pruefeKartenRueckbuchung(zahlungen, options.receipt);
|
|
175
183
|
const params = { cashregisterId, originalReceiptId, reason: options.reason };
|
|
176
|
-
if (options.items !== undefined)
|
|
177
|
-
params.items = options.items.map((p) => ({
|
|
184
|
+
if (options.items !== undefined) {
|
|
185
|
+
params.items = options.items.map((p) => ({
|
|
186
|
+
index: p.index,
|
|
187
|
+
quantity: p.quantity,
|
|
188
|
+
...(p.returnDisposition !== undefined ? { returnDisposition: p.returnDisposition } : {}),
|
|
189
|
+
}));
|
|
190
|
+
}
|
|
191
|
+
if (options.returnDisposition !== undefined)
|
|
192
|
+
params.returnDisposition = options.returnDisposition;
|
|
178
193
|
if (options.note !== undefined && options.note !== '')
|
|
179
194
|
params.note = options.note;
|
|
180
195
|
if (zahlungen !== undefined)
|
|
@@ -85,16 +85,16 @@ export interface TransportOptions {
|
|
|
85
85
|
auth: KasseneckAuth;
|
|
86
86
|
/**
|
|
87
87
|
* Abweichende Basis der **oeffentlichen** Aufrufe (Vorgabe
|
|
88
|
-
* [DEFAULT_BASE_URL]): alles ausser den
|
|
88
|
+
* [DEFAULT_BASE_URL]): alles ausser den 28 Aufrufen des Kassenwegs, und die
|
|
89
89
|
* sechs oeffentlichen davon nur, wenn nicht mit `registerUserAuth`
|
|
90
90
|
* angemeldet. Muss auf `/v3` enden (eigene Proxys erlaubt), sonst wirft das
|
|
91
91
|
* Anlegen; `/v1` oder `/api` gibt es in der 1.x-Linie nicht.
|
|
92
92
|
*/
|
|
93
93
|
baseUrl?: string;
|
|
94
94
|
/**
|
|
95
|
-
* Abweichende Basis des **Kassenwegs** (Vorgabe [POS_BASE_URL]): die
|
|
95
|
+
* Abweichende Basis des **Kassenwegs** (Vorgabe [POS_BASE_URL]): die 22
|
|
96
96
|
* reinen Kassenaufrufe (Kopplung, Anmeldung, Einstellungen, Artikel,
|
|
97
|
-
* Drucker, ...) und mit `registerUserAuth` alle
|
|
97
|
+
* Drucker, ...) und mit `registerUserAuth` alle 28 Aufrufe des Kassenwegs.
|
|
98
98
|
* Die Web-Kasse gibt `'/api/v3'` (gleicher Ursprung). Muss auf `/v3` enden
|
|
99
99
|
* (in der Regel `/api/v3`), sonst wirft das Anlegen.
|
|
100
100
|
*/
|
|
@@ -118,9 +118,9 @@ function createCore(options) {
|
|
|
118
118
|
pruefeKennung(kennung);
|
|
119
119
|
const kopfzeilenSenden = options.omitKasseneckHeaders !== true;
|
|
120
120
|
/**
|
|
121
|
-
* Basis je Aufruf. Die
|
|
121
|
+
* Basis je Aufruf. Die 22 reinen Kassenaufrufe gehen immer an den
|
|
122
122
|
* Kassenweg (unter der oeffentlichen Basis gibt es sie nicht), und die
|
|
123
|
-
* Kassen-Anmeldung ruft alle
|
|
123
|
+
* Kassen-Anmeldung ruft alle 28 Aufrufe des Kassenwegs dort, auch die sechs
|
|
124
124
|
* oeffentlichen (Kanal `app`). Was der Kassenweg gar nicht fuehrt
|
|
125
125
|
* (Berichte, Zahlungen, FinanzOnline), geht an die oeffentliche Basis.
|
|
126
126
|
*/
|
package/dist/esm/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
|
-
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, type Voucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
2
|
+
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, type Voucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, 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 KasseneckTransport, type KasseneckBinaryTransport, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, downloadDailyReport, downloadMonthlyReport, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
|
|
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, } from './pos/index.js';
|
|
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, } from './pos/index.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ReceiptType, VatRate, KeckPaymentMethod, CreditCardProvider, VoucherType, VoucherAction, StripeLinkMode, } from './enums/index.js';
|
|
2
|
-
export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
2
|
+
export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
3
3
|
export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, createTransport, createBinaryTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, listMyCashregisters, checkVoucherCombinationError, sendReceiptEmail, downloadDailyReport, downloadMonthlyReport, getReportV2, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock } from './vienna-time.js';
|
|
6
|
-
export { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, } from './pos/index.js';
|
|
6
|
+
export { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, } from './pos/index.js';
|
|
@@ -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, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, 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, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, 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, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, type InvoiceEndpoint, type InvoiceErrorCode, type InvoiceRequestErrorCode, type CreditNoteReason, 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, 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';
|
|
@@ -17,4 +17,4 @@ export { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoic
|
|
|
17
17
|
export { INVOICE_TEXTS, invoiceText } from './texte.js';
|
|
18
18
|
export { computeInvoiceTotals, ZERO_RATED_TAX_SCHEMES } from './summen.js';
|
|
19
19
|
export { proratedPriceMicros, MAX_AMOUNT_CENTS, itemFromEuro, formatUnitPrice, CalcError, calculateInvoice, roundDiv, vatRateMapKey, formatVatRate, } from './calc.js';
|
|
20
|
-
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, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, } from './vertrag.js';
|
|
20
|
+
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, CREDIT_NOTE_ITEM_FIELDS, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, } from './vertrag.js';
|
|
@@ -50,7 +50,7 @@ declare const DE: {
|
|
|
50
50
|
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.";
|
|
51
51
|
readonly 'tax.export_third_country': "Steuerfreie Ausfuhrlieferung (§ 6 Abs. 1 Z 1 UStG).";
|
|
52
52
|
readonly 'tax.reverse_charge.title': "Steuerschuldnerschaft des Leistungsempfängers. ";
|
|
53
|
-
readonly 'tax.reverse_charge.text': "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei
|
|
53
|
+
readonly 'tax.reverse_charge.text': "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei – die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.";
|
|
54
54
|
readonly 'tax.vat_id_line': "UID Leistungserbringer: {seller} · UID Leistungsempfänger: {buyer}";
|
|
55
55
|
readonly 'tax.reverse_charge_reason.construction': "Bauleistung gemäß § 19 Abs. 1a UStG.";
|
|
56
56
|
readonly 'tax.reverse_charge_reason.scrap': "Schrott und Abfallstoffe gemäß Schrott-Umsatzsteuerverordnung (BGBl. II Nr. 129/2007).";
|
|
@@ -86,7 +86,7 @@ declare const DE: {
|
|
|
86
86
|
readonly 'pdf.direct_debit.account': "Konto";
|
|
87
87
|
readonly 'pdf.direct_debit.mandate_reference': "Mandatsreferenz";
|
|
88
88
|
readonly 'pdf.direct_debit.mandate_date': "Mandat vom";
|
|
89
|
-
readonly 'pdf.direct_debit.warning': "Bitte für Deckung sorgen
|
|
89
|
+
readonly 'pdf.direct_debit.warning': "Bitte für Deckung sorgen – die Kosten einer Rücklastschrift werden weiterverrechnet.";
|
|
90
90
|
readonly 'pdf.refund.text': "Der Betrag wird auf dem ursprünglichen Zahlungsweg erstattet. Sie müssen nichts veranlassen.";
|
|
91
91
|
readonly 'pdf.refund.reference': "Bezug";
|
|
92
92
|
readonly 'pdf.refund.amount': "Erstattungsbetrag";
|
|
@@ -97,7 +97,7 @@ declare const DE: {
|
|
|
97
97
|
readonly 'pdf.footer.contact': "Kontakt";
|
|
98
98
|
readonly 'pdf.footer.register': "Register & Steuer";
|
|
99
99
|
readonly 'pdf.footer.registered_office': "Sitz: {place}";
|
|
100
|
-
readonly 'pdf.footer.note': "Erstellt mit Kasseneck
|
|
100
|
+
readonly 'pdf.footer.note': "Erstellt mit Kasseneck – ein Produkt der Kreiseck";
|
|
101
101
|
readonly 'pdf.page': "Seite {number} / {total}";
|
|
102
102
|
readonly 'country.AT': "Österreich";
|
|
103
103
|
readonly 'country.DE': "Deutschland";
|
|
@@ -113,9 +113,9 @@ declare const DE: {
|
|
|
113
113
|
readonly 'credit_note.reason.incorrect_invoice': "Fehlerhafte Rechnung";
|
|
114
114
|
readonly 'credit_note.reason.other': "Sonstiges";
|
|
115
115
|
readonly 'einvoice.exemption.reverse_charge': "Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge)";
|
|
116
|
-
readonly 'einvoice.exemption.small_business': "Steuerbefreit
|
|
116
|
+
readonly 'einvoice.exemption.small_business': "Steuerbefreit – Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG";
|
|
117
117
|
readonly 'einvoice.exemption.intra_community_supply': "Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG";
|
|
118
|
-
readonly 'einvoice.exemption.outside_scope': "Nicht steuerbarer Umsatz
|
|
118
|
+
readonly 'einvoice.exemption.outside_scope': "Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
|
|
119
119
|
readonly 'einvoice.exemption.export_third_country': "Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG";
|
|
120
120
|
readonly 'einvoice.payable_until': "Zahlbar bis {date}";
|
|
121
121
|
readonly 'unit_symbol.piece': "Stk";
|
|
@@ -37,7 +37,7 @@ const DE = {
|
|
|
37
37
|
// wortgleich in Art. 226 Nr. 11a MwSt-RL). „Steuerfrei" waere sachlich falsch
|
|
38
38
|
// und erbraechte den vorgeschriebenen Hinweis nicht.
|
|
39
39
|
'tax.reverse_charge.title': 'Steuerschuldnerschaft des Leistungsempfängers. ',
|
|
40
|
-
'tax.reverse_charge.text': 'Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei
|
|
40
|
+
'tax.reverse_charge.text': 'Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei – die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.',
|
|
41
41
|
// Beide UID-Nummern: bei Reverse Charge § 11 Abs. 1a, bei der ig. Lieferung
|
|
42
42
|
// Art. 11 Abs. 2 UStG.
|
|
43
43
|
'tax.vat_id_line': 'UID Leistungserbringer: {seller} · UID Leistungsempfänger: {buyer}',
|
|
@@ -77,7 +77,7 @@ const DE = {
|
|
|
77
77
|
'pdf.direct_debit.account': 'Konto',
|
|
78
78
|
'pdf.direct_debit.mandate_reference': 'Mandatsreferenz',
|
|
79
79
|
'pdf.direct_debit.mandate_date': 'Mandat vom',
|
|
80
|
-
'pdf.direct_debit.warning': 'Bitte für Deckung sorgen
|
|
80
|
+
'pdf.direct_debit.warning': 'Bitte für Deckung sorgen – die Kosten einer Rücklastschrift werden weiterverrechnet.',
|
|
81
81
|
'pdf.refund.text': 'Der Betrag wird auf dem ursprünglichen Zahlungsweg erstattet. Sie müssen nichts veranlassen.',
|
|
82
82
|
'pdf.refund.reference': 'Bezug',
|
|
83
83
|
'pdf.refund.amount': 'Erstattungsbetrag',
|
|
@@ -88,7 +88,7 @@ const DE = {
|
|
|
88
88
|
'pdf.footer.contact': 'Kontakt',
|
|
89
89
|
'pdf.footer.register': 'Register & Steuer',
|
|
90
90
|
'pdf.footer.registered_office': 'Sitz: {place}',
|
|
91
|
-
'pdf.footer.note': 'Erstellt mit Kasseneck
|
|
91
|
+
'pdf.footer.note': 'Erstellt mit Kasseneck – ein Produkt der Kreiseck',
|
|
92
92
|
'pdf.page': 'Seite {number} / {total}',
|
|
93
93
|
'country.AT': 'Österreich',
|
|
94
94
|
'country.DE': 'Deutschland',
|
|
@@ -104,9 +104,9 @@ const DE = {
|
|
|
104
104
|
'credit_note.reason.incorrect_invoice': 'Fehlerhafte Rechnung',
|
|
105
105
|
'credit_note.reason.other': 'Sonstiges',
|
|
106
106
|
'einvoice.exemption.reverse_charge': 'Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge)',
|
|
107
|
-
'einvoice.exemption.small_business': 'Steuerbefreit
|
|
107
|
+
'einvoice.exemption.small_business': 'Steuerbefreit – Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG',
|
|
108
108
|
'einvoice.exemption.intra_community_supply': 'Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG',
|
|
109
|
-
'einvoice.exemption.outside_scope': 'Nicht steuerbarer Umsatz
|
|
109
|
+
'einvoice.exemption.outside_scope': 'Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
|
|
110
110
|
'einvoice.exemption.export_third_country': 'Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG',
|
|
111
111
|
'einvoice.payable_until': 'Zahlbar bis {date}',
|
|
112
112
|
'unit_symbol.piece': 'Stk',
|
|
@@ -243,7 +243,7 @@ const EN = {
|
|
|
243
243
|
'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.',
|
|
244
244
|
'tax.export_third_country': 'VAT-exempt export delivery (§ 6 (1) no. 1 UStG).',
|
|
245
245
|
'tax.reverse_charge.title': 'Reverse charge – VAT liability of the recipient. ',
|
|
246
|
-
'tax.reverse_charge.text': 'VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt
|
|
246
|
+
'tax.reverse_charge.text': 'VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt – the recipient owes and accounts for the VAT in their country.',
|
|
247
247
|
'tax.vat_id_line': 'VAT ID supplier: {seller} · VAT ID recipient: {buyer}',
|
|
248
248
|
'tax.reverse_charge_reason.construction': 'Construction work pursuant to § 19 (1a) UStG.',
|
|
249
249
|
'tax.reverse_charge_reason.scrap': 'Scrap and waste materials pursuant to the Austrian scrap VAT regulation (BGBl. II No. 129/2007).',
|
|
@@ -279,7 +279,7 @@ const EN = {
|
|
|
279
279
|
'pdf.direct_debit.account': 'Account',
|
|
280
280
|
'pdf.direct_debit.mandate_reference': 'Mandate reference',
|
|
281
281
|
'pdf.direct_debit.mandate_date': 'Mandate date',
|
|
282
|
-
'pdf.direct_debit.warning': 'Please ensure sufficient funds
|
|
282
|
+
'pdf.direct_debit.warning': 'Please ensure sufficient funds – the costs of a returned direct debit will be charged to you.',
|
|
283
283
|
'pdf.refund.text': 'The amount will be refunded via the original payment method. No action is required on your part.',
|
|
284
284
|
'pdf.refund.reference': 'Reference',
|
|
285
285
|
'pdf.refund.amount': 'Refund amount',
|
|
@@ -290,7 +290,7 @@ const EN = {
|
|
|
290
290
|
'pdf.footer.contact': 'Contact',
|
|
291
291
|
'pdf.footer.register': 'Registration & tax',
|
|
292
292
|
'pdf.footer.registered_office': 'Registered office: {place}',
|
|
293
|
-
'pdf.footer.note': 'Created with Kasseneck
|
|
293
|
+
'pdf.footer.note': 'Created with Kasseneck – a Kreiseck product',
|
|
294
294
|
'pdf.page': 'Page {number} / {total}',
|
|
295
295
|
'country.AT': 'Austria',
|
|
296
296
|
'country.DE': 'Germany',
|
|
@@ -306,9 +306,9 @@ const EN = {
|
|
|
306
306
|
'credit_note.reason.incorrect_invoice': 'Incorrect invoice',
|
|
307
307
|
'credit_note.reason.other': 'Other',
|
|
308
308
|
'einvoice.exemption.reverse_charge': 'Reverse charge – VAT liability of the recipient',
|
|
309
|
-
'einvoice.exemption.small_business': 'VAT exempt
|
|
309
|
+
'einvoice.exemption.small_business': 'VAT exempt – small business pursuant to § 6 (1) no. 27 UStG',
|
|
310
310
|
'einvoice.exemption.intra_community_supply': 'VAT-exempt intra-Community supply pursuant to Art. 6 (1) UStG',
|
|
311
|
-
'einvoice.exemption.outside_scope': 'Outside the scope of VAT
|
|
311
|
+
'einvoice.exemption.outside_scope': 'Outside the scope of VAT – place of supply abroad (§ 3a (6) UStG)',
|
|
312
312
|
'einvoice.exemption.export_third_country': 'VAT-exempt export delivery pursuant to § 6 (1) no. 1 UStG',
|
|
313
313
|
'einvoice.payable_until': 'Payable by {date}',
|
|
314
314
|
'unit_symbol.piece': 'pcs',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Betraege sind ueberall ganze Cent. Datumsangaben sind `YYYY-MM-DD` nach
|
|
6
6
|
* Wiener Kalender.
|
|
7
7
|
*/
|
|
8
|
-
import type { CreditNoteReason, CustomerType, DocType, EInvoiceFormat, EInvoiceMissingCode, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, TaxScheme, VatRatePercent, WriteOffReasonCode } from './vertrag.js';
|
|
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
9
|
export interface CustomerInput {
|
|
10
10
|
type: CustomerType;
|
|
11
11
|
name: string;
|
|
@@ -86,6 +86,13 @@ export interface InvoiceItemInput {
|
|
|
86
86
|
vatRate: VatRatePercent;
|
|
87
87
|
/** Zeilenrabatt in Prozent, hoechstens zwei Nachkommastellen. */
|
|
88
88
|
discountPct?: number;
|
|
89
|
+
/** Artikel aus dem Artikelstamm; bestandsgefuehrt bucht das Ausstellen ihn vom Lager ab. */
|
|
90
|
+
articleId?: string;
|
|
91
|
+
}
|
|
92
|
+
/** Eine Gutschriftsposition: wie eine Rechnungsposition, dazu die Rueckgabe-Wahl. */
|
|
93
|
+
export interface CreditNoteItemInput extends InvoiceItemInput {
|
|
94
|
+
/** Wohin die Ware dieser Position geht; fehlt = Vorgabe des Aufrufs bzw. `restock`. */
|
|
95
|
+
returnDisposition?: ReturnDisposition;
|
|
89
96
|
}
|
|
90
97
|
export interface IssueInvoiceRequest {
|
|
91
98
|
/** Pflicht: dieselbe Anfrage mit demselben Schluessel erzeugt nie eine zweite Rechnung. */
|
|
@@ -115,6 +122,8 @@ export interface IssueInvoiceRequest {
|
|
|
115
122
|
language?: InvoiceLanguage;
|
|
116
123
|
/** Marke (Kennung aus `listBrands`); sonst die Standardmarke. Unbekannt = `brand_not_found`. */
|
|
117
124
|
brandId?: string;
|
|
125
|
+
/** Lager-Standort fuer bestandsgefuehrte Positionen; sonst der Standard-Standort. */
|
|
126
|
+
stockLocationId?: string;
|
|
118
127
|
/**
|
|
119
128
|
* Schon bezahlt (Shop kassiert online, Rechnung folgt). Die Zahlung entsteht
|
|
120
129
|
* in derselben Transaktion wie das Festschreiben: das PDF traegt dann keine
|
|
@@ -175,9 +184,11 @@ export interface CancelInvoiceRequest {
|
|
|
175
184
|
invoiceId: string;
|
|
176
185
|
reason: CreditNoteReason;
|
|
177
186
|
note?: string;
|
|
187
|
+
/** Wohin die Ware bestandsgefuehrter Positionen geht; fehlt = `restock`. */
|
|
188
|
+
returnDisposition?: ReturnDisposition;
|
|
178
189
|
}
|
|
179
190
|
export interface CreditNoteRequest extends CancelInvoiceRequest {
|
|
180
|
-
items:
|
|
191
|
+
items: CreditNoteItemInput[];
|
|
181
192
|
}
|
|
182
193
|
/**
|
|
183
194
|
* Summen einer Rechnung in Cent, **immer positiv** — auch bei einer Gutschrift
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
* Beschrieben wird die Anfrage. Was der Server daraus macht — Rechnungsdatum,
|
|
18
18
|
* Nummer, Summen — ist bewusst **nicht** setzbar.
|
|
19
19
|
*/
|
|
20
|
+
import { RETURN_DISPOSITIONS } from '../models/cancellation.js';
|
|
21
|
+
export { RETURN_DISPOSITIONS };
|
|
22
|
+
export type { ReturnDisposition } from '../models/cancellation.js';
|
|
20
23
|
export declare const INVOICE_CONTRACT_VERSION = 2;
|
|
21
24
|
export declare const INVOICE_ENDPOINTS: readonly ["createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml", "getInvoiceSetupStatus", "listBrands", "recordInvoicePayment"];
|
|
22
25
|
export type InvoiceEndpoint = (typeof INVOICE_ENDPOINTS)[number];
|
|
@@ -34,7 +37,7 @@ export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
|
|
|
34
37
|
* genau der Katalog des Servers (das Backend vergleicht ihn mit dem Schema);
|
|
35
38
|
* die Helfer in `./invoice` erkennen beide Listen.
|
|
36
39
|
*/
|
|
37
|
-
export declare const INVOICE_REQUEST_ERROR_CODES: readonly ["account_not_found", "admin_required", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing"];
|
|
40
|
+
export declare const INVOICE_REQUEST_ERROR_CODES: readonly ["account_not_found", "admin_required", "api_not_approved", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing"];
|
|
38
41
|
export type InvoiceRequestErrorCode = (typeof INVOICE_REQUEST_ERROR_CODES)[number];
|
|
39
42
|
/** Gruende einer Gutschrift. Der Server druckt den deutschen Anzeigetext. */
|
|
40
43
|
export declare const CREDIT_NOTE_REASONS: readonly ["cancellation", "price_reduction", "return", "incorrect_invoice", "other"];
|
|
@@ -269,6 +272,12 @@ export declare const CUSTOMER_FIELDS: Readonly<Record<string, Field>>;
|
|
|
269
272
|
export declare const ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
270
273
|
/** Genau einer der beiden Preise je Position (§ 9.1). */
|
|
271
274
|
export declare const ITEM_PRICE_EXACTLY_ONE: readonly (readonly string[])[];
|
|
275
|
+
/**
|
|
276
|
+
* Eine Gutschriftsposition: die Rechnungsposition plus `returnDisposition`
|
|
277
|
+
* (wohin die zurueckgenommene Ware geht). An einer Rechnungsposition weist der
|
|
278
|
+
* Server das Feld als unbekannt ab.
|
|
279
|
+
*/
|
|
280
|
+
export declare const CREDIT_NOTE_ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
272
281
|
/**
|
|
273
282
|
* Eine Zahlung zu einer Rechnung. Ohne `amountCents` gilt der volle
|
|
274
283
|
* Bruttobetrag, ohne `paidAt` der heutige Wiener Tag. `reference` ist die
|