@kreiseck/kasseneck-api 1.7.1 → 1.10.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 +113 -0
- package/README.md +170 -1
- package/dist/cjs/client/api.d.ts +5 -3
- package/dist/cjs/client/api.js +1 -0
- package/dist/cjs/client/aufrufe.d.ts +9 -7
- package/dist/cjs/client/aufrufe.js +60 -2
- package/dist/cjs/client/errors.js +3 -0
- package/dist/cjs/client/index.d.ts +2 -2
- package/dist/cjs/client/index.js +3 -1
- package/dist/cjs/client/reports.d.ts +26 -0
- package/dist/cjs/client/reports.js +47 -0
- package/dist/cjs/client/transport.d.ts +27 -3
- package/dist/cjs/client/transport.js +29 -3
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/inventory/api.d.ts +21 -2
- package/dist/cjs/inventory/api.js +22 -3
- package/dist/cjs/inventory/fehler.d.ts +6 -0
- package/dist/cjs/inventory/fehler.js +12 -0
- package/dist/cjs/inventory/index.d.ts +6 -4
- package/dist/cjs/inventory/index.js +33 -3
- package/dist/cjs/inventory/inventur.d.ts +104 -0
- package/dist/cjs/inventory/inventur.js +245 -0
- package/dist/cjs/inventory/lesen.d.ts +20 -1
- package/dist/cjs/inventory/lesen.js +307 -0
- package/dist/cjs/inventory/typen.d.ts +410 -1
- package/dist/cjs/inventory/vertrag.d.ts +94 -8
- package/dist/cjs/inventory/vertrag.js +118 -5
- package/dist/cjs/invoice/index.d.ts +1 -1
- package/dist/cjs/invoice/typen.d.ts +12 -0
- package/dist/cjs/invoice/vertrag.d.ts +1 -1
- package/dist/cjs/invoice/vertrag.js +3 -0
- package/dist/cjs/models/cancellation.d.ts +1 -1
- package/dist/cjs/models/cancellation.js +3 -0
- package/dist/cjs/models/payment-errors.d.ts +1 -1
- package/dist/cjs/models/payment-errors.js +3 -0
- package/dist/cjs/models/receipt-email.d.ts +1 -1
- package/dist/cjs/models/receipt-email.js +3 -0
- package/dist/cjs/models/receipt-errors.d.ts +1 -1
- package/dist/cjs/models/receipt-errors.js +3 -0
- package/dist/cjs/pos/errors.d.ts +4 -3
- package/dist/cjs/pos/errors.js +24 -2
- package/dist/cjs/pos/index.d.ts +4 -1
- package/dist/cjs/pos/index.js +9 -2
- package/dist/cjs/pos/inventur.d.ts +104 -0
- package/dist/cjs/pos/inventur.js +117 -0
- package/dist/cjs/pos/texte.d.ts +82 -0
- package/dist/cjs/pos/texte.js +35 -0
- package/dist/cjs/register/errors.d.ts +1 -1
- package/dist/cjs/register/errors.js +3 -0
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/api.d.ts +5 -3
- package/dist/esm/client/api.js +2 -1
- package/dist/esm/client/aufrufe.d.ts +9 -7
- package/dist/esm/client/aufrufe.js +60 -2
- package/dist/esm/client/errors.js +3 -0
- package/dist/esm/client/index.d.ts +2 -2
- package/dist/esm/client/index.js +2 -2
- package/dist/esm/client/reports.d.ts +26 -0
- package/dist/esm/client/reports.js +46 -0
- package/dist/esm/client/transport.d.ts +27 -3
- package/dist/esm/client/transport.js +28 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/inventory/api.d.ts +21 -2
- package/dist/esm/inventory/api.js +23 -4
- package/dist/esm/inventory/fehler.d.ts +6 -0
- package/dist/esm/inventory/fehler.js +11 -0
- package/dist/esm/inventory/index.d.ts +6 -4
- package/dist/esm/inventory/index.js +5 -3
- package/dist/esm/inventory/inventur.d.ts +104 -0
- package/dist/esm/inventory/inventur.js +226 -0
- package/dist/esm/inventory/lesen.d.ts +20 -1
- package/dist/esm/inventory/lesen.js +301 -0
- package/dist/esm/inventory/typen.d.ts +410 -1
- package/dist/esm/inventory/vertrag.d.ts +94 -8
- package/dist/esm/inventory/vertrag.js +117 -4
- package/dist/esm/invoice/index.d.ts +1 -1
- package/dist/esm/invoice/typen.d.ts +12 -0
- package/dist/esm/invoice/vertrag.d.ts +1 -1
- package/dist/esm/invoice/vertrag.js +3 -0
- package/dist/esm/models/cancellation.d.ts +1 -1
- package/dist/esm/models/cancellation.js +3 -0
- package/dist/esm/models/payment-errors.d.ts +1 -1
- package/dist/esm/models/payment-errors.js +3 -0
- package/dist/esm/models/receipt-email.d.ts +1 -1
- package/dist/esm/models/receipt-email.js +3 -0
- package/dist/esm/models/receipt-errors.d.ts +1 -1
- package/dist/esm/models/receipt-errors.js +3 -0
- package/dist/esm/pos/errors.d.ts +4 -3
- package/dist/esm/pos/errors.js +24 -2
- package/dist/esm/pos/index.d.ts +4 -1
- package/dist/esm/pos/index.js +2 -1
- package/dist/esm/pos/inventur.d.ts +104 -0
- package/dist/esm/pos/inventur.js +109 -0
- package/dist/esm/pos/texte.d.ts +82 -0
- package/dist/esm/pos/texte.js +35 -0
- package/dist/esm/register/errors.d.ts +1 -1
- package/dist/esm/register/errors.js +3 -0
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/pos-texts.json +94 -1
- package/fixtures/stocktake-quantity-cases.json +55 -0
- package/fixtures/surface.json +157 -8
- 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 +2958 -3
- package/fixtures/v3/antworten/lager.json +1727 -3
- package/fixtures/v3/antworten/rechnungen.json +14 -6
- package/fixtures/v3/antworten/storno.json +1 -1
- package/fixtures/v3/stored/belege.json +1 -1
- package/fixtures/v3/stored/kasse.json +414 -3
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +530 -8
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ export const ALL_CALLS = [
|
|
|
17
17
|
'endRegisterSession',
|
|
18
18
|
'financeWebService',
|
|
19
19
|
'generateFullReceiptId',
|
|
20
|
+
'getCashregisterReport',
|
|
20
21
|
'getCustomer',
|
|
21
22
|
'getCustomerCredentials',
|
|
22
23
|
'getCustomerSignatureStatus',
|
|
@@ -105,6 +106,25 @@ export const ALL_CALLS = [
|
|
|
105
106
|
'getVariantGroup',
|
|
106
107
|
'listVariantGroups',
|
|
107
108
|
'addVariant',
|
|
109
|
+
// Lager-API Inventur (Lager-Kern Stufe 3, ./inventory)
|
|
110
|
+
'createStocktake',
|
|
111
|
+
'listStocktakes',
|
|
112
|
+
'getStocktake',
|
|
113
|
+
'listStocktakeItems',
|
|
114
|
+
'recordStocktakeCount',
|
|
115
|
+
'voidStocktakeCount',
|
|
116
|
+
'listStocktakeCounts',
|
|
117
|
+
'reviewStocktake',
|
|
118
|
+
'recountStocktake',
|
|
119
|
+
'closeStocktake',
|
|
120
|
+
'cancelStocktake',
|
|
121
|
+
'getStocktakePdf',
|
|
122
|
+
// Inventur zaehlen an der Kasse (Lager-Kern Stufe 3, ./pos)
|
|
123
|
+
'listMyStocktakes',
|
|
124
|
+
'listMyStocktakeItems',
|
|
125
|
+
'listMyStocktakeCounts',
|
|
126
|
+
'recordMyStocktakeCount',
|
|
127
|
+
'voidMyStocktakeCount',
|
|
108
128
|
];
|
|
109
129
|
/**
|
|
110
130
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -123,6 +143,7 @@ export const PUBLIC_CALLS = [
|
|
|
123
143
|
'getReportV2',
|
|
124
144
|
'downloadReport',
|
|
125
145
|
'downloadDailyReport',
|
|
146
|
+
'getCashregisterReport',
|
|
126
147
|
'createPaymentLinkStripe',
|
|
127
148
|
'stripeCaptureIntent',
|
|
128
149
|
'hobexPayApi',
|
|
@@ -211,6 +232,19 @@ export const PUBLIC_CALLS = [
|
|
|
211
232
|
'getVariantGroup',
|
|
212
233
|
'listVariantGroups',
|
|
213
234
|
'addVariant',
|
|
235
|
+
// Lager-API Inventur (Lager-Kern Stufe 3), umhuellt in `./inventory`.
|
|
236
|
+
'createStocktake',
|
|
237
|
+
'listStocktakes',
|
|
238
|
+
'getStocktake',
|
|
239
|
+
'listStocktakeItems',
|
|
240
|
+
'recordStocktakeCount',
|
|
241
|
+
'voidStocktakeCount',
|
|
242
|
+
'listStocktakeCounts',
|
|
243
|
+
'reviewStocktake',
|
|
244
|
+
'recountStocktake',
|
|
245
|
+
'closeStocktake',
|
|
246
|
+
'cancelStocktake',
|
|
247
|
+
'getStocktakePdf',
|
|
214
248
|
];
|
|
215
249
|
/**
|
|
216
250
|
* Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
|
|
@@ -248,6 +282,12 @@ export const POS_CALLS = [
|
|
|
248
282
|
'listMyStockLocations',
|
|
249
283
|
'listMyStock',
|
|
250
284
|
'setMyCashregisterStockLocation',
|
|
285
|
+
// Inventur zaehlen (Lager-Kern Stufe 3): nur ueber den Kassenweg.
|
|
286
|
+
'listMyStocktakes',
|
|
287
|
+
'listMyStocktakeItems',
|
|
288
|
+
'listMyStocktakeCounts',
|
|
289
|
+
'recordMyStocktakeCount',
|
|
290
|
+
'voidMyStocktakeCount',
|
|
251
291
|
];
|
|
252
292
|
/**
|
|
253
293
|
* Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
|
|
@@ -272,7 +312,9 @@ export const UNKNOWN_OUTCOME_CALLS = [
|
|
|
272
312
|
'addVariant',
|
|
273
313
|
'cancelInvoice',
|
|
274
314
|
'cancelReceipt',
|
|
315
|
+
'cancelStocktake',
|
|
275
316
|
'changeStockCondition',
|
|
317
|
+
'closeStocktake',
|
|
276
318
|
'createArticle',
|
|
277
319
|
'createCreditNote',
|
|
278
320
|
'createCustomer',
|
|
@@ -283,6 +325,7 @@ export const UNKNOWN_OUTCOME_CALLS = [
|
|
|
283
325
|
'createPrintJob',
|
|
284
326
|
'createReceipt',
|
|
285
327
|
'createReservation',
|
|
328
|
+
'createStocktake',
|
|
286
329
|
'createVariantGroup',
|
|
287
330
|
'createWebhook',
|
|
288
331
|
'deactivateArticle',
|
|
@@ -296,11 +339,15 @@ export const UNKNOWN_OUTCOME_CALLS = [
|
|
|
296
339
|
'pairRegisterDevice',
|
|
297
340
|
'receiveGoods',
|
|
298
341
|
'recordInvoicePayment',
|
|
342
|
+
'recordMyStocktakeCount',
|
|
299
343
|
'recordStockLoss',
|
|
344
|
+
'recordStocktakeCount',
|
|
345
|
+
'recountStocktake',
|
|
300
346
|
'releaseReservation',
|
|
301
347
|
'reportCustomerContract',
|
|
302
348
|
'requestCustomerSignature',
|
|
303
349
|
'reverseStockMovement',
|
|
350
|
+
'reviewStocktake',
|
|
304
351
|
'revokeCustomerMandate',
|
|
305
352
|
'rotatePartnerWebhookSecret',
|
|
306
353
|
'rotateWebhookSecret',
|
|
@@ -322,6 +369,8 @@ export const UNKNOWN_OUTCOME_CALLS = [
|
|
|
322
369
|
'updatePartnerWebhook',
|
|
323
370
|
'updateVariantGroup',
|
|
324
371
|
'updateWebhook',
|
|
372
|
+
'voidMyStocktakeCount',
|
|
373
|
+
'voidStocktakeCount',
|
|
325
374
|
'withdrawInvoiceItem',
|
|
326
375
|
];
|
|
327
376
|
/**
|
|
@@ -356,6 +405,7 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
356
405
|
createPaymentLinkStripe: 'repeatable',
|
|
357
406
|
endRegisterSession: 'repeatable',
|
|
358
407
|
generateFullReceiptId: 'read',
|
|
408
|
+
getCashregisterReport: 'read',
|
|
359
409
|
getArticle: 'read',
|
|
360
410
|
getCustomer: 'read',
|
|
361
411
|
getCustomerCredentials: 'read',
|
|
@@ -376,6 +426,8 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
376
426
|
getReportV2: 'read',
|
|
377
427
|
getReservation: 'read',
|
|
378
428
|
getStock: 'read',
|
|
429
|
+
getStocktake: 'read',
|
|
430
|
+
getStocktakePdf: 'read',
|
|
379
431
|
getVariantGroup: 'read',
|
|
380
432
|
hobexGetStatus: 'read',
|
|
381
433
|
listArticles: 'read',
|
|
@@ -391,6 +443,9 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
391
443
|
listMyReceipts: 'read',
|
|
392
444
|
listMyStock: 'read',
|
|
393
445
|
listMyStockLocations: 'read',
|
|
446
|
+
listMyStocktakeCounts: 'read',
|
|
447
|
+
listMyStocktakeItems: 'read',
|
|
448
|
+
listMyStocktakes: 'read',
|
|
394
449
|
listMyTipRecipients: 'read',
|
|
395
450
|
listPartnerCustomers: 'read',
|
|
396
451
|
listPartnerWebhookDeliveries: 'read',
|
|
@@ -400,6 +455,9 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
400
455
|
listReservations: 'read',
|
|
401
456
|
listStock: 'read',
|
|
402
457
|
listStockMovements: 'read',
|
|
458
|
+
listStocktakeCounts: 'read',
|
|
459
|
+
listStocktakeItems: 'read',
|
|
460
|
+
listStocktakes: 'read',
|
|
403
461
|
listVariantGroups: 'read',
|
|
404
462
|
listWebhookDeliveries: 'read',
|
|
405
463
|
listWebhooks: 'read',
|
|
@@ -423,12 +481,12 @@ export function isUnknownOutcomeCall(name) {
|
|
|
423
481
|
const OEFFENTLICH = new Set(PUBLIC_CALLS);
|
|
424
482
|
const KASSENWEG = new Set(POS_CALLS);
|
|
425
483
|
const NUR_KASSE = new Set(POS_CALLS.filter((name) => !OEFFENTLICH.has(name)));
|
|
426
|
-
/** Einer der
|
|
484
|
+
/** Einer der 33 Aufrufe des Kassenwegs. */
|
|
427
485
|
export function isPosCall(name) {
|
|
428
486
|
return KASSENWEG.has(name);
|
|
429
487
|
}
|
|
430
488
|
/**
|
|
431
|
-
* Nur ueber den Kassenweg erreichbar (
|
|
489
|
+
* Nur ueber den Kassenweg erreichbar (27 Namen): unter `api.kasseneck.at/v3`
|
|
432
490
|
* gibt es sie nicht. Der Transport schickt sie darum ohne eigene Basis an
|
|
433
491
|
* [POS_BASE_URL] statt an die oeffentliche Basis.
|
|
434
492
|
*/
|
|
@@ -268,7 +268,10 @@ export const PAYMENT_CALL_REJECTED_CODES = Object.freeze([
|
|
|
268
268
|
'account_not_found',
|
|
269
269
|
'live_not_enabled',
|
|
270
270
|
'api_not_approved', // Live-API ohne Freigabe (Entwicklerbereich): vor dem Handler abgewiesen
|
|
271
|
+
'app_check_missing', // Admin-App ohne bzw. mit ungueltigem App Check: vor dem Handler abgewiesen
|
|
272
|
+
'app_check_invalid',
|
|
271
273
|
'unauthorized',
|
|
274
|
+
'password_change_required', // Pflichtwechsel des Passworts offen: vor dem Handler abgewiesen
|
|
272
275
|
'mfa_required',
|
|
273
276
|
'user_verification_failed',
|
|
274
277
|
'admin_required',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, } from './auth.js';
|
|
2
|
-
export { 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, createTransport, createBinaryTransport, } from './transport.js';
|
|
2
|
+
export { 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, createTransport, createBinaryTransport, createPdfOrDataTransport, } from './transport.js';
|
|
3
3
|
export { ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, } from './aufrufe.js';
|
|
4
4
|
export { 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, } from './errors.js';
|
|
5
5
|
export { type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, type CancelReceiptResult, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, } from './receipts.js';
|
|
6
6
|
export { listMyCashregisters } from './cashregisters.js';
|
|
7
|
-
export { downloadDailyReport, downloadMonthlyReport, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options } from './reports.js';
|
|
7
|
+
export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, type CashregisterReportPeriod, type ReportV2, type ReportV2Metadata, type ReportV2Options } from './reports.js';
|
|
8
8
|
export { type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, } from './status.js';
|
|
9
9
|
export { type KasseneckApi, createKasseneckApi } from './api.js';
|
package/dist/esm/client/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { apiKeyAuth, registerUserAuth, } from './auth.js';
|
|
2
|
-
export { DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, createTransport, createBinaryTransport, } from './transport.js';
|
|
2
|
+
export { DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, createTransport, createBinaryTransport, createPdfOrDataTransport, } from './transport.js';
|
|
3
3
|
export { ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, } from './aufrufe.js';
|
|
4
4
|
export { KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, } from './errors.js';
|
|
5
5
|
export { sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, checkVoucherCombinationError, sendReceiptEmail, } from './receipts.js';
|
|
6
6
|
export { listMyCashregisters } from './cashregisters.js';
|
|
7
|
-
export { downloadDailyReport, downloadMonthlyReport, getReportV2 } from './reports.js';
|
|
7
|
+
export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2 } from './reports.js';
|
|
8
8
|
export { getCashboxStatus, getSignatureStatus, } from './status.js';
|
|
9
9
|
export { createKasseneckApi } from './api.js';
|
|
@@ -28,6 +28,9 @@ import type { InternerBinaerTransport, InternerTransport } from './aufrufe.js';
|
|
|
28
28
|
* `getDate()`/`getMonth()` wuerden auf einer UTC-Maschine den Bericht des
|
|
29
29
|
* Vortags holen (das Dart-Vorbild nimmt hier die Geraetezeit, was auf einer
|
|
30
30
|
* oesterreichischen Kasse zufaellig stimmt).
|
|
31
|
+
*
|
|
32
|
+
* @deprecated Since 1.10.0: use getCashregisterReport(...). The old endpoint keeps working
|
|
33
|
+
* (closed periods as v2, current month / today as before) until it is switched off.
|
|
31
34
|
*/
|
|
32
35
|
export declare function downloadDailyReport(transport: InternerBinaerTransport, date: Date): Promise<Uint8Array>;
|
|
33
36
|
/**
|
|
@@ -39,8 +42,31 @@ export declare function downloadDailyReport(transport: InternerBinaerTransport,
|
|
|
39
42
|
*
|
|
40
43
|
* `month` geht als **Zahl 1-12** raus (im Flutter-Paket `reportMonth.month.id`,
|
|
41
44
|
* wo `KeckMonth.january.id === 1` ist) — kein Name, kein nullbasierter Index.
|
|
45
|
+
*
|
|
46
|
+
* @deprecated Since 1.10.0: use getCashregisterReport(...). The old endpoint keeps working
|
|
47
|
+
* (closed periods as v2, current month / today as before) until it is switched off.
|
|
42
48
|
*/
|
|
43
49
|
export declare function downloadMonthlyReport(transport: InternerBinaerTransport, reportMonth: ReportMonth): Promise<Uint8Array>;
|
|
50
|
+
/** Zeitraum fuer [getCashregisterReport]: genau eine der drei Formen. */
|
|
51
|
+
export type CashregisterReportPeriod = {
|
|
52
|
+
year: number;
|
|
53
|
+
month: number;
|
|
54
|
+
} | {
|
|
55
|
+
year: number;
|
|
56
|
+
month: number;
|
|
57
|
+
day: number;
|
|
58
|
+
} | {
|
|
59
|
+
start: string;
|
|
60
|
+
end: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Kassenbericht als PDF (v2) fuer einen abgeschlossenen Monat, einen Tag bis
|
|
64
|
+
* heute oder einen Zeitraum (`end` ausschliesslich, hoechstens 366 Tage).
|
|
65
|
+
* Laufender Monat und Zukunft liefern die Fehler `period_not_closed` bzw.
|
|
66
|
+
* `period_in_future`. Nachfolger von [downloadMonthlyReport] und
|
|
67
|
+
* [downloadDailyReport].
|
|
68
|
+
*/
|
|
69
|
+
export declare function getCashregisterReport(transport: InternerBinaerTransport, options: CashregisterReportPeriod): Promise<Uint8Array>;
|
|
44
70
|
/** Zeitfenster von [getReportV2]: Wiener Wanduhr, `YYYY-MM-DD` oder voller Zeitstempel, `end` ausschliesslich. */
|
|
45
71
|
export interface ReportV2Options {
|
|
46
72
|
start: string;
|
|
@@ -29,6 +29,9 @@ import { KasseneckValidationError } from './errors.js';
|
|
|
29
29
|
* `getDate()`/`getMonth()` wuerden auf einer UTC-Maschine den Bericht des
|
|
30
30
|
* Vortags holen (das Dart-Vorbild nimmt hier die Geraetezeit, was auf einer
|
|
31
31
|
* oesterreichischen Kasse zufaellig stimmt).
|
|
32
|
+
*
|
|
33
|
+
* @deprecated Since 1.10.0: use getCashregisterReport(...). The old endpoint keeps working
|
|
34
|
+
* (closed periods as v2, current month / today as before) until it is switched off.
|
|
32
35
|
*/
|
|
33
36
|
// `async`, damit auch die Eingabepruefung als abgelehntes Versprechen ankommt
|
|
34
37
|
// und nicht als synchroner Wurf am `await` des Aufrufers vorbei.
|
|
@@ -53,6 +56,9 @@ export async function downloadDailyReport(transport, date) {
|
|
|
53
56
|
*
|
|
54
57
|
* `month` geht als **Zahl 1-12** raus (im Flutter-Paket `reportMonth.month.id`,
|
|
55
58
|
* wo `KeckMonth.january.id === 1` ist) — kein Name, kein nullbasierter Index.
|
|
59
|
+
*
|
|
60
|
+
* @deprecated Since 1.10.0: use getCashregisterReport(...). The old endpoint keeps working
|
|
61
|
+
* (closed periods as v2, current month / today as before) until it is switched off.
|
|
56
62
|
*/
|
|
57
63
|
export async function downloadMonthlyReport(transport, reportMonth) {
|
|
58
64
|
const { month, year } = reportMonth;
|
|
@@ -64,6 +70,46 @@ export async function downloadMonthlyReport(transport, reportMonth) {
|
|
|
64
70
|
}
|
|
65
71
|
return transport('downloadReport', { month, year });
|
|
66
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Kassenbericht als PDF (v2) fuer einen abgeschlossenen Monat, einen Tag bis
|
|
75
|
+
* heute oder einen Zeitraum (`end` ausschliesslich, hoechstens 366 Tage).
|
|
76
|
+
* Laufender Monat und Zukunft liefern die Fehler `period_not_closed` bzw.
|
|
77
|
+
* `period_in_future`. Nachfolger von [downloadMonthlyReport] und
|
|
78
|
+
* [downloadDailyReport].
|
|
79
|
+
*/
|
|
80
|
+
export async function getCashregisterReport(transport, options) {
|
|
81
|
+
// Genau eine Form; Misch- und Teilformen werfen vor dem Transport (wie im Dart-Paket).
|
|
82
|
+
const o = options;
|
|
83
|
+
const da = (k) => o[k] !== undefined && o[k] !== null;
|
|
84
|
+
const felder = ['year', 'month', 'day', 'start', 'end'].filter(da).sort().join(',');
|
|
85
|
+
if (felder !== 'month,year' && felder !== 'day,month,year' && felder !== 'end,start') {
|
|
86
|
+
throw eingabefehler('getCashregisterReport', 'genau eine Form angeben: year+month, year+month+day oder start+end');
|
|
87
|
+
}
|
|
88
|
+
if (felder === 'end,start') {
|
|
89
|
+
const { start, end } = options;
|
|
90
|
+
for (const [feld, wert] of [['start', start], ['end', end]]) {
|
|
91
|
+
if (typeof wert !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(wert)) {
|
|
92
|
+
throw eingabefehler('getCashregisterReport', `${feld} muss YYYY-MM-DD sein, war "${String(wert)}"`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return transport('getCashregisterReport', { start, end });
|
|
96
|
+
}
|
|
97
|
+
const { year, month } = options;
|
|
98
|
+
if (!Number.isInteger(month) || month < 1 || month > 12) {
|
|
99
|
+
throw eingabefehler('getCashregisterReport', `month muss 1-12 sein, war "${month}"`);
|
|
100
|
+
}
|
|
101
|
+
if (!Number.isInteger(year)) {
|
|
102
|
+
throw eingabefehler('getCashregisterReport', `year muss eine ganze Zahl sein, war "${year}"`);
|
|
103
|
+
}
|
|
104
|
+
if ('day' in options) {
|
|
105
|
+
const day = options.day;
|
|
106
|
+
if (!Number.isInteger(day) || day < 1 || day > 31) {
|
|
107
|
+
throw eingabefehler('getCashregisterReport', `day muss 1-31 sein, war "${day}"`);
|
|
108
|
+
}
|
|
109
|
+
return transport('getCashregisterReport', { year, month, day });
|
|
110
|
+
}
|
|
111
|
+
return transport('getCashregisterReport', { year, month });
|
|
112
|
+
}
|
|
67
113
|
/**
|
|
68
114
|
* Rohdaten eines Zeitraums (`getReportV2`): alle Belege der Kasse und die
|
|
69
115
|
* Firmendaten fuer Kopf und Fuss. Der Server vergleicht die Zeitstempel als
|
|
@@ -91,16 +91,16 @@ export interface TransportOptions {
|
|
|
91
91
|
auth: KasseneckAuth;
|
|
92
92
|
/**
|
|
93
93
|
* Abweichende Basis der **oeffentlichen** Aufrufe (Vorgabe
|
|
94
|
-
* [DEFAULT_BASE_URL]): alles ausser den
|
|
94
|
+
* [DEFAULT_BASE_URL]): alles ausser den 33 Aufrufen des Kassenwegs, und die
|
|
95
95
|
* sechs oeffentlichen davon nur, wenn nicht mit `registerUserAuth`
|
|
96
96
|
* angemeldet. Muss auf `/v3` enden (eigene Proxys erlaubt), sonst wirft das
|
|
97
97
|
* Anlegen; `/v1` oder `/api` gibt es in der 1.x-Linie nicht.
|
|
98
98
|
*/
|
|
99
99
|
baseUrl?: string;
|
|
100
100
|
/**
|
|
101
|
-
* Abweichende Basis des **Kassenwegs** (Vorgabe [POS_BASE_URL]): die
|
|
101
|
+
* Abweichende Basis des **Kassenwegs** (Vorgabe [POS_BASE_URL]): die 27
|
|
102
102
|
* reinen Kassenaufrufe (Kopplung, Anmeldung, Einstellungen, Artikel,
|
|
103
|
-
* Drucker, ...) und mit `registerUserAuth` alle
|
|
103
|
+
* Drucker, ...) und mit `registerUserAuth` alle 33 Aufrufe des Kassenwegs.
|
|
104
104
|
* Die Web-Kasse gibt `'/api/v3'` (gleicher Ursprung). Muss auf `/v3` enden
|
|
105
105
|
* (in der Regel `/api/v3`), sonst wirft das Anlegen.
|
|
106
106
|
*/
|
|
@@ -193,3 +193,27 @@ export declare function createTransport(options: TransportOptions): KasseneckTra
|
|
|
193
193
|
* reports.ts.)
|
|
194
194
|
*/
|
|
195
195
|
export declare function createBinaryTransport(options: TransportOptions): KasseneckBinaryTransport;
|
|
196
|
+
/**
|
|
197
|
+
* Ergebnis eines Aufrufs, der eine Datei **oder** eine Nutzlast liefert: das
|
|
198
|
+
* PDF als Bytes oder die `data` einer Erfolgshuelle (etwa ein Lese-Link, wenn
|
|
199
|
+
* die Datei zu gross fuer die Antwort ist).
|
|
200
|
+
*/
|
|
201
|
+
export type PdfOrData = {
|
|
202
|
+
pdf: Uint8Array;
|
|
203
|
+
} | {
|
|
204
|
+
data: unknown;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Ruft eine Backend-Funktion auf, die ein PDF **oder** eine JSON-Nutzlast
|
|
208
|
+
* liefert (Inventurprotokoll: die Datei bis 9 MiB, darueber ein Lese-Link).
|
|
209
|
+
*/
|
|
210
|
+
export type KasseneckPdfOrDataTransport = (functionName: string, params?: Record<string, unknown>) => Promise<PdfOrData>;
|
|
211
|
+
/**
|
|
212
|
+
* Dritter Einstiegspunkt, fuer Aufrufe, die eine Datei oder eine Nutzlast
|
|
213
|
+
* liefern (`getStocktakePdf` aus `./inventory`). Wie [createBinaryTransport]
|
|
214
|
+
* wird die Antwort nur als Bytes gelesen; die ersten Bytes entscheiden: `%PDF`
|
|
215
|
+
* ergibt `{ pdf }`, eine Erfolgshuelle `{ data }`, eine Fehlerhuelle denselben
|
|
216
|
+
* fachlichen Fehler wie auf dem JSON-Weg. Leer, kein JSON oder ohne Statusfeld
|
|
217
|
+
* ist unlesbar mit denselben Gruenden wie dort.
|
|
218
|
+
*/
|
|
219
|
+
export declare function createPdfOrDataTransport(options: TransportOptions): KasseneckPdfOrDataTransport;
|
|
@@ -93,7 +93,19 @@ export function createBinaryTransport(options) {
|
|
|
93
93
|
return (functionName, params) => kern(functionName, params, undefined, undefined, undefined, alsBytes, pdfAuswerten);
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* Dritter Einstiegspunkt, fuer Aufrufe, die eine Datei oder eine Nutzlast
|
|
97
|
+
* liefern (`getStocktakePdf` aus `./inventory`). Wie [createBinaryTransport]
|
|
98
|
+
* wird die Antwort nur als Bytes gelesen; die ersten Bytes entscheiden: `%PDF`
|
|
99
|
+
* ergibt `{ pdf }`, eine Erfolgshuelle `{ data }`, eine Fehlerhuelle denselben
|
|
100
|
+
* fachlichen Fehler wie auf dem JSON-Weg. Leer, kein JSON oder ohne Statusfeld
|
|
101
|
+
* ist unlesbar mit denselben Gruenden wie dort.
|
|
102
|
+
*/
|
|
103
|
+
export function createPdfOrDataTransport(options) {
|
|
104
|
+
const kern = createCore(options);
|
|
105
|
+
return (functionName, params) => kern(functionName, params, undefined, undefined, undefined, alsBytes, pdfOderDatenAuswerten);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Gemeinsamer Kern aller Einstiegspunkte: Anmeldung, Zeitlimit, Anfrage und
|
|
97
109
|
* HTTP-Status. Was danach mit dem Rumpf geschieht, entscheiden `lesen` und
|
|
98
110
|
* `auswerten`.
|
|
99
111
|
*/
|
|
@@ -107,9 +119,9 @@ function createCore(options) {
|
|
|
107
119
|
pruefeKennung(kennung);
|
|
108
120
|
const kopfzeilenSenden = options.omitKasseneckHeaders !== true;
|
|
109
121
|
/**
|
|
110
|
-
* Basis je Aufruf. Die
|
|
122
|
+
* Basis je Aufruf. Die 27 reinen Kassenaufrufe gehen immer an den
|
|
111
123
|
* Kassenweg (unter der oeffentlichen Basis gibt es sie nicht), und die
|
|
112
|
-
* Kassen-Anmeldung ruft alle
|
|
124
|
+
* Kassen-Anmeldung ruft alle 33 Aufrufe des Kassenwegs dort, auch die sechs
|
|
113
125
|
* oeffentlichen (Kanal `app`). Was der Kassenweg gar nicht fuehrt
|
|
114
126
|
* (Berichte, Zahlungen, FinanzOnline), geht an die oeffentliche Basis.
|
|
115
127
|
*/
|
|
@@ -431,6 +443,19 @@ function pdfAuswerten(bytes, functionName, statusCode, inhaltstyp, geheimnisse,
|
|
|
431
443
|
// es keinen Unterschied, ob er ein PDF oder eine Nutzlast erwartet hat.
|
|
432
444
|
throw fachfehler(functionName, huelle.message, huelle.data, geheimnisse, huelle.code);
|
|
433
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Auswertung von [createPdfOrDataTransport]: ein PDF geht als Bytes zurueck,
|
|
448
|
+
* eine Erfolgshuelle als ihre `data`, eine Fehlerhuelle als derselbe
|
|
449
|
+
* fachliche Fehler wie auf dem JSON-Weg. Alles andere (leer, kein JSON, ohne
|
|
450
|
+
* Statusfeld) ist unlesbar mit denselben Gruenden wie dort.
|
|
451
|
+
*/
|
|
452
|
+
function pdfOderDatenAuswerten(bytes, functionName, statusCode, inhaltstyp, geheimnisse, unlesbar) {
|
|
453
|
+
if (istPdf(bytes)) {
|
|
454
|
+
return { pdf: bytes };
|
|
455
|
+
}
|
|
456
|
+
const text = new TextDecoder('utf-8').decode(bytes);
|
|
457
|
+
return { data: jsonAuswerten(text, functionName, statusCode, inhaltstyp, geheimnisse, unlesbar) };
|
|
458
|
+
}
|
|
434
459
|
/** `%PDF` am Anfang — die Kennung jeder PDF-Datei. */
|
|
435
460
|
function istPdf(bytes) {
|
|
436
461
|
return bytes.length >= 4 && bytes[0] === 0x25 && bytes[1] === 0x50 && bytes[2] === 0x44 && bytes[3] === 0x46;
|
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
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, 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, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_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';
|
|
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, 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, getCashregisterReport, type CashregisterReportPeriod, 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
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
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
|
-
export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_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';
|
|
3
|
+
export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, createTransport, createBinaryTransport, createPdfOrDataTransport, 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, getCashregisterReport, 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
6
|
export { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, } from './pos/index.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fassade ueber den Aufrufen der Lager-API (lesen, Webhooks, schreiben,
|
|
3
|
-
* reservieren, Varianten): Schluessel einmal binden, dann rufen. Wie [createInvoiceApi] bewusst keine Klasse; die Aufrufe sind freie
|
|
3
|
+
* reservieren, Varianten, Inventur): Schluessel einmal binden, dann rufen. Wie [createInvoiceApi] bewusst keine Klasse; die Aufrufe sind freie
|
|
4
4
|
* Funktionen (endpunkte.ts) und bleiben einzeln importierbar.
|
|
5
5
|
*/
|
|
6
6
|
import { type FetchLike } from '../client/transport.js';
|
|
7
|
-
import type { AddVariantRequest, CreateVariantGroupRequest, UpdateVariantGroupRequest, VariantGroup, VariantGroupListQuery, VariantGroupPage, Article, ChangeStockConditionRequest, CreateArticleRequest, CreateReservationRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptPreview, GoodsReceiptPreviewRequest, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationRequest, Reservation, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockOperation, TransferStockRequest, UpdateArticleRequest, ArticleListQuery, ArticleLookup, ArticlePage, CreateInventoryWebhookOptions, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestResult, InventoryWebhookWithSecret, Location, StockLevel, StockListQuery, StockMovement, StockMovementPage, StockMovementQuery, StockPage, StockResult } from './typen.js';
|
|
7
|
+
import type { CancelStocktakeRequest, CloseStocktakeRequest, CloseStocktakeResult, CreateStocktakeRequest, RecordStocktakeCountRequest, RecountStocktakeRequest, ReviewStocktakeRequest, Stocktake, StocktakeCount, StocktakeCountListQuery, StocktakeCountPage, StocktakeCountResult, StocktakeItem, StocktakeItemListQuery, StocktakeItemPage, StocktakeListQuery, StocktakePage, StocktakePdf, VoidStocktakeCountRequest, AddVariantRequest, CreateVariantGroupRequest, UpdateVariantGroupRequest, VariantGroup, VariantGroupListQuery, VariantGroupPage, Article, ChangeStockConditionRequest, CreateArticleRequest, CreateReservationRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptPreview, GoodsReceiptPreviewRequest, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationRequest, Reservation, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockOperation, TransferStockRequest, UpdateArticleRequest, ArticleListQuery, ArticleLookup, ArticlePage, CreateInventoryWebhookOptions, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestResult, InventoryWebhookWithSecret, Location, StockLevel, StockListQuery, StockMovement, StockMovementPage, StockMovementQuery, StockPage, StockResult } from './typen.js';
|
|
8
8
|
import type { InventoryWebhookEventType } from './vertrag.js';
|
|
9
9
|
export interface InventoryClientOptions {
|
|
10
10
|
/** `api_key` des Kontos (`kr_live_…` / `kr_test_…`). Gehoert auf einen Server. */
|
|
@@ -65,5 +65,24 @@ export interface InventoryClient {
|
|
|
65
65
|
getVariantGroup(variantGroupId: string): Promise<VariantGroup>;
|
|
66
66
|
listVariantGroups(query?: VariantGroupListQuery): Promise<VariantGroupPage>;
|
|
67
67
|
iterateVariantGroups(query?: VariantGroupListQuery): AsyncGenerator<VariantGroup, void, undefined>;
|
|
68
|
+
createStocktake(request: CreateStocktakeRequest): Promise<Stocktake>;
|
|
69
|
+
/** Ohne `updatedSince` zuletzt geaenderte zuerst, mit `updatedSince` aufsteigend und inklusive. */
|
|
70
|
+
listStocktakes(query?: StocktakeListQuery): Promise<StocktakePage>;
|
|
71
|
+
iterateStocktakes(query?: StocktakeListQuery): AsyncGenerator<Stocktake, void, undefined>;
|
|
72
|
+
getStocktake(stocktakeId: string): Promise<Stocktake>;
|
|
73
|
+
listStocktakeItems(query: StocktakeItemListQuery): Promise<StocktakeItemPage>;
|
|
74
|
+
iterateStocktakeItems(query: StocktakeItemListQuery): AsyncGenerator<StocktakeItem, void, undefined>;
|
|
75
|
+
recordStocktakeCount(request: RecordStocktakeCountRequest): Promise<StocktakeCountResult>;
|
|
76
|
+
voidStocktakeCount(request: VoidStocktakeCountRequest): Promise<StocktakeCountResult>;
|
|
77
|
+
listStocktakeCounts(query: StocktakeCountListQuery): Promise<StocktakeCountPage>;
|
|
78
|
+
iterateStocktakeCounts(query: StocktakeCountListQuery): AsyncGenerator<StocktakeCount, void, undefined>;
|
|
79
|
+
/** Pruefen; die Antwort kommt mit `review.complete: false`, gerechnet wird im Hintergrund. */
|
|
80
|
+
reviewStocktake(request: ReviewStocktakeRequest): Promise<Stocktake>;
|
|
81
|
+
recountStocktake(request: RecountStocktakeRequest): Promise<Stocktake>;
|
|
82
|
+
/** Abschliessen; der Server bucht in Teilen weiter (`status: 'closing'`). */
|
|
83
|
+
closeStocktake(request: CloseStocktakeRequest): Promise<CloseStocktakeResult>;
|
|
84
|
+
cancelStocktake(request: CancelStocktakeRequest): Promise<Stocktake>;
|
|
85
|
+
/** Das Inventurprotokoll: die Datei (`kind: 'pdf'`) oder, ueber 9 MiB, ein Lese-Link (`kind: 'download'`). */
|
|
86
|
+
getStocktakePdf(stocktakeId: string): Promise<StocktakePdf>;
|
|
68
87
|
}
|
|
69
88
|
export declare function createInventoryClient(options: InventoryClientOptions): InventoryClient;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fassade ueber den Aufrufen der Lager-API (lesen, Webhooks, schreiben,
|
|
3
|
-
* reservieren, Varianten): Schluessel einmal binden, dann rufen. Wie [createInvoiceApi] bewusst keine Klasse; die Aufrufe sind freie
|
|
3
|
+
* reservieren, Varianten, Inventur): Schluessel einmal binden, dann rufen. Wie [createInvoiceApi] bewusst keine Klasse; die Aufrufe sind freie
|
|
4
4
|
* Funktionen (endpunkte.ts) und bleiben einzeln importierbar.
|
|
5
5
|
*/
|
|
6
|
-
import { createTransport } from '../client/transport.js';
|
|
6
|
+
import { createPdfOrDataTransport, createTransport } from '../client/transport.js';
|
|
7
7
|
import { inventoryKeyAuth } from './auth.js';
|
|
8
8
|
import { createWebhook, deleteWebhook, getArticle, getStock, iterateArticles, iterateStock, iterateStockMovements, listArticles, listLocations, listStock, listStockMovements, listWebhookDeliveries, listWebhooks, lookupArticleByCode, rotateWebhookSecret, sendWebhookTest, updateWebhook, } from './endpunkte.js';
|
|
9
9
|
import { changeStockCondition, createArticle, createReservation, deactivateArticle, extendReservation, getReservation, iterateReservations, listReservations, previewGoodsReceipt, receiveGoods, recordStockLoss, releaseReservation, reverseStockMovement, transferStock, updateArticle, } from './schreiben.js';
|
|
10
|
+
import { cancelStocktake, closeStocktake, createStocktake, getStocktake, getStocktakePdf, iterateStocktakeCounts, iterateStocktakeItems, iterateStocktakes, listStocktakeCounts, listStocktakeItems, listStocktakes, recordStocktakeCount, recountStocktake, reviewStocktake, voidStocktakeCount, } from './inventur.js';
|
|
10
11
|
import { addVariant, createVariantGroup, getVariantGroup, iterateVariantGroups, listVariantGroups, updateVariantGroup, } from './varianten.js';
|
|
11
12
|
export function createInventoryClient(options) {
|
|
12
|
-
const
|
|
13
|
+
const transportOptionen = {
|
|
13
14
|
auth: inventoryKeyAuth({ apiKey: options.apiKey }),
|
|
14
15
|
baseUrl: options.baseUrl,
|
|
15
16
|
timeoutMs: options.timeoutMs,
|
|
16
17
|
fetch: options.fetch,
|
|
17
|
-
}
|
|
18
|
+
};
|
|
19
|
+
const rufen = createTransport(transportOptionen);
|
|
20
|
+
// Das Inventurprotokoll kommt als Datei oder als Lese-Link (ueber 9 MiB).
|
|
21
|
+
const rufenDatei = createPdfOrDataTransport(transportOptionen);
|
|
18
22
|
return {
|
|
19
23
|
getArticle: (id) => getArticle(rufen, id),
|
|
20
24
|
listArticles: (q) => listArticles(rufen, q),
|
|
@@ -54,5 +58,20 @@ export function createInventoryClient(options) {
|
|
|
54
58
|
getVariantGroup: (id) => getVariantGroup(rufen, id),
|
|
55
59
|
listVariantGroups: (q) => listVariantGroups(rufen, q),
|
|
56
60
|
iterateVariantGroups: (q) => iterateVariantGroups(rufen, q),
|
|
61
|
+
createStocktake: (r) => createStocktake(rufen, r),
|
|
62
|
+
listStocktakes: (q) => listStocktakes(rufen, q),
|
|
63
|
+
iterateStocktakes: (q) => iterateStocktakes(rufen, q),
|
|
64
|
+
getStocktake: (id) => getStocktake(rufen, id),
|
|
65
|
+
listStocktakeItems: (q) => listStocktakeItems(rufen, q),
|
|
66
|
+
iterateStocktakeItems: (q) => iterateStocktakeItems(rufen, q),
|
|
67
|
+
recordStocktakeCount: (r) => recordStocktakeCount(rufen, r),
|
|
68
|
+
voidStocktakeCount: (r) => voidStocktakeCount(rufen, r),
|
|
69
|
+
listStocktakeCounts: (q) => listStocktakeCounts(rufen, q),
|
|
70
|
+
iterateStocktakeCounts: (q) => iterateStocktakeCounts(rufen, q),
|
|
71
|
+
reviewStocktake: (r) => reviewStocktake(rufen, r),
|
|
72
|
+
recountStocktake: (r) => recountStocktake(rufen, r),
|
|
73
|
+
closeStocktake: (r) => closeStocktake(rufen, r),
|
|
74
|
+
cancelStocktake: (r) => cancelStocktake(rufen, r),
|
|
75
|
+
getStocktakePdf: (id) => getStocktakePdf(rufenDatei, id),
|
|
57
76
|
};
|
|
58
77
|
}
|
|
@@ -41,3 +41,9 @@ export declare function inventoryRetryAfterSec(error: unknown): number | undefin
|
|
|
41
41
|
export declare function inventoryShortfalls(error: unknown): InventoryShortfall[];
|
|
42
42
|
/** `true` fuer einen Hinweis-Code einer Buchung (`warnings[].code`); Hinweise sind nie Fehler. */
|
|
43
43
|
export declare function isInventoryWarningCode(value: unknown): value is InventoryWarningCode;
|
|
44
|
+
/**
|
|
45
|
+
* Die Inventur, die einen Standort belegt (`stocktake_location_busy`,
|
|
46
|
+
* `data.stocktakeId`): weiterzaehlen statt neu anlegen. `undefined`, wenn der
|
|
47
|
+
* Fehler ein anderer ist oder der Server keine Kennung nennt.
|
|
48
|
+
*/
|
|
49
|
+
export declare function inventoryBusyStocktakeId(error: unknown): string | undefined;
|
|
@@ -55,3 +55,14 @@ const HINWEISE = new Set(INVENTORY_WARNING_CODES);
|
|
|
55
55
|
export function isInventoryWarningCode(value) {
|
|
56
56
|
return typeof value === 'string' && HINWEISE.has(value);
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Die Inventur, die einen Standort belegt (`stocktake_location_busy`,
|
|
60
|
+
* `data.stocktakeId`): weiterzaehlen statt neu anlegen. `undefined`, wenn der
|
|
61
|
+
* Fehler ein anderer ist oder der Server keine Kennung nennt.
|
|
62
|
+
*/
|
|
63
|
+
export function inventoryBusyStocktakeId(error) {
|
|
64
|
+
if (inventoryErrorCode(error) !== 'stocktake_location_busy')
|
|
65
|
+
return undefined;
|
|
66
|
+
const wert = error.details['stocktakeId'];
|
|
67
|
+
return typeof wert === 'string' && wert !== '' ? wert : undefined;
|
|
68
|
+
}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Bestand und Lagerprotokoll lesen, Konto-Webhooks verwalten und eingehende
|
|
4
4
|
* Zustellungen pruefen (Backend Stufe 5a); Artikel anlegen und aendern,
|
|
5
5
|
* Bestand buchen und Ware reservieren (Stufe 5b, seit 1.5.0);
|
|
6
|
-
* Variantengruppen (Stufe 5c, seit 1.6.0)
|
|
6
|
+
* Variantengruppen (Stufe 5c, seit 1.6.0); Inventur (Lager-Kern Stufe 3,
|
|
7
|
+
* seit 1.8.0).
|
|
7
8
|
*
|
|
8
9
|
* Ein eigener Unterpfad wie `invoice`: der `api_key` eines Kontos gehoert auf
|
|
9
10
|
* einen **Server** (etwa das Backend eines Online-Shops) und soll nicht
|
|
@@ -14,10 +15,11 @@
|
|
|
14
15
|
*/
|
|
15
16
|
export { createInventoryClient, type InventoryClient, type InventoryClientOptions } from './api.js';
|
|
16
17
|
export { inventoryKeyAuth, type InventoryKeyAuthOptions } from './auth.js';
|
|
17
|
-
export { isInventoryError, isInventoryErrorCode, inventoryErrorCode, inventoryFieldErrors, inventoryRetryAfterSec, inventoryShortfalls, isInventoryWarningCode, type InventoryApiErrorCode, type InventoryFieldError, } from './fehler.js';
|
|
18
|
+
export { isInventoryError, isInventoryErrorCode, inventoryErrorCode, inventoryFieldErrors, inventoryRetryAfterSec, inventoryShortfalls, inventoryBusyStocktakeId, isInventoryWarningCode, type InventoryApiErrorCode, type InventoryFieldError, } from './fehler.js';
|
|
18
19
|
export { createWebhook, deleteWebhook, getArticle, getStock, iterateArticles, iterateStock, iterateStockMovements, listArticles, listLocations, listStock, listStockMovements, listWebhookDeliveries, listWebhooks, lookupArticleByCode, rotateWebhookSecret, sendWebhookTest, updateWebhook, } from './endpunkte.js';
|
|
19
20
|
export { changeStockCondition, createArticle, createReservation, deactivateArticle, extendReservation, getReservation, iterateReservations, listReservations, previewGoodsReceipt, receiveGoods, recordStockLoss, releaseReservation, reverseStockMovement, transferStock, updateArticle, } from './schreiben.js';
|
|
20
21
|
export { addVariant, createVariantGroup, getVariantGroup, iterateVariantGroups, listVariantGroups, updateVariantGroup, } from './varianten.js';
|
|
22
|
+
export { cancelStocktake, closeStocktake, createStocktake, getStocktake, getStocktakePdf, iterateStocktakeCounts, iterateStocktakeItems, iterateStocktakes, listStocktakeCounts, listStocktakeItems, listStocktakes, recordStocktakeCount, recountStocktake, reviewStocktake, voidStocktakeCount, } from './inventur.js';
|
|
21
23
|
export { verifyInventoryWebhookSignature, parseInventoryWebhookEvent, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_TOLERANCE_SEC, type VerifyInventoryWebhookOptions, } from './webhook.js';
|
|
22
|
-
export type { AddVariantRequest, Article, ArticleInput, ArticleListQuery, ArticleLookup, ArticlePage, ChangeStockConditionRequest, CreateArticleRequest, CreateInventoryWebhookOptions, CreateReservationRequest, CreateVariantGroupRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptItem, GoodsReceiptPreview, GoodsReceiptPreviewLine, GoodsReceiptPreviewRequest, InventoryShortfall, InventoryWarning, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookEnvelope, InventoryWebhookEvent, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestDelivery, InventoryWebhookTestResult, InventoryWebhookWithSecret, LandedCost, Location, LocationAddress, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationItem, ReleaseReservationRequest, Reservation, ReservationItem, ReservationItemInput, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockBelowMinimumEventData, StockChangedEventData, StockItem, StockLevel, StockListQuery, StockMovement, StockMovementLot, StockMovementPage, StockMovementQuery, StockMovementSourceRef, StockOperation, StockPage, StockResult, StockValue, TransferStockRequest, UpdateArticleRequest, UpdateVariantGroupRequest, VariantAttribute, VariantGroup, VariantGroupDefaults, VariantGroupDefaultsInput, VariantGroupListQuery, VariantGroupMember, VariantGroupPage, VariantInput, } from './typen.js';
|
|
23
|
-
export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, type InventoryEndpoint, type InventoryErrorCode, type InventoryRequestErrorCode, type InventoryWebhookEventType, type LocationType, type StockMovementType, type StockMovementSource, type StockCondition, type StockChangeCause, type WebhookDeliveryStatus, type InventoryWarningCode, type StockKind, type StockLossReason, type WithdrawalType, type LandedCostType, type LandedCostAllocation, type ReservationStatus, } from './vertrag.js';
|
|
24
|
+
export type { AddVariantRequest, Article, CancelStocktakeRequest, CloseStocktakeRequest, CloseStocktakeResult, CreateStocktakeRequest, RecordStocktakeCountRequest, RecountStocktakeRequest, ReviewStocktakeRequest, Stocktake, StocktakeActor, StocktakeCancellation, StocktakeClosing, StocktakeCount, StocktakeCountListQuery, StocktakeCountPage, StocktakeCountResult, StocktakeInventoryLine, StocktakeItem, StocktakeItemListQuery, StocktakeItemPage, StocktakeListQuery, StocktakeNotBooked, StocktakePage, StocktakePdf, StocktakePdfDownload, StocktakePdfInfo, StocktakeProgress, StocktakeRecount, StocktakeReview, StocktakeScope, StocktakeScopeInput, StocktakeSeal, StocktakeTotals, StocktakeWarning, VoidStocktakeCountRequest, ArticleInput, ArticleListQuery, ArticleLookup, ArticlePage, ChangeStockConditionRequest, CreateArticleRequest, CreateInventoryWebhookOptions, CreateReservationRequest, CreateVariantGroupRequest, DeactivateArticleRequest, ExtendReservationRequest, GoodsReceiptItem, GoodsReceiptPreview, GoodsReceiptPreviewLine, GoodsReceiptPreviewRequest, InventoryShortfall, InventoryWarning, InventoryWebhook, InventoryWebhookDelivery, InventoryWebhookEnvelope, InventoryWebhookEvent, InventoryWebhookList, InventoryWebhookPatch, InventoryWebhookTestDelivery, InventoryWebhookTestResult, InventoryWebhookWithSecret, LandedCost, Location, LocationAddress, ReceiveGoodsRequest, RecordStockLossRequest, ReleaseReservationItem, ReleaseReservationRequest, Reservation, ReservationItem, ReservationItemInput, ReservationListQuery, ReservationPage, ReverseStockMovementRequest, StockBelowMinimumEventData, StockChangedEventData, StockItem, StockLevel, StockListQuery, StockMovement, StockMovementLot, StockMovementPage, StockMovementQuery, StockMovementSourceRef, StockOperation, StockPage, StockResult, StockValue, TransferStockRequest, UpdateArticleRequest, UpdateVariantGroupRequest, VariantAttribute, VariantGroup, VariantGroupDefaults, VariantGroupDefaultsInput, VariantGroupListQuery, VariantGroupMember, VariantGroupPage, VariantInput, } from './typen.js';
|
|
25
|
+
export { INVENTORY_ENDPOINTS, INVENTORY_ERROR_CODES, INVENTORY_REQUEST_ERROR_CODES, INVENTORY_WEBHOOK_EVENTS, INVENTORY_WEBHOOK_ENVELOPE_FIELDS, INVENTORY_WEBHOOK_LIMIT, INVENTORY_LIST_LIMIT_MAX, LOCATION_TYPES, STOCK_MOVEMENT_TYPES, STOCK_MOVEMENT_SOURCES, STOCK_CONDITIONS, STOCK_CHANGE_CAUSES, WEBHOOK_DELIVERY_STATUSES, INVENTORY_WARNING_CODES, STOCK_KINDS, STOCK_LOSS_REASONS, WITHDRAWAL_TYPES, LANDED_COST_TYPES, LANDED_COST_ALLOCATIONS, RESERVATION_STATUSES, INVENTORY_IDEMPOTENCY_KEY_MAX, RESERVATION_MINUTES_MIN, RESERVATION_MINUTES_MAX, VARIANT_ATTRIBUTES_MAX, VARIANT_VALUES_MAX, VARIANT_MATRIX_MAX, VARIANT_GROUP_ACTIVE_MAX, STOCKTAKE_STATUSES, STOCKTAKE_TYPES, STOCKTAKE_SCOPE_TYPES, STOCKTAKE_CHECK_REASONS, STOCKTAKE_NOT_BOOKED_REASONS, STOCKTAKE_SOURCES, STOCKTAKE_ACTOR_TYPES, STOCKTAKE_INVENTORY_AS_OF, STOCKTAKE_ITEMS_MAX, STOCKTAKE_RECOUNT_ITEMS_MAX, STOCKTAKE_COUNTS_PER_ITEM_MAX, type StocktakeStatus, type StocktakeType, type StocktakeScopeType, type StocktakeCheckReason, type StocktakeNotBookedReason, type StocktakeSource, type StocktakeActorType, type StocktakeInventoryAsOf, type InventoryEndpoint, type InventoryErrorCode, type InventoryRequestErrorCode, type InventoryWebhookEventType, type LocationType, type StockMovementType, type StockMovementSource, type StockCondition, type StockChangeCause, type WebhookDeliveryStatus, type InventoryWarningCode, type StockKind, type StockLossReason, type WithdrawalType, type LandedCostType, type LandedCostAllocation, type ReservationStatus, } from './vertrag.js';
|