kassza 0.18.0 → 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.
Files changed (190) hide show
  1. package/README.md +1 -1
  2. package/dist/batch/index.cjs +5 -7
  3. package/dist/batch/index.d.cts +5 -9
  4. package/dist/batch/index.d.ts +5 -9
  5. package/dist/batch/index.js +5 -7
  6. package/dist/{binary-B89HM03_.cjs → binary-CdpKlNNI.cjs} +1 -2
  7. package/dist/{binary-D0M9U2MD.js → binary-DuKBSfH-.js} +1 -2
  8. package/dist/cli.cjs +14 -21
  9. package/dist/cli.js +14 -21
  10. package/dist/{client-DeWWQ-RZ.d.ts → client-BT2odGYl.d.cts} +8 -36
  11. package/dist/{client-SVZu25MB.d.cts → client-C-SYCiOZ.d.ts} +8 -36
  12. package/dist/{client-Cvb9yfxU.cjs → client-I_29IPMh.cjs} +25 -37
  13. package/dist/{client-CdWEA0et.js → client-JZ1M1sZX.js} +25 -37
  14. package/dist/{context-kb33TgzE.d.ts → context-BuX6Eion.d.ts} +6 -24
  15. package/dist/{context-CFNKzStE.d.cts → context-PwqY4JOK.d.cts} +6 -24
  16. package/dist/cookie-stores/index.cjs +2 -2
  17. package/dist/cookie-stores/index.d.cts +3 -3
  18. package/dist/cookie-stores/index.d.ts +3 -3
  19. package/dist/cookie-stores/index.js +2 -2
  20. package/dist/{create-CflXrPip.js → create-BwRslos0.js} +9 -12
  21. package/dist/{create-CvUvLUaT.cjs → create-DH5jiZPA.cjs} +9 -12
  22. package/dist/{create-once-CW0x_yvp.js → create-once-B6cAXyET.js} +16 -22
  23. package/dist/{create-once-VKp0tVow.d.ts → create-once-CiGUjXut.d.ts} +3 -7
  24. package/dist/{create-once-Bh6fOWkW.d.cts → create-once-CyaVT36b.d.cts} +3 -7
  25. package/dist/{create-once-CHhDz0un.cjs → create-once-zeF7GVVP.cjs} +16 -22
  26. package/dist/{crypto-Dpn4FHQ6.cjs → crypto-B0PAHKJB.cjs} +1 -2
  27. package/dist/{crypto-usDg8L2K.js → crypto-BqGn_oGu.js} +1 -2
  28. package/dist/data-link/index.cjs +10 -13
  29. package/dist/data-link/index.d.cts +1 -5
  30. package/dist/data-link/index.d.ts +1 -5
  31. package/dist/data-link/index.js +10 -13
  32. package/dist/{dates-CXyj7Azy.js → dates-DWsZOdaO.js} +1 -2
  33. package/dist/{dates-9zvESP0i.d.cts → dates-nlGEokCf.d.cts} +0 -2
  34. package/dist/{dates-9zvESP0i.d.ts → dates-nlGEokCf.d.ts} +0 -2
  35. package/dist/{dates-CPgBodkP.cjs → dates-oOp3ypPP.cjs} +1 -2
  36. package/dist/delegation/index.cjs +9 -12
  37. package/dist/delegation/index.d.cts +3 -9
  38. package/dist/delegation/index.d.ts +3 -9
  39. package/dist/delegation/index.js +9 -12
  40. package/dist/{errors-EE96_6D_.cjs → errors-Bn6pe6yw.cjs} +12 -3
  41. package/dist/{errors-DtN4g5Z9.js → errors-CGGsW0Y5.js} +12 -3
  42. package/dist/{get-Byc9T5WO.d.cts → get-BL4Fr8-P.d.cts} +0 -2
  43. package/dist/{get-Byc9T5WO.d.ts → get-BL4Fr8-P.d.ts} +0 -2
  44. package/dist/{get-BdMTseh4.cjs → get-DFhT7kOp.cjs} +4 -5
  45. package/dist/{get-CZEShCcj.js → get-HrHwVkVt.js} +4 -5
  46. package/dist/{index-C-7yWV7L.d.cts → index-CinpAhQM.d.cts} +0 -8
  47. package/dist/{index-C-7yWV7L.d.ts → index-CinpAhQM.d.ts} +0 -8
  48. package/dist/{index-BqGgQ4t3.d.ts → index-DqoDUw6X.d.ts} +2 -20
  49. package/dist/{index-BhUPY_EH.d.cts → index-qk62lWr3.d.cts} +2 -20
  50. package/dist/index.cjs +7 -7
  51. package/dist/index.d.cts +11 -13
  52. package/dist/index.d.ts +11 -13
  53. package/dist/index.js +7 -7
  54. package/dist/ipn/index.cjs +4 -6
  55. package/dist/ipn/index.d.cts +0 -4
  56. package/dist/ipn/index.d.ts +0 -4
  57. package/dist/ipn/index.js +4 -6
  58. package/dist/{issue-Bin4tKD_.cjs → issue-DReARZnF.cjs} +12 -18
  59. package/dist/{issue-DMA1Nbr1.js → issue-Dy9zvRK1.js} +12 -18
  60. package/dist/journal/index.cjs +7 -11
  61. package/dist/journal/index.d.cts +2 -6
  62. package/dist/journal/index.d.ts +2 -6
  63. package/dist/journal/index.js +7 -11
  64. package/dist/{journal-Y9qrIB8G.d.ts → journal-BNdo07p5.d.ts} +5 -9
  65. package/dist/{journal-DvI81Kt7.d.cts → journal-DI-hOW6N.d.cts} +5 -9
  66. package/dist/{json-4y4E2xxS.cjs → json-COC9rDwf.cjs} +1 -2
  67. package/dist/json-D3Bx7NhF.d.cts +2 -0
  68. package/dist/json-D3Bx7NhF.d.ts +2 -0
  69. package/dist/{json-DjnqnaJK.js → json-as-6J7d-.js} +1 -2
  70. package/dist/mcp/index.cjs +1 -1
  71. package/dist/mcp/index.d.cts +1 -9
  72. package/dist/mcp/index.d.ts +1 -9
  73. package/dist/mcp/index.js +1 -2
  74. package/dist/money/index.cjs +3 -3
  75. package/dist/money/index.d.cts +1 -1
  76. package/dist/money/index.d.ts +1 -1
  77. package/dist/money/index.js +3 -3
  78. package/dist/{money-K9j0wPit.cjs → money-NtVytaxG.cjs} +5 -7
  79. package/dist/{money-Cw457SD6.js → money-f280VT77.js} +5 -7
  80. package/dist/nav/index.cjs +15 -22
  81. package/dist/nav/index.d.cts +2 -22
  82. package/dist/nav/index.d.ts +2 -22
  83. package/dist/nav/index.js +15 -22
  84. package/dist/{nav-BcCerwWS.js → nav-NvNgaONz.js} +5 -7
  85. package/dist/{nav-BNbc8U0R.cjs → nav-VShZkjg8.cjs} +5 -7
  86. package/dist/node/index.cjs +1 -2
  87. package/dist/node/index.d.cts +1 -3
  88. package/dist/node/index.d.ts +1 -3
  89. package/dist/node/index.js +1 -2
  90. package/dist/observe/index.cjs +3 -5
  91. package/dist/observe/index.d.cts +1 -5
  92. package/dist/observe/index.d.ts +1 -5
  93. package/dist/observe/index.js +3 -5
  94. package/dist/{once-BN_3B5OF.cjs → once-BmXfrNbQ.cjs} +2 -3
  95. package/dist/{once-CqqZxsXG.js → once-CMhDPrs7.js} +2 -3
  96. package/dist/{parse-Cr7yQ3_z.js → parse-1RiSh4vY.js} +5 -7
  97. package/dist/{parse-DOA2XQ3e.cjs → parse-CmM5va-p.cjs} +5 -7
  98. package/dist/payments/barion.cjs +7 -6
  99. package/dist/payments/barion.d.cts +4 -6
  100. package/dist/payments/barion.d.ts +4 -6
  101. package/dist/payments/barion.js +7 -6
  102. package/dist/payments/index.cjs +2 -2
  103. package/dist/payments/index.d.cts +3 -9
  104. package/dist/payments/index.d.ts +3 -9
  105. package/dist/payments/index.js +2 -2
  106. package/dist/payments/paypal.cjs +8 -7
  107. package/dist/payments/paypal.d.cts +4 -6
  108. package/dist/payments/paypal.d.ts +4 -6
  109. package/dist/payments/paypal.js +8 -7
  110. package/dist/payments/revolut.cjs +7 -6
  111. package/dist/payments/revolut.d.cts +4 -6
  112. package/dist/payments/revolut.d.ts +4 -6
  113. package/dist/payments/revolut.js +7 -6
  114. package/dist/payments/simplepay.cjs +9 -8
  115. package/dist/payments/simplepay.d.cts +4 -6
  116. package/dist/payments/simplepay.d.ts +4 -6
  117. package/dist/payments/simplepay.js +9 -8
  118. package/dist/payments/stripe.cjs +6 -6
  119. package/dist/payments/stripe.d.cts +4 -6
  120. package/dist/payments/stripe.d.ts +4 -6
  121. package/dist/payments/stripe.js +6 -6
  122. package/dist/{push-BXj0Sf0Z.d.ts → push-CTxDD3yJ.d.cts} +2 -4
  123. package/dist/{push-D4nNbCNV.d.cts → push-DJh5YkyV.d.ts} +2 -4
  124. package/dist/{reference-B5TATqb5.js → reference-Cxz0m2zF.js} +6 -7
  125. package/dist/{reference-BIdYMK0t.cjs → reference-DoY12fc1.cjs} +6 -7
  126. package/dist/reports/index.cjs +3 -4
  127. package/dist/reports/index.d.cts +1 -7
  128. package/dist/reports/index.d.ts +1 -7
  129. package/dist/reports/index.js +3 -4
  130. package/dist/{request-body-uZHMRlQr.js → request-body-BM4sbsHd.js} +2 -3
  131. package/dist/{request-body-CH6ZGOrq.cjs → request-body-BhfkJhff.cjs} +2 -3
  132. package/dist/{rounding-TxoWy2ww.cjs → rounding-CHmSK5Z2.cjs} +1 -2
  133. package/dist/{rounding-BLyHjjI5.js → rounding-CZLj4DbV.js} +1 -2
  134. package/dist/{serialize-B2eFh3D-.js → serialize-CjymGkJj.js} +2 -4
  135. package/dist/{serialize-CquIsxA-.cjs → serialize-DEU7r6Bk.cjs} +2 -4
  136. package/dist/{server-B9guio75.cjs → server-BZ-ySQGx.cjs} +23 -35
  137. package/dist/{server-yx9eG_8p.js → server-CDwsjBWk.js} +23 -35
  138. package/dist/{session-Ckl5eJhV.d.ts → session-BBbSXlx3.d.cts} +1 -3
  139. package/dist/{session-DeM5vjvC.cjs → session-BYotpR_s.cjs} +2 -4
  140. package/dist/{session-SaEEXu2N.js → session-DZeE1ryt.js} +2 -4
  141. package/dist/{session-YbChChx7.d.cts → session-mKtpAeUB.d.ts} +1 -3
  142. package/dist/{shared-CrxlxI8n.cjs → shared-BOBTXDTo.cjs} +5 -6
  143. package/dist/{shared-D6DLa4b7.js → shared-Dbcfwr8x.js} +5 -6
  144. package/dist/storage/fs.cjs +3 -4
  145. package/dist/storage/fs.d.cts +2 -4
  146. package/dist/storage/fs.d.ts +2 -4
  147. package/dist/storage/fs.js +3 -4
  148. package/dist/storage/index.cjs +16 -25
  149. package/dist/storage/index.d.cts +2 -26
  150. package/dist/storage/index.d.ts +2 -26
  151. package/dist/storage/index.js +16 -25
  152. package/dist/{store-C1rHd9DB.d.cts → store-BkaZ8qkU.d.cts} +0 -2
  153. package/dist/{store-C1rHd9DB.d.ts → store-BkaZ8qkU.d.ts} +0 -2
  154. package/dist/stores/index.cjs +2 -2
  155. package/dist/stores/index.d.cts +3 -3
  156. package/dist/stores/index.d.ts +3 -3
  157. package/dist/stores/index.js +2 -2
  158. package/dist/{stores-DhjGBrl_.js → stores-BUnPNJQl.js} +12 -22
  159. package/dist/{stores-BNrS0dWl.cjs → stores-CH4rYKs_.cjs} +12 -22
  160. package/dist/{tax-number-BdqKsxNR.js → tax-number-C6jySuGR.js} +3 -6
  161. package/dist/{tax-number-BYFkBp4A.cjs → tax-number-XLdM5ETv.cjs} +3 -6
  162. package/dist/testing/index.cjs +20 -30
  163. package/dist/testing/index.d.cts +5 -15
  164. package/dist/testing/index.d.ts +5 -15
  165. package/dist/testing/index.js +20 -30
  166. package/dist/{types-DVRgwcqg.d.cts → types-Bfs08Mrc.d.cts} +0 -2
  167. package/dist/{types-DVRgwcqg.d.ts → types-Bfs08Mrc.d.ts} +0 -2
  168. package/dist/{types-ByAEvGsZ.d.ts → types-DeuUqIvU.d.cts} +2 -4
  169. package/dist/{types-D1zDOH_F.d.ts → types-Z6rQoqHn.d.ts} +1 -3
  170. package/dist/{types-lnKkQdot.d.cts → types-_HKTOCuQ.d.cts} +1 -3
  171. package/dist/{types-B1A8mUIE.d.cts → types-oiDulesz.d.ts} +2 -4
  172. package/dist/url-CRIlLxPE.cjs +23 -0
  173. package/dist/url-DeCMiKVm.js +12 -0
  174. package/dist/validators/index.cjs +6 -10
  175. package/dist/validators/index.d.cts +0 -12
  176. package/dist/validators/index.d.ts +0 -12
  177. package/dist/validators/index.js +6 -10
  178. package/dist/{vat-v_dcWCto.js → vat-B4J5Q0tu.js} +1 -2
  179. package/dist/{vat-g35srbNG.cjs → vat-BkoiiKm4.cjs} +1 -2
  180. package/dist/{warnings-DwTl5J-2.js → warnings-DJ0QvZOp.js} +1 -2
  181. package/dist/{warnings-B3DXnveC.d.cts → warnings-DpuYhn39.d.cts} +0 -4
  182. package/dist/{warnings-B3DXnveC.d.ts → warnings-DpuYhn39.d.ts} +0 -4
  183. package/dist/{warnings-DeIw5RFj.cjs → warnings-ciSzK6Jc.cjs} +1 -2
  184. package/dist/{webhook-Ckj-_hPD.cjs → webhook-BBTebz1x.cjs} +7 -11
  185. package/dist/{webhook-D6lEejob.d.ts → webhook-C9IBUdeT.d.ts} +1 -3
  186. package/dist/{webhook-CmdhGiH5.d.cts → webhook-DF2p_m2Q.d.cts} +1 -3
  187. package/dist/{webhook-CQVShAfI.js → webhook-SFlA_nCf.js} +7 -11
  188. package/package.json +1 -1
  189. package/dist/json-B70TwoX1.d.cts +0 -4
  190. package/dist/json-B70TwoX1.d.ts +0 -4
@@ -1,17 +1,17 @@
1
- const require_create_once = require("./create-once-CHhDz0un.cjs");
2
- const require_errors = require("./errors-EE96_6D_.cjs");
3
- const require_binary = require("./binary-B89HM03_.cjs");
4
- const require_serialize = require("./serialize-CquIsxA-.cjs");
5
- const require_parse = require("./parse-DOA2XQ3e.cjs");
6
- const require_session = require("./session-DeM5vjvC.cjs");
7
- const require_warnings = require("./warnings-DeIw5RFj.cjs");
8
- const require_issue = require("./issue-Bin4tKD_.cjs");
9
- const require_vat = require("./vat-g35srbNG.cjs");
10
- const require_money = require("./money-K9j0wPit.cjs");
11
- const require_reference = require("./reference-BIdYMK0t.cjs");
12
- const require_get = require("./get-BdMTseh4.cjs");
13
- const require_create = require("./create-CvUvLUaT.cjs");
14
- //#region src/core/attempt-ledger.ts
1
+ const require_create_once = require("./create-once-zeF7GVVP.cjs");
2
+ const require_errors = require("./errors-Bn6pe6yw.cjs");
3
+ const require_binary = require("./binary-CdpKlNNI.cjs");
4
+ const require_serialize = require("./serialize-DEU7r6Bk.cjs");
5
+ const require_parse = require("./parse-CmM5va-p.cjs");
6
+ const require_session = require("./session-BYotpR_s.cjs");
7
+ const require_warnings = require("./warnings-ciSzK6Jc.cjs");
8
+ const require_issue = require("./issue-DReARZnF.cjs");
9
+ const require_vat = require("./vat-BkoiiKm4.cjs");
10
+ const require_money = require("./money-NtVytaxG.cjs");
11
+ const require_reference = require("./reference-DoY12fc1.cjs");
12
+ const require_get = require("./get-DFhT7kOp.cjs");
13
+ const require_create = require("./create-DH5jiZPA.cjs");
14
+ // src/core/attempt-ledger.ts
15
15
  const ATTEMPT_LEDGER_TTL_SECONDS = 86400;
16
16
  const ATTEMPT_LEDGER_KEY_PREFIX = "szamlazz:attempts:";
17
17
  const COUNTED_CATEGORIES = /* @__PURE__ */ new Set([
@@ -431,8 +431,7 @@ function createAgentContext(options = {}) {
431
431
  resetAttempts
432
432
  };
433
433
  }
434
- //#endregion
435
- //#region src/invoices/create-response.ts
434
+ // src/invoices/create-response.ts
436
435
  function readRawResponse(response) {
437
436
  require_parse.throwIfAnyError(response);
438
437
  const headers = require_parse.readDocumentHeaders(response.headers);
@@ -501,8 +500,7 @@ function parseInvoicePreviewResponse(response, items = []) {
501
500
  items
502
501
  };
503
502
  }
504
- //#endregion
505
- //#region src/invoices/create-xml.ts
503
+ // src/invoices/create-xml.ts
506
504
  const INVOICE_XML_NAMESPACE = "http://www.szamlazz.hu/xmlszamla";
507
505
  const INVOICE_XML_SCHEMA_LOCATION = "https://www.szamlazz.hu/szamla/docs/xsds/agent/xmlszamla.xsd";
508
506
  const RESPONSE_VERSION_XML = 2;
@@ -687,8 +685,7 @@ function renderInvoiceXml(credentials, invoice, options = {}) {
687
685
  function buildCreateInvoiceXml(credentials, defaults, input, now = /* @__PURE__ */ new Date()) {
688
686
  return renderInvoiceXml(credentials, require_create_once.resolveInvoice(defaults, input, now));
689
687
  }
690
- //#endregion
691
- //#region src/invoices/create.ts
688
+ // src/invoices/create.ts
692
689
  function buildRequest(ctx, invoice, preview, options) {
693
690
  const xml = renderInvoiceXml(ctx.credentials, invoice, { preview });
694
691
  const attachments = preview ? [] : invoice.attachments;
@@ -712,8 +709,7 @@ async function previewInvoice(ctx, defaults, input, options = {}) {
712
709
  const items = itemsOf(invoice);
713
710
  return ctx.execute(buildRequest(ctx, invoice, true, options), (response) => parseInvoicePreviewResponse(response, items));
714
711
  }
715
- //#endregion
716
- //#region src/invoices/pdf.ts
712
+ // src/invoices/pdf.ts
717
713
  function buildInvoicePdfXml(credentials, reference) {
718
714
  const resolved = require_reference.resolveInvoiceReference(reference);
719
715
  return require_serialize.buildXmlDocument({
@@ -867,8 +863,7 @@ async function reverseInvoice(ctx, input, options = {}) {
867
863
  signal: options.signal
868
864
  }, (response) => parseReverseInvoiceResponse(response, invoiceNumber));
869
865
  }
870
- //#endregion
871
- //#region src/receipts/get.ts
866
+ // src/receipts/get.ts
872
867
  const GET_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtaget";
873
868
  function normalizeInput$1(input) {
874
869
  return typeof input === "string" ? { receiptNumber: input } : input;
@@ -907,8 +902,7 @@ function getReceipt(ctx, input, options = {}) {
907
902
  safeToRetry: true
908
903
  }, require_parse.parseReceiptResponse);
909
904
  }
910
- //#endregion
911
- //#region src/receipts/reverse.ts
905
+ // src/receipts/reverse.ts
912
906
  const REVERSE_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtast";
913
907
  function normalizeInput(input) {
914
908
  return typeof input === "string" ? { receiptNumber: input } : input;
@@ -936,8 +930,7 @@ function reverseReceipt(ctx, input, options = {}) {
936
930
  safeToRetry: require_create.optionalText(normalized.callId) !== void 0
937
931
  }, require_parse.parseReceiptResponse);
938
932
  }
939
- //#endregion
940
- //#region src/receipts/send.ts
933
+ // src/receipts/send.ts
941
934
  const SEND_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtasend";
942
935
  const EMAIL_PATTERN = /^[^\s@,;<>]+@[^\s@,;<>]+\.[^\s@,;<>]+$/;
943
936
  function isValidEmail(value) {
@@ -996,8 +989,7 @@ function sendReceipt(ctx, input, options = {}) {
996
989
  signal: options.signal
997
990
  }, parseSendReceiptResponse);
998
991
  }
999
- //#endregion
1000
- //#region src/taxpayer/address.ts
992
+ // src/taxpayer/address.ts
1001
993
  const ROMAN_NUMERAL = /^[IVX]{1,5}\.?$/;
1002
994
  function isShouting(value) {
1003
995
  return value === value.toUpperCase() && value !== value.toLowerCase();
@@ -1075,8 +1067,7 @@ function parseTaxpayerAddress(item) {
1075
1067
  raw
1076
1068
  };
1077
1069
  }
1078
- //#endregion
1079
- //#region src/taxpayer/query-taxpayer.ts
1070
+ // src/taxpayer/query-taxpayer.ts
1080
1071
  const TAXPAYER_NAMESPACE = "http://www.szamlazz.hu/xmltaxpayer";
1081
1072
  const TAXPAYER_SCHEMA_LOCATION = "http://www.szamlazz.hu/docs/xsds/agent/xmltaxpayer.xsd";
1082
1073
  function toTaxpayerId(taxNumber) {
@@ -1169,8 +1160,7 @@ async function queryTaxpayer(ctx, taxNumber, options = {}) {
1169
1160
  safeToRetry: true
1170
1161
  }, parseQueryTaxpayerResponse);
1171
1162
  }
1172
- //#endregion
1173
- //#region src/taxpayer/cache.ts
1163
+ // src/taxpayer/cache.ts
1174
1164
  const TAXPAYER_CACHE_KEY_PREFIX = "szamlazz:taxpayer:";
1175
1165
  const DEFAULT_TAXPAYER_TTL_SECONDS = 86400;
1176
1166
  const DEFAULT_TAXPAYER_INVALID_TTL_SECONDS = 600;
@@ -1217,8 +1207,7 @@ function cachedTaxpayerQuery(query, options, warn) {
1217
1207
  return info;
1218
1208
  };
1219
1209
  }
1220
- //#endregion
1221
- //#region src/client.ts
1210
+ // src/client.ts
1222
1211
  const CREDENTIAL_PROBE_INVOICE_NUMBER = "KASSZA-CREDENTIAL-PROBE-0";
1223
1212
  async function nullIfNotFound(promise) {
1224
1213
  try {
@@ -1384,7 +1373,6 @@ function createKassza(options = {}) {
1384
1373
  }, payment, issueOptions)
1385
1374
  };
1386
1375
  }
1387
- //#endregion
1388
1376
  Object.defineProperty(exports, "ATTEMPT_LEDGER_KEY_PREFIX", {
1389
1377
  enumerable: true,
1390
1378
  get: function() {
@@ -1,17 +1,17 @@
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
- import { i as createAgentError, o as isSzamlazzError, r as SzamlazzError, s as parseErrorCode } from "./errors-DtN4g5Z9.js";
3
- import { t as base64ToBytes } from "./binary-D0M9U2MD.js";
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";
5
- import { a as looksLikeXml, c as readDocumentHeaders, d as throwIfHeaderError, f as throwIfHttpError, h as unexpectedResponse, m as throwIfXmlFailure, n as parseReceiptResponse, o as parseDoneText, p as throwIfTextError, r as createAgentResponse, s as parseResponseXml, u as throwIfAnyError } from "./parse-Cr7yQ3_z.js";
6
- import { i as sessionKeyFor, n as memoryCookieStore, r as mergeSetCookies, t as SESSION_TTL_SECONDS } from "./session-SaEEXu2N.js";
7
- import { t as emitWarning } from "./warnings-DwTl5J-2.js";
8
- import { l as createInvoiceOnce, m as guardOnce, n as issueForPayment, o as convertReceiptToInvoice } from "./issue-DMA1Nbr1.js";
9
- import { r as formatVatRate } from "./vat-v_dcWCto.js";
10
- import { a as summarizeItems } from "./money-Cw457SD6.js";
11
- import { a as optionalText, c as requireText, i as optionalAgentDate$1, l as resolveInvoiceReference, o as parseInvoiceResult, s as referenceValue, t as AGENT_XSD_BASE_URL, u as validationError } from "./reference-B5TATqb5.js";
12
- import { t as getInvoice } from "./get-CZEShCcj.js";
13
- import { a as optionalText$1, c as validateTemplate$1, i as RECEIPT_XSD_BASE_URL, o as receiptValidationError, r as createReceipt, s as requireReceiptNumber } from "./create-CflXrPip.js";
14
- //#region src/core/attempt-ledger.ts
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-B6cAXyET.js";
2
+ import { i as createAgentError, o as isSzamlazzError, r as SzamlazzError, s as parseErrorCode } from "./errors-CGGsW0Y5.js";
3
+ import { t as base64ToBytes } from "./binary-DuKBSfH-.js";
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-CjymGkJj.js";
5
+ import { a as looksLikeXml, c as readDocumentHeaders, d as throwIfHeaderError, f as throwIfHttpError, h as unexpectedResponse, m as throwIfXmlFailure, n as parseReceiptResponse, o as parseDoneText, p as throwIfTextError, r as createAgentResponse, s as parseResponseXml, u as throwIfAnyError } from "./parse-1RiSh4vY.js";
6
+ import { i as sessionKeyFor, n as memoryCookieStore, r as mergeSetCookies, t as SESSION_TTL_SECONDS } from "./session-DZeE1ryt.js";
7
+ import { t as emitWarning } from "./warnings-DJ0QvZOp.js";
8
+ import { l as createInvoiceOnce, m as guardOnce, n as issueForPayment, o as convertReceiptToInvoice } from "./issue-Dy9zvRK1.js";
9
+ import { r as formatVatRate } from "./vat-B4J5Q0tu.js";
10
+ import { a as summarizeItems } from "./money-f280VT77.js";
11
+ import { a as optionalText, c as requireText, i as optionalAgentDate$1, l as resolveInvoiceReference, o as parseInvoiceResult, s as referenceValue, t as AGENT_XSD_BASE_URL, u as validationError } from "./reference-Cxz0m2zF.js";
12
+ import { t as getInvoice } from "./get-HrHwVkVt.js";
13
+ import { a as optionalText$1, c as validateTemplate$1, i as RECEIPT_XSD_BASE_URL, o as receiptValidationError, r as createReceipt, s as requireReceiptNumber } from "./create-BwRslos0.js";
14
+ // src/core/attempt-ledger.ts
15
15
  const ATTEMPT_LEDGER_TTL_SECONDS = 86400;
16
16
  const ATTEMPT_LEDGER_KEY_PREFIX = "szamlazz:attempts:";
17
17
  const COUNTED_CATEGORIES = /* @__PURE__ */ new Set([
@@ -431,8 +431,7 @@ function createAgentContext(options = {}) {
431
431
  resetAttempts
432
432
  };
433
433
  }
434
- //#endregion
435
- //#region src/invoices/create-response.ts
434
+ // src/invoices/create-response.ts
436
435
  function readRawResponse(response) {
437
436
  throwIfAnyError(response);
438
437
  const headers = readDocumentHeaders(response.headers);
@@ -501,8 +500,7 @@ function parseInvoicePreviewResponse(response, items = []) {
501
500
  items
502
501
  };
503
502
  }
504
- //#endregion
505
- //#region src/invoices/create-xml.ts
503
+ // src/invoices/create-xml.ts
506
504
  const INVOICE_XML_NAMESPACE = "http://www.szamlazz.hu/xmlszamla";
507
505
  const INVOICE_XML_SCHEMA_LOCATION = "https://www.szamlazz.hu/szamla/docs/xsds/agent/xmlszamla.xsd";
508
506
  const RESPONSE_VERSION_XML = 2;
@@ -687,8 +685,7 @@ function renderInvoiceXml(credentials, invoice, options = {}) {
687
685
  function buildCreateInvoiceXml(credentials, defaults, input, now = /* @__PURE__ */ new Date()) {
688
686
  return renderInvoiceXml(credentials, resolveInvoice(defaults, input, now));
689
687
  }
690
- //#endregion
691
- //#region src/invoices/create.ts
688
+ // src/invoices/create.ts
692
689
  function buildRequest(ctx, invoice, preview, options) {
693
690
  const xml = renderInvoiceXml(ctx.credentials, invoice, { preview });
694
691
  const attachments = preview ? [] : invoice.attachments;
@@ -712,8 +709,7 @@ async function previewInvoice(ctx, defaults, input, options = {}) {
712
709
  const items = itemsOf(invoice);
713
710
  return ctx.execute(buildRequest(ctx, invoice, true, options), (response) => parseInvoicePreviewResponse(response, items));
714
711
  }
715
- //#endregion
716
- //#region src/invoices/pdf.ts
712
+ // src/invoices/pdf.ts
717
713
  function buildInvoicePdfXml(credentials, reference) {
718
714
  const resolved = resolveInvoiceReference(reference);
719
715
  return buildXmlDocument({
@@ -867,8 +863,7 @@ async function reverseInvoice(ctx, input, options = {}) {
867
863
  signal: options.signal
868
864
  }, (response) => parseReverseInvoiceResponse(response, invoiceNumber));
869
865
  }
870
- //#endregion
871
- //#region src/receipts/get.ts
866
+ // src/receipts/get.ts
872
867
  const GET_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtaget";
873
868
  function normalizeInput$1(input) {
874
869
  return typeof input === "string" ? { receiptNumber: input } : input;
@@ -907,8 +902,7 @@ function getReceipt(ctx, input, options = {}) {
907
902
  safeToRetry: true
908
903
  }, parseReceiptResponse);
909
904
  }
910
- //#endregion
911
- //#region src/receipts/reverse.ts
905
+ // src/receipts/reverse.ts
912
906
  const REVERSE_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtast";
913
907
  function normalizeInput(input) {
914
908
  return typeof input === "string" ? { receiptNumber: input } : input;
@@ -936,8 +930,7 @@ function reverseReceipt(ctx, input, options = {}) {
936
930
  safeToRetry: optionalText$1(normalized.callId) !== void 0
937
931
  }, parseReceiptResponse);
938
932
  }
939
- //#endregion
940
- //#region src/receipts/send.ts
933
+ // src/receipts/send.ts
941
934
  const SEND_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtasend";
942
935
  const EMAIL_PATTERN = /^[^\s@,;<>]+@[^\s@,;<>]+\.[^\s@,;<>]+$/;
943
936
  function isValidEmail(value) {
@@ -996,8 +989,7 @@ function sendReceipt(ctx, input, options = {}) {
996
989
  signal: options.signal
997
990
  }, parseSendReceiptResponse);
998
991
  }
999
- //#endregion
1000
- //#region src/taxpayer/address.ts
992
+ // src/taxpayer/address.ts
1001
993
  const ROMAN_NUMERAL = /^[IVX]{1,5}\.?$/;
1002
994
  function isShouting(value) {
1003
995
  return value === value.toUpperCase() && value !== value.toLowerCase();
@@ -1075,8 +1067,7 @@ function parseTaxpayerAddress(item) {
1075
1067
  raw
1076
1068
  };
1077
1069
  }
1078
- //#endregion
1079
- //#region src/taxpayer/query-taxpayer.ts
1070
+ // src/taxpayer/query-taxpayer.ts
1080
1071
  const TAXPAYER_NAMESPACE = "http://www.szamlazz.hu/xmltaxpayer";
1081
1072
  const TAXPAYER_SCHEMA_LOCATION = "http://www.szamlazz.hu/docs/xsds/agent/xmltaxpayer.xsd";
1082
1073
  function toTaxpayerId(taxNumber) {
@@ -1169,8 +1160,7 @@ async function queryTaxpayer(ctx, taxNumber, options = {}) {
1169
1160
  safeToRetry: true
1170
1161
  }, parseQueryTaxpayerResponse);
1171
1162
  }
1172
- //#endregion
1173
- //#region src/taxpayer/cache.ts
1163
+ // src/taxpayer/cache.ts
1174
1164
  const TAXPAYER_CACHE_KEY_PREFIX = "szamlazz:taxpayer:";
1175
1165
  const DEFAULT_TAXPAYER_TTL_SECONDS = 86400;
1176
1166
  const DEFAULT_TAXPAYER_INVALID_TTL_SECONDS = 600;
@@ -1217,8 +1207,7 @@ function cachedTaxpayerQuery(query, options, warn) {
1217
1207
  return info;
1218
1208
  };
1219
1209
  }
1220
- //#endregion
1221
- //#region src/client.ts
1210
+ // src/client.ts
1222
1211
  const CREDENTIAL_PROBE_INVOICE_NUMBER = "KASSZA-CREDENTIAL-PROBE-0";
1223
1212
  async function nullIfNotFound(promise) {
1224
1213
  try {
@@ -1384,5 +1373,4 @@ function createKassza(options = {}) {
1384
1373
  }, payment, issueOptions)
1385
1374
  };
1386
1375
  }
1387
- //#endregion
1388
1376
  export { queryTaxpayer as a, createAgentContext as c, attemptLedgerKey as d, TAXPAYER_CACHE_KEY_PREFIX as i, ATTEMPT_LEDGER_KEY_PREFIX as l, DEFAULT_TAXPAYER_INVALID_TTL_SECONDS as n, getInvoicePdf as o, DEFAULT_TAXPAYER_TTL_SECONDS as r, buildCreateInvoiceXml as s, createKassza as t, ATTEMPT_LEDGER_TTL_SECONDS as u };
@@ -1,10 +1,9 @@
1
- import { t as DateInput } from "./dates-9zvESP0i.js";
2
- import { a as AgentAction, r as WarningHook, t as KasszaWarning } from "./warnings-B3DXnveC.js";
3
- import { n as KeyValueStore } from "./store-C1rHd9DB.js";
4
- import { d as ItemAmounts, f as ItemPriceInput } from "./index-C-7yWV7L.js";
5
- import { r as Receipt } from "./types-D1zDOH_F.js";
6
- import { t as CookieStore } from "./session-Ckl5eJhV.js";
7
- //#region src/core/errors.d.ts
1
+ import { t as DateInput } from "./dates-nlGEokCf.js";
2
+ import { a as AgentAction, r as WarningHook, t as KasszaWarning } from "./warnings-DpuYhn39.js";
3
+ import { n as KeyValueStore } from "./store-BkaZ8qkU.js";
4
+ import { d as ItemAmounts, f as ItemPriceInput } from "./index-CinpAhQM.js";
5
+ import { r as Receipt } from "./types-Z6rQoqHn.js";
6
+ import { t as CookieStore } from "./session-mKtpAeUB.js";
8
7
  type SzamlazzErrorCategory = "auth" | "account" | "validation" | "duplicate" | "partial_success" | "not_found" | "maintenance" | "rate_limit" | "attempt_limit" | "in_progress" | "store_unavailable" | "network" | "timeout" | "configuration" | "unexpected_response" | "unknown";
9
8
  interface AgentErrorCodeInfo {
10
9
  readonly message: string;
@@ -41,8 +40,6 @@ declare class SzamlazzError extends Error {
41
40
  }
42
41
  declare function isSzamlazzError(error: unknown): error is SzamlazzError;
43
42
  declare function suggestedPrefix(error: unknown): string | undefined;
44
- //#endregion
45
- //#region src/core/attempt-ledger.d.ts
46
43
  declare const ATTEMPT_LEDGER_TTL_SECONDS = 86400;
47
44
  declare const ATTEMPT_LEDGER_KEY_PREFIX = "szamlazz:attempts:";
48
45
  interface AttemptLedgerRequest {
@@ -55,8 +52,6 @@ interface AttemptLedgerRequest {
55
52
  }
56
53
  declare function attemptLedgerKey(request: AttemptLedgerRequest): Promise<string>;
57
54
  type AttemptLedgerMode = "fail-open" | "fail-closed";
58
- //#endregion
59
- //#region src/invoices/create-types.d.ts
60
55
  type InvoiceType = "invoice" | "proforma" | "advance" | "final" | "corrective" | "deliveryNote";
61
56
  declare const INVOICE_LANGUAGES: readonly ["hu", "en", "de", "it", "ro", "sk", "hr", "fr", "es", "cz", "pl", "bg", "nl", "ru", "si"];
62
57
  type InvoiceLanguage = (typeof INVOICE_LANGUAGES)[number];
@@ -243,8 +238,6 @@ interface InvoicePreview {
243
238
  readonly grossTotal: number;
244
239
  readonly items: readonly CreatedInvoiceItem[];
245
240
  }
246
- //#endregion
247
- //#region src/core/response.d.ts
248
241
  interface AgentResponse {
249
242
  readonly action: AgentAction;
250
243
  readonly status: number;
@@ -253,8 +246,6 @@ interface AgentResponse {
253
246
  readonly isPdf: boolean;
254
247
  text(): string;
255
248
  }
256
- //#endregion
257
- //#region src/core/xml/serialize.d.ts
258
249
  type XmlScalar = string | number | boolean;
259
250
  type XmlContent = XmlScalar | null | undefined | readonly XmlChild[];
260
251
  type XmlChild = XmlNode | false | null | undefined;
@@ -264,8 +255,6 @@ interface XmlNode {
264
255
  readonly content: XmlContent;
265
256
  readonly attributes?: XmlAttributes | undefined;
266
257
  }
267
- //#endregion
268
- //#region src/invoices/payment.d.ts
269
258
  interface PaymentEntry {
270
259
  readonly date?: DateInput | undefined;
271
260
  readonly method: string;
@@ -296,8 +285,6 @@ interface RegisteredPayment {
296
285
  readonly outstanding?: number | undefined;
297
286
  readonly buyerAccountUrl?: string | undefined;
298
287
  }
299
- //#endregion
300
- //#region src/invoices/reverse.d.ts
301
288
  interface ReverseInvoiceEmail {
302
289
  readonly replyTo?: string | undefined;
303
290
  readonly subject?: string | undefined;
@@ -329,8 +316,6 @@ interface ReversedInvoice {
329
316
  readonly buyerAccountUrl?: string | undefined;
330
317
  readonly pdf?: Uint8Array | undefined;
331
318
  }
332
- //#endregion
333
- //#region src/core/document-events.d.ts
334
319
  interface InvoiceCreatedEvent {
335
320
  readonly kind: "invoice";
336
321
  readonly action: "created";
@@ -376,8 +361,6 @@ declare class DocumentHookError extends Error {
376
361
  get document(): DocumentEvent["document"];
377
362
  }
378
363
  declare function isDocumentHookError(error: unknown): error is DocumentHookError;
379
- //#endregion
380
- //#region src/core/context.d.ts
381
364
  interface AgentAttachment {
382
365
  readonly filename: string;
383
366
  readonly content: Uint8Array | ArrayBuffer | Blob | string;
@@ -445,5 +428,4 @@ interface AgentContext {
445
428
  resetSession(): Promise<void>;
446
429
  resetAttempts(key: string): Promise<void>;
447
430
  }
448
- //#endregion
449
431
  export { Waybill as $, CorrectiveInvoiceInput as A, InvoiceLanguage as B, ClearPaymentsInput as C, XmlNode as D, RegisteredPayment as E, Currency as F, InvoiceType as G, InvoicePreview as H, FinalInvoiceInput as I, PickPackPointWaybill as J, ItemLedger as K, InvoiceBuyer as L, CreateInvoiceInput as M, CreatedInvoice as N, AgentResponse as O, CreatedInvoiceItem as P, TransOFlexWaybill as Q, InvoiceDefaults as R, ReversedInvoice as S, RegisterPaymentInput as T, InvoiceSeller as U, InvoicePostalAddress as V, InvoiceTemplate as W, StandardInvoiceInput as X, SprinterWaybill as Y, TaxpayerType as Z, InvoiceReversedEvent as _, AgentRequestEvent as a, AgentErrorCodeInfo as at, isDocumentHookError as b, SzamlazzHooks as c, SzamlazzErrorCategory as ct, DocumentErrorMode as d, suggestedPrefix as dt, ATTEMPT_LEDGER_KEY_PREFIX as et, DocumentEvent as f, InvoicePaymentEvent as g, InvoiceCreatedEvent as h, AgentErrorEvent as i, AGENT_ERROR_CODES as it, CourierService as j, BuyerLedger as k, SzamlazzOptions as l, errorCodeDocsUrl as lt, DocumentHookError as m, AgentCompleteEvent as n, AttemptLedgerMode as nt, AgentResponseEvent as o, KASSZA_ERROR_DOCS_URL as ot, DocumentHook as p, MplWaybill as q, AgentContext as r, attemptLedgerKey as rt, RequestOptions as s, SzamlazzError as st, AgentAttachment as t, ATTEMPT_LEDGER_TTL_SECONDS as tt, DocumentErrorHandler as u, isSzamlazzError as ut, ReceiptCreatedEvent as v, PaymentEntry as w, ReverseInvoiceInput as x, ReceiptReversedEvent as y, InvoiceItemInput as z };
@@ -1,10 +1,9 @@
1
- import { t as DateInput } from "./dates-9zvESP0i.cjs";
2
- import { a as AgentAction, r as WarningHook, t as KasszaWarning } from "./warnings-B3DXnveC.cjs";
3
- import { n as KeyValueStore } from "./store-C1rHd9DB.cjs";
4
- import { d as ItemAmounts, f as ItemPriceInput } from "./index-C-7yWV7L.cjs";
5
- import { r as Receipt } from "./types-lnKkQdot.cjs";
6
- import { t as CookieStore } from "./session-YbChChx7.cjs";
7
- //#region src/core/errors.d.ts
1
+ import { t as DateInput } from "./dates-nlGEokCf.cjs";
2
+ import { a as AgentAction, r as WarningHook, t as KasszaWarning } from "./warnings-DpuYhn39.cjs";
3
+ import { n as KeyValueStore } from "./store-BkaZ8qkU.cjs";
4
+ import { d as ItemAmounts, f as ItemPriceInput } from "./index-CinpAhQM.cjs";
5
+ import { r as Receipt } from "./types-_HKTOCuQ.cjs";
6
+ import { t as CookieStore } from "./session-BBbSXlx3.cjs";
8
7
  type SzamlazzErrorCategory = "auth" | "account" | "validation" | "duplicate" | "partial_success" | "not_found" | "maintenance" | "rate_limit" | "attempt_limit" | "in_progress" | "store_unavailable" | "network" | "timeout" | "configuration" | "unexpected_response" | "unknown";
9
8
  interface AgentErrorCodeInfo {
10
9
  readonly message: string;
@@ -41,8 +40,6 @@ declare class SzamlazzError extends Error {
41
40
  }
42
41
  declare function isSzamlazzError(error: unknown): error is SzamlazzError;
43
42
  declare function suggestedPrefix(error: unknown): string | undefined;
44
- //#endregion
45
- //#region src/core/attempt-ledger.d.ts
46
43
  declare const ATTEMPT_LEDGER_TTL_SECONDS = 86400;
47
44
  declare const ATTEMPT_LEDGER_KEY_PREFIX = "szamlazz:attempts:";
48
45
  interface AttemptLedgerRequest {
@@ -55,8 +52,6 @@ interface AttemptLedgerRequest {
55
52
  }
56
53
  declare function attemptLedgerKey(request: AttemptLedgerRequest): Promise<string>;
57
54
  type AttemptLedgerMode = "fail-open" | "fail-closed";
58
- //#endregion
59
- //#region src/invoices/create-types.d.ts
60
55
  type InvoiceType = "invoice" | "proforma" | "advance" | "final" | "corrective" | "deliveryNote";
61
56
  declare const INVOICE_LANGUAGES: readonly ["hu", "en", "de", "it", "ro", "sk", "hr", "fr", "es", "cz", "pl", "bg", "nl", "ru", "si"];
62
57
  type InvoiceLanguage = (typeof INVOICE_LANGUAGES)[number];
@@ -243,8 +238,6 @@ interface InvoicePreview {
243
238
  readonly grossTotal: number;
244
239
  readonly items: readonly CreatedInvoiceItem[];
245
240
  }
246
- //#endregion
247
- //#region src/core/response.d.ts
248
241
  interface AgentResponse {
249
242
  readonly action: AgentAction;
250
243
  readonly status: number;
@@ -253,8 +246,6 @@ interface AgentResponse {
253
246
  readonly isPdf: boolean;
254
247
  text(): string;
255
248
  }
256
- //#endregion
257
- //#region src/core/xml/serialize.d.ts
258
249
  type XmlScalar = string | number | boolean;
259
250
  type XmlContent = XmlScalar | null | undefined | readonly XmlChild[];
260
251
  type XmlChild = XmlNode | false | null | undefined;
@@ -264,8 +255,6 @@ interface XmlNode {
264
255
  readonly content: XmlContent;
265
256
  readonly attributes?: XmlAttributes | undefined;
266
257
  }
267
- //#endregion
268
- //#region src/invoices/payment.d.ts
269
258
  interface PaymentEntry {
270
259
  readonly date?: DateInput | undefined;
271
260
  readonly method: string;
@@ -296,8 +285,6 @@ interface RegisteredPayment {
296
285
  readonly outstanding?: number | undefined;
297
286
  readonly buyerAccountUrl?: string | undefined;
298
287
  }
299
- //#endregion
300
- //#region src/invoices/reverse.d.ts
301
288
  interface ReverseInvoiceEmail {
302
289
  readonly replyTo?: string | undefined;
303
290
  readonly subject?: string | undefined;
@@ -329,8 +316,6 @@ interface ReversedInvoice {
329
316
  readonly buyerAccountUrl?: string | undefined;
330
317
  readonly pdf?: Uint8Array | undefined;
331
318
  }
332
- //#endregion
333
- //#region src/core/document-events.d.ts
334
319
  interface InvoiceCreatedEvent {
335
320
  readonly kind: "invoice";
336
321
  readonly action: "created";
@@ -376,8 +361,6 @@ declare class DocumentHookError extends Error {
376
361
  get document(): DocumentEvent["document"];
377
362
  }
378
363
  declare function isDocumentHookError(error: unknown): error is DocumentHookError;
379
- //#endregion
380
- //#region src/core/context.d.ts
381
364
  interface AgentAttachment {
382
365
  readonly filename: string;
383
366
  readonly content: Uint8Array | ArrayBuffer | Blob | string;
@@ -445,5 +428,4 @@ interface AgentContext {
445
428
  resetSession(): Promise<void>;
446
429
  resetAttempts(key: string): Promise<void>;
447
430
  }
448
- //#endregion
449
431
  export { Waybill as $, CorrectiveInvoiceInput as A, InvoiceLanguage as B, ClearPaymentsInput as C, XmlNode as D, RegisteredPayment as E, Currency as F, InvoiceType as G, InvoicePreview as H, FinalInvoiceInput as I, PickPackPointWaybill as J, ItemLedger as K, InvoiceBuyer as L, CreateInvoiceInput as M, CreatedInvoice as N, AgentResponse as O, CreatedInvoiceItem as P, TransOFlexWaybill as Q, InvoiceDefaults as R, ReversedInvoice as S, RegisterPaymentInput as T, InvoiceSeller as U, InvoicePostalAddress as V, InvoiceTemplate as W, StandardInvoiceInput as X, SprinterWaybill as Y, TaxpayerType as Z, InvoiceReversedEvent as _, AgentRequestEvent as a, AgentErrorCodeInfo as at, isDocumentHookError as b, SzamlazzHooks as c, SzamlazzErrorCategory as ct, DocumentErrorMode as d, suggestedPrefix as dt, ATTEMPT_LEDGER_KEY_PREFIX as et, DocumentEvent as f, InvoicePaymentEvent as g, InvoiceCreatedEvent as h, AgentErrorEvent as i, AGENT_ERROR_CODES as it, CourierService as j, BuyerLedger as k, SzamlazzOptions as l, errorCodeDocsUrl as lt, DocumentHookError as m, AgentCompleteEvent as n, AttemptLedgerMode as nt, AgentResponseEvent as o, KASSZA_ERROR_DOCS_URL as ot, DocumentHook as p, MplWaybill as q, AgentContext as r, attemptLedgerKey as rt, RequestOptions as s, SzamlazzError as st, AgentAttachment as t, ATTEMPT_LEDGER_TTL_SECONDS as tt, DocumentErrorHandler as u, isSzamlazzError as ut, ReceiptCreatedEvent as v, PaymentEntry as w, ReverseInvoiceInput as x, ReceiptReversedEvent as y, InvoiceItemInput as z };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_session = require("../session-DeM5vjvC.cjs");
3
- const require_stores = require("../stores-BNrS0dWl.cjs");
2
+ const require_session = require("../session-BYotpR_s.cjs");
3
+ const require_stores = require("../stores-CH4rYKs_.cjs");
4
4
  exports.CLOUDFLARE_KV_MIN_TTL_SECONDS = require_stores.CLOUDFLARE_KV_MIN_TTL_SECONDS;
5
5
  exports.DURABLE_OBJECT_STORE_URL = require_stores.DURABLE_OBJECT_STORE_URL;
6
6
  exports.SESSION_TTL_SECONDS = require_session.SESSION_TTL_SECONDS;
@@ -1,4 +1,4 @@
1
- import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "../store-C1rHd9DB.cjs";
2
- import { n as SESSION_TTL_SECONDS, r as memoryCookieStore, t as CookieStore } from "../session-YbChChx7.cjs";
3
- import { C as CookieStoreErrorEvent, E as resilientCookieStore, S as CookieStoreAdapterOptions, T as ResilientCookieStoreOptions, _ as ioredisCookieStore, a as DurableObjectStubLike, b as CloudflareKvNamespaceLike, c as DiagnoseStoreOptions, d as diagnoseStore, f as UpstashRedisLike, g as IoRedisLike, h as nodeRedisCookieStore, i as DurableObjectStoreOperation, l as StoreDiagnosis, m as NodeRedisLike, n as DurableObjectStorageLike, o as durableObjectStore, p as upstashRedisCookieStore, r as DurableObjectStoreEntry, s as handleDurableObjectStoreRequest, t as DURABLE_OBJECT_STORE_URL, u as StoreSuitability, v as customCookieStore, w as CookieStoreOperation, x as cloudflareKvCookieStore, y as CLOUDFLARE_KV_MIN_TTL_SECONDS } from "../index-BhUPY_EH.cjs";
1
+ import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "../store-BkaZ8qkU.cjs";
2
+ import { n as SESSION_TTL_SECONDS, r as memoryCookieStore, t as CookieStore } from "../session-BBbSXlx3.cjs";
3
+ import { C as CookieStoreErrorEvent, E as resilientCookieStore, S as CookieStoreAdapterOptions, T as ResilientCookieStoreOptions, _ as ioredisCookieStore, a as DurableObjectStubLike, b as CloudflareKvNamespaceLike, c as DiagnoseStoreOptions, d as diagnoseStore, f as UpstashRedisLike, g as IoRedisLike, h as nodeRedisCookieStore, i as DurableObjectStoreOperation, l as StoreDiagnosis, m as NodeRedisLike, n as DurableObjectStorageLike, o as durableObjectStore, p as upstashRedisCookieStore, r as DurableObjectStoreEntry, s as handleDurableObjectStoreRequest, t as DURABLE_OBJECT_STORE_URL, u as StoreSuitability, v as customCookieStore, w as CookieStoreOperation, x as cloudflareKvCookieStore, y as CLOUDFLARE_KV_MIN_TTL_SECONDS } from "../index-qk62lWr3.cjs";
4
4
  export { type Awaitable, CLOUDFLARE_KV_MIN_TTL_SECONDS, type CloudflareKvNamespaceLike, type CookieStore, type CookieStoreAdapterOptions, type CookieStoreErrorEvent, type CookieStoreOperation, DURABLE_OBJECT_STORE_URL, type DiagnoseStoreOptions, type DurableObjectStorageLike, type DurableObjectStoreEntry, type DurableObjectStoreOperation, type DurableObjectStubLike, type IoRedisLike, type KeyValueStore, type NodeRedisLike, type ResilientCookieStoreOptions, SESSION_TTL_SECONDS, type StoreCapabilities, type StoreDiagnosis, type StoreSuitability, type UpstashRedisLike, cloudflareKvCookieStore, cloudflareKvCookieStore as cloudflareKvStore, customCookieStore, customCookieStore as customStore, diagnoseStore, durableObjectStore, handleDurableObjectStoreRequest, ioredisCookieStore, ioredisCookieStore as ioredisStore, memoryCookieStore, memoryStore, nodeRedisCookieStore, nodeRedisCookieStore as nodeRedisStore, resilientCookieStore, resilientCookieStore as resilientStore, storeCapabilities, upstashRedisCookieStore, upstashRedisCookieStore as upstashRedisStore };
@@ -1,4 +1,4 @@
1
- import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "../store-C1rHd9DB.js";
2
- import { n as SESSION_TTL_SECONDS, r as memoryCookieStore, t as CookieStore } from "../session-Ckl5eJhV.js";
3
- import { C as CookieStoreErrorEvent, E as resilientCookieStore, S as CookieStoreAdapterOptions, T as ResilientCookieStoreOptions, _ as ioredisCookieStore, a as DurableObjectStubLike, b as CloudflareKvNamespaceLike, c as DiagnoseStoreOptions, d as diagnoseStore, f as UpstashRedisLike, g as IoRedisLike, h as nodeRedisCookieStore, i as DurableObjectStoreOperation, l as StoreDiagnosis, m as NodeRedisLike, n as DurableObjectStorageLike, o as durableObjectStore, p as upstashRedisCookieStore, r as DurableObjectStoreEntry, s as handleDurableObjectStoreRequest, t as DURABLE_OBJECT_STORE_URL, u as StoreSuitability, v as customCookieStore, w as CookieStoreOperation, x as cloudflareKvCookieStore, y as CLOUDFLARE_KV_MIN_TTL_SECONDS } from "../index-BqGgQ4t3.js";
1
+ import { a as storeCapabilities, i as memoryStore, n as KeyValueStore, r as StoreCapabilities, t as Awaitable } from "../store-BkaZ8qkU.js";
2
+ import { n as SESSION_TTL_SECONDS, r as memoryCookieStore, t as CookieStore } from "../session-mKtpAeUB.js";
3
+ import { C as CookieStoreErrorEvent, E as resilientCookieStore, S as CookieStoreAdapterOptions, T as ResilientCookieStoreOptions, _ as ioredisCookieStore, a as DurableObjectStubLike, b as CloudflareKvNamespaceLike, c as DiagnoseStoreOptions, d as diagnoseStore, f as UpstashRedisLike, g as IoRedisLike, h as nodeRedisCookieStore, i as DurableObjectStoreOperation, l as StoreDiagnosis, m as NodeRedisLike, n as DurableObjectStorageLike, o as durableObjectStore, p as upstashRedisCookieStore, r as DurableObjectStoreEntry, s as handleDurableObjectStoreRequest, t as DURABLE_OBJECT_STORE_URL, u as StoreSuitability, v as customCookieStore, w as CookieStoreOperation, x as cloudflareKvCookieStore, y as CLOUDFLARE_KV_MIN_TTL_SECONDS } from "../index-DqoDUw6X.js";
4
4
  export { type Awaitable, CLOUDFLARE_KV_MIN_TTL_SECONDS, type CloudflareKvNamespaceLike, type CookieStore, type CookieStoreAdapterOptions, type CookieStoreErrorEvent, type CookieStoreOperation, DURABLE_OBJECT_STORE_URL, type DiagnoseStoreOptions, type DurableObjectStorageLike, type DurableObjectStoreEntry, type DurableObjectStoreOperation, type DurableObjectStubLike, type IoRedisLike, type KeyValueStore, type NodeRedisLike, type ResilientCookieStoreOptions, SESSION_TTL_SECONDS, type StoreCapabilities, type StoreDiagnosis, type StoreSuitability, type UpstashRedisLike, cloudflareKvCookieStore, cloudflareKvCookieStore as cloudflareKvStore, customCookieStore, customCookieStore as customStore, diagnoseStore, durableObjectStore, handleDurableObjectStoreRequest, ioredisCookieStore, ioredisCookieStore as ioredisStore, memoryCookieStore, memoryStore, nodeRedisCookieStore, nodeRedisCookieStore as nodeRedisStore, resilientCookieStore, resilientCookieStore as resilientStore, storeCapabilities, upstashRedisCookieStore, upstashRedisCookieStore as upstashRedisStore };
@@ -1,3 +1,3 @@
1
- import { a as memoryStore, n as memoryCookieStore, o as storeCapabilities, t as SESSION_TTL_SECONDS } from "../session-SaEEXu2N.js";
2
- import { a as upstashRedisCookieStore, c as customCookieStore, d as resilientCookieStore, i as diagnoseStore, l as CLOUDFLARE_KV_MIN_TTL_SECONDS, n as durableObjectStore, o as nodeRedisCookieStore, r as handleDurableObjectStoreRequest, s as ioredisCookieStore, t as DURABLE_OBJECT_STORE_URL, u as cloudflareKvCookieStore } from "../stores-DhjGBrl_.js";
1
+ import { a as memoryStore, n as memoryCookieStore, o as storeCapabilities, t as SESSION_TTL_SECONDS } from "../session-DZeE1ryt.js";
2
+ import { a as upstashRedisCookieStore, c as customCookieStore, d as resilientCookieStore, i as diagnoseStore, l as CLOUDFLARE_KV_MIN_TTL_SECONDS, n as durableObjectStore, o as nodeRedisCookieStore, r as handleDurableObjectStoreRequest, s as ioredisCookieStore, t as DURABLE_OBJECT_STORE_URL, u as cloudflareKvCookieStore } from "../stores-BUnPNJQl.js";
3
3
  export { CLOUDFLARE_KV_MIN_TTL_SECONDS, DURABLE_OBJECT_STORE_URL, SESSION_TTL_SECONDS, cloudflareKvCookieStore, cloudflareKvCookieStore as cloudflareKvStore, customCookieStore, customCookieStore as customStore, diagnoseStore, durableObjectStore, handleDurableObjectStoreRequest, ioredisCookieStore, ioredisCookieStore as ioredisStore, memoryCookieStore, memoryStore, nodeRedisCookieStore, nodeRedisCookieStore as nodeRedisStore, resilientCookieStore, resilientCookieStore as resilientStore, storeCapabilities, upstashRedisCookieStore, upstashRedisCookieStore as upstashRedisStore };
@@ -1,10 +1,10 @@
1
- import { r as SzamlazzError } from "./errors-DtN4g5Z9.js";
2
- import { a as optionalEl, n as buildXmlDocument, r as el } from "./serialize-B2eFh3D-.js";
3
- import { n as parseReceiptResponse } from "./parse-Cr7yQ3_z.js";
4
- import { n as decimalPlaces, r as roundMoney } from "./rounding-BLyHjjI5.js";
5
- import { i as isHuf, o as vatPercentage } from "./vat-v_dcWCto.js";
6
- import { i as calculateReceiptItem } from "./money-Cw457SD6.js";
7
- //#region src/receipts/types.ts
1
+ import { r as SzamlazzError } from "./errors-CGGsW0Y5.js";
2
+ import { a as optionalEl, n as buildXmlDocument, r as el } from "./serialize-CjymGkJj.js";
3
+ import { n as parseReceiptResponse } from "./parse-1RiSh4vY.js";
4
+ import { n as decimalPlaces, r as roundMoney } from "./rounding-CZLj4DbV.js";
5
+ import { i as isHuf, o as vatPercentage } from "./vat-B4J5Q0tu.js";
6
+ import { i as calculateReceiptItem } from "./money-f280VT77.js";
7
+ // src/receipts/types.ts
8
8
  const RECEIPT_ONLY_VAT_CODES = [
9
9
  "ÁKK",
10
10
  "MAA",
@@ -17,8 +17,7 @@ const RECEIPT_PDF_TEMPLATES = [
17
17
  "J",
18
18
  "L"
19
19
  ];
20
- //#endregion
21
- //#region src/receipts/common.ts
20
+ // src/receipts/common.ts
22
21
  const RECEIPT_XSD_BASE_URL = "https://www.szamlazz.hu/szamla/docs/xsds/";
23
22
  function receiptValidationError(message) {
24
23
  return new SzamlazzError(message, { category: "validation" });
@@ -41,8 +40,7 @@ function validateTemplate(template) {
41
40
  function requireReceiptNumber(value) {
42
41
  return requireText(value, "Add meg a nyugtaszámot (receiptNumber).");
43
42
  }
44
- //#endregion
45
- //#region src/receipts/create.ts
43
+ // src/receipts/create.ts
46
44
  const CREATE_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtacreate";
47
45
  const DEFAULT_CURRENCY = "HUF";
48
46
  const DEFAULT_UNIT = "db";
@@ -200,5 +198,4 @@ async function createReceipt(ctx, defaults, input, options = {}) {
200
198
  throw enrichDuplicateError(error, input);
201
199
  }
202
200
  }
203
- //#endregion
204
201
  export { optionalText as a, validateTemplate as c, RECEIPT_XSD_BASE_URL as i, RECEIPT_ONLY_VAT_CODES as l, calculateReceiptItems as n, receiptValidationError as o, createReceipt as r, requireReceiptNumber as s, buildCreateReceiptXml as t };
@@ -1,10 +1,10 @@
1
- const require_errors = require("./errors-EE96_6D_.cjs");
2
- const require_serialize = require("./serialize-CquIsxA-.cjs");
3
- const require_parse = require("./parse-DOA2XQ3e.cjs");
4
- const require_rounding = require("./rounding-TxoWy2ww.cjs");
5
- const require_vat = require("./vat-g35srbNG.cjs");
6
- const require_money = require("./money-K9j0wPit.cjs");
7
- //#region src/receipts/types.ts
1
+ const require_errors = require("./errors-Bn6pe6yw.cjs");
2
+ const require_serialize = require("./serialize-DEU7r6Bk.cjs");
3
+ const require_parse = require("./parse-CmM5va-p.cjs");
4
+ const require_rounding = require("./rounding-CHmSK5Z2.cjs");
5
+ const require_vat = require("./vat-BkoiiKm4.cjs");
6
+ const require_money = require("./money-NtVytaxG.cjs");
7
+ // src/receipts/types.ts
8
8
  const RECEIPT_ONLY_VAT_CODES = [
9
9
  "ÁKK",
10
10
  "MAA",
@@ -17,8 +17,7 @@ const RECEIPT_PDF_TEMPLATES = [
17
17
  "J",
18
18
  "L"
19
19
  ];
20
- //#endregion
21
- //#region src/receipts/common.ts
20
+ // src/receipts/common.ts
22
21
  const RECEIPT_XSD_BASE_URL = "https://www.szamlazz.hu/szamla/docs/xsds/";
23
22
  function receiptValidationError(message) {
24
23
  return new require_errors.SzamlazzError(message, { category: "validation" });
@@ -41,8 +40,7 @@ function validateTemplate(template) {
41
40
  function requireReceiptNumber(value) {
42
41
  return requireText(value, "Add meg a nyugtaszámot (receiptNumber).");
43
42
  }
44
- //#endregion
45
- //#region src/receipts/create.ts
43
+ // src/receipts/create.ts
46
44
  const CREATE_RECEIPT_NAMESPACE = "http://www.szamlazz.hu/xmlnyugtacreate";
47
45
  const DEFAULT_CURRENCY = "HUF";
48
46
  const DEFAULT_UNIT = "db";
@@ -200,7 +198,6 @@ async function createReceipt(ctx, defaults, input, options = {}) {
200
198
  throw enrichDuplicateError(error, input);
201
199
  }
202
200
  }
203
- //#endregion
204
201
  Object.defineProperty(exports, "RECEIPT_ONLY_VAT_CODES", {
205
202
  enumerable: true,
206
203
  get: function() {