kassza 0.18.1 → 0.20.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/README.md +1 -1
- package/dist/batch/index.cjs +5 -7
- package/dist/batch/index.d.cts +5 -9
- package/dist/batch/index.d.ts +5 -9
- package/dist/batch/index.js +5 -7
- package/dist/{binary-B89HM03_.cjs → binary-CdpKlNNI.cjs} +1 -2
- package/dist/{binary-D0M9U2MD.js → binary-DuKBSfH-.js} +1 -2
- package/dist/cli.cjs +14 -21
- package/dist/cli.js +14 -21
- package/dist/{client-DeWWQ-RZ.d.ts → client-B00WZ3FK.d.cts} +8 -36
- package/dist/{client-SVZu25MB.d.cts → client-BJfeFjCM.d.ts} +8 -36
- package/dist/{client-Cvb9yfxU.cjs → client-I_29IPMh.cjs} +25 -37
- package/dist/{client-CdWEA0et.js → client-JZ1M1sZX.js} +25 -37
- package/dist/{context-kb33TgzE.d.ts → context-BROX7Krw.d.ts} +7 -25
- package/dist/{context-CFNKzStE.d.cts → context-zGthvNo2.d.cts} +7 -25
- package/dist/cookie-stores/index.cjs +2 -2
- package/dist/cookie-stores/index.d.cts +3 -3
- package/dist/cookie-stores/index.d.ts +3 -3
- package/dist/cookie-stores/index.js +2 -2
- package/dist/{create-CflXrPip.js → create-BwRslos0.js} +9 -12
- package/dist/{create-CvUvLUaT.cjs → create-DH5jiZPA.cjs} +9 -12
- package/dist/{create-once-CW0x_yvp.js → create-once-B6cAXyET.js} +16 -22
- package/dist/{create-once-VKp0tVow.d.ts → create-once-BA0KAHIB.d.cts} +3 -7
- package/dist/{create-once-Bh6fOWkW.d.cts → create-once-CoybK69A.d.ts} +3 -7
- package/dist/{create-once-CHhDz0un.cjs → create-once-zeF7GVVP.cjs} +16 -22
- package/dist/{crypto-Dpn4FHQ6.cjs → crypto-B0PAHKJB.cjs} +1 -2
- package/dist/{crypto-usDg8L2K.js → crypto-BqGn_oGu.js} +1 -2
- package/dist/data-link/index.cjs +10 -13
- package/dist/data-link/index.d.cts +1 -5
- package/dist/data-link/index.d.ts +1 -5
- package/dist/data-link/index.js +10 -13
- package/dist/{dates-CXyj7Azy.js → dates-DWsZOdaO.js} +1 -2
- package/dist/{dates-9zvESP0i.d.cts → dates-nlGEokCf.d.cts} +0 -2
- package/dist/{dates-9zvESP0i.d.ts → dates-nlGEokCf.d.ts} +0 -2
- package/dist/{dates-CPgBodkP.cjs → dates-oOp3ypPP.cjs} +1 -2
- package/dist/delegation/index.cjs +9 -12
- package/dist/delegation/index.d.cts +3 -9
- package/dist/delegation/index.d.ts +3 -9
- package/dist/delegation/index.js +9 -12
- package/dist/{errors-EE96_6D_.cjs → errors-Bn6pe6yw.cjs} +12 -3
- package/dist/{errors-DtN4g5Z9.js → errors-CGGsW0Y5.js} +12 -3
- package/dist/{get-Byc9T5WO.d.cts → get-BL4Fr8-P.d.cts} +0 -2
- package/dist/{get-Byc9T5WO.d.ts → get-BL4Fr8-P.d.ts} +0 -2
- package/dist/{get-BdMTseh4.cjs → get-DFhT7kOp.cjs} +4 -5
- package/dist/{get-CZEShCcj.js → get-HrHwVkVt.js} +4 -5
- package/dist/{index-C-7yWV7L.d.cts → index-CinpAhQM.d.cts} +0 -8
- package/dist/{index-C-7yWV7L.d.ts → index-CinpAhQM.d.ts} +0 -8
- package/dist/{index-BqGgQ4t3.d.ts → index-DqoDUw6X.d.ts} +2 -20
- package/dist/{index-BhUPY_EH.d.cts → index-qk62lWr3.d.cts} +2 -20
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +11 -13
- package/dist/index.d.ts +11 -13
- package/dist/index.js +7 -7
- package/dist/ipn/index.cjs +4 -6
- package/dist/ipn/index.d.cts +0 -4
- package/dist/ipn/index.d.ts +0 -4
- package/dist/ipn/index.js +4 -6
- package/dist/{issue-Bin4tKD_.cjs → issue-DReARZnF.cjs} +12 -18
- package/dist/{issue-DMA1Nbr1.js → issue-Dy9zvRK1.js} +12 -18
- package/dist/journal/index.cjs +7 -11
- package/dist/journal/index.d.cts +2 -6
- package/dist/journal/index.d.ts +2 -6
- package/dist/journal/index.js +7 -11
- package/dist/{journal-DvI81Kt7.d.cts → journal-D_ypAW50.d.cts} +5 -9
- package/dist/{journal-Y9qrIB8G.d.ts → journal-JwiYpBui.d.ts} +5 -9
- package/dist/{json-4y4E2xxS.cjs → json-COC9rDwf.cjs} +1 -2
- package/dist/json-D3Bx7NhF.d.cts +2 -0
- package/dist/json-D3Bx7NhF.d.ts +2 -0
- package/dist/{json-DjnqnaJK.js → json-as-6J7d-.js} +1 -2
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.d.cts +1 -9
- package/dist/mcp/index.d.ts +1 -9
- package/dist/mcp/index.js +1 -2
- package/dist/money/index.cjs +3 -3
- package/dist/money/index.d.cts +1 -1
- package/dist/money/index.d.ts +1 -1
- package/dist/money/index.js +3 -3
- package/dist/{money-K9j0wPit.cjs → money-NtVytaxG.cjs} +5 -7
- package/dist/{money-Cw457SD6.js → money-f280VT77.js} +5 -7
- package/dist/nav/index.cjs +15 -22
- package/dist/nav/index.d.cts +2 -22
- package/dist/nav/index.d.ts +2 -22
- package/dist/nav/index.js +15 -22
- package/dist/{nav-BcCerwWS.js → nav-NvNgaONz.js} +5 -7
- package/dist/{nav-BNbc8U0R.cjs → nav-VShZkjg8.cjs} +5 -7
- package/dist/node/index.cjs +1 -2
- package/dist/node/index.d.cts +1 -3
- package/dist/node/index.d.ts +1 -3
- package/dist/node/index.js +1 -2
- package/dist/observe/index.cjs +3 -5
- package/dist/observe/index.d.cts +1 -5
- package/dist/observe/index.d.ts +1 -5
- package/dist/observe/index.js +3 -5
- package/dist/{once-BN_3B5OF.cjs → once-BmXfrNbQ.cjs} +2 -3
- package/dist/{once-CqqZxsXG.js → once-CMhDPrs7.js} +2 -3
- package/dist/{parse-Cr7yQ3_z.js → parse-1RiSh4vY.js} +5 -7
- package/dist/{parse-DOA2XQ3e.cjs → parse-CmM5va-p.cjs} +5 -7
- package/dist/payments/barion.cjs +7 -6
- package/dist/payments/barion.d.cts +4 -6
- package/dist/payments/barion.d.ts +4 -6
- package/dist/payments/barion.js +7 -6
- package/dist/payments/index.cjs +2 -2
- package/dist/payments/index.d.cts +3 -9
- package/dist/payments/index.d.ts +3 -9
- package/dist/payments/index.js +2 -2
- package/dist/payments/paypal.cjs +8 -7
- package/dist/payments/paypal.d.cts +4 -6
- package/dist/payments/paypal.d.ts +4 -6
- package/dist/payments/paypal.js +8 -7
- package/dist/payments/revolut.cjs +7 -6
- package/dist/payments/revolut.d.cts +4 -6
- package/dist/payments/revolut.d.ts +4 -6
- package/dist/payments/revolut.js +7 -6
- package/dist/payments/simplepay.cjs +9 -8
- package/dist/payments/simplepay.d.cts +4 -6
- package/dist/payments/simplepay.d.ts +4 -6
- package/dist/payments/simplepay.js +9 -8
- package/dist/payments/stripe.cjs +6 -6
- package/dist/payments/stripe.d.cts +4 -6
- package/dist/payments/stripe.d.ts +4 -6
- package/dist/payments/stripe.js +6 -6
- package/dist/{push-BXj0Sf0Z.d.ts → push-CTxDD3yJ.d.cts} +2 -4
- package/dist/{push-D4nNbCNV.d.cts → push-DJh5YkyV.d.ts} +2 -4
- package/dist/{reference-B5TATqb5.js → reference-Cxz0m2zF.js} +6 -7
- package/dist/{reference-BIdYMK0t.cjs → reference-DoY12fc1.cjs} +6 -7
- package/dist/reports/index.cjs +3 -4
- package/dist/reports/index.d.cts +1 -7
- package/dist/reports/index.d.ts +1 -7
- package/dist/reports/index.js +3 -4
- package/dist/{request-body-uZHMRlQr.js → request-body-BM4sbsHd.js} +2 -3
- package/dist/{request-body-CH6ZGOrq.cjs → request-body-BhfkJhff.cjs} +2 -3
- package/dist/{rounding-TxoWy2ww.cjs → rounding-CHmSK5Z2.cjs} +1 -2
- package/dist/{rounding-BLyHjjI5.js → rounding-CZLj4DbV.js} +1 -2
- package/dist/{serialize-B2eFh3D-.js → serialize-CjymGkJj.js} +2 -4
- package/dist/{serialize-CquIsxA-.cjs → serialize-DEU7r6Bk.cjs} +2 -4
- package/dist/{server-xcEb7ko9.cjs → server-BKB4KsPn.cjs} +23 -35
- package/dist/{server-Dt6bEeBB.js → server-CPp6Gpbl.js} +23 -35
- package/dist/{session-Ckl5eJhV.d.ts → session-BBbSXlx3.d.cts} +1 -3
- package/dist/{session-DeM5vjvC.cjs → session-BYotpR_s.cjs} +2 -4
- package/dist/{session-SaEEXu2N.js → session-DZeE1ryt.js} +2 -4
- package/dist/{session-YbChChx7.d.cts → session-mKtpAeUB.d.ts} +1 -3
- package/dist/{shared-CrxlxI8n.cjs → shared-BOBTXDTo.cjs} +5 -6
- package/dist/{shared-D6DLa4b7.js → shared-Dbcfwr8x.js} +5 -6
- package/dist/storage/fs.cjs +3 -4
- package/dist/storage/fs.d.cts +2 -4
- package/dist/storage/fs.d.ts +2 -4
- package/dist/storage/fs.js +3 -4
- package/dist/storage/index.cjs +16 -25
- package/dist/storage/index.d.cts +2 -26
- package/dist/storage/index.d.ts +2 -26
- package/dist/storage/index.js +16 -25
- package/dist/{store-C1rHd9DB.d.cts → store-BkaZ8qkU.d.cts} +0 -2
- package/dist/{store-C1rHd9DB.d.ts → store-BkaZ8qkU.d.ts} +0 -2
- package/dist/stores/index.cjs +2 -2
- package/dist/stores/index.d.cts +3 -3
- package/dist/stores/index.d.ts +3 -3
- package/dist/stores/index.js +2 -2
- package/dist/{stores-DhjGBrl_.js → stores-BUnPNJQl.js} +12 -22
- package/dist/{stores-BNrS0dWl.cjs → stores-CH4rYKs_.cjs} +12 -22
- package/dist/{tax-number-BdqKsxNR.js → tax-number-C6jySuGR.js} +3 -6
- package/dist/{tax-number-BYFkBp4A.cjs → tax-number-XLdM5ETv.cjs} +3 -6
- package/dist/testing/index.cjs +20 -30
- package/dist/testing/index.d.cts +5 -15
- package/dist/testing/index.d.ts +5 -15
- package/dist/testing/index.js +20 -30
- package/dist/{types-DVRgwcqg.d.cts → types-Bfs08Mrc.d.cts} +0 -2
- package/dist/{types-DVRgwcqg.d.ts → types-Bfs08Mrc.d.ts} +0 -2
- package/dist/{types-ByAEvGsZ.d.ts → types-DeuUqIvU.d.cts} +2 -4
- package/dist/{types-D1zDOH_F.d.ts → types-Z6rQoqHn.d.ts} +1 -3
- package/dist/{types-lnKkQdot.d.cts → types-_HKTOCuQ.d.cts} +1 -3
- package/dist/{types-B1A8mUIE.d.cts → types-oiDulesz.d.ts} +2 -4
- package/dist/url-CRIlLxPE.cjs +23 -0
- package/dist/url-DeCMiKVm.js +12 -0
- package/dist/validators/index.cjs +6 -10
- package/dist/validators/index.d.cts +0 -12
- package/dist/validators/index.d.ts +0 -12
- package/dist/validators/index.js +6 -10
- package/dist/{vat-v_dcWCto.js → vat-B4J5Q0tu.js} +1 -2
- package/dist/{vat-g35srbNG.cjs → vat-BkoiiKm4.cjs} +1 -2
- package/dist/{warnings-DwTl5J-2.js → warnings-DJ0QvZOp.js} +1 -2
- package/dist/{warnings-B3DXnveC.d.cts → warnings-DpuYhn39.d.cts} +0 -4
- package/dist/{warnings-B3DXnveC.d.ts → warnings-DpuYhn39.d.ts} +0 -4
- package/dist/{warnings-DeIw5RFj.cjs → warnings-ciSzK6Jc.cjs} +1 -2
- package/dist/{webhook-Ckj-_hPD.cjs → webhook-BBTebz1x.cjs} +7 -11
- package/dist/{webhook-D6lEejob.d.ts → webhook-C9IBUdeT.d.ts} +1 -3
- package/dist/{webhook-CmdhGiH5.d.cts → webhook-DF2p_m2Q.d.cts} +1 -3
- package/dist/{webhook-CQVShAfI.js → webhook-SFlA_nCf.js} +7 -11
- package/package.json +1 -1
- package/dist/json-B70TwoX1.d.cts +0 -4
- package/dist/json-B70TwoX1.d.ts +0 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_once = require("./once-
|
|
3
|
-
const require_rounding = require("./rounding-
|
|
4
|
-
const require_vat = require("./vat-
|
|
5
|
-
const require_money = require("./money-
|
|
6
|
-
const require_create = require("./create-
|
|
7
|
-
|
|
1
|
+
const require_errors = require("./errors-Bn6pe6yw.cjs");
|
|
2
|
+
const require_once = require("./once-BmXfrNbQ.cjs");
|
|
3
|
+
const require_rounding = require("./rounding-CHmSK5Z2.cjs");
|
|
4
|
+
const require_vat = require("./vat-BkoiiKm4.cjs");
|
|
5
|
+
const require_money = require("./money-NtVytaxG.cjs");
|
|
6
|
+
const require_create = require("./create-DH5jiZPA.cjs");
|
|
7
|
+
// src/core/once-guard.ts
|
|
8
8
|
const ONCE_LOCK_KEY_PREFIX = "szamlazz:once:";
|
|
9
9
|
const DEFAULT_LOCK_TTL_SECONDS = 600;
|
|
10
10
|
const DEFAULT_LOCK_WAIT_MS = 1e4;
|
|
@@ -144,8 +144,7 @@ async function guardOnce(guard, key, options, run, joined) {
|
|
|
144
144
|
if (inflight.get(id) === leader) inflight.delete(id);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
//#region src/invoices/create-once.ts
|
|
147
|
+
// src/invoices/create-once.ts
|
|
149
148
|
const EXTERNAL_ID_SUFFIXES = {
|
|
150
149
|
invoice: "",
|
|
151
150
|
proforma: "/D",
|
|
@@ -223,8 +222,7 @@ async function createInvoiceOnce(api, input, options = {}, guard) {
|
|
|
223
222
|
created: false
|
|
224
223
|
}));
|
|
225
224
|
}
|
|
226
|
-
|
|
227
|
-
//#region src/documents/choose.ts
|
|
225
|
+
// src/documents/choose.ts
|
|
228
226
|
const RECEIPT_MAX_GROSS_HUF = 9e5;
|
|
229
227
|
const forintFormatter = new Intl.NumberFormat("hu-HU", { maximumFractionDigits: 2 });
|
|
230
228
|
function validation$3(message) {
|
|
@@ -264,8 +262,7 @@ function chooseDocument(input) {
|
|
|
264
262
|
grossTotalHuf
|
|
265
263
|
};
|
|
266
264
|
}
|
|
267
|
-
|
|
268
|
-
//#region src/receipts/convert.ts
|
|
265
|
+
// src/receipts/convert.ts
|
|
269
266
|
const receiptOnlyCodes = new Set(require_create.RECEIPT_ONLY_VAT_CODES);
|
|
270
267
|
function validation$2(message, hint) {
|
|
271
268
|
return new require_errors.SzamlazzError(message, {
|
|
@@ -362,8 +359,7 @@ async function convertReceiptToInvoice(api, input, options = {}) {
|
|
|
362
359
|
invoice
|
|
363
360
|
};
|
|
364
361
|
}
|
|
365
|
-
|
|
366
|
-
//#region src/payments/partial-refund.ts
|
|
362
|
+
// src/payments/partial-refund.ts
|
|
367
363
|
const CORRECTION_SUFFIX = "/R-";
|
|
368
364
|
const MAX_PLAIN_REFUND_KEY = 24;
|
|
369
365
|
const AMOUNT_TOLERANCE$1 = .005;
|
|
@@ -586,8 +582,7 @@ async function issueForPartialRefund(api, payment, orderNumber, options) {
|
|
|
586
582
|
assertRefunds(refunds, receipt.currency, receipt.number);
|
|
587
583
|
return proposal(orderNumber, "receipt", receipt.number, receiptItems(receipt), refunds, receipt.currency, RECEIPT_PROPOSAL_REASON);
|
|
588
584
|
}
|
|
589
|
-
|
|
590
|
-
//#region src/payments/issue.ts
|
|
585
|
+
// src/payments/issue.ts
|
|
591
586
|
const AMOUNT_TOLERANCE = .005;
|
|
592
587
|
const DEFAULT_ITEM_NAME = "Termék vagy szolgáltatás";
|
|
593
588
|
const DEFAULT_CURRENCY = "HUF";
|
|
@@ -901,7 +896,6 @@ async function issueForPayment(api, payment, options = {}) {
|
|
|
901
896
|
if (kind === "receipt") return issueReceipt(api, payment, orderNumber, items, currency, decision, options);
|
|
902
897
|
return issueInvoice(api, payment, orderNumber, items, currency, buyer, decision, options);
|
|
903
898
|
}
|
|
904
|
-
//#endregion
|
|
905
899
|
Object.defineProperty(exports, "DEFAULT_LOCK_TTL_SECONDS", {
|
|
906
900
|
enumerable: true,
|
|
907
901
|
get: function() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as SzamlazzError } from "./errors-
|
|
2
|
-
import { a as unknownOutcomeError, i as resolveRecoveryDelay, n as isUncertainOutcome, r as recoverAfterFailure } from "./once-
|
|
3
|
-
import { r as roundMoney } from "./rounding-
|
|
4
|
-
import { a as isVatRate, i as isHuf } from "./vat-
|
|
5
|
-
import { n as calculateInvoiceItem, t as allocateRefund } from "./money-
|
|
6
|
-
import { l as RECEIPT_ONLY_VAT_CODES, n as calculateReceiptItems } from "./create-
|
|
7
|
-
|
|
1
|
+
import { r as SzamlazzError } from "./errors-CGGsW0Y5.js";
|
|
2
|
+
import { a as unknownOutcomeError, i as resolveRecoveryDelay, n as isUncertainOutcome, r as recoverAfterFailure } from "./once-CMhDPrs7.js";
|
|
3
|
+
import { r as roundMoney } from "./rounding-CZLj4DbV.js";
|
|
4
|
+
import { a as isVatRate, i as isHuf } from "./vat-B4J5Q0tu.js";
|
|
5
|
+
import { n as calculateInvoiceItem, t as allocateRefund } from "./money-f280VT77.js";
|
|
6
|
+
import { l as RECEIPT_ONLY_VAT_CODES, n as calculateReceiptItems } from "./create-BwRslos0.js";
|
|
7
|
+
// src/core/once-guard.ts
|
|
8
8
|
const ONCE_LOCK_KEY_PREFIX = "szamlazz:once:";
|
|
9
9
|
const DEFAULT_LOCK_TTL_SECONDS = 600;
|
|
10
10
|
const DEFAULT_LOCK_WAIT_MS = 1e4;
|
|
@@ -144,8 +144,7 @@ async function guardOnce(guard, key, options, run, joined) {
|
|
|
144
144
|
if (inflight.get(id) === leader) inflight.delete(id);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
//#region src/invoices/create-once.ts
|
|
147
|
+
// src/invoices/create-once.ts
|
|
149
148
|
const EXTERNAL_ID_SUFFIXES = {
|
|
150
149
|
invoice: "",
|
|
151
150
|
proforma: "/D",
|
|
@@ -223,8 +222,7 @@ async function createInvoiceOnce(api, input, options = {}, guard) {
|
|
|
223
222
|
created: false
|
|
224
223
|
}));
|
|
225
224
|
}
|
|
226
|
-
|
|
227
|
-
//#region src/documents/choose.ts
|
|
225
|
+
// src/documents/choose.ts
|
|
228
226
|
const RECEIPT_MAX_GROSS_HUF = 9e5;
|
|
229
227
|
const forintFormatter = new Intl.NumberFormat("hu-HU", { maximumFractionDigits: 2 });
|
|
230
228
|
function validation$3(message) {
|
|
@@ -264,8 +262,7 @@ function chooseDocument(input) {
|
|
|
264
262
|
grossTotalHuf
|
|
265
263
|
};
|
|
266
264
|
}
|
|
267
|
-
|
|
268
|
-
//#region src/receipts/convert.ts
|
|
265
|
+
// src/receipts/convert.ts
|
|
269
266
|
const receiptOnlyCodes = new Set(RECEIPT_ONLY_VAT_CODES);
|
|
270
267
|
function validation$2(message, hint) {
|
|
271
268
|
return new SzamlazzError(message, {
|
|
@@ -362,8 +359,7 @@ async function convertReceiptToInvoice(api, input, options = {}) {
|
|
|
362
359
|
invoice
|
|
363
360
|
};
|
|
364
361
|
}
|
|
365
|
-
|
|
366
|
-
//#region src/payments/partial-refund.ts
|
|
362
|
+
// src/payments/partial-refund.ts
|
|
367
363
|
const CORRECTION_SUFFIX = "/R-";
|
|
368
364
|
const MAX_PLAIN_REFUND_KEY = 24;
|
|
369
365
|
const AMOUNT_TOLERANCE$1 = .005;
|
|
@@ -586,8 +582,7 @@ async function issueForPartialRefund(api, payment, orderNumber, options) {
|
|
|
586
582
|
assertRefunds(refunds, receipt.currency, receipt.number);
|
|
587
583
|
return proposal(orderNumber, "receipt", receipt.number, receiptItems(receipt), refunds, receipt.currency, RECEIPT_PROPOSAL_REASON);
|
|
588
584
|
}
|
|
589
|
-
|
|
590
|
-
//#region src/payments/issue.ts
|
|
585
|
+
// src/payments/issue.ts
|
|
591
586
|
const AMOUNT_TOLERANCE = .005;
|
|
592
587
|
const DEFAULT_ITEM_NAME = "Termék vagy szolgáltatás";
|
|
593
588
|
const DEFAULT_CURRENCY = "HUF";
|
|
@@ -901,5 +896,4 @@ async function issueForPayment(api, payment, options = {}) {
|
|
|
901
896
|
if (kind === "receipt") return issueReceipt(api, payment, orderNumber, items, currency, decision, options);
|
|
902
897
|
return issueInvoice(api, payment, orderNumber, items, currency, buyer, decision, options);
|
|
903
898
|
}
|
|
904
|
-
//#endregion
|
|
905
899
|
export { conversionExternalId as a, chooseDocument as c, DEFAULT_LOCK_TTL_SECONDS as d, DEFAULT_LOCK_WAIT_MS as f, correctionExternalId as i, createInvoiceOnce as l, guardOnce as m, issueForPayment as n, convertReceiptToInvoice as o, ONCE_LOCK_KEY_PREFIX as p, paymentOrderNumber as r, RECEIPT_MAX_GROSS_HUF as s, buyerFromCustomer as t, invoiceOnceExternalId as u };
|
package/dist/journal/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors = require("../errors-
|
|
3
|
-
const require_once = require("../once-
|
|
4
|
-
const require_dates = require("../dates-
|
|
5
|
-
|
|
2
|
+
const require_errors = require("../errors-Bn6pe6yw.cjs");
|
|
3
|
+
const require_once = require("../once-BmXfrNbQ.cjs");
|
|
4
|
+
const require_dates = require("../dates-oOp3ypPP.cjs");
|
|
5
|
+
// src/journal/dates.ts
|
|
6
6
|
const MAX_JOURNAL_RANGE_DAYS = 366;
|
|
7
7
|
const DAY_IN_MS = 864e5;
|
|
8
8
|
function invalid(message) {
|
|
@@ -45,8 +45,7 @@ function recentRange(now, days) {
|
|
|
45
45
|
to: require_dates.toAgentDate(now)
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
//#region src/journal/entries.ts
|
|
48
|
+
// src/journal/entries.ts
|
|
50
49
|
function withoutPdf(receipt) {
|
|
51
50
|
if (receipt.pdf === void 0) return receipt;
|
|
52
51
|
const { pdf: _pdf, ...rest } = receipt;
|
|
@@ -141,8 +140,7 @@ function eventEntry(event, now) {
|
|
|
141
140
|
grossTotal: event.document.grossTotal
|
|
142
141
|
});
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
//#region src/journal/journal.ts
|
|
143
|
+
// src/journal/journal.ts
|
|
146
144
|
const DEFAULT_PENDING_DAYS = 30;
|
|
147
145
|
var JournalWriteError = class extends Error {
|
|
148
146
|
name = "JournalWriteError";
|
|
@@ -304,8 +302,7 @@ function createJournal(storage, options = {}) {
|
|
|
304
302
|
};
|
|
305
303
|
return journal;
|
|
306
304
|
}
|
|
307
|
-
|
|
308
|
-
//#region src/journal/storage.ts
|
|
305
|
+
// src/journal/storage.ts
|
|
309
306
|
const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
|
|
310
307
|
const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
|
|
311
308
|
const DEFAULT_RESERVATION_TTL_DAYS = 30;
|
|
@@ -442,7 +439,6 @@ function memoryJournal() {
|
|
|
442
439
|
}
|
|
443
440
|
};
|
|
444
441
|
}
|
|
445
|
-
//#endregion
|
|
446
442
|
exports.DEFAULT_JOURNAL_RETENTION_DAYS = DEFAULT_JOURNAL_RETENTION_DAYS;
|
|
447
443
|
exports.DEFAULT_PENDING_DAYS = DEFAULT_PENDING_DAYS;
|
|
448
444
|
exports.DEFAULT_RESERVATION_TTL_DAYS = DEFAULT_RESERVATION_TTL_DAYS;
|
package/dist/journal/index.d.cts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { n as KeyValueStore } from "../store-
|
|
2
|
-
import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-
|
|
3
|
-
//#region src/journal/dates.d.ts
|
|
1
|
+
import { n as KeyValueStore } from "../store-BkaZ8qkU.cjs";
|
|
2
|
+
import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-D_ypAW50.cjs";
|
|
4
3
|
export declare const MAX_JOURNAL_RANGE_DAYS = 366;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/journal/storage.d.ts
|
|
7
4
|
export declare const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
|
|
8
5
|
export declare const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
|
|
9
6
|
export declare const DEFAULT_RESERVATION_TTL_DAYS = 30;
|
|
@@ -14,5 +11,4 @@ interface KvJournalOptions {
|
|
|
14
11
|
}
|
|
15
12
|
export declare function kvJournal(store: KeyValueStore, options?: KvJournalOptions): JournalStorage;
|
|
16
13
|
export declare function memoryJournal(): JournalStorage;
|
|
17
|
-
//#endregion
|
|
18
14
|
export { DEFAULT_PENDING_DAYS, type Journal, type JournalDocumentKind, type JournalEntry, type JournalEntryQuery, type JournalEntrySource, type JournalEntryType, type JournalOptions, type JournalRange, type JournalReceiptQuery, type JournalReconcileOptions, type JournalReconciliation, type JournalReservation, type JournalSettleApi, type JournalSettleOptions, type JournalSettlement, type JournalStorage, JournalWriteError, type KvJournalOptions, createJournal };
|
package/dist/journal/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { n as KeyValueStore } from "../store-
|
|
2
|
-
import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-
|
|
3
|
-
//#region src/journal/dates.d.ts
|
|
1
|
+
import { n as KeyValueStore } from "../store-BkaZ8qkU.js";
|
|
2
|
+
import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-JwiYpBui.js";
|
|
4
3
|
export declare const MAX_JOURNAL_RANGE_DAYS = 366;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/journal/storage.d.ts
|
|
7
4
|
export declare const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
|
|
8
5
|
export declare const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
|
|
9
6
|
export declare const DEFAULT_RESERVATION_TTL_DAYS = 30;
|
|
@@ -14,5 +11,4 @@ interface KvJournalOptions {
|
|
|
14
11
|
}
|
|
15
12
|
export declare function kvJournal(store: KeyValueStore, options?: KvJournalOptions): JournalStorage;
|
|
16
13
|
export declare function memoryJournal(): JournalStorage;
|
|
17
|
-
//#endregion
|
|
18
14
|
export { DEFAULT_PENDING_DAYS, type Journal, type JournalDocumentKind, type JournalEntry, type JournalEntryQuery, type JournalEntrySource, type JournalEntryType, type JournalOptions, type JournalRange, type JournalReceiptQuery, type JournalReconcileOptions, type JournalReconciliation, type JournalReservation, type JournalSettleApi, type JournalSettleOptions, type JournalSettlement, type JournalStorage, JournalWriteError, type KvJournalOptions, createJournal };
|
package/dist/journal/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as SzamlazzError } from "../errors-
|
|
2
|
-
import { n as isUncertainOutcome } from "../once-
|
|
3
|
-
import { i as toBudapestTimestamp, n as toAgentDate, t as addBudapestDays } from "../dates-
|
|
4
|
-
|
|
1
|
+
import { r as SzamlazzError } from "../errors-CGGsW0Y5.js";
|
|
2
|
+
import { n as isUncertainOutcome } from "../once-CMhDPrs7.js";
|
|
3
|
+
import { i as toBudapestTimestamp, n as toAgentDate, t as addBudapestDays } from "../dates-DWsZOdaO.js";
|
|
4
|
+
// src/journal/dates.ts
|
|
5
5
|
const MAX_JOURNAL_RANGE_DAYS = 366;
|
|
6
6
|
const DAY_IN_MS = 864e5;
|
|
7
7
|
function invalid(message) {
|
|
@@ -44,8 +44,7 @@ function recentRange(now, days) {
|
|
|
44
44
|
to: toAgentDate(now)
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
//#region src/journal/entries.ts
|
|
47
|
+
// src/journal/entries.ts
|
|
49
48
|
function withoutPdf(receipt) {
|
|
50
49
|
if (receipt.pdf === void 0) return receipt;
|
|
51
50
|
const { pdf: _pdf, ...rest } = receipt;
|
|
@@ -140,8 +139,7 @@ function eventEntry(event, now) {
|
|
|
140
139
|
grossTotal: event.document.grossTotal
|
|
141
140
|
});
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
//#region src/journal/journal.ts
|
|
142
|
+
// src/journal/journal.ts
|
|
145
143
|
const DEFAULT_PENDING_DAYS = 30;
|
|
146
144
|
var JournalWriteError = class extends Error {
|
|
147
145
|
name = "JournalWriteError";
|
|
@@ -303,8 +301,7 @@ function createJournal(storage, options = {}) {
|
|
|
303
301
|
};
|
|
304
302
|
return journal;
|
|
305
303
|
}
|
|
306
|
-
|
|
307
|
-
//#region src/journal/storage.ts
|
|
304
|
+
// src/journal/storage.ts
|
|
308
305
|
const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
|
|
309
306
|
const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
|
|
310
307
|
const DEFAULT_RESERVATION_TTL_DAYS = 30;
|
|
@@ -441,5 +438,4 @@ function memoryJournal() {
|
|
|
441
438
|
}
|
|
442
439
|
};
|
|
443
440
|
}
|
|
444
|
-
//#endregion
|
|
445
441
|
export { DEFAULT_JOURNAL_RETENTION_DAYS, DEFAULT_PENDING_DAYS, DEFAULT_RESERVATION_TTL_DAYS, JOURNAL_KEY_PREFIX, JournalWriteError, MAX_JOURNAL_RANGE_DAYS, createJournal, kvJournal, memoryJournal };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { f as DocumentEvent } from "./context-
|
|
2
|
-
import { r as Receipt } from "./types-
|
|
3
|
-
import { n as InvoiceDetails } from "./get-
|
|
4
|
-
import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-
|
|
5
|
-
import { t as DataLinkArchivedReceipt } from "./push-
|
|
6
|
-
//#region src/journal/types.d.ts
|
|
1
|
+
import { f as DocumentEvent } from "./context-zGthvNo2.cjs";
|
|
2
|
+
import { r as Receipt } from "./types-_HKTOCuQ.cjs";
|
|
3
|
+
import { n as InvoiceDetails } from "./get-BL4Fr8-P.cjs";
|
|
4
|
+
import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-BA0KAHIB.cjs";
|
|
5
|
+
import { t as DataLinkArchivedReceipt } from "./push-CTxDD3yJ.cjs";
|
|
7
6
|
type JournalDocumentKind = "invoice" | "receipt";
|
|
8
7
|
type JournalEntryType = "document" | "reversal";
|
|
9
8
|
type JournalEntrySource = "hook" | "track" | "reconcile" | "settle" | "manual";
|
|
@@ -40,8 +39,6 @@ interface JournalStorage {
|
|
|
40
39
|
deleteReservation(kind: JournalDocumentKind, orderNumber: string): Promise<void>;
|
|
41
40
|
listReservations(range: JournalRange): Promise<JournalReservation[]>;
|
|
42
41
|
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/journal/journal.d.ts
|
|
45
42
|
declare const DEFAULT_PENDING_DAYS = 30;
|
|
46
43
|
declare class JournalWriteError extends Error {
|
|
47
44
|
override readonly name: string;
|
|
@@ -110,5 +107,4 @@ interface Journal {
|
|
|
110
107
|
reconcile(archive: readonly (Receipt | DataLinkArchivedReceipt)[], options?: JournalReconcileOptions): Promise<JournalReconciliation>;
|
|
111
108
|
}
|
|
112
109
|
declare function createJournal(storage: JournalStorage, options?: JournalOptions): Journal;
|
|
113
|
-
//#endregion
|
|
114
110
|
export { JournalRange as _, JournalReceiptQuery as a, JournalSettleApi as c, JournalWriteError as d, createJournal as f, JournalEntryType as g, JournalEntrySource as h, JournalOptions as i, JournalSettleOptions as l, JournalEntry as m, Journal as n, JournalReconcileOptions as o, JournalDocumentKind as p, JournalEntryQuery as r, JournalReconciliation as s, DEFAULT_PENDING_DAYS as t, JournalSettlement as u, JournalReservation as v, JournalStorage as y };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { f as DocumentEvent } from "./context-
|
|
2
|
-
import { r as Receipt } from "./types-
|
|
3
|
-
import { n as InvoiceDetails } from "./get-
|
|
4
|
-
import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-
|
|
5
|
-
import { t as DataLinkArchivedReceipt } from "./push-
|
|
6
|
-
//#region src/journal/types.d.ts
|
|
1
|
+
import { f as DocumentEvent } from "./context-BROX7Krw.js";
|
|
2
|
+
import { r as Receipt } from "./types-Z6rQoqHn.js";
|
|
3
|
+
import { n as InvoiceDetails } from "./get-BL4Fr8-P.js";
|
|
4
|
+
import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-CoybK69A.js";
|
|
5
|
+
import { t as DataLinkArchivedReceipt } from "./push-DJh5YkyV.js";
|
|
7
6
|
type JournalDocumentKind = "invoice" | "receipt";
|
|
8
7
|
type JournalEntryType = "document" | "reversal";
|
|
9
8
|
type JournalEntrySource = "hook" | "track" | "reconcile" | "settle" | "manual";
|
|
@@ -40,8 +39,6 @@ interface JournalStorage {
|
|
|
40
39
|
deleteReservation(kind: JournalDocumentKind, orderNumber: string): Promise<void>;
|
|
41
40
|
listReservations(range: JournalRange): Promise<JournalReservation[]>;
|
|
42
41
|
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/journal/journal.d.ts
|
|
45
42
|
declare const DEFAULT_PENDING_DAYS = 30;
|
|
46
43
|
declare class JournalWriteError extends Error {
|
|
47
44
|
override readonly name: string;
|
|
@@ -110,5 +107,4 @@ interface Journal {
|
|
|
110
107
|
reconcile(archive: readonly (Receipt | DataLinkArchivedReceipt)[], options?: JournalReconcileOptions): Promise<JournalReconciliation>;
|
|
111
108
|
}
|
|
112
109
|
declare function createJournal(storage: JournalStorage, options?: JournalOptions): Journal;
|
|
113
|
-
//#endregion
|
|
114
110
|
export { JournalRange as _, JournalReceiptQuery as a, JournalSettleApi as c, JournalWriteError as d, createJournal as f, JournalEntryType as g, JournalEntrySource as h, JournalOptions as i, JournalSettleOptions as l, JournalEntry as m, Journal as n, JournalReconcileOptions as o, JournalDocumentKind as p, JournalEntryQuery as r, JournalReconciliation as s, DEFAULT_PENDING_DAYS as t, JournalSettlement as u, JournalReservation as v, JournalStorage as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/payments/json.ts
|
|
2
2
|
function record(value) {
|
|
3
3
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
4
4
|
}
|
|
@@ -28,7 +28,6 @@ function path(value, ...keys) {
|
|
|
28
28
|
for (const key of keys) current = record(current)?.[key];
|
|
29
29
|
return current;
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
Object.defineProperty(exports, "numeric", {
|
|
33
32
|
enumerable: true,
|
|
34
33
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/payments/json.ts
|
|
2
2
|
function record(value) {
|
|
3
3
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
4
4
|
}
|
|
@@ -28,5 +28,4 @@ function path(value, ...keys) {
|
|
|
28
28
|
for (const key of keys) current = record(current)?.[key];
|
|
29
29
|
return current;
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { text as a, records as i, path as n, record as r, numeric as t };
|
package/dist/mcp/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_server = require("../server-
|
|
2
|
+
const require_server = require("../server-BKB4KsPn.cjs");
|
|
3
3
|
exports.DEFAULT_CONFIRMATION_TTL_MS = require_server.DEFAULT_CONFIRMATION_TTL_MS;
|
|
4
4
|
exports.MCP_LEGACY_VERSIONS = require_server.MCP_LEGACY_VERSIONS;
|
|
5
5
|
exports.MCP_MODERN_VERSIONS = require_server.MCP_MODERN_VERSIONS;
|
package/dist/mcp/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { i as KasszaOptions } from "../client-
|
|
2
|
-
//#region src/mcp/protocol.d.ts
|
|
1
|
+
import { i as KasszaOptions } from "../client-B00WZ3FK.cjs";
|
|
3
2
|
export declare const MCP_MODERN_VERSIONS: readonly string[];
|
|
4
3
|
export declare const MCP_LEGACY_VERSIONS: readonly string[];
|
|
5
4
|
export declare const MCP_SUPPORTED_VERSIONS: readonly string[];
|
|
@@ -21,13 +20,9 @@ interface JsonRpcFailure {
|
|
|
21
20
|
readonly error: JsonRpcErrorObject;
|
|
22
21
|
}
|
|
23
22
|
type JsonRpcResponse = JsonRpcSuccess | JsonRpcFailure;
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/mcp/arguments.d.ts
|
|
26
23
|
export declare class ToolInputError extends Error {
|
|
27
24
|
override readonly name: string;
|
|
28
25
|
}
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/mcp/confirmation.d.ts
|
|
31
26
|
export declare const DEFAULT_CONFIRMATION_TTL_MS = 9e5;
|
|
32
27
|
interface ConfirmationOptions {
|
|
33
28
|
readonly secret?: string | Uint8Array | undefined;
|
|
@@ -44,8 +39,6 @@ interface Confirmations {
|
|
|
44
39
|
}
|
|
45
40
|
export declare function canonicalJson(value: unknown): string;
|
|
46
41
|
export declare function createConfirmations(options: ConfirmationOptions): Confirmations;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/mcp/server.d.ts
|
|
49
42
|
interface KasszaMcpServerOptions extends KasszaOptions {
|
|
50
43
|
readonly allowWrite?: boolean | undefined;
|
|
51
44
|
readonly confirmationSecret?: string | Uint8Array | undefined;
|
|
@@ -67,5 +60,4 @@ interface KasszaMcpServer {
|
|
|
67
60
|
connect(): McpConnection;
|
|
68
61
|
}
|
|
69
62
|
export declare function createKasszaMcpServer(options?: KasszaMcpServerOptions): KasszaMcpServer;
|
|
70
|
-
//#endregion
|
|
71
63
|
export type { Confirmations, IssuedConfirmation, JsonRpcFailure, JsonRpcId, JsonRpcResponse, JsonRpcSuccess, KasszaMcpServer, KasszaMcpServerOptions, McpConnection, McpToolInfo };
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { i as KasszaOptions } from "../client-
|
|
2
|
-
//#region src/mcp/protocol.d.ts
|
|
1
|
+
import { i as KasszaOptions } from "../client-BJfeFjCM.js";
|
|
3
2
|
export declare const MCP_MODERN_VERSIONS: readonly string[];
|
|
4
3
|
export declare const MCP_LEGACY_VERSIONS: readonly string[];
|
|
5
4
|
export declare const MCP_SUPPORTED_VERSIONS: readonly string[];
|
|
@@ -21,13 +20,9 @@ interface JsonRpcFailure {
|
|
|
21
20
|
readonly error: JsonRpcErrorObject;
|
|
22
21
|
}
|
|
23
22
|
type JsonRpcResponse = JsonRpcSuccess | JsonRpcFailure;
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/mcp/arguments.d.ts
|
|
26
23
|
export declare class ToolInputError extends Error {
|
|
27
24
|
override readonly name: string;
|
|
28
25
|
}
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/mcp/confirmation.d.ts
|
|
31
26
|
export declare const DEFAULT_CONFIRMATION_TTL_MS = 9e5;
|
|
32
27
|
interface ConfirmationOptions {
|
|
33
28
|
readonly secret?: string | Uint8Array | undefined;
|
|
@@ -44,8 +39,6 @@ interface Confirmations {
|
|
|
44
39
|
}
|
|
45
40
|
export declare function canonicalJson(value: unknown): string;
|
|
46
41
|
export declare function createConfirmations(options: ConfirmationOptions): Confirmations;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/mcp/server.d.ts
|
|
49
42
|
interface KasszaMcpServerOptions extends KasszaOptions {
|
|
50
43
|
readonly allowWrite?: boolean | undefined;
|
|
51
44
|
readonly confirmationSecret?: string | Uint8Array | undefined;
|
|
@@ -67,5 +60,4 @@ interface KasszaMcpServer {
|
|
|
67
60
|
connect(): McpConnection;
|
|
68
61
|
}
|
|
69
62
|
export declare function createKasszaMcpServer(options?: KasszaMcpServerOptions): KasszaMcpServer;
|
|
70
|
-
//#endregion
|
|
71
63
|
export type { Confirmations, IssuedConfirmation, JsonRpcFailure, JsonRpcId, JsonRpcResponse, JsonRpcSuccess, KasszaMcpServer, KasszaMcpServerOptions, McpConnection, McpToolInfo };
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { DEFAULT_CONFIRMATION_TTL_MS, MCP_LEGACY_VERSIONS, MCP_MODERN_VERSIONS, MCP_SUPPORTED_VERSIONS, ToolInputError, canonicalJson, createConfirmations, createKasszaMcpServer };
|
|
1
|
+
export { r as DEFAULT_CONFIRMATION_TTL_MS, s as MCP_LEGACY_VERSIONS, c as MCP_MODERN_VERSIONS, l as MCP_SUPPORTED_VERSIONS, o as ToolInputError, i as canonicalJson, a as createConfirmations, t as createKasszaMcpServer } from "../server-CPp6Gpbl.js";
|
package/dist/money/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_rounding = require("../rounding-
|
|
3
|
-
const require_vat = require("../vat-
|
|
4
|
-
const require_money = require("../money-
|
|
2
|
+
const require_rounding = require("../rounding-CHmSK5Z2.cjs");
|
|
3
|
+
const require_vat = require("../vat-BkoiiKm4.cjs");
|
|
4
|
+
const require_money = require("../money-NtVytaxG.cjs");
|
|
5
5
|
exports.NUMERIC_VAT_RATES = require_vat.NUMERIC_VAT_RATES;
|
|
6
6
|
exports.SPECIAL_VAT_CODES = require_vat.SPECIAL_VAT_CODES;
|
|
7
7
|
exports.addMoney = require_rounding.addMoney;
|
package/dist/money/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-
|
|
1
|
+
import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-CinpAhQM.cjs";
|
|
2
2
|
export { type AllocateRefundOptions, type DocumentKind, type DocumentTotals, type ItemAmounts, type ItemPriceInput, NUMERIC_VAT_RATES, type NumericVatRate, type RefundAllocation, type RefundVat, type RefundableItem, SPECIAL_VAT_CODES, type SpecialVatCode, type VatBreakdown, type VatRate, addMoney, allocateRefund, calculateInvoiceItem, calculateItemAmounts, calculateReceiptItem, decimalPlaces, formatVatRate, isHuf, isVatRate, roundMoney, summarizeItems, vatPercentage };
|
package/dist/money/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-
|
|
1
|
+
import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-CinpAhQM.js";
|
|
2
2
|
export { type AllocateRefundOptions, type DocumentKind, type DocumentTotals, type ItemAmounts, type ItemPriceInput, NUMERIC_VAT_RATES, type NumericVatRate, type RefundAllocation, type RefundVat, type RefundableItem, SPECIAL_VAT_CODES, type SpecialVatCode, type VatBreakdown, type VatRate, addMoney, allocateRefund, calculateInvoiceItem, calculateItemAmounts, calculateReceiptItem, decimalPlaces, formatVatRate, isHuf, isVatRate, roundMoney, summarizeItems, vatPercentage };
|
package/dist/money/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as decimalPlaces, r as roundMoney, t as addMoney } from "../rounding-
|
|
2
|
-
import { a as isVatRate, i as isHuf, n as SPECIAL_VAT_CODES, o as vatPercentage, r as formatVatRate, t as NUMERIC_VAT_RATES } from "../vat-
|
|
3
|
-
import { a as summarizeItems, i as calculateReceiptItem, n as calculateInvoiceItem, r as calculateItemAmounts, t as allocateRefund } from "../money-
|
|
1
|
+
import { n as decimalPlaces, r as roundMoney, t as addMoney } from "../rounding-CZLj4DbV.js";
|
|
2
|
+
import { a as isVatRate, i as isHuf, n as SPECIAL_VAT_CODES, o as vatPercentage, r as formatVatRate, t as NUMERIC_VAT_RATES } from "../vat-B4J5Q0tu.js";
|
|
3
|
+
import { a as summarizeItems, i as calculateReceiptItem, n as calculateInvoiceItem, r as calculateItemAmounts, t as allocateRefund } from "../money-f280VT77.js";
|
|
4
4
|
export { NUMERIC_VAT_RATES, SPECIAL_VAT_CODES, addMoney, allocateRefund, calculateInvoiceItem, calculateItemAmounts, calculateReceiptItem, decimalPlaces, formatVatRate, isHuf, isVatRate, roundMoney, summarizeItems, vatPercentage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_rounding = require("./rounding-
|
|
3
|
-
const require_vat = require("./vat-
|
|
4
|
-
|
|
1
|
+
const require_errors = require("./errors-Bn6pe6yw.cjs");
|
|
2
|
+
const require_rounding = require("./rounding-CHmSK5Z2.cjs");
|
|
3
|
+
const require_vat = require("./vat-BkoiiKm4.cjs");
|
|
4
|
+
// src/money/items.ts
|
|
5
5
|
const FOREIGN_CURRENCY_DECIMALS = 2;
|
|
6
6
|
const RECEIPT_HUF_DECIMALS = 2;
|
|
7
7
|
const MAX_UNIT_PRICE_DECIMALS = 6;
|
|
@@ -173,8 +173,7 @@ function summarizeItems(items) {
|
|
|
173
173
|
}))
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
|
|
177
|
-
//#region src/money/refund.ts
|
|
176
|
+
// src/money/refund.ts
|
|
178
177
|
function invalid(message) {
|
|
179
178
|
return new require_errors.SzamlazzError(message, { category: "validation" });
|
|
180
179
|
}
|
|
@@ -265,7 +264,6 @@ function allocateRefund(items, refundGross, options = {}) {
|
|
|
265
264
|
}];
|
|
266
265
|
});
|
|
267
266
|
}
|
|
268
|
-
//#endregion
|
|
269
267
|
Object.defineProperty(exports, "allocateRefund", {
|
|
270
268
|
enumerable: true,
|
|
271
269
|
get: function() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as SzamlazzError } from "./errors-
|
|
2
|
-
import { n as decimalPlaces, r as roundMoney } from "./rounding-
|
|
3
|
-
import { a as isVatRate, i as isHuf, o as vatPercentage } from "./vat-
|
|
4
|
-
|
|
1
|
+
import { r as SzamlazzError } from "./errors-CGGsW0Y5.js";
|
|
2
|
+
import { n as decimalPlaces, r as roundMoney } from "./rounding-CZLj4DbV.js";
|
|
3
|
+
import { a as isVatRate, i as isHuf, o as vatPercentage } from "./vat-B4J5Q0tu.js";
|
|
4
|
+
// src/money/items.ts
|
|
5
5
|
const FOREIGN_CURRENCY_DECIMALS = 2;
|
|
6
6
|
const RECEIPT_HUF_DECIMALS = 2;
|
|
7
7
|
const MAX_UNIT_PRICE_DECIMALS = 6;
|
|
@@ -173,8 +173,7 @@ function summarizeItems(items) {
|
|
|
173
173
|
}))
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
|
|
177
|
-
//#region src/money/refund.ts
|
|
176
|
+
// src/money/refund.ts
|
|
178
177
|
function invalid(message) {
|
|
179
178
|
return new SzamlazzError(message, { category: "validation" });
|
|
180
179
|
}
|
|
@@ -265,5 +264,4 @@ function allocateRefund(items, refundGross, options = {}) {
|
|
|
265
264
|
}];
|
|
266
265
|
});
|
|
267
266
|
}
|
|
268
|
-
//#endregion
|
|
269
267
|
export { summarizeItems as a, calculateReceiptItem as i, calculateInvoiceItem as n, calculateItemAmounts as r, allocateRefund as t };
|