kassza 0.18.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-xcEb7ko9.cjs → server-BZ-ySQGx.cjs} +23 -35
  137. package/dist/{server-Dt6bEeBB.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,10 +1,10 @@
1
- const require_errors = require("./errors-EE96_6D_.cjs");
2
- const require_once = require("./once-BN_3B5OF.cjs");
3
- const require_rounding = require("./rounding-TxoWy2ww.cjs");
4
- const require_vat = require("./vat-g35srbNG.cjs");
5
- const require_money = require("./money-K9j0wPit.cjs");
6
- const require_create = require("./create-CvUvLUaT.cjs");
7
- //#region src/core/once-guard.ts
1
+ const require_errors = require("./errors-Bn6pe6yw.cjs");
2
+ const require_once = require("./once-BmXfrNbQ.cjs");
3
+ const require_rounding = require("./rounding-CHmSK5Z2.cjs");
4
+ const require_vat = require("./vat-BkoiiKm4.cjs");
5
+ const require_money = require("./money-NtVytaxG.cjs");
6
+ const require_create = require("./create-DH5jiZPA.cjs");
7
+ // src/core/once-guard.ts
8
8
  const ONCE_LOCK_KEY_PREFIX = "szamlazz:once:";
9
9
  const DEFAULT_LOCK_TTL_SECONDS = 600;
10
10
  const DEFAULT_LOCK_WAIT_MS = 1e4;
@@ -144,8 +144,7 @@ async function guardOnce(guard, key, options, run, joined) {
144
144
  if (inflight.get(id) === leader) inflight.delete(id);
145
145
  }
146
146
  }
147
- //#endregion
148
- //#region src/invoices/create-once.ts
147
+ // src/invoices/create-once.ts
149
148
  const EXTERNAL_ID_SUFFIXES = {
150
149
  invoice: "",
151
150
  proforma: "/D",
@@ -223,8 +222,7 @@ async function createInvoiceOnce(api, input, options = {}, guard) {
223
222
  created: false
224
223
  }));
225
224
  }
226
- //#endregion
227
- //#region src/documents/choose.ts
225
+ // src/documents/choose.ts
228
226
  const RECEIPT_MAX_GROSS_HUF = 9e5;
229
227
  const forintFormatter = new Intl.NumberFormat("hu-HU", { maximumFractionDigits: 2 });
230
228
  function validation$3(message) {
@@ -264,8 +262,7 @@ function chooseDocument(input) {
264
262
  grossTotalHuf
265
263
  };
266
264
  }
267
- //#endregion
268
- //#region src/receipts/convert.ts
265
+ // src/receipts/convert.ts
269
266
  const receiptOnlyCodes = new Set(require_create.RECEIPT_ONLY_VAT_CODES);
270
267
  function validation$2(message, hint) {
271
268
  return new require_errors.SzamlazzError(message, {
@@ -362,8 +359,7 @@ async function convertReceiptToInvoice(api, input, options = {}) {
362
359
  invoice
363
360
  };
364
361
  }
365
- //#endregion
366
- //#region src/payments/partial-refund.ts
362
+ // src/payments/partial-refund.ts
367
363
  const CORRECTION_SUFFIX = "/R-";
368
364
  const MAX_PLAIN_REFUND_KEY = 24;
369
365
  const AMOUNT_TOLERANCE$1 = .005;
@@ -586,8 +582,7 @@ async function issueForPartialRefund(api, payment, orderNumber, options) {
586
582
  assertRefunds(refunds, receipt.currency, receipt.number);
587
583
  return proposal(orderNumber, "receipt", receipt.number, receiptItems(receipt), refunds, receipt.currency, RECEIPT_PROPOSAL_REASON);
588
584
  }
589
- //#endregion
590
- //#region src/payments/issue.ts
585
+ // src/payments/issue.ts
591
586
  const AMOUNT_TOLERANCE = .005;
592
587
  const DEFAULT_ITEM_NAME = "Termék vagy szolgáltatás";
593
588
  const DEFAULT_CURRENCY = "HUF";
@@ -901,7 +896,6 @@ async function issueForPayment(api, payment, options = {}) {
901
896
  if (kind === "receipt") return issueReceipt(api, payment, orderNumber, items, currency, decision, options);
902
897
  return issueInvoice(api, payment, orderNumber, items, currency, buyer, decision, options);
903
898
  }
904
- //#endregion
905
899
  Object.defineProperty(exports, "DEFAULT_LOCK_TTL_SECONDS", {
906
900
  enumerable: true,
907
901
  get: function() {
@@ -1,10 +1,10 @@
1
- import { r as SzamlazzError } from "./errors-DtN4g5Z9.js";
2
- import { a as unknownOutcomeError, i as resolveRecoveryDelay, n as isUncertainOutcome, r as recoverAfterFailure } from "./once-CqqZxsXG.js";
3
- import { r as roundMoney } from "./rounding-BLyHjjI5.js";
4
- import { a as isVatRate, i as isHuf } from "./vat-v_dcWCto.js";
5
- import { n as calculateInvoiceItem, t as allocateRefund } from "./money-Cw457SD6.js";
6
- import { l as RECEIPT_ONLY_VAT_CODES, n as calculateReceiptItems } from "./create-CflXrPip.js";
7
- //#region src/core/once-guard.ts
1
+ import { r as SzamlazzError } from "./errors-CGGsW0Y5.js";
2
+ import { a as unknownOutcomeError, i as resolveRecoveryDelay, n as isUncertainOutcome, r as recoverAfterFailure } from "./once-CMhDPrs7.js";
3
+ import { r as roundMoney } from "./rounding-CZLj4DbV.js";
4
+ import { a as isVatRate, i as isHuf } from "./vat-B4J5Q0tu.js";
5
+ import { n as calculateInvoiceItem, t as allocateRefund } from "./money-f280VT77.js";
6
+ import { l as RECEIPT_ONLY_VAT_CODES, n as calculateReceiptItems } from "./create-BwRslos0.js";
7
+ // src/core/once-guard.ts
8
8
  const ONCE_LOCK_KEY_PREFIX = "szamlazz:once:";
9
9
  const DEFAULT_LOCK_TTL_SECONDS = 600;
10
10
  const DEFAULT_LOCK_WAIT_MS = 1e4;
@@ -144,8 +144,7 @@ async function guardOnce(guard, key, options, run, joined) {
144
144
  if (inflight.get(id) === leader) inflight.delete(id);
145
145
  }
146
146
  }
147
- //#endregion
148
- //#region src/invoices/create-once.ts
147
+ // src/invoices/create-once.ts
149
148
  const EXTERNAL_ID_SUFFIXES = {
150
149
  invoice: "",
151
150
  proforma: "/D",
@@ -223,8 +222,7 @@ async function createInvoiceOnce(api, input, options = {}, guard) {
223
222
  created: false
224
223
  }));
225
224
  }
226
- //#endregion
227
- //#region src/documents/choose.ts
225
+ // src/documents/choose.ts
228
226
  const RECEIPT_MAX_GROSS_HUF = 9e5;
229
227
  const forintFormatter = new Intl.NumberFormat("hu-HU", { maximumFractionDigits: 2 });
230
228
  function validation$3(message) {
@@ -264,8 +262,7 @@ function chooseDocument(input) {
264
262
  grossTotalHuf
265
263
  };
266
264
  }
267
- //#endregion
268
- //#region src/receipts/convert.ts
265
+ // src/receipts/convert.ts
269
266
  const receiptOnlyCodes = new Set(RECEIPT_ONLY_VAT_CODES);
270
267
  function validation$2(message, hint) {
271
268
  return new SzamlazzError(message, {
@@ -362,8 +359,7 @@ async function convertReceiptToInvoice(api, input, options = {}) {
362
359
  invoice
363
360
  };
364
361
  }
365
- //#endregion
366
- //#region src/payments/partial-refund.ts
362
+ // src/payments/partial-refund.ts
367
363
  const CORRECTION_SUFFIX = "/R-";
368
364
  const MAX_PLAIN_REFUND_KEY = 24;
369
365
  const AMOUNT_TOLERANCE$1 = .005;
@@ -586,8 +582,7 @@ async function issueForPartialRefund(api, payment, orderNumber, options) {
586
582
  assertRefunds(refunds, receipt.currency, receipt.number);
587
583
  return proposal(orderNumber, "receipt", receipt.number, receiptItems(receipt), refunds, receipt.currency, RECEIPT_PROPOSAL_REASON);
588
584
  }
589
- //#endregion
590
- //#region src/payments/issue.ts
585
+ // src/payments/issue.ts
591
586
  const AMOUNT_TOLERANCE = .005;
592
587
  const DEFAULT_ITEM_NAME = "Termék vagy szolgáltatás";
593
588
  const DEFAULT_CURRENCY = "HUF";
@@ -901,5 +896,4 @@ async function issueForPayment(api, payment, options = {}) {
901
896
  if (kind === "receipt") return issueReceipt(api, payment, orderNumber, items, currency, decision, options);
902
897
  return issueInvoice(api, payment, orderNumber, items, currency, buyer, decision, options);
903
898
  }
904
- //#endregion
905
899
  export { conversionExternalId as a, chooseDocument as c, DEFAULT_LOCK_TTL_SECONDS as d, DEFAULT_LOCK_WAIT_MS as f, correctionExternalId as i, createInvoiceOnce as l, guardOnce as m, issueForPayment as n, convertReceiptToInvoice as o, ONCE_LOCK_KEY_PREFIX as p, paymentOrderNumber as r, RECEIPT_MAX_GROSS_HUF as s, buyerFromCustomer as t, invoiceOnceExternalId as u };
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_errors = require("../errors-EE96_6D_.cjs");
3
- const require_once = require("../once-BN_3B5OF.cjs");
4
- const require_dates = require("../dates-CPgBodkP.cjs");
5
- //#region src/journal/dates.ts
2
+ const require_errors = require("../errors-Bn6pe6yw.cjs");
3
+ const require_once = require("../once-BmXfrNbQ.cjs");
4
+ const require_dates = require("../dates-oOp3ypPP.cjs");
5
+ // src/journal/dates.ts
6
6
  const MAX_JOURNAL_RANGE_DAYS = 366;
7
7
  const DAY_IN_MS = 864e5;
8
8
  function invalid(message) {
@@ -45,8 +45,7 @@ function recentRange(now, days) {
45
45
  to: require_dates.toAgentDate(now)
46
46
  };
47
47
  }
48
- //#endregion
49
- //#region src/journal/entries.ts
48
+ // src/journal/entries.ts
50
49
  function withoutPdf(receipt) {
51
50
  if (receipt.pdf === void 0) return receipt;
52
51
  const { pdf: _pdf, ...rest } = receipt;
@@ -141,8 +140,7 @@ function eventEntry(event, now) {
141
140
  grossTotal: event.document.grossTotal
142
141
  });
143
142
  }
144
- //#endregion
145
- //#region src/journal/journal.ts
143
+ // src/journal/journal.ts
146
144
  const DEFAULT_PENDING_DAYS = 30;
147
145
  var JournalWriteError = class extends Error {
148
146
  name = "JournalWriteError";
@@ -304,8 +302,7 @@ function createJournal(storage, options = {}) {
304
302
  };
305
303
  return journal;
306
304
  }
307
- //#endregion
308
- //#region src/journal/storage.ts
305
+ // src/journal/storage.ts
309
306
  const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
310
307
  const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
311
308
  const DEFAULT_RESERVATION_TTL_DAYS = 30;
@@ -442,7 +439,6 @@ function memoryJournal() {
442
439
  }
443
440
  };
444
441
  }
445
- //#endregion
446
442
  exports.DEFAULT_JOURNAL_RETENTION_DAYS = DEFAULT_JOURNAL_RETENTION_DAYS;
447
443
  exports.DEFAULT_PENDING_DAYS = DEFAULT_PENDING_DAYS;
448
444
  exports.DEFAULT_RESERVATION_TTL_DAYS = DEFAULT_RESERVATION_TTL_DAYS;
@@ -1,9 +1,6 @@
1
- import { n as KeyValueStore } from "../store-C1rHd9DB.cjs";
2
- import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-DvI81Kt7.cjs";
3
- //#region src/journal/dates.d.ts
1
+ import { n as KeyValueStore } from "../store-BkaZ8qkU.cjs";
2
+ import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-DI-hOW6N.cjs";
4
3
  export declare const MAX_JOURNAL_RANGE_DAYS = 366;
5
- //#endregion
6
- //#region src/journal/storage.d.ts
7
4
  export declare const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
8
5
  export declare const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
9
6
  export declare const DEFAULT_RESERVATION_TTL_DAYS = 30;
@@ -14,5 +11,4 @@ interface KvJournalOptions {
14
11
  }
15
12
  export declare function kvJournal(store: KeyValueStore, options?: KvJournalOptions): JournalStorage;
16
13
  export declare function memoryJournal(): JournalStorage;
17
- //#endregion
18
14
  export { DEFAULT_PENDING_DAYS, type Journal, type JournalDocumentKind, type JournalEntry, type JournalEntryQuery, type JournalEntrySource, type JournalEntryType, type JournalOptions, type JournalRange, type JournalReceiptQuery, type JournalReconcileOptions, type JournalReconciliation, type JournalReservation, type JournalSettleApi, type JournalSettleOptions, type JournalSettlement, type JournalStorage, JournalWriteError, type KvJournalOptions, createJournal };
@@ -1,9 +1,6 @@
1
- import { n as KeyValueStore } from "../store-C1rHd9DB.js";
2
- import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-Y9qrIB8G.js";
3
- //#region src/journal/dates.d.ts
1
+ import { n as KeyValueStore } from "../store-BkaZ8qkU.js";
2
+ import { _ as JournalRange, a as JournalReceiptQuery, c as JournalSettleApi, d as JournalWriteError, f as createJournal, g as JournalEntryType, h as JournalEntrySource, i as JournalOptions, l as JournalSettleOptions, m as JournalEntry, n as Journal, o as JournalReconcileOptions, p as JournalDocumentKind, r as JournalEntryQuery, s as JournalReconciliation, t as DEFAULT_PENDING_DAYS, u as JournalSettlement, v as JournalReservation, y as JournalStorage } from "../journal-BNdo07p5.js";
4
3
  export declare const MAX_JOURNAL_RANGE_DAYS = 366;
5
- //#endregion
6
- //#region src/journal/storage.d.ts
7
4
  export declare const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
8
5
  export declare const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
9
6
  export declare const DEFAULT_RESERVATION_TTL_DAYS = 30;
@@ -14,5 +11,4 @@ interface KvJournalOptions {
14
11
  }
15
12
  export declare function kvJournal(store: KeyValueStore, options?: KvJournalOptions): JournalStorage;
16
13
  export declare function memoryJournal(): JournalStorage;
17
- //#endregion
18
14
  export { DEFAULT_PENDING_DAYS, type Journal, type JournalDocumentKind, type JournalEntry, type JournalEntryQuery, type JournalEntrySource, type JournalEntryType, type JournalOptions, type JournalRange, type JournalReceiptQuery, type JournalReconcileOptions, type JournalReconciliation, type JournalReservation, type JournalSettleApi, type JournalSettleOptions, type JournalSettlement, type JournalStorage, JournalWriteError, type KvJournalOptions, createJournal };
@@ -1,7 +1,7 @@
1
- import { r as SzamlazzError } from "../errors-DtN4g5Z9.js";
2
- import { n as isUncertainOutcome } from "../once-CqqZxsXG.js";
3
- import { i as toBudapestTimestamp, n as toAgentDate, t as addBudapestDays } from "../dates-CXyj7Azy.js";
4
- //#region src/journal/dates.ts
1
+ import { r as SzamlazzError } from "../errors-CGGsW0Y5.js";
2
+ import { n as isUncertainOutcome } from "../once-CMhDPrs7.js";
3
+ import { i as toBudapestTimestamp, n as toAgentDate, t as addBudapestDays } from "../dates-DWsZOdaO.js";
4
+ // src/journal/dates.ts
5
5
  const MAX_JOURNAL_RANGE_DAYS = 366;
6
6
  const DAY_IN_MS = 864e5;
7
7
  function invalid(message) {
@@ -44,8 +44,7 @@ function recentRange(now, days) {
44
44
  to: toAgentDate(now)
45
45
  };
46
46
  }
47
- //#endregion
48
- //#region src/journal/entries.ts
47
+ // src/journal/entries.ts
49
48
  function withoutPdf(receipt) {
50
49
  if (receipt.pdf === void 0) return receipt;
51
50
  const { pdf: _pdf, ...rest } = receipt;
@@ -140,8 +139,7 @@ function eventEntry(event, now) {
140
139
  grossTotal: event.document.grossTotal
141
140
  });
142
141
  }
143
- //#endregion
144
- //#region src/journal/journal.ts
142
+ // src/journal/journal.ts
145
143
  const DEFAULT_PENDING_DAYS = 30;
146
144
  var JournalWriteError = class extends Error {
147
145
  name = "JournalWriteError";
@@ -303,8 +301,7 @@ function createJournal(storage, options = {}) {
303
301
  };
304
302
  return journal;
305
303
  }
306
- //#endregion
307
- //#region src/journal/storage.ts
304
+ // src/journal/storage.ts
308
305
  const JOURNAL_KEY_PREFIX = "szamlazz:journal:";
309
306
  const DEFAULT_JOURNAL_RETENTION_DAYS = 400;
310
307
  const DEFAULT_RESERVATION_TTL_DAYS = 30;
@@ -441,5 +438,4 @@ function memoryJournal() {
441
438
  }
442
439
  };
443
440
  }
444
- //#endregion
445
441
  export { DEFAULT_JOURNAL_RETENTION_DAYS, DEFAULT_PENDING_DAYS, DEFAULT_RESERVATION_TTL_DAYS, JOURNAL_KEY_PREFIX, JournalWriteError, MAX_JOURNAL_RANGE_DAYS, createJournal, kvJournal, memoryJournal };
@@ -1,9 +1,8 @@
1
- import { f as DocumentEvent } from "./context-kb33TgzE.js";
2
- import { r as Receipt } from "./types-D1zDOH_F.js";
3
- import { n as InvoiceDetails } from "./get-Byc9T5WO.js";
4
- import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-VKp0tVow.js";
5
- import { t as DataLinkArchivedReceipt } from "./push-BXj0Sf0Z.js";
6
- //#region src/journal/types.d.ts
1
+ import { f as DocumentEvent } from "./context-BuX6Eion.js";
2
+ import { r as Receipt } from "./types-Z6rQoqHn.js";
3
+ import { n as InvoiceDetails } from "./get-BL4Fr8-P.js";
4
+ import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-CiGUjXut.js";
5
+ import { t as DataLinkArchivedReceipt } from "./push-DJh5YkyV.js";
7
6
  type JournalDocumentKind = "invoice" | "receipt";
8
7
  type JournalEntryType = "document" | "reversal";
9
8
  type JournalEntrySource = "hook" | "track" | "reconcile" | "settle" | "manual";
@@ -40,8 +39,6 @@ interface JournalStorage {
40
39
  deleteReservation(kind: JournalDocumentKind, orderNumber: string): Promise<void>;
41
40
  listReservations(range: JournalRange): Promise<JournalReservation[]>;
42
41
  }
43
- //#endregion
44
- //#region src/journal/journal.d.ts
45
42
  declare const DEFAULT_PENDING_DAYS = 30;
46
43
  declare class JournalWriteError extends Error {
47
44
  override readonly name: string;
@@ -110,5 +107,4 @@ interface Journal {
110
107
  reconcile(archive: readonly (Receipt | DataLinkArchivedReceipt)[], options?: JournalReconcileOptions): Promise<JournalReconciliation>;
111
108
  }
112
109
  declare function createJournal(storage: JournalStorage, options?: JournalOptions): Journal;
113
- //#endregion
114
110
  export { JournalRange as _, JournalReceiptQuery as a, JournalSettleApi as c, JournalWriteError as d, createJournal as f, JournalEntryType as g, JournalEntrySource as h, JournalOptions as i, JournalSettleOptions as l, JournalEntry as m, Journal as n, JournalReconcileOptions as o, JournalDocumentKind as p, JournalEntryQuery as r, JournalReconciliation as s, DEFAULT_PENDING_DAYS as t, JournalSettlement as u, JournalReservation as v, JournalStorage as y };
@@ -1,9 +1,8 @@
1
- import { f as DocumentEvent } from "./context-CFNKzStE.cjs";
2
- import { r as Receipt } from "./types-lnKkQdot.cjs";
3
- import { n as InvoiceDetails } from "./get-Byc9T5WO.cjs";
4
- import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-Bh6fOWkW.cjs";
5
- import { t as DataLinkArchivedReceipt } from "./push-D4nNbCNV.cjs";
6
- //#region src/journal/types.d.ts
1
+ import { f as DocumentEvent } from "./context-PwqY4JOK.cjs";
2
+ import { r as Receipt } from "./types-_HKTOCuQ.cjs";
3
+ import { n as InvoiceDetails } from "./get-BL4Fr8-P.cjs";
4
+ import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-CyaVT36b.cjs";
5
+ import { t as DataLinkArchivedReceipt } from "./push-CTxDD3yJ.cjs";
7
6
  type JournalDocumentKind = "invoice" | "receipt";
8
7
  type JournalEntryType = "document" | "reversal";
9
8
  type JournalEntrySource = "hook" | "track" | "reconcile" | "settle" | "manual";
@@ -40,8 +39,6 @@ interface JournalStorage {
40
39
  deleteReservation(kind: JournalDocumentKind, orderNumber: string): Promise<void>;
41
40
  listReservations(range: JournalRange): Promise<JournalReservation[]>;
42
41
  }
43
- //#endregion
44
- //#region src/journal/journal.d.ts
45
42
  declare const DEFAULT_PENDING_DAYS = 30;
46
43
  declare class JournalWriteError extends Error {
47
44
  override readonly name: string;
@@ -110,5 +107,4 @@ interface Journal {
110
107
  reconcile(archive: readonly (Receipt | DataLinkArchivedReceipt)[], options?: JournalReconcileOptions): Promise<JournalReconciliation>;
111
108
  }
112
109
  declare function createJournal(storage: JournalStorage, options?: JournalOptions): Journal;
113
- //#endregion
114
110
  export { JournalRange as _, JournalReceiptQuery as a, JournalSettleApi as c, JournalWriteError as d, createJournal as f, JournalEntryType as g, JournalEntrySource as h, JournalOptions as i, JournalSettleOptions as l, JournalEntry as m, Journal as n, JournalReconcileOptions as o, JournalDocumentKind as p, JournalEntryQuery as r, JournalReconciliation as s, DEFAULT_PENDING_DAYS as t, JournalSettlement as u, JournalReservation as v, JournalStorage as y };
@@ -1,4 +1,4 @@
1
- //#region src/payments/json.ts
1
+ // src/payments/json.ts
2
2
  function record(value) {
3
3
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
4
4
  }
@@ -28,7 +28,6 @@ function path(value, ...keys) {
28
28
  for (const key of keys) current = record(current)?.[key];
29
29
  return current;
30
30
  }
31
- //#endregion
32
31
  Object.defineProperty(exports, "numeric", {
33
32
  enumerable: true,
34
33
  get: function() {
@@ -0,0 +1,2 @@
1
+ type JsonRecord = Readonly<Record<string, unknown>>;
2
+ export { JsonRecord as t };
@@ -0,0 +1,2 @@
1
+ type JsonRecord = Readonly<Record<string, unknown>>;
2
+ export { JsonRecord as t };
@@ -1,4 +1,4 @@
1
- //#region src/payments/json.ts
1
+ // src/payments/json.ts
2
2
  function record(value) {
3
3
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
4
4
  }
@@ -28,5 +28,4 @@ function path(value, ...keys) {
28
28
  for (const key of keys) current = record(current)?.[key];
29
29
  return current;
30
30
  }
31
- //#endregion
32
31
  export { text as a, records as i, path as n, record as r, numeric as t };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_server = require("../server-xcEb7ko9.cjs");
2
+ const require_server = require("../server-BZ-ySQGx.cjs");
3
3
  exports.DEFAULT_CONFIRMATION_TTL_MS = require_server.DEFAULT_CONFIRMATION_TTL_MS;
4
4
  exports.MCP_LEGACY_VERSIONS = require_server.MCP_LEGACY_VERSIONS;
5
5
  exports.MCP_MODERN_VERSIONS = require_server.MCP_MODERN_VERSIONS;
@@ -1,5 +1,4 @@
1
- import { i as KasszaOptions } from "../client-SVZu25MB.cjs";
2
- //#region src/mcp/protocol.d.ts
1
+ import { i as KasszaOptions } from "../client-BT2odGYl.cjs";
3
2
  export declare const MCP_MODERN_VERSIONS: readonly string[];
4
3
  export declare const MCP_LEGACY_VERSIONS: readonly string[];
5
4
  export declare const MCP_SUPPORTED_VERSIONS: readonly string[];
@@ -21,13 +20,9 @@ interface JsonRpcFailure {
21
20
  readonly error: JsonRpcErrorObject;
22
21
  }
23
22
  type JsonRpcResponse = JsonRpcSuccess | JsonRpcFailure;
24
- //#endregion
25
- //#region src/mcp/arguments.d.ts
26
23
  export declare class ToolInputError extends Error {
27
24
  override readonly name: string;
28
25
  }
29
- //#endregion
30
- //#region src/mcp/confirmation.d.ts
31
26
  export declare const DEFAULT_CONFIRMATION_TTL_MS = 9e5;
32
27
  interface ConfirmationOptions {
33
28
  readonly secret?: string | Uint8Array | undefined;
@@ -44,8 +39,6 @@ interface Confirmations {
44
39
  }
45
40
  export declare function canonicalJson(value: unknown): string;
46
41
  export declare function createConfirmations(options: ConfirmationOptions): Confirmations;
47
- //#endregion
48
- //#region src/mcp/server.d.ts
49
42
  interface KasszaMcpServerOptions extends KasszaOptions {
50
43
  readonly allowWrite?: boolean | undefined;
51
44
  readonly confirmationSecret?: string | Uint8Array | undefined;
@@ -67,5 +60,4 @@ interface KasszaMcpServer {
67
60
  connect(): McpConnection;
68
61
  }
69
62
  export declare function createKasszaMcpServer(options?: KasszaMcpServerOptions): KasszaMcpServer;
70
- //#endregion
71
63
  export type { Confirmations, IssuedConfirmation, JsonRpcFailure, JsonRpcId, JsonRpcResponse, JsonRpcSuccess, KasszaMcpServer, KasszaMcpServerOptions, McpConnection, McpToolInfo };
@@ -1,5 +1,4 @@
1
- import { i as KasszaOptions } from "../client-DeWWQ-RZ.js";
2
- //#region src/mcp/protocol.d.ts
1
+ import { i as KasszaOptions } from "../client-C-SYCiOZ.js";
3
2
  export declare const MCP_MODERN_VERSIONS: readonly string[];
4
3
  export declare const MCP_LEGACY_VERSIONS: readonly string[];
5
4
  export declare const MCP_SUPPORTED_VERSIONS: readonly string[];
@@ -21,13 +20,9 @@ interface JsonRpcFailure {
21
20
  readonly error: JsonRpcErrorObject;
22
21
  }
23
22
  type JsonRpcResponse = JsonRpcSuccess | JsonRpcFailure;
24
- //#endregion
25
- //#region src/mcp/arguments.d.ts
26
23
  export declare class ToolInputError extends Error {
27
24
  override readonly name: string;
28
25
  }
29
- //#endregion
30
- //#region src/mcp/confirmation.d.ts
31
26
  export declare const DEFAULT_CONFIRMATION_TTL_MS = 9e5;
32
27
  interface ConfirmationOptions {
33
28
  readonly secret?: string | Uint8Array | undefined;
@@ -44,8 +39,6 @@ interface Confirmations {
44
39
  }
45
40
  export declare function canonicalJson(value: unknown): string;
46
41
  export declare function createConfirmations(options: ConfirmationOptions): Confirmations;
47
- //#endregion
48
- //#region src/mcp/server.d.ts
49
42
  interface KasszaMcpServerOptions extends KasszaOptions {
50
43
  readonly allowWrite?: boolean | undefined;
51
44
  readonly confirmationSecret?: string | Uint8Array | undefined;
@@ -67,5 +60,4 @@ interface KasszaMcpServer {
67
60
  connect(): McpConnection;
68
61
  }
69
62
  export declare function createKasszaMcpServer(options?: KasszaMcpServerOptions): KasszaMcpServer;
70
- //#endregion
71
63
  export type { Confirmations, IssuedConfirmation, JsonRpcFailure, JsonRpcId, JsonRpcResponse, JsonRpcSuccess, KasszaMcpServer, KasszaMcpServerOptions, McpConnection, McpToolInfo };
package/dist/mcp/index.js CHANGED
@@ -1,2 +1 @@
1
- import { a as createConfirmations, c as MCP_MODERN_VERSIONS, i as canonicalJson, l as MCP_SUPPORTED_VERSIONS, o as ToolInputError, r as DEFAULT_CONFIRMATION_TTL_MS, s as MCP_LEGACY_VERSIONS, t as createKasszaMcpServer } from "../server-Dt6bEeBB.js";
2
- export { DEFAULT_CONFIRMATION_TTL_MS, MCP_LEGACY_VERSIONS, MCP_MODERN_VERSIONS, MCP_SUPPORTED_VERSIONS, ToolInputError, canonicalJson, createConfirmations, createKasszaMcpServer };
1
+ export { r as DEFAULT_CONFIRMATION_TTL_MS, s as MCP_LEGACY_VERSIONS, c as MCP_MODERN_VERSIONS, l as MCP_SUPPORTED_VERSIONS, o as ToolInputError, i as canonicalJson, a as createConfirmations, t as createKasszaMcpServer } from "../server-CDwsjBWk.js";
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rounding = require("../rounding-TxoWy2ww.cjs");
3
- const require_vat = require("../vat-g35srbNG.cjs");
4
- const require_money = require("../money-K9j0wPit.cjs");
2
+ const require_rounding = require("../rounding-CHmSK5Z2.cjs");
3
+ const require_vat = require("../vat-BkoiiKm4.cjs");
4
+ const require_money = require("../money-NtVytaxG.cjs");
5
5
  exports.NUMERIC_VAT_RATES = require_vat.NUMERIC_VAT_RATES;
6
6
  exports.SPECIAL_VAT_CODES = require_vat.SPECIAL_VAT_CODES;
7
7
  exports.addMoney = require_rounding.addMoney;
@@ -1,2 +1,2 @@
1
- import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-C-7yWV7L.cjs";
1
+ import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-CinpAhQM.cjs";
2
2
  export { type AllocateRefundOptions, type DocumentKind, type DocumentTotals, type ItemAmounts, type ItemPriceInput, NUMERIC_VAT_RATES, type NumericVatRate, type RefundAllocation, type RefundVat, type RefundableItem, SPECIAL_VAT_CODES, type SpecialVatCode, type VatBreakdown, type VatRate, addMoney, allocateRefund, calculateInvoiceItem, calculateItemAmounts, calculateReceiptItem, decimalPlaces, formatVatRate, isHuf, isVatRate, roundMoney, summarizeItems, vatPercentage };
@@ -1,2 +1,2 @@
1
- import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-C-7yWV7L.js";
1
+ import { C as formatVatRate, E as vatPercentage, S as VatRate, T as isVatRate, _ as summarizeItems, a as RefundAllocation, b as SPECIAL_VAT_CODES, c as allocateRefund, d as ItemAmounts, f as ItemPriceInput, g as calculateReceiptItem, h as calculateItemAmounts, i as AllocateRefundOptions, l as DocumentKind, m as calculateInvoiceItem, n as decimalPlaces, o as RefundVat, p as VatBreakdown, r as roundMoney, s as RefundableItem, t as addMoney, u as DocumentTotals, v as NUMERIC_VAT_RATES, w as isHuf, x as SpecialVatCode, y as NumericVatRate } from "../index-CinpAhQM.js";
2
2
  export { type AllocateRefundOptions, type DocumentKind, type DocumentTotals, type ItemAmounts, type ItemPriceInput, NUMERIC_VAT_RATES, type NumericVatRate, type RefundAllocation, type RefundVat, type RefundableItem, SPECIAL_VAT_CODES, type SpecialVatCode, type VatBreakdown, type VatRate, addMoney, allocateRefund, calculateInvoiceItem, calculateItemAmounts, calculateReceiptItem, decimalPlaces, formatVatRate, isHuf, isVatRate, roundMoney, summarizeItems, vatPercentage };
@@ -1,4 +1,4 @@
1
- import { n as decimalPlaces, r as roundMoney, t as addMoney } from "../rounding-BLyHjjI5.js";
2
- import { a as isVatRate, i as isHuf, n as SPECIAL_VAT_CODES, o as vatPercentage, r as formatVatRate, t as NUMERIC_VAT_RATES } from "../vat-v_dcWCto.js";
3
- import { a as summarizeItems, i as calculateReceiptItem, n as calculateInvoiceItem, r as calculateItemAmounts, t as allocateRefund } from "../money-Cw457SD6.js";
1
+ import { n as decimalPlaces, r as roundMoney, t as addMoney } from "../rounding-CZLj4DbV.js";
2
+ import { a as isVatRate, i as isHuf, n as SPECIAL_VAT_CODES, o as vatPercentage, r as formatVatRate, t as NUMERIC_VAT_RATES } from "../vat-B4J5Q0tu.js";
3
+ import { a as summarizeItems, i as calculateReceiptItem, n as calculateInvoiceItem, r as calculateItemAmounts, t as allocateRefund } from "../money-f280VT77.js";
4
4
  export { NUMERIC_VAT_RATES, SPECIAL_VAT_CODES, addMoney, allocateRefund, calculateInvoiceItem, calculateItemAmounts, calculateReceiptItem, decimalPlaces, formatVatRate, isHuf, isVatRate, roundMoney, summarizeItems, vatPercentage };
@@ -1,7 +1,7 @@
1
- const require_errors = require("./errors-EE96_6D_.cjs");
2
- const require_rounding = require("./rounding-TxoWy2ww.cjs");
3
- const require_vat = require("./vat-g35srbNG.cjs");
4
- //#region src/money/items.ts
1
+ const require_errors = require("./errors-Bn6pe6yw.cjs");
2
+ const require_rounding = require("./rounding-CHmSK5Z2.cjs");
3
+ const require_vat = require("./vat-BkoiiKm4.cjs");
4
+ // src/money/items.ts
5
5
  const FOREIGN_CURRENCY_DECIMALS = 2;
6
6
  const RECEIPT_HUF_DECIMALS = 2;
7
7
  const MAX_UNIT_PRICE_DECIMALS = 6;
@@ -173,8 +173,7 @@ function summarizeItems(items) {
173
173
  }))
174
174
  };
175
175
  }
176
- //#endregion
177
- //#region src/money/refund.ts
176
+ // src/money/refund.ts
178
177
  function invalid(message) {
179
178
  return new require_errors.SzamlazzError(message, { category: "validation" });
180
179
  }
@@ -265,7 +264,6 @@ function allocateRefund(items, refundGross, options = {}) {
265
264
  }];
266
265
  });
267
266
  }
268
- //#endregion
269
267
  Object.defineProperty(exports, "allocateRefund", {
270
268
  enumerable: true,
271
269
  get: function() {
@@ -1,7 +1,7 @@
1
- import { r as SzamlazzError } from "./errors-DtN4g5Z9.js";
2
- import { n as decimalPlaces, r as roundMoney } from "./rounding-BLyHjjI5.js";
3
- import { a as isVatRate, i as isHuf, o as vatPercentage } from "./vat-v_dcWCto.js";
4
- //#region src/money/items.ts
1
+ import { r as SzamlazzError } from "./errors-CGGsW0Y5.js";
2
+ import { n as decimalPlaces, r as roundMoney } from "./rounding-CZLj4DbV.js";
3
+ import { a as isVatRate, i as isHuf, o as vatPercentage } from "./vat-B4J5Q0tu.js";
4
+ // src/money/items.ts
5
5
  const FOREIGN_CURRENCY_DECIMALS = 2;
6
6
  const RECEIPT_HUF_DECIMALS = 2;
7
7
  const MAX_UNIT_PRICE_DECIMALS = 6;
@@ -173,8 +173,7 @@ function summarizeItems(items) {
173
173
  }))
174
174
  };
175
175
  }
176
- //#endregion
177
- //#region src/money/refund.ts
176
+ // src/money/refund.ts
178
177
  function invalid(message) {
179
178
  return new SzamlazzError(message, { category: "validation" });
180
179
  }
@@ -265,5 +264,4 @@ function allocateRefund(items, refundGross, options = {}) {
265
264
  }];
266
265
  });
267
266
  }
268
- //#endregion
269
267
  export { summarizeItems as a, calculateReceiptItem as i, calculateInvoiceItem as n, calculateItemAmounts as r, allocateRefund as t };