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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/errors.ts
|
|
2
2
|
const SIMPLE_ITEMS_HINT = "Az egyszerűsített számlakép (simpleItems) szabályait lásd a docs utazásszervezőknek szóló oldalán.";
|
|
3
3
|
const ITEM_AMOUNT_HINT = "Használd a tételeknél a netUnitPrice vagy grossUnitPrice mezőt, és hagyd, hogy a csomag számolja ki az összegeket.";
|
|
4
4
|
const RECEIPT_AMOUNT_HINT = "Forintos nyugtán a bruttó egész szám, a nettó és az áfa legfeljebb 2 tizedes, és a nettó + áfa pontosan a bruttó.";
|
|
@@ -278,6 +278,16 @@ const AGENT_ERROR_CODES = {
|
|
|
278
278
|
category: "validation",
|
|
279
279
|
hint: "A dedikált felhasználó jelszava legfeljebb 128 karakter lehet."
|
|
280
280
|
},
|
|
281
|
+
520: {
|
|
282
|
+
message: "Nincs elegendő törlőkódod, kérlek tölts fel újat.",
|
|
283
|
+
category: "account",
|
|
284
|
+
hint: "Tölts fel új adattörlő kódokat a Számlázz.hu fiókodba. A bizonylat nem jött létre."
|
|
285
|
+
},
|
|
286
|
+
521: {
|
|
287
|
+
message: "Jelenleg csak a Számlázz.hu ajánlott számlaképpel használható a törlőkód.",
|
|
288
|
+
category: "validation",
|
|
289
|
+
hint: "Adattörlő kódot csak az alapértelmezett sablonnal kérj: számlánál az ajánlott számlaképpel (SzlaMost), nyugtánál a normál A4-es sablonnal."
|
|
290
|
+
},
|
|
281
291
|
524: {
|
|
282
292
|
message: "A nyugtaszám-előtag nincs engedélyezve.",
|
|
283
293
|
category: "account",
|
|
@@ -383,7 +393,7 @@ function createAgentError(input) {
|
|
|
383
393
|
rawResponse: input.rawResponse
|
|
384
394
|
});
|
|
385
395
|
}
|
|
386
|
-
const SUGGESTED_PREFIX_PATTERN = /haszn[áa]ld ezt:\s
|
|
396
|
+
const SUGGESTED_PREFIX_PATTERN = /haszn[áa]ld ezt:\s*(?:\(\s*)?([A-Z0-9]+)\s*\)?/i;
|
|
387
397
|
function suggestedPrefix(error) {
|
|
388
398
|
if (!(error instanceof SzamlazzError) || error.code !== 356) return void 0;
|
|
389
399
|
return SUGGESTED_PREFIX_PATTERN.exec(error.message)?.[1]?.toUpperCase();
|
|
@@ -394,5 +404,4 @@ function parseErrorCode(value) {
|
|
|
394
404
|
if (!/^-?\d+$/.test(trimmed)) return void 0;
|
|
395
405
|
return Number(trimmed);
|
|
396
406
|
}
|
|
397
|
-
//#endregion
|
|
398
407
|
export { errorCodeDocsUrl as a, suggestedPrefix as c, createAgentError as i, KASSZA_ERROR_DOCS_URL as n, isSzamlazzError as o, SzamlazzError as r, parseErrorCode as s, AGENT_ERROR_CODES as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/invoices/get.d.ts
|
|
2
1
|
interface GetInvoiceOptions {
|
|
3
2
|
readonly includePdf?: boolean | undefined;
|
|
4
3
|
}
|
|
@@ -147,5 +146,4 @@ interface InvoiceDetails {
|
|
|
147
146
|
readonly payments: readonly InvoiceDetailsPayment[];
|
|
148
147
|
readonly pdf?: Uint8Array | undefined;
|
|
149
148
|
}
|
|
150
|
-
//#endregion
|
|
151
149
|
export { InvoiceDetailsItem as a, InvoiceDetailsTotals as c, InvoiceDetailsHeader as i, InvoiceDocumentType as l, InvoiceDetails as n, InvoiceDetailsPayment as o, InvoiceDetailsBuyer as r, InvoiceDetailsSeller as s, GetInvoiceOptions as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/invoices/get.d.ts
|
|
2
1
|
interface GetInvoiceOptions {
|
|
3
2
|
readonly includePdf?: boolean | undefined;
|
|
4
3
|
}
|
|
@@ -147,5 +146,4 @@ interface InvoiceDetails {
|
|
|
147
146
|
readonly payments: readonly InvoiceDetailsPayment[];
|
|
148
147
|
readonly pdf?: Uint8Array | undefined;
|
|
149
148
|
}
|
|
150
|
-
//#endregion
|
|
151
149
|
export { InvoiceDetailsItem as a, InvoiceDetailsTotals as c, InvoiceDetailsHeader as i, InvoiceDocumentType as l, InvoiceDetails as n, InvoiceDetailsPayment as o, InvoiceDetailsBuyer as r, InvoiceDetailsSeller as s, GetInvoiceOptions as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_serialize = require("./serialize-
|
|
2
|
-
const require_parse = require("./parse-
|
|
3
|
-
const require_reference = require("./reference-
|
|
4
|
-
|
|
1
|
+
const require_serialize = require("./serialize-DEU7r6Bk.cjs");
|
|
2
|
+
const require_parse = require("./parse-CmM5va-p.cjs");
|
|
3
|
+
const require_reference = require("./reference-DoY12fc1.cjs");
|
|
4
|
+
// src/invoices/get.ts
|
|
5
5
|
const INVOICE_DOCUMENT_TYPE_CODES = {
|
|
6
6
|
invoice: "SZ",
|
|
7
7
|
proforma: "D",
|
|
@@ -256,7 +256,6 @@ async function getInvoice(ctx, reference, query = {}, options = {}) {
|
|
|
256
256
|
safeToRetry: true
|
|
257
257
|
}, parseGetInvoiceResponse);
|
|
258
258
|
}
|
|
259
|
-
//#endregion
|
|
260
259
|
Object.defineProperty(exports, "getInvoice", {
|
|
261
260
|
enumerable: true,
|
|
262
261
|
get: function() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as optionalEl, c as childNumber, d as findChildren, l as childText, n as buildXmlDocument, s as childBoolean, u as findChild } from "./serialize-
|
|
2
|
-
import { d as throwIfHeaderError, f as throwIfHttpError, h as unexpectedResponse, m as throwIfXmlFailure, p as throwIfTextError, s as parseResponseXml } from "./parse-
|
|
3
|
-
import { l as resolveInvoiceReference, r as decodeResponsePdf, s as referenceValue, t as AGENT_XSD_BASE_URL } from "./reference-
|
|
4
|
-
|
|
1
|
+
import { a as optionalEl, c as childNumber, d as findChildren, l as childText, n as buildXmlDocument, s as childBoolean, u as findChild } from "./serialize-CjymGkJj.js";
|
|
2
|
+
import { d as throwIfHeaderError, f as throwIfHttpError, h as unexpectedResponse, m as throwIfXmlFailure, p as throwIfTextError, s as parseResponseXml } from "./parse-1RiSh4vY.js";
|
|
3
|
+
import { l as resolveInvoiceReference, r as decodeResponsePdf, s as referenceValue, t as AGENT_XSD_BASE_URL } from "./reference-Cxz0m2zF.js";
|
|
4
|
+
// src/invoices/get.ts
|
|
5
5
|
const INVOICE_DOCUMENT_TYPE_CODES = {
|
|
6
6
|
invoice: "SZ",
|
|
7
7
|
proforma: "D",
|
|
@@ -256,5 +256,4 @@ async function getInvoice(ctx, reference, query = {}, options = {}) {
|
|
|
256
256
|
safeToRetry: true
|
|
257
257
|
}, parseGetInvoiceResponse);
|
|
258
258
|
}
|
|
259
|
-
//#endregion
|
|
260
259
|
export { parseInvoiceDetailsXml as n, getInvoice as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/money/vat.d.ts
|
|
2
1
|
declare const NUMERIC_VAT_RATES: readonly [0, 1, 2, 2.1, 3, 4, 4.8, 5, 5.5, 6, 7, 7.7, 8, 8.1, 9, 9.5, 10, 11, 12, 13, 13.5, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25.5, 26, 27];
|
|
3
2
|
declare const SPECIAL_VAT_CODES: readonly ["TAHK", "TAM", "AAM", "EUT", "EUKT", "F.AFA", "K.AFA", "HO", "EUE", "EUFADE", "EUFAD37", "ATK", "NAM", "EAM", "KBAUK", "KBAET"];
|
|
4
3
|
type NumericVatRate = (typeof NUMERIC_VAT_RATES)[number];
|
|
@@ -8,8 +7,6 @@ declare function isVatRate(value: unknown): value is VatRate;
|
|
|
8
7
|
declare function vatPercentage(rate: VatRate): number;
|
|
9
8
|
declare function formatVatRate(rate: VatRate): string;
|
|
10
9
|
declare function isHuf(currency: string | undefined): boolean;
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/money/items.d.ts
|
|
13
10
|
interface ItemPriceInput {
|
|
14
11
|
readonly quantity?: number;
|
|
15
12
|
readonly vat: VatRate;
|
|
@@ -47,8 +44,6 @@ interface DocumentTotals {
|
|
|
47
44
|
readonly byVat: readonly VatBreakdown[];
|
|
48
45
|
}
|
|
49
46
|
declare function summarizeItems(items: readonly ItemAmounts[]): DocumentTotals;
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/money/refund.d.ts
|
|
52
47
|
type RefundVat = string | number;
|
|
53
48
|
interface RefundableItem<V extends RefundVat = VatRate> {
|
|
54
49
|
readonly name: string;
|
|
@@ -70,10 +65,7 @@ interface AllocateRefundOptions {
|
|
|
70
65
|
readonly refundedBefore?: number | undefined;
|
|
71
66
|
}
|
|
72
67
|
declare function allocateRefund<V extends RefundVat = VatRate>(items: readonly RefundableItem<V>[], refundGross: number, options?: AllocateRefundOptions): RefundAllocation<V>[];
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/money/rounding.d.ts
|
|
75
68
|
declare function roundMoney(value: number, decimals?: number): number;
|
|
76
69
|
declare function decimalPlaces(value: number): number;
|
|
77
70
|
declare function addMoney(...values: number[]): number;
|
|
78
|
-
//#endregion
|
|
79
71
|
export { formatVatRate as C, vatPercentage as E, VatRate as S, isVatRate as T, summarizeItems as _, RefundAllocation as a, SPECIAL_VAT_CODES as b, allocateRefund as c, ItemAmounts as d, ItemPriceInput as f, calculateReceiptItem as g, calculateItemAmounts as h, AllocateRefundOptions as i, DocumentKind as l, calculateInvoiceItem as m, decimalPlaces as n, RefundVat as o, VatBreakdown as p, roundMoney as r, RefundableItem as s, addMoney as t, DocumentTotals as u, NUMERIC_VAT_RATES as v, isHuf as w, SpecialVatCode as x, NumericVatRate as y };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/money/vat.d.ts
|
|
2
1
|
declare const NUMERIC_VAT_RATES: readonly [0, 1, 2, 2.1, 3, 4, 4.8, 5, 5.5, 6, 7, 7.7, 8, 8.1, 9, 9.5, 10, 11, 12, 13, 13.5, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25.5, 26, 27];
|
|
3
2
|
declare const SPECIAL_VAT_CODES: readonly ["TAHK", "TAM", "AAM", "EUT", "EUKT", "F.AFA", "K.AFA", "HO", "EUE", "EUFADE", "EUFAD37", "ATK", "NAM", "EAM", "KBAUK", "KBAET"];
|
|
4
3
|
type NumericVatRate = (typeof NUMERIC_VAT_RATES)[number];
|
|
@@ -8,8 +7,6 @@ declare function isVatRate(value: unknown): value is VatRate;
|
|
|
8
7
|
declare function vatPercentage(rate: VatRate): number;
|
|
9
8
|
declare function formatVatRate(rate: VatRate): string;
|
|
10
9
|
declare function isHuf(currency: string | undefined): boolean;
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/money/items.d.ts
|
|
13
10
|
interface ItemPriceInput {
|
|
14
11
|
readonly quantity?: number;
|
|
15
12
|
readonly vat: VatRate;
|
|
@@ -47,8 +44,6 @@ interface DocumentTotals {
|
|
|
47
44
|
readonly byVat: readonly VatBreakdown[];
|
|
48
45
|
}
|
|
49
46
|
declare function summarizeItems(items: readonly ItemAmounts[]): DocumentTotals;
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/money/refund.d.ts
|
|
52
47
|
type RefundVat = string | number;
|
|
53
48
|
interface RefundableItem<V extends RefundVat = VatRate> {
|
|
54
49
|
readonly name: string;
|
|
@@ -70,10 +65,7 @@ interface AllocateRefundOptions {
|
|
|
70
65
|
readonly refundedBefore?: number | undefined;
|
|
71
66
|
}
|
|
72
67
|
declare function allocateRefund<V extends RefundVat = VatRate>(items: readonly RefundableItem<V>[], refundGross: number, options?: AllocateRefundOptions): RefundAllocation<V>[];
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/money/rounding.d.ts
|
|
75
68
|
declare function roundMoney(value: number, decimals?: number): number;
|
|
76
69
|
declare function decimalPlaces(value: number): number;
|
|
77
70
|
declare function addMoney(...values: number[]): number;
|
|
78
|
-
//#endregion
|
|
79
71
|
export { formatVatRate as C, vatPercentage as E, VatRate as S, isVatRate as T, summarizeItems as _, RefundAllocation as a, SPECIAL_VAT_CODES as b, allocateRefund as c, ItemAmounts as d, ItemPriceInput as f, calculateReceiptItem as g, calculateItemAmounts as h, AllocateRefundOptions as i, DocumentKind as l, calculateInvoiceItem as m, decimalPlaces as n, RefundVat as o, VatBreakdown as p, roundMoney as r, RefundableItem as s, addMoney as t, DocumentTotals as u, NUMERIC_VAT_RATES as v, isHuf as w, SpecialVatCode as x, NumericVatRate as y };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as KeyValueStore, r as StoreCapabilities } from "./store-
|
|
2
|
-
import { t as CookieStore } from "./session-
|
|
3
|
-
//#region src/cookie-stores/resilient.d.ts
|
|
1
|
+
import { n as KeyValueStore, r as StoreCapabilities } from "./store-BkaZ8qkU.js";
|
|
2
|
+
import { t as CookieStore } from "./session-mKtpAeUB.js";
|
|
4
3
|
type CookieStoreOperation = "get" | "set" | "delete" | "setIfAbsent" | "increment" | "deleteIfEquals";
|
|
5
4
|
interface CookieStoreErrorEvent {
|
|
6
5
|
readonly operation: CookieStoreOperation;
|
|
@@ -12,14 +11,10 @@ interface ResilientCookieStoreOptions {
|
|
|
12
11
|
readonly timeoutMs?: number | undefined;
|
|
13
12
|
}
|
|
14
13
|
declare function resilientCookieStore(store: CookieStore, options?: ResilientCookieStoreOptions): CookieStore;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/cookie-stores/shared.d.ts
|
|
17
14
|
interface CookieStoreAdapterOptions extends ResilientCookieStoreOptions {
|
|
18
15
|
readonly prefix?: string | undefined;
|
|
19
16
|
readonly resilient?: boolean | undefined;
|
|
20
17
|
}
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/cookie-stores/cloudflare-kv.d.ts
|
|
23
18
|
declare const CLOUDFLARE_KV_MIN_TTL_SECONDS = 60;
|
|
24
19
|
interface CloudflareKvNamespaceLike {
|
|
25
20
|
get(key: string): Promise<string | null>;
|
|
@@ -29,11 +24,7 @@ interface CloudflareKvNamespaceLike {
|
|
|
29
24
|
delete(key: string): Promise<void>;
|
|
30
25
|
}
|
|
31
26
|
declare function cloudflareKvCookieStore(namespace: CloudflareKvNamespaceLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/cookie-stores/custom.d.ts
|
|
34
27
|
declare function customCookieStore(store: CookieStore, options?: CookieStoreAdapterOptions): CookieStore;
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/cookie-stores/ioredis.d.ts
|
|
37
28
|
interface IoRedisLike {
|
|
38
29
|
get(key: string): Promise<unknown>;
|
|
39
30
|
set(key: string, value: string, expiryMode: "EX", seconds: number): Promise<unknown>;
|
|
@@ -41,8 +32,6 @@ interface IoRedisLike {
|
|
|
41
32
|
eval?(script: string, numKeys: number, ...args: string[]): Promise<unknown>;
|
|
42
33
|
}
|
|
43
34
|
declare function ioredisCookieStore(redis: IoRedisLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/cookie-stores/node-redis.d.ts
|
|
46
35
|
interface NodeRedisLike {
|
|
47
36
|
get(key: string): Promise<unknown>;
|
|
48
37
|
set(key: string, value: string, options: {
|
|
@@ -55,8 +44,6 @@ interface NodeRedisLike {
|
|
|
55
44
|
}): Promise<unknown>;
|
|
56
45
|
}
|
|
57
46
|
declare function nodeRedisCookieStore(client: NodeRedisLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/cookie-stores/upstash.d.ts
|
|
60
47
|
interface UpstashRedisLike {
|
|
61
48
|
get(key: string): Promise<unknown>;
|
|
62
49
|
set(key: string, value: string, options: {
|
|
@@ -66,8 +53,6 @@ interface UpstashRedisLike {
|
|
|
66
53
|
eval?(script: string, keys: string[], args: string[]): Promise<unknown>;
|
|
67
54
|
}
|
|
68
55
|
declare function upstashRedisCookieStore(redis: UpstashRedisLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/stores/diagnose.d.ts
|
|
71
56
|
interface StoreSuitability {
|
|
72
57
|
readonly session: boolean;
|
|
73
58
|
readonly attemptLedger: boolean;
|
|
@@ -87,8 +72,6 @@ interface DiagnoseStoreOptions {
|
|
|
87
72
|
readonly now?: (() => number) | undefined;
|
|
88
73
|
}
|
|
89
74
|
declare function diagnoseStore(store: KeyValueStore, options?: DiagnoseStoreOptions): Promise<StoreDiagnosis>;
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region src/stores/durable-object.d.ts
|
|
92
75
|
interface DurableObjectStorageLike {
|
|
93
76
|
get(key: string): Promise<unknown>;
|
|
94
77
|
put(key: string, value: DurableObjectStoreEntry): Promise<void>;
|
|
@@ -105,5 +88,4 @@ type DurableObjectStoreOperation = "get" | "set" | "delete" | "setIfAbsent" | "i
|
|
|
105
88
|
declare const DURABLE_OBJECT_STORE_URL = "https://kassza-store.internal/";
|
|
106
89
|
declare function handleDurableObjectStoreRequest(storage: DurableObjectStorageLike, request: Request): Promise<Response>;
|
|
107
90
|
declare function durableObjectStore(stub: DurableObjectStubLike): KeyValueStore;
|
|
108
|
-
//#endregion
|
|
109
91
|
export { CookieStoreErrorEvent as C, resilientCookieStore as E, CookieStoreAdapterOptions as S, ResilientCookieStoreOptions as T, ioredisCookieStore as _, DurableObjectStubLike as a, CloudflareKvNamespaceLike as b, DiagnoseStoreOptions as c, diagnoseStore as d, UpstashRedisLike as f, IoRedisLike as g, nodeRedisCookieStore as h, DurableObjectStoreOperation as i, StoreDiagnosis as l, NodeRedisLike as m, DurableObjectStorageLike as n, durableObjectStore as o, upstashRedisCookieStore as p, DurableObjectStoreEntry as r, handleDurableObjectStoreRequest as s, DURABLE_OBJECT_STORE_URL as t, StoreSuitability as u, customCookieStore as v, CookieStoreOperation as w, cloudflareKvCookieStore as x, CLOUDFLARE_KV_MIN_TTL_SECONDS as y };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as KeyValueStore, r as StoreCapabilities } from "./store-
|
|
2
|
-
import { t as CookieStore } from "./session-
|
|
3
|
-
//#region src/cookie-stores/resilient.d.ts
|
|
1
|
+
import { n as KeyValueStore, r as StoreCapabilities } from "./store-BkaZ8qkU.cjs";
|
|
2
|
+
import { t as CookieStore } from "./session-BBbSXlx3.cjs";
|
|
4
3
|
type CookieStoreOperation = "get" | "set" | "delete" | "setIfAbsent" | "increment" | "deleteIfEquals";
|
|
5
4
|
interface CookieStoreErrorEvent {
|
|
6
5
|
readonly operation: CookieStoreOperation;
|
|
@@ -12,14 +11,10 @@ interface ResilientCookieStoreOptions {
|
|
|
12
11
|
readonly timeoutMs?: number | undefined;
|
|
13
12
|
}
|
|
14
13
|
declare function resilientCookieStore(store: CookieStore, options?: ResilientCookieStoreOptions): CookieStore;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/cookie-stores/shared.d.ts
|
|
17
14
|
interface CookieStoreAdapterOptions extends ResilientCookieStoreOptions {
|
|
18
15
|
readonly prefix?: string | undefined;
|
|
19
16
|
readonly resilient?: boolean | undefined;
|
|
20
17
|
}
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/cookie-stores/cloudflare-kv.d.ts
|
|
23
18
|
declare const CLOUDFLARE_KV_MIN_TTL_SECONDS = 60;
|
|
24
19
|
interface CloudflareKvNamespaceLike {
|
|
25
20
|
get(key: string): Promise<string | null>;
|
|
@@ -29,11 +24,7 @@ interface CloudflareKvNamespaceLike {
|
|
|
29
24
|
delete(key: string): Promise<void>;
|
|
30
25
|
}
|
|
31
26
|
declare function cloudflareKvCookieStore(namespace: CloudflareKvNamespaceLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/cookie-stores/custom.d.ts
|
|
34
27
|
declare function customCookieStore(store: CookieStore, options?: CookieStoreAdapterOptions): CookieStore;
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/cookie-stores/ioredis.d.ts
|
|
37
28
|
interface IoRedisLike {
|
|
38
29
|
get(key: string): Promise<unknown>;
|
|
39
30
|
set(key: string, value: string, expiryMode: "EX", seconds: number): Promise<unknown>;
|
|
@@ -41,8 +32,6 @@ interface IoRedisLike {
|
|
|
41
32
|
eval?(script: string, numKeys: number, ...args: string[]): Promise<unknown>;
|
|
42
33
|
}
|
|
43
34
|
declare function ioredisCookieStore(redis: IoRedisLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/cookie-stores/node-redis.d.ts
|
|
46
35
|
interface NodeRedisLike {
|
|
47
36
|
get(key: string): Promise<unknown>;
|
|
48
37
|
set(key: string, value: string, options: {
|
|
@@ -55,8 +44,6 @@ interface NodeRedisLike {
|
|
|
55
44
|
}): Promise<unknown>;
|
|
56
45
|
}
|
|
57
46
|
declare function nodeRedisCookieStore(client: NodeRedisLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/cookie-stores/upstash.d.ts
|
|
60
47
|
interface UpstashRedisLike {
|
|
61
48
|
get(key: string): Promise<unknown>;
|
|
62
49
|
set(key: string, value: string, options: {
|
|
@@ -66,8 +53,6 @@ interface UpstashRedisLike {
|
|
|
66
53
|
eval?(script: string, keys: string[], args: string[]): Promise<unknown>;
|
|
67
54
|
}
|
|
68
55
|
declare function upstashRedisCookieStore(redis: UpstashRedisLike, options?: CookieStoreAdapterOptions): CookieStore;
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/stores/diagnose.d.ts
|
|
71
56
|
interface StoreSuitability {
|
|
72
57
|
readonly session: boolean;
|
|
73
58
|
readonly attemptLedger: boolean;
|
|
@@ -87,8 +72,6 @@ interface DiagnoseStoreOptions {
|
|
|
87
72
|
readonly now?: (() => number) | undefined;
|
|
88
73
|
}
|
|
89
74
|
declare function diagnoseStore(store: KeyValueStore, options?: DiagnoseStoreOptions): Promise<StoreDiagnosis>;
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region src/stores/durable-object.d.ts
|
|
92
75
|
interface DurableObjectStorageLike {
|
|
93
76
|
get(key: string): Promise<unknown>;
|
|
94
77
|
put(key: string, value: DurableObjectStoreEntry): Promise<void>;
|
|
@@ -105,5 +88,4 @@ type DurableObjectStoreOperation = "get" | "set" | "delete" | "setIfAbsent" | "i
|
|
|
105
88
|
declare const DURABLE_OBJECT_STORE_URL = "https://kassza-store.internal/";
|
|
106
89
|
declare function handleDurableObjectStoreRequest(storage: DurableObjectStorageLike, request: Request): Promise<Response>;
|
|
107
90
|
declare function durableObjectStore(stub: DurableObjectStubLike): KeyValueStore;
|
|
108
|
-
//#endregion
|
|
109
91
|
export { CookieStoreErrorEvent as C, resilientCookieStore as E, CookieStoreAdapterOptions as S, ResilientCookieStoreOptions as T, ioredisCookieStore as _, DurableObjectStubLike as a, CloudflareKvNamespaceLike as b, DiagnoseStoreOptions as c, diagnoseStore as d, UpstashRedisLike as f, IoRedisLike as g, nodeRedisCookieStore as h, DurableObjectStoreOperation as i, StoreDiagnosis as l, NodeRedisLike as m, DurableObjectStorageLike as n, durableObjectStore as o, upstashRedisCookieStore as p, DurableObjectStoreEntry as r, handleDurableObjectStoreRequest as s, DURABLE_OBJECT_STORE_URL as t, StoreSuitability as u, customCookieStore as v, CookieStoreOperation as w, cloudflareKvCookieStore as x, CLOUDFLARE_KV_MIN_TTL_SECONDS as y };
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_once = require("./create-once-
|
|
3
|
-
const require_errors = require("./errors-
|
|
4
|
-
const require_client = require("./client-
|
|
5
|
-
const require_binary = require("./binary-
|
|
6
|
-
const require_session = require("./session-
|
|
7
|
-
const require_issue = require("./issue-
|
|
8
|
-
const require_dates = require("./dates-
|
|
2
|
+
const require_create_once = require("./create-once-zeF7GVVP.cjs");
|
|
3
|
+
const require_errors = require("./errors-Bn6pe6yw.cjs");
|
|
4
|
+
const require_client = require("./client-I_29IPMh.cjs");
|
|
5
|
+
const require_binary = require("./binary-CdpKlNNI.cjs");
|
|
6
|
+
const require_session = require("./session-BYotpR_s.cjs");
|
|
7
|
+
const require_issue = require("./issue-DReARZnF.cjs");
|
|
8
|
+
const require_dates = require("./dates-oOp3ypPP.cjs");
|
|
9
9
|
exports.AGENT_ACTIONS = require_create_once.AGENT_ACTIONS;
|
|
10
10
|
exports.AGENT_ERROR_CODES = require_errors.AGENT_ERROR_CODES;
|
|
11
11
|
exports.ATTEMPT_LEDGER_KEY_PREFIX = require_client.ATTEMPT_LEDGER_KEY_PREFIX;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { a as todayInBudapest, i as toBudapestTimestamp, n as addBudapestDays, r as toBudapestDate, t as DateInput } from "./dates-
|
|
2
|
-
import { a as AgentAction, i as AGENT_ACTIONS, n as KasszaWarningKind, o as MAX_INVOICE_ATTACHMENTS, r as WarningHook, s as SZAMLAZZ_AGENT_URL, t as KasszaWarning } from "./warnings-
|
|
3
|
-
import { $ as Waybill, A as CorrectiveInvoiceInput, B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, F as Currency, G as InvoiceType, H as InvoicePreview, I as FinalInvoiceInput, J as PickPackPointWaybill, K as ItemLedger, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, P as CreatedInvoiceItem, Q as TransOFlexWaybill, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, V as InvoicePostalAddress, W as InvoiceTemplate, X as StandardInvoiceInput, Y as SprinterWaybill, Z as TaxpayerType, _ as InvoiceReversedEvent, a as AgentRequestEvent, at as AgentErrorCodeInfo, b as isDocumentHookError, c as SzamlazzHooks, ct as SzamlazzErrorCategory, d as DocumentErrorMode, dt as suggestedPrefix, et as ATTEMPT_LEDGER_KEY_PREFIX, f as DocumentEvent, g as InvoicePaymentEvent, h as InvoiceCreatedEvent, i as AgentErrorEvent, it as AGENT_ERROR_CODES, j as CourierService, k as BuyerLedger, l as SzamlazzOptions, lt as errorCodeDocsUrl, m as DocumentHookError, n as AgentCompleteEvent, nt as AttemptLedgerMode, o as AgentResponseEvent, ot as KASSZA_ERROR_DOCS_URL, p as DocumentHook, q as MplWaybill, rt as attemptLedgerKey, s as RequestOptions, st as SzamlazzError, t as AgentAttachment, tt as ATTEMPT_LEDGER_TTL_SECONDS, u as DocumentErrorHandler, ut as isSzamlazzError, v as ReceiptCreatedEvent, w as PaymentEntry, x as ReverseInvoiceInput, y as ReceiptReversedEvent, z as InvoiceItemInput } from "./context-
|
|
4
|
-
import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "./store-
|
|
5
|
-
import { S as VatRate, d as ItemAmounts, f as ItemPriceInput } from "./index-
|
|
6
|
-
import { a as ReceiptItem, c as ReceiptPayment, d as ReceiptTotals, f as ReceiptType, h as SendReceiptInput, i as ReceiptDefaults, l as ReceiptPaymentInput, m as ReverseReceiptInput, n as GetReceiptInput, o as ReceiptItemInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput, u as ReceiptPdfTemplate } from "./types-
|
|
7
|
-
import { r as memoryCookieStore, t as CookieStore } from "./session-
|
|
8
|
-
import { $ as ONCE_LOCK_KEY_PREFIX, A as IssuedRefundCorrection, B as DocumentDecision, C as PaymentDocumentItem, D as issueForPayment, E as buyerFromCustomer, F as RefundProposalLine, G as RegisterPaymentOnceInput, H as chooseDocument, I as correctionExternalId, J as InvoiceReference, K as RegisteredPaymentOnce, L as ChooseDocumentBuyer, M as PartialRefundMode, N as RefundItemsContext, O as paymentOrderNumber, P as RefundItemsResolver, Q as LockFailureMode, R as ChooseDocumentInput, S as IssuedReversal, T as SkippedPayment, U as ProformaReference, V as RECEIPT_MAX_GROSS_HUF, W as InvoicePdf, X as DEFAULT_LOCK_TTL_SECONDS, Y as CreateOnceOptions, Z as DEFAULT_LOCK_WAIT_MS, _ as conversionExternalId, a as ReceiptsApi, b as IssuedInvoice, c as DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, d as TaxpayerCacheOptions, et as OnceLockOptions, f as TaxpayerInfo, g as ConvertedReceipt, h as ConvertReceiptInput, i as KasszaOptions, j as IssuedRefundProposal, k as IssuedCorrection, l as DEFAULT_TAXPAYER_TTL_SECONDS, m as TaxpayerAddress, n as Kassza, o as TaxpayerApi, p as TaxpayerTaxNumber, q as paymentMarker, r as KasszaDefaults, s as createKassza, t as InvoicesApi, u as TAXPAYER_CACHE_KEY_PREFIX, v as IssueForPaymentOptions, w as PaymentDocumentsApi, x as IssuedReceipt, y as IssuedDocument, z as DocumentChoice } from "./client-
|
|
9
|
-
import { a as InvoiceDetailsItem, c as InvoiceDetailsTotals, i as InvoiceDetailsHeader, l as InvoiceDocumentType, n as InvoiceDetails, o as InvoiceDetailsPayment, r as InvoiceDetailsBuyer, s as InvoiceDetailsSeller, t as GetInvoiceOptions } from "./get-
|
|
10
|
-
import { n as InvoiceOnceResult, r as invoiceOnceExternalId, t as ReceiptOnceResult } from "./create-once-
|
|
11
|
-
import { a as PaymentEventKind, c as PaymentProvider, i as PaymentEvent, l as PaymentRefund, n as PaymentAmount, r as PaymentCustomer, s as PaymentLineItem, t as PaymentAddress } from "./types-
|
|
12
|
-
//#region src/core/binary.d.ts
|
|
1
|
+
import { a as todayInBudapest, i as toBudapestTimestamp, n as addBudapestDays, r as toBudapestDate, t as DateInput } from "./dates-nlGEokCf.cjs";
|
|
2
|
+
import { a as AgentAction, i as AGENT_ACTIONS, n as KasszaWarningKind, o as MAX_INVOICE_ATTACHMENTS, r as WarningHook, s as SZAMLAZZ_AGENT_URL, t as KasszaWarning } from "./warnings-DpuYhn39.cjs";
|
|
3
|
+
import { $ as Waybill, A as CorrectiveInvoiceInput, B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, F as Currency, G as InvoiceType, H as InvoicePreview, I as FinalInvoiceInput, J as PickPackPointWaybill, K as ItemLedger, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, P as CreatedInvoiceItem, Q as TransOFlexWaybill, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, V as InvoicePostalAddress, W as InvoiceTemplate, X as StandardInvoiceInput, Y as SprinterWaybill, Z as TaxpayerType, _ as InvoiceReversedEvent, a as AgentRequestEvent, at as AgentErrorCodeInfo, b as isDocumentHookError, c as SzamlazzHooks, ct as SzamlazzErrorCategory, d as DocumentErrorMode, dt as suggestedPrefix, et as ATTEMPT_LEDGER_KEY_PREFIX, f as DocumentEvent, g as InvoicePaymentEvent, h as InvoiceCreatedEvent, i as AgentErrorEvent, it as AGENT_ERROR_CODES, j as CourierService, k as BuyerLedger, l as SzamlazzOptions, lt as errorCodeDocsUrl, m as DocumentHookError, n as AgentCompleteEvent, nt as AttemptLedgerMode, o as AgentResponseEvent, ot as KASSZA_ERROR_DOCS_URL, p as DocumentHook, q as MplWaybill, rt as attemptLedgerKey, s as RequestOptions, st as SzamlazzError, t as AgentAttachment, tt as ATTEMPT_LEDGER_TTL_SECONDS, u as DocumentErrorHandler, ut as isSzamlazzError, v as ReceiptCreatedEvent, w as PaymentEntry, x as ReverseInvoiceInput, y as ReceiptReversedEvent, z as InvoiceItemInput } from "./context-zGthvNo2.cjs";
|
|
4
|
+
import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "./store-BkaZ8qkU.cjs";
|
|
5
|
+
import { S as VatRate, d as ItemAmounts, f as ItemPriceInput } from "./index-CinpAhQM.cjs";
|
|
6
|
+
import { a as ReceiptItem, c as ReceiptPayment, d as ReceiptTotals, f as ReceiptType, h as SendReceiptInput, i as ReceiptDefaults, l as ReceiptPaymentInput, m as ReverseReceiptInput, n as GetReceiptInput, o as ReceiptItemInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput, u as ReceiptPdfTemplate } from "./types-_HKTOCuQ.cjs";
|
|
7
|
+
import { r as memoryCookieStore, t as CookieStore } from "./session-BBbSXlx3.cjs";
|
|
8
|
+
import { $ as ONCE_LOCK_KEY_PREFIX, A as IssuedRefundCorrection, B as DocumentDecision, C as PaymentDocumentItem, D as issueForPayment, E as buyerFromCustomer, F as RefundProposalLine, G as RegisterPaymentOnceInput, H as chooseDocument, I as correctionExternalId, J as InvoiceReference, K as RegisteredPaymentOnce, L as ChooseDocumentBuyer, M as PartialRefundMode, N as RefundItemsContext, O as paymentOrderNumber, P as RefundItemsResolver, Q as LockFailureMode, R as ChooseDocumentInput, S as IssuedReversal, T as SkippedPayment, U as ProformaReference, V as RECEIPT_MAX_GROSS_HUF, W as InvoicePdf, X as DEFAULT_LOCK_TTL_SECONDS, Y as CreateOnceOptions, Z as DEFAULT_LOCK_WAIT_MS, _ as conversionExternalId, a as ReceiptsApi, b as IssuedInvoice, c as DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, d as TaxpayerCacheOptions, et as OnceLockOptions, f as TaxpayerInfo, g as ConvertedReceipt, h as ConvertReceiptInput, i as KasszaOptions, j as IssuedRefundProposal, k as IssuedCorrection, l as DEFAULT_TAXPAYER_TTL_SECONDS, m as TaxpayerAddress, n as Kassza, o as TaxpayerApi, p as TaxpayerTaxNumber, q as paymentMarker, r as KasszaDefaults, s as createKassza, t as InvoicesApi, u as TAXPAYER_CACHE_KEY_PREFIX, v as IssueForPaymentOptions, w as PaymentDocumentsApi, x as IssuedReceipt, y as IssuedDocument, z as DocumentChoice } from "./client-B00WZ3FK.cjs";
|
|
9
|
+
import { a as InvoiceDetailsItem, c as InvoiceDetailsTotals, i as InvoiceDetailsHeader, l as InvoiceDocumentType, n as InvoiceDetails, o as InvoiceDetailsPayment, r as InvoiceDetailsBuyer, s as InvoiceDetailsSeller, t as GetInvoiceOptions } from "./get-BL4Fr8-P.cjs";
|
|
10
|
+
import { n as InvoiceOnceResult, r as invoiceOnceExternalId, t as ReceiptOnceResult } from "./create-once-BA0KAHIB.cjs";
|
|
11
|
+
import { a as PaymentEventKind, c as PaymentProvider, i as PaymentEvent, l as PaymentRefund, n as PaymentAmount, r as PaymentCustomer, s as PaymentLineItem, t as PaymentAddress } from "./types-DeuUqIvU.cjs";
|
|
13
12
|
export declare function bytesToBase64(bytes: Uint8Array): string;
|
|
14
|
-
//#endregion
|
|
15
13
|
export { AGENT_ACTIONS, AGENT_ERROR_CODES, ATTEMPT_LEDGER_KEY_PREFIX, ATTEMPT_LEDGER_TTL_SECONDS, type AgentAction, type AgentAttachment, type AgentCompleteEvent, type AgentErrorCodeInfo, type AgentErrorEvent, type AgentRequestEvent, type AgentResponseEvent, type AttemptLedgerMode, type Awaitable, type BuyerLedger, type ChooseDocumentBuyer, type ChooseDocumentInput, type ClearPaymentsInput, type ConvertReceiptInput, type ConvertedReceipt, type CookieStore, type CorrectiveInvoiceInput, type CourierService, type CreateInvoiceInput, type CreateOnceOptions, type CreateReceiptInput, type CreatedInvoice, type CreatedInvoiceItem, type Currency, DEFAULT_LOCK_TTL_SECONDS, DEFAULT_LOCK_WAIT_MS, DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, DEFAULT_TAXPAYER_TTL_SECONDS, type DateInput, type DocumentChoice, type DocumentDecision, type DocumentErrorHandler, type DocumentErrorMode, type DocumentEvent, type DocumentHook, DocumentHookError, type FinalInvoiceInput, type GetInvoiceOptions, type GetReceiptInput, type InvoiceBuyer, type InvoiceCreatedEvent, type InvoiceDefaults, type InvoiceDetails, type InvoiceDetailsBuyer, type InvoiceDetailsHeader, type InvoiceDetailsItem, type InvoiceDetailsPayment, type InvoiceDetailsSeller, type InvoiceDetailsTotals, type InvoiceDocumentType, type InvoiceItemInput, type InvoiceLanguage, type InvoiceOnceResult, type InvoicePaymentEvent, type InvoicePdf, type InvoicePostalAddress, type InvoicePreview, type InvoiceReference, type InvoiceReversedEvent, type InvoiceSeller, type InvoiceTemplate, type InvoiceType, type InvoicesApi, type IssueForPaymentOptions, type IssuedCorrection, type IssuedDocument, type IssuedInvoice, type IssuedReceipt, type IssuedRefundCorrection, type IssuedRefundProposal, type IssuedReversal, type ItemAmounts, type ItemLedger, type ItemPriceInput, KASSZA_ERROR_DOCS_URL, type Kassza, type KasszaDefaults, type KasszaOptions, type KasszaWarning, type KasszaWarningKind, type KeyValueStore, type LockFailureMode, MAX_INVOICE_ATTACHMENTS, type MplWaybill, ONCE_LOCK_KEY_PREFIX, type OnceLockOptions, type PartialRefundMode, type PaymentAddress, type PaymentAmount, type PaymentCustomer, type PaymentDocumentItem, type PaymentDocumentsApi, type PaymentEntry, type PaymentEvent, type PaymentEventKind, type PaymentLineItem, type PaymentProvider, type PaymentRefund, type PickPackPointWaybill, type ProformaReference, RECEIPT_MAX_GROSS_HUF, type Receipt, type ReceiptCreatedEvent, type ReceiptDefaults, type ReceiptItem, type ReceiptItemInput, type ReceiptOnceResult, type ReceiptOnlyVatCode, type ReceiptPayment, type ReceiptPaymentInput, type ReceiptPdfTemplate, type ReceiptReversedEvent, type ReceiptTotals, type ReceiptType, type ReceiptVatRate, type ReceiptsApi, type RefundItemsContext, type RefundItemsResolver, type RefundProposalLine, type RegisterPaymentInput, type RegisterPaymentOnceInput, type RegisteredPayment, type RegisteredPaymentOnce, type RequestOptions, type ReverseInvoiceInput, type ReverseReceiptInput, type ReversedInvoice, SZAMLAZZ_AGENT_URL, type SendReceiptInput, type SkippedPayment, type SprinterWaybill, type StandardInvoiceInput, type StoreCapabilities, SzamlazzError, type SzamlazzErrorCategory, type SzamlazzHooks, type SzamlazzOptions, TAXPAYER_CACHE_KEY_PREFIX, type TaxpayerAddress, type TaxpayerApi, type TaxpayerCacheOptions, type TaxpayerInfo, type TaxpayerTaxNumber, type TaxpayerType, type TransOFlexWaybill, type VatRate, type WarningHook, type Waybill, addBudapestDays, attemptLedgerKey, buyerFromCustomer, chooseDocument, conversionExternalId, correctionExternalId, createKassza, errorCodeDocsUrl, invoiceOnceExternalId, isDocumentHookError, isSzamlazzError, issueForPayment, memoryCookieStore, memoryStore, paymentMarker, paymentOrderNumber, storeCapabilities, suggestedPrefix, toBudapestDate, toBudapestTimestamp, todayInBudapest };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { a as todayInBudapest, i as toBudapestTimestamp, n as addBudapestDays, r as toBudapestDate, t as DateInput } from "./dates-
|
|
2
|
-
import { a as AgentAction, i as AGENT_ACTIONS, n as KasszaWarningKind, o as MAX_INVOICE_ATTACHMENTS, r as WarningHook, s as SZAMLAZZ_AGENT_URL, t as KasszaWarning } from "./warnings-
|
|
3
|
-
import { $ as Waybill, A as CorrectiveInvoiceInput, B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, F as Currency, G as InvoiceType, H as InvoicePreview, I as FinalInvoiceInput, J as PickPackPointWaybill, K as ItemLedger, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, P as CreatedInvoiceItem, Q as TransOFlexWaybill, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, V as InvoicePostalAddress, W as InvoiceTemplate, X as StandardInvoiceInput, Y as SprinterWaybill, Z as TaxpayerType, _ as InvoiceReversedEvent, a as AgentRequestEvent, at as AgentErrorCodeInfo, b as isDocumentHookError, c as SzamlazzHooks, ct as SzamlazzErrorCategory, d as DocumentErrorMode, dt as suggestedPrefix, et as ATTEMPT_LEDGER_KEY_PREFIX, f as DocumentEvent, g as InvoicePaymentEvent, h as InvoiceCreatedEvent, i as AgentErrorEvent, it as AGENT_ERROR_CODES, j as CourierService, k as BuyerLedger, l as SzamlazzOptions, lt as errorCodeDocsUrl, m as DocumentHookError, n as AgentCompleteEvent, nt as AttemptLedgerMode, o as AgentResponseEvent, ot as KASSZA_ERROR_DOCS_URL, p as DocumentHook, q as MplWaybill, rt as attemptLedgerKey, s as RequestOptions, st as SzamlazzError, t as AgentAttachment, tt as ATTEMPT_LEDGER_TTL_SECONDS, u as DocumentErrorHandler, ut as isSzamlazzError, v as ReceiptCreatedEvent, w as PaymentEntry, x as ReverseInvoiceInput, y as ReceiptReversedEvent, z as InvoiceItemInput } from "./context-
|
|
4
|
-
import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "./store-
|
|
5
|
-
import { S as VatRate, d as ItemAmounts, f as ItemPriceInput } from "./index-
|
|
6
|
-
import { a as ReceiptItem, c as ReceiptPayment, d as ReceiptTotals, f as ReceiptType, h as SendReceiptInput, i as ReceiptDefaults, l as ReceiptPaymentInput, m as ReverseReceiptInput, n as GetReceiptInput, o as ReceiptItemInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput, u as ReceiptPdfTemplate } from "./types-
|
|
7
|
-
import { r as memoryCookieStore, t as CookieStore } from "./session-
|
|
8
|
-
import { $ as ONCE_LOCK_KEY_PREFIX, A as IssuedRefundCorrection, B as DocumentDecision, C as PaymentDocumentItem, D as issueForPayment, E as buyerFromCustomer, F as RefundProposalLine, G as RegisterPaymentOnceInput, H as chooseDocument, I as correctionExternalId, J as InvoiceReference, K as RegisteredPaymentOnce, L as ChooseDocumentBuyer, M as PartialRefundMode, N as RefundItemsContext, O as paymentOrderNumber, P as RefundItemsResolver, Q as LockFailureMode, R as ChooseDocumentInput, S as IssuedReversal, T as SkippedPayment, U as ProformaReference, V as RECEIPT_MAX_GROSS_HUF, W as InvoicePdf, X as DEFAULT_LOCK_TTL_SECONDS, Y as CreateOnceOptions, Z as DEFAULT_LOCK_WAIT_MS, _ as conversionExternalId, a as ReceiptsApi, b as IssuedInvoice, c as DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, d as TaxpayerCacheOptions, et as OnceLockOptions, f as TaxpayerInfo, g as ConvertedReceipt, h as ConvertReceiptInput, i as KasszaOptions, j as IssuedRefundProposal, k as IssuedCorrection, l as DEFAULT_TAXPAYER_TTL_SECONDS, m as TaxpayerAddress, n as Kassza, o as TaxpayerApi, p as TaxpayerTaxNumber, q as paymentMarker, r as KasszaDefaults, s as createKassza, t as InvoicesApi, u as TAXPAYER_CACHE_KEY_PREFIX, v as IssueForPaymentOptions, w as PaymentDocumentsApi, x as IssuedReceipt, y as IssuedDocument, z as DocumentChoice } from "./client-
|
|
9
|
-
import { a as InvoiceDetailsItem, c as InvoiceDetailsTotals, i as InvoiceDetailsHeader, l as InvoiceDocumentType, n as InvoiceDetails, o as InvoiceDetailsPayment, r as InvoiceDetailsBuyer, s as InvoiceDetailsSeller, t as GetInvoiceOptions } from "./get-
|
|
10
|
-
import { n as InvoiceOnceResult, r as invoiceOnceExternalId, t as ReceiptOnceResult } from "./create-once-
|
|
11
|
-
import { a as PaymentEventKind, c as PaymentProvider, i as PaymentEvent, l as PaymentRefund, n as PaymentAmount, r as PaymentCustomer, s as PaymentLineItem, t as PaymentAddress } from "./types-
|
|
12
|
-
//#region src/core/binary.d.ts
|
|
1
|
+
import { a as todayInBudapest, i as toBudapestTimestamp, n as addBudapestDays, r as toBudapestDate, t as DateInput } from "./dates-nlGEokCf.js";
|
|
2
|
+
import { a as AgentAction, i as AGENT_ACTIONS, n as KasszaWarningKind, o as MAX_INVOICE_ATTACHMENTS, r as WarningHook, s as SZAMLAZZ_AGENT_URL, t as KasszaWarning } from "./warnings-DpuYhn39.js";
|
|
3
|
+
import { $ as Waybill, A as CorrectiveInvoiceInput, B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, F as Currency, G as InvoiceType, H as InvoicePreview, I as FinalInvoiceInput, J as PickPackPointWaybill, K as ItemLedger, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, P as CreatedInvoiceItem, Q as TransOFlexWaybill, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, V as InvoicePostalAddress, W as InvoiceTemplate, X as StandardInvoiceInput, Y as SprinterWaybill, Z as TaxpayerType, _ as InvoiceReversedEvent, a as AgentRequestEvent, at as AgentErrorCodeInfo, b as isDocumentHookError, c as SzamlazzHooks, ct as SzamlazzErrorCategory, d as DocumentErrorMode, dt as suggestedPrefix, et as ATTEMPT_LEDGER_KEY_PREFIX, f as DocumentEvent, g as InvoicePaymentEvent, h as InvoiceCreatedEvent, i as AgentErrorEvent, it as AGENT_ERROR_CODES, j as CourierService, k as BuyerLedger, l as SzamlazzOptions, lt as errorCodeDocsUrl, m as DocumentHookError, n as AgentCompleteEvent, nt as AttemptLedgerMode, o as AgentResponseEvent, ot as KASSZA_ERROR_DOCS_URL, p as DocumentHook, q as MplWaybill, rt as attemptLedgerKey, s as RequestOptions, st as SzamlazzError, t as AgentAttachment, tt as ATTEMPT_LEDGER_TTL_SECONDS, u as DocumentErrorHandler, ut as isSzamlazzError, v as ReceiptCreatedEvent, w as PaymentEntry, x as ReverseInvoiceInput, y as ReceiptReversedEvent, z as InvoiceItemInput } from "./context-BROX7Krw.js";
|
|
4
|
+
import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "./store-BkaZ8qkU.js";
|
|
5
|
+
import { S as VatRate, d as ItemAmounts, f as ItemPriceInput } from "./index-CinpAhQM.js";
|
|
6
|
+
import { a as ReceiptItem, c as ReceiptPayment, d as ReceiptTotals, f as ReceiptType, h as SendReceiptInput, i as ReceiptDefaults, l as ReceiptPaymentInput, m as ReverseReceiptInput, n as GetReceiptInput, o as ReceiptItemInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput, u as ReceiptPdfTemplate } from "./types-Z6rQoqHn.js";
|
|
7
|
+
import { r as memoryCookieStore, t as CookieStore } from "./session-mKtpAeUB.js";
|
|
8
|
+
import { $ as ONCE_LOCK_KEY_PREFIX, A as IssuedRefundCorrection, B as DocumentDecision, C as PaymentDocumentItem, D as issueForPayment, E as buyerFromCustomer, F as RefundProposalLine, G as RegisterPaymentOnceInput, H as chooseDocument, I as correctionExternalId, J as InvoiceReference, K as RegisteredPaymentOnce, L as ChooseDocumentBuyer, M as PartialRefundMode, N as RefundItemsContext, O as paymentOrderNumber, P as RefundItemsResolver, Q as LockFailureMode, R as ChooseDocumentInput, S as IssuedReversal, T as SkippedPayment, U as ProformaReference, V as RECEIPT_MAX_GROSS_HUF, W as InvoicePdf, X as DEFAULT_LOCK_TTL_SECONDS, Y as CreateOnceOptions, Z as DEFAULT_LOCK_WAIT_MS, _ as conversionExternalId, a as ReceiptsApi, b as IssuedInvoice, c as DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, d as TaxpayerCacheOptions, et as OnceLockOptions, f as TaxpayerInfo, g as ConvertedReceipt, h as ConvertReceiptInput, i as KasszaOptions, j as IssuedRefundProposal, k as IssuedCorrection, l as DEFAULT_TAXPAYER_TTL_SECONDS, m as TaxpayerAddress, n as Kassza, o as TaxpayerApi, p as TaxpayerTaxNumber, q as paymentMarker, r as KasszaDefaults, s as createKassza, t as InvoicesApi, u as TAXPAYER_CACHE_KEY_PREFIX, v as IssueForPaymentOptions, w as PaymentDocumentsApi, x as IssuedReceipt, y as IssuedDocument, z as DocumentChoice } from "./client-BJfeFjCM.js";
|
|
9
|
+
import { a as InvoiceDetailsItem, c as InvoiceDetailsTotals, i as InvoiceDetailsHeader, l as InvoiceDocumentType, n as InvoiceDetails, o as InvoiceDetailsPayment, r as InvoiceDetailsBuyer, s as InvoiceDetailsSeller, t as GetInvoiceOptions } from "./get-BL4Fr8-P.js";
|
|
10
|
+
import { n as InvoiceOnceResult, r as invoiceOnceExternalId, t as ReceiptOnceResult } from "./create-once-CoybK69A.js";
|
|
11
|
+
import { a as PaymentEventKind, c as PaymentProvider, i as PaymentEvent, l as PaymentRefund, n as PaymentAmount, r as PaymentCustomer, s as PaymentLineItem, t as PaymentAddress } from "./types-oiDulesz.js";
|
|
13
12
|
export declare function bytesToBase64(bytes: Uint8Array): string;
|
|
14
|
-
//#endregion
|
|
15
13
|
export { AGENT_ACTIONS, AGENT_ERROR_CODES, ATTEMPT_LEDGER_KEY_PREFIX, ATTEMPT_LEDGER_TTL_SECONDS, type AgentAction, type AgentAttachment, type AgentCompleteEvent, type AgentErrorCodeInfo, type AgentErrorEvent, type AgentRequestEvent, type AgentResponseEvent, type AttemptLedgerMode, type Awaitable, type BuyerLedger, type ChooseDocumentBuyer, type ChooseDocumentInput, type ClearPaymentsInput, type ConvertReceiptInput, type ConvertedReceipt, type CookieStore, type CorrectiveInvoiceInput, type CourierService, type CreateInvoiceInput, type CreateOnceOptions, type CreateReceiptInput, type CreatedInvoice, type CreatedInvoiceItem, type Currency, DEFAULT_LOCK_TTL_SECONDS, DEFAULT_LOCK_WAIT_MS, DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, DEFAULT_TAXPAYER_TTL_SECONDS, type DateInput, type DocumentChoice, type DocumentDecision, type DocumentErrorHandler, type DocumentErrorMode, type DocumentEvent, type DocumentHook, DocumentHookError, type FinalInvoiceInput, type GetInvoiceOptions, type GetReceiptInput, type InvoiceBuyer, type InvoiceCreatedEvent, type InvoiceDefaults, type InvoiceDetails, type InvoiceDetailsBuyer, type InvoiceDetailsHeader, type InvoiceDetailsItem, type InvoiceDetailsPayment, type InvoiceDetailsSeller, type InvoiceDetailsTotals, type InvoiceDocumentType, type InvoiceItemInput, type InvoiceLanguage, type InvoiceOnceResult, type InvoicePaymentEvent, type InvoicePdf, type InvoicePostalAddress, type InvoicePreview, type InvoiceReference, type InvoiceReversedEvent, type InvoiceSeller, type InvoiceTemplate, type InvoiceType, type InvoicesApi, type IssueForPaymentOptions, type IssuedCorrection, type IssuedDocument, type IssuedInvoice, type IssuedReceipt, type IssuedRefundCorrection, type IssuedRefundProposal, type IssuedReversal, type ItemAmounts, type ItemLedger, type ItemPriceInput, KASSZA_ERROR_DOCS_URL, type Kassza, type KasszaDefaults, type KasszaOptions, type KasszaWarning, type KasszaWarningKind, type KeyValueStore, type LockFailureMode, MAX_INVOICE_ATTACHMENTS, type MplWaybill, ONCE_LOCK_KEY_PREFIX, type OnceLockOptions, type PartialRefundMode, type PaymentAddress, type PaymentAmount, type PaymentCustomer, type PaymentDocumentItem, type PaymentDocumentsApi, type PaymentEntry, type PaymentEvent, type PaymentEventKind, type PaymentLineItem, type PaymentProvider, type PaymentRefund, type PickPackPointWaybill, type ProformaReference, RECEIPT_MAX_GROSS_HUF, type Receipt, type ReceiptCreatedEvent, type ReceiptDefaults, type ReceiptItem, type ReceiptItemInput, type ReceiptOnceResult, type ReceiptOnlyVatCode, type ReceiptPayment, type ReceiptPaymentInput, type ReceiptPdfTemplate, type ReceiptReversedEvent, type ReceiptTotals, type ReceiptType, type ReceiptVatRate, type ReceiptsApi, type RefundItemsContext, type RefundItemsResolver, type RefundProposalLine, type RegisterPaymentInput, type RegisterPaymentOnceInput, type RegisteredPayment, type RegisteredPaymentOnce, type RequestOptions, type ReverseInvoiceInput, type ReverseReceiptInput, type ReversedInvoice, SZAMLAZZ_AGENT_URL, type SendReceiptInput, type SkippedPayment, type SprinterWaybill, type StandardInvoiceInput, type StoreCapabilities, SzamlazzError, type SzamlazzErrorCategory, type SzamlazzHooks, type SzamlazzOptions, TAXPAYER_CACHE_KEY_PREFIX, type TaxpayerAddress, type TaxpayerApi, type TaxpayerCacheOptions, type TaxpayerInfo, type TaxpayerTaxNumber, type TaxpayerType, type TransOFlexWaybill, type VatRate, type WarningHook, type Waybill, addBudapestDays, attemptLedgerKey, buyerFromCustomer, chooseDocument, conversionExternalId, correctionExternalId, createKassza, errorCodeDocsUrl, invoiceOnceExternalId, isDocumentHookError, isSzamlazzError, issueForPayment, memoryCookieStore, memoryStore, paymentMarker, paymentOrderNumber, storeCapabilities, suggestedPrefix, toBudapestDate, toBudapestTimestamp, todayInBudapest };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
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-
|
|
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-
|
|
4
|
-
import { n as bytesToBase64 } from "./binary-
|
|
5
|
-
import { a as memoryStore, n as memoryCookieStore, o as storeCapabilities } from "./session-
|
|
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-
|
|
7
|
-
import { a as todayInBudapest, i as toBudapestTimestamp, r as toBudapestDate, t as addBudapestDays } from "./dates-
|
|
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-B6cAXyET.js";
|
|
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-CGGsW0Y5.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-JZ1M1sZX.js";
|
|
4
|
+
import { n as bytesToBase64 } from "./binary-DuKBSfH-.js";
|
|
5
|
+
import { a as memoryStore, n as memoryCookieStore, o as storeCapabilities } from "./session-DZeE1ryt.js";
|
|
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-Dy9zvRK1.js";
|
|
7
|
+
import { a as todayInBudapest, i as toBudapestTimestamp, r as toBudapestDate, t as addBudapestDays } from "./dates-DWsZOdaO.js";
|
|
8
8
|
export { AGENT_ACTIONS, AGENT_ERROR_CODES, ATTEMPT_LEDGER_KEY_PREFIX, ATTEMPT_LEDGER_TTL_SECONDS, DEFAULT_LOCK_TTL_SECONDS, DEFAULT_LOCK_WAIT_MS, DEFAULT_TAXPAYER_INVALID_TTL_SECONDS, DEFAULT_TAXPAYER_TTL_SECONDS, DocumentHookError, KASSZA_ERROR_DOCS_URL, MAX_INVOICE_ATTACHMENTS, ONCE_LOCK_KEY_PREFIX, RECEIPT_MAX_GROSS_HUF, SZAMLAZZ_AGENT_URL, SzamlazzError, TAXPAYER_CACHE_KEY_PREFIX, addBudapestDays, attemptLedgerKey, buyerFromCustomer, bytesToBase64, chooseDocument, conversionExternalId, correctionExternalId, createKassza, errorCodeDocsUrl, invoiceOnceExternalId, isDocumentHookError, isSzamlazzError, issueForPayment, memoryCookieStore, memoryStore, paymentMarker, paymentOrderNumber, storeCapabilities, suggestedPrefix, toBudapestDate, toBudapestTimestamp, todayInBudapest };
|
package/dist/ipn/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors = require("../errors-
|
|
3
|
-
const require_binary = require("../binary-
|
|
4
|
-
|
|
2
|
+
const require_errors = require("../errors-Bn6pe6yw.cjs");
|
|
3
|
+
const require_binary = require("../binary-CdpKlNNI.cjs");
|
|
4
|
+
// src/ipn/ip.ts
|
|
5
5
|
const SZAMLAZZ_OUTBOUND_IPS = [
|
|
6
6
|
"3.73.214.98",
|
|
7
7
|
"3.76.149.232",
|
|
@@ -51,8 +51,7 @@ function checkSzamlazzIp(ip, options = {}) {
|
|
|
51
51
|
function isSzamlazzIp(ip, options = {}) {
|
|
52
52
|
return checkSzamlazzIp(ip, options).allowed;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
//#region src/ipn/notification.ts
|
|
54
|
+
// src/ipn/notification.ts
|
|
56
55
|
const IPN_FIELDS = {
|
|
57
56
|
invoiceNumber: "szlahu_szamlaszam",
|
|
58
57
|
proformaNumber: "szlahu_dijbekero_szama",
|
|
@@ -164,7 +163,6 @@ function ipnOkResponse() {
|
|
|
164
163
|
headers: { "content-type": "text/plain; charset=utf-8" }
|
|
165
164
|
});
|
|
166
165
|
}
|
|
167
|
-
//#endregion
|
|
168
166
|
exports.IPN_FIELDS = IPN_FIELDS;
|
|
169
167
|
exports.MAX_IPN_BODY_BYTES = MAX_IPN_BODY_BYTES;
|
|
170
168
|
exports.SZAMLAZZ_OUTBOUND_IPS = SZAMLAZZ_OUTBOUND_IPS;
|
package/dist/ipn/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/ipn/ip.d.ts
|
|
2
1
|
export declare const SZAMLAZZ_OUTBOUND_IPS: readonly string[];
|
|
3
2
|
interface SzamlazzIpOptions {
|
|
4
3
|
readonly trustedProxies?: number | undefined;
|
|
@@ -16,8 +15,6 @@ type SzamlazzIpCheck = {
|
|
|
16
15
|
};
|
|
17
16
|
export declare function checkSzamlazzIp(ip: string | null | undefined, options?: SzamlazzIpOptions): SzamlazzIpCheck;
|
|
18
17
|
export declare function isSzamlazzIp(ip: string | null | undefined, options?: SzamlazzIpOptions): boolean;
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/ipn/notification.d.ts
|
|
21
18
|
type IpnInput = string | URLSearchParams | FormData | Readonly<Record<string, string>>;
|
|
22
19
|
interface IpnNotification {
|
|
23
20
|
readonly invoiceNumber: string;
|
|
@@ -44,5 +41,4 @@ export declare function parseIpnAmount(value: string): number | undefined;
|
|
|
44
41
|
export declare function parseIpnNotification(input: IpnInput): IpnNotification;
|
|
45
42
|
export declare function readIpnNotification(request: Request): Promise<IpnNotification>;
|
|
46
43
|
export declare function ipnOkResponse(): Response;
|
|
47
|
-
//#endregion
|
|
48
44
|
export type { IpnInput, IpnNotification, SzamlazzIpCheck, SzamlazzIpOptions, SzamlazzIpRejection };
|
package/dist/ipn/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/ipn/ip.d.ts
|
|
2
1
|
export declare const SZAMLAZZ_OUTBOUND_IPS: readonly string[];
|
|
3
2
|
interface SzamlazzIpOptions {
|
|
4
3
|
readonly trustedProxies?: number | undefined;
|
|
@@ -16,8 +15,6 @@ type SzamlazzIpCheck = {
|
|
|
16
15
|
};
|
|
17
16
|
export declare function checkSzamlazzIp(ip: string | null | undefined, options?: SzamlazzIpOptions): SzamlazzIpCheck;
|
|
18
17
|
export declare function isSzamlazzIp(ip: string | null | undefined, options?: SzamlazzIpOptions): boolean;
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/ipn/notification.d.ts
|
|
21
18
|
type IpnInput = string | URLSearchParams | FormData | Readonly<Record<string, string>>;
|
|
22
19
|
interface IpnNotification {
|
|
23
20
|
readonly invoiceNumber: string;
|
|
@@ -44,5 +41,4 @@ export declare function parseIpnAmount(value: string): number | undefined;
|
|
|
44
41
|
export declare function parseIpnNotification(input: IpnInput): IpnNotification;
|
|
45
42
|
export declare function readIpnNotification(request: Request): Promise<IpnNotification>;
|
|
46
43
|
export declare function ipnOkResponse(): Response;
|
|
47
|
-
//#endregion
|
|
48
44
|
export type { IpnInput, IpnNotification, SzamlazzIpCheck, SzamlazzIpOptions, SzamlazzIpRejection };
|
package/dist/ipn/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as SzamlazzError } from "../errors-
|
|
2
|
-
import { r as decodeUtf8 } from "../binary-
|
|
3
|
-
|
|
1
|
+
import { r as SzamlazzError } from "../errors-CGGsW0Y5.js";
|
|
2
|
+
import { r as decodeUtf8 } from "../binary-DuKBSfH-.js";
|
|
3
|
+
// src/ipn/ip.ts
|
|
4
4
|
const SZAMLAZZ_OUTBOUND_IPS = [
|
|
5
5
|
"3.73.214.98",
|
|
6
6
|
"3.76.149.232",
|
|
@@ -50,8 +50,7 @@ function checkSzamlazzIp(ip, options = {}) {
|
|
|
50
50
|
function isSzamlazzIp(ip, options = {}) {
|
|
51
51
|
return checkSzamlazzIp(ip, options).allowed;
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
//#region src/ipn/notification.ts
|
|
53
|
+
// src/ipn/notification.ts
|
|
55
54
|
const IPN_FIELDS = {
|
|
56
55
|
invoiceNumber: "szlahu_szamlaszam",
|
|
57
56
|
proformaNumber: "szlahu_dijbekero_szama",
|
|
@@ -163,5 +162,4 @@ function ipnOkResponse() {
|
|
|
163
162
|
headers: { "content-type": "text/plain; charset=utf-8" }
|
|
164
163
|
});
|
|
165
164
|
}
|
|
166
|
-
//#endregion
|
|
167
165
|
export { IPN_FIELDS, MAX_IPN_BODY_BYTES, SZAMLAZZ_OUTBOUND_IPS, checkSzamlazzIp, ipnOkResponse, isSzamlazzIp, parseIpnAmount, parseIpnNotification, readIpnNotification };
|