@useyona/einvoice-mcp 0.0.0-stage → 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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +201 -2
  3. package/bin/cli.js +2 -0
  4. package/dist/cli.d.ts +24 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +73 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/http.d.ts +16 -0
  9. package/dist/http.d.ts.map +1 -0
  10. package/dist/http.js +41 -0
  11. package/dist/http.js.map +1 -0
  12. package/dist/idempotency.d.ts +16 -0
  13. package/dist/idempotency.d.ts.map +1 -0
  14. package/dist/idempotency.js +31 -0
  15. package/dist/idempotency.js.map +1 -0
  16. package/dist/index.d.ts +12 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +22 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/prompts.d.ts +5 -0
  21. package/dist/prompts.d.ts.map +1 -0
  22. package/dist/prompts.js +72 -0
  23. package/dist/prompts.js.map +1 -0
  24. package/dist/resources.d.ts +16 -0
  25. package/dist/resources.d.ts.map +1 -0
  26. package/dist/resources.js +65 -0
  27. package/dist/resources.js.map +1 -0
  28. package/dist/result.d.ts +42 -0
  29. package/dist/result.d.ts.map +1 -0
  30. package/dist/result.js +83 -0
  31. package/dist/result.js.map +1 -0
  32. package/dist/server.d.ts +26 -0
  33. package/dist/server.d.ts.map +1 -0
  34. package/dist/server.js +68 -0
  35. package/dist/server.js.map +1 -0
  36. package/dist/tools/index.d.ts +34 -0
  37. package/dist/tools/index.d.ts.map +1 -0
  38. package/dist/tools/index.js +284 -0
  39. package/dist/tools/index.js.map +1 -0
  40. package/dist/tools/schemas.d.ts +876 -0
  41. package/dist/tools/schemas.d.ts.map +1 -0
  42. package/dist/tools/schemas.js +185 -0
  43. package/dist/tools/schemas.js.map +1 -0
  44. package/dist/version.d.ts +5 -0
  45. package/dist/version.d.ts.map +1 -0
  46. package/dist/version.js +8 -0
  47. package/dist/version.js.map +1 -0
  48. package/package.json +82 -4
@@ -0,0 +1,876 @@
1
+ import { z } from 'zod';
2
+ import type { CancelInvoiceBody, CreateBuyerBody, CreateInvoiceBody, CreateInvoiceShareLinkBody, CreateItemBody, IssueCreditNoteBody, ListBuyersQuery, ListInboundInvoicesQuery, ListInvoicesQuery, ListItemsQuery, ListWebhookDeliveriesQuery, LookupTaxIdQuery, UpdateInvoiceBody, ValidateInvoiceBody } from '@useyona/einvoice-js';
3
+ export declare const id: (what: string) => z.ZodString;
4
+ export declare const pagination: {
5
+ page: z.ZodOptional<z.ZodNumber>;
6
+ limit: z.ZodOptional<z.ZodNumber>;
7
+ };
8
+ export declare const confirm: z.ZodLiteral<true>;
9
+ export declare const lineItem: z.ZodObject<{
10
+ itemId: z.ZodOptional<z.ZodString>;
11
+ itemName: z.ZodOptional<z.ZodString>;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ hsnCode: z.ZodOptional<z.ZodString>;
14
+ productCategory: z.ZodOptional<z.ZodString>;
15
+ isicCode: z.ZodOptional<z.ZodString>;
16
+ serviceCategory: z.ZodOptional<z.ZodString>;
17
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
18
+ unitCode: z.ZodOptional<z.ZodString>;
19
+ unitPrice: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
20
+ discountAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
21
+ feeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
22
+ taxCategory: z.ZodOptional<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ quantity: string | number;
25
+ description?: string | undefined;
26
+ itemId?: string | undefined;
27
+ itemName?: string | undefined;
28
+ hsnCode?: string | undefined;
29
+ productCategory?: string | undefined;
30
+ isicCode?: string | undefined;
31
+ serviceCategory?: string | undefined;
32
+ unitCode?: string | undefined;
33
+ unitPrice?: string | number | undefined;
34
+ discountAmount?: string | number | undefined;
35
+ feeAmount?: string | number | undefined;
36
+ taxCategory?: string | undefined;
37
+ }, {
38
+ quantity: string | number;
39
+ description?: string | undefined;
40
+ itemId?: string | undefined;
41
+ itemName?: string | undefined;
42
+ hsnCode?: string | undefined;
43
+ productCategory?: string | undefined;
44
+ isicCode?: string | undefined;
45
+ serviceCategory?: string | undefined;
46
+ unitCode?: string | undefined;
47
+ unitPrice?: string | number | undefined;
48
+ discountAmount?: string | number | undefined;
49
+ feeAmount?: string | number | undefined;
50
+ taxCategory?: string | undefined;
51
+ }>;
52
+ export declare const invoiceFields: {
53
+ buyerId: z.ZodOptional<z.ZodString>;
54
+ invoiceKind: z.ZodString;
55
+ invoiceNumber: z.ZodOptional<z.ZodString>;
56
+ invoiceDate: z.ZodString;
57
+ issueTime: z.ZodOptional<z.ZodString>;
58
+ dueDate: z.ZodOptional<z.ZodString>;
59
+ currency: z.ZodString;
60
+ lineItems: z.ZodArray<z.ZodObject<{
61
+ itemId: z.ZodOptional<z.ZodString>;
62
+ itemName: z.ZodOptional<z.ZodString>;
63
+ description: z.ZodOptional<z.ZodString>;
64
+ hsnCode: z.ZodOptional<z.ZodString>;
65
+ productCategory: z.ZodOptional<z.ZodString>;
66
+ isicCode: z.ZodOptional<z.ZodString>;
67
+ serviceCategory: z.ZodOptional<z.ZodString>;
68
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
69
+ unitCode: z.ZodOptional<z.ZodString>;
70
+ unitPrice: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
71
+ discountAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
72
+ feeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
73
+ taxCategory: z.ZodOptional<z.ZodString>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ quantity: string | number;
76
+ description?: string | undefined;
77
+ itemId?: string | undefined;
78
+ itemName?: string | undefined;
79
+ hsnCode?: string | undefined;
80
+ productCategory?: string | undefined;
81
+ isicCode?: string | undefined;
82
+ serviceCategory?: string | undefined;
83
+ unitCode?: string | undefined;
84
+ unitPrice?: string | number | undefined;
85
+ discountAmount?: string | number | undefined;
86
+ feeAmount?: string | number | undefined;
87
+ taxCategory?: string | undefined;
88
+ }, {
89
+ quantity: string | number;
90
+ description?: string | undefined;
91
+ itemId?: string | undefined;
92
+ itemName?: string | undefined;
93
+ hsnCode?: string | undefined;
94
+ productCategory?: string | undefined;
95
+ isicCode?: string | undefined;
96
+ serviceCategory?: string | undefined;
97
+ unitCode?: string | undefined;
98
+ unitPrice?: string | number | undefined;
99
+ discountAmount?: string | number | undefined;
100
+ feeAmount?: string | number | undefined;
101
+ taxCategory?: string | undefined;
102
+ }>, "many">;
103
+ allowanceAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
104
+ chargeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
105
+ paymentTerms: z.ZodOptional<z.ZodString>;
106
+ notes: z.ZodOptional<z.ZodString>;
107
+ purchaseOrderReference: z.ZodOptional<z.ZodString>;
108
+ buyerReference: z.ZodOptional<z.ZodString>;
109
+ accountingCost: z.ZodOptional<z.ZodString>;
110
+ };
111
+ export declare const createInvoiceInput: z.ZodObject<{
112
+ buyerId: z.ZodOptional<z.ZodString>;
113
+ invoiceKind: z.ZodString;
114
+ invoiceNumber: z.ZodOptional<z.ZodString>;
115
+ invoiceDate: z.ZodString;
116
+ issueTime: z.ZodOptional<z.ZodString>;
117
+ dueDate: z.ZodOptional<z.ZodString>;
118
+ currency: z.ZodString;
119
+ lineItems: z.ZodArray<z.ZodObject<{
120
+ itemId: z.ZodOptional<z.ZodString>;
121
+ itemName: z.ZodOptional<z.ZodString>;
122
+ description: z.ZodOptional<z.ZodString>;
123
+ hsnCode: z.ZodOptional<z.ZodString>;
124
+ productCategory: z.ZodOptional<z.ZodString>;
125
+ isicCode: z.ZodOptional<z.ZodString>;
126
+ serviceCategory: z.ZodOptional<z.ZodString>;
127
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
128
+ unitCode: z.ZodOptional<z.ZodString>;
129
+ unitPrice: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
130
+ discountAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
131
+ feeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
132
+ taxCategory: z.ZodOptional<z.ZodString>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ quantity: string | number;
135
+ description?: string | undefined;
136
+ itemId?: string | undefined;
137
+ itemName?: string | undefined;
138
+ hsnCode?: string | undefined;
139
+ productCategory?: string | undefined;
140
+ isicCode?: string | undefined;
141
+ serviceCategory?: string | undefined;
142
+ unitCode?: string | undefined;
143
+ unitPrice?: string | number | undefined;
144
+ discountAmount?: string | number | undefined;
145
+ feeAmount?: string | number | undefined;
146
+ taxCategory?: string | undefined;
147
+ }, {
148
+ quantity: string | number;
149
+ description?: string | undefined;
150
+ itemId?: string | undefined;
151
+ itemName?: string | undefined;
152
+ hsnCode?: string | undefined;
153
+ productCategory?: string | undefined;
154
+ isicCode?: string | undefined;
155
+ serviceCategory?: string | undefined;
156
+ unitCode?: string | undefined;
157
+ unitPrice?: string | number | undefined;
158
+ discountAmount?: string | number | undefined;
159
+ feeAmount?: string | number | undefined;
160
+ taxCategory?: string | undefined;
161
+ }>, "many">;
162
+ allowanceAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
163
+ chargeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
164
+ paymentTerms: z.ZodOptional<z.ZodString>;
165
+ notes: z.ZodOptional<z.ZodString>;
166
+ purchaseOrderReference: z.ZodOptional<z.ZodString>;
167
+ buyerReference: z.ZodOptional<z.ZodString>;
168
+ accountingCost: z.ZodOptional<z.ZodString>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ invoiceKind: string;
171
+ invoiceDate: string;
172
+ currency: string;
173
+ lineItems: {
174
+ quantity: string | number;
175
+ description?: string | undefined;
176
+ itemId?: string | undefined;
177
+ itemName?: string | undefined;
178
+ hsnCode?: string | undefined;
179
+ productCategory?: string | undefined;
180
+ isicCode?: string | undefined;
181
+ serviceCategory?: string | undefined;
182
+ unitCode?: string | undefined;
183
+ unitPrice?: string | number | undefined;
184
+ discountAmount?: string | number | undefined;
185
+ feeAmount?: string | number | undefined;
186
+ taxCategory?: string | undefined;
187
+ }[];
188
+ buyerId?: string | undefined;
189
+ invoiceNumber?: string | undefined;
190
+ issueTime?: string | undefined;
191
+ dueDate?: string | undefined;
192
+ allowanceAmount?: string | number | undefined;
193
+ chargeAmount?: string | number | undefined;
194
+ paymentTerms?: string | undefined;
195
+ notes?: string | undefined;
196
+ purchaseOrderReference?: string | undefined;
197
+ buyerReference?: string | undefined;
198
+ accountingCost?: string | undefined;
199
+ }, {
200
+ invoiceKind: string;
201
+ invoiceDate: string;
202
+ currency: string;
203
+ lineItems: {
204
+ quantity: string | number;
205
+ description?: string | undefined;
206
+ itemId?: string | undefined;
207
+ itemName?: string | undefined;
208
+ hsnCode?: string | undefined;
209
+ productCategory?: string | undefined;
210
+ isicCode?: string | undefined;
211
+ serviceCategory?: string | undefined;
212
+ unitCode?: string | undefined;
213
+ unitPrice?: string | number | undefined;
214
+ discountAmount?: string | number | undefined;
215
+ feeAmount?: string | number | undefined;
216
+ taxCategory?: string | undefined;
217
+ }[];
218
+ buyerId?: string | undefined;
219
+ invoiceNumber?: string | undefined;
220
+ issueTime?: string | undefined;
221
+ dueDate?: string | undefined;
222
+ allowanceAmount?: string | number | undefined;
223
+ chargeAmount?: string | number | undefined;
224
+ paymentTerms?: string | undefined;
225
+ notes?: string | undefined;
226
+ purchaseOrderReference?: string | undefined;
227
+ buyerReference?: string | undefined;
228
+ accountingCost?: string | undefined;
229
+ }>;
230
+ export declare const updateInvoiceFields: {
231
+ buyerId: z.ZodOptional<z.ZodString>;
232
+ invoiceKind: z.ZodOptional<z.ZodString>;
233
+ invoiceNumber: z.ZodOptional<z.ZodString>;
234
+ invoiceDate: z.ZodOptional<z.ZodString>;
235
+ issueTime: z.ZodOptional<z.ZodString>;
236
+ dueDate: z.ZodOptional<z.ZodString>;
237
+ currency: z.ZodOptional<z.ZodString>;
238
+ lineItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
239
+ itemId: z.ZodOptional<z.ZodString>;
240
+ itemName: z.ZodOptional<z.ZodString>;
241
+ description: z.ZodOptional<z.ZodString>;
242
+ hsnCode: z.ZodOptional<z.ZodString>;
243
+ productCategory: z.ZodOptional<z.ZodString>;
244
+ isicCode: z.ZodOptional<z.ZodString>;
245
+ serviceCategory: z.ZodOptional<z.ZodString>;
246
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
247
+ unitCode: z.ZodOptional<z.ZodString>;
248
+ unitPrice: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
249
+ discountAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
250
+ feeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
251
+ taxCategory: z.ZodOptional<z.ZodString>;
252
+ }, "strip", z.ZodTypeAny, {
253
+ quantity: string | number;
254
+ description?: string | undefined;
255
+ itemId?: string | undefined;
256
+ itemName?: string | undefined;
257
+ hsnCode?: string | undefined;
258
+ productCategory?: string | undefined;
259
+ isicCode?: string | undefined;
260
+ serviceCategory?: string | undefined;
261
+ unitCode?: string | undefined;
262
+ unitPrice?: string | number | undefined;
263
+ discountAmount?: string | number | undefined;
264
+ feeAmount?: string | number | undefined;
265
+ taxCategory?: string | undefined;
266
+ }, {
267
+ quantity: string | number;
268
+ description?: string | undefined;
269
+ itemId?: string | undefined;
270
+ itemName?: string | undefined;
271
+ hsnCode?: string | undefined;
272
+ productCategory?: string | undefined;
273
+ isicCode?: string | undefined;
274
+ serviceCategory?: string | undefined;
275
+ unitCode?: string | undefined;
276
+ unitPrice?: string | number | undefined;
277
+ discountAmount?: string | number | undefined;
278
+ feeAmount?: string | number | undefined;
279
+ taxCategory?: string | undefined;
280
+ }>, "many">>;
281
+ allowanceAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
282
+ chargeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
283
+ paymentTerms: z.ZodOptional<z.ZodString>;
284
+ notes: z.ZodOptional<z.ZodString>;
285
+ purchaseOrderReference: z.ZodOptional<z.ZodString>;
286
+ buyerReference: z.ZodOptional<z.ZodString>;
287
+ accountingCost: z.ZodOptional<z.ZodString>;
288
+ };
289
+ export declare const updateInvoiceInput: z.ZodObject<{
290
+ buyerId: z.ZodOptional<z.ZodString>;
291
+ invoiceKind: z.ZodOptional<z.ZodString>;
292
+ invoiceNumber: z.ZodOptional<z.ZodString>;
293
+ invoiceDate: z.ZodOptional<z.ZodString>;
294
+ issueTime: z.ZodOptional<z.ZodString>;
295
+ dueDate: z.ZodOptional<z.ZodString>;
296
+ currency: z.ZodOptional<z.ZodString>;
297
+ lineItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
298
+ itemId: z.ZodOptional<z.ZodString>;
299
+ itemName: z.ZodOptional<z.ZodString>;
300
+ description: z.ZodOptional<z.ZodString>;
301
+ hsnCode: z.ZodOptional<z.ZodString>;
302
+ productCategory: z.ZodOptional<z.ZodString>;
303
+ isicCode: z.ZodOptional<z.ZodString>;
304
+ serviceCategory: z.ZodOptional<z.ZodString>;
305
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
306
+ unitCode: z.ZodOptional<z.ZodString>;
307
+ unitPrice: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
308
+ discountAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
309
+ feeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
310
+ taxCategory: z.ZodOptional<z.ZodString>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ quantity: string | number;
313
+ description?: string | undefined;
314
+ itemId?: string | undefined;
315
+ itemName?: string | undefined;
316
+ hsnCode?: string | undefined;
317
+ productCategory?: string | undefined;
318
+ isicCode?: string | undefined;
319
+ serviceCategory?: string | undefined;
320
+ unitCode?: string | undefined;
321
+ unitPrice?: string | number | undefined;
322
+ discountAmount?: string | number | undefined;
323
+ feeAmount?: string | number | undefined;
324
+ taxCategory?: string | undefined;
325
+ }, {
326
+ quantity: string | number;
327
+ description?: string | undefined;
328
+ itemId?: string | undefined;
329
+ itemName?: string | undefined;
330
+ hsnCode?: string | undefined;
331
+ productCategory?: string | undefined;
332
+ isicCode?: string | undefined;
333
+ serviceCategory?: string | undefined;
334
+ unitCode?: string | undefined;
335
+ unitPrice?: string | number | undefined;
336
+ discountAmount?: string | number | undefined;
337
+ feeAmount?: string | number | undefined;
338
+ taxCategory?: string | undefined;
339
+ }>, "many">>;
340
+ allowanceAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
341
+ chargeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
342
+ paymentTerms: z.ZodOptional<z.ZodString>;
343
+ notes: z.ZodOptional<z.ZodString>;
344
+ purchaseOrderReference: z.ZodOptional<z.ZodString>;
345
+ buyerReference: z.ZodOptional<z.ZodString>;
346
+ accountingCost: z.ZodOptional<z.ZodString>;
347
+ }, "strip", z.ZodTypeAny, {
348
+ buyerId?: string | undefined;
349
+ invoiceKind?: string | undefined;
350
+ invoiceNumber?: string | undefined;
351
+ invoiceDate?: string | undefined;
352
+ issueTime?: string | undefined;
353
+ dueDate?: string | undefined;
354
+ currency?: string | undefined;
355
+ lineItems?: {
356
+ quantity: string | number;
357
+ description?: string | undefined;
358
+ itemId?: string | undefined;
359
+ itemName?: string | undefined;
360
+ hsnCode?: string | undefined;
361
+ productCategory?: string | undefined;
362
+ isicCode?: string | undefined;
363
+ serviceCategory?: string | undefined;
364
+ unitCode?: string | undefined;
365
+ unitPrice?: string | number | undefined;
366
+ discountAmount?: string | number | undefined;
367
+ feeAmount?: string | number | undefined;
368
+ taxCategory?: string | undefined;
369
+ }[] | undefined;
370
+ allowanceAmount?: string | number | undefined;
371
+ chargeAmount?: string | number | undefined;
372
+ paymentTerms?: string | undefined;
373
+ notes?: string | undefined;
374
+ purchaseOrderReference?: string | undefined;
375
+ buyerReference?: string | undefined;
376
+ accountingCost?: string | undefined;
377
+ }, {
378
+ buyerId?: string | undefined;
379
+ invoiceKind?: string | undefined;
380
+ invoiceNumber?: string | undefined;
381
+ invoiceDate?: string | undefined;
382
+ issueTime?: string | undefined;
383
+ dueDate?: string | undefined;
384
+ currency?: string | undefined;
385
+ lineItems?: {
386
+ quantity: string | number;
387
+ description?: string | undefined;
388
+ itemId?: string | undefined;
389
+ itemName?: string | undefined;
390
+ hsnCode?: string | undefined;
391
+ productCategory?: string | undefined;
392
+ isicCode?: string | undefined;
393
+ serviceCategory?: string | undefined;
394
+ unitCode?: string | undefined;
395
+ unitPrice?: string | number | undefined;
396
+ discountAmount?: string | number | undefined;
397
+ feeAmount?: string | number | undefined;
398
+ taxCategory?: string | undefined;
399
+ }[] | undefined;
400
+ allowanceAmount?: string | number | undefined;
401
+ chargeAmount?: string | number | undefined;
402
+ paymentTerms?: string | undefined;
403
+ notes?: string | undefined;
404
+ purchaseOrderReference?: string | undefined;
405
+ buyerReference?: string | undefined;
406
+ accountingCost?: string | undefined;
407
+ }>;
408
+ export declare const validateInvoiceFields: {
409
+ buyerId: z.ZodOptional<z.ZodString>;
410
+ invoiceKind: z.ZodOptional<z.ZodString>;
411
+ invoiceNumber: z.ZodOptional<z.ZodString>;
412
+ invoiceDate: z.ZodOptional<z.ZodString>;
413
+ issueTime: z.ZodOptional<z.ZodString>;
414
+ dueDate: z.ZodOptional<z.ZodString>;
415
+ currency: z.ZodOptional<z.ZodString>;
416
+ lineItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
417
+ itemId: z.ZodOptional<z.ZodString>;
418
+ itemName: z.ZodOptional<z.ZodString>;
419
+ description: z.ZodOptional<z.ZodString>;
420
+ hsnCode: z.ZodOptional<z.ZodString>;
421
+ productCategory: z.ZodOptional<z.ZodString>;
422
+ isicCode: z.ZodOptional<z.ZodString>;
423
+ serviceCategory: z.ZodOptional<z.ZodString>;
424
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
425
+ unitCode: z.ZodOptional<z.ZodString>;
426
+ unitPrice: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
427
+ discountAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
428
+ feeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
429
+ taxCategory: z.ZodOptional<z.ZodString>;
430
+ }, "strip", z.ZodTypeAny, {
431
+ quantity: string | number;
432
+ description?: string | undefined;
433
+ itemId?: string | undefined;
434
+ itemName?: string | undefined;
435
+ hsnCode?: string | undefined;
436
+ productCategory?: string | undefined;
437
+ isicCode?: string | undefined;
438
+ serviceCategory?: string | undefined;
439
+ unitCode?: string | undefined;
440
+ unitPrice?: string | number | undefined;
441
+ discountAmount?: string | number | undefined;
442
+ feeAmount?: string | number | undefined;
443
+ taxCategory?: string | undefined;
444
+ }, {
445
+ quantity: string | number;
446
+ description?: string | undefined;
447
+ itemId?: string | undefined;
448
+ itemName?: string | undefined;
449
+ hsnCode?: string | undefined;
450
+ productCategory?: string | undefined;
451
+ isicCode?: string | undefined;
452
+ serviceCategory?: string | undefined;
453
+ unitCode?: string | undefined;
454
+ unitPrice?: string | number | undefined;
455
+ discountAmount?: string | number | undefined;
456
+ feeAmount?: string | number | undefined;
457
+ taxCategory?: string | undefined;
458
+ }>, "many">>;
459
+ allowanceAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
460
+ chargeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
461
+ paymentTerms: z.ZodOptional<z.ZodString>;
462
+ notes: z.ZodOptional<z.ZodString>;
463
+ purchaseOrderReference: z.ZodOptional<z.ZodString>;
464
+ buyerReference: z.ZodOptional<z.ZodString>;
465
+ accountingCost: z.ZodOptional<z.ZodString>;
466
+ invoiceId: z.ZodOptional<z.ZodString>;
467
+ };
468
+ export declare const validateInvoiceInput: z.ZodObject<{
469
+ buyerId: z.ZodOptional<z.ZodString>;
470
+ invoiceKind: z.ZodOptional<z.ZodString>;
471
+ invoiceNumber: z.ZodOptional<z.ZodString>;
472
+ invoiceDate: z.ZodOptional<z.ZodString>;
473
+ issueTime: z.ZodOptional<z.ZodString>;
474
+ dueDate: z.ZodOptional<z.ZodString>;
475
+ currency: z.ZodOptional<z.ZodString>;
476
+ lineItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
477
+ itemId: z.ZodOptional<z.ZodString>;
478
+ itemName: z.ZodOptional<z.ZodString>;
479
+ description: z.ZodOptional<z.ZodString>;
480
+ hsnCode: z.ZodOptional<z.ZodString>;
481
+ productCategory: z.ZodOptional<z.ZodString>;
482
+ isicCode: z.ZodOptional<z.ZodString>;
483
+ serviceCategory: z.ZodOptional<z.ZodString>;
484
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
485
+ unitCode: z.ZodOptional<z.ZodString>;
486
+ unitPrice: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
487
+ discountAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
488
+ feeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
489
+ taxCategory: z.ZodOptional<z.ZodString>;
490
+ }, "strip", z.ZodTypeAny, {
491
+ quantity: string | number;
492
+ description?: string | undefined;
493
+ itemId?: string | undefined;
494
+ itemName?: string | undefined;
495
+ hsnCode?: string | undefined;
496
+ productCategory?: string | undefined;
497
+ isicCode?: string | undefined;
498
+ serviceCategory?: string | undefined;
499
+ unitCode?: string | undefined;
500
+ unitPrice?: string | number | undefined;
501
+ discountAmount?: string | number | undefined;
502
+ feeAmount?: string | number | undefined;
503
+ taxCategory?: string | undefined;
504
+ }, {
505
+ quantity: string | number;
506
+ description?: string | undefined;
507
+ itemId?: string | undefined;
508
+ itemName?: string | undefined;
509
+ hsnCode?: string | undefined;
510
+ productCategory?: string | undefined;
511
+ isicCode?: string | undefined;
512
+ serviceCategory?: string | undefined;
513
+ unitCode?: string | undefined;
514
+ unitPrice?: string | number | undefined;
515
+ discountAmount?: string | number | undefined;
516
+ feeAmount?: string | number | undefined;
517
+ taxCategory?: string | undefined;
518
+ }>, "many">>;
519
+ allowanceAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
520
+ chargeAmount: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
521
+ paymentTerms: z.ZodOptional<z.ZodString>;
522
+ notes: z.ZodOptional<z.ZodString>;
523
+ purchaseOrderReference: z.ZodOptional<z.ZodString>;
524
+ buyerReference: z.ZodOptional<z.ZodString>;
525
+ accountingCost: z.ZodOptional<z.ZodString>;
526
+ invoiceId: z.ZodOptional<z.ZodString>;
527
+ }, "strip", z.ZodTypeAny, {
528
+ invoiceId?: string | undefined;
529
+ buyerId?: string | undefined;
530
+ invoiceKind?: string | undefined;
531
+ invoiceNumber?: string | undefined;
532
+ invoiceDate?: string | undefined;
533
+ issueTime?: string | undefined;
534
+ dueDate?: string | undefined;
535
+ currency?: string | undefined;
536
+ lineItems?: {
537
+ quantity: string | number;
538
+ description?: string | undefined;
539
+ itemId?: string | undefined;
540
+ itemName?: string | undefined;
541
+ hsnCode?: string | undefined;
542
+ productCategory?: string | undefined;
543
+ isicCode?: string | undefined;
544
+ serviceCategory?: string | undefined;
545
+ unitCode?: string | undefined;
546
+ unitPrice?: string | number | undefined;
547
+ discountAmount?: string | number | undefined;
548
+ feeAmount?: string | number | undefined;
549
+ taxCategory?: string | undefined;
550
+ }[] | undefined;
551
+ allowanceAmount?: string | number | undefined;
552
+ chargeAmount?: string | number | undefined;
553
+ paymentTerms?: string | undefined;
554
+ notes?: string | undefined;
555
+ purchaseOrderReference?: string | undefined;
556
+ buyerReference?: string | undefined;
557
+ accountingCost?: string | undefined;
558
+ }, {
559
+ invoiceId?: string | undefined;
560
+ buyerId?: string | undefined;
561
+ invoiceKind?: string | undefined;
562
+ invoiceNumber?: string | undefined;
563
+ invoiceDate?: string | undefined;
564
+ issueTime?: string | undefined;
565
+ dueDate?: string | undefined;
566
+ currency?: string | undefined;
567
+ lineItems?: {
568
+ quantity: string | number;
569
+ description?: string | undefined;
570
+ itemId?: string | undefined;
571
+ itemName?: string | undefined;
572
+ hsnCode?: string | undefined;
573
+ productCategory?: string | undefined;
574
+ isicCode?: string | undefined;
575
+ serviceCategory?: string | undefined;
576
+ unitCode?: string | undefined;
577
+ unitPrice?: string | number | undefined;
578
+ discountAmount?: string | number | undefined;
579
+ feeAmount?: string | number | undefined;
580
+ taxCategory?: string | undefined;
581
+ }[] | undefined;
582
+ allowanceAmount?: string | number | undefined;
583
+ chargeAmount?: string | number | undefined;
584
+ paymentTerms?: string | undefined;
585
+ notes?: string | undefined;
586
+ purchaseOrderReference?: string | undefined;
587
+ buyerReference?: string | undefined;
588
+ accountingCost?: string | undefined;
589
+ }>;
590
+ export declare const buyerFields: {
591
+ name: z.ZodString;
592
+ legalName: z.ZodOptional<z.ZodString>;
593
+ taxId: z.ZodOptional<z.ZodString>;
594
+ taxIdType: z.ZodOptional<z.ZodEnum<["tin", "rn", "foreign", "none"]>>;
595
+ email: z.ZodOptional<z.ZodString>;
596
+ phone: z.ZodOptional<z.ZodString>;
597
+ address: z.ZodOptional<z.ZodObject<{
598
+ line1: z.ZodString;
599
+ line2: z.ZodOptional<z.ZodString>;
600
+ city: z.ZodString;
601
+ state: z.ZodOptional<z.ZodString>;
602
+ lga: z.ZodOptional<z.ZodString>;
603
+ postalCode: z.ZodOptional<z.ZodString>;
604
+ country: z.ZodString;
605
+ }, "strip", z.ZodTypeAny, {
606
+ line1: string;
607
+ city: string;
608
+ country: string;
609
+ line2?: string | undefined;
610
+ state?: string | undefined;
611
+ lga?: string | undefined;
612
+ postalCode?: string | undefined;
613
+ }, {
614
+ line1: string;
615
+ city: string;
616
+ country: string;
617
+ line2?: string | undefined;
618
+ state?: string | undefined;
619
+ lga?: string | undefined;
620
+ postalCode?: string | undefined;
621
+ }>>;
622
+ partyType: z.ZodOptional<z.ZodEnum<["individual", "company", "partnership", "non_profit", "government"]>>;
623
+ businessDescription: z.ZodOptional<z.ZodString>;
624
+ reference: z.ZodOptional<z.ZodString>;
625
+ };
626
+ export declare const createBuyerInput: z.ZodObject<{
627
+ name: z.ZodString;
628
+ legalName: z.ZodOptional<z.ZodString>;
629
+ taxId: z.ZodOptional<z.ZodString>;
630
+ taxIdType: z.ZodOptional<z.ZodEnum<["tin", "rn", "foreign", "none"]>>;
631
+ email: z.ZodOptional<z.ZodString>;
632
+ phone: z.ZodOptional<z.ZodString>;
633
+ address: z.ZodOptional<z.ZodObject<{
634
+ line1: z.ZodString;
635
+ line2: z.ZodOptional<z.ZodString>;
636
+ city: z.ZodString;
637
+ state: z.ZodOptional<z.ZodString>;
638
+ lga: z.ZodOptional<z.ZodString>;
639
+ postalCode: z.ZodOptional<z.ZodString>;
640
+ country: z.ZodString;
641
+ }, "strip", z.ZodTypeAny, {
642
+ line1: string;
643
+ city: string;
644
+ country: string;
645
+ line2?: string | undefined;
646
+ state?: string | undefined;
647
+ lga?: string | undefined;
648
+ postalCode?: string | undefined;
649
+ }, {
650
+ line1: string;
651
+ city: string;
652
+ country: string;
653
+ line2?: string | undefined;
654
+ state?: string | undefined;
655
+ lga?: string | undefined;
656
+ postalCode?: string | undefined;
657
+ }>>;
658
+ partyType: z.ZodOptional<z.ZodEnum<["individual", "company", "partnership", "non_profit", "government"]>>;
659
+ businessDescription: z.ZodOptional<z.ZodString>;
660
+ reference: z.ZodOptional<z.ZodString>;
661
+ }, "strip", z.ZodTypeAny, {
662
+ name: string;
663
+ legalName?: string | undefined;
664
+ taxId?: string | undefined;
665
+ taxIdType?: "tin" | "rn" | "foreign" | "none" | undefined;
666
+ email?: string | undefined;
667
+ phone?: string | undefined;
668
+ address?: {
669
+ line1: string;
670
+ city: string;
671
+ country: string;
672
+ line2?: string | undefined;
673
+ state?: string | undefined;
674
+ lga?: string | undefined;
675
+ postalCode?: string | undefined;
676
+ } | undefined;
677
+ partyType?: "individual" | "company" | "partnership" | "non_profit" | "government" | undefined;
678
+ businessDescription?: string | undefined;
679
+ reference?: string | undefined;
680
+ }, {
681
+ name: string;
682
+ legalName?: string | undefined;
683
+ taxId?: string | undefined;
684
+ taxIdType?: "tin" | "rn" | "foreign" | "none" | undefined;
685
+ email?: string | undefined;
686
+ phone?: string | undefined;
687
+ address?: {
688
+ line1: string;
689
+ city: string;
690
+ country: string;
691
+ line2?: string | undefined;
692
+ state?: string | undefined;
693
+ lga?: string | undefined;
694
+ postalCode?: string | undefined;
695
+ } | undefined;
696
+ partyType?: "individual" | "company" | "partnership" | "non_profit" | "government" | undefined;
697
+ businessDescription?: string | undefined;
698
+ reference?: string | undefined;
699
+ }>;
700
+ export declare const itemFields: {
701
+ name: z.ZodString;
702
+ description: z.ZodOptional<z.ZodString>;
703
+ itemType: z.ZodEnum<["goods", "service"]>;
704
+ hsnCode: z.ZodOptional<z.ZodString>;
705
+ serviceCode: z.ZodOptional<z.ZodString>;
706
+ productCategory: z.ZodString;
707
+ unitCode: z.ZodString;
708
+ unitPriceMinor: z.ZodString;
709
+ currency: z.ZodString;
710
+ taxCategory: z.ZodString;
711
+ sku: z.ZodOptional<z.ZodString>;
712
+ };
713
+ export declare const createItemInput: z.ZodObject<{
714
+ name: z.ZodString;
715
+ description: z.ZodOptional<z.ZodString>;
716
+ itemType: z.ZodEnum<["goods", "service"]>;
717
+ hsnCode: z.ZodOptional<z.ZodString>;
718
+ serviceCode: z.ZodOptional<z.ZodString>;
719
+ productCategory: z.ZodString;
720
+ unitCode: z.ZodString;
721
+ unitPriceMinor: z.ZodString;
722
+ currency: z.ZodString;
723
+ taxCategory: z.ZodString;
724
+ sku: z.ZodOptional<z.ZodString>;
725
+ }, "strip", z.ZodTypeAny, {
726
+ name: string;
727
+ productCategory: string;
728
+ unitCode: string;
729
+ taxCategory: string;
730
+ currency: string;
731
+ itemType: "goods" | "service";
732
+ unitPriceMinor: string;
733
+ description?: string | undefined;
734
+ hsnCode?: string | undefined;
735
+ serviceCode?: string | undefined;
736
+ sku?: string | undefined;
737
+ }, {
738
+ name: string;
739
+ productCategory: string;
740
+ unitCode: string;
741
+ taxCategory: string;
742
+ currency: string;
743
+ itemType: "goods" | "service";
744
+ unitPriceMinor: string;
745
+ description?: string | undefined;
746
+ hsnCode?: string | undefined;
747
+ serviceCode?: string | undefined;
748
+ sku?: string | undefined;
749
+ }>;
750
+ export declare const creditNoteFields: {
751
+ reason: z.ZodString;
752
+ mode: z.ZodEnum<["full", "lines", "amount"]>;
753
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
754
+ lineNo: z.ZodNumber;
755
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
756
+ }, "strip", z.ZodTypeAny, {
757
+ quantity: string | number;
758
+ lineNo: number;
759
+ }, {
760
+ quantity: string | number;
761
+ lineNo: number;
762
+ }>, "many">>;
763
+ amountMinor: z.ZodOptional<z.ZodNumber>;
764
+ lineNo: z.ZodOptional<z.ZodNumber>;
765
+ preview: z.ZodOptional<z.ZodBoolean>;
766
+ };
767
+ export declare const creditNoteInput: z.ZodObject<{
768
+ reason: z.ZodString;
769
+ mode: z.ZodEnum<["full", "lines", "amount"]>;
770
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
771
+ lineNo: z.ZodNumber;
772
+ quantity: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
773
+ }, "strip", z.ZodTypeAny, {
774
+ quantity: string | number;
775
+ lineNo: number;
776
+ }, {
777
+ quantity: string | number;
778
+ lineNo: number;
779
+ }>, "many">>;
780
+ amountMinor: z.ZodOptional<z.ZodNumber>;
781
+ lineNo: z.ZodOptional<z.ZodNumber>;
782
+ preview: z.ZodOptional<z.ZodBoolean>;
783
+ }, "strip", z.ZodTypeAny, {
784
+ reason: string;
785
+ mode: "full" | "lines" | "amount";
786
+ lines?: {
787
+ quantity: string | number;
788
+ lineNo: number;
789
+ }[] | undefined;
790
+ lineNo?: number | undefined;
791
+ amountMinor?: number | undefined;
792
+ preview?: boolean | undefined;
793
+ }, {
794
+ reason: string;
795
+ mode: "full" | "lines" | "amount";
796
+ lines?: {
797
+ quantity: string | number;
798
+ lineNo: number;
799
+ }[] | undefined;
800
+ lineNo?: number | undefined;
801
+ amountMinor?: number | undefined;
802
+ preview?: boolean | undefined;
803
+ }>;
804
+ export declare const shareLinkFields: {
805
+ expiresInSeconds: z.ZodOptional<z.ZodNumber>;
806
+ maxViews: z.ZodOptional<z.ZodNumber>;
807
+ };
808
+ export declare const listInvoicesFields: {
809
+ page: z.ZodOptional<z.ZodNumber>;
810
+ limit: z.ZodOptional<z.ZodNumber>;
811
+ status: z.ZodOptional<z.ZodEnum<["draft", "finalised", "queued", "signed", "transmitted", "accepted", "rejected", "failed", "cancellation_pending", "cancelled"]>>;
812
+ reporting: z.ZodOptional<z.ZodEnum<["draft", "not_reported", "in_progress", "reported", "needs_attention"]>>;
813
+ buyerId: z.ZodOptional<z.ZodString>;
814
+ search: z.ZodOptional<z.ZodString>;
815
+ invoiceDateFrom: z.ZodOptional<z.ZodString>;
816
+ invoiceDateTo: z.ZodOptional<z.ZodString>;
817
+ overdue: z.ZodOptional<z.ZodLiteral<"true">>;
818
+ sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "invoiceDate", "invoiceNumber", "payableMinor", "dueDate", "taxMinor"]>>;
819
+ sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
820
+ };
821
+ export declare const listInboundFields: {
822
+ page: z.ZodOptional<z.ZodNumber>;
823
+ limit: z.ZodOptional<z.ZodNumber>;
824
+ q: z.ZodOptional<z.ZodString>;
825
+ taxId: z.ZodOptional<z.ZodString>;
826
+ paymentStatus: z.ZodOptional<z.ZodEnum<["paid", "unpaid", "partial", "rejected", "overdue"]>>;
827
+ issueDateFrom: z.ZodOptional<z.ZodString>;
828
+ issueDateTo: z.ZodOptional<z.ZodString>;
829
+ };
830
+ export declare const listDeliveriesFields: {
831
+ page: z.ZodOptional<z.ZodNumber>;
832
+ limit: z.ZodOptional<z.ZodNumber>;
833
+ status: z.ZodOptional<z.ZodEnum<["pending", "delivering", "retrying", "delivered", "failed"]>>;
834
+ endpointId: z.ZodOptional<z.ZodString>;
835
+ type: z.ZodOptional<z.ZodString>;
836
+ };
837
+ export declare const searchBuyersFields: {
838
+ page: z.ZodOptional<z.ZodNumber>;
839
+ limit: z.ZodOptional<z.ZodNumber>;
840
+ search: z.ZodOptional<z.ZodString>;
841
+ taxIdStatus: z.ZodOptional<z.ZodEnum<["unverified", "pending", "verified", "not_found", "name_mismatch", "unavailable", "valid_off_network", "checking"]>>;
842
+ };
843
+ export declare const searchItemsFields: {
844
+ page: z.ZodOptional<z.ZodNumber>;
845
+ limit: z.ZodOptional<z.ZodNumber>;
846
+ q: z.ZodOptional<z.ZodString>;
847
+ itemType: z.ZodOptional<z.ZodEnum<["goods", "service"]>>;
848
+ archived: z.ZodOptional<z.ZodEnum<["false", "true", "all"]>>;
849
+ };
850
+ export declare const lookupTinFields: {
851
+ taxId: z.ZodString;
852
+ type: z.ZodOptional<z.ZodEnum<["tin", "rn", "foreign"]>>;
853
+ };
854
+ type Assert<T extends true> = T;
855
+ type Extends<A, B> = [A] extends [B] ? true : false;
856
+ type Out<S extends z.ZodRawShape> = z.infer<z.ZodObject<S>>;
857
+ export type SchemaContract = [
858
+ Assert<Extends<Out<typeof invoiceFields>, CreateInvoiceBody>>,
859
+ Assert<Extends<Out<typeof updateInvoiceFields>, UpdateInvoiceBody>>,
860
+ Assert<Extends<Out<typeof validateInvoiceFields>, ValidateInvoiceBody>>,
861
+ Assert<Extends<Out<typeof buyerFields>, CreateBuyerBody>>,
862
+ Assert<Extends<Out<typeof itemFields>, CreateItemBody>>,
863
+ Assert<Extends<Out<typeof creditNoteFields>, IssueCreditNoteBody>>,
864
+ Assert<Extends<{
865
+ reason: string;
866
+ }, CancelInvoiceBody>>,
867
+ Assert<Extends<Out<typeof shareLinkFields>, CreateInvoiceShareLinkBody>>,
868
+ Assert<Extends<Out<typeof listInvoicesFields>, ListInvoicesQuery>>,
869
+ Assert<Extends<Out<typeof listInboundFields>, ListInboundInvoicesQuery>>,
870
+ Assert<Extends<Out<typeof listDeliveriesFields>, ListWebhookDeliveriesQuery>>,
871
+ Assert<Extends<Out<typeof searchBuyersFields>, ListBuyersQuery>>,
872
+ Assert<Extends<Out<typeof searchItemsFields>, ListItemsQuery>>,
873
+ Assert<Extends<Omit<Out<typeof lookupTinFields>, 'taxId'>, LookupTaxIdQuery>>
874
+ ];
875
+ export {};
876
+ //# sourceMappingURL=schemas.d.ts.map