kassza 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +150 -0
- package/agents/README.md +59 -0
- package/agents/api.md +206 -0
- package/agents/pitfalls.md +52 -0
- package/agents/recipes.md +217 -0
- package/agents/skills/kassza/SKILL.md +29 -0
- package/assets/logo-wordmark.svg +25 -0
- package/assets/logo.svg +19 -0
- package/dist/binary-B89HM03_.cjs +63 -0
- package/dist/binary-D0M9U2MD.js +34 -0
- package/dist/client-B9kbKKBf.d.cts +748 -0
- package/dist/client-zv4enyq7.d.ts +748 -0
- package/dist/cookie-stores/index.cjs +153 -0
- package/dist/cookie-stores/index.d.cts +63 -0
- package/dist/cookie-stores/index.d.ts +63 -0
- package/dist/cookie-stores/index.js +144 -0
- package/dist/create-BZd6CUO7.cjs +1160 -0
- package/dist/create-DDZaNlOz.js +939 -0
- package/dist/dates-D2XebOIg.js +34 -0
- package/dist/dates-DtHzwNU6.d.cts +7 -0
- package/dist/dates-DtHzwNU6.d.ts +7 -0
- package/dist/dates-PPxH0n5H.cjs +57 -0
- package/dist/errors-B0QJhUW1.cjs +302 -0
- package/dist/errors-DapdV5DK.js +273 -0
- package/dist/index-CYAGCdKJ.d.cts +56 -0
- package/dist/index-CYAGCdKJ.d.ts +56 -0
- package/dist/index.cjs +1406 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1394 -0
- package/dist/ipn/index.cjs +108 -0
- package/dist/ipn/index.d.cts +32 -0
- package/dist/ipn/index.d.ts +32 -0
- package/dist/ipn/index.js +101 -0
- package/dist/money/index.cjs +15 -0
- package/dist/money/index.d.cts +2 -0
- package/dist/money/index.d.ts +2 -0
- package/dist/money/index.js +2 -0
- package/dist/money-C9j7nBNP.js +258 -0
- package/dist/money-DkiGukAw.cjs +335 -0
- package/dist/session-CRGOuz-R.cjs +100 -0
- package/dist/session-Dm_45x8K.d.cts +11 -0
- package/dist/session-Dm_45x8K.d.ts +11 -0
- package/dist/session-OJMLGufT.js +77 -0
- package/dist/shared-CrxlxI8n.cjs +207 -0
- package/dist/shared-D6DLa4b7.js +100 -0
- package/dist/storage/fs.cjs +88 -0
- package/dist/storage/fs.d.cts +13 -0
- package/dist/storage/fs.d.ts +13 -0
- package/dist/storage/fs.js +87 -0
- package/dist/storage/index.cjs +643 -0
- package/dist/storage/index.d.cts +288 -0
- package/dist/storage/index.d.ts +288 -0
- package/dist/storage/index.js +619 -0
- package/dist/testing/index.cjs +409 -0
- package/dist/testing/index.d.cts +35 -0
- package/dist/testing/index.d.ts +35 -0
- package/dist/testing/index.js +407 -0
- package/dist/types-DVRgwcqg.d.cts +26 -0
- package/dist/types-DVRgwcqg.d.ts +26 -0
- package/dist/validators/index.cjs +296 -0
- package/dist/validators/index.d.cts +51 -0
- package/dist/validators/index.d.ts +51 -0
- package/dist/validators/index.js +278 -0
- package/llms.txt +16 -0
- package/package.json +151 -0
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
import { t as CookieStore } from "./session-Dm_45x8K.js";
|
|
2
|
+
import { t as DateInput } from "./dates-DtHzwNU6.js";
|
|
3
|
+
import { _ as VatRate, o as ItemAmounts, s as ItemPriceInput } from "./index-CYAGCdKJ.js";
|
|
4
|
+
//#region src/core/actions.d.ts
|
|
5
|
+
declare const SZAMLAZZ_AGENT_URL = "https://www.szamlazz.hu/szamla/";
|
|
6
|
+
declare const AGENT_ACTIONS: {
|
|
7
|
+
readonly createInvoice: "action-xmlagentxmlfile";
|
|
8
|
+
readonly reverseInvoice: "action-szamla_agent_st";
|
|
9
|
+
readonly registerPayment: "action-szamla_agent_kifiz";
|
|
10
|
+
readonly getInvoicePdf: "action-szamla_agent_pdf";
|
|
11
|
+
readonly getInvoiceXml: "action-szamla_agent_xml";
|
|
12
|
+
readonly deleteProforma: "action-szamla_agent_dijbekero_torlese";
|
|
13
|
+
readonly createReceipt: "action-szamla_agent_nyugta_create";
|
|
14
|
+
readonly reverseReceipt: "action-szamla_agent_nyugta_storno";
|
|
15
|
+
readonly getReceipt: "action-szamla_agent_nyugta_get";
|
|
16
|
+
readonly sendReceipt: "action-szamla_agent_nyugta_send";
|
|
17
|
+
readonly queryTaxpayer: "action-szamla_agent_taxpayer";
|
|
18
|
+
};
|
|
19
|
+
type AgentAction = keyof typeof AGENT_ACTIONS;
|
|
20
|
+
declare const MAX_INVOICE_ATTACHMENTS = 5;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/core/errors.d.ts
|
|
23
|
+
type SzamlazzErrorCategory = "auth" | "account" | "validation" | "duplicate" | "partial_success" | "not_found" | "maintenance" | "network" | "timeout" | "configuration" | "unexpected_response" | "unknown";
|
|
24
|
+
interface AgentErrorCodeInfo {
|
|
25
|
+
readonly message: string;
|
|
26
|
+
readonly category: SzamlazzErrorCategory;
|
|
27
|
+
readonly hint?: string;
|
|
28
|
+
}
|
|
29
|
+
declare const AGENT_ERROR_CODES: Readonly<Record<number, AgentErrorCodeInfo>>;
|
|
30
|
+
interface SzamlazzErrorOptions {
|
|
31
|
+
readonly category: SzamlazzErrorCategory;
|
|
32
|
+
readonly code?: number | undefined;
|
|
33
|
+
readonly hint?: string | undefined;
|
|
34
|
+
readonly action?: AgentAction | undefined;
|
|
35
|
+
readonly httpStatus?: number | undefined;
|
|
36
|
+
readonly rawResponse?: string | undefined;
|
|
37
|
+
readonly cause?: unknown;
|
|
38
|
+
}
|
|
39
|
+
declare class SzamlazzError extends Error {
|
|
40
|
+
override readonly name: string;
|
|
41
|
+
readonly code: number | undefined;
|
|
42
|
+
readonly category: SzamlazzErrorCategory;
|
|
43
|
+
readonly retryable: boolean;
|
|
44
|
+
readonly hint: string | undefined;
|
|
45
|
+
readonly action: AgentAction | undefined;
|
|
46
|
+
readonly httpStatus: number | undefined;
|
|
47
|
+
readonly rawResponse: string | undefined;
|
|
48
|
+
constructor(message: string, options: SzamlazzErrorOptions);
|
|
49
|
+
get isDuplicate(): boolean;
|
|
50
|
+
get isNotFound(): boolean;
|
|
51
|
+
}
|
|
52
|
+
declare function isSzamlazzError(error: unknown): error is SzamlazzError;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/core/context.d.ts
|
|
55
|
+
interface AgentAttachment {
|
|
56
|
+
readonly filename: string;
|
|
57
|
+
readonly content: Uint8Array | ArrayBuffer | Blob | string;
|
|
58
|
+
readonly contentType?: string;
|
|
59
|
+
}
|
|
60
|
+
interface AgentRequestEvent {
|
|
61
|
+
readonly action: AgentAction;
|
|
62
|
+
readonly attempt: number;
|
|
63
|
+
}
|
|
64
|
+
interface AgentResponseEvent extends AgentRequestEvent {
|
|
65
|
+
readonly status: number;
|
|
66
|
+
readonly durationMs: number;
|
|
67
|
+
}
|
|
68
|
+
interface AgentErrorEvent extends AgentRequestEvent {
|
|
69
|
+
readonly error: SzamlazzError;
|
|
70
|
+
readonly willRetry: boolean;
|
|
71
|
+
}
|
|
72
|
+
interface SzamlazzHooks {
|
|
73
|
+
readonly onRequest?: (event: AgentRequestEvent) => void;
|
|
74
|
+
readonly onResponse?: (event: AgentResponseEvent) => void;
|
|
75
|
+
readonly onError?: (event: AgentErrorEvent) => void;
|
|
76
|
+
}
|
|
77
|
+
interface SzamlazzOptions {
|
|
78
|
+
readonly agentKey?: string;
|
|
79
|
+
readonly username?: string;
|
|
80
|
+
readonly password?: string;
|
|
81
|
+
readonly endpoint?: string;
|
|
82
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
83
|
+
readonly timeoutMs?: number;
|
|
84
|
+
readonly maxAttempts?: number;
|
|
85
|
+
readonly retryDelayMs?: number;
|
|
86
|
+
readonly cookieStore?: CookieStore | false;
|
|
87
|
+
readonly hooks?: SzamlazzHooks;
|
|
88
|
+
}
|
|
89
|
+
interface RequestOptions {
|
|
90
|
+
readonly signal?: AbortSignal | undefined;
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/invoices/create-types.d.ts
|
|
94
|
+
type InvoiceType = "invoice" | "proforma" | "advance" | "final" | "corrective" | "deliveryNote";
|
|
95
|
+
declare const INVOICE_LANGUAGES: readonly ["hu", "en", "de", "it", "ro", "sk", "hr", "fr", "es", "cz", "pl", "bg", "nl", "ru", "si"];
|
|
96
|
+
type InvoiceLanguage = (typeof INVOICE_LANGUAGES)[number];
|
|
97
|
+
declare const INVOICE_TEMPLATES: readonly ["SzlaMost", "SzlaAlap", "SzlaNoEnv", "Szla8cm", "SzlaTomb", "SzlaFuvarlevelesAlap"];
|
|
98
|
+
type InvoiceTemplate = (typeof INVOICE_TEMPLATES)[number];
|
|
99
|
+
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"];
|
|
100
|
+
type Currency = (typeof CURRENCIES)[number] | (string & {});
|
|
101
|
+
type TaxpayerType = "nonEuBusiness" | "euBusiness" | "hungarianTaxNumber" | "unknown" | "noTaxNumber";
|
|
102
|
+
type CourierService = "TOF" | "PPP" | "SPRINTER" | "FOXPOST" | "MPL" | "GLS" | "EMPTY" | (string & {});
|
|
103
|
+
interface InvoiceSeller {
|
|
104
|
+
readonly bank?: string | undefined;
|
|
105
|
+
readonly bankAccount?: string | undefined;
|
|
106
|
+
readonly emailReplyTo?: string | undefined;
|
|
107
|
+
readonly emailSubject?: string | undefined;
|
|
108
|
+
readonly emailText?: string | undefined;
|
|
109
|
+
readonly signatoryName?: string | undefined;
|
|
110
|
+
}
|
|
111
|
+
interface InvoicePostalAddress {
|
|
112
|
+
readonly name?: string | undefined;
|
|
113
|
+
readonly country?: string | undefined;
|
|
114
|
+
readonly zip?: string | undefined;
|
|
115
|
+
readonly city?: string | undefined;
|
|
116
|
+
readonly address?: string | undefined;
|
|
117
|
+
}
|
|
118
|
+
interface BuyerLedger {
|
|
119
|
+
readonly bookingDate?: DateInput | undefined;
|
|
120
|
+
readonly buyerId?: string | undefined;
|
|
121
|
+
readonly ledgerAccount?: string | undefined;
|
|
122
|
+
readonly continuousFulfillment?: boolean | undefined;
|
|
123
|
+
readonly settlementPeriodStart?: DateInput | undefined;
|
|
124
|
+
readonly settlementPeriodEnd?: DateInput | undefined;
|
|
125
|
+
}
|
|
126
|
+
interface InvoiceBuyer {
|
|
127
|
+
readonly name: string;
|
|
128
|
+
readonly country?: string | undefined;
|
|
129
|
+
readonly zip: string;
|
|
130
|
+
readonly city: string;
|
|
131
|
+
readonly address: string;
|
|
132
|
+
readonly email?: string | undefined;
|
|
133
|
+
readonly sendEmail?: boolean | undefined;
|
|
134
|
+
readonly taxpayerType?: TaxpayerType | undefined;
|
|
135
|
+
readonly taxNumber?: string | undefined;
|
|
136
|
+
readonly groupTaxNumber?: string | undefined;
|
|
137
|
+
readonly euTaxNumber?: string | undefined;
|
|
138
|
+
readonly postal?: InvoicePostalAddress | undefined;
|
|
139
|
+
readonly ledger?: BuyerLedger | undefined;
|
|
140
|
+
readonly identifier?: string | undefined;
|
|
141
|
+
readonly signatoryName?: string | undefined;
|
|
142
|
+
readonly phone?: string | undefined;
|
|
143
|
+
readonly comment?: string | undefined;
|
|
144
|
+
}
|
|
145
|
+
interface ItemLedger {
|
|
146
|
+
readonly economicEvent?: string | undefined;
|
|
147
|
+
readonly vatEconomicEvent?: string | undefined;
|
|
148
|
+
readonly revenueLedgerAccount?: string | undefined;
|
|
149
|
+
readonly vatLedgerAccount?: string | undefined;
|
|
150
|
+
readonly settlementPeriodStart?: DateInput | undefined;
|
|
151
|
+
readonly settlementPeriodEnd?: DateInput | undefined;
|
|
152
|
+
}
|
|
153
|
+
type InvoiceItemInput = ItemPriceInput & {
|
|
154
|
+
readonly name: string;
|
|
155
|
+
readonly identifier?: string | undefined;
|
|
156
|
+
readonly unit?: string | undefined;
|
|
157
|
+
readonly comment?: string | undefined;
|
|
158
|
+
readonly ledger?: ItemLedger | undefined;
|
|
159
|
+
readonly dataDeletionCode?: number | undefined;
|
|
160
|
+
readonly marginVatBase?: number | undefined;
|
|
161
|
+
};
|
|
162
|
+
interface TransOFlexWaybill {
|
|
163
|
+
readonly id?: string | undefined;
|
|
164
|
+
readonly shipmentId?: string | undefined;
|
|
165
|
+
readonly packageCount?: number | undefined;
|
|
166
|
+
readonly countryCode?: string | undefined;
|
|
167
|
+
readonly zip?: string | undefined;
|
|
168
|
+
readonly service?: string | undefined;
|
|
169
|
+
}
|
|
170
|
+
interface PickPackPointWaybill {
|
|
171
|
+
readonly barcodePrefix?: string | undefined;
|
|
172
|
+
readonly barcodePostfix?: string | undefined;
|
|
173
|
+
}
|
|
174
|
+
interface SprinterWaybill {
|
|
175
|
+
readonly id?: string | undefined;
|
|
176
|
+
readonly senderCode?: string | undefined;
|
|
177
|
+
readonly directionCode?: string | undefined;
|
|
178
|
+
readonly packageCount?: number | undefined;
|
|
179
|
+
readonly barcodePostfix?: string | undefined;
|
|
180
|
+
readonly deliveryTime?: string | undefined;
|
|
181
|
+
}
|
|
182
|
+
interface MplWaybill {
|
|
183
|
+
readonly customerCode: string;
|
|
184
|
+
readonly barcode: string;
|
|
185
|
+
readonly weight: string | number;
|
|
186
|
+
readonly services?: string | undefined;
|
|
187
|
+
readonly declaredValue?: number | undefined;
|
|
188
|
+
}
|
|
189
|
+
interface Waybill {
|
|
190
|
+
readonly courier?: CourierService | undefined;
|
|
191
|
+
readonly barcode?: string | undefined;
|
|
192
|
+
readonly comment?: string | undefined;
|
|
193
|
+
readonly transOFlex?: TransOFlexWaybill | undefined;
|
|
194
|
+
readonly pickPackPoint?: PickPackPointWaybill | undefined;
|
|
195
|
+
readonly sprinter?: SprinterWaybill | undefined;
|
|
196
|
+
readonly mpl?: MplWaybill | undefined;
|
|
197
|
+
}
|
|
198
|
+
interface InvoiceDefaults {
|
|
199
|
+
readonly seller?: InvoiceSeller | undefined;
|
|
200
|
+
readonly prefix?: string | undefined;
|
|
201
|
+
readonly language?: InvoiceLanguage | undefined;
|
|
202
|
+
readonly currency?: Currency | undefined;
|
|
203
|
+
readonly exchangeBank?: string | undefined;
|
|
204
|
+
readonly paymentMethod?: string | undefined;
|
|
205
|
+
readonly paymentDueInDays?: number | undefined;
|
|
206
|
+
readonly eInvoice?: boolean | undefined;
|
|
207
|
+
readonly downloadPdf?: boolean | undefined;
|
|
208
|
+
readonly template?: InvoiceTemplate | undefined;
|
|
209
|
+
readonly sendEmail?: boolean | undefined;
|
|
210
|
+
readonly logoExtra?: string | undefined;
|
|
211
|
+
readonly simpleItems?: boolean | undefined;
|
|
212
|
+
readonly euVat?: boolean | undefined;
|
|
213
|
+
readonly aggregator?: string | undefined;
|
|
214
|
+
readonly guardian?: boolean | undefined;
|
|
215
|
+
readonly articleIdentifierInvoice?: boolean | undefined;
|
|
216
|
+
}
|
|
217
|
+
interface CreateInvoiceBase {
|
|
218
|
+
readonly buyer: InvoiceBuyer;
|
|
219
|
+
readonly items: readonly InvoiceItemInput[];
|
|
220
|
+
readonly seller?: InvoiceSeller | undefined;
|
|
221
|
+
readonly issueDate?: DateInput | undefined;
|
|
222
|
+
readonly fulfillmentDate?: DateInput | undefined;
|
|
223
|
+
readonly dueDate?: DateInput | undefined;
|
|
224
|
+
readonly paymentDueInDays?: number | undefined;
|
|
225
|
+
readonly paymentMethod?: string | undefined;
|
|
226
|
+
readonly currency?: Currency | undefined;
|
|
227
|
+
readonly exchangeRate?: number | undefined;
|
|
228
|
+
readonly exchangeBank?: string | undefined;
|
|
229
|
+
readonly language?: InvoiceLanguage | undefined;
|
|
230
|
+
readonly comment?: string | undefined;
|
|
231
|
+
readonly orderNumber?: string | undefined;
|
|
232
|
+
readonly proformaNumber?: string | undefined;
|
|
233
|
+
readonly prefix?: string | undefined;
|
|
234
|
+
readonly paid?: boolean | undefined;
|
|
235
|
+
readonly eInvoice?: boolean | undefined;
|
|
236
|
+
readonly downloadPdf?: boolean | undefined;
|
|
237
|
+
readonly externalId?: string | undefined;
|
|
238
|
+
readonly template?: InvoiceTemplate | undefined;
|
|
239
|
+
readonly simpleItems?: boolean | undefined;
|
|
240
|
+
readonly logoExtra?: string | undefined;
|
|
241
|
+
readonly paymentCorrection?: number | undefined;
|
|
242
|
+
readonly marginVat?: boolean | undefined;
|
|
243
|
+
readonly euVat?: boolean | undefined;
|
|
244
|
+
readonly aggregator?: string | undefined;
|
|
245
|
+
readonly guardian?: boolean | undefined;
|
|
246
|
+
readonly articleIdentifierInvoice?: boolean | undefined;
|
|
247
|
+
readonly waybill?: Waybill | undefined;
|
|
248
|
+
readonly attachments?: readonly AgentAttachment[] | undefined;
|
|
249
|
+
}
|
|
250
|
+
interface StandardInvoiceInput extends CreateInvoiceBase {
|
|
251
|
+
readonly type?: "invoice" | "proforma" | "advance" | "deliveryNote" | undefined;
|
|
252
|
+
}
|
|
253
|
+
interface FinalInvoiceInput extends CreateInvoiceBase {
|
|
254
|
+
readonly type: "final";
|
|
255
|
+
readonly advanceInvoiceNumber?: string | undefined;
|
|
256
|
+
}
|
|
257
|
+
interface CorrectiveInvoiceInput extends CreateInvoiceBase {
|
|
258
|
+
readonly type: "corrective";
|
|
259
|
+
readonly correctedInvoiceNumber: string;
|
|
260
|
+
}
|
|
261
|
+
type CreateInvoiceInput = StandardInvoiceInput | FinalInvoiceInput | CorrectiveInvoiceInput;
|
|
262
|
+
type CreatedInvoiceItem = ItemAmounts & {
|
|
263
|
+
readonly name: string;
|
|
264
|
+
};
|
|
265
|
+
interface CreatedInvoice {
|
|
266
|
+
readonly number: string;
|
|
267
|
+
readonly netTotal: number;
|
|
268
|
+
readonly grossTotal: number;
|
|
269
|
+
readonly outstanding?: number | undefined;
|
|
270
|
+
readonly buyerAccountUrl?: string | undefined;
|
|
271
|
+
readonly pdf?: Uint8Array | undefined;
|
|
272
|
+
readonly items: readonly CreatedInvoiceItem[];
|
|
273
|
+
}
|
|
274
|
+
interface InvoicePreview {
|
|
275
|
+
readonly pdf: Uint8Array;
|
|
276
|
+
readonly netTotal: number;
|
|
277
|
+
readonly grossTotal: number;
|
|
278
|
+
readonly items: readonly CreatedInvoiceItem[];
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region src/invoices/reference.d.ts
|
|
282
|
+
type InvoiceReference = string | {
|
|
283
|
+
readonly invoiceNumber: string;
|
|
284
|
+
} | {
|
|
285
|
+
readonly orderNumber: string;
|
|
286
|
+
} | {
|
|
287
|
+
readonly externalId: string;
|
|
288
|
+
};
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/invoices/get.d.ts
|
|
291
|
+
interface GetInvoiceOptions {
|
|
292
|
+
readonly includePdf?: boolean | undefined;
|
|
293
|
+
}
|
|
294
|
+
type InvoiceDocumentType = "invoice" | "proforma" | "advance" | "final" | "corrective" | "reversal" | "deliveryNote" | "unknown";
|
|
295
|
+
interface InvoiceDetailsAddress {
|
|
296
|
+
readonly name?: string | undefined;
|
|
297
|
+
readonly country?: string | undefined;
|
|
298
|
+
readonly zip?: string | undefined;
|
|
299
|
+
readonly city?: string | undefined;
|
|
300
|
+
readonly address?: string | undefined;
|
|
301
|
+
}
|
|
302
|
+
interface InvoiceDetailsBank {
|
|
303
|
+
readonly name?: string | undefined;
|
|
304
|
+
readonly accountNumber?: string | undefined;
|
|
305
|
+
}
|
|
306
|
+
interface InvoiceDetailsSeller {
|
|
307
|
+
readonly id?: number | undefined;
|
|
308
|
+
readonly name: string;
|
|
309
|
+
readonly address?: InvoiceDetailsAddress | undefined;
|
|
310
|
+
readonly postalAddress?: InvoiceDetailsAddress | undefined;
|
|
311
|
+
readonly taxNumber?: string | undefined;
|
|
312
|
+
readonly groupTaxNumber?: string | undefined;
|
|
313
|
+
readonly euTaxNumber?: string | undefined;
|
|
314
|
+
readonly bank?: InvoiceDetailsBank | undefined;
|
|
315
|
+
}
|
|
316
|
+
interface InvoiceDetailsHeader {
|
|
317
|
+
readonly id?: number | undefined;
|
|
318
|
+
readonly number: string;
|
|
319
|
+
readonly economicEventId?: number | undefined;
|
|
320
|
+
readonly sourceSystem?: number | undefined;
|
|
321
|
+
readonly registrationNumber?: string | undefined;
|
|
322
|
+
readonly type: InvoiceDocumentType;
|
|
323
|
+
readonly typeCode: string;
|
|
324
|
+
readonly eInvoice: boolean;
|
|
325
|
+
readonly appearanceCode?: number | undefined;
|
|
326
|
+
readonly referencedInvoiceNumber?: string | undefined;
|
|
327
|
+
readonly referencedProformaNumber?: string | undefined;
|
|
328
|
+
readonly issueDate: string;
|
|
329
|
+
readonly fulfillmentDate?: string | undefined;
|
|
330
|
+
readonly dueDate?: string | undefined;
|
|
331
|
+
readonly paymentMethod?: string | undefined;
|
|
332
|
+
readonly unifiedPaymentMethod?: string | undefined;
|
|
333
|
+
readonly cash?: boolean | undefined;
|
|
334
|
+
readonly orderNumber?: string | undefined;
|
|
335
|
+
readonly language?: string | undefined;
|
|
336
|
+
readonly currency?: string | undefined;
|
|
337
|
+
readonly exchangeBank?: string | undefined;
|
|
338
|
+
readonly exchangeRate?: number | undefined;
|
|
339
|
+
readonly comment?: string | undefined;
|
|
340
|
+
readonly vatType?: string | undefined;
|
|
341
|
+
readonly cashAccounting?: boolean | undefined;
|
|
342
|
+
readonly kata?: boolean | undefined;
|
|
343
|
+
readonly kataLedger?: boolean | undefined;
|
|
344
|
+
readonly email?: string | undefined;
|
|
345
|
+
readonly test?: boolean | undefined;
|
|
346
|
+
readonly reversed?: boolean | undefined;
|
|
347
|
+
}
|
|
348
|
+
interface InvoiceDetailsBuyerLedger {
|
|
349
|
+
readonly ledgerAccount?: string | undefined;
|
|
350
|
+
readonly buyerId?: string | undefined;
|
|
351
|
+
readonly bookingDate?: string | undefined;
|
|
352
|
+
readonly continuousFulfillment?: boolean | undefined;
|
|
353
|
+
readonly settlementPeriodStart?: string | undefined;
|
|
354
|
+
readonly settlementPeriodEnd?: string | undefined;
|
|
355
|
+
}
|
|
356
|
+
interface InvoiceDetailsBuyer {
|
|
357
|
+
readonly id?: number | undefined;
|
|
358
|
+
readonly name: string;
|
|
359
|
+
readonly identifier?: string | undefined;
|
|
360
|
+
readonly address?: InvoiceDetailsAddress | undefined;
|
|
361
|
+
readonly postalAddress?: InvoiceDetailsAddress | undefined;
|
|
362
|
+
readonly email?: string | undefined;
|
|
363
|
+
readonly taxNumber?: string | undefined;
|
|
364
|
+
readonly groupTaxNumber?: string | undefined;
|
|
365
|
+
readonly euTaxNumber?: string | undefined;
|
|
366
|
+
readonly location?: number | undefined;
|
|
367
|
+
readonly privatePerson?: boolean | undefined;
|
|
368
|
+
readonly ledger?: InvoiceDetailsBuyerLedger | undefined;
|
|
369
|
+
}
|
|
370
|
+
interface InvoiceDetailsItemLedger {
|
|
371
|
+
readonly revenueLedgerAccount?: string | undefined;
|
|
372
|
+
readonly vatLedgerAccount?: string | undefined;
|
|
373
|
+
readonly economicEvent?: string | undefined;
|
|
374
|
+
readonly vatEconomicEvent?: string | undefined;
|
|
375
|
+
readonly settlementPeriodStart?: string | undefined;
|
|
376
|
+
readonly settlementPeriodEnd?: string | undefined;
|
|
377
|
+
}
|
|
378
|
+
interface InvoiceDetailsItem {
|
|
379
|
+
readonly name: string;
|
|
380
|
+
readonly identifier?: string | undefined;
|
|
381
|
+
readonly quantity: number;
|
|
382
|
+
readonly unit?: string | undefined;
|
|
383
|
+
readonly netUnitPrice: number;
|
|
384
|
+
readonly vat: number;
|
|
385
|
+
readonly vatCode?: string | undefined;
|
|
386
|
+
readonly netAmount: number;
|
|
387
|
+
readonly marginVatBase?: number | undefined;
|
|
388
|
+
readonly vatAmount: number;
|
|
389
|
+
readonly grossAmount: number;
|
|
390
|
+
readonly comment?: string | undefined;
|
|
391
|
+
readonly position?: number | undefined;
|
|
392
|
+
readonly ledger?: InvoiceDetailsItemLedger | undefined;
|
|
393
|
+
}
|
|
394
|
+
interface InvoiceDetailsFinancialItem {
|
|
395
|
+
readonly name: string;
|
|
396
|
+
readonly vat: number;
|
|
397
|
+
readonly vatCode?: string | undefined;
|
|
398
|
+
readonly netAmount: number;
|
|
399
|
+
readonly vatAmount: number;
|
|
400
|
+
readonly grossAmount: number;
|
|
401
|
+
readonly settlementPeriodStart?: string | undefined;
|
|
402
|
+
readonly settlementPeriodEnd?: string | undefined;
|
|
403
|
+
readonly vatDeduction?: number | undefined;
|
|
404
|
+
readonly labels: readonly string[];
|
|
405
|
+
}
|
|
406
|
+
interface InvoiceDetailsVatTotal {
|
|
407
|
+
readonly vat: number;
|
|
408
|
+
readonly vatCode?: string | undefined;
|
|
409
|
+
readonly netAmount: number;
|
|
410
|
+
readonly vatAmount: number;
|
|
411
|
+
readonly grossAmount: number;
|
|
412
|
+
}
|
|
413
|
+
interface InvoiceDetailsTotals {
|
|
414
|
+
readonly netAmount: number;
|
|
415
|
+
readonly vatAmount: number;
|
|
416
|
+
readonly grossAmount: number;
|
|
417
|
+
readonly byVat: readonly InvoiceDetailsVatTotal[];
|
|
418
|
+
}
|
|
419
|
+
interface InvoiceDetailsPayment {
|
|
420
|
+
readonly date: string;
|
|
421
|
+
readonly method: string;
|
|
422
|
+
readonly amount: number;
|
|
423
|
+
readonly comment?: string | undefined;
|
|
424
|
+
readonly bankAccountNumber?: string | undefined;
|
|
425
|
+
readonly bankTransactionId?: number | undefined;
|
|
426
|
+
readonly exchangeRate?: number | undefined;
|
|
427
|
+
}
|
|
428
|
+
interface InvoiceDetails {
|
|
429
|
+
readonly seller: InvoiceDetailsSeller;
|
|
430
|
+
readonly header: InvoiceDetailsHeader;
|
|
431
|
+
readonly buyer: InvoiceDetailsBuyer;
|
|
432
|
+
readonly items: readonly InvoiceDetailsItem[];
|
|
433
|
+
readonly financialItems: readonly InvoiceDetailsFinancialItem[];
|
|
434
|
+
readonly labels: readonly string[];
|
|
435
|
+
readonly totals: InvoiceDetailsTotals;
|
|
436
|
+
readonly payments: readonly InvoiceDetailsPayment[];
|
|
437
|
+
readonly pdf?: Uint8Array | undefined;
|
|
438
|
+
}
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region src/invoices/payment.d.ts
|
|
441
|
+
interface PaymentEntry {
|
|
442
|
+
readonly date?: DateInput | undefined;
|
|
443
|
+
readonly method: string;
|
|
444
|
+
readonly amount: number;
|
|
445
|
+
readonly description?: string | undefined;
|
|
446
|
+
}
|
|
447
|
+
interface PaymentTarget {
|
|
448
|
+
readonly invoiceNumber: string;
|
|
449
|
+
readonly taxNumber?: string | undefined;
|
|
450
|
+
}
|
|
451
|
+
interface RegisterPaymentsInput extends PaymentTarget {
|
|
452
|
+
readonly additive?: boolean | undefined;
|
|
453
|
+
readonly payments: readonly PaymentEntry[];
|
|
454
|
+
}
|
|
455
|
+
interface RegisterSinglePaymentInput extends PaymentTarget {
|
|
456
|
+
readonly additive?: boolean | undefined;
|
|
457
|
+
readonly amount: number;
|
|
458
|
+
readonly method?: string | undefined;
|
|
459
|
+
readonly date?: DateInput | undefined;
|
|
460
|
+
readonly description?: string | undefined;
|
|
461
|
+
}
|
|
462
|
+
type RegisterPaymentInput = RegisterPaymentsInput | RegisterSinglePaymentInput;
|
|
463
|
+
type ClearPaymentsInput = string | PaymentTarget;
|
|
464
|
+
interface RegisteredPayment {
|
|
465
|
+
readonly invoiceNumber: string;
|
|
466
|
+
readonly netTotal?: number | undefined;
|
|
467
|
+
readonly grossTotal?: number | undefined;
|
|
468
|
+
readonly outstanding?: number | undefined;
|
|
469
|
+
readonly buyerAccountUrl?: string | undefined;
|
|
470
|
+
}
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region src/invoices/pdf.d.ts
|
|
473
|
+
interface InvoicePdf {
|
|
474
|
+
readonly pdf: Uint8Array;
|
|
475
|
+
readonly number?: string | undefined;
|
|
476
|
+
readonly netTotal?: number | undefined;
|
|
477
|
+
readonly grossTotal?: number | undefined;
|
|
478
|
+
readonly outstanding?: number | undefined;
|
|
479
|
+
readonly buyerAccountUrl?: string | undefined;
|
|
480
|
+
}
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region src/invoices/proforma.d.ts
|
|
483
|
+
type ProformaReference = string | {
|
|
484
|
+
readonly proformaNumber: string;
|
|
485
|
+
} | {
|
|
486
|
+
readonly orderNumber: string;
|
|
487
|
+
};
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/invoices/reverse.d.ts
|
|
490
|
+
interface ReverseInvoiceEmail {
|
|
491
|
+
readonly replyTo?: string | undefined;
|
|
492
|
+
readonly subject?: string | undefined;
|
|
493
|
+
readonly text?: string | undefined;
|
|
494
|
+
}
|
|
495
|
+
interface ReverseInvoiceBuyer {
|
|
496
|
+
readonly email?: string | undefined;
|
|
497
|
+
readonly taxNumber?: string | undefined;
|
|
498
|
+
readonly euTaxNumber?: string | undefined;
|
|
499
|
+
}
|
|
500
|
+
interface ReverseInvoiceOptions {
|
|
501
|
+
readonly invoiceNumber: string;
|
|
502
|
+
readonly issueDate?: DateInput | undefined;
|
|
503
|
+
readonly fulfillmentDate?: DateInput | undefined;
|
|
504
|
+
readonly comment?: string | undefined;
|
|
505
|
+
readonly template?: InvoiceTemplate | undefined;
|
|
506
|
+
readonly eInvoice?: boolean | undefined;
|
|
507
|
+
readonly downloadPdf?: boolean | undefined;
|
|
508
|
+
readonly externalId?: string | undefined;
|
|
509
|
+
readonly email?: ReverseInvoiceEmail | undefined;
|
|
510
|
+
readonly buyer?: ReverseInvoiceBuyer | undefined;
|
|
511
|
+
}
|
|
512
|
+
type ReverseInvoiceInput = string | ReverseInvoiceOptions;
|
|
513
|
+
interface ReversedInvoice {
|
|
514
|
+
readonly number: string;
|
|
515
|
+
readonly netTotal?: number | undefined;
|
|
516
|
+
readonly grossTotal?: number | undefined;
|
|
517
|
+
readonly outstanding?: number | undefined;
|
|
518
|
+
readonly buyerAccountUrl?: string | undefined;
|
|
519
|
+
readonly pdf?: Uint8Array | undefined;
|
|
520
|
+
}
|
|
521
|
+
//#endregion
|
|
522
|
+
//#region src/receipts/types.d.ts
|
|
523
|
+
declare const RECEIPT_ONLY_VAT_CODES: readonly ["ÁKK", "MAA", "EU", "EUK"];
|
|
524
|
+
type ReceiptOnlyVatCode = (typeof RECEIPT_ONLY_VAT_CODES)[number];
|
|
525
|
+
type ReceiptVatRate = VatRate | ReceiptOnlyVatCode;
|
|
526
|
+
declare const RECEIPT_PDF_TEMPLATES: readonly ["A", "N", "J", "L"];
|
|
527
|
+
type ReceiptPdfTemplate = (typeof RECEIPT_PDF_TEMPLATES)[number];
|
|
528
|
+
interface ReceiptLedgerInput {
|
|
529
|
+
readonly revenue?: string | undefined;
|
|
530
|
+
readonly vat?: string | undefined;
|
|
531
|
+
}
|
|
532
|
+
type ReceiptItemInput = Omit<ItemPriceInput, "vat"> & {
|
|
533
|
+
readonly vat: ReceiptVatRate;
|
|
534
|
+
readonly name: string;
|
|
535
|
+
readonly identifier?: string | undefined;
|
|
536
|
+
readonly unit?: string | undefined;
|
|
537
|
+
readonly comment?: string | undefined;
|
|
538
|
+
readonly ledger?: ReceiptLedgerInput | undefined;
|
|
539
|
+
readonly dataDeletionCode?: number | undefined;
|
|
540
|
+
};
|
|
541
|
+
interface ReceiptPaymentInput {
|
|
542
|
+
readonly method: string;
|
|
543
|
+
readonly amount: number;
|
|
544
|
+
readonly description?: string | undefined;
|
|
545
|
+
}
|
|
546
|
+
interface ReceiptDefaults {
|
|
547
|
+
readonly prefix?: string | undefined;
|
|
548
|
+
readonly paymentMethod?: string | undefined;
|
|
549
|
+
readonly currency?: string | undefined;
|
|
550
|
+
readonly exchangeRate?: number | undefined;
|
|
551
|
+
readonly exchangeBank?: string | undefined;
|
|
552
|
+
readonly downloadPdf?: boolean | undefined;
|
|
553
|
+
readonly template?: ReceiptPdfTemplate | undefined;
|
|
554
|
+
readonly unit?: string | undefined;
|
|
555
|
+
readonly customerLedgerId?: string | undefined;
|
|
556
|
+
}
|
|
557
|
+
interface CreateReceiptInput {
|
|
558
|
+
readonly prefix?: string | undefined;
|
|
559
|
+
readonly paymentMethod?: string | undefined;
|
|
560
|
+
readonly currency?: string | undefined;
|
|
561
|
+
readonly exchangeRate?: number | undefined;
|
|
562
|
+
readonly exchangeBank?: string | undefined;
|
|
563
|
+
readonly callId?: string | undefined;
|
|
564
|
+
readonly comment?: string | undefined;
|
|
565
|
+
readonly template?: ReceiptPdfTemplate | undefined;
|
|
566
|
+
readonly customerLedgerId?: string | undefined;
|
|
567
|
+
readonly orderNumber?: string | undefined;
|
|
568
|
+
readonly downloadPdf?: boolean | undefined;
|
|
569
|
+
readonly items: readonly ReceiptItemInput[];
|
|
570
|
+
readonly payments?: readonly ReceiptPaymentInput[] | undefined;
|
|
571
|
+
}
|
|
572
|
+
interface ReverseReceiptInput {
|
|
573
|
+
readonly receiptNumber: string;
|
|
574
|
+
readonly callId?: string | undefined;
|
|
575
|
+
readonly template?: ReceiptPdfTemplate | undefined;
|
|
576
|
+
readonly downloadPdf?: boolean | undefined;
|
|
577
|
+
}
|
|
578
|
+
interface GetReceiptOptions {
|
|
579
|
+
readonly callId?: string | undefined;
|
|
580
|
+
readonly template?: ReceiptPdfTemplate | undefined;
|
|
581
|
+
readonly downloadPdf?: boolean | undefined;
|
|
582
|
+
}
|
|
583
|
+
type GetReceiptInput = GetReceiptOptions & ({
|
|
584
|
+
readonly receiptNumber: string;
|
|
585
|
+
readonly orderNumber?: undefined;
|
|
586
|
+
} | {
|
|
587
|
+
readonly orderNumber: string;
|
|
588
|
+
readonly receiptNumber?: undefined;
|
|
589
|
+
});
|
|
590
|
+
interface SendReceiptInput {
|
|
591
|
+
readonly receiptNumber: string;
|
|
592
|
+
readonly emails: string | readonly string[];
|
|
593
|
+
readonly replyTo?: string | undefined;
|
|
594
|
+
readonly subject?: string | undefined;
|
|
595
|
+
readonly text?: string | undefined;
|
|
596
|
+
}
|
|
597
|
+
type ReceiptType = "receipt" | "reversal";
|
|
598
|
+
interface ReceiptLedger {
|
|
599
|
+
readonly revenue?: string | undefined;
|
|
600
|
+
readonly vat?: string | undefined;
|
|
601
|
+
}
|
|
602
|
+
interface ReceiptItem {
|
|
603
|
+
readonly name: string;
|
|
604
|
+
readonly identifier?: string | undefined;
|
|
605
|
+
readonly quantity: number;
|
|
606
|
+
readonly unit: string;
|
|
607
|
+
readonly netUnitPrice: number;
|
|
608
|
+
readonly vat: ReceiptVatRate;
|
|
609
|
+
readonly vatPercentage: number;
|
|
610
|
+
readonly netAmount: number;
|
|
611
|
+
readonly vatAmount: number;
|
|
612
|
+
readonly grossAmount: number;
|
|
613
|
+
readonly ledger?: ReceiptLedger | undefined;
|
|
614
|
+
}
|
|
615
|
+
interface ReceiptPayment {
|
|
616
|
+
readonly method: string;
|
|
617
|
+
readonly amount: number;
|
|
618
|
+
readonly description?: string | undefined;
|
|
619
|
+
}
|
|
620
|
+
interface ReceiptVatTotal {
|
|
621
|
+
readonly vat: ReceiptVatRate;
|
|
622
|
+
readonly vatPercentage: number;
|
|
623
|
+
readonly netAmount: number;
|
|
624
|
+
readonly vatAmount: number;
|
|
625
|
+
readonly grossAmount: number;
|
|
626
|
+
}
|
|
627
|
+
interface ReceiptTotals {
|
|
628
|
+
readonly netAmount: number;
|
|
629
|
+
readonly vatAmount: number;
|
|
630
|
+
readonly grossAmount: number;
|
|
631
|
+
readonly byVat: readonly ReceiptVatTotal[];
|
|
632
|
+
}
|
|
633
|
+
interface Receipt {
|
|
634
|
+
readonly id: number;
|
|
635
|
+
readonly number: string;
|
|
636
|
+
readonly callId?: string | undefined;
|
|
637
|
+
readonly type: ReceiptType;
|
|
638
|
+
readonly isReversed: boolean;
|
|
639
|
+
readonly reversedReceiptNumber?: string | undefined;
|
|
640
|
+
readonly issueDate: string;
|
|
641
|
+
readonly paymentMethod: string;
|
|
642
|
+
readonly currency: string;
|
|
643
|
+
readonly exchangeBank?: string | undefined;
|
|
644
|
+
readonly exchangeRate?: number | undefined;
|
|
645
|
+
readonly comment?: string | undefined;
|
|
646
|
+
readonly customerLedgerId?: string | undefined;
|
|
647
|
+
readonly isTest: boolean;
|
|
648
|
+
readonly orderNumber?: string | undefined;
|
|
649
|
+
readonly items: readonly ReceiptItem[];
|
|
650
|
+
readonly payments: readonly ReceiptPayment[];
|
|
651
|
+
readonly totals: ReceiptTotals;
|
|
652
|
+
readonly pdf?: Uint8Array | undefined;
|
|
653
|
+
}
|
|
654
|
+
//#endregion
|
|
655
|
+
//#region src/taxpayer/address.d.ts
|
|
656
|
+
type TaxpayerAddressType = "HQ" | "SITE" | "BRANCH" | (string & {});
|
|
657
|
+
interface NavDetailedAddress {
|
|
658
|
+
readonly countryCode?: string | undefined;
|
|
659
|
+
readonly region?: string | undefined;
|
|
660
|
+
readonly postalCode?: string | undefined;
|
|
661
|
+
readonly city?: string | undefined;
|
|
662
|
+
readonly streetName?: string | undefined;
|
|
663
|
+
readonly publicPlaceCategory?: string | undefined;
|
|
664
|
+
readonly number?: string | undefined;
|
|
665
|
+
readonly building?: string | undefined;
|
|
666
|
+
readonly staircase?: string | undefined;
|
|
667
|
+
readonly floor?: string | undefined;
|
|
668
|
+
readonly door?: string | undefined;
|
|
669
|
+
readonly lotNumber?: string | undefined;
|
|
670
|
+
}
|
|
671
|
+
interface TaxpayerAddress {
|
|
672
|
+
readonly type: TaxpayerAddressType;
|
|
673
|
+
readonly countryCode: string;
|
|
674
|
+
readonly region?: string | undefined;
|
|
675
|
+
readonly postalCode: string;
|
|
676
|
+
readonly city: string;
|
|
677
|
+
readonly street?: string | undefined;
|
|
678
|
+
readonly publicPlaceCategory?: string | undefined;
|
|
679
|
+
readonly number?: string | undefined;
|
|
680
|
+
readonly building?: string | undefined;
|
|
681
|
+
readonly staircase?: string | undefined;
|
|
682
|
+
readonly floor?: string | undefined;
|
|
683
|
+
readonly door?: string | undefined;
|
|
684
|
+
readonly lotNumber?: string | undefined;
|
|
685
|
+
readonly formatted: string;
|
|
686
|
+
readonly raw: NavDetailedAddress;
|
|
687
|
+
}
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region src/taxpayer/query-taxpayer.d.ts
|
|
690
|
+
type TaxpayerIncorporation = "ORGANIZATION" | "SELF_EMPLOYED" | "TAXABLE_PERSON" | (string & {});
|
|
691
|
+
interface TaxpayerTaxNumber {
|
|
692
|
+
readonly taxpayerId: string;
|
|
693
|
+
readonly vatCode?: string | undefined;
|
|
694
|
+
readonly countyCode?: string | undefined;
|
|
695
|
+
readonly formatted?: string | undefined;
|
|
696
|
+
}
|
|
697
|
+
interface TaxpayerInfo {
|
|
698
|
+
readonly valid: boolean;
|
|
699
|
+
readonly name?: string | undefined;
|
|
700
|
+
readonly shortName?: string | undefined;
|
|
701
|
+
readonly taxNumber?: TaxpayerTaxNumber | undefined;
|
|
702
|
+
readonly address?: TaxpayerAddress | undefined;
|
|
703
|
+
readonly addresses: readonly TaxpayerAddress[];
|
|
704
|
+
readonly incorporation?: TaxpayerIncorporation | undefined;
|
|
705
|
+
readonly vatGroupMembership?: string | undefined;
|
|
706
|
+
readonly infoDate?: string | undefined;
|
|
707
|
+
readonly requestId?: string | undefined;
|
|
708
|
+
}
|
|
709
|
+
//#endregion
|
|
710
|
+
//#region src/client.d.ts
|
|
711
|
+
interface KasszaDefaults {
|
|
712
|
+
readonly invoice?: InvoiceDefaults;
|
|
713
|
+
readonly receipt?: ReceiptDefaults;
|
|
714
|
+
}
|
|
715
|
+
interface KasszaOptions extends SzamlazzOptions {
|
|
716
|
+
readonly defaults?: KasszaDefaults;
|
|
717
|
+
}
|
|
718
|
+
interface InvoicesApi {
|
|
719
|
+
create(input: CreateInvoiceInput, options?: RequestOptions): Promise<CreatedInvoice>;
|
|
720
|
+
preview(input: CreateInvoiceInput, options?: RequestOptions): Promise<InvoicePreview>;
|
|
721
|
+
reverse(input: ReverseInvoiceInput, options?: RequestOptions): Promise<ReversedInvoice>;
|
|
722
|
+
registerPayment(input: RegisterPaymentInput, options?: RequestOptions): Promise<RegisteredPayment>;
|
|
723
|
+
clearPayments(input: ClearPaymentsInput, options?: RequestOptions): Promise<RegisteredPayment>;
|
|
724
|
+
getPdf(reference: InvoiceReference, options?: RequestOptions): Promise<InvoicePdf>;
|
|
725
|
+
get(reference: InvoiceReference, query?: GetInvoiceOptions, options?: RequestOptions): Promise<InvoiceDetails>;
|
|
726
|
+
find(reference: InvoiceReference, query?: GetInvoiceOptions, options?: RequestOptions): Promise<InvoiceDetails | null>;
|
|
727
|
+
deleteProforma(reference: ProformaReference, options?: RequestOptions): Promise<void>;
|
|
728
|
+
}
|
|
729
|
+
interface ReceiptsApi {
|
|
730
|
+
create(input: CreateReceiptInput, options?: RequestOptions): Promise<Receipt>;
|
|
731
|
+
reverse(input: ReverseReceiptInput | string, options?: RequestOptions): Promise<Receipt>;
|
|
732
|
+
get(input: GetReceiptInput | string, options?: RequestOptions): Promise<Receipt>;
|
|
733
|
+
find(input: GetReceiptInput | string, options?: RequestOptions): Promise<Receipt | null>;
|
|
734
|
+
send(input: SendReceiptInput, options?: RequestOptions): Promise<void>;
|
|
735
|
+
}
|
|
736
|
+
interface TaxpayerApi {
|
|
737
|
+
query(taxNumber: string, options?: RequestOptions): Promise<TaxpayerInfo>;
|
|
738
|
+
}
|
|
739
|
+
interface Kassza {
|
|
740
|
+
readonly invoices: InvoicesApi;
|
|
741
|
+
readonly receipts: ReceiptsApi;
|
|
742
|
+
readonly taxpayer: TaxpayerApi;
|
|
743
|
+
verifyCredentials(options?: RequestOptions): Promise<boolean>;
|
|
744
|
+
resetSession(): Promise<void>;
|
|
745
|
+
}
|
|
746
|
+
declare function createKassza(options?: KasszaOptions): Kassza;
|
|
747
|
+
//#endregion
|
|
748
|
+
export { InvoiceItemInput as $, PaymentEntry as A, InvoiceDetailsTotals as B, ReverseReceiptInput as C, SzamlazzError as Ct, ProformaReference as D, AgentAction as Dt, ReversedInvoice as E, AGENT_ACTIONS as Et, InvoiceDetailsBuyer as F, CourierService as G, InvoiceReference as H, InvoiceDetailsHeader as I, CreatedInvoiceItem as J, CreateInvoiceInput as K, InvoiceDetailsItem as L, RegisteredPayment as M, GetInvoiceOptions as N, InvoicePdf as O, MAX_INVOICE_ATTACHMENTS as Ot, InvoiceDetails as P, InvoiceDefaults as Q, InvoiceDetailsPayment as R, ReceiptVatRate as S, AgentErrorCodeInfo as St, ReverseInvoiceInput as T, isSzamlazzError as Tt, BuyerLedger as U, InvoiceDocumentType as V, CorrectiveInvoiceInput as W, FinalInvoiceInput as X, Currency as Y, InvoiceBuyer as Z, ReceiptPayment as _, AgentResponseEvent as _t, ReceiptsApi as a, InvoiceType as at, ReceiptTotals as b, SzamlazzOptions as bt, TaxpayerInfo as c, PickPackPointWaybill as ct, CreateReceiptInput as d, TaxpayerType as dt, InvoiceLanguage as et, GetReceiptInput as f, TransOFlexWaybill as ft, ReceiptItemInput as g, AgentRequestEvent as gt, ReceiptItem as h, AgentErrorEvent as ht, KasszaOptions as i, InvoiceTemplate as it, RegisterPaymentInput as j, ClearPaymentsInput as k, SZAMLAZZ_AGENT_URL as kt, TaxpayerTaxNumber as l, SprinterWaybill as lt, ReceiptDefaults as m, AgentAttachment as mt, Kassza as n, InvoicePreview as nt, TaxpayerApi as o, ItemLedger as ot, Receipt as p, Waybill as pt, CreatedInvoice as q, KasszaDefaults as r, InvoiceSeller as rt, createKassza as s, MplWaybill as st, InvoicesApi as t, InvoicePostalAddress as tt, TaxpayerAddress as u, StandardInvoiceInput as ut, ReceiptPaymentInput as v, RequestOptions as vt, SendReceiptInput as w, SzamlazzErrorCategory as wt, ReceiptType as x, AGENT_ERROR_CODES as xt, ReceiptPdfTemplate as y, SzamlazzHooks as yt, InvoiceDetailsSeller as z };
|