kassza 0.18.1 → 0.19.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-BT2odGYl.d.cts} +8 -36
- package/dist/{client-SVZu25MB.d.cts → client-C-SYCiOZ.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-BuX6Eion.d.ts} +6 -24
- package/dist/{context-CFNKzStE.d.cts → context-PwqY4JOK.d.cts} +6 -24
- 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-CiGUjXut.d.ts} +3 -7
- package/dist/{create-once-Bh6fOWkW.d.cts → create-once-CyaVT36b.d.cts} +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-Y9qrIB8G.d.ts → journal-BNdo07p5.d.ts} +5 -9
- package/dist/{journal-DvI81Kt7.d.cts → journal-DI-hOW6N.d.cts} +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-BZ-ySQGx.cjs} +23 -35
- package/dist/{server-Dt6bEeBB.js → server-CDwsjBWk.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
package/dist/payments/stripe.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { n as trimTrailingSlashes } from "../url-DeCMiKVm.js";
|
|
2
|
+
import { a as timingSafeEqual, i as hmacHex } from "../crypto-BqGn_oGu.js";
|
|
3
|
+
import { c as plainResponse, d as WebhookVerificationError, h as normalizeCurrency, i as respondToWebhook, l as readRawBody, m as fromMinorUnits, r as deliverPayment, s as parseJsonObject, u as PaymentProviderError } from "../webhook-SFlA_nCf.js";
|
|
4
|
+
import { a as text, i as records, n as path, r as record, t as numeric } from "../json-as-6J7d-.js";
|
|
5
|
+
// src/payments/stripe.ts
|
|
5
6
|
const STRIPE_DEFAULT_TOLERANCE_SECONDS = 300;
|
|
6
7
|
const STRIPE_API_URL = "https://api.stripe.com";
|
|
7
8
|
const STRIPE_DEFAULT_METHOD = "bankkártya";
|
|
@@ -208,7 +209,7 @@ async function stripeGet(url, options, what) {
|
|
|
208
209
|
return body;
|
|
209
210
|
}
|
|
210
211
|
function apiUrl(options, pathname) {
|
|
211
|
-
return new URL(`${(options.apiUrl ?? "https://api.stripe.com")
|
|
212
|
+
return new URL(`${trimTrailingSlashes(options.apiUrl ?? "https://api.stripe.com")}${pathname}`);
|
|
212
213
|
}
|
|
213
214
|
async function fetchStripeLineItems(sessionId, options) {
|
|
214
215
|
const items = [];
|
|
@@ -316,5 +317,4 @@ function stripeWebhook(options) {
|
|
|
316
317
|
return plainResponse(200, "OK");
|
|
317
318
|
});
|
|
318
319
|
}
|
|
319
|
-
//#endregion
|
|
320
320
|
export { STRIPE_API_URL, STRIPE_DEFAULT_METHOD, STRIPE_DEFAULT_TOLERANCE_SECONDS, STRIPE_SHIPPING_ITEM_NAME, countStripeRefunds, fetchStripeLineItems, findStripeCheckoutSession, parseStripeEvent, parseStripeSignatureHeader, stripePaymentEvent, stripeWebhook, verifyStripeSignature };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { r as Receipt } from "./types-
|
|
2
|
-
import { n as InvoiceDetails } from "./get-
|
|
3
|
-
//#region src/data-link/push.d.ts
|
|
1
|
+
import { r as Receipt } from "./types-_HKTOCuQ.cjs";
|
|
2
|
+
import { n as InvoiceDetails } from "./get-BL4Fr8-P.cjs";
|
|
4
3
|
type DataLinkPushKind = "invoice" | "incoming-invoice" | "bank-transaction" | "receipts";
|
|
5
4
|
type DataLinkErrorReason = "invalid_payload" | "payload_too_large" | "unknown_document" | "missing_key";
|
|
6
5
|
declare class DataLinkError extends Error {
|
|
@@ -48,5 +47,4 @@ interface DataLinkReceiptsPush extends DataLinkPushBase {
|
|
|
48
47
|
}
|
|
49
48
|
type DataLinkPush = DataLinkInvoicePush | DataLinkBankTransactionPush | DataLinkReceiptsPush;
|
|
50
49
|
declare function parseDataLinkPush(xml: string, key?: string | undefined): DataLinkPush;
|
|
51
|
-
//#endregion
|
|
52
50
|
export { DataLinkError as a, DataLinkPush as c, parseDataLinkPush as d, DataLinkBankTransactionPush as i, DataLinkPushKind as l, DataLinkBankTransaction as n, DataLinkErrorReason as o, DataLinkBankTransactionPartner as r, DataLinkInvoicePush as s, DataLinkArchivedReceipt as t, DataLinkReceiptsPush as u };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { r as Receipt } from "./types-
|
|
2
|
-
import { n as InvoiceDetails } from "./get-
|
|
3
|
-
//#region src/data-link/push.d.ts
|
|
1
|
+
import { r as Receipt } from "./types-Z6rQoqHn.js";
|
|
2
|
+
import { n as InvoiceDetails } from "./get-BL4Fr8-P.js";
|
|
4
3
|
type DataLinkPushKind = "invoice" | "incoming-invoice" | "bank-transaction" | "receipts";
|
|
5
4
|
type DataLinkErrorReason = "invalid_payload" | "payload_too_large" | "unknown_document" | "missing_key";
|
|
6
5
|
declare class DataLinkError extends Error {
|
|
@@ -48,5 +47,4 @@ interface DataLinkReceiptsPush extends DataLinkPushBase {
|
|
|
48
47
|
}
|
|
49
48
|
type DataLinkPush = DataLinkInvoicePush | DataLinkBankTransactionPush | DataLinkReceiptsPush;
|
|
50
49
|
declare function parseDataLinkPush(xml: string, key?: string | undefined): DataLinkPush;
|
|
51
|
-
//#endregion
|
|
52
50
|
export { DataLinkError as a, DataLinkPush as c, parseDataLinkPush as d, DataLinkBankTransactionPush as i, DataLinkPushKind as l, DataLinkBankTransaction as n, DataLinkErrorReason as o, DataLinkBankTransactionPartner as r, DataLinkInvoicePush as s, DataLinkArchivedReceipt as t, DataLinkReceiptsPush as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as SzamlazzError } from "./errors-
|
|
2
|
-
import { t as base64ToBytes } from "./binary-
|
|
3
|
-
import { c as childNumber, l as childText } from "./serialize-
|
|
4
|
-
import { a as looksLikeXml, c as readDocumentHeaders, d as throwIfHeaderError, f as throwIfHttpError, h as unexpectedResponse, l as readHeader, m as throwIfXmlFailure, o as parseDoneText, p as throwIfTextError, s as parseResponseXml } from "./parse-
|
|
5
|
-
import { n as toAgentDate } from "./dates-
|
|
6
|
-
|
|
1
|
+
import { r as SzamlazzError } from "./errors-CGGsW0Y5.js";
|
|
2
|
+
import { t as base64ToBytes } from "./binary-DuKBSfH-.js";
|
|
3
|
+
import { c as childNumber, l as childText } from "./serialize-CjymGkJj.js";
|
|
4
|
+
import { a as looksLikeXml, c as readDocumentHeaders, d as throwIfHeaderError, f as throwIfHttpError, h as unexpectedResponse, l as readHeader, m as throwIfXmlFailure, o as parseDoneText, p as throwIfTextError, s as parseResponseXml } from "./parse-1RiSh4vY.js";
|
|
5
|
+
import { n as toAgentDate } from "./dates-DWsZOdaO.js";
|
|
6
|
+
// src/invoices/reference.ts
|
|
7
7
|
const AGENT_XSD_BASE_URL = "https://www.szamlazz.hu/szamla/docs/xsds/";
|
|
8
8
|
function validationError(message) {
|
|
9
9
|
return new SzamlazzError(message, { category: "validation" });
|
|
@@ -120,5 +120,4 @@ function parseInvoiceResult(response) {
|
|
|
120
120
|
if (headers.number !== void 0) return headers;
|
|
121
121
|
throw unexpectedResponse(response);
|
|
122
122
|
}
|
|
123
|
-
//#endregion
|
|
124
123
|
export { optionalText as a, requireText as c, optionalAgentDate as i, resolveInvoiceReference as l, agentDate as n, parseInvoiceResult as o, decodeResponsePdf as r, referenceValue as s, AGENT_XSD_BASE_URL as t, validationError as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_binary = require("./binary-
|
|
3
|
-
const require_serialize = require("./serialize-
|
|
4
|
-
const require_parse = require("./parse-
|
|
5
|
-
const require_dates = require("./dates-
|
|
6
|
-
|
|
1
|
+
const require_errors = require("./errors-Bn6pe6yw.cjs");
|
|
2
|
+
const require_binary = require("./binary-CdpKlNNI.cjs");
|
|
3
|
+
const require_serialize = require("./serialize-DEU7r6Bk.cjs");
|
|
4
|
+
const require_parse = require("./parse-CmM5va-p.cjs");
|
|
5
|
+
const require_dates = require("./dates-oOp3ypPP.cjs");
|
|
6
|
+
// src/invoices/reference.ts
|
|
7
7
|
const AGENT_XSD_BASE_URL = "https://www.szamlazz.hu/szamla/docs/xsds/";
|
|
8
8
|
function validationError(message) {
|
|
9
9
|
return new require_errors.SzamlazzError(message, { category: "validation" });
|
|
@@ -120,7 +120,6 @@ function parseInvoiceResult(response) {
|
|
|
120
120
|
if (headers.number !== void 0) return headers;
|
|
121
121
|
throw require_parse.unexpectedResponse(response);
|
|
122
122
|
}
|
|
123
|
-
//#endregion
|
|
124
123
|
Object.defineProperty(exports, "AGENT_XSD_BASE_URL", {
|
|
125
124
|
enumerable: true,
|
|
126
125
|
get: function() {
|
package/dist/reports/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_nav = require("../nav-
|
|
4
|
-
|
|
2
|
+
const require_rounding = require("../rounding-CHmSK5Z2.cjs");
|
|
3
|
+
const require_nav = require("../nav-VShZkjg8.cjs");
|
|
4
|
+
// src/reports/close.ts
|
|
5
5
|
function sign(receipt, amount) {
|
|
6
6
|
return receipt.type === "reversal" ? -Math.abs(amount) : amount;
|
|
7
7
|
}
|
|
@@ -91,7 +91,6 @@ function dailyClose(receipts, options = {}) {
|
|
|
91
91
|
}
|
|
92
92
|
return [...buckets.values()].map(toSummary).sort((a, b) => a.date.localeCompare(b.date) || a.currency.localeCompare(b.currency));
|
|
93
93
|
}
|
|
94
|
-
//#endregion
|
|
95
94
|
exports.NAV_VAT_CATEGORIES = require_nav.NAV_VAT_CATEGORIES;
|
|
96
95
|
exports.compareReceiptNumbers = require_nav.compareReceiptNumbers;
|
|
97
96
|
exports.dailyClose = dailyClose;
|
package/dist/reports/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as ReceiptItem, p as ReceiptVatRate, r as Receipt } from "../types-
|
|
2
|
-
//#region src/reports/close.d.ts
|
|
1
|
+
import { a as ReceiptItem, p as ReceiptVatRate, r as Receipt } from "../types-_HKTOCuQ.cjs";
|
|
3
2
|
interface DailyClosePaymentTotal {
|
|
4
3
|
readonly method: string;
|
|
5
4
|
readonly amount: number;
|
|
@@ -26,14 +25,10 @@ interface DailyCloseOptions {
|
|
|
26
25
|
readonly includeTest?: boolean | undefined;
|
|
27
26
|
}
|
|
28
27
|
export declare function dailyClose(receipts: readonly Receipt[], options?: DailyCloseOptions): DailyCloseSummary[];
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/reports/vat-category.d.ts
|
|
31
28
|
export declare const NAV_VAT_CATEGORIES: readonly ["0%", "5%", "18%", "27%", "Alanyi adómentes", "Egyéb"];
|
|
32
29
|
type NavVatCategory = (typeof NAV_VAT_CATEGORIES)[number];
|
|
33
30
|
export declare function navVatCategory(vat: ReceiptVatRate): NavVatCategory;
|
|
34
31
|
export declare function isNavVatCategory(value: string): value is NavVatCategory;
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/reports/nav.d.ts
|
|
37
32
|
type NavVatCategoryName = NavVatCategory | (string & {});
|
|
38
33
|
interface NavVatCategoryTotal {
|
|
39
34
|
readonly vat: NavVatCategoryName;
|
|
@@ -66,5 +61,4 @@ export declare function navCurrencyCode(currency: string): string;
|
|
|
66
61
|
export declare function compareReceiptNumbers(a: string, b: string): number;
|
|
67
62
|
export declare function navDailyReports(receipts: readonly Receipt[], options?: NavDailyReportOptions): NavReceiptReport[];
|
|
68
63
|
export declare function describeNavReport(report: NavReceiptReport): string;
|
|
69
|
-
//#endregion
|
|
70
64
|
export type { DailyCloseOptions, DailyClosePaymentTotal, DailyCloseSummary, DailyCloseVatTotal, NavDailyReportOptions, NavReceiptReport, NavVatCategory, NavVatCategoryName, NavVatCategoryTotal, ReceiptNumberParts };
|
package/dist/reports/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as ReceiptItem, p as ReceiptVatRate, r as Receipt } from "../types-
|
|
2
|
-
//#region src/reports/close.d.ts
|
|
1
|
+
import { a as ReceiptItem, p as ReceiptVatRate, r as Receipt } from "../types-Z6rQoqHn.js";
|
|
3
2
|
interface DailyClosePaymentTotal {
|
|
4
3
|
readonly method: string;
|
|
5
4
|
readonly amount: number;
|
|
@@ -26,14 +25,10 @@ interface DailyCloseOptions {
|
|
|
26
25
|
readonly includeTest?: boolean | undefined;
|
|
27
26
|
}
|
|
28
27
|
export declare function dailyClose(receipts: readonly Receipt[], options?: DailyCloseOptions): DailyCloseSummary[];
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/reports/vat-category.d.ts
|
|
31
28
|
export declare const NAV_VAT_CATEGORIES: readonly ["0%", "5%", "18%", "27%", "Alanyi adómentes", "Egyéb"];
|
|
32
29
|
type NavVatCategory = (typeof NAV_VAT_CATEGORIES)[number];
|
|
33
30
|
export declare function navVatCategory(vat: ReceiptVatRate): NavVatCategory;
|
|
34
31
|
export declare function isNavVatCategory(value: string): value is NavVatCategory;
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/reports/nav.d.ts
|
|
37
32
|
type NavVatCategoryName = NavVatCategory | (string & {});
|
|
38
33
|
interface NavVatCategoryTotal {
|
|
39
34
|
readonly vat: NavVatCategoryName;
|
|
@@ -66,5 +61,4 @@ export declare function navCurrencyCode(currency: string): string;
|
|
|
66
61
|
export declare function compareReceiptNumbers(a: string, b: string): number;
|
|
67
62
|
export declare function navDailyReports(receipts: readonly Receipt[], options?: NavDailyReportOptions): NavReceiptReport[];
|
|
68
63
|
export declare function describeNavReport(report: NavReceiptReport): string;
|
|
69
|
-
//#endregion
|
|
70
64
|
export type { DailyCloseOptions, DailyClosePaymentTotal, DailyCloseSummary, DailyCloseVatTotal, NavDailyReportOptions, NavReceiptReport, NavVatCategory, NavVatCategoryName, NavVatCategoryTotal, ReceiptNumberParts };
|
package/dist/reports/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as roundMoney } from "../rounding-
|
|
2
|
-
import { a as splitReceiptNumber, c as navVatCategory, i as navDailyReports, n as describeNavReport, o as NAV_VAT_CATEGORIES, r as navCurrencyCode, s as isNavVatCategory, t as compareReceiptNumbers } from "../nav-
|
|
3
|
-
|
|
1
|
+
import { r as roundMoney } from "../rounding-CZLj4DbV.js";
|
|
2
|
+
import { a as splitReceiptNumber, c as navVatCategory, i as navDailyReports, n as describeNavReport, o as NAV_VAT_CATEGORIES, r as navCurrencyCode, s as isNavVatCategory, t as compareReceiptNumbers } from "../nav-NvNgaONz.js";
|
|
3
|
+
// src/reports/close.ts
|
|
4
4
|
function sign(receipt, amount) {
|
|
5
5
|
return receipt.type === "reversal" ? -Math.abs(amount) : amount;
|
|
6
6
|
}
|
|
@@ -90,5 +90,4 @@ function dailyClose(receipts, options = {}) {
|
|
|
90
90
|
}
|
|
91
91
|
return [...buckets.values()].map(toSummary).sort((a, b) => a.date.localeCompare(b.date) || a.currency.localeCompare(b.currency));
|
|
92
92
|
}
|
|
93
|
-
//#endregion
|
|
94
93
|
export { NAV_VAT_CATEGORIES, compareReceiptNumbers, dailyClose, describeNavReport, isNavVatCategory, navCurrencyCode, navDailyReports, navVatCategory, splitReceiptNumber };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as decodeUtf8 } from "./binary-
|
|
2
|
-
|
|
1
|
+
import { r as decodeUtf8 } from "./binary-DuKBSfH-.js";
|
|
2
|
+
// src/core/request-body.ts
|
|
3
3
|
async function readRequestText(request, maxBytes, tooLarge) {
|
|
4
4
|
const declared = Number(request.headers.get("content-length"));
|
|
5
5
|
if (Number.isFinite(declared) && declared > maxBytes) throw tooLarge();
|
|
@@ -25,5 +25,4 @@ async function readRequestText(request, maxBytes, tooLarge) {
|
|
|
25
25
|
}
|
|
26
26
|
return decodeUtf8(bytes);
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { readRequestText as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_binary = require("./binary-
|
|
2
|
-
|
|
1
|
+
const require_binary = require("./binary-CdpKlNNI.cjs");
|
|
2
|
+
// src/core/request-body.ts
|
|
3
3
|
async function readRequestText(request, maxBytes, tooLarge) {
|
|
4
4
|
const declared = Number(request.headers.get("content-length"));
|
|
5
5
|
if (Number.isFinite(declared) && declared > maxBytes) throw tooLarge();
|
|
@@ -25,7 +25,6 @@ async function readRequestText(request, maxBytes, tooLarge) {
|
|
|
25
25
|
}
|
|
26
26
|
return require_binary.decodeUtf8(bytes);
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
Object.defineProperty(exports, "readRequestText", {
|
|
30
29
|
enumerable: true,
|
|
31
30
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/money/rounding.ts
|
|
2
2
|
function roundMoney(value, decimals = 0) {
|
|
3
3
|
if (!Number.isFinite(value)) throw new RangeError(`Nem véges összeg: ${value}`);
|
|
4
4
|
const factor = 10 ** decimals;
|
|
@@ -16,7 +16,6 @@ function decimalPlaces(value) {
|
|
|
16
16
|
function addMoney(...values) {
|
|
17
17
|
return roundMoney(values.reduce((sum, value) => sum + value, 0), Math.max(0, ...values.map(decimalPlaces)));
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
Object.defineProperty(exports, "addMoney", {
|
|
21
20
|
enumerable: true,
|
|
22
21
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/money/rounding.ts
|
|
2
2
|
function roundMoney(value, decimals = 0) {
|
|
3
3
|
if (!Number.isFinite(value)) throw new RangeError(`Nem véges összeg: ${value}`);
|
|
4
4
|
const factor = 10 ** decimals;
|
|
@@ -16,5 +16,4 @@ function decimalPlaces(value) {
|
|
|
16
16
|
function addMoney(...values) {
|
|
17
17
|
return roundMoney(values.reduce((sum, value) => sum + value, 0), Math.max(0, ...values.map(decimalPlaces)));
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { decimalPlaces as n, roundMoney as r, addMoney as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/xml/parse.ts
|
|
2
2
|
var XmlParseError = class extends Error {
|
|
3
3
|
name = "XmlParseError";
|
|
4
4
|
};
|
|
@@ -142,8 +142,7 @@ function childBoolean(element, name) {
|
|
|
142
142
|
if (value === "true" || value === "1") return true;
|
|
143
143
|
if (value === "false" || value === "0") return false;
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
//#region src/core/xml/serialize.ts
|
|
145
|
+
// src/core/xml/serialize.ts
|
|
147
146
|
function el(name, content, attributes) {
|
|
148
147
|
return attributes === void 0 ? {
|
|
149
148
|
name,
|
|
@@ -215,5 +214,4 @@ function buildXmlDocument(options) {
|
|
|
215
214
|
const body = options.children.filter(isPresent).map((child) => renderNode(child, 1)).join("\n");
|
|
216
215
|
return `<?xml version="1.0" encoding="UTF-8"?>\n<${options.root} ${attributes.join(" ")}>\n${body}\n</${options.root}>\n`;
|
|
217
216
|
}
|
|
218
|
-
//#endregion
|
|
219
217
|
export { optionalEl as a, childNumber as c, findChildren as d, parseXml as f, formatXmlNumber as i, childText as l, buildXmlDocument as n, XmlParseError as o, el as r, childBoolean as s, XSI_NAMESPACE as t, findChild as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/xml/parse.ts
|
|
2
2
|
var XmlParseError = class extends Error {
|
|
3
3
|
name = "XmlParseError";
|
|
4
4
|
};
|
|
@@ -142,8 +142,7 @@ function childBoolean(element, name) {
|
|
|
142
142
|
if (value === "true" || value === "1") return true;
|
|
143
143
|
if (value === "false" || value === "0") return false;
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
//#region src/core/xml/serialize.ts
|
|
145
|
+
// src/core/xml/serialize.ts
|
|
147
146
|
function el(name, content, attributes) {
|
|
148
147
|
return attributes === void 0 ? {
|
|
149
148
|
name,
|
|
@@ -215,7 +214,6 @@ function buildXmlDocument(options) {
|
|
|
215
214
|
const body = options.children.filter(isPresent).map((child) => renderNode(child, 1)).join("\n");
|
|
216
215
|
return `<?xml version="1.0" encoding="UTF-8"?>\n<${options.root} ${attributes.join(" ")}>\n${body}\n</${options.root}>\n`;
|
|
217
216
|
}
|
|
218
|
-
//#endregion
|
|
219
217
|
Object.defineProperty(exports, "XSI_NAMESPACE", {
|
|
220
218
|
enumerable: true,
|
|
221
219
|
get: function() {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const require_create_once = require("./create-once-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_client = require("./client-
|
|
4
|
-
const require_once = require("./once-
|
|
5
|
-
const require_dates = require("./dates-
|
|
6
|
-
const require_vat = require("./vat-
|
|
7
|
-
const require_money = require("./money-
|
|
8
|
-
const require_create = require("./create-
|
|
9
|
-
const require_crypto = require("./crypto-
|
|
10
|
-
const require_nav = require("./nav-
|
|
11
|
-
|
|
1
|
+
const require_create_once = require("./create-once-zeF7GVVP.cjs");
|
|
2
|
+
const require_errors = require("./errors-Bn6pe6yw.cjs");
|
|
3
|
+
const require_client = require("./client-I_29IPMh.cjs");
|
|
4
|
+
const require_once = require("./once-BmXfrNbQ.cjs");
|
|
5
|
+
const require_dates = require("./dates-oOp3ypPP.cjs");
|
|
6
|
+
const require_vat = require("./vat-BkoiiKm4.cjs");
|
|
7
|
+
const require_money = require("./money-NtVytaxG.cjs");
|
|
8
|
+
const require_create = require("./create-DH5jiZPA.cjs");
|
|
9
|
+
const require_crypto = require("./crypto-B0PAHKJB.cjs");
|
|
10
|
+
const require_nav = require("./nav-VShZkjg8.cjs");
|
|
11
|
+
// src/mcp/protocol.ts
|
|
12
12
|
const MCP_MODERN_VERSIONS = ["2026-07-28"];
|
|
13
13
|
const MCP_LEGACY_VERSIONS = [
|
|
14
14
|
"2025-11-25",
|
|
@@ -90,8 +90,7 @@ function parseMcpMessage(value) {
|
|
|
90
90
|
function protocolFailure(error) {
|
|
91
91
|
return failure(error.id, error.code, error.message, error.data);
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
//#region src/mcp/arguments.ts
|
|
93
|
+
// src/mcp/arguments.ts
|
|
95
94
|
var ToolInputError = class extends Error {
|
|
96
95
|
name = "ToolInputError";
|
|
97
96
|
};
|
|
@@ -180,8 +179,7 @@ function receiptVat(value, path) {
|
|
|
180
179
|
if (code !== void 0) return code;
|
|
181
180
|
throw vatFailure(value, path);
|
|
182
181
|
}
|
|
183
|
-
|
|
184
|
-
//#region src/mcp/confirmation.ts
|
|
182
|
+
// src/mcp/confirmation.ts
|
|
185
183
|
const DEFAULT_CONFIRMATION_TTL_MS = 9e5;
|
|
186
184
|
const SECRET_BYTES = 32;
|
|
187
185
|
const SIGNATURE_LENGTH = 32;
|
|
@@ -233,11 +231,9 @@ function createConfirmations(options) {
|
|
|
233
231
|
}
|
|
234
232
|
};
|
|
235
233
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
//#endregion
|
|
240
|
-
//#region src/mcp/tool-kit.ts
|
|
234
|
+
// src/core/version.ts
|
|
235
|
+
const KASSZA_VERSION = "0.18.1";
|
|
236
|
+
// src/mcp/tool-kit.ts
|
|
241
237
|
const LOCAL_READ = {
|
|
242
238
|
readOnlyHint: true,
|
|
243
239
|
destructiveHint: false,
|
|
@@ -279,8 +275,7 @@ function splitConfirmation(args) {
|
|
|
279
275
|
confirmation
|
|
280
276
|
};
|
|
281
277
|
}
|
|
282
|
-
|
|
283
|
-
//#region src/mcp/inputs.ts
|
|
278
|
+
// src/mcp/inputs.ts
|
|
284
279
|
const MCP_INVOICE_TYPES = ["invoice", "proforma"];
|
|
285
280
|
const BUYER_KEYS = [
|
|
286
281
|
"name",
|
|
@@ -448,8 +443,7 @@ function receiptInputOf(args, extraKeys = []) {
|
|
|
448
443
|
downloadPdf: false
|
|
449
444
|
};
|
|
450
445
|
}
|
|
451
|
-
|
|
452
|
-
//#region src/mcp/schemas.ts
|
|
446
|
+
// src/mcp/schemas.ts
|
|
453
447
|
const TEXT = {
|
|
454
448
|
type: "string",
|
|
455
449
|
minLength: 1
|
|
@@ -663,8 +657,7 @@ const CREATE_RECEIPT_SCHEMA = objectSchema({
|
|
|
663
657
|
...RECEIPT_PROPERTIES,
|
|
664
658
|
confirmation: CONFIRMATION_PROPERTY
|
|
665
659
|
}, ["items", "confirmation"]);
|
|
666
|
-
|
|
667
|
-
//#region src/mcp/tools-invoice.ts
|
|
660
|
+
// src/mcp/tools-invoice.ts
|
|
668
661
|
const PREVIEW_INVOICE = "preview_invoice";
|
|
669
662
|
const CREATE_INVOICE = "create_invoice";
|
|
670
663
|
function documentLabel(resolved) {
|
|
@@ -992,8 +985,7 @@ const LOOKUP_TOOLS = [
|
|
|
992
985
|
run: navDailySummary
|
|
993
986
|
}
|
|
994
987
|
];
|
|
995
|
-
|
|
996
|
-
//#region src/mcp/tools-receipt.ts
|
|
988
|
+
// src/mcp/tools-receipt.ts
|
|
997
989
|
const PREVIEW_RECEIPT = "preview_receipt";
|
|
998
990
|
const CREATE_RECEIPT = "create_receipt";
|
|
999
991
|
const DUPLICATE_CALL_ID = 338;
|
|
@@ -1112,8 +1104,7 @@ const RECEIPT_TOOLS = [{
|
|
|
1112
1104
|
write: true,
|
|
1113
1105
|
run: createReceipt
|
|
1114
1106
|
}];
|
|
1115
|
-
|
|
1116
|
-
//#region src/mcp/tools-reversal.ts
|
|
1107
|
+
// src/mcp/tools-reversal.ts
|
|
1117
1108
|
const PREVIEW_REVERSAL = "preview_reversal";
|
|
1118
1109
|
const REVERSE_INVOICE = "reverse_invoice";
|
|
1119
1110
|
const REVERSE_RECEIPT = "reverse_receipt";
|
|
@@ -1284,16 +1275,14 @@ const REVERSAL_TOOLS = [
|
|
|
1284
1275
|
run: reverseReceipt
|
|
1285
1276
|
}
|
|
1286
1277
|
];
|
|
1287
|
-
|
|
1288
|
-
//#region src/mcp/tools.ts
|
|
1278
|
+
// src/mcp/tools.ts
|
|
1289
1279
|
const KASSZA_MCP_TOOLS = [
|
|
1290
1280
|
...INVOICE_TOOLS,
|
|
1291
1281
|
...RECEIPT_TOOLS,
|
|
1292
1282
|
...REVERSAL_TOOLS,
|
|
1293
1283
|
...LOOKUP_TOOLS
|
|
1294
1284
|
];
|
|
1295
|
-
|
|
1296
|
-
//#region src/mcp/server.ts
|
|
1285
|
+
// src/mcp/server.ts
|
|
1297
1286
|
const SERVER_INFO = {
|
|
1298
1287
|
name: "kassza",
|
|
1299
1288
|
title: "kassza: Számlázz.hu számlák és nyugták",
|
|
@@ -1501,7 +1490,6 @@ function createKasszaMcpServer(options = {}) {
|
|
|
1501
1490
|
}
|
|
1502
1491
|
};
|
|
1503
1492
|
}
|
|
1504
|
-
//#endregion
|
|
1505
1493
|
Object.defineProperty(exports, "DEFAULT_CONFIRMATION_TTL_MS", {
|
|
1506
1494
|
enumerable: true,
|
|
1507
1495
|
get: function() {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as resolveInvoice, l as INVOICE_LANGUAGES } from "./create-once-
|
|
2
|
-
import { o as isSzamlazzError, r as SzamlazzError } from "./errors-
|
|
3
|
-
import { t as createKassza } from "./client-
|
|
4
|
-
import { i as resolveRecoveryDelay, n as isUncertainOutcome, r as recoverAfterFailure } from "./once-
|
|
5
|
-
import { r as toBudapestDate } from "./dates-
|
|
6
|
-
import { a as isVatRate } from "./vat-
|
|
7
|
-
import { a as summarizeItems } from "./money-
|
|
8
|
-
import { l as RECEIPT_ONLY_VAT_CODES, n as calculateReceiptItems, t as buildCreateReceiptXml } from "./create-
|
|
9
|
-
import { a as timingSafeEqual, i as hmacHex, n as digestHex } from "./crypto-
|
|
10
|
-
import { i as navDailyReports, n as describeNavReport } from "./nav-
|
|
11
|
-
|
|
1
|
+
import { c as resolveInvoice, l as INVOICE_LANGUAGES } from "./create-once-B6cAXyET.js";
|
|
2
|
+
import { o as isSzamlazzError, r as SzamlazzError } from "./errors-CGGsW0Y5.js";
|
|
3
|
+
import { t as createKassza } from "./client-JZ1M1sZX.js";
|
|
4
|
+
import { i as resolveRecoveryDelay, n as isUncertainOutcome, r as recoverAfterFailure } from "./once-CMhDPrs7.js";
|
|
5
|
+
import { r as toBudapestDate } from "./dates-DWsZOdaO.js";
|
|
6
|
+
import { a as isVatRate } from "./vat-B4J5Q0tu.js";
|
|
7
|
+
import { a as summarizeItems } from "./money-f280VT77.js";
|
|
8
|
+
import { l as RECEIPT_ONLY_VAT_CODES, n as calculateReceiptItems, t as buildCreateReceiptXml } from "./create-BwRslos0.js";
|
|
9
|
+
import { a as timingSafeEqual, i as hmacHex, n as digestHex } from "./crypto-BqGn_oGu.js";
|
|
10
|
+
import { i as navDailyReports, n as describeNavReport } from "./nav-NvNgaONz.js";
|
|
11
|
+
// src/mcp/protocol.ts
|
|
12
12
|
const MCP_MODERN_VERSIONS = ["2026-07-28"];
|
|
13
13
|
const MCP_LEGACY_VERSIONS = [
|
|
14
14
|
"2025-11-25",
|
|
@@ -90,8 +90,7 @@ function parseMcpMessage(value) {
|
|
|
90
90
|
function protocolFailure(error) {
|
|
91
91
|
return failure(error.id, error.code, error.message, error.data);
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
//#region src/mcp/arguments.ts
|
|
93
|
+
// src/mcp/arguments.ts
|
|
95
94
|
var ToolInputError = class extends Error {
|
|
96
95
|
name = "ToolInputError";
|
|
97
96
|
};
|
|
@@ -180,8 +179,7 @@ function receiptVat(value, path) {
|
|
|
180
179
|
if (code !== void 0) return code;
|
|
181
180
|
throw vatFailure(value, path);
|
|
182
181
|
}
|
|
183
|
-
|
|
184
|
-
//#region src/mcp/confirmation.ts
|
|
182
|
+
// src/mcp/confirmation.ts
|
|
185
183
|
const DEFAULT_CONFIRMATION_TTL_MS = 9e5;
|
|
186
184
|
const SECRET_BYTES = 32;
|
|
187
185
|
const SIGNATURE_LENGTH = 32;
|
|
@@ -233,11 +231,9 @@ function createConfirmations(options) {
|
|
|
233
231
|
}
|
|
234
232
|
};
|
|
235
233
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
//#endregion
|
|
240
|
-
//#region src/mcp/tool-kit.ts
|
|
234
|
+
// src/core/version.ts
|
|
235
|
+
const KASSZA_VERSION = "0.18.1";
|
|
236
|
+
// src/mcp/tool-kit.ts
|
|
241
237
|
const LOCAL_READ = {
|
|
242
238
|
readOnlyHint: true,
|
|
243
239
|
destructiveHint: false,
|
|
@@ -279,8 +275,7 @@ function splitConfirmation(args) {
|
|
|
279
275
|
confirmation
|
|
280
276
|
};
|
|
281
277
|
}
|
|
282
|
-
|
|
283
|
-
//#region src/mcp/inputs.ts
|
|
278
|
+
// src/mcp/inputs.ts
|
|
284
279
|
const MCP_INVOICE_TYPES = ["invoice", "proforma"];
|
|
285
280
|
const BUYER_KEYS = [
|
|
286
281
|
"name",
|
|
@@ -448,8 +443,7 @@ function receiptInputOf(args, extraKeys = []) {
|
|
|
448
443
|
downloadPdf: false
|
|
449
444
|
};
|
|
450
445
|
}
|
|
451
|
-
|
|
452
|
-
//#region src/mcp/schemas.ts
|
|
446
|
+
// src/mcp/schemas.ts
|
|
453
447
|
const TEXT = {
|
|
454
448
|
type: "string",
|
|
455
449
|
minLength: 1
|
|
@@ -663,8 +657,7 @@ const CREATE_RECEIPT_SCHEMA = objectSchema({
|
|
|
663
657
|
...RECEIPT_PROPERTIES,
|
|
664
658
|
confirmation: CONFIRMATION_PROPERTY
|
|
665
659
|
}, ["items", "confirmation"]);
|
|
666
|
-
|
|
667
|
-
//#region src/mcp/tools-invoice.ts
|
|
660
|
+
// src/mcp/tools-invoice.ts
|
|
668
661
|
const PREVIEW_INVOICE = "preview_invoice";
|
|
669
662
|
const CREATE_INVOICE = "create_invoice";
|
|
670
663
|
function documentLabel(resolved) {
|
|
@@ -992,8 +985,7 @@ const LOOKUP_TOOLS = [
|
|
|
992
985
|
run: navDailySummary
|
|
993
986
|
}
|
|
994
987
|
];
|
|
995
|
-
|
|
996
|
-
//#region src/mcp/tools-receipt.ts
|
|
988
|
+
// src/mcp/tools-receipt.ts
|
|
997
989
|
const PREVIEW_RECEIPT = "preview_receipt";
|
|
998
990
|
const CREATE_RECEIPT = "create_receipt";
|
|
999
991
|
const DUPLICATE_CALL_ID = 338;
|
|
@@ -1112,8 +1104,7 @@ const RECEIPT_TOOLS = [{
|
|
|
1112
1104
|
write: true,
|
|
1113
1105
|
run: createReceipt
|
|
1114
1106
|
}];
|
|
1115
|
-
|
|
1116
|
-
//#region src/mcp/tools-reversal.ts
|
|
1107
|
+
// src/mcp/tools-reversal.ts
|
|
1117
1108
|
const PREVIEW_REVERSAL = "preview_reversal";
|
|
1118
1109
|
const REVERSE_INVOICE = "reverse_invoice";
|
|
1119
1110
|
const REVERSE_RECEIPT = "reverse_receipt";
|
|
@@ -1284,16 +1275,14 @@ const REVERSAL_TOOLS = [
|
|
|
1284
1275
|
run: reverseReceipt
|
|
1285
1276
|
}
|
|
1286
1277
|
];
|
|
1287
|
-
|
|
1288
|
-
//#region src/mcp/tools.ts
|
|
1278
|
+
// src/mcp/tools.ts
|
|
1289
1279
|
const KASSZA_MCP_TOOLS = [
|
|
1290
1280
|
...INVOICE_TOOLS,
|
|
1291
1281
|
...RECEIPT_TOOLS,
|
|
1292
1282
|
...REVERSAL_TOOLS,
|
|
1293
1283
|
...LOOKUP_TOOLS
|
|
1294
1284
|
];
|
|
1295
|
-
|
|
1296
|
-
//#region src/mcp/server.ts
|
|
1285
|
+
// src/mcp/server.ts
|
|
1297
1286
|
const SERVER_INFO = {
|
|
1298
1287
|
name: "kassza",
|
|
1299
1288
|
title: "kassza: Számlázz.hu számlák és nyugták",
|
|
@@ -1501,5 +1490,4 @@ function createKasszaMcpServer(options = {}) {
|
|
|
1501
1490
|
}
|
|
1502
1491
|
};
|
|
1503
1492
|
}
|
|
1504
|
-
//#endregion
|
|
1505
1493
|
export { createConfirmations as a, MCP_MODERN_VERSIONS as c, canonicalJson as i, MCP_SUPPORTED_VERSIONS as l, KASSZA_VERSION as n, ToolInputError as o, DEFAULT_CONFIRMATION_TTL_MS as r, MCP_LEGACY_VERSIONS as s, createKasszaMcpServer as t };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { n as KeyValueStore } from "./store-
|
|
2
|
-
//#region src/core/session.d.ts
|
|
1
|
+
import { n as KeyValueStore } from "./store-BkaZ8qkU.cjs";
|
|
3
2
|
type CookieStore = KeyValueStore;
|
|
4
3
|
declare const SESSION_TTL_SECONDS: number;
|
|
5
4
|
declare function memoryCookieStore(): CookieStore;
|
|
6
|
-
//#endregion
|
|
7
5
|
export { SESSION_TTL_SECONDS as n, memoryCookieStore as r, CookieStore as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/store.ts
|
|
2
2
|
function storeCapabilities(store) {
|
|
3
3
|
return {
|
|
4
4
|
setIfAbsent: typeof store.setIfAbsent === "function",
|
|
@@ -61,8 +61,7 @@ function memoryStore() {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
//#region src/core/session.ts
|
|
64
|
+
// src/core/session.ts
|
|
66
65
|
const SESSION_TTL_SECONDS = 5100;
|
|
67
66
|
function memoryCookieStore() {
|
|
68
67
|
return memoryStore();
|
|
@@ -109,7 +108,6 @@ function mergeSetCookies(existing, headers) {
|
|
|
109
108
|
if (!changed) return void 0;
|
|
110
109
|
return [...pairs].map(([name, value]) => `${name}=${value}`).join("; ");
|
|
111
110
|
}
|
|
112
|
-
//#endregion
|
|
113
111
|
Object.defineProperty(exports, "SESSION_TTL_SECONDS", {
|
|
114
112
|
enumerable: true,
|
|
115
113
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/store.ts
|
|
2
2
|
function storeCapabilities(store) {
|
|
3
3
|
return {
|
|
4
4
|
setIfAbsent: typeof store.setIfAbsent === "function",
|
|
@@ -61,8 +61,7 @@ function memoryStore() {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
//#region src/core/session.ts
|
|
64
|
+
// src/core/session.ts
|
|
66
65
|
const SESSION_TTL_SECONDS = 5100;
|
|
67
66
|
function memoryCookieStore() {
|
|
68
67
|
return memoryStore();
|
|
@@ -109,5 +108,4 @@ function mergeSetCookies(existing, headers) {
|
|
|
109
108
|
if (!changed) return void 0;
|
|
110
109
|
return [...pairs].map(([name, value]) => `${name}=${value}`).join("; ");
|
|
111
110
|
}
|
|
112
|
-
//#endregion
|
|
113
111
|
export { memoryStore as a, sessionKeyFor as i, memoryCookieStore as n, storeCapabilities as o, mergeSetCookies as r, SESSION_TTL_SECONDS as t };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { n as KeyValueStore } from "./store-
|
|
2
|
-
//#region src/core/session.d.ts
|
|
1
|
+
import { n as KeyValueStore } from "./store-BkaZ8qkU.js";
|
|
3
2
|
type CookieStore = KeyValueStore;
|
|
4
3
|
declare const SESSION_TTL_SECONDS: number;
|
|
5
4
|
declare function memoryCookieStore(): CookieStore;
|
|
6
|
-
//#endregion
|
|
7
5
|
export { SESSION_TTL_SECONDS as n, memoryCookieStore as r, CookieStore as t };
|