kassza 0.12.0 → 0.14.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 (177) hide show
  1. package/README.en.md +48 -0
  2. package/README.md +427 -32
  3. package/agents/README.md +26 -6
  4. package/agents/api.md +218 -3
  5. package/agents/pitfalls.md +27 -3
  6. package/agents/recipes.md +280 -51
  7. package/agents/skills/kassza/SKILL.md +14 -8
  8. package/agents/skills/migrate-from-szamlazz-js/SKILL.md +39 -0
  9. package/dist/batch/index.cjs +346 -0
  10. package/dist/batch/index.d.cts +91 -0
  11. package/dist/batch/index.d.ts +91 -0
  12. package/dist/batch/index.js +339 -0
  13. package/dist/cli.cjs +643 -0
  14. package/dist/cli.d.cts +1 -0
  15. package/dist/cli.d.ts +1 -0
  16. package/dist/cli.js +643 -0
  17. package/dist/client-CLFvJCVW.cjs +1452 -0
  18. package/dist/{client-CL3fuH6A.js → client-Cvf-hTz_.js} +306 -515
  19. package/dist/client-DeWWQ-RZ.d.ts +341 -0
  20. package/dist/client-SVZu25MB.d.cts +341 -0
  21. package/dist/context-CFNKzStE.d.cts +449 -0
  22. package/dist/context-kb33TgzE.d.ts +449 -0
  23. package/dist/cookie-stores/index.cjs +21 -150
  24. package/dist/cookie-stores/index.d.cts +4 -63
  25. package/dist/cookie-stores/index.d.ts +4 -63
  26. package/dist/cookie-stores/index.js +3 -144
  27. package/dist/create-CflXrPip.js +204 -0
  28. package/dist/create-CvUvLUaT.cjs +257 -0
  29. package/dist/{create-once-D0pwuenl.cjs → create-once-9yxR_Er_.cjs} +291 -33
  30. package/dist/create-once-Bh6fOWkW.d.cts +20 -0
  31. package/dist/{create-once-CqdYmQD8.js → create-once-Ca2gMk1h.js} +250 -34
  32. package/dist/create-once-VKp0tVow.d.ts +20 -0
  33. package/dist/{crypto-B8lERvR1.cjs → crypto-Dpn4FHQ6.cjs} +9 -0
  34. package/dist/{crypto-DK_osBVy.js → crypto-usDg8L2K.js} +4 -1
  35. package/dist/data-link/index.cjs +232 -0
  36. package/dist/data-link/index.d.cts +29 -0
  37. package/dist/data-link/index.d.ts +29 -0
  38. package/dist/data-link/index.js +224 -0
  39. package/dist/delegation/index.cjs +35 -34
  40. package/dist/delegation/index.d.cts +2 -1
  41. package/dist/delegation/index.d.ts +2 -1
  42. package/dist/delegation/index.js +4 -3
  43. package/dist/{errors-DLrb0g64.js → errors-DtN4g5Z9.js} +9 -1
  44. package/dist/{errors-DxeuTslP.cjs → errors-EE96_6D_.cjs} +20 -0
  45. package/dist/get-BdMTseh4.cjs +271 -0
  46. package/dist/get-Byc9T5WO.d.cts +151 -0
  47. package/dist/get-Byc9T5WO.d.ts +151 -0
  48. package/dist/get-CZEShCcj.js +260 -0
  49. package/dist/index-BhUPY_EH.d.cts +109 -0
  50. package/dist/index-BqGgQ4t3.d.ts +109 -0
  51. package/dist/{index-CYAGCdKJ.d.cts → index-C-7yWV7L.d.cts} +24 -1
  52. package/dist/{index-CYAGCdKJ.d.ts → index-C-7yWV7L.d.ts} +24 -1
  53. package/dist/index.cjs +19 -5
  54. package/dist/index.d.cts +11 -19
  55. package/dist/index.d.ts +11 -19
  56. package/dist/index.js +6 -6
  57. package/dist/ipn/index.cjs +26 -5
  58. package/dist/ipn/index.d.cts +12 -1
  59. package/dist/ipn/index.d.ts +12 -1
  60. package/dist/ipn/index.js +26 -6
  61. package/dist/issue-Bin4tKD_.cjs +988 -0
  62. package/dist/issue-DMA1Nbr1.js +905 -0
  63. package/dist/journal/index.cjs +454 -0
  64. package/dist/journal/index.d.cts +18 -0
  65. package/dist/journal/index.d.ts +18 -0
  66. package/dist/journal/index.js +445 -0
  67. package/dist/journal-DvI81Kt7.d.cts +114 -0
  68. package/dist/journal-Y9qrIB8G.d.ts +114 -0
  69. package/dist/mcp/index.cjs +10 -0
  70. package/dist/mcp/index.d.cts +71 -0
  71. package/dist/mcp/index.d.ts +71 -0
  72. package/dist/mcp/index.js +2 -0
  73. package/dist/money/index.cjs +2 -1
  74. package/dist/money/index.d.cts +2 -2
  75. package/dist/money/index.d.ts +2 -2
  76. package/dist/money/index.js +2 -2
  77. package/dist/{money-DAA7OwiO.js → money-Cw457SD6.js} +120 -12
  78. package/dist/{money-DrhGkWHW.cjs → money-K9j0wPit.cjs} +124 -10
  79. package/dist/nav/index.cjs +1046 -0
  80. package/dist/nav/index.d.cts +247 -0
  81. package/dist/nav/index.d.ts +247 -0
  82. package/dist/nav/index.js +1012 -0
  83. package/dist/nav-BNbc8U0R.cjs +203 -0
  84. package/dist/nav-BcCerwWS.js +156 -0
  85. package/dist/node/index.cjs +124 -0
  86. package/dist/node/index.d.cts +35 -0
  87. package/dist/node/index.d.ts +35 -0
  88. package/dist/node/index.js +120 -0
  89. package/dist/observe/index.cjs +311 -0
  90. package/dist/observe/index.d.cts +53 -0
  91. package/dist/observe/index.d.ts +53 -0
  92. package/dist/observe/index.js +303 -0
  93. package/dist/once-BN_3B5OF.cjs +103 -0
  94. package/dist/once-CqqZxsXG.js +74 -0
  95. package/dist/parse-Cr7yQ3_z.js +291 -0
  96. package/dist/parse-DOA2XQ3e.cjs +380 -0
  97. package/dist/payments/barion.cjs +26 -2
  98. package/dist/payments/barion.d.cts +2 -2
  99. package/dist/payments/barion.d.ts +2 -2
  100. package/dist/payments/barion.js +26 -2
  101. package/dist/payments/index.cjs +7 -2
  102. package/dist/payments/index.d.cts +4 -4
  103. package/dist/payments/index.d.ts +4 -4
  104. package/dist/payments/index.js +3 -3
  105. package/dist/payments/paypal.cjs +16 -2
  106. package/dist/payments/paypal.d.cts +2 -2
  107. package/dist/payments/paypal.d.ts +2 -2
  108. package/dist/payments/paypal.js +16 -2
  109. package/dist/payments/revolut.cjs +17 -3
  110. package/dist/payments/revolut.d.cts +2 -2
  111. package/dist/payments/revolut.d.ts +2 -2
  112. package/dist/payments/revolut.js +17 -3
  113. package/dist/payments/simplepay.cjs +37 -5
  114. package/dist/payments/simplepay.d.cts +2 -2
  115. package/dist/payments/simplepay.d.ts +2 -2
  116. package/dist/payments/simplepay.js +37 -5
  117. package/dist/payments/stripe.cjs +20 -3
  118. package/dist/payments/stripe.d.cts +2 -2
  119. package/dist/payments/stripe.d.ts +2 -2
  120. package/dist/payments/stripe.js +20 -3
  121. package/dist/push-BXj0Sf0Z.d.ts +52 -0
  122. package/dist/push-D4nNbCNV.d.cts +52 -0
  123. package/dist/reference-B5TATqb5.js +124 -0
  124. package/dist/reference-BIdYMK0t.cjs +183 -0
  125. package/dist/reports/index.cjs +11 -164
  126. package/dist/reports/index.d.cts +1 -1
  127. package/dist/reports/index.d.ts +1 -1
  128. package/dist/reports/index.js +1 -154
  129. package/dist/request-body-CH6ZGOrq.cjs +34 -0
  130. package/dist/request-body-uZHMRlQr.js +29 -0
  131. package/dist/serialize-B2eFh3D-.js +219 -0
  132. package/dist/serialize-CquIsxA-.cjs +290 -0
  133. package/dist/server-BrJUbXs7.js +1505 -0
  134. package/dist/server-Dw9j8Mnd.cjs +1558 -0
  135. package/dist/session-Ckl5eJhV.d.ts +7 -0
  136. package/dist/{session-CKOuE6Jc.cjs → session-DeM5vjvC.cjs} +69 -13
  137. package/dist/{session-rMKaJcmq.js → session-SaEEXu2N.js} +58 -14
  138. package/dist/session-YbChChx7.d.cts +7 -0
  139. package/dist/storage/fs.cjs +1 -1
  140. package/dist/storage/fs.js +1 -1
  141. package/dist/storage/index.cjs +1 -1
  142. package/dist/storage/index.js +1 -1
  143. package/dist/store-C1rHd9DB.d.cts +19 -0
  144. package/dist/store-C1rHd9DB.d.ts +19 -0
  145. package/dist/stores/index.cjs +24 -0
  146. package/dist/stores/index.d.cts +4 -0
  147. package/dist/stores/index.d.ts +4 -0
  148. package/dist/stores/index.js +3 -0
  149. package/dist/stores-BNrS0dWl.cjs +506 -0
  150. package/dist/stores-DhjGBrl_.js +441 -0
  151. package/dist/testing/index.cjs +1500 -15
  152. package/dist/testing/index.d.cts +198 -3
  153. package/dist/testing/index.d.ts +198 -3
  154. package/dist/testing/index.js +1498 -15
  155. package/dist/{types-COf1LAD-.d.ts → types-B1A8mUIE.d.cts} +14 -2
  156. package/dist/{types-COf1LAD-.d.cts → types-ByAEvGsZ.d.ts} +14 -2
  157. package/dist/{types-k--zHf4l.d.ts → types-D1zDOH_F.d.ts} +1 -1
  158. package/dist/{types-DH8QoNZK.d.cts → types-lnKkQdot.d.cts} +1 -1
  159. package/dist/warnings-B3DXnveC.d.cts +31 -0
  160. package/dist/warnings-B3DXnveC.d.ts +31 -0
  161. package/dist/warnings-DeIw5RFj.cjs +20 -0
  162. package/dist/warnings-DwTl5J-2.js +15 -0
  163. package/dist/{webhook-D4lvtex1.js → webhook-CQVShAfI.js} +47 -26
  164. package/dist/{webhook-C76bV-4R.cjs → webhook-Ckj-_hPD.cjs} +70 -25
  165. package/dist/webhook-CmdhGiH5.d.cts +11 -0
  166. package/dist/webhook-D6lEejob.d.ts +11 -0
  167. package/llms.txt +6 -5
  168. package/package.json +134 -4
  169. package/dist/client-CickRRFr.d.ts +0 -838
  170. package/dist/client-CsmGIFRS.cjs +0 -1637
  171. package/dist/client-DvWZoX_E.d.cts +0 -838
  172. package/dist/issue-BsyYdrIG.cjs +0 -1531
  173. package/dist/issue-C6Fcjvln.js +0 -1274
  174. package/dist/session-Dm_45x8K.d.cts +0 -11
  175. package/dist/session-Dm_45x8K.d.ts +0 -11
  176. package/dist/webhook-CfaDgcL0.d.cts +0 -6
  177. package/dist/webhook-q2OzNwd7.d.ts +0 -6
@@ -1,838 +0,0 @@
1
- import { t as CookieStore } from "./session-Dm_45x8K.js";
2
- import { t as DateInput } from "./dates-9zvESP0i.js";
3
- import { _ as VatRate, o as ItemAmounts, s as ItemPriceInput } from "./index-CYAGCdKJ.js";
4
- import { h as SendReceiptInput, i as ReceiptDefaults, m as ReverseReceiptInput, n as GetReceiptInput, r as Receipt, s as ReceiptOnlyVatCode, t as CreateReceiptInput } from "./types-k--zHf4l.js";
5
- import { i as PaymentEvent, r as PaymentCustomer, s as PaymentLineItem } from "./types-COf1LAD-.js";
6
- //#region src/core/actions.d.ts
7
- declare const SZAMLAZZ_AGENT_URL = "https://www.szamlazz.hu/szamla/";
8
- declare const AGENT_ACTIONS: {
9
- readonly createInvoice: "action-xmlagentxmlfile";
10
- readonly reverseInvoice: "action-szamla_agent_st";
11
- readonly registerPayment: "action-szamla_agent_kifiz";
12
- readonly getInvoicePdf: "action-szamla_agent_pdf";
13
- readonly getInvoiceXml: "action-szamla_agent_xml";
14
- readonly deleteProforma: "action-szamla_agent_dijbekero_torlese";
15
- readonly createReceipt: "action-szamla_agent_nyugta_create";
16
- readonly reverseReceipt: "action-szamla_agent_nyugta_storno";
17
- readonly getReceipt: "action-szamla_agent_nyugta_get";
18
- readonly sendReceipt: "action-szamla_agent_nyugta_send";
19
- readonly queryTaxpayer: "action-szamla_agent_taxpayer";
20
- readonly connectPrincipal: "action-agent_ceg_mb";
21
- };
22
- type AgentAction = keyof typeof AGENT_ACTIONS;
23
- declare const MAX_INVOICE_ATTACHMENTS = 5;
24
- //#endregion
25
- //#region src/core/errors.d.ts
26
- type SzamlazzErrorCategory = "auth" | "account" | "validation" | "duplicate" | "partial_success" | "not_found" | "maintenance" | "rate_limit" | "attempt_limit" | "network" | "timeout" | "configuration" | "unexpected_response" | "unknown";
27
- interface AgentErrorCodeInfo {
28
- readonly message: string;
29
- readonly category: SzamlazzErrorCategory;
30
- readonly hint?: string;
31
- }
32
- declare const AGENT_ERROR_CODES: Readonly<Record<number, AgentErrorCodeInfo>>;
33
- interface SzamlazzErrorOptions {
34
- readonly category: SzamlazzErrorCategory;
35
- readonly code?: number | undefined;
36
- readonly hint?: string | undefined;
37
- readonly action?: AgentAction | undefined;
38
- readonly httpStatus?: number | undefined;
39
- readonly rawResponse?: string | undefined;
40
- readonly details?: Readonly<Record<string, string>> | undefined;
41
- readonly cause?: unknown;
42
- }
43
- declare class SzamlazzError extends Error {
44
- override readonly name: string;
45
- readonly code: number | undefined;
46
- readonly category: SzamlazzErrorCategory;
47
- readonly retryable: boolean;
48
- readonly hint: string | undefined;
49
- readonly action: AgentAction | undefined;
50
- readonly httpStatus: number | undefined;
51
- readonly rawResponse: string | undefined;
52
- readonly details: Readonly<Record<string, string>> | undefined;
53
- constructor(message: string, options: SzamlazzErrorOptions);
54
- get isDuplicate(): boolean;
55
- get isNotFound(): boolean;
56
- }
57
- declare function isSzamlazzError(error: unknown): error is SzamlazzError;
58
- declare function suggestedPrefix(error: unknown): string | undefined;
59
- //#endregion
60
- //#region src/invoices/create-types.d.ts
61
- type InvoiceType = "invoice" | "proforma" | "advance" | "final" | "corrective" | "deliveryNote";
62
- declare const INVOICE_LANGUAGES: readonly ["hu", "en", "de", "it", "ro", "sk", "hr", "fr", "es", "cz", "pl", "bg", "nl", "ru", "si"];
63
- type InvoiceLanguage = (typeof INVOICE_LANGUAGES)[number];
64
- declare const INVOICE_TEMPLATES: readonly ["SzlaMost", "SzlaAlap", "SzlaNoEnv", "Szla8cm", "SzlaTomb", "SzlaFuvarlevelesAlap"];
65
- type InvoiceTemplate = (typeof INVOICE_TEMPLATES)[number];
66
- declare const CURRENCIES: readonly ["HUF", "Ft", "EUR", "CHF", "USD", "AED", "ALL", "AUD", "BAM", "BGN", "BRL", "CAD", "CNY", "CZK", "DKK", "EEK", "GBP", "HKD", "HRK", "IDR", "ILS", "INR", "ISK", "JPY", "KRW", "KWD", "KSH", "KZT", "LTL", "LVL", "MXN", "MYR", "NOK", "NZD", "PHP", "PLN", "RON", "RSD", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "UAH", "VND", "ZAR"];
67
- type Currency = (typeof CURRENCIES)[number] | (string & {});
68
- type TaxpayerType = "nonEuBusiness" | "euBusiness" | "hungarianTaxNumber" | "unknown" | "noTaxNumber";
69
- type CourierService = "TOF" | "PPP" | "SPRINTER" | "FOXPOST" | "MPL" | "GLS" | "EMPTY" | (string & {});
70
- interface InvoiceSeller {
71
- readonly bank?: string | undefined;
72
- readonly bankAccount?: string | undefined;
73
- readonly emailReplyTo?: string | undefined;
74
- readonly emailSubject?: string | undefined;
75
- readonly emailText?: string | undefined;
76
- readonly signatoryName?: string | undefined;
77
- }
78
- interface InvoicePostalAddress {
79
- readonly name?: string | undefined;
80
- readonly country?: string | undefined;
81
- readonly zip?: string | undefined;
82
- readonly city?: string | undefined;
83
- readonly address?: string | undefined;
84
- }
85
- interface BuyerLedger {
86
- readonly bookingDate?: DateInput | undefined;
87
- readonly buyerId?: string | undefined;
88
- readonly ledgerAccount?: string | undefined;
89
- readonly continuousFulfillment?: boolean | undefined;
90
- readonly settlementPeriodStart?: DateInput | undefined;
91
- readonly settlementPeriodEnd?: DateInput | undefined;
92
- }
93
- interface InvoiceBuyer {
94
- readonly name: string;
95
- readonly country?: string | undefined;
96
- readonly zip: string;
97
- readonly city: string;
98
- readonly address: string;
99
- readonly email?: string | undefined;
100
- readonly sendEmail?: boolean | undefined;
101
- readonly taxpayerType?: TaxpayerType | undefined;
102
- readonly taxNumber?: string | undefined;
103
- readonly groupTaxNumber?: string | undefined;
104
- readonly euTaxNumber?: string | undefined;
105
- readonly postal?: InvoicePostalAddress | undefined;
106
- readonly ledger?: BuyerLedger | undefined;
107
- readonly identifier?: string | undefined;
108
- readonly signatoryName?: string | undefined;
109
- readonly phone?: string | undefined;
110
- readonly comment?: string | undefined;
111
- }
112
- interface ItemLedger {
113
- readonly economicEvent?: string | undefined;
114
- readonly vatEconomicEvent?: string | undefined;
115
- readonly revenueLedgerAccount?: string | undefined;
116
- readonly vatLedgerAccount?: string | undefined;
117
- readonly settlementPeriodStart?: DateInput | undefined;
118
- readonly settlementPeriodEnd?: DateInput | undefined;
119
- }
120
- type InvoiceItemInput = ItemPriceInput & {
121
- readonly name: string;
122
- readonly identifier?: string | undefined;
123
- readonly unit?: string | undefined;
124
- readonly comment?: string | undefined;
125
- readonly ledger?: ItemLedger | undefined;
126
- readonly dataDeletionCode?: number | undefined;
127
- readonly marginVatBase?: number | undefined;
128
- };
129
- interface TransOFlexWaybill {
130
- readonly id?: string | undefined;
131
- readonly shipmentId?: string | undefined;
132
- readonly packageCount?: number | undefined;
133
- readonly countryCode?: string | undefined;
134
- readonly zip?: string | undefined;
135
- readonly service?: string | undefined;
136
- }
137
- interface PickPackPointWaybill {
138
- readonly barcodePrefix?: string | undefined;
139
- readonly barcodePostfix?: string | undefined;
140
- }
141
- interface SprinterWaybill {
142
- readonly id?: string | undefined;
143
- readonly senderCode?: string | undefined;
144
- readonly directionCode?: string | undefined;
145
- readonly packageCount?: number | undefined;
146
- readonly barcodePostfix?: string | undefined;
147
- readonly deliveryTime?: string | undefined;
148
- }
149
- interface MplWaybill {
150
- readonly customerCode: string;
151
- readonly barcode: string;
152
- readonly weight: string | number;
153
- readonly services?: string | undefined;
154
- readonly declaredValue?: number | undefined;
155
- }
156
- interface Waybill {
157
- readonly courier?: CourierService | undefined;
158
- readonly barcode?: string | undefined;
159
- readonly comment?: string | undefined;
160
- readonly transOFlex?: TransOFlexWaybill | undefined;
161
- readonly pickPackPoint?: PickPackPointWaybill | undefined;
162
- readonly sprinter?: SprinterWaybill | undefined;
163
- readonly mpl?: MplWaybill | undefined;
164
- }
165
- interface InvoiceDefaults {
166
- readonly seller?: InvoiceSeller | undefined;
167
- readonly prefix?: string | undefined;
168
- readonly language?: InvoiceLanguage | undefined;
169
- readonly currency?: Currency | undefined;
170
- readonly exchangeBank?: string | undefined;
171
- readonly paymentMethod?: string | undefined;
172
- readonly paymentDueInDays?: number | undefined;
173
- readonly eInvoice?: boolean | undefined;
174
- readonly downloadPdf?: boolean | undefined;
175
- readonly template?: InvoiceTemplate | undefined;
176
- readonly sendEmail?: boolean | undefined;
177
- readonly logoExtra?: string | undefined;
178
- readonly simpleItems?: boolean | undefined;
179
- readonly euVat?: boolean | undefined;
180
- readonly aggregator?: string | undefined;
181
- readonly guardian?: boolean | undefined;
182
- readonly articleIdentifierInvoice?: boolean | undefined;
183
- }
184
- interface CreateInvoiceBase {
185
- readonly buyer: InvoiceBuyer;
186
- readonly items: readonly InvoiceItemInput[];
187
- readonly seller?: InvoiceSeller | undefined;
188
- readonly issueDate?: DateInput | undefined;
189
- readonly fulfillmentDate?: DateInput | undefined;
190
- readonly dueDate?: DateInput | undefined;
191
- readonly paymentDueInDays?: number | undefined;
192
- readonly paymentMethod?: string | undefined;
193
- readonly currency?: Currency | undefined;
194
- readonly exchangeRate?: number | undefined;
195
- readonly exchangeBank?: string | undefined;
196
- readonly language?: InvoiceLanguage | undefined;
197
- readonly comment?: string | undefined;
198
- readonly orderNumber?: string | undefined;
199
- readonly proformaNumber?: string | undefined;
200
- readonly prefix?: string | undefined;
201
- readonly paid?: boolean | undefined;
202
- readonly eInvoice?: boolean | undefined;
203
- readonly downloadPdf?: boolean | undefined;
204
- readonly externalId?: string | undefined;
205
- readonly template?: InvoiceTemplate | undefined;
206
- readonly simpleItems?: boolean | undefined;
207
- readonly logoExtra?: string | undefined;
208
- readonly paymentCorrection?: number | undefined;
209
- readonly marginVat?: boolean | undefined;
210
- readonly euVat?: boolean | undefined;
211
- readonly aggregator?: string | undefined;
212
- readonly guardian?: boolean | undefined;
213
- readonly articleIdentifierInvoice?: boolean | undefined;
214
- readonly waybill?: Waybill | undefined;
215
- readonly attachments?: readonly AgentAttachment[] | undefined;
216
- }
217
- interface StandardInvoiceInput extends CreateInvoiceBase {
218
- readonly type?: "invoice" | "proforma" | "advance" | "deliveryNote" | undefined;
219
- }
220
- interface FinalInvoiceInput extends CreateInvoiceBase {
221
- readonly type: "final";
222
- readonly advanceInvoiceNumber?: string | undefined;
223
- }
224
- interface CorrectiveInvoiceInput extends CreateInvoiceBase {
225
- readonly type: "corrective";
226
- readonly correctedInvoiceNumber: string;
227
- }
228
- type CreateInvoiceInput = StandardInvoiceInput | FinalInvoiceInput | CorrectiveInvoiceInput;
229
- type CreatedInvoiceItem = ItemAmounts & {
230
- readonly name: string;
231
- };
232
- interface CreatedInvoice {
233
- readonly number: string;
234
- readonly netTotal: number;
235
- readonly grossTotal: number;
236
- readonly outstanding?: number | undefined;
237
- readonly buyerAccountUrl?: string | undefined;
238
- readonly pdf?: Uint8Array | undefined;
239
- readonly items: readonly CreatedInvoiceItem[];
240
- }
241
- interface InvoicePreview {
242
- readonly pdf: Uint8Array;
243
- readonly netTotal: number;
244
- readonly grossTotal: number;
245
- readonly items: readonly CreatedInvoiceItem[];
246
- }
247
- //#endregion
248
- //#region src/core/response.d.ts
249
- interface AgentResponse {
250
- readonly action: AgentAction;
251
- readonly status: number;
252
- readonly headers: Headers;
253
- readonly body: Uint8Array;
254
- readonly isPdf: boolean;
255
- text(): string;
256
- }
257
- //#endregion
258
- //#region src/core/xml/serialize.d.ts
259
- type XmlScalar = string | number | boolean;
260
- type XmlContent = XmlScalar | null | undefined | readonly XmlChild[];
261
- type XmlChild = XmlNode | false | null | undefined;
262
- type XmlAttributes = Readonly<Record<string, string>>;
263
- interface XmlNode {
264
- readonly name: string;
265
- readonly content: XmlContent;
266
- readonly attributes?: XmlAttributes | undefined;
267
- }
268
- //#endregion
269
- //#region src/invoices/payment.d.ts
270
- interface PaymentEntry {
271
- readonly date?: DateInput | undefined;
272
- readonly method: string;
273
- readonly amount: number;
274
- readonly description?: string | undefined;
275
- }
276
- interface PaymentTarget {
277
- readonly invoiceNumber: string;
278
- readonly taxNumber?: string | undefined;
279
- }
280
- interface RegisterPaymentsInput extends PaymentTarget {
281
- readonly additive?: boolean | undefined;
282
- readonly payments: readonly PaymentEntry[];
283
- }
284
- interface RegisterSinglePaymentInput extends PaymentTarget {
285
- readonly additive?: boolean | undefined;
286
- readonly amount: number;
287
- readonly method?: string | undefined;
288
- readonly date?: DateInput | undefined;
289
- readonly description?: string | undefined;
290
- }
291
- type RegisterPaymentInput = RegisterPaymentsInput | RegisterSinglePaymentInput;
292
- type ClearPaymentsInput = string | PaymentTarget;
293
- interface RegisteredPayment {
294
- readonly invoiceNumber: string;
295
- readonly netTotal?: number | undefined;
296
- readonly grossTotal?: number | undefined;
297
- readonly outstanding?: number | undefined;
298
- readonly buyerAccountUrl?: string | undefined;
299
- }
300
- //#endregion
301
- //#region src/invoices/reverse.d.ts
302
- interface ReverseInvoiceEmail {
303
- readonly replyTo?: string | undefined;
304
- readonly subject?: string | undefined;
305
- readonly text?: string | undefined;
306
- }
307
- interface ReverseInvoiceBuyer {
308
- readonly email?: string | undefined;
309
- readonly taxNumber?: string | undefined;
310
- readonly euTaxNumber?: string | undefined;
311
- }
312
- interface ReverseInvoiceOptions {
313
- readonly invoiceNumber: string;
314
- readonly issueDate?: DateInput | undefined;
315
- readonly fulfillmentDate?: DateInput | undefined;
316
- readonly comment?: string | undefined;
317
- readonly template?: InvoiceTemplate | undefined;
318
- readonly eInvoice?: boolean | undefined;
319
- readonly downloadPdf?: boolean | undefined;
320
- readonly externalId?: string | undefined;
321
- readonly email?: ReverseInvoiceEmail | undefined;
322
- readonly buyer?: ReverseInvoiceBuyer | undefined;
323
- }
324
- type ReverseInvoiceInput = string | ReverseInvoiceOptions;
325
- interface ReversedInvoice {
326
- readonly number: string;
327
- readonly netTotal?: number | undefined;
328
- readonly grossTotal?: number | undefined;
329
- readonly outstanding?: number | undefined;
330
- readonly buyerAccountUrl?: string | undefined;
331
- readonly pdf?: Uint8Array | undefined;
332
- }
333
- //#endregion
334
- //#region src/core/document-events.d.ts
335
- interface InvoiceCreatedEvent {
336
- readonly kind: "invoice";
337
- readonly action: "created";
338
- readonly number: string;
339
- readonly document: CreatedInvoice;
340
- readonly input: CreateInvoiceInput;
341
- }
342
- interface InvoiceReversedEvent {
343
- readonly kind: "invoice";
344
- readonly action: "reversed";
345
- readonly number: string;
346
- readonly reversedNumber: string;
347
- readonly document: ReversedInvoice;
348
- }
349
- interface InvoicePaymentEvent {
350
- readonly kind: "invoice";
351
- readonly action: "payment";
352
- readonly number: string;
353
- readonly document: RegisteredPayment;
354
- }
355
- interface ReceiptCreatedEvent {
356
- readonly kind: "receipt";
357
- readonly action: "created";
358
- readonly number: string;
359
- readonly document: Receipt;
360
- }
361
- interface ReceiptReversedEvent {
362
- readonly kind: "receipt";
363
- readonly action: "reversed";
364
- readonly number: string;
365
- readonly reversedNumber: string;
366
- readonly document: Receipt;
367
- }
368
- type DocumentEvent = InvoiceCreatedEvent | InvoiceReversedEvent | InvoicePaymentEvent | ReceiptCreatedEvent | ReceiptReversedEvent;
369
- type DocumentHook = (event: DocumentEvent) => void | Promise<void>;
370
- //#endregion
371
- //#region src/core/context.d.ts
372
- interface AgentAttachment {
373
- readonly filename: string;
374
- readonly content: Uint8Array | ArrayBuffer | Blob | string;
375
- readonly contentType?: string;
376
- }
377
- interface AgentRequestEvent {
378
- readonly action: AgentAction;
379
- readonly attempt: number;
380
- }
381
- interface AgentResponseEvent extends AgentRequestEvent {
382
- readonly status: number;
383
- readonly durationMs: number;
384
- }
385
- interface AgentErrorEvent extends AgentRequestEvent {
386
- readonly error: SzamlazzError;
387
- readonly willRetry: boolean;
388
- }
389
- interface SzamlazzHooks {
390
- readonly onRequest?: (event: AgentRequestEvent) => void;
391
- readonly onResponse?: (event: AgentResponseEvent) => void;
392
- readonly onError?: (event: AgentErrorEvent) => void;
393
- readonly onDocument?: DocumentHook;
394
- }
395
- interface SzamlazzOptions {
396
- readonly agentKey?: string;
397
- readonly username?: string;
398
- readonly password?: string;
399
- readonly endpoint?: string;
400
- readonly fetch?: typeof globalThis.fetch;
401
- readonly timeoutMs?: number;
402
- readonly maxAttempts?: number;
403
- readonly retryDelayMs?: number;
404
- readonly cookieStore?: CookieStore | false;
405
- readonly attemptLedger?: CookieStore | undefined;
406
- readonly maintenanceCooldownMs?: number | undefined;
407
- readonly hooks?: SzamlazzHooks;
408
- }
409
- interface RequestOptions {
410
- readonly signal?: AbortSignal | undefined;
411
- }
412
- interface AgentRequest {
413
- readonly action: AgentAction;
414
- readonly xml: string;
415
- readonly attachments?: readonly AgentAttachment[];
416
- readonly signal?: AbortSignal | undefined;
417
- readonly safeToRetry?: boolean;
418
- }
419
- interface AgentContext {
420
- readonly credentials: readonly XmlNode[];
421
- execute<T>(request: AgentRequest, parse: (response: AgentResponse) => T | Promise<T>): Promise<T>;
422
- resetSession(): Promise<void>;
423
- resetAttempts(key: string): Promise<void>;
424
- }
425
- //#endregion
426
- //#region src/core/once.d.ts
427
- interface CreateOnceOptions extends RequestOptions {
428
- readonly lookupFirst?: boolean | undefined;
429
- readonly matchOrderNumber?: boolean | undefined;
430
- readonly recoveryDelayMs?: number | undefined;
431
- }
432
- //#endregion
433
- //#region src/invoices/reference.d.ts
434
- type InvoiceReference = string | {
435
- readonly invoiceNumber: string;
436
- } | {
437
- readonly orderNumber: string;
438
- } | {
439
- readonly externalId: string;
440
- };
441
- //#endregion
442
- //#region src/invoices/get.d.ts
443
- interface GetInvoiceOptions {
444
- readonly includePdf?: boolean | undefined;
445
- }
446
- type InvoiceDocumentType = "invoice" | "proforma" | "advance" | "final" | "corrective" | "reversal" | "deliveryNote" | "unknown";
447
- interface InvoiceDetailsAddress {
448
- readonly name?: string | undefined;
449
- readonly country?: string | undefined;
450
- readonly zip?: string | undefined;
451
- readonly city?: string | undefined;
452
- readonly address?: string | undefined;
453
- }
454
- interface InvoiceDetailsBank {
455
- readonly name?: string | undefined;
456
- readonly accountNumber?: string | undefined;
457
- }
458
- interface InvoiceDetailsSeller {
459
- readonly id?: number | undefined;
460
- readonly name: string;
461
- readonly address?: InvoiceDetailsAddress | undefined;
462
- readonly postalAddress?: InvoiceDetailsAddress | undefined;
463
- readonly taxNumber?: string | undefined;
464
- readonly groupTaxNumber?: string | undefined;
465
- readonly euTaxNumber?: string | undefined;
466
- readonly bank?: InvoiceDetailsBank | undefined;
467
- }
468
- interface InvoiceDetailsHeader {
469
- readonly id?: number | undefined;
470
- readonly number: string;
471
- readonly economicEventId?: number | undefined;
472
- readonly sourceSystem?: number | undefined;
473
- readonly registrationNumber?: string | undefined;
474
- readonly type: InvoiceDocumentType;
475
- readonly typeCode: string;
476
- readonly eInvoice: boolean;
477
- readonly appearanceCode?: number | undefined;
478
- readonly referencedInvoiceNumber?: string | undefined;
479
- readonly referencedProformaNumber?: string | undefined;
480
- readonly issueDate: string;
481
- readonly fulfillmentDate?: string | undefined;
482
- readonly dueDate?: string | undefined;
483
- readonly paymentMethod?: string | undefined;
484
- readonly unifiedPaymentMethod?: string | undefined;
485
- readonly cash?: boolean | undefined;
486
- readonly orderNumber?: string | undefined;
487
- readonly language?: string | undefined;
488
- readonly currency?: string | undefined;
489
- readonly exchangeBank?: string | undefined;
490
- readonly exchangeRate?: number | undefined;
491
- readonly comment?: string | undefined;
492
- readonly vatType?: string | undefined;
493
- readonly cashAccounting?: boolean | undefined;
494
- readonly kata?: boolean | undefined;
495
- readonly kataLedger?: boolean | undefined;
496
- readonly email?: string | undefined;
497
- readonly test?: boolean | undefined;
498
- readonly reversed?: boolean | undefined;
499
- }
500
- interface InvoiceDetailsBuyerLedger {
501
- readonly ledgerAccount?: string | undefined;
502
- readonly buyerId?: string | undefined;
503
- readonly bookingDate?: string | undefined;
504
- readonly continuousFulfillment?: boolean | undefined;
505
- readonly settlementPeriodStart?: string | undefined;
506
- readonly settlementPeriodEnd?: string | undefined;
507
- }
508
- interface InvoiceDetailsBuyer {
509
- readonly id?: number | undefined;
510
- readonly name: string;
511
- readonly identifier?: string | undefined;
512
- readonly address?: InvoiceDetailsAddress | undefined;
513
- readonly postalAddress?: InvoiceDetailsAddress | undefined;
514
- readonly email?: string | undefined;
515
- readonly taxNumber?: string | undefined;
516
- readonly groupTaxNumber?: string | undefined;
517
- readonly euTaxNumber?: string | undefined;
518
- readonly location?: number | undefined;
519
- readonly privatePerson?: boolean | undefined;
520
- readonly ledger?: InvoiceDetailsBuyerLedger | undefined;
521
- }
522
- interface InvoiceDetailsItemLedger {
523
- readonly revenueLedgerAccount?: string | undefined;
524
- readonly vatLedgerAccount?: string | undefined;
525
- readonly economicEvent?: string | undefined;
526
- readonly vatEconomicEvent?: string | undefined;
527
- readonly settlementPeriodStart?: string | undefined;
528
- readonly settlementPeriodEnd?: string | undefined;
529
- }
530
- interface InvoiceDetailsItem {
531
- readonly name: string;
532
- readonly identifier?: string | undefined;
533
- readonly quantity: number;
534
- readonly unit?: string | undefined;
535
- readonly netUnitPrice: number;
536
- readonly vat: number;
537
- readonly vatCode?: string | undefined;
538
- readonly netAmount: number;
539
- readonly marginVatBase?: number | undefined;
540
- readonly vatAmount: number;
541
- readonly grossAmount: number;
542
- readonly comment?: string | undefined;
543
- readonly position?: number | undefined;
544
- readonly ledger?: InvoiceDetailsItemLedger | undefined;
545
- }
546
- interface InvoiceDetailsFinancialItem {
547
- readonly name: string;
548
- readonly vat: number;
549
- readonly vatCode?: string | undefined;
550
- readonly netAmount: number;
551
- readonly vatAmount: number;
552
- readonly grossAmount: number;
553
- readonly settlementPeriodStart?: string | undefined;
554
- readonly settlementPeriodEnd?: string | undefined;
555
- readonly vatDeduction?: number | undefined;
556
- readonly labels: readonly string[];
557
- }
558
- interface InvoiceDetailsVatTotal {
559
- readonly vat: number;
560
- readonly vatCode?: string | undefined;
561
- readonly netAmount: number;
562
- readonly vatAmount: number;
563
- readonly grossAmount: number;
564
- }
565
- interface InvoiceDetailsTotals {
566
- readonly netAmount: number;
567
- readonly vatAmount: number;
568
- readonly grossAmount: number;
569
- readonly byVat: readonly InvoiceDetailsVatTotal[];
570
- }
571
- interface InvoiceDetailsPayment {
572
- readonly date: string;
573
- readonly method: string;
574
- readonly amount: number;
575
- readonly comment?: string | undefined;
576
- readonly bankAccountNumber?: string | undefined;
577
- readonly bankTransactionId?: number | undefined;
578
- readonly exchangeRate?: number | undefined;
579
- }
580
- interface InvoiceDetails {
581
- readonly seller: InvoiceDetailsSeller;
582
- readonly header: InvoiceDetailsHeader;
583
- readonly buyer: InvoiceDetailsBuyer;
584
- readonly items: readonly InvoiceDetailsItem[];
585
- readonly financialItems: readonly InvoiceDetailsFinancialItem[];
586
- readonly labels: readonly string[];
587
- readonly totals: InvoiceDetailsTotals;
588
- readonly payments: readonly InvoiceDetailsPayment[];
589
- readonly pdf?: Uint8Array | undefined;
590
- }
591
- //#endregion
592
- //#region src/invoices/create-once.d.ts
593
- interface InvoiceOnceResult {
594
- readonly number: string;
595
- readonly created: boolean;
596
- readonly externalId: string;
597
- readonly invoice?: CreatedInvoice | undefined;
598
- readonly details?: InvoiceDetails | undefined;
599
- }
600
- declare function invoiceOnceExternalId(type: InvoiceType, orderNumber: string): string;
601
- //#endregion
602
- //#region src/invoices/pdf.d.ts
603
- interface InvoicePdf {
604
- readonly pdf: Uint8Array;
605
- readonly number?: string | undefined;
606
- readonly netTotal?: number | undefined;
607
- readonly grossTotal?: number | undefined;
608
- readonly outstanding?: number | undefined;
609
- readonly buyerAccountUrl?: string | undefined;
610
- }
611
- //#endregion
612
- //#region src/invoices/proforma.d.ts
613
- type ProformaReference = string | {
614
- readonly proformaNumber: string;
615
- } | {
616
- readonly orderNumber: string;
617
- };
618
- //#endregion
619
- //#region src/documents/choose.d.ts
620
- declare const RECEIPT_MAX_GROSS_HUF = 9e5;
621
- interface ChooseDocumentBuyer {
622
- readonly taxNumber?: string | undefined;
623
- readonly euTaxNumber?: string | undefined;
624
- readonly isBusiness?: boolean | undefined;
625
- }
626
- interface ChooseDocumentInput {
627
- readonly grossTotal: number;
628
- readonly currency?: string | undefined;
629
- readonly exchangeRate?: number | undefined;
630
- readonly buyer?: ChooseDocumentBuyer | undefined;
631
- readonly paidByFulfillment?: boolean | undefined;
632
- readonly invoiceRequested?: boolean | undefined;
633
- readonly cashRegisterRequired?: boolean | undefined;
634
- }
635
- type DocumentChoice = "receipt" | "invoice" | "cash-register";
636
- interface DocumentDecision {
637
- readonly type: DocumentChoice;
638
- readonly reasons: readonly string[];
639
- readonly grossTotalHuf: number;
640
- }
641
- declare function chooseDocument(input: ChooseDocumentInput): DocumentDecision;
642
- //#endregion
643
- //#region src/payments/issue.d.ts
644
- interface PaymentDocumentItem {
645
- readonly name: string;
646
- readonly quantity?: number;
647
- readonly unit?: string | undefined;
648
- readonly identifier?: string | undefined;
649
- readonly comment?: string | undefined;
650
- readonly grossUnitPrice?: number;
651
- readonly netUnitPrice?: number;
652
- readonly vat: VatRate;
653
- }
654
- interface IssueForPaymentOptions {
655
- readonly vat?: VatRate | undefined;
656
- readonly vatFor?: ((item: PaymentLineItem) => VatRate) | undefined;
657
- readonly items?: readonly PaymentDocumentItem[] | undefined;
658
- readonly fallbackItemName?: string | undefined;
659
- readonly document?: "auto" | "receipt" | "invoice" | undefined;
660
- readonly buyer?: InvoiceBuyer | undefined;
661
- readonly buyerIsBusiness?: boolean | undefined;
662
- readonly invoiceRequested?: boolean | undefined;
663
- readonly cashRegisterRequired?: boolean | undefined;
664
- readonly orderNumber?: string | undefined;
665
- readonly currency?: string | undefined;
666
- readonly exchangeRate?: number | undefined;
667
- readonly exchangeBank?: string | undefined;
668
- readonly allowAmountMismatch?: boolean | undefined;
669
- readonly receipt?: Partial<Omit<CreateReceiptInput, "items" | "orderNumber" | "callId" | "currency" | "exchangeRate" | "exchangeBank">> | undefined;
670
- readonly invoice?: Partial<Omit<StandardInvoiceInput, "items" | "buyer" | "type" | "orderNumber" | "paid" | "currency" | "exchangeRate" | "exchangeBank" | "externalId">> | undefined;
671
- readonly recoveryDelayMs?: number | undefined;
672
- readonly signal?: AbortSignal | undefined;
673
- }
674
- interface IssuedReceipt {
675
- readonly kind: "receipt";
676
- readonly orderNumber: string;
677
- readonly number: string;
678
- readonly created: boolean;
679
- readonly receipt: Receipt;
680
- readonly decision: DocumentDecision;
681
- }
682
- interface IssuedInvoice {
683
- readonly kind: "invoice";
684
- readonly orderNumber: string;
685
- readonly number: string;
686
- readonly created: boolean;
687
- readonly invoice: InvoiceOnceResult;
688
- readonly decision: DocumentDecision;
689
- }
690
- interface IssuedReversal {
691
- readonly kind: "reversal";
692
- readonly orderNumber: string;
693
- readonly document: "receipt" | "invoice";
694
- readonly reversedNumber: string;
695
- readonly number?: string | undefined;
696
- readonly created: boolean;
697
- }
698
- interface SkippedPayment {
699
- readonly kind: "skipped";
700
- readonly orderNumber: string;
701
- readonly reason: string;
702
- }
703
- type IssuedDocument = IssuedReceipt | IssuedInvoice | IssuedReversal | SkippedPayment;
704
- interface PaymentDocumentsApi {
705
- readonly invoices: Pick<InvoicesApi, "createOnce" | "find" | "reverse">;
706
- readonly receipts: Pick<ReceiptsApi, "createOnce" | "find" | "reverse">;
707
- }
708
- declare function paymentOrderNumber(payment: PaymentEvent): string;
709
- declare function buyerFromCustomer(customer: PaymentCustomer | undefined): InvoiceBuyer | undefined;
710
- declare function issueForPayment(api: PaymentDocumentsApi, payment: PaymentEvent, options?: IssueForPaymentOptions): Promise<IssuedDocument>;
711
- //#endregion
712
- //#region src/receipts/convert.d.ts
713
- interface ConvertReceiptInput {
714
- readonly receiptNumber: string;
715
- readonly buyer: InvoiceBuyer;
716
- readonly orderNumber?: string | undefined;
717
- readonly prefix?: string | undefined;
718
- readonly comment?: string | undefined;
719
- readonly language?: InvoiceLanguage | undefined;
720
- readonly template?: InvoiceTemplate | undefined;
721
- readonly seller?: InvoiceSeller | undefined;
722
- readonly eInvoice?: boolean | undefined;
723
- readonly downloadPdf?: boolean | undefined;
724
- readonly vatMapping?: Readonly<Partial<Record<ReceiptOnlyVatCode, VatRate>>> | undefined;
725
- readonly allowAlreadyReversed?: boolean | undefined;
726
- }
727
- interface ConvertedReceipt {
728
- readonly receipt: Receipt;
729
- readonly reversal?: Receipt | undefined;
730
- readonly invoice: InvoiceOnceResult;
731
- }
732
- declare function conversionExternalId(receiptNumber: string): string;
733
- //#endregion
734
- //#region src/receipts/create-once.d.ts
735
- interface ReceiptOnceResult {
736
- readonly receipt: Receipt;
737
- readonly created: boolean;
738
- }
739
- //#endregion
740
- //#region src/taxpayer/address.d.ts
741
- type TaxpayerAddressType = "HQ" | "SITE" | "BRANCH" | (string & {});
742
- interface NavDetailedAddress {
743
- readonly countryCode?: string | undefined;
744
- readonly region?: string | undefined;
745
- readonly postalCode?: string | undefined;
746
- readonly city?: string | undefined;
747
- readonly streetName?: string | undefined;
748
- readonly publicPlaceCategory?: string | undefined;
749
- readonly number?: string | undefined;
750
- readonly building?: string | undefined;
751
- readonly staircase?: string | undefined;
752
- readonly floor?: string | undefined;
753
- readonly door?: string | undefined;
754
- readonly lotNumber?: string | undefined;
755
- }
756
- interface TaxpayerAddress {
757
- readonly type: TaxpayerAddressType;
758
- readonly countryCode: string;
759
- readonly region?: string | undefined;
760
- readonly postalCode: string;
761
- readonly city: string;
762
- readonly street?: string | undefined;
763
- readonly publicPlaceCategory?: string | undefined;
764
- readonly number?: string | undefined;
765
- readonly building?: string | undefined;
766
- readonly staircase?: string | undefined;
767
- readonly floor?: string | undefined;
768
- readonly door?: string | undefined;
769
- readonly lotNumber?: string | undefined;
770
- readonly formatted: string;
771
- readonly raw: NavDetailedAddress;
772
- }
773
- //#endregion
774
- //#region src/taxpayer/query-taxpayer.d.ts
775
- type TaxpayerIncorporation = "ORGANIZATION" | "SELF_EMPLOYED" | "TAXABLE_PERSON" | (string & {});
776
- interface TaxpayerTaxNumber {
777
- readonly taxpayerId: string;
778
- readonly vatCode?: string | undefined;
779
- readonly countyCode?: string | undefined;
780
- readonly formatted?: string | undefined;
781
- }
782
- interface TaxpayerInfo {
783
- readonly valid: boolean;
784
- readonly name?: string | undefined;
785
- readonly shortName?: string | undefined;
786
- readonly taxNumber?: TaxpayerTaxNumber | undefined;
787
- readonly address?: TaxpayerAddress | undefined;
788
- readonly addresses: readonly TaxpayerAddress[];
789
- readonly incorporation?: TaxpayerIncorporation | undefined;
790
- readonly vatGroupMembership?: string | undefined;
791
- readonly infoDate?: string | undefined;
792
- readonly requestId?: string | undefined;
793
- }
794
- //#endregion
795
- //#region src/client.d.ts
796
- interface KasszaDefaults {
797
- readonly invoice?: InvoiceDefaults;
798
- readonly receipt?: ReceiptDefaults;
799
- }
800
- interface KasszaOptions extends SzamlazzOptions {
801
- readonly defaults?: KasszaDefaults;
802
- }
803
- interface InvoicesApi {
804
- create(input: CreateInvoiceInput, options?: RequestOptions): Promise<CreatedInvoice>;
805
- createOnce(input: CreateInvoiceInput, options?: CreateOnceOptions): Promise<InvoiceOnceResult>;
806
- preview(input: CreateInvoiceInput, options?: RequestOptions): Promise<InvoicePreview>;
807
- reverse(input: ReverseInvoiceInput, options?: RequestOptions): Promise<ReversedInvoice>;
808
- registerPayment(input: RegisterPaymentInput, options?: RequestOptions): Promise<RegisteredPayment>;
809
- clearPayments(input: ClearPaymentsInput, options?: RequestOptions): Promise<RegisteredPayment>;
810
- getPdf(reference: InvoiceReference, options?: RequestOptions): Promise<InvoicePdf>;
811
- get(reference: InvoiceReference, query?: GetInvoiceOptions, options?: RequestOptions): Promise<InvoiceDetails>;
812
- find(reference: InvoiceReference, query?: GetInvoiceOptions, options?: RequestOptions): Promise<InvoiceDetails | null>;
813
- deleteProforma(reference: ProformaReference, options?: RequestOptions): Promise<void>;
814
- }
815
- interface ReceiptsApi {
816
- create(input: CreateReceiptInput, options?: RequestOptions): Promise<Receipt>;
817
- createOnce(input: CreateReceiptInput, options?: CreateOnceOptions): Promise<ReceiptOnceResult>;
818
- reverse(input: ReverseReceiptInput | string, options?: RequestOptions): Promise<Receipt>;
819
- get(input: GetReceiptInput | string, options?: RequestOptions): Promise<Receipt>;
820
- find(input: GetReceiptInput | string, options?: RequestOptions): Promise<Receipt | null>;
821
- send(input: SendReceiptInput, options?: RequestOptions): Promise<void>;
822
- convertToInvoice(input: ConvertReceiptInput, options?: CreateOnceOptions): Promise<ConvertedReceipt>;
823
- }
824
- interface TaxpayerApi {
825
- query(taxNumber: string, options?: RequestOptions): Promise<TaxpayerInfo>;
826
- }
827
- interface Kassza {
828
- readonly invoices: InvoicesApi;
829
- readonly receipts: ReceiptsApi;
830
- readonly taxpayer: TaxpayerApi;
831
- verifyCredentials(options?: RequestOptions): Promise<boolean>;
832
- resetSession(): Promise<void>;
833
- resetAttempts(target: SzamlazzError | string): Promise<void>;
834
- issueForPayment(payment: PaymentEvent, options?: IssueForPaymentOptions): Promise<IssuedDocument>;
835
- }
836
- declare function createKassza(options?: KasszaOptions): Kassza;
837
- //#endregion
838
- export { SzamlazzHooks as $, RECEIPT_MAX_GROSS_HUF as A, InvoiceSeller as At, InvoiceDetailsItem as B, Waybill as Bt, buyerFromCustomer as C, FinalInvoiceInput as Ct, ChooseDocumentInput as D, InvoiceLanguage as Dt, ChooseDocumentBuyer as E, InvoiceItemInput as Et, invoiceOnceExternalId as F, PickPackPointWaybill as Ft, InvoiceReference as G, isSzamlazzError as Gt, InvoiceDetailsSeller as H, AgentErrorCodeInfo as Ht, GetInvoiceOptions as I, SprinterWaybill as It, AgentContext as J, AgentAction as Jt, CreateOnceOptions as K, suggestedPrefix as Kt, InvoiceDetails as L, StandardInvoiceInput as Lt, ProformaReference as M, InvoiceType as Mt, InvoicePdf as N, ItemLedger as Nt, DocumentChoice as O, InvoicePostalAddress as Ot, InvoiceOnceResult as P, MplWaybill as Pt, RequestOptions as Q, InvoiceDetailsBuyer as R, TaxpayerType as Rt, SkippedPayment as S, Currency as St, paymentOrderNumber as T, InvoiceDefaults as Tt, InvoiceDetailsTotals as U, SzamlazzError as Ut, InvoiceDetailsPayment as V, AGENT_ERROR_CODES as Vt, InvoiceDocumentType as W, SzamlazzErrorCategory as Wt, AgentRequestEvent as X, SZAMLAZZ_AGENT_URL as Xt, AgentErrorEvent as Y, MAX_INVOICE_ATTACHMENTS as Yt, AgentResponseEvent as Z, IssuedInvoice as _, CorrectiveInvoiceInput as _t, ReceiptsApi as a, InvoiceReversedEvent as at, PaymentDocumentItem as b, CreatedInvoice as bt, TaxpayerInfo as c, ReverseInvoiceInput as ct, ReceiptOnceResult as d, PaymentEntry as dt, SzamlazzOptions as et, ConvertReceiptInput as f, RegisterPaymentInput as ft, IssuedDocument as g, BuyerLedger as gt, IssueForPaymentOptions as h, AgentResponse as ht, KasszaOptions as i, InvoicePaymentEvent as it, chooseDocument as j, InvoiceTemplate as jt, DocumentDecision as k, InvoicePreview as kt, TaxpayerTaxNumber as l, ReversedInvoice as lt, conversionExternalId as m, XmlNode as mt, Kassza as n, DocumentHook as nt, TaxpayerApi as o, ReceiptCreatedEvent as ot, ConvertedReceipt as p, RegisteredPayment as pt, AgentAttachment as q, AGENT_ACTIONS as qt, KasszaDefaults as r, InvoiceCreatedEvent as rt, createKassza as s, ReceiptReversedEvent as st, InvoicesApi as t, DocumentEvent as tt, TaxpayerAddress as u, ClearPaymentsInput as ut, IssuedReceipt as v, CourierService as vt, issueForPayment as w, InvoiceBuyer as wt, PaymentDocumentsApi as x, CreatedInvoiceItem as xt, IssuedReversal as y, CreateInvoiceInput as yt, InvoiceDetailsHeader as z, TransOFlexWaybill as zt };