@kreiseck/kasseneck-api 1.35.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -9
- package/dist/cjs/client/api.d.ts +15 -1
- package/dist/cjs/client/api.js +4 -0
- package/dist/cjs/client/aufrufe.d.ts +2 -2
- package/dist/cjs/client/aufrufe.js +10 -0
- package/dist/cjs/client/auth.d.ts +9 -3
- package/dist/cjs/client/auth.js +5 -4
- package/dist/cjs/client/ewp.d.ts +125 -0
- package/dist/cjs/client/ewp.js +95 -0
- package/dist/cjs/client/index.d.ts +1 -0
- package/dist/cjs/client/index.js +4 -1
- package/dist/cjs/client/list-deposit-types.d.ts +3 -0
- package/dist/cjs/client/list-deposit-types.js +3 -0
- package/dist/cjs/client/receipts.d.ts +3 -3
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/invoice/index.d.ts +2 -2
- package/dist/cjs/invoice/index.js +2 -1
- package/dist/cjs/invoice/texte.d.ts +5 -0
- package/dist/cjs/invoice/texte.js +10 -0
- package/dist/cjs/invoice/typen.d.ts +34 -1
- package/dist/cjs/invoice/vertrag.d.ts +13 -4
- package/dist/cjs/invoice/vertrag.js +29 -6
- package/dist/cjs/payments/hobex-hps/connect-client.d.ts +43 -1
- package/dist/cjs/payments/hobex-hps/connect-client.js +51 -1
- package/dist/cjs/payments/hobex-hps/outcome.d.ts +4 -3
- package/dist/cjs/payments/hobex-hps/payments.d.ts +85 -35
- package/dist/cjs/payments/hobex-hps/payments.js +137 -53
- package/dist/cjs/receipt/layout.js +1 -1
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/api.d.ts +15 -1
- package/dist/esm/client/api.js +4 -0
- package/dist/esm/client/aufrufe.d.ts +2 -2
- package/dist/esm/client/aufrufe.js +10 -0
- package/dist/esm/client/auth.d.ts +9 -3
- package/dist/esm/client/auth.js +5 -4
- package/dist/esm/client/ewp.d.ts +125 -0
- package/dist/esm/client/ewp.js +89 -0
- package/dist/esm/client/index.d.ts +1 -0
- package/dist/esm/client/index.js +1 -0
- package/dist/esm/client/list-deposit-types.d.ts +3 -0
- package/dist/esm/client/list-deposit-types.js +3 -0
- package/dist/esm/client/receipts.d.ts +3 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/invoice/index.d.ts +2 -2
- package/dist/esm/invoice/index.js +1 -1
- package/dist/esm/invoice/texte.d.ts +5 -0
- package/dist/esm/invoice/texte.js +10 -0
- package/dist/esm/invoice/typen.d.ts +34 -1
- package/dist/esm/invoice/vertrag.d.ts +13 -4
- package/dist/esm/invoice/vertrag.js +28 -5
- package/dist/esm/payments/hobex-hps/connect-client.d.ts +43 -1
- package/dist/esm/payments/hobex-hps/connect-client.js +50 -1
- package/dist/esm/payments/hobex-hps/outcome.d.ts +4 -3
- package/dist/esm/payments/hobex-hps/payments.d.ts +85 -35
- package/dist/esm/payments/hobex-hps/payments.js +138 -54
- package/dist/esm/receipt/layout.js +1 -1
- 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-cases.json +654 -0
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api-examples/issue-error-deposit.json +39 -0
- package/fixtures/invoice-api-examples/issue-invoice-deposit.json +55 -0
- package/fixtures/invoice-api.schema.json +65 -2
- package/fixtures/invoice-texts.json +11 -1
- package/fixtures/manifest.json +1 -1
- package/fixtures/pos-texts.json +1 -1
- package/fixtures/receipts/card-hobex-hps.json +1 -1
- package/fixtures/surface.json +13 -4
- package/fixtures/v3/antworten/belege.json +1 -1
- package/fixtures/v3/antworten/belegmail.json +1 -1
- package/fixtures/v3/antworten/berichte.json +1 -1
- package/fixtures/v3/antworten/kasse-belege.json +1 -1
- package/fixtures/v3/antworten/kasse.json +2 -2
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +1 -1
- package/fixtures/v3/antworten/storno.json +1 -1
- package/fixtures/v3/stored/belege.json +1 -1
- package/fixtures/v3/stored/kasse.json +2 -2
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +358 -5
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
|
|
2
2
|
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
3
|
-
export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
3
|
+
export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, EWP_REASONS, EWP_WARNING_CODES, type EwpReason, type EwpWarningCode, type EwpMasterData, type EwpLineSources, type EwpLine, type EwpWarning, type EwpExtraQuantity, type EwpExtraQuantityInput, type EwpReport, type EwpReportFile, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
|
|
6
6
|
export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, } from './pos/index.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isPaymentErrorCode = exports.PAYMENT_ERROR_CODES = exports.toReceiptPaymentPayload = exports.fromReceiptPaymentPayload = exports.cancellationFieldErrors = exports.isCancellationError = exports.cancellationErrorCode = exports.isCancellationErrorCode = exports.isReturnDisposition = exports.isCancellationReason = exports.CANCELLATION_RESERVATION_MS = exports.CANCELLATION_ERROR_CODES = exports.CANCELLATION_STATUSES = exports.CANCELLATION_REASONS = exports.RETURN_DISPOSITIONS = exports.receiptValueVoucherSign = exports.receiptSumCents = exports.receiptSubSumCents = exports.fromReceiptPayload = exports.toReceiptPayload = exports.EXTERNAL_VOUCHER_VAT_RATES_BP = exports.EXTERNAL_VOUCHER_TAXED_WITH_MAX = exports.EXTERNAL_VOUCHER_NUMBER_MAX = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.checkExternalVoucherNumber = exports.normalizeExternalVoucherNumber = exports.externalVoucherIsValid = exports.isExternalVoucher = exports.VOUCHER_SOURCES = exports.voucherIsValid = exports.fromVoucherPayload = exports.toVoucherPayload = exports.isDepositReturnItem = exports.isDepositItem = exports.isVoucherFloatItem = exports.isVoucherItem = exports.isTipItem = exports.negateReceiptItem = exports.receiptItemIsValid = exports.receiptItemTotalCents = exports.fromReceiptItemPayload = exports.toReceiptItemPayload = exports.StripeLinkMode = exports.VoucherAction = exports.VoucherType = exports.CreditCardProvider = exports.KeckPaymentMethod = exports.VatRate = exports.ReceiptType = void 0;
|
|
4
4
|
exports.hobexReceiptNeedsSignature = exports.hobexReceiptToCardPaymentData = exports.fromHobexReceiptPayload = exports.toHobexReceiptPayload = exports.fromStripeUrlSessionPayload = exports.toStripeUrlSessionPayload = exports.reportMonthReadable = exports.reportMonthKey = exports.nextReportMonth = exports.previousReportMonth = exports.reportMonthFromDate = exports.isZeroKind = exports.ZERO_KINDS = exports.fromReceiptSummaryPayload = exports.fromCashregisterPayload = exports.receiptCompanyTaxInfo = exports.fromReceiptCompanyPayload = exports.asksRefundTip = exports.asksTipRefundSource = exports.cancellationCashRefundCents = exports.cancellationItemsForTip = exports.openStaffTipCents = exports.isTipRefundSource = exports.TIP_REFUND_SOURCES = exports.remainingQuantities = exports.receiptFieldErrors = exports.isReceiptError = exports.receiptErrorCode = exports.isReceiptErrorCode = exports.RECEIPT_ERROR_CODES = exports.receiptOutputFieldErrors = exports.isReceiptOutputError = exports.receiptOutputErrorCode = exports.isReceiptOutputErrorCode = exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = exports.receiptEmailFieldErrors = exports.isReceiptEmailError = exports.receiptEmailErrorCode = exports.isReceiptEmailErrorCode = exports.RECEIPT_EMAIL_VIAS = exports.RECEIPT_EMAIL_SEND_ERROR_CODES = exports.RECEIPT_EMAIL_ERROR_CODES = exports.paymentFieldErrors = exports.isPaymentError = exports.paymentErrorCode = void 0;
|
|
5
5
|
exports.LIST_RECEIPTS_VIEWS = exports.listedReceiptWithCompany = exports.fromListReceiptsSummaryPayload = exports.listAllReceipts = exports.listReceipts = exports.getReportV2 = exports.getCashregisterReport = exports.downloadMonthlyReport = exports.downloadDailyReport = exports.logReceiptOutputs = exports.sendReceiptEmail = exports.checkVoucherCombinationError = exports.listMyCashregisters = exports.listMyReceipts = exports.getFirstReceiptDate = exports.generateFullReceiptId = exports.getReceiptWithCompany = exports.getReceipt = exports.zeroReceipt = exports.cancelReceipt = exports.receiptLayoutFromResult = exports.cardRefundReference = exports.paymentsExpectedCents = exports.sellReceiptWithCompany = exports.sellReceipt = exports.isOutcomeUnknown = exports.isKasseneckValidationError = exports.isKasseneckNetworkError = exports.isKasseneckHttpError = exports.isKasseneckAuthError = exports.isKasseneckApiError = exports.CLIENT_ERROR_CODES = exports.KasseneckValidationError = exports.KasseneckNetworkError = exports.KasseneckHttpError = exports.KasseneckAuthError = exports.KasseneckApiError = exports.createFileOrDataTransport = exports.createPdfOrDataTransport = exports.createBinaryTransport = exports.createTransport = exports.UNKNOWN_OUTCOME_CALLS = exports.POS_CALLS = exports.PUBLIC_CALLS = exports.ALL_CALLS = exports.DEFAULT_TIMEOUT_MS = exports.POS_BASE_URL = exports.DEFAULT_BASE_URL = exports.registerUserAuth = exports.apiKeyAuth = void 0;
|
|
6
|
-
exports.
|
|
7
|
-
exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = void 0;
|
|
6
|
+
exports.parseServerTimeStamp = exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.createKasseneckApi = exports.getSignatureStatus = exports.getCashboxStatus = exports.EWP_WARNING_CODES = exports.EWP_REASONS = exports.TERMINAL_REQUESTED_BY_MAX = exports.TERMINAL_APP_MAX = exports.TERMINAL_LABEL_MAX = exports.TERMINAL_ERROR_CODES = exports.TERMINAL_CODE_SOURCES = exports.TERMINAL_CODE_STATUSES = exports.TERMINAL_SETUP_STATES = exports.TERMINAL_PLATFORMS = exports.reportTerminalReady = exports.reportTerminalLogin = exports.getTerminalCode = exports.requestTerminalCode = exports.claimTerminal = exports.getTerminalAccess = exports.registerTerminalDevice = exports.DEP_EXPORT_DOWNLOAD_TIMEOUT_MS = exports.DEP_EXPORT_WAIT_TIMEOUT_MS = exports.DEP_EXPORT_POLL_MAX_MS = exports.DEP_EXPORT_POLL_FACTOR = exports.DEP_EXPORT_POLL_START_MS = exports.DEP_EXPORT_FAILURES = exports.DEP_EXPORT_ERROR_CODES = exports.DEP_EXPORT_FILES = exports.DEP_EXPORT_STATUSES = exports.DepExportChecksumError = exports.DepExportTimeoutError = exports.revokeDepHandoverLink = exports.createDepHandoverLink = exports.getDepExportFile = exports.waitForDepExport = exports.getDepExport = exports.createDepExport = exports.LIST_RECEIPTS_ERROR_CODES = exports.LIST_ALL_RECEIPTS_MAX_PAGES = exports.LIST_RECEIPTS_DAYS_MAX = exports.LIST_RECEIPTS_LIMIT_MAX = exports.LIST_RECEIPTS_ORDERS = void 0;
|
|
7
|
+
exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.mergePosSettings = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.toViennaWallClock = void 0;
|
|
8
8
|
var index_js_1 = require("./enums/index.js");
|
|
9
9
|
Object.defineProperty(exports, "ReceiptType", { enumerable: true, get: function () { return index_js_1.ReceiptType; } });
|
|
10
10
|
Object.defineProperty(exports, "VatRate", { enumerable: true, get: function () { return index_js_1.VatRate; } });
|
|
@@ -195,6 +195,8 @@ Object.defineProperty(exports, "TERMINAL_ERROR_CODES", { enumerable: true, get:
|
|
|
195
195
|
Object.defineProperty(exports, "TERMINAL_LABEL_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_LABEL_MAX; } });
|
|
196
196
|
Object.defineProperty(exports, "TERMINAL_APP_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_APP_MAX; } });
|
|
197
197
|
Object.defineProperty(exports, "TERMINAL_REQUESTED_BY_MAX", { enumerable: true, get: function () { return index_js_3.TERMINAL_REQUESTED_BY_MAX; } });
|
|
198
|
+
Object.defineProperty(exports, "EWP_REASONS", { enumerable: true, get: function () { return index_js_3.EWP_REASONS; } });
|
|
199
|
+
Object.defineProperty(exports, "EWP_WARNING_CODES", { enumerable: true, get: function () { return index_js_3.EWP_WARNING_CODES; } });
|
|
198
200
|
Object.defineProperty(exports, "getCashboxStatus", { enumerable: true, get: function () { return index_js_3.getCashboxStatus; } });
|
|
199
201
|
Object.defineProperty(exports, "getSignatureStatus", { enumerable: true, get: function () { return index_js_3.getSignatureStatus; } });
|
|
200
202
|
Object.defineProperty(exports, "createKasseneckApi", { enumerable: true, get: function () { return index_js_3.createKasseneckApi; } });
|
|
@@ -14,8 +14,8 @@ export { createInvoiceApi, type InvoiceApi, type InvoiceApiOptions } from './api
|
|
|
14
14
|
export { invoiceKeyAuth, type InvoiceKeyAuthOptions } from './auth.js';
|
|
15
15
|
export { isInvoiceError, isInvoiceErrorCode, invoiceErrorCode, invoiceFieldErrors, type InvoiceApiErrorCode, type InvoiceFieldError, } from './fehler.js';
|
|
16
16
|
export { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoice, getInvoicePdf, getInvoiceSetupStatus, getInvoiceXml, issueInvoice, listBrands, listInvoices, previewInvoice, recordInvoicePayment, searchCustomers, updateCustomer, } from './endpunkte.js';
|
|
17
|
-
export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceSupplyDateProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
|
|
17
|
+
export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, InvoiceItemDepositInput, InvoiceItemDeposit, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceSupplyDateProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
|
|
18
18
|
export { INVOICE_TEXTS, invoiceText, type InvoiceTextKey } from './texte.js';
|
|
19
19
|
export { computeInvoiceTotals, ZERO_RATED_TAX_SCHEMES, type TotalsItem } from './summen.js';
|
|
20
20
|
export { proratedPriceMicros, MAX_AMOUNT_CENTS, itemFromEuro, formatUnitPrice, CalcError, calculateInvoice, roundDiv, vatRateMapKey, formatVatRate, type CalcResult, type CalcErrorCode, type CalcOptions, type CalcItem, type RateTotal, type ItemConversion, type ConversionReason, type LineAmount, } from './calc.js';
|
|
21
|
-
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, type InvoiceEndpoint, type InvoiceErrorCode, type InvoiceRequestErrorCode, type CreditNoteReason, type ReturnDisposition, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type EInvoiceMissingCode, type WriteOffReasonCode, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type FieldFormat, type Field, } from './vertrag.js';
|
|
21
|
+
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, DEPOSIT_ITEM_FIELD, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, type InvoiceEndpoint, type InvoiceErrorCode, type InvoiceRequestErrorCode, type CreditNoteReason, type ReturnDisposition, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type EInvoiceMissingCode, type WriteOffReasonCode, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type FieldFormat, type Field, } from './vertrag.js';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.WRITE_OFF_REASON_CODES = exports.EINVOICE_MISSING_CODES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_REQUEST_ERROR_CODES = exports.INVOICE_ERROR_CODES = exports.INVOICE_ENDPOINTS = exports.INVOICE_CONTRACT_VERSION = exports.formatVatRate = exports.vatRateMapKey = exports.roundDiv = exports.calculateInvoice = exports.CalcError = exports.formatUnitPrice = exports.itemFromEuro = exports.MAX_AMOUNT_CENTS = exports.proratedPriceMicros = exports.ZERO_RATED_TAX_SCHEMES = exports.computeInvoiceTotals = exports.invoiceText = exports.INVOICE_TEXTS = exports.updateCustomer = exports.searchCustomers = exports.recordInvoicePayment = exports.previewInvoice = exports.listInvoices = exports.listBrands = exports.issueInvoice = exports.getInvoiceXml = exports.getInvoiceSetupStatus = exports.getInvoicePdf = exports.getInvoice = exports.getCustomer = exports.createCustomer = exports.createCreditNote = exports.cancelInvoice = exports.invoiceFieldErrors = exports.invoiceErrorCode = exports.isInvoiceErrorCode = exports.isInvoiceError = exports.invoiceKeyAuth = exports.createInvoiceApi = void 0;
|
|
16
|
-
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.ITEM_PRICE_EXACTLY_ONE = exports.RETURN_DISPOSITIONS = exports.CREDIT_NOTE_ITEM_FIELDS = exports.INVOICE_ITEM_FIELDS = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.REVERSE_CHARGE_REASONS = exports.ITEM_KINDS = void 0;
|
|
16
|
+
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.ITEM_PRICE_EXACTLY_ONE = exports.RETURN_DISPOSITIONS = exports.DEPOSIT_ITEM_FIELD = exports.CREDIT_NOTE_ITEM_FIELDS = exports.INVOICE_ITEM_FIELDS = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.REVERSE_CHARGE_REASONS = exports.ITEM_KINDS = void 0;
|
|
17
17
|
var api_js_1 = require("./api.js");
|
|
18
18
|
Object.defineProperty(exports, "createInvoiceApi", { enumerable: true, get: function () { return api_js_1.createInvoiceApi; } });
|
|
19
19
|
var auth_js_1 = require("./auth.js");
|
|
@@ -82,6 +82,7 @@ Object.defineProperty(exports, "CUSTOMER_FIELDS", { enumerable: true, get: funct
|
|
|
82
82
|
Object.defineProperty(exports, "ITEM_FIELDS", { enumerable: true, get: function () { return vertrag_js_1.ITEM_FIELDS; } });
|
|
83
83
|
Object.defineProperty(exports, "INVOICE_ITEM_FIELDS", { enumerable: true, get: function () { return vertrag_js_1.INVOICE_ITEM_FIELDS; } });
|
|
84
84
|
Object.defineProperty(exports, "CREDIT_NOTE_ITEM_FIELDS", { enumerable: true, get: function () { return vertrag_js_1.CREDIT_NOTE_ITEM_FIELDS; } });
|
|
85
|
+
Object.defineProperty(exports, "DEPOSIT_ITEM_FIELD", { enumerable: true, get: function () { return vertrag_js_1.DEPOSIT_ITEM_FIELD; } });
|
|
85
86
|
Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return vertrag_js_1.RETURN_DISPOSITIONS; } });
|
|
86
87
|
Object.defineProperty(exports, "ITEM_PRICE_EXACTLY_ONE", { enumerable: true, get: function () { return vertrag_js_1.ITEM_PRICE_EXACTLY_ONE; } });
|
|
87
88
|
Object.defineProperty(exports, "INVOICE_REQUESTS", { enumerable: true, get: function () { return vertrag_js_1.INVOICE_REQUESTS; } });
|
|
@@ -45,6 +45,10 @@ declare const DE: {
|
|
|
45
45
|
readonly 'pdf.totals.included_vat': "darin {rate}% USt von {net} netto";
|
|
46
46
|
readonly 'pdf.totals.grand_total.invoice': "Gesamtbetrag";
|
|
47
47
|
readonly 'pdf.totals.grand_total.credit_note': "Gutschriftsbetrag";
|
|
48
|
+
readonly 'pdf.totals.single_use_deposit': "0 % Einwegpfand, nicht steuerbar";
|
|
49
|
+
readonly 'pdf.totals.head_rate': "Satz";
|
|
50
|
+
readonly 'pdf.totals.head_net': "Netto";
|
|
51
|
+
readonly 'pdf.totals.head_vat': "USt";
|
|
48
52
|
readonly 'tax.small_business': "Gemäß § 6 Abs. 1 Z 27 UStG wird keine Umsatzsteuer verrechnet (Kleinunternehmer).";
|
|
49
53
|
readonly 'tax.intra_community_supply.title': "Steuerfreie innergemeinschaftliche Lieferung. ";
|
|
50
54
|
readonly 'tax.intra_community_supply.text': "Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.";
|
|
@@ -117,6 +121,7 @@ declare const DE: {
|
|
|
117
121
|
readonly 'einvoice.exemption.intra_community_supply': "Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG";
|
|
118
122
|
readonly 'einvoice.exemption.outside_scope': "Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
|
|
119
123
|
readonly 'einvoice.exemption.export_third_country': "Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG";
|
|
124
|
+
readonly 'einvoice.exemption.single_use_deposit': "Pfand Einweg, nicht steuerbar (UStR Rz 8)";
|
|
120
125
|
readonly 'einvoice.payable_until': "Zahlbar bis {date}";
|
|
121
126
|
readonly 'unit_symbol.piece': "Stk";
|
|
122
127
|
readonly 'unit_symbol.pair': "Paar";
|
|
@@ -32,6 +32,10 @@ const DE = {
|
|
|
32
32
|
'pdf.totals.included_vat': 'darin {rate}% USt von {net} netto',
|
|
33
33
|
'pdf.totals.grand_total.invoice': 'Gesamtbetrag',
|
|
34
34
|
'pdf.totals.grand_total.credit_note': 'Gutschriftsbetrag',
|
|
35
|
+
'pdf.totals.single_use_deposit': '0 % Einwegpfand, nicht steuerbar',
|
|
36
|
+
'pdf.totals.head_rate': 'Satz',
|
|
37
|
+
'pdf.totals.head_net': 'Netto',
|
|
38
|
+
'pdf.totals.head_vat': 'USt',
|
|
35
39
|
'tax.small_business': 'Gemäß § 6 Abs. 1 Z 27 UStG wird keine Umsatzsteuer verrechnet (Kleinunternehmer).',
|
|
36
40
|
'tax.intra_community_supply.title': 'Steuerfreie innergemeinschaftliche Lieferung. ',
|
|
37
41
|
'tax.intra_community_supply.text': 'Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.',
|
|
@@ -112,6 +116,7 @@ const DE = {
|
|
|
112
116
|
'einvoice.exemption.intra_community_supply': 'Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG',
|
|
113
117
|
'einvoice.exemption.outside_scope': 'Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
|
|
114
118
|
'einvoice.exemption.export_third_country': 'Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG',
|
|
119
|
+
'einvoice.exemption.single_use_deposit': 'Pfand Einweg, nicht steuerbar (UStR Rz 8)',
|
|
115
120
|
'einvoice.payable_until': 'Zahlbar bis {date}',
|
|
116
121
|
'unit_symbol.piece': 'Stk',
|
|
117
122
|
'unit_symbol.pair': 'Paar',
|
|
@@ -242,6 +247,10 @@ const EN = {
|
|
|
242
247
|
'pdf.totals.included_vat': 'incl. {rate}% VAT on {net} net',
|
|
243
248
|
'pdf.totals.grand_total.invoice': 'Total',
|
|
244
249
|
'pdf.totals.grand_total.credit_note': 'Credit total',
|
|
250
|
+
'pdf.totals.single_use_deposit': '0 % single-use deposit, not subject to VAT',
|
|
251
|
+
'pdf.totals.head_rate': 'Rate',
|
|
252
|
+
'pdf.totals.head_net': 'Net',
|
|
253
|
+
'pdf.totals.head_vat': 'VAT',
|
|
245
254
|
'tax.small_business': 'No VAT charged pursuant to § 6 (1) no. 27 UStG (small business exemption).',
|
|
246
255
|
'tax.intra_community_supply.title': 'VAT-exempt intra-Community supply. ',
|
|
247
256
|
'tax.intra_community_supply.text': 'Pursuant to Art. 6 (1) UStG (Art. 138 of VAT Directive 2006/112/EC). The acquisition is taxed by the customer in the country of destination.',
|
|
@@ -314,6 +323,7 @@ const EN = {
|
|
|
314
323
|
'einvoice.exemption.intra_community_supply': 'VAT-exempt intra-Community supply pursuant to Art. 6 (1) UStG',
|
|
315
324
|
'einvoice.exemption.outside_scope': 'Outside the scope of VAT – place of supply abroad (§ 3a (6) UStG)',
|
|
316
325
|
'einvoice.exemption.export_third_country': 'VAT-exempt export delivery pursuant to § 6 (1) no. 1 UStG',
|
|
326
|
+
'einvoice.exemption.single_use_deposit': 'Single-use deposit, not subject to VAT (UStR para. 8)',
|
|
317
327
|
'einvoice.payable_until': 'Payable by {date}',
|
|
318
328
|
'unit_symbol.piece': 'pcs',
|
|
319
329
|
'unit_symbol.pair': 'pair',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Wiener Kalender.
|
|
7
7
|
*/
|
|
8
8
|
import type { CreditNoteReason, CustomerType, DocType, EInvoiceFormat, EInvoiceMissingCode, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, ReturnDisposition, TaxScheme, VatRatePercent, WriteOffReasonCode } from './vertrag.js';
|
|
9
|
+
import type { DepositKind } from '../pos/pfand.js';
|
|
9
10
|
export interface CustomerInput {
|
|
10
11
|
type: CustomerType;
|
|
11
12
|
name: string;
|
|
@@ -89,11 +90,30 @@ export interface InvoiceItemInput {
|
|
|
89
90
|
/** Artikel aus dem Artikelstamm; bestandsgefuehrt bucht das Ausstellen ihn vom Lager ab. */
|
|
90
91
|
articleId?: string;
|
|
91
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Pfandangabe an einer Position (`deposit`, seit 1.36.0): die Position ist eine
|
|
95
|
+
* Pfandzeile zu der Position `depositFor` derselben Anfrage. Die Pfandarten des
|
|
96
|
+
* Betriebs liefert `listDepositTypes`. Ohne eingeschaltetes Pfand antwortet der
|
|
97
|
+
* Server mit `deposit_not_enabled`.
|
|
98
|
+
*/
|
|
99
|
+
export interface InvoiceItemDepositInput {
|
|
100
|
+
/** Kennung der Pfandart (`DepositType.id`). */
|
|
101
|
+
depositTypeId: string;
|
|
102
|
+
/** Index der Position in `items`, zu der dieses Pfand gehoert (0 bis 499). */
|
|
103
|
+
depositFor: number;
|
|
104
|
+
/** GTIN der Verpackung, 8 bis 14 Ziffern (fuer die EWP-Meldung). */
|
|
105
|
+
gtin?: string;
|
|
106
|
+
/** Eigene Abfuellung (Mehrweg des Betriebs selbst). */
|
|
107
|
+
ownFilling?: boolean;
|
|
108
|
+
}
|
|
92
109
|
/**
|
|
93
110
|
* Eine Position beim Ausstellen (`issueInvoice`): dazu optional die
|
|
94
|
-
* Reservierung aus der Lager-API, die diese Position einloest
|
|
111
|
+
* Reservierung aus der Lager-API, die diese Position einloest, und die
|
|
112
|
+
* Pfandangabe.
|
|
95
113
|
*/
|
|
96
114
|
export interface IssueInvoiceItemInput extends InvoiceItemInput {
|
|
115
|
+
/** Diese Position ist eine Pfandzeile (siehe [InvoiceItemDepositInput]). */
|
|
116
|
+
deposit?: InvoiceItemDepositInput;
|
|
97
117
|
/**
|
|
98
118
|
* Kennung aus `createReservation` (`./inventory`); braucht `articleId`.
|
|
99
119
|
* Geprueft beim Ausstellen (`reservation_not_found`, `reservation_mismatch`,
|
|
@@ -104,6 +124,8 @@ export interface IssueInvoiceItemInput extends InvoiceItemInput {
|
|
|
104
124
|
}
|
|
105
125
|
/** Eine Gutschriftsposition: wie eine Rechnungsposition (ohne Reservierung), dazu die Rueckgabe-Wahl. */
|
|
106
126
|
export interface CreditNoteItemInput extends InvoiceItemInput {
|
|
127
|
+
/** Diese Position ist eine Pfandzeile (siehe [InvoiceItemDepositInput]). */
|
|
128
|
+
deposit?: InvoiceItemDepositInput;
|
|
107
129
|
/** Wohin die Ware dieser Position geht; fehlt = Vorgabe des Aufrufs bzw. `restock`. */
|
|
108
130
|
returnDisposition?: ReturnDisposition;
|
|
109
131
|
}
|
|
@@ -333,6 +355,17 @@ export interface InvoiceItem {
|
|
|
333
355
|
unitPriceMicros?: number;
|
|
334
356
|
vatRate: number;
|
|
335
357
|
discountPct: number;
|
|
358
|
+
/** Nur an Pfandzeilen: die Pfandangabe, wie der Server sie fuehrt (siehe [InvoiceItemDeposit]). */
|
|
359
|
+
deposit?: InvoiceItemDeposit;
|
|
360
|
+
}
|
|
361
|
+
/** Die Pfandangabe einer gespeicherten Position (`getInvoice`): wie gesendet, dazu die Art der Pfandart. */
|
|
362
|
+
export interface InvoiceItemDeposit {
|
|
363
|
+
depositTypeId: string;
|
|
364
|
+
/** Einweg oder Mehrweg, vom Server aus der Pfandart gesetzt. */
|
|
365
|
+
depositKind: DepositKind;
|
|
366
|
+
depositFor: number;
|
|
367
|
+
gtin?: string;
|
|
368
|
+
ownFilling?: boolean;
|
|
336
369
|
}
|
|
337
370
|
/**
|
|
338
371
|
* Eine gebuchte Zahlung in `getInvoice`. Bei Altbestand kann jede Angabe ausser
|
|
@@ -27,7 +27,7 @@ export type InvoiceEndpoint = (typeof INVOICE_ENDPOINTS)[number];
|
|
|
27
27
|
* Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
|
|
28
28
|
* aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
|
|
29
29
|
*/
|
|
30
|
-
export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken"];
|
|
30
|
+
export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken", "deposit_not_enabled", "deposit_type_not_found", "deposit_set_by_server", "invalid_deposit_quantity", "invalid_deposit"];
|
|
31
31
|
export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
|
|
32
32
|
/**
|
|
33
33
|
* Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
|
|
@@ -210,6 +210,7 @@ export type Field = {
|
|
|
210
210
|
min?: number;
|
|
211
211
|
max: number;
|
|
212
212
|
format?: FieldFormat;
|
|
213
|
+
pattern?: string;
|
|
213
214
|
} | {
|
|
214
215
|
type: 'integer';
|
|
215
216
|
required: boolean;
|
|
@@ -270,9 +271,17 @@ export declare const CUSTOMER_FIELDS: Readonly<Record<string, Field>>;
|
|
|
270
271
|
* die bisher gerundet eingereicht werden mussten.
|
|
271
272
|
*/
|
|
272
273
|
export declare const ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
274
|
+
/**
|
|
275
|
+
* Pfandangabe an einer Position (seit 1.36.0, `deposit`): die Position ist eine
|
|
276
|
+
* Pfandzeile zu der Position `depositFor` (Index in `items`, 0 bis 499). Gleich
|
|
277
|
+
* dem Feld `DEPOSIT_FELD` des Backends. Zeile fuer Zeile Pfand sendet das
|
|
278
|
+
* Fremdsystem selbst; zu einer Position mit `articleId` leitet der Server das
|
|
279
|
+
* Pfand ab (`deposit_set_by_server`).
|
|
280
|
+
*/
|
|
281
|
+
export declare const DEPOSIT_ITEM_FIELD: Field;
|
|
273
282
|
/**
|
|
274
283
|
* Eine Rechnungsposition beim Ausstellen: die gemeinsamen Positionsfelder plus
|
|
275
|
-
* `reservationId` (seit 1.5.0). Die Reservierung aus der Lager-API
|
|
284
|
+
* `reservationId` (seit 1.5.0) und `deposit` (seit 1.36.0). Die Reservierung aus der Lager-API
|
|
276
285
|
* (`createReservation`) wird beim Ausstellen geprueft und beim Buchen der
|
|
277
286
|
* Rechnung eingeloest; die Position braucht dazu `articleId`. Unbekannt =
|
|
278
287
|
* `reservation_not_found`, schon eingeloest oder freigegeben =
|
|
@@ -287,8 +296,8 @@ export declare const INVOICE_ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
|
287
296
|
export declare const ITEM_PRICE_EXACTLY_ONE: readonly (readonly string[])[];
|
|
288
297
|
/**
|
|
289
298
|
* Eine Gutschriftsposition: die gemeinsamen Positionsfelder plus
|
|
290
|
-
* `returnDisposition` (wohin die zurueckgenommene Ware geht)
|
|
291
|
-
* `reservationId`. An einer Rechnungsposition weist der Server
|
|
299
|
+
* `returnDisposition` (wohin die zurueckgenommene Ware geht) und `deposit`
|
|
300
|
+
* (seit 1.36.0), ohne `reservationId`. An einer Rechnungsposition weist der Server
|
|
292
301
|
* `returnDisposition` als unbekannt ab.
|
|
293
302
|
*/
|
|
294
303
|
export declare const CREDIT_NOTE_ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* Nummer, Summen — ist bewusst **nicht** setzbar.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.PAYMENT_FIELDS = exports.CREDIT_NOTE_ITEM_FIELDS = exports.ITEM_PRICE_EXACTLY_ONE = exports.INVOICE_ITEM_FIELDS = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.WRITE_OFF_REASON_CODES = exports.EINVOICE_MISSING_CODES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.ITEM_KINDS = exports.REVERSE_CHARGE_REASONS = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_REQUEST_ERROR_CODES = exports.INVOICE_ERROR_CODES = exports.INVOICE_ENDPOINTS = exports.INVOICE_CONTRACT_VERSION = exports.RETURN_DISPOSITIONS = void 0;
|
|
22
|
+
exports.INVOICE_AT_LEAST_ONE = exports.INVOICE_EXACTLY_ONE = exports.INVOICE_REQUESTS = exports.PAYMENT_FIELDS = exports.CREDIT_NOTE_ITEM_FIELDS = exports.ITEM_PRICE_EXACTLY_ONE = exports.INVOICE_ITEM_FIELDS = exports.DEPOSIT_ITEM_FIELD = exports.ITEM_FIELDS = exports.CUSTOMER_FIELDS = exports.INVOICE_SETUP_REQUIREMENTS = exports.INVOICE_UNIT_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.WRITE_OFF_REASON_CODES = exports.EINVOICE_MISSING_CODES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.ITEM_KINDS = exports.REVERSE_CHARGE_REASONS = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_REQUEST_ERROR_CODES = exports.INVOICE_ERROR_CODES = exports.INVOICE_ENDPOINTS = exports.INVOICE_CONTRACT_VERSION = exports.RETURN_DISPOSITIONS = void 0;
|
|
23
23
|
const cancellation_js_1 = require("../models/cancellation.js");
|
|
24
24
|
Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return cancellation_js_1.RETURN_DISPOSITIONS; } });
|
|
25
25
|
exports.INVOICE_CONTRACT_VERSION = 2;
|
|
@@ -82,6 +82,12 @@ exports.INVOICE_ERROR_CODES = [
|
|
|
82
82
|
'reservation_not_active', // schon eingeloest oder freigegeben
|
|
83
83
|
// Seit 1.15.0 (Vertrag): die Rechnungsnummer ist schon vergeben (§ 11 Abs. 1 Z 3 lit. h UStG), nichts ausgestellt.
|
|
84
84
|
'invoice_number_taken',
|
|
85
|
+
// Seit 1.36.0 (Vertrag): Pfand an Positionen (`items[].deposit`), hinten angehaengt.
|
|
86
|
+
'deposit_not_enabled', // Pfand ist fuer dieses Konto nicht eingeschaltet
|
|
87
|
+
'deposit_type_not_found', // die Pfandart gibt es nicht (oder ist stillgelegt)
|
|
88
|
+
'deposit_set_by_server', // das Pfand zu einer Artikelposition leitet der Server selbst ab
|
|
89
|
+
'invalid_deposit_quantity', // die Pfandmenge passt nicht zur Menge der Position
|
|
90
|
+
'invalid_deposit', // sonstige Pfandangabe unzulaessig, `index` nennt die Position
|
|
85
91
|
];
|
|
86
92
|
/**
|
|
87
93
|
* Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
|
|
@@ -450,9 +456,26 @@ exports.ITEM_FIELDS = Object.freeze({
|
|
|
450
456
|
*/
|
|
451
457
|
articleId: id,
|
|
452
458
|
});
|
|
459
|
+
/**
|
|
460
|
+
* Pfandangabe an einer Position (seit 1.36.0, `deposit`): die Position ist eine
|
|
461
|
+
* Pfandzeile zu der Position `depositFor` (Index in `items`, 0 bis 499). Gleich
|
|
462
|
+
* dem Feld `DEPOSIT_FELD` des Backends. Zeile fuer Zeile Pfand sendet das
|
|
463
|
+
* Fremdsystem selbst; zu einer Position mit `articleId` leitet der Server das
|
|
464
|
+
* Pfand ab (`deposit_set_by_server`).
|
|
465
|
+
*/
|
|
466
|
+
exports.DEPOSIT_ITEM_FIELD = Object.freeze({
|
|
467
|
+
type: 'object',
|
|
468
|
+
required: false,
|
|
469
|
+
fields: Object.freeze({
|
|
470
|
+
depositTypeId: { type: 'string', required: true, min: 1, max: 128 },
|
|
471
|
+
depositFor: { type: 'integer', required: true, min: 0, max: 499 },
|
|
472
|
+
gtin: { type: 'string', required: false, min: 8, max: 14, pattern: '^[0-9]{8,14}$' },
|
|
473
|
+
ownFilling: { type: 'boolean', required: false },
|
|
474
|
+
}),
|
|
475
|
+
});
|
|
453
476
|
/**
|
|
454
477
|
* Eine Rechnungsposition beim Ausstellen: die gemeinsamen Positionsfelder plus
|
|
455
|
-
* `reservationId` (seit 1.5.0). Die Reservierung aus der Lager-API
|
|
478
|
+
* `reservationId` (seit 1.5.0) und `deposit` (seit 1.36.0). Die Reservierung aus der Lager-API
|
|
456
479
|
* (`createReservation`) wird beim Ausstellen geprueft und beim Buchen der
|
|
457
480
|
* Rechnung eingeloest; die Position braucht dazu `articleId`. Unbekannt =
|
|
458
481
|
* `reservation_not_found`, schon eingeloest oder freigegeben =
|
|
@@ -462,7 +485,7 @@ exports.ITEM_FIELDS = Object.freeze({
|
|
|
462
485
|
* `reservation_expired`. Weniger verkauft als reserviert gibt den Rest frei.
|
|
463
486
|
* Gutschriften kennen das Feld nicht (`validation`).
|
|
464
487
|
*/
|
|
465
|
-
exports.INVOICE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, reservationId: id });
|
|
488
|
+
exports.INVOICE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, reservationId: id, deposit: exports.DEPOSIT_ITEM_FIELD });
|
|
466
489
|
/** Genau einer der beiden Preise je Position (§ 9.1). */
|
|
467
490
|
exports.ITEM_PRICE_EXACTLY_ONE = Object.freeze([
|
|
468
491
|
Object.freeze(['unitPriceCents']),
|
|
@@ -481,11 +504,11 @@ const positionen = {
|
|
|
481
504
|
const returnDisposition = { type: 'enum', required: false, values: cancellation_js_1.RETURN_DISPOSITIONS };
|
|
482
505
|
/**
|
|
483
506
|
* Eine Gutschriftsposition: die gemeinsamen Positionsfelder plus
|
|
484
|
-
* `returnDisposition` (wohin die zurueckgenommene Ware geht)
|
|
485
|
-
* `reservationId`. An einer Rechnungsposition weist der Server
|
|
507
|
+
* `returnDisposition` (wohin die zurueckgenommene Ware geht) und `deposit`
|
|
508
|
+
* (seit 1.36.0), ohne `reservationId`. An einer Rechnungsposition weist der Server
|
|
486
509
|
* `returnDisposition` als unbekannt ab.
|
|
487
510
|
*/
|
|
488
|
-
exports.CREDIT_NOTE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, returnDisposition });
|
|
511
|
+
exports.CREDIT_NOTE_ITEM_FIELDS = Object.freeze({ ...exports.ITEM_FIELDS, returnDisposition, deposit: exports.DEPOSIT_ITEM_FIELD });
|
|
489
512
|
const gutschriftPositionen = {
|
|
490
513
|
type: 'list',
|
|
491
514
|
required: true,
|
|
@@ -23,9 +23,44 @@ export interface HpsConnectTarget {
|
|
|
23
23
|
host: string;
|
|
24
24
|
/** Vorgabe: `8080` (hobex-HPS-Standardport), siehe Connect. */
|
|
25
25
|
port?: number;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Terminal-ID, gern so, wie sie am Geraet und auf dem Beleg steht (achtstellig
|
|
28
|
+
* mit fuehrender Null, `03600335`). Das HPS kennt sie nur OHNE fuehrende Null
|
|
29
|
+
* und weist jede andere Schreibweise mit `100108 "Invalid TID"` ab; dieser
|
|
30
|
+
* Client schreibt sie deshalb vor jedem Aufruf um, siehe [normalizeHpsTid].
|
|
31
|
+
*/
|
|
27
32
|
tid: string;
|
|
28
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Die TID in der Form, die das hobex-HPS annimmt: Leerraum am Rand
|
|
36
|
+
* ([RAND_LEERRAUM]) und fuehrende Nullen fallen weg.
|
|
37
|
+
*
|
|
38
|
+
* Am 10.11.2026 gemessen (TID 3600335, HPS 1.14.4, Firmware 7.3.6): Diagnose
|
|
39
|
+
* und Zahlung mit `03600335` antworten sofort `100108 "Invalid TID"` (nichts
|
|
40
|
+
* belastet), mit `3600335` normal; `003600335`, `0360033` und `36003350` sind
|
|
41
|
+
* ebenfalls `Invalid TID`. Auf Beleg und Geraet steht die TID achtstellig mit
|
|
42
|
+
* fuehrender Null -- so wird sie auch eingetragen.
|
|
43
|
+
*
|
|
44
|
+
* Umgeschrieben wird NUR eine rein ziffrige TID mit mindestens einer Ziffer
|
|
45
|
+
* ungleich `0`. Alles andere geht UNVERAENDERT hinaus, auch die `0` der
|
|
46
|
+
* Erkennungsprobe von Connect und eine TID aus lauter Nullen: still etwas
|
|
47
|
+
* anderes daraus zu machen, hiesse ein anderes Terminal anzusprechen als das
|
|
48
|
+
* eingetragene. Bewusst kein Wurf: Connect weist eine nicht rein ziffrige TID
|
|
49
|
+
* selbst ab (`bad_request`, vor jedem Terminal-Kontakt, hier
|
|
50
|
+
* [HpsPreflightError]), und das HPS antwortet auf eine unbekannte mit
|
|
51
|
+
* `100108` -- in beiden Faellen geht kein Geld, und der Aufrufer bekommt den
|
|
52
|
+
* Grund auf dem Weg, den er fuer jede andere Abweisung auch auswertet.
|
|
53
|
+
*
|
|
54
|
+
* Kein Text (ein Aufrufer ohne Typpruefung uebergibt etwa eine Zahl) geht
|
|
55
|
+
* ebenso unveraendert hinaus: Connect weist ihn dann mit "Es fehlt die
|
|
56
|
+
* Terminal-ID" ab ([HpsPreflightError]), statt dass hier ein Wurf aus dem
|
|
57
|
+
* Zahlweg einen offenen Ausgang machte.
|
|
58
|
+
*
|
|
59
|
+
* Die einzige Stelle, an der die TID umgeschrieben wird: jeder Aufruf geht
|
|
60
|
+
* ueber `target`. Zwilling: `HpsClient` im Dart-Paket (`_normalizeTid`), Faelle
|
|
61
|
+
* in `fixtures/hobex-hps-cases.json`.
|
|
62
|
+
*/
|
|
63
|
+
export declare function normalizeHpsTid(tid: string): string;
|
|
29
64
|
export interface HpsConnectPaymentOptions extends HpsConnectTarget {
|
|
30
65
|
/** Kennung dieser Zahlung — MUSS vor diesem Aufruf feststehen, siehe `transaction-id.ts`. */
|
|
31
66
|
transactionId: string;
|
|
@@ -93,6 +128,13 @@ export interface HpsConnectClientOptions {
|
|
|
93
128
|
export interface HpsConnectClient {
|
|
94
129
|
payment(options: HpsConnectPaymentOptions): Promise<HpsTransactionResponse>;
|
|
95
130
|
status(options: HpsConnectTransactionOptions): Promise<HpsTransactionResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* Abbruch eines laufenden Vorgangs. `responseCode '0'` heisst nur, dass das
|
|
133
|
+
* Terminal die Anfrage angenommen hat -- NICHT, dass der Vorgang abgebrochen
|
|
134
|
+
* ist: am 10.11.2026 endete eine Zahlung nach so einer Quittung genehmigt.
|
|
135
|
+
* Den Ausgang sagt die Antwort auf die Zahlung oder die Statusabfrage, siehe
|
|
136
|
+
* `payments.ts`.
|
|
137
|
+
*/
|
|
96
138
|
abort(options: HpsConnectTransactionOptions): Promise<HpsTransactionResponse>;
|
|
97
139
|
/** Gutschrift — ein Kartenfluss wie [payment], deshalb dieselbe lange Frist. */
|
|
98
140
|
refund(options: HpsConnectRefundOptions): Promise<HpsTransactionResponse>;
|
|
@@ -1,9 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeHpsTid = normalizeHpsTid;
|
|
3
4
|
exports.createHpsConnectClient = createHpsConnectClient;
|
|
4
5
|
const errors_js_1 = require("./errors.js");
|
|
5
6
|
const transaction_id_js_1 = require("./transaction-id.js");
|
|
6
7
|
const transaction_response_js_1 = require("./transaction-response.js");
|
|
8
|
+
/** Nur eine rein ziffrige TID wird umgeschrieben. */
|
|
9
|
+
const NUR_ZIFFERN = /^[0-9]+$/;
|
|
10
|
+
const FUEHRENDE_NULLEN = /^0+/;
|
|
11
|
+
/**
|
|
12
|
+
* Leerraum am Rand, der wegfaellt: nur ASCII (Leerzeichen, Tab, Zeilenvorschub,
|
|
13
|
+
* Wagenruecklauf, vertikaler Tab, Seitenvorschub). Bewusst eine feste Liste
|
|
14
|
+
* statt `trim()`: JavaScript und Dart zaehlen Unicode-Leerraum verschieden
|
|
15
|
+
* (U+0085 trimmt Dart, JavaScript nicht), und die Zwillinge sollen dieselbe
|
|
16
|
+
* TID hinausschicken. Jedes andere Zeichen am Rand laesst die TID unveraendert.
|
|
17
|
+
*/
|
|
18
|
+
const RAND_LEERRAUM = /^[ \t\n\r\x0B\x0C]+|[ \t\n\r\x0B\x0C]+$/g;
|
|
19
|
+
/**
|
|
20
|
+
* Die TID in der Form, die das hobex-HPS annimmt: Leerraum am Rand
|
|
21
|
+
* ([RAND_LEERRAUM]) und fuehrende Nullen fallen weg.
|
|
22
|
+
*
|
|
23
|
+
* Am 10.11.2026 gemessen (TID 3600335, HPS 1.14.4, Firmware 7.3.6): Diagnose
|
|
24
|
+
* und Zahlung mit `03600335` antworten sofort `100108 "Invalid TID"` (nichts
|
|
25
|
+
* belastet), mit `3600335` normal; `003600335`, `0360033` und `36003350` sind
|
|
26
|
+
* ebenfalls `Invalid TID`. Auf Beleg und Geraet steht die TID achtstellig mit
|
|
27
|
+
* fuehrender Null -- so wird sie auch eingetragen.
|
|
28
|
+
*
|
|
29
|
+
* Umgeschrieben wird NUR eine rein ziffrige TID mit mindestens einer Ziffer
|
|
30
|
+
* ungleich `0`. Alles andere geht UNVERAENDERT hinaus, auch die `0` der
|
|
31
|
+
* Erkennungsprobe von Connect und eine TID aus lauter Nullen: still etwas
|
|
32
|
+
* anderes daraus zu machen, hiesse ein anderes Terminal anzusprechen als das
|
|
33
|
+
* eingetragene. Bewusst kein Wurf: Connect weist eine nicht rein ziffrige TID
|
|
34
|
+
* selbst ab (`bad_request`, vor jedem Terminal-Kontakt, hier
|
|
35
|
+
* [HpsPreflightError]), und das HPS antwortet auf eine unbekannte mit
|
|
36
|
+
* `100108` -- in beiden Faellen geht kein Geld, und der Aufrufer bekommt den
|
|
37
|
+
* Grund auf dem Weg, den er fuer jede andere Abweisung auch auswertet.
|
|
38
|
+
*
|
|
39
|
+
* Kein Text (ein Aufrufer ohne Typpruefung uebergibt etwa eine Zahl) geht
|
|
40
|
+
* ebenso unveraendert hinaus: Connect weist ihn dann mit "Es fehlt die
|
|
41
|
+
* Terminal-ID" ab ([HpsPreflightError]), statt dass hier ein Wurf aus dem
|
|
42
|
+
* Zahlweg einen offenen Ausgang machte.
|
|
43
|
+
*
|
|
44
|
+
* Die einzige Stelle, an der die TID umgeschrieben wird: jeder Aufruf geht
|
|
45
|
+
* ueber `target`. Zwilling: `HpsClient` im Dart-Paket (`_normalizeTid`), Faelle
|
|
46
|
+
* in `fixtures/hobex-hps-cases.json`.
|
|
47
|
+
*/
|
|
48
|
+
function normalizeHpsTid(tid) {
|
|
49
|
+
if (typeof tid !== 'string')
|
|
50
|
+
return tid;
|
|
51
|
+
const ohneRand = tid.replace(RAND_LEERRAUM, '');
|
|
52
|
+
if (!NUR_ZIFFERN.test(ohneRand))
|
|
53
|
+
return tid;
|
|
54
|
+
const ohneNullen = ohneRand.replace(FUEHRENDE_NULLEN, '');
|
|
55
|
+
return ohneNullen === '' ? tid : ohneNullen;
|
|
56
|
+
}
|
|
7
57
|
const DEFAULT_BASE_URL = 'http://127.0.0.1:27182';
|
|
8
58
|
const DEFAULT_SHORT_TIMEOUT_MS = 30_000;
|
|
9
59
|
const DEFAULT_PAYMENT_TIMEOUT_MS = 4 * 60_000 + 30_000;
|
|
@@ -86,7 +136,7 @@ function createHpsConnectClient(options) {
|
|
|
86
136
|
return value;
|
|
87
137
|
}
|
|
88
138
|
function target(t) {
|
|
89
|
-
return { host: t.host, port: t.port, tid: t.tid };
|
|
139
|
+
return { host: t.host, port: t.port, tid: normalizeHpsTid(t.tid) };
|
|
90
140
|
}
|
|
91
141
|
return {
|
|
92
142
|
async payment(o) {
|
|
@@ -40,9 +40,10 @@ export interface HpsPaymentResult {
|
|
|
40
40
|
* fuer den Bediener in `HPS_REASON_HINTS`.
|
|
41
41
|
*
|
|
42
42
|
* Gesetzt an der Stelle, die den Ausgang entschieden hat, nicht aus
|
|
43
|
-
* [response] abgeleitet: ein
|
|
44
|
-
*
|
|
45
|
-
* abgelehnt klaert, zaehlt der Code der
|
|
43
|
+
* [response] abgeleitet: ein quittiertes Storno nach einer Stoerung beim
|
|
44
|
+
* Host antwortet `'0'` und ist trotzdem `'voidedAfterHostFault'`, und wenn
|
|
45
|
+
* die Zwei-9027-Regel eine Zahlung als abgelehnt klaert, zaehlt der Code der
|
|
46
|
+
* ZAHLUNG, nicht das `9027` danach.
|
|
46
47
|
* Fehlt, wenn kein Code etwas erklaert (die Leitung riss ab, bevor das
|
|
47
48
|
* Terminal etwas sagte) und bei einer Aufhebung, die nicht gegriffen hat.
|
|
48
49
|
*/
|