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
package/README.md CHANGED
@@ -110,7 +110,7 @@ A teljes magyar dokumentáció, a sandbox és a receptek a **[kasszajs.hu](https
110
110
  <a href="https://kasszajs.hu/sandbox?pelda=szamla"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/futozs/kassza/main/readme/assets/showcase-dark.svg"><img src="https://raw.githubusercontent.com/futozs/kassza/main/readme/assets/showcase-light.svg" alt="A kassza sandbox: futtatható példák, TypeScript kód és a ténylegesen elküldött XML" width="100%"></picture></a>
111
111
  </p>
112
112
 
113
- - 📖 **[Dokumentáció](https://kasszajs.hu/docs)**: 188 oldal magyarul. Minden Agent művelethez kérés, válasz és futtatható minta, a beállítások, a szabályok és az összes ismert hibakód.
113
+ - 📖 **[Dokumentáció](https://kasszajs.hu/docs)**: 190 oldal magyarul. Minden Agent művelethez kérés, válasz és futtatható minta, a beállítások, a szabályok és az összes ismert hibakód.
114
114
  - ▶️ **[Sandbox](https://kasszajs.hu/sandbox)**: 28 példa, amit a böngészőben futtathatsz Agent kulcs nélkül, szimulált Számlázz.hu ellen, a ténylegesen elküldött XML-lel. A saját kódodat linkként meg is oszthatod.
115
115
  - 🍳 **[Receptek](https://kasszajs.hu/docs/receptek)**: 11 teljes, bemásolható integráció webshophoz, Stripe és IPN webhookhoz, díjbekérőhöz, pénztári nyugtához, PDF tárhelyhez, Cloudflare Workershez és tesztekhez.
116
116
  - 🤖 **[llms.txt](https://kasszajs.hu/llms.txt)**: a dokumentáció tartalomjegyzéke AI asszisztenseknek, a teljes szöveg egy fájlban: [llms-full.txt](https://kasszajs.hu/llms-full.txt).
@@ -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_dates = require("../dates-CPgBodkP.cjs");
4
- const require_create = require("../create-CvUvLUaT.cjs");
5
- //#region src/batch/recurring.ts
2
+ const require_errors = require("../errors-Bn6pe6yw.cjs");
3
+ const require_dates = require("../dates-oOp3ypPP.cjs");
4
+ const require_create = require("../create-DH5jiZPA.cjs");
5
+ // src/batch/recurring.ts
6
6
  const INTERVALS = /* @__PURE__ */ new Set([
7
7
  "week",
8
8
  "month",
@@ -99,8 +99,7 @@ function billingPeriodsBetween(options, from, to) {
99
99
  function todayPeriod(options, now = /* @__PURE__ */ new Date()) {
100
100
  return billingPeriodAt(options, require_dates.addBudapestDays(now, 0));
101
101
  }
102
- //#endregion
103
- //#region src/batch/run.ts
102
+ // src/batch/run.ts
104
103
  const MAX_BATCH_CONCURRENCY = 4;
105
104
  const DEFAULT_BATCH_RATE_PER_MINUTE = 30;
106
105
  const STOPPING_CATEGORIES = /* @__PURE__ */ new Set([
@@ -336,7 +335,6 @@ async function runBatch(api, options) {
336
335
  grossTotal: Math.round(grossTotal * 100) / 100
337
336
  };
338
337
  }
339
- //#endregion
340
338
  exports.DEFAULT_BATCH_RATE_PER_MINUTE = DEFAULT_BATCH_RATE_PER_MINUTE;
341
339
  exports.MAX_BATCH_CONCURRENCY = MAX_BATCH_CONCURRENCY;
342
340
  exports.billingPeriod = billingPeriod;
@@ -1,9 +1,8 @@
1
- import { t as DateInput } from "../dates-9zvESP0i.cjs";
2
- import { M as CreateInvoiceInput } from "../context-CFNKzStE.cjs";
3
- import { t as CreateReceiptInput } from "../types-lnKkQdot.cjs";
4
- import { a as ReceiptsApi, t as InvoicesApi } from "../client-SVZu25MB.cjs";
5
- import { n as Journal } from "../journal-DvI81Kt7.cjs";
6
- //#region src/batch/recurring.d.ts
1
+ import { t as DateInput } from "../dates-nlGEokCf.cjs";
2
+ import { M as CreateInvoiceInput } from "../context-PwqY4JOK.cjs";
3
+ import { t as CreateReceiptInput } from "../types-_HKTOCuQ.cjs";
4
+ import { a as ReceiptsApi, t as InvoicesApi } from "../client-BT2odGYl.cjs";
5
+ import { n as Journal } from "../journal-DI-hOW6N.cjs";
7
6
  type BillingInterval = "week" | "month" | "quarter" | "year";
8
7
  interface BillingPeriodOptions {
9
8
  readonly interval: BillingInterval;
@@ -22,8 +21,6 @@ export declare function billingPeriod(options: BillingPeriodOptions, index: numb
22
21
  export declare function billingPeriodAt(options: BillingPeriodOptions, date: DateInput): BillingPeriod;
23
22
  export declare function billingPeriodsBetween(options: BillingPeriodOptions, from: DateInput, to: DateInput): BillingPeriod[];
24
23
  export declare function todayPeriod(options: BillingPeriodOptions, now?: Date): BillingPeriod;
25
- //#endregion
26
- //#region src/batch/run.d.ts
27
24
  export declare const MAX_BATCH_CONCURRENCY = 4;
28
25
  export declare const DEFAULT_BATCH_RATE_PER_MINUTE = 30;
29
26
  type BatchDocument = {
@@ -87,5 +84,4 @@ interface RunBatchOptions {
87
84
  readonly recoveryDelayMs?: number | undefined;
88
85
  }
89
86
  export declare function runBatch(api: BatchApi, options: RunBatchOptions): Promise<BatchResult>;
90
- //#endregion
91
87
  export type { BatchApi, BatchDocument, BatchItem, BatchItemResult, BatchItemStatus, BatchProgress, BatchResult, BillingInterval, BillingPeriod, BillingPeriodOptions, RunBatchOptions };
@@ -1,9 +1,8 @@
1
- import { t as DateInput } from "../dates-9zvESP0i.js";
2
- import { M as CreateInvoiceInput } from "../context-kb33TgzE.js";
3
- import { t as CreateReceiptInput } from "../types-D1zDOH_F.js";
4
- import { a as ReceiptsApi, t as InvoicesApi } from "../client-DeWWQ-RZ.js";
5
- import { n as Journal } from "../journal-Y9qrIB8G.js";
6
- //#region src/batch/recurring.d.ts
1
+ import { t as DateInput } from "../dates-nlGEokCf.js";
2
+ import { M as CreateInvoiceInput } from "../context-BuX6Eion.js";
3
+ import { t as CreateReceiptInput } from "../types-Z6rQoqHn.js";
4
+ import { a as ReceiptsApi, t as InvoicesApi } from "../client-C-SYCiOZ.js";
5
+ import { n as Journal } from "../journal-BNdo07p5.js";
7
6
  type BillingInterval = "week" | "month" | "quarter" | "year";
8
7
  interface BillingPeriodOptions {
9
8
  readonly interval: BillingInterval;
@@ -22,8 +21,6 @@ export declare function billingPeriod(options: BillingPeriodOptions, index: numb
22
21
  export declare function billingPeriodAt(options: BillingPeriodOptions, date: DateInput): BillingPeriod;
23
22
  export declare function billingPeriodsBetween(options: BillingPeriodOptions, from: DateInput, to: DateInput): BillingPeriod[];
24
23
  export declare function todayPeriod(options: BillingPeriodOptions, now?: Date): BillingPeriod;
25
- //#endregion
26
- //#region src/batch/run.d.ts
27
24
  export declare const MAX_BATCH_CONCURRENCY = 4;
28
25
  export declare const DEFAULT_BATCH_RATE_PER_MINUTE = 30;
29
26
  type BatchDocument = {
@@ -87,5 +84,4 @@ interface RunBatchOptions {
87
84
  readonly recoveryDelayMs?: number | undefined;
88
85
  }
89
86
  export declare function runBatch(api: BatchApi, options: RunBatchOptions): Promise<BatchResult>;
90
- //#endregion
91
87
  export type { BatchApi, BatchDocument, BatchItem, BatchItemResult, BatchItemStatus, BatchProgress, BatchResult, BillingInterval, BillingPeriod, BillingPeriodOptions, RunBatchOptions };
@@ -1,7 +1,7 @@
1
- import { o as isSzamlazzError, r as SzamlazzError } from "../errors-DtN4g5Z9.js";
2
- import { n as toAgentDate, t as addBudapestDays } from "../dates-CXyj7Azy.js";
3
- import { n as calculateReceiptItems } from "../create-CflXrPip.js";
4
- //#region src/batch/recurring.ts
1
+ import { o as isSzamlazzError, r as SzamlazzError } from "../errors-CGGsW0Y5.js";
2
+ import { n as toAgentDate, t as addBudapestDays } from "../dates-DWsZOdaO.js";
3
+ import { n as calculateReceiptItems } from "../create-BwRslos0.js";
4
+ // src/batch/recurring.ts
5
5
  const INTERVALS = /* @__PURE__ */ new Set([
6
6
  "week",
7
7
  "month",
@@ -98,8 +98,7 @@ function billingPeriodsBetween(options, from, to) {
98
98
  function todayPeriod(options, now = /* @__PURE__ */ new Date()) {
99
99
  return billingPeriodAt(options, addBudapestDays(now, 0));
100
100
  }
101
- //#endregion
102
- //#region src/batch/run.ts
101
+ // src/batch/run.ts
103
102
  const MAX_BATCH_CONCURRENCY = 4;
104
103
  const DEFAULT_BATCH_RATE_PER_MINUTE = 30;
105
104
  const STOPPING_CATEGORIES = /* @__PURE__ */ new Set([
@@ -335,5 +334,4 @@ async function runBatch(api, options) {
335
334
  grossTotal: Math.round(grossTotal * 100) / 100
336
335
  };
337
336
  }
338
- //#endregion
339
337
  export { DEFAULT_BATCH_RATE_PER_MINUTE, MAX_BATCH_CONCURRENCY, billingPeriod, billingPeriodAt, billingPeriodsBetween, runBatch, todayPeriod };
@@ -1,4 +1,4 @@
1
- //#region src/core/binary.ts
1
+ // src/core/binary.ts
2
2
  const PDF_MAGIC = [
3
3
  37,
4
4
  80,
@@ -30,7 +30,6 @@ function bytesToBase64(bytes) {
30
30
  for (let offset = 0; offset < bytes.length; offset += BASE64_CHUNK_SIZE) binary += String.fromCharCode(...bytes.subarray(offset, offset + BASE64_CHUNK_SIZE));
31
31
  return btoa(binary);
32
32
  }
33
- //#endregion
34
33
  Object.defineProperty(exports, "base64ToBytes", {
35
34
  enumerable: true,
36
35
  get: function() {
@@ -1,4 +1,4 @@
1
- //#region src/core/binary.ts
1
+ // src/core/binary.ts
2
2
  const PDF_MAGIC = [
3
3
  37,
4
4
  80,
@@ -30,5 +30,4 @@ function bytesToBase64(bytes) {
30
30
  for (let offset = 0; offset < bytes.length; offset += BASE64_CHUNK_SIZE) binary += String.fromCharCode(...bytes.subarray(offset, offset + BASE64_CHUNK_SIZE));
31
31
  return btoa(binary);
32
32
  }
33
- //#endregion
34
33
  export { isPdf as a, encodeUtf8 as i, bytesToBase64 as n, decodeUtf8 as r, base64ToBytes as t };
package/dist/cli.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- const require_errors = require("./errors-EE96_6D_.cjs");
3
- const require_client = require("./client-Cvb9yfxU.cjs");
4
- const require_serialize = require("./serialize-CquIsxA-.cjs");
5
- const require_create = require("./create-CvUvLUaT.cjs");
6
- const require_nav = require("./nav-BNbc8U0R.cjs");
7
- const require_server = require("./server-xcEb7ko9.cjs");
2
+ const require_errors = require("./errors-Bn6pe6yw.cjs");
3
+ const require_client = require("./client-I_29IPMh.cjs");
4
+ const require_serialize = require("./serialize-DEU7r6Bk.cjs");
5
+ const require_create = require("./create-DH5jiZPA.cjs");
6
+ const require_nav = require("./nav-VShZkjg8.cjs");
7
+ const require_server = require("./server-BZ-ySQGx.cjs");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_readline = require("node:readline");
10
- //#region src/cli/args.ts
10
+ // src/cli/args.ts
11
11
  var CliUsageError = class extends Error {
12
12
  name = "CliUsageError";
13
13
  };
@@ -61,8 +61,7 @@ function flagValue(args, name) {
61
61
  function hasFlag(args, name) {
62
62
  return args.flags.get(name) === true;
63
63
  }
64
- //#endregion
65
- //#region src/cli/io.ts
64
+ // src/cli/io.ts
66
65
  var CliError = class extends Error {
67
66
  name = "CliError";
68
67
  };
@@ -108,8 +107,7 @@ async function readDefaults(io, path) {
108
107
  function printJson(io, value) {
109
108
  io.stdout(`${JSON.stringify(value, (_key, entry) => entry instanceof Uint8Array ? void 0 : entry, 2)}\n`);
110
109
  }
111
- //#endregion
112
- //#region src/cli/commands.ts
110
+ // src/cli/commands.ts
113
111
  const MASKED_CREDENTIALS = [require_serialize.el("szamlaagentkulcs", "***")];
114
112
  const DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
115
113
  async function verifyCommand(io) {
@@ -220,8 +218,7 @@ async function navSummaryCommand(io, args) {
220
218
  io.stdout(reports.length === 0 ? "Nincs összesíthető nyugta a megadott időszakban.\n" : `${reports.map((report) => require_nav.describeNavReport(report)).join("\n\n")}\n`);
221
219
  return 0;
222
220
  }
223
- //#endregion
224
- //#region src/cli/doctor.ts
221
+ // src/cli/doctor.ts
225
222
  const NPM_LATEST_URL = "https://registry.npmjs.org/kassza/latest";
226
223
  const USED_BY_URL = "https://github.com/futozs/kassza/issues/new?template=used-by.yml";
227
224
  const MINIMUM_NODE_MAJOR = 22;
@@ -435,7 +432,7 @@ function formatDoctorReport(checks, meta) {
435
432
  "",
436
433
  "| Ellenőrzés | Állapot | Eredmény |",
437
434
  "| --- | --- | --- |",
438
- ...checks.map((entry) => `| ${entry.id} | ${entry.status} | ${entry.message.replace(/\|/g, "\\|")} |`),
435
+ ...checks.map((entry) => `| ${entry.id} | ${entry.status} | ${entry.message.replace(/[\\|]/g, "\\$&")} |`),
439
436
  "",
440
437
  summary(checks),
441
438
  "",
@@ -443,8 +440,7 @@ function formatDoctorReport(checks, meta) {
443
440
  ""
444
441
  ].join("\n");
445
442
  }
446
- //#endregion
447
- //#region src/cli/mcp.ts
443
+ // src/cli/mcp.ts
448
444
  const TRUTHY = /* @__PURE__ */ new Set([
449
445
  "1",
450
446
  "true",
@@ -474,8 +470,7 @@ async function mcpCommand(io, args) {
474
470
  }
475
471
  return 0;
476
472
  }
477
- //#endregion
478
- //#region src/cli/run.ts
473
+ // src/cli/run.ts
479
474
  const CLI_USAGE = `kassza ${require_server.KASSZA_VERSION}: Számlázz.hu Számla Agent parancssor
480
475
 
481
476
  Használat: kassza <parancs> [kapcsolók]
@@ -614,8 +609,7 @@ async function runCli(io) {
614
609
  return 1;
615
610
  }
616
611
  }
617
- //#endregion
618
- //#region src/cli/bin.ts
612
+ // src/cli/bin.ts
619
613
  async function readStdin() {
620
614
  let text = "";
621
615
  process.stdin.setEncoding("utf8");
@@ -640,4 +634,3 @@ runCli({
640
634
  process.stderr.write(`Váratlan hiba: ${error instanceof Error ? error.message : String(error)}\n`);
641
635
  process.exitCode = 1;
642
636
  });
643
- //#endregion
package/dist/cli.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { o as isSzamlazzError, r as SzamlazzError } from "./errors-DtN4g5Z9.js";
3
- import { s as buildCreateInvoiceXml, t as createKassza } from "./client-CdWEA0et.js";
4
- import { r as el } from "./serialize-B2eFh3D-.js";
5
- import { t as buildCreateReceiptXml } from "./create-CflXrPip.js";
6
- import { i as navDailyReports, n as describeNavReport } from "./nav-BcCerwWS.js";
7
- import { n as KASSZA_VERSION, t as createKasszaMcpServer } from "./server-Dt6bEeBB.js";
2
+ import { o as isSzamlazzError, r as SzamlazzError } from "./errors-CGGsW0Y5.js";
3
+ import { s as buildCreateInvoiceXml, t as createKassza } from "./client-JZ1M1sZX.js";
4
+ import { r as el } from "./serialize-CjymGkJj.js";
5
+ import { t as buildCreateReceiptXml } from "./create-BwRslos0.js";
6
+ import { i as navDailyReports, n as describeNavReport } from "./nav-NvNgaONz.js";
7
+ import { n as KASSZA_VERSION, t as createKasszaMcpServer } from "./server-CDwsjBWk.js";
8
8
  import { readFile } from "node:fs/promises";
9
9
  import { createInterface } from "node:readline";
10
- //#region src/cli/args.ts
10
+ // src/cli/args.ts
11
11
  var CliUsageError = class extends Error {
12
12
  name = "CliUsageError";
13
13
  };
@@ -61,8 +61,7 @@ function flagValue(args, name) {
61
61
  function hasFlag(args, name) {
62
62
  return args.flags.get(name) === true;
63
63
  }
64
- //#endregion
65
- //#region src/cli/io.ts
64
+ // src/cli/io.ts
66
65
  var CliError = class extends Error {
67
66
  name = "CliError";
68
67
  };
@@ -108,8 +107,7 @@ async function readDefaults(io, path) {
108
107
  function printJson(io, value) {
109
108
  io.stdout(`${JSON.stringify(value, (_key, entry) => entry instanceof Uint8Array ? void 0 : entry, 2)}\n`);
110
109
  }
111
- //#endregion
112
- //#region src/cli/commands.ts
110
+ // src/cli/commands.ts
113
111
  const MASKED_CREDENTIALS = [el("szamlaagentkulcs", "***")];
114
112
  const DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
115
113
  async function verifyCommand(io) {
@@ -220,8 +218,7 @@ async function navSummaryCommand(io, args) {
220
218
  io.stdout(reports.length === 0 ? "Nincs összesíthető nyugta a megadott időszakban.\n" : `${reports.map((report) => describeNavReport(report)).join("\n\n")}\n`);
221
219
  return 0;
222
220
  }
223
- //#endregion
224
- //#region src/cli/doctor.ts
221
+ // src/cli/doctor.ts
225
222
  const NPM_LATEST_URL = "https://registry.npmjs.org/kassza/latest";
226
223
  const USED_BY_URL = "https://github.com/futozs/kassza/issues/new?template=used-by.yml";
227
224
  const MINIMUM_NODE_MAJOR = 22;
@@ -435,7 +432,7 @@ function formatDoctorReport(checks, meta) {
435
432
  "",
436
433
  "| Ellenőrzés | Állapot | Eredmény |",
437
434
  "| --- | --- | --- |",
438
- ...checks.map((entry) => `| ${entry.id} | ${entry.status} | ${entry.message.replace(/\|/g, "\\|")} |`),
435
+ ...checks.map((entry) => `| ${entry.id} | ${entry.status} | ${entry.message.replace(/[\\|]/g, "\\$&")} |`),
439
436
  "",
440
437
  summary(checks),
441
438
  "",
@@ -443,8 +440,7 @@ function formatDoctorReport(checks, meta) {
443
440
  ""
444
441
  ].join("\n");
445
442
  }
446
- //#endregion
447
- //#region src/cli/mcp.ts
443
+ // src/cli/mcp.ts
448
444
  const TRUTHY = /* @__PURE__ */ new Set([
449
445
  "1",
450
446
  "true",
@@ -474,8 +470,7 @@ async function mcpCommand(io, args) {
474
470
  }
475
471
  return 0;
476
472
  }
477
- //#endregion
478
- //#region src/cli/run.ts
473
+ // src/cli/run.ts
479
474
  const CLI_USAGE = `kassza ${KASSZA_VERSION}: Számlázz.hu Számla Agent parancssor
480
475
 
481
476
  Használat: kassza <parancs> [kapcsolók]
@@ -614,8 +609,7 @@ async function runCli(io) {
614
609
  return 1;
615
610
  }
616
611
  }
617
- //#endregion
618
- //#region src/cli/bin.ts
612
+ // src/cli/bin.ts
619
613
  async function readStdin() {
620
614
  let text = "";
621
615
  process.stdin.setEncoding("utf8");
@@ -640,4 +634,3 @@ runCli({
640
634
  process.stderr.write(`Váratlan hiba: ${error instanceof Error ? error.message : String(error)}\n`);
641
635
  process.exitCode = 1;
642
636
  });
643
- //#endregion
@@ -1,12 +1,11 @@
1
- import { t as DateInput } from "./dates-9zvESP0i.js";
2
- import { B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, H as InvoicePreview, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, W as InvoiceTemplate, X as StandardInvoiceInput, l as SzamlazzOptions, s as RequestOptions, st as SzamlazzError, x as ReverseInvoiceInput } from "./context-kb33TgzE.js";
3
- import { n as KeyValueStore } from "./store-C1rHd9DB.js";
4
- import { S as VatRate, a as RefundAllocation, s as RefundableItem } from "./index-C-7yWV7L.js";
5
- import { h as SendReceiptInput, i as ReceiptDefaults, m as ReverseReceiptInput, n as GetReceiptInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput } from "./types-D1zDOH_F.js";
6
- import { n as InvoiceDetails, o as InvoiceDetailsPayment, t as GetInvoiceOptions } from "./get-Byc9T5WO.js";
7
- import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-VKp0tVow.js";
8
- import { i as PaymentEvent, l as PaymentRefund, r as PaymentCustomer, s as PaymentLineItem } from "./types-ByAEvGsZ.js";
9
- //#region src/core/once-guard.d.ts
1
+ import { t as DateInput } from "./dates-nlGEokCf.cjs";
2
+ import { B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, H as InvoicePreview, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, W as InvoiceTemplate, X as StandardInvoiceInput, l as SzamlazzOptions, s as RequestOptions, st as SzamlazzError, x as ReverseInvoiceInput } from "./context-PwqY4JOK.cjs";
3
+ import { n as KeyValueStore } from "./store-BkaZ8qkU.cjs";
4
+ import { S as VatRate, a as RefundAllocation, s as RefundableItem } from "./index-CinpAhQM.cjs";
5
+ import { h as SendReceiptInput, i as ReceiptDefaults, m as ReverseReceiptInput, n as GetReceiptInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput } from "./types-_HKTOCuQ.cjs";
6
+ import { n as InvoiceDetails, o as InvoiceDetailsPayment, t as GetInvoiceOptions } from "./get-BL4Fr8-P.cjs";
7
+ import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-CyaVT36b.cjs";
8
+ import { i as PaymentEvent, l as PaymentRefund, r as PaymentCustomer, s as PaymentLineItem } from "./types-DeuUqIvU.cjs";
10
9
  declare const ONCE_LOCK_KEY_PREFIX = "szamlazz:once:";
11
10
  declare const DEFAULT_LOCK_TTL_SECONDS = 600;
12
11
  declare const DEFAULT_LOCK_WAIT_MS = 1e4;
@@ -18,15 +17,11 @@ interface OnceLockOptions {
18
17
  readonly lockFailure?: LockFailureMode | undefined;
19
18
  readonly signal?: AbortSignal | undefined;
20
19
  }
21
- //#endregion
22
- //#region src/core/once.d.ts
23
20
  interface CreateOnceOptions extends RequestOptions, OnceLockOptions {
24
21
  readonly lookupFirst?: boolean | undefined;
25
22
  readonly matchOrderNumber?: boolean | undefined;
26
23
  readonly recoveryDelayMs?: number | undefined;
27
24
  }
28
- //#endregion
29
- //#region src/invoices/reference.d.ts
30
25
  type InvoiceReference = string | {
31
26
  readonly invoiceNumber: string;
32
27
  } | {
@@ -34,8 +29,6 @@ type InvoiceReference = string | {
34
29
  } | {
35
30
  readonly externalId: string;
36
31
  };
37
- //#endregion
38
- //#region src/invoices/payment-once.d.ts
39
32
  interface RegisterPaymentOnceInput {
40
33
  readonly invoiceNumber: string;
41
34
  readonly key: string;
@@ -54,8 +47,6 @@ interface RegisteredPaymentOnce {
54
47
  readonly existing?: InvoiceDetailsPayment | undefined;
55
48
  }
56
49
  declare function paymentMarker(key: string): string;
57
- //#endregion
58
- //#region src/invoices/pdf.d.ts
59
50
  interface InvoicePdf {
60
51
  readonly pdf: Uint8Array;
61
52
  readonly number?: string | undefined;
@@ -64,15 +55,11 @@ interface InvoicePdf {
64
55
  readonly outstanding?: number | undefined;
65
56
  readonly buyerAccountUrl?: string | undefined;
66
57
  }
67
- //#endregion
68
- //#region src/invoices/proforma.d.ts
69
58
  type ProformaReference = string | {
70
59
  readonly proformaNumber: string;
71
60
  } | {
72
61
  readonly orderNumber: string;
73
62
  };
74
- //#endregion
75
- //#region src/documents/choose.d.ts
76
63
  declare const RECEIPT_MAX_GROSS_HUF = 9e5;
77
64
  interface ChooseDocumentBuyer {
78
65
  readonly taxNumber?: string | undefined;
@@ -95,8 +82,6 @@ interface DocumentDecision {
95
82
  readonly grossTotalHuf: number;
96
83
  }
97
84
  declare function chooseDocument(input: ChooseDocumentInput): DocumentDecision;
98
- //#endregion
99
- //#region src/payments/partial-refund.d.ts
100
85
  type PartialRefundMode = "auto" | "proportional" | "skip";
101
86
  interface RefundItemsContext {
102
87
  readonly refund: PaymentRefund;
@@ -133,8 +118,6 @@ interface IssuedRefundProposal {
133
118
  readonly reason: string;
134
119
  }
135
120
  declare function correctionExternalId(orderNumber: string, refundId: string): Promise<string>;
136
- //#endregion
137
- //#region src/payments/issue.d.ts
138
121
  interface PaymentDocumentItem {
139
122
  readonly name: string;
140
123
  readonly quantity?: number;
@@ -204,8 +187,6 @@ interface PaymentDocumentsApi {
204
187
  declare function paymentOrderNumber(payment: PaymentEvent): string;
205
188
  declare function buyerFromCustomer(customer: PaymentCustomer | undefined): InvoiceBuyer | undefined;
206
189
  declare function issueForPayment(api: PaymentDocumentsApi, payment: PaymentEvent, options?: IssueForPaymentOptions): Promise<IssuedDocument>;
207
- //#endregion
208
- //#region src/receipts/convert.d.ts
209
190
  interface ConvertReceiptInput {
210
191
  readonly receiptNumber: string;
211
192
  readonly buyer: InvoiceBuyer;
@@ -226,8 +207,6 @@ interface ConvertedReceipt {
226
207
  readonly invoice: InvoiceOnceResult;
227
208
  }
228
209
  declare function conversionExternalId(receiptNumber: string): string;
229
- //#endregion
230
- //#region src/taxpayer/address.d.ts
231
210
  type TaxpayerAddressType = "HQ" | "SITE" | "BRANCH" | (string & {});
232
211
  interface NavDetailedAddress {
233
212
  readonly countryCode?: string | undefined;
@@ -260,8 +239,6 @@ interface TaxpayerAddress {
260
239
  readonly formatted: string;
261
240
  readonly raw: NavDetailedAddress;
262
241
  }
263
- //#endregion
264
- //#region src/taxpayer/query-taxpayer.d.ts
265
242
  type TaxpayerIncorporation = "ORGANIZATION" | "SELF_EMPLOYED" | "TAXABLE_PERSON" | (string & {});
266
243
  interface TaxpayerTaxNumber {
267
244
  readonly taxpayerId: string;
@@ -281,8 +258,6 @@ interface TaxpayerInfo {
281
258
  readonly infoDate?: string | undefined;
282
259
  readonly requestId?: string | undefined;
283
260
  }
284
- //#endregion
285
- //#region src/taxpayer/cache.d.ts
286
261
  declare const TAXPAYER_CACHE_KEY_PREFIX = "szamlazz:taxpayer:";
287
262
  declare const DEFAULT_TAXPAYER_TTL_SECONDS = 86400;
288
263
  declare const DEFAULT_TAXPAYER_INVALID_TTL_SECONDS = 600;
@@ -291,8 +266,6 @@ interface TaxpayerCacheOptions {
291
266
  readonly ttlSeconds?: number | undefined;
292
267
  readonly invalidTtlSeconds?: number | undefined;
293
268
  }
294
- //#endregion
295
- //#region src/client.d.ts
296
269
  interface KasszaDefaults {
297
270
  readonly invoice?: InvoiceDefaults;
298
271
  readonly receipt?: ReceiptDefaults;
@@ -337,5 +310,4 @@ interface Kassza {
337
310
  issueForPayment(payment: PaymentEvent, options?: IssueForPaymentOptions): Promise<IssuedDocument>;
338
311
  }
339
312
  declare function createKassza(options?: KasszaOptions): Kassza;
340
- //#endregion
341
313
  export { ONCE_LOCK_KEY_PREFIX as $, IssuedRefundCorrection as A, DocumentDecision as B, PaymentDocumentItem as C, issueForPayment as D, buyerFromCustomer as E, RefundProposalLine as F, RegisterPaymentOnceInput as G, chooseDocument as H, correctionExternalId as I, InvoiceReference as J, RegisteredPaymentOnce as K, ChooseDocumentBuyer as L, PartialRefundMode as M, RefundItemsContext as N, paymentOrderNumber as O, RefundItemsResolver as P, LockFailureMode as Q, ChooseDocumentInput as R, IssuedReversal as S, SkippedPayment as T, ProformaReference as U, RECEIPT_MAX_GROSS_HUF as V, InvoicePdf as W, DEFAULT_LOCK_TTL_SECONDS as X, CreateOnceOptions as Y, DEFAULT_LOCK_WAIT_MS as Z, conversionExternalId as _, ReceiptsApi as a, IssuedInvoice as b, DEFAULT_TAXPAYER_INVALID_TTL_SECONDS as c, TaxpayerCacheOptions as d, OnceLockOptions as et, TaxpayerInfo as f, ConvertedReceipt as g, ConvertReceiptInput as h, KasszaOptions as i, IssuedRefundProposal as j, IssuedCorrection as k, DEFAULT_TAXPAYER_TTL_SECONDS as l, TaxpayerAddress as m, Kassza as n, TaxpayerApi as o, TaxpayerTaxNumber as p, paymentMarker as q, KasszaDefaults as r, createKassza as s, InvoicesApi as t, TAXPAYER_CACHE_KEY_PREFIX as u, IssueForPaymentOptions as v, PaymentDocumentsApi as w, IssuedReceipt as x, IssuedDocument as y, DocumentChoice as z };
@@ -1,12 +1,11 @@
1
- import { t as DateInput } from "./dates-9zvESP0i.cjs";
2
- import { B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, H as InvoicePreview, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, W as InvoiceTemplate, X as StandardInvoiceInput, l as SzamlazzOptions, s as RequestOptions, st as SzamlazzError, x as ReverseInvoiceInput } from "./context-CFNKzStE.cjs";
3
- import { n as KeyValueStore } from "./store-C1rHd9DB.cjs";
4
- import { S as VatRate, a as RefundAllocation, s as RefundableItem } from "./index-C-7yWV7L.cjs";
5
- import { h as SendReceiptInput, i as ReceiptDefaults, m as ReverseReceiptInput, n as GetReceiptInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput } from "./types-lnKkQdot.cjs";
6
- import { n as InvoiceDetails, o as InvoiceDetailsPayment, t as GetInvoiceOptions } from "./get-Byc9T5WO.cjs";
7
- import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-Bh6fOWkW.cjs";
8
- import { i as PaymentEvent, l as PaymentRefund, r as PaymentCustomer, s as PaymentLineItem } from "./types-B1A8mUIE.cjs";
9
- //#region src/core/once-guard.d.ts
1
+ import { t as DateInput } from "./dates-nlGEokCf.js";
2
+ import { B as InvoiceLanguage, C as ClearPaymentsInput, E as RegisteredPayment, H as InvoicePreview, L as InvoiceBuyer, M as CreateInvoiceInput, N as CreatedInvoice, R as InvoiceDefaults, S as ReversedInvoice, T as RegisterPaymentInput, U as InvoiceSeller, W as InvoiceTemplate, X as StandardInvoiceInput, l as SzamlazzOptions, s as RequestOptions, st as SzamlazzError, x as ReverseInvoiceInput } from "./context-BuX6Eion.js";
3
+ import { n as KeyValueStore } from "./store-BkaZ8qkU.js";
4
+ import { S as VatRate, a as RefundAllocation, s as RefundableItem } from "./index-CinpAhQM.js";
5
+ import { h as SendReceiptInput, i as ReceiptDefaults, m as ReverseReceiptInput, n as GetReceiptInput, p as ReceiptVatRate, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput } from "./types-Z6rQoqHn.js";
6
+ import { n as InvoiceDetails, o as InvoiceDetailsPayment, t as GetInvoiceOptions } from "./get-BL4Fr8-P.js";
7
+ import { n as InvoiceOnceResult, t as ReceiptOnceResult } from "./create-once-CiGUjXut.js";
8
+ import { i as PaymentEvent, l as PaymentRefund, r as PaymentCustomer, s as PaymentLineItem } from "./types-oiDulesz.js";
10
9
  declare const ONCE_LOCK_KEY_PREFIX = "szamlazz:once:";
11
10
  declare const DEFAULT_LOCK_TTL_SECONDS = 600;
12
11
  declare const DEFAULT_LOCK_WAIT_MS = 1e4;
@@ -18,15 +17,11 @@ interface OnceLockOptions {
18
17
  readonly lockFailure?: LockFailureMode | undefined;
19
18
  readonly signal?: AbortSignal | undefined;
20
19
  }
21
- //#endregion
22
- //#region src/core/once.d.ts
23
20
  interface CreateOnceOptions extends RequestOptions, OnceLockOptions {
24
21
  readonly lookupFirst?: boolean | undefined;
25
22
  readonly matchOrderNumber?: boolean | undefined;
26
23
  readonly recoveryDelayMs?: number | undefined;
27
24
  }
28
- //#endregion
29
- //#region src/invoices/reference.d.ts
30
25
  type InvoiceReference = string | {
31
26
  readonly invoiceNumber: string;
32
27
  } | {
@@ -34,8 +29,6 @@ type InvoiceReference = string | {
34
29
  } | {
35
30
  readonly externalId: string;
36
31
  };
37
- //#endregion
38
- //#region src/invoices/payment-once.d.ts
39
32
  interface RegisterPaymentOnceInput {
40
33
  readonly invoiceNumber: string;
41
34
  readonly key: string;
@@ -54,8 +47,6 @@ interface RegisteredPaymentOnce {
54
47
  readonly existing?: InvoiceDetailsPayment | undefined;
55
48
  }
56
49
  declare function paymentMarker(key: string): string;
57
- //#endregion
58
- //#region src/invoices/pdf.d.ts
59
50
  interface InvoicePdf {
60
51
  readonly pdf: Uint8Array;
61
52
  readonly number?: string | undefined;
@@ -64,15 +55,11 @@ interface InvoicePdf {
64
55
  readonly outstanding?: number | undefined;
65
56
  readonly buyerAccountUrl?: string | undefined;
66
57
  }
67
- //#endregion
68
- //#region src/invoices/proforma.d.ts
69
58
  type ProformaReference = string | {
70
59
  readonly proformaNumber: string;
71
60
  } | {
72
61
  readonly orderNumber: string;
73
62
  };
74
- //#endregion
75
- //#region src/documents/choose.d.ts
76
63
  declare const RECEIPT_MAX_GROSS_HUF = 9e5;
77
64
  interface ChooseDocumentBuyer {
78
65
  readonly taxNumber?: string | undefined;
@@ -95,8 +82,6 @@ interface DocumentDecision {
95
82
  readonly grossTotalHuf: number;
96
83
  }
97
84
  declare function chooseDocument(input: ChooseDocumentInput): DocumentDecision;
98
- //#endregion
99
- //#region src/payments/partial-refund.d.ts
100
85
  type PartialRefundMode = "auto" | "proportional" | "skip";
101
86
  interface RefundItemsContext {
102
87
  readonly refund: PaymentRefund;
@@ -133,8 +118,6 @@ interface IssuedRefundProposal {
133
118
  readonly reason: string;
134
119
  }
135
120
  declare function correctionExternalId(orderNumber: string, refundId: string): Promise<string>;
136
- //#endregion
137
- //#region src/payments/issue.d.ts
138
121
  interface PaymentDocumentItem {
139
122
  readonly name: string;
140
123
  readonly quantity?: number;
@@ -204,8 +187,6 @@ interface PaymentDocumentsApi {
204
187
  declare function paymentOrderNumber(payment: PaymentEvent): string;
205
188
  declare function buyerFromCustomer(customer: PaymentCustomer | undefined): InvoiceBuyer | undefined;
206
189
  declare function issueForPayment(api: PaymentDocumentsApi, payment: PaymentEvent, options?: IssueForPaymentOptions): Promise<IssuedDocument>;
207
- //#endregion
208
- //#region src/receipts/convert.d.ts
209
190
  interface ConvertReceiptInput {
210
191
  readonly receiptNumber: string;
211
192
  readonly buyer: InvoiceBuyer;
@@ -226,8 +207,6 @@ interface ConvertedReceipt {
226
207
  readonly invoice: InvoiceOnceResult;
227
208
  }
228
209
  declare function conversionExternalId(receiptNumber: string): string;
229
- //#endregion
230
- //#region src/taxpayer/address.d.ts
231
210
  type TaxpayerAddressType = "HQ" | "SITE" | "BRANCH" | (string & {});
232
211
  interface NavDetailedAddress {
233
212
  readonly countryCode?: string | undefined;
@@ -260,8 +239,6 @@ interface TaxpayerAddress {
260
239
  readonly formatted: string;
261
240
  readonly raw: NavDetailedAddress;
262
241
  }
263
- //#endregion
264
- //#region src/taxpayer/query-taxpayer.d.ts
265
242
  type TaxpayerIncorporation = "ORGANIZATION" | "SELF_EMPLOYED" | "TAXABLE_PERSON" | (string & {});
266
243
  interface TaxpayerTaxNumber {
267
244
  readonly taxpayerId: string;
@@ -281,8 +258,6 @@ interface TaxpayerInfo {
281
258
  readonly infoDate?: string | undefined;
282
259
  readonly requestId?: string | undefined;
283
260
  }
284
- //#endregion
285
- //#region src/taxpayer/cache.d.ts
286
261
  declare const TAXPAYER_CACHE_KEY_PREFIX = "szamlazz:taxpayer:";
287
262
  declare const DEFAULT_TAXPAYER_TTL_SECONDS = 86400;
288
263
  declare const DEFAULT_TAXPAYER_INVALID_TTL_SECONDS = 600;
@@ -291,8 +266,6 @@ interface TaxpayerCacheOptions {
291
266
  readonly ttlSeconds?: number | undefined;
292
267
  readonly invalidTtlSeconds?: number | undefined;
293
268
  }
294
- //#endregion
295
- //#region src/client.d.ts
296
269
  interface KasszaDefaults {
297
270
  readonly invoice?: InvoiceDefaults;
298
271
  readonly receipt?: ReceiptDefaults;
@@ -337,5 +310,4 @@ interface Kassza {
337
310
  issueForPayment(payment: PaymentEvent, options?: IssueForPaymentOptions): Promise<IssuedDocument>;
338
311
  }
339
312
  declare function createKassza(options?: KasszaOptions): Kassza;
340
- //#endregion
341
313
  export { ONCE_LOCK_KEY_PREFIX as $, IssuedRefundCorrection as A, DocumentDecision as B, PaymentDocumentItem as C, issueForPayment as D, buyerFromCustomer as E, RefundProposalLine as F, RegisterPaymentOnceInput as G, chooseDocument as H, correctionExternalId as I, InvoiceReference as J, RegisteredPaymentOnce as K, ChooseDocumentBuyer as L, PartialRefundMode as M, RefundItemsContext as N, paymentOrderNumber as O, RefundItemsResolver as P, LockFailureMode as Q, ChooseDocumentInput as R, IssuedReversal as S, SkippedPayment as T, ProformaReference as U, RECEIPT_MAX_GROSS_HUF as V, InvoicePdf as W, DEFAULT_LOCK_TTL_SECONDS as X, CreateOnceOptions as Y, DEFAULT_LOCK_WAIT_MS as Z, conversionExternalId as _, ReceiptsApi as a, IssuedInvoice as b, DEFAULT_TAXPAYER_INVALID_TTL_SECONDS as c, TaxpayerCacheOptions as d, OnceLockOptions as et, TaxpayerInfo as f, ConvertedReceipt as g, ConvertReceiptInput as h, KasszaOptions as i, IssuedRefundProposal as j, IssuedCorrection as k, DEFAULT_TAXPAYER_TTL_SECONDS as l, TaxpayerAddress as m, Kassza as n, TaxpayerApi as o, TaxpayerTaxNumber as p, paymentMarker as q, KasszaDefaults as r, createKassza as s, InvoicesApi as t, TAXPAYER_CACHE_KEY_PREFIX as u, IssueForPaymentOptions as v, PaymentDocumentsApi as w, IssuedReceipt as x, IssuedDocument as y, DocumentChoice as z };