kassza 0.16.0 → 0.18.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/dist/cli.cjs +2 -2
- package/dist/cli.js +2 -2
- package/dist/{client-Cvf-hTz_.js → client-CdWEA0et.js} +2 -1
- package/dist/{client-CLFvJCVW.cjs → client-Cvb9yfxU.cjs} +2 -1
- package/dist/{create-once-9yxR_Er_.cjs → create-once-CHhDz0un.cjs} +11 -1
- package/dist/{create-once-Ca2gMk1h.js → create-once-CW0x_yvp.js} +6 -2
- package/dist/delegation/index.cjs +1 -1
- package/dist/delegation/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/{server-Dg-hoY01.cjs → server-B9guio75.cjs} +3 -3
- package/dist/{server-Bu-Ocpo-.js → server-yx9eG_8p.js} +3 -3
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const require_errors = require("./errors-EE96_6D_.cjs");
|
|
3
|
-
const require_client = require("./client-
|
|
3
|
+
const require_client = require("./client-Cvb9yfxU.cjs");
|
|
4
4
|
const require_serialize = require("./serialize-CquIsxA-.cjs");
|
|
5
5
|
const require_create = require("./create-CvUvLUaT.cjs");
|
|
6
6
|
const require_nav = require("./nav-BNbc8U0R.cjs");
|
|
7
|
-
const require_server = require("./server-
|
|
7
|
+
const require_server = require("./server-B9guio75.cjs");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_readline = require("node:readline");
|
|
10
10
|
//#region src/cli/args.ts
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { o as isSzamlazzError, r as SzamlazzError } from "./errors-DtN4g5Z9.js";
|
|
3
|
-
import { s as buildCreateInvoiceXml, t as createKassza } from "./client-
|
|
3
|
+
import { s as buildCreateInvoiceXml, t as createKassza } from "./client-CdWEA0et.js";
|
|
4
4
|
import { r as el } from "./serialize-B2eFh3D-.js";
|
|
5
5
|
import { t as buildCreateReceiptXml } from "./create-CflXrPip.js";
|
|
6
6
|
import { i as navDailyReports, n as describeNavReport } from "./nav-BcCerwWS.js";
|
|
7
|
-
import { n as KASSZA_VERSION, t as createKasszaMcpServer } from "./server-
|
|
7
|
+
import { n as KASSZA_VERSION, t as createKasszaMcpServer } from "./server-yx9eG_8p.js";
|
|
8
8
|
import { readFile } from "node:fs/promises";
|
|
9
9
|
import { createInterface } from "node:readline";
|
|
10
10
|
//#region src/cli/args.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as registerPayment, c as resolveInvoice, d as TAXPAYER_TYPE_CODES,
|
|
1
|
+
import { a as registerPayment, c as resolveInvoice, d as TAXPAYER_TYPE_CODES, f as KASSZA_AGGREGATOR, g as AGENT_ACTIONS, i as clearPayments, m as emitDocumentEvent, o as optionalAgentDate, r as registerPaymentOnce, s as presentText, t as createReceiptOnce, u as INVOICE_TEMPLATES } from "./create-once-CW0x_yvp.js";
|
|
2
2
|
import { i as createAgentError, o as isSzamlazzError, r as SzamlazzError, s as parseErrorCode } from "./errors-DtN4g5Z9.js";
|
|
3
3
|
import { t as base64ToBytes } from "./binary-D0M9U2MD.js";
|
|
4
4
|
import { a as optionalEl, c as childNumber, d as findChildren, l as childText, n as buildXmlDocument, r as el, s as childBoolean, u as findChild } from "./serialize-B2eFh3D-.js";
|
|
@@ -819,6 +819,7 @@ function buildReverseInvoiceXml(credentials, input) {
|
|
|
819
819
|
...credentials,
|
|
820
820
|
el("eszamla", options.eInvoice ?? false),
|
|
821
821
|
el("szamlaLetoltes", options.downloadPdf ?? true),
|
|
822
|
+
el("aggregator", KASSZA_AGGREGATOR),
|
|
822
823
|
el("valaszVerzio", 2),
|
|
823
824
|
optionalEl("szamlaKulsoAzon", optionalText(options.externalId))
|
|
824
825
|
]),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_create_once = require("./create-once-
|
|
1
|
+
const require_create_once = require("./create-once-CHhDz0un.cjs");
|
|
2
2
|
const require_errors = require("./errors-EE96_6D_.cjs");
|
|
3
3
|
const require_binary = require("./binary-B89HM03_.cjs");
|
|
4
4
|
const require_serialize = require("./serialize-CquIsxA-.cjs");
|
|
@@ -819,6 +819,7 @@ function buildReverseInvoiceXml(credentials, input) {
|
|
|
819
819
|
...credentials,
|
|
820
820
|
require_serialize.el("eszamla", options.eInvoice ?? false),
|
|
821
821
|
require_serialize.el("szamlaLetoltes", options.downloadPdf ?? true),
|
|
822
|
+
require_serialize.el("aggregator", require_create_once.KASSZA_AGGREGATOR),
|
|
822
823
|
require_serialize.el("valaszVerzio", 2),
|
|
823
824
|
require_serialize.optionalEl("szamlaKulsoAzon", require_reference.optionalText(options.externalId))
|
|
824
825
|
]),
|
|
@@ -71,6 +71,9 @@ async function emitDocumentEvent(hook, event, options = {}) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
|
+
//#region src/core/aggregator.ts
|
|
75
|
+
const KASSZA_AGGREGATOR = "3UMUqqWEJ7bXfJp9KXNWcrddY9sKjDVD";
|
|
76
|
+
//#endregion
|
|
74
77
|
//#region src/invoices/create-types.ts
|
|
75
78
|
const INVOICE_TYPES = [
|
|
76
79
|
"invoice",
|
|
@@ -314,7 +317,7 @@ function resolveInvoice(defaults, input, now) {
|
|
|
314
317
|
simpleItems,
|
|
315
318
|
euVat: input.euVat ?? defaults.euVat,
|
|
316
319
|
logoExtra: presentText(input.logoExtra) ?? presentText(defaults.logoExtra),
|
|
317
|
-
aggregator: presentText(input.aggregator) ?? presentText(defaults.aggregator),
|
|
320
|
+
aggregator: presentText(input.aggregator) ?? presentText(defaults.aggregator) ?? "3UMUqqWEJ7bXfJp9KXNWcrddY9sKjDVD",
|
|
318
321
|
guardian: input.guardian ?? defaults.guardian,
|
|
319
322
|
articleIdentifierInvoice: input.articleIdentifierInvoice ?? defaults.articleIdentifierInvoice,
|
|
320
323
|
seller: mergeSeller(defaults.seller, input.seller),
|
|
@@ -369,6 +372,7 @@ function buildPaymentXml(credentials, request) {
|
|
|
369
372
|
require_serialize.el("szamlaszam", invoiceNumber),
|
|
370
373
|
require_serialize.optionalEl("adoszam", require_reference.optionalText(request.taxNumber)),
|
|
371
374
|
require_serialize.el("additiv", request.additive),
|
|
375
|
+
require_serialize.el("aggregator", KASSZA_AGGREGATOR),
|
|
372
376
|
require_serialize.el("valaszVerzio", 2)
|
|
373
377
|
]), ...request.payments.map(paymentNode)]
|
|
374
378
|
});
|
|
@@ -567,6 +571,12 @@ Object.defineProperty(exports, "INVOICE_TEMPLATES", {
|
|
|
567
571
|
return INVOICE_TEMPLATES;
|
|
568
572
|
}
|
|
569
573
|
});
|
|
574
|
+
Object.defineProperty(exports, "KASSZA_AGGREGATOR", {
|
|
575
|
+
enumerable: true,
|
|
576
|
+
get: function() {
|
|
577
|
+
return KASSZA_AGGREGATOR;
|
|
578
|
+
}
|
|
579
|
+
});
|
|
570
580
|
Object.defineProperty(exports, "MAX_INVOICE_ATTACHMENTS", {
|
|
571
581
|
enumerable: true,
|
|
572
582
|
get: function() {
|
|
@@ -71,6 +71,9 @@ async function emitDocumentEvent(hook, event, options = {}) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
|
+
//#region src/core/aggregator.ts
|
|
75
|
+
const KASSZA_AGGREGATOR = "3UMUqqWEJ7bXfJp9KXNWcrddY9sKjDVD";
|
|
76
|
+
//#endregion
|
|
74
77
|
//#region src/invoices/create-types.ts
|
|
75
78
|
const INVOICE_TYPES = [
|
|
76
79
|
"invoice",
|
|
@@ -314,7 +317,7 @@ function resolveInvoice(defaults, input, now) {
|
|
|
314
317
|
simpleItems,
|
|
315
318
|
euVat: input.euVat ?? defaults.euVat,
|
|
316
319
|
logoExtra: presentText(input.logoExtra) ?? presentText(defaults.logoExtra),
|
|
317
|
-
aggregator: presentText(input.aggregator) ?? presentText(defaults.aggregator),
|
|
320
|
+
aggregator: presentText(input.aggregator) ?? presentText(defaults.aggregator) ?? "3UMUqqWEJ7bXfJp9KXNWcrddY9sKjDVD",
|
|
318
321
|
guardian: input.guardian ?? defaults.guardian,
|
|
319
322
|
articleIdentifierInvoice: input.articleIdentifierInvoice ?? defaults.articleIdentifierInvoice,
|
|
320
323
|
seller: mergeSeller(defaults.seller, input.seller),
|
|
@@ -369,6 +372,7 @@ function buildPaymentXml(credentials, request) {
|
|
|
369
372
|
el("szamlaszam", invoiceNumber),
|
|
370
373
|
optionalEl("adoszam", optionalText(request.taxNumber)),
|
|
371
374
|
el("additiv", request.additive),
|
|
375
|
+
el("aggregator", KASSZA_AGGREGATOR),
|
|
372
376
|
el("valaszVerzio", 2)
|
|
373
377
|
]), ...request.payments.map(paymentNode)]
|
|
374
378
|
});
|
|
@@ -543,4 +547,4 @@ async function createReceiptOnce(api, input, options = {}, guard) {
|
|
|
543
547
|
}));
|
|
544
548
|
}
|
|
545
549
|
//#endregion
|
|
546
|
-
export {
|
|
550
|
+
export { MAX_INVOICE_ATTACHMENTS as _, registerPayment as a, resolveInvoice as c, TAXPAYER_TYPE_CODES as d, KASSZA_AGGREGATOR as f, AGENT_ACTIONS as g, isDocumentHookError as h, clearPayments as i, INVOICE_LANGUAGES as l, emitDocumentEvent as m, paymentMarker as n, optionalAgentDate as o, DocumentHookError as p, registerPaymentOnce as r, presentText as s, createReceiptOnce as t, INVOICE_TEMPLATES as u, SZAMLAZZ_AGENT_URL as v };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_errors = require("../errors-EE96_6D_.cjs");
|
|
3
|
-
const require_client = require("../client-
|
|
3
|
+
const require_client = require("../client-Cvb9yfxU.cjs");
|
|
4
4
|
const require_serialize = require("../serialize-CquIsxA-.cjs");
|
|
5
5
|
const require_parse = require("../parse-DOA2XQ3e.cjs");
|
|
6
6
|
const require_dates = require("../dates-CPgBodkP.cjs");
|
package/dist/delegation/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as suggestedPrefix, o as isSzamlazzError, r as SzamlazzError } from "../errors-DtN4g5Z9.js";
|
|
2
|
-
import { a as queryTaxpayer, c as createAgentContext, o as getInvoicePdf, t as createKassza } from "../client-
|
|
2
|
+
import { a as queryTaxpayer, c as createAgentContext, o as getInvoicePdf, t as createKassza } from "../client-CdWEA0et.js";
|
|
3
3
|
import { a as optionalEl, n as buildXmlDocument, r as el } from "../serialize-B2eFh3D-.js";
|
|
4
4
|
import { h as unexpectedResponse, i as decodeHeaderValue, l as readHeader, u as throwIfAnyError } from "../parse-Cr7yQ3_z.js";
|
|
5
5
|
import { n as toAgentDate } from "../dates-CXyj7Azy.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_once = require("./create-once-
|
|
2
|
+
const require_create_once = require("./create-once-CHhDz0un.cjs");
|
|
3
3
|
const require_errors = require("./errors-EE96_6D_.cjs");
|
|
4
|
-
const require_client = require("./client-
|
|
4
|
+
const require_client = require("./client-Cvb9yfxU.cjs");
|
|
5
5
|
const require_binary = require("./binary-B89HM03_.cjs");
|
|
6
6
|
const require_session = require("./session-DeM5vjvC.cjs");
|
|
7
7
|
const require_issue = require("./issue-Bin4tKD_.cjs");
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as MAX_INVOICE_ATTACHMENTS, g as AGENT_ACTIONS, h as isDocumentHookError, n as paymentMarker, p as DocumentHookError, v as SZAMLAZZ_AGENT_URL } from "./create-once-CW0x_yvp.js";
|
|
2
2
|
import { a as errorCodeDocsUrl, c as suggestedPrefix, n as KASSZA_ERROR_DOCS_URL, o as isSzamlazzError, r as SzamlazzError, t as AGENT_ERROR_CODES } from "./errors-DtN4g5Z9.js";
|
|
3
|
-
import { d as attemptLedgerKey, i as TAXPAYER_CACHE_KEY_PREFIX, l as ATTEMPT_LEDGER_KEY_PREFIX, n as DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, r as DEFAULT_TAXPAYER_TTL_SECONDS, t as createKassza, u as ATTEMPT_LEDGER_TTL_SECONDS } from "./client-
|
|
3
|
+
import { d as attemptLedgerKey, i as TAXPAYER_CACHE_KEY_PREFIX, l as ATTEMPT_LEDGER_KEY_PREFIX, n as DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, r as DEFAULT_TAXPAYER_TTL_SECONDS, t as createKassza, u as ATTEMPT_LEDGER_TTL_SECONDS } from "./client-CdWEA0et.js";
|
|
4
4
|
import { n as bytesToBase64 } from "./binary-D0M9U2MD.js";
|
|
5
5
|
import { a as memoryStore, n as memoryCookieStore, o as storeCapabilities } from "./session-SaEEXu2N.js";
|
|
6
6
|
import { a as conversionExternalId, c as chooseDocument, d as DEFAULT_LOCK_TTL_SECONDS, f as DEFAULT_LOCK_WAIT_MS, i as correctionExternalId, n as issueForPayment, p as ONCE_LOCK_KEY_PREFIX, r as paymentOrderNumber, s as RECEIPT_MAX_GROSS_HUF, t as buyerFromCustomer, u as invoiceOnceExternalId } from "./issue-DMA1Nbr1.js";
|
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-B9guio75.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.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createConfirmations, c as MCP_MODERN_VERSIONS, i as canonicalJson, l as MCP_SUPPORTED_VERSIONS, o as ToolInputError, r as DEFAULT_CONFIRMATION_TTL_MS, s as MCP_LEGACY_VERSIONS, t as createKasszaMcpServer } from "../server-
|
|
1
|
+
import { a as createConfirmations, c as MCP_MODERN_VERSIONS, i as canonicalJson, l as MCP_SUPPORTED_VERSIONS, o as ToolInputError, r as DEFAULT_CONFIRMATION_TTL_MS, s as MCP_LEGACY_VERSIONS, t as createKasszaMcpServer } from "../server-yx9eG_8p.js";
|
|
2
2
|
export { DEFAULT_CONFIRMATION_TTL_MS, MCP_LEGACY_VERSIONS, MCP_MODERN_VERSIONS, MCP_SUPPORTED_VERSIONS, ToolInputError, canonicalJson, createConfirmations, createKasszaMcpServer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_create_once = require("./create-once-
|
|
1
|
+
const require_create_once = require("./create-once-CHhDz0un.cjs");
|
|
2
2
|
const require_errors = require("./errors-EE96_6D_.cjs");
|
|
3
|
-
const require_client = require("./client-
|
|
3
|
+
const require_client = require("./client-Cvb9yfxU.cjs");
|
|
4
4
|
const require_once = require("./once-BN_3B5OF.cjs");
|
|
5
5
|
const require_dates = require("./dates-CPgBodkP.cjs");
|
|
6
6
|
const require_vat = require("./vat-g35srbNG.cjs");
|
|
@@ -235,7 +235,7 @@ function createConfirmations(options) {
|
|
|
235
235
|
}
|
|
236
236
|
//#endregion
|
|
237
237
|
//#region src/core/version.ts
|
|
238
|
-
const KASSZA_VERSION = "0.
|
|
238
|
+
const KASSZA_VERSION = "0.17.0";
|
|
239
239
|
//#endregion
|
|
240
240
|
//#region src/mcp/tool-kit.ts
|
|
241
241
|
const LOCAL_READ = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as resolveInvoice, l as INVOICE_LANGUAGES } from "./create-once-
|
|
1
|
+
import { c as resolveInvoice, l as INVOICE_LANGUAGES } from "./create-once-CW0x_yvp.js";
|
|
2
2
|
import { o as isSzamlazzError, r as SzamlazzError } from "./errors-DtN4g5Z9.js";
|
|
3
|
-
import { t as createKassza } from "./client-
|
|
3
|
+
import { t as createKassza } from "./client-CdWEA0et.js";
|
|
4
4
|
import { i as resolveRecoveryDelay, n as isUncertainOutcome, r as recoverAfterFailure } from "./once-CqqZxsXG.js";
|
|
5
5
|
import { r as toBudapestDate } from "./dates-CXyj7Azy.js";
|
|
6
6
|
import { a as isVatRate } from "./vat-v_dcWCto.js";
|
|
@@ -235,7 +235,7 @@ function createConfirmations(options) {
|
|
|
235
235
|
}
|
|
236
236
|
//#endregion
|
|
237
237
|
//#region src/core/version.ts
|
|
238
|
-
const KASSZA_VERSION = "0.
|
|
238
|
+
const KASSZA_VERSION = "0.17.0";
|
|
239
239
|
//#endregion
|
|
240
240
|
//#region src/mcp/tool-kit.ts
|
|
241
241
|
const LOCAL_READ = {
|
package/dist/testing/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_once = require("../create-once-
|
|
2
|
+
const require_create_once = require("../create-once-CHhDz0un.cjs");
|
|
3
3
|
const require_errors = require("../errors-EE96_6D_.cjs");
|
|
4
4
|
const require_binary = require("../binary-B89HM03_.cjs");
|
|
5
5
|
const require_serialize = require("../serialize-CquIsxA-.cjs");
|
package/dist/testing/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as resolveInvoice,
|
|
1
|
+
import { c as resolveInvoice, g as AGENT_ACTIONS, m as emitDocumentEvent, r as registerPaymentOnce, t as createReceiptOnce } from "../create-once-CW0x_yvp.js";
|
|
2
2
|
import { r as SzamlazzError, t as AGENT_ERROR_CODES } from "../errors-DtN4g5Z9.js";
|
|
3
3
|
import { i as encodeUtf8, n as bytesToBase64 } from "../binary-D0M9U2MD.js";
|
|
4
4
|
import { a as optionalEl, c as childNumber, d as findChildren, f as parseXml, i as formatXmlNumber, l as childText, n as buildXmlDocument, r as el, s as childBoolean, u as findChild } from "../serialize-B2eFh3D-.js";
|