@deepintel-ltd/farmpro-contracts 1.22.3 → 1.23.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 (50) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +6 -0
  4. package/dist/routes/commodity-deals.routes.d.ts +175 -0
  5. package/dist/routes/commodity-deals.routes.d.ts.map +1 -1
  6. package/dist/routes/index.d.ts +9 -0
  7. package/dist/routes/index.d.ts.map +1 -1
  8. package/dist/routes/index.js +6 -0
  9. package/dist/routes/invoices.routes.d.ts +189 -42
  10. package/dist/routes/invoices.routes.d.ts.map +1 -1
  11. package/dist/routes/livestock-groups.routes.d.ts +308 -0
  12. package/dist/routes/livestock-groups.routes.d.ts.map +1 -1
  13. package/dist/routes/organization-capabilities.routes.d.ts +1671 -0
  14. package/dist/routes/organization-capabilities.routes.d.ts.map +1 -0
  15. package/dist/routes/organization-capabilities.routes.js +74 -0
  16. package/dist/routes/purchase-orders.routes.d.ts +2061 -0
  17. package/dist/routes/purchase-orders.routes.d.ts.map +1 -0
  18. package/dist/routes/purchase-orders.routes.js +55 -0
  19. package/dist/routes/staff.routes.d.ts +84 -0
  20. package/dist/routes/staff.routes.d.ts.map +1 -1
  21. package/dist/routes/trade-cash-events.routes.d.ts +3837 -0
  22. package/dist/routes/trade-cash-events.routes.d.ts.map +1 -0
  23. package/dist/routes/trade-cash-events.routes.js +126 -0
  24. package/dist/routes/waybills.routes.d.ts +210 -0
  25. package/dist/routes/waybills.routes.d.ts.map +1 -1
  26. package/dist/schemas/commodity-deals.schemas.d.ts +98 -0
  27. package/dist/schemas/commodity-deals.schemas.d.ts.map +1 -1
  28. package/dist/schemas/commodity-deals.schemas.js +7 -0
  29. package/dist/schemas/invoices.schemas.d.ts +144 -30
  30. package/dist/schemas/invoices.schemas.d.ts.map +1 -1
  31. package/dist/schemas/invoices.schemas.js +8 -2
  32. package/dist/schemas/livestock-groups.schemas.d.ts +302 -0
  33. package/dist/schemas/livestock-groups.schemas.d.ts.map +1 -1
  34. package/dist/schemas/livestock-groups.schemas.js +22 -0
  35. package/dist/schemas/organization-capabilities.schemas.d.ts +355 -0
  36. package/dist/schemas/organization-capabilities.schemas.d.ts.map +1 -0
  37. package/dist/schemas/organization-capabilities.schemas.js +19 -0
  38. package/dist/schemas/purchase-orders.schemas.d.ts +1031 -0
  39. package/dist/schemas/purchase-orders.schemas.d.ts.map +1 -0
  40. package/dist/schemas/purchase-orders.schemas.js +49 -0
  41. package/dist/schemas/staff.schemas.d.ts +76 -0
  42. package/dist/schemas/staff.schemas.d.ts.map +1 -1
  43. package/dist/schemas/staff.schemas.js +6 -0
  44. package/dist/schemas/trade-cash-events.schemas.d.ts +1524 -0
  45. package/dist/schemas/trade-cash-events.schemas.d.ts.map +1 -0
  46. package/dist/schemas/trade-cash-events.schemas.js +131 -0
  47. package/dist/schemas/waybills.schemas.d.ts +168 -0
  48. package/dist/schemas/waybills.schemas.d.ts.map +1 -1
  49. package/dist/schemas/waybills.schemas.js +9 -0
  50. package/package.json +1 -1
@@ -0,0 +1,1031 @@
1
+ import { z } from 'zod';
2
+ export declare const purchaseOrderItemSchema: z.ZodObject<{
3
+ description: z.ZodString;
4
+ quantity: z.ZodNumber;
5
+ unit: z.ZodString;
6
+ unitPrice: z.ZodOptional<z.ZodNumber>;
7
+ amount: z.ZodOptional<z.ZodNumber>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ description: string;
10
+ quantity: number;
11
+ unit: string;
12
+ amount?: number | undefined;
13
+ unitPrice?: number | undefined;
14
+ }, {
15
+ description: string;
16
+ quantity: number;
17
+ unit: string;
18
+ amount?: number | undefined;
19
+ unitPrice?: number | undefined;
20
+ }>;
21
+ export declare const purchaseOrderAttributesSchema: z.ZodObject<{
22
+ organizationId: z.ZodString;
23
+ supplierId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ poNumber: z.ZodString;
25
+ status: z.ZodEnum<["draft", "ordered", "received", "cancelled"]>;
26
+ items: z.ZodArray<z.ZodObject<{
27
+ description: z.ZodString;
28
+ quantity: z.ZodNumber;
29
+ unit: z.ZodString;
30
+ unitPrice: z.ZodOptional<z.ZodNumber>;
31
+ amount: z.ZodOptional<z.ZodNumber>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ description: string;
34
+ quantity: number;
35
+ unit: string;
36
+ amount?: number | undefined;
37
+ unitPrice?: number | undefined;
38
+ }, {
39
+ description: string;
40
+ quantity: number;
41
+ unit: string;
42
+ amount?: number | undefined;
43
+ unitPrice?: number | undefined;
44
+ }>, "many">;
45
+ totalAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
46
+ currency: z.ZodDefault<z.ZodString>;
47
+ expectedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ receivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
+ dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ } & {
52
+ createdAt: z.ZodString;
53
+ updatedAt: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ status: "received" | "cancelled" | "draft" | "ordered";
56
+ createdAt: string;
57
+ updatedAt: string;
58
+ currency: string;
59
+ organizationId: string;
60
+ items: {
61
+ description: string;
62
+ quantity: number;
63
+ unit: string;
64
+ amount?: number | undefined;
65
+ unitPrice?: number | undefined;
66
+ }[];
67
+ poNumber: string;
68
+ notes?: string | null | undefined;
69
+ totalAmount?: number | null | undefined;
70
+ receivedAt?: string | null | undefined;
71
+ supplierId?: string | null | undefined;
72
+ dealId?: string | null | undefined;
73
+ expectedAt?: string | null | undefined;
74
+ }, {
75
+ status: "received" | "cancelled" | "draft" | "ordered";
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ organizationId: string;
79
+ items: {
80
+ description: string;
81
+ quantity: number;
82
+ unit: string;
83
+ amount?: number | undefined;
84
+ unitPrice?: number | undefined;
85
+ }[];
86
+ poNumber: string;
87
+ currency?: string | undefined;
88
+ notes?: string | null | undefined;
89
+ totalAmount?: number | null | undefined;
90
+ receivedAt?: string | null | undefined;
91
+ supplierId?: string | null | undefined;
92
+ dealId?: string | null | undefined;
93
+ expectedAt?: string | null | undefined;
94
+ }>;
95
+ export declare const createPurchaseOrderAttributesSchema: z.ZodObject<{
96
+ supplierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
97
+ items: z.ZodArray<z.ZodObject<{
98
+ description: z.ZodString;
99
+ quantity: z.ZodNumber;
100
+ unit: z.ZodString;
101
+ unitPrice: z.ZodOptional<z.ZodNumber>;
102
+ amount: z.ZodOptional<z.ZodNumber>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ description: string;
105
+ quantity: number;
106
+ unit: string;
107
+ amount?: number | undefined;
108
+ unitPrice?: number | undefined;
109
+ }, {
110
+ description: string;
111
+ quantity: number;
112
+ unit: string;
113
+ amount?: number | undefined;
114
+ unitPrice?: number | undefined;
115
+ }>, "many">;
116
+ totalAmount: z.ZodOptional<z.ZodNumber>;
117
+ currency: z.ZodDefault<z.ZodOptional<z.ZodString>>;
118
+ expectedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
119
+ dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
120
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
121
+ status: z.ZodOptional<z.ZodEnum<["draft", "ordered", "received", "cancelled"]>>;
122
+ }, "strip", z.ZodTypeAny, {
123
+ currency: string;
124
+ items: {
125
+ description: string;
126
+ quantity: number;
127
+ unit: string;
128
+ amount?: number | undefined;
129
+ unitPrice?: number | undefined;
130
+ }[];
131
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
132
+ notes?: string | null | undefined;
133
+ totalAmount?: number | undefined;
134
+ supplierId?: string | null | undefined;
135
+ dealId?: string | null | undefined;
136
+ expectedAt?: string | null | undefined;
137
+ }, {
138
+ items: {
139
+ description: string;
140
+ quantity: number;
141
+ unit: string;
142
+ amount?: number | undefined;
143
+ unitPrice?: number | undefined;
144
+ }[];
145
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
146
+ currency?: string | undefined;
147
+ notes?: string | null | undefined;
148
+ totalAmount?: number | undefined;
149
+ supplierId?: string | null | undefined;
150
+ dealId?: string | null | undefined;
151
+ expectedAt?: string | null | undefined;
152
+ }>;
153
+ export declare const updatePurchaseOrderAttributesSchema: z.ZodObject<{
154
+ supplierId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
155
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
156
+ description: z.ZodString;
157
+ quantity: z.ZodNumber;
158
+ unit: z.ZodString;
159
+ unitPrice: z.ZodOptional<z.ZodNumber>;
160
+ amount: z.ZodOptional<z.ZodNumber>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ description: string;
163
+ quantity: number;
164
+ unit: string;
165
+ amount?: number | undefined;
166
+ unitPrice?: number | undefined;
167
+ }, {
168
+ description: string;
169
+ quantity: number;
170
+ unit: string;
171
+ amount?: number | undefined;
172
+ unitPrice?: number | undefined;
173
+ }>, "many">>;
174
+ totalAmount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
175
+ currency: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodString>>>;
176
+ expectedAt: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
177
+ dealId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
178
+ notes: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
179
+ status: z.ZodOptional<z.ZodOptional<z.ZodEnum<["draft", "ordered", "received", "cancelled"]>>>;
180
+ } & {
181
+ receivedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
184
+ currency?: string | undefined;
185
+ notes?: string | null | undefined;
186
+ totalAmount?: number | undefined;
187
+ items?: {
188
+ description: string;
189
+ quantity: number;
190
+ unit: string;
191
+ amount?: number | undefined;
192
+ unitPrice?: number | undefined;
193
+ }[] | undefined;
194
+ receivedAt?: string | null | undefined;
195
+ supplierId?: string | null | undefined;
196
+ dealId?: string | null | undefined;
197
+ expectedAt?: string | null | undefined;
198
+ }, {
199
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
200
+ currency?: string | undefined;
201
+ notes?: string | null | undefined;
202
+ totalAmount?: number | undefined;
203
+ items?: {
204
+ description: string;
205
+ quantity: number;
206
+ unit: string;
207
+ amount?: number | undefined;
208
+ unitPrice?: number | undefined;
209
+ }[] | undefined;
210
+ receivedAt?: string | null | undefined;
211
+ supplierId?: string | null | undefined;
212
+ dealId?: string | null | undefined;
213
+ expectedAt?: string | null | undefined;
214
+ }>;
215
+ export declare const purchaseOrderResourceSchema: z.ZodObject<{
216
+ type: z.ZodLiteral<string>;
217
+ id: z.ZodString;
218
+ attributes: z.ZodObject<{
219
+ organizationId: z.ZodString;
220
+ supplierId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ poNumber: z.ZodString;
222
+ status: z.ZodEnum<["draft", "ordered", "received", "cancelled"]>;
223
+ items: z.ZodArray<z.ZodObject<{
224
+ description: z.ZodString;
225
+ quantity: z.ZodNumber;
226
+ unit: z.ZodString;
227
+ unitPrice: z.ZodOptional<z.ZodNumber>;
228
+ amount: z.ZodOptional<z.ZodNumber>;
229
+ }, "strip", z.ZodTypeAny, {
230
+ description: string;
231
+ quantity: number;
232
+ unit: string;
233
+ amount?: number | undefined;
234
+ unitPrice?: number | undefined;
235
+ }, {
236
+ description: string;
237
+ quantity: number;
238
+ unit: string;
239
+ amount?: number | undefined;
240
+ unitPrice?: number | undefined;
241
+ }>, "many">;
242
+ totalAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
243
+ currency: z.ZodDefault<z.ZodString>;
244
+ expectedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ receivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
+ dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
247
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
+ } & {
249
+ createdAt: z.ZodString;
250
+ updatedAt: z.ZodString;
251
+ }, "strip", z.ZodTypeAny, {
252
+ status: "received" | "cancelled" | "draft" | "ordered";
253
+ createdAt: string;
254
+ updatedAt: string;
255
+ currency: string;
256
+ organizationId: string;
257
+ items: {
258
+ description: string;
259
+ quantity: number;
260
+ unit: string;
261
+ amount?: number | undefined;
262
+ unitPrice?: number | undefined;
263
+ }[];
264
+ poNumber: string;
265
+ notes?: string | null | undefined;
266
+ totalAmount?: number | null | undefined;
267
+ receivedAt?: string | null | undefined;
268
+ supplierId?: string | null | undefined;
269
+ dealId?: string | null | undefined;
270
+ expectedAt?: string | null | undefined;
271
+ }, {
272
+ status: "received" | "cancelled" | "draft" | "ordered";
273
+ createdAt: string;
274
+ updatedAt: string;
275
+ organizationId: string;
276
+ items: {
277
+ description: string;
278
+ quantity: number;
279
+ unit: string;
280
+ amount?: number | undefined;
281
+ unitPrice?: number | undefined;
282
+ }[];
283
+ poNumber: string;
284
+ currency?: string | undefined;
285
+ notes?: string | null | undefined;
286
+ totalAmount?: number | null | undefined;
287
+ receivedAt?: string | null | undefined;
288
+ supplierId?: string | null | undefined;
289
+ dealId?: string | null | undefined;
290
+ expectedAt?: string | null | undefined;
291
+ }>;
292
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
293
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
294
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
295
+ }, "strip", z.ZodTypeAny, {
296
+ type: string;
297
+ id: string;
298
+ attributes: {
299
+ status: "received" | "cancelled" | "draft" | "ordered";
300
+ createdAt: string;
301
+ updatedAt: string;
302
+ currency: string;
303
+ organizationId: string;
304
+ items: {
305
+ description: string;
306
+ quantity: number;
307
+ unit: string;
308
+ amount?: number | undefined;
309
+ unitPrice?: number | undefined;
310
+ }[];
311
+ poNumber: string;
312
+ notes?: string | null | undefined;
313
+ totalAmount?: number | null | undefined;
314
+ receivedAt?: string | null | undefined;
315
+ supplierId?: string | null | undefined;
316
+ dealId?: string | null | undefined;
317
+ expectedAt?: string | null | undefined;
318
+ };
319
+ relationships?: Record<string, unknown> | undefined;
320
+ links?: Record<string, string> | undefined;
321
+ meta?: Record<string, unknown> | undefined;
322
+ }, {
323
+ type: string;
324
+ id: string;
325
+ attributes: {
326
+ status: "received" | "cancelled" | "draft" | "ordered";
327
+ createdAt: string;
328
+ updatedAt: string;
329
+ organizationId: string;
330
+ items: {
331
+ description: string;
332
+ quantity: number;
333
+ unit: string;
334
+ amount?: number | undefined;
335
+ unitPrice?: number | undefined;
336
+ }[];
337
+ poNumber: string;
338
+ currency?: string | undefined;
339
+ notes?: string | null | undefined;
340
+ totalAmount?: number | null | undefined;
341
+ receivedAt?: string | null | undefined;
342
+ supplierId?: string | null | undefined;
343
+ dealId?: string | null | undefined;
344
+ expectedAt?: string | null | undefined;
345
+ };
346
+ relationships?: Record<string, unknown> | undefined;
347
+ links?: Record<string, string> | undefined;
348
+ meta?: Record<string, unknown> | undefined;
349
+ }>;
350
+ export declare const purchaseOrderResponseSchema: z.ZodObject<{
351
+ data: z.ZodObject<{
352
+ type: z.ZodLiteral<string>;
353
+ id: z.ZodString;
354
+ attributes: z.ZodObject<{
355
+ organizationId: z.ZodString;
356
+ supplierId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
357
+ poNumber: z.ZodString;
358
+ status: z.ZodEnum<["draft", "ordered", "received", "cancelled"]>;
359
+ items: z.ZodArray<z.ZodObject<{
360
+ description: z.ZodString;
361
+ quantity: z.ZodNumber;
362
+ unit: z.ZodString;
363
+ unitPrice: z.ZodOptional<z.ZodNumber>;
364
+ amount: z.ZodOptional<z.ZodNumber>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ description: string;
367
+ quantity: number;
368
+ unit: string;
369
+ amount?: number | undefined;
370
+ unitPrice?: number | undefined;
371
+ }, {
372
+ description: string;
373
+ quantity: number;
374
+ unit: string;
375
+ amount?: number | undefined;
376
+ unitPrice?: number | undefined;
377
+ }>, "many">;
378
+ totalAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
379
+ currency: z.ZodDefault<z.ZodString>;
380
+ expectedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
+ receivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
383
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
384
+ } & {
385
+ createdAt: z.ZodString;
386
+ updatedAt: z.ZodString;
387
+ }, "strip", z.ZodTypeAny, {
388
+ status: "received" | "cancelled" | "draft" | "ordered";
389
+ createdAt: string;
390
+ updatedAt: string;
391
+ currency: string;
392
+ organizationId: string;
393
+ items: {
394
+ description: string;
395
+ quantity: number;
396
+ unit: string;
397
+ amount?: number | undefined;
398
+ unitPrice?: number | undefined;
399
+ }[];
400
+ poNumber: string;
401
+ notes?: string | null | undefined;
402
+ totalAmount?: number | null | undefined;
403
+ receivedAt?: string | null | undefined;
404
+ supplierId?: string | null | undefined;
405
+ dealId?: string | null | undefined;
406
+ expectedAt?: string | null | undefined;
407
+ }, {
408
+ status: "received" | "cancelled" | "draft" | "ordered";
409
+ createdAt: string;
410
+ updatedAt: string;
411
+ organizationId: string;
412
+ items: {
413
+ description: string;
414
+ quantity: number;
415
+ unit: string;
416
+ amount?: number | undefined;
417
+ unitPrice?: number | undefined;
418
+ }[];
419
+ poNumber: string;
420
+ currency?: string | undefined;
421
+ notes?: string | null | undefined;
422
+ totalAmount?: number | null | undefined;
423
+ receivedAt?: string | null | undefined;
424
+ supplierId?: string | null | undefined;
425
+ dealId?: string | null | undefined;
426
+ expectedAt?: string | null | undefined;
427
+ }>;
428
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
429
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
430
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
431
+ }, "strip", z.ZodTypeAny, {
432
+ type: string;
433
+ id: string;
434
+ attributes: {
435
+ status: "received" | "cancelled" | "draft" | "ordered";
436
+ createdAt: string;
437
+ updatedAt: string;
438
+ currency: string;
439
+ organizationId: string;
440
+ items: {
441
+ description: string;
442
+ quantity: number;
443
+ unit: string;
444
+ amount?: number | undefined;
445
+ unitPrice?: number | undefined;
446
+ }[];
447
+ poNumber: string;
448
+ notes?: string | null | undefined;
449
+ totalAmount?: number | null | undefined;
450
+ receivedAt?: string | null | undefined;
451
+ supplierId?: string | null | undefined;
452
+ dealId?: string | null | undefined;
453
+ expectedAt?: string | null | undefined;
454
+ };
455
+ relationships?: Record<string, unknown> | undefined;
456
+ links?: Record<string, string> | undefined;
457
+ meta?: Record<string, unknown> | undefined;
458
+ }, {
459
+ type: string;
460
+ id: string;
461
+ attributes: {
462
+ status: "received" | "cancelled" | "draft" | "ordered";
463
+ createdAt: string;
464
+ updatedAt: string;
465
+ organizationId: string;
466
+ items: {
467
+ description: string;
468
+ quantity: number;
469
+ unit: string;
470
+ amount?: number | undefined;
471
+ unitPrice?: number | undefined;
472
+ }[];
473
+ poNumber: string;
474
+ currency?: string | undefined;
475
+ notes?: string | null | undefined;
476
+ totalAmount?: number | null | undefined;
477
+ receivedAt?: string | null | undefined;
478
+ supplierId?: string | null | undefined;
479
+ dealId?: string | null | undefined;
480
+ expectedAt?: string | null | undefined;
481
+ };
482
+ relationships?: Record<string, unknown> | undefined;
483
+ links?: Record<string, string> | undefined;
484
+ meta?: Record<string, unknown> | undefined;
485
+ }>;
486
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
487
+ type: z.ZodString;
488
+ id: z.ZodString;
489
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
490
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
491
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
492
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
493
+ }, "strip", z.ZodTypeAny, {
494
+ type: string;
495
+ id: string;
496
+ attributes?: Record<string, unknown> | undefined;
497
+ relationships?: Record<string, unknown> | undefined;
498
+ links?: Record<string, string> | undefined;
499
+ meta?: Record<string, unknown> | undefined;
500
+ }, {
501
+ type: string;
502
+ id: string;
503
+ attributes?: Record<string, unknown> | undefined;
504
+ relationships?: Record<string, unknown> | undefined;
505
+ links?: Record<string, string> | undefined;
506
+ meta?: Record<string, unknown> | undefined;
507
+ }>, "many">>;
508
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
509
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
510
+ }, "strip", z.ZodTypeAny, {
511
+ data: {
512
+ type: string;
513
+ id: string;
514
+ attributes: {
515
+ status: "received" | "cancelled" | "draft" | "ordered";
516
+ createdAt: string;
517
+ updatedAt: string;
518
+ currency: string;
519
+ organizationId: string;
520
+ items: {
521
+ description: string;
522
+ quantity: number;
523
+ unit: string;
524
+ amount?: number | undefined;
525
+ unitPrice?: number | undefined;
526
+ }[];
527
+ poNumber: string;
528
+ notes?: string | null | undefined;
529
+ totalAmount?: number | null | undefined;
530
+ receivedAt?: string | null | undefined;
531
+ supplierId?: string | null | undefined;
532
+ dealId?: string | null | undefined;
533
+ expectedAt?: string | null | undefined;
534
+ };
535
+ relationships?: Record<string, unknown> | undefined;
536
+ links?: Record<string, string> | undefined;
537
+ meta?: Record<string, unknown> | undefined;
538
+ };
539
+ links?: Record<string, string> | undefined;
540
+ meta?: Record<string, unknown> | undefined;
541
+ included?: {
542
+ type: string;
543
+ id: string;
544
+ attributes?: Record<string, unknown> | undefined;
545
+ relationships?: Record<string, unknown> | undefined;
546
+ links?: Record<string, string> | undefined;
547
+ meta?: Record<string, unknown> | undefined;
548
+ }[] | undefined;
549
+ }, {
550
+ data: {
551
+ type: string;
552
+ id: string;
553
+ attributes: {
554
+ status: "received" | "cancelled" | "draft" | "ordered";
555
+ createdAt: string;
556
+ updatedAt: string;
557
+ organizationId: string;
558
+ items: {
559
+ description: string;
560
+ quantity: number;
561
+ unit: string;
562
+ amount?: number | undefined;
563
+ unitPrice?: number | undefined;
564
+ }[];
565
+ poNumber: string;
566
+ currency?: string | undefined;
567
+ notes?: string | null | undefined;
568
+ totalAmount?: number | null | undefined;
569
+ receivedAt?: string | null | undefined;
570
+ supplierId?: string | null | undefined;
571
+ dealId?: string | null | undefined;
572
+ expectedAt?: string | null | undefined;
573
+ };
574
+ relationships?: Record<string, unknown> | undefined;
575
+ links?: Record<string, string> | undefined;
576
+ meta?: Record<string, unknown> | undefined;
577
+ };
578
+ links?: Record<string, string> | undefined;
579
+ meta?: Record<string, unknown> | undefined;
580
+ included?: {
581
+ type: string;
582
+ id: string;
583
+ attributes?: Record<string, unknown> | undefined;
584
+ relationships?: Record<string, unknown> | undefined;
585
+ links?: Record<string, string> | undefined;
586
+ meta?: Record<string, unknown> | undefined;
587
+ }[] | undefined;
588
+ }>;
589
+ export declare const purchaseOrderListResponseSchema: z.ZodObject<{
590
+ data: z.ZodArray<z.ZodObject<{
591
+ type: z.ZodLiteral<string>;
592
+ id: z.ZodString;
593
+ attributes: z.ZodObject<{
594
+ organizationId: z.ZodString;
595
+ supplierId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
596
+ poNumber: z.ZodString;
597
+ status: z.ZodEnum<["draft", "ordered", "received", "cancelled"]>;
598
+ items: z.ZodArray<z.ZodObject<{
599
+ description: z.ZodString;
600
+ quantity: z.ZodNumber;
601
+ unit: z.ZodString;
602
+ unitPrice: z.ZodOptional<z.ZodNumber>;
603
+ amount: z.ZodOptional<z.ZodNumber>;
604
+ }, "strip", z.ZodTypeAny, {
605
+ description: string;
606
+ quantity: number;
607
+ unit: string;
608
+ amount?: number | undefined;
609
+ unitPrice?: number | undefined;
610
+ }, {
611
+ description: string;
612
+ quantity: number;
613
+ unit: string;
614
+ amount?: number | undefined;
615
+ unitPrice?: number | undefined;
616
+ }>, "many">;
617
+ totalAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
618
+ currency: z.ZodDefault<z.ZodString>;
619
+ expectedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
620
+ receivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
621
+ dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
622
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
623
+ } & {
624
+ createdAt: z.ZodString;
625
+ updatedAt: z.ZodString;
626
+ }, "strip", z.ZodTypeAny, {
627
+ status: "received" | "cancelled" | "draft" | "ordered";
628
+ createdAt: string;
629
+ updatedAt: string;
630
+ currency: string;
631
+ organizationId: string;
632
+ items: {
633
+ description: string;
634
+ quantity: number;
635
+ unit: string;
636
+ amount?: number | undefined;
637
+ unitPrice?: number | undefined;
638
+ }[];
639
+ poNumber: string;
640
+ notes?: string | null | undefined;
641
+ totalAmount?: number | null | undefined;
642
+ receivedAt?: string | null | undefined;
643
+ supplierId?: string | null | undefined;
644
+ dealId?: string | null | undefined;
645
+ expectedAt?: string | null | undefined;
646
+ }, {
647
+ status: "received" | "cancelled" | "draft" | "ordered";
648
+ createdAt: string;
649
+ updatedAt: string;
650
+ organizationId: string;
651
+ items: {
652
+ description: string;
653
+ quantity: number;
654
+ unit: string;
655
+ amount?: number | undefined;
656
+ unitPrice?: number | undefined;
657
+ }[];
658
+ poNumber: string;
659
+ currency?: string | undefined;
660
+ notes?: string | null | undefined;
661
+ totalAmount?: number | null | undefined;
662
+ receivedAt?: string | null | undefined;
663
+ supplierId?: string | null | undefined;
664
+ dealId?: string | null | undefined;
665
+ expectedAt?: string | null | undefined;
666
+ }>;
667
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
668
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
669
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ type: string;
672
+ id: string;
673
+ attributes: {
674
+ status: "received" | "cancelled" | "draft" | "ordered";
675
+ createdAt: string;
676
+ updatedAt: string;
677
+ currency: string;
678
+ organizationId: string;
679
+ items: {
680
+ description: string;
681
+ quantity: number;
682
+ unit: string;
683
+ amount?: number | undefined;
684
+ unitPrice?: number | undefined;
685
+ }[];
686
+ poNumber: string;
687
+ notes?: string | null | undefined;
688
+ totalAmount?: number | null | undefined;
689
+ receivedAt?: string | null | undefined;
690
+ supplierId?: string | null | undefined;
691
+ dealId?: string | null | undefined;
692
+ expectedAt?: string | null | undefined;
693
+ };
694
+ relationships?: Record<string, unknown> | undefined;
695
+ links?: Record<string, string> | undefined;
696
+ meta?: Record<string, unknown> | undefined;
697
+ }, {
698
+ type: string;
699
+ id: string;
700
+ attributes: {
701
+ status: "received" | "cancelled" | "draft" | "ordered";
702
+ createdAt: string;
703
+ updatedAt: string;
704
+ organizationId: string;
705
+ items: {
706
+ description: string;
707
+ quantity: number;
708
+ unit: string;
709
+ amount?: number | undefined;
710
+ unitPrice?: number | undefined;
711
+ }[];
712
+ poNumber: string;
713
+ currency?: string | undefined;
714
+ notes?: string | null | undefined;
715
+ totalAmount?: number | null | undefined;
716
+ receivedAt?: string | null | undefined;
717
+ supplierId?: string | null | undefined;
718
+ dealId?: string | null | undefined;
719
+ expectedAt?: string | null | undefined;
720
+ };
721
+ relationships?: Record<string, unknown> | undefined;
722
+ links?: Record<string, string> | undefined;
723
+ meta?: Record<string, unknown> | undefined;
724
+ }>, "many">;
725
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
726
+ type: z.ZodString;
727
+ id: z.ZodString;
728
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
729
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
730
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
731
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
732
+ }, "strip", z.ZodTypeAny, {
733
+ type: string;
734
+ id: string;
735
+ attributes?: Record<string, unknown> | undefined;
736
+ relationships?: Record<string, unknown> | undefined;
737
+ links?: Record<string, string> | undefined;
738
+ meta?: Record<string, unknown> | undefined;
739
+ }, {
740
+ type: string;
741
+ id: string;
742
+ attributes?: Record<string, unknown> | undefined;
743
+ relationships?: Record<string, unknown> | undefined;
744
+ links?: Record<string, string> | undefined;
745
+ meta?: Record<string, unknown> | undefined;
746
+ }>, "many">>;
747
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
748
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
749
+ }, "strip", z.ZodTypeAny, {
750
+ data: {
751
+ type: string;
752
+ id: string;
753
+ attributes: {
754
+ status: "received" | "cancelled" | "draft" | "ordered";
755
+ createdAt: string;
756
+ updatedAt: string;
757
+ currency: string;
758
+ organizationId: string;
759
+ items: {
760
+ description: string;
761
+ quantity: number;
762
+ unit: string;
763
+ amount?: number | undefined;
764
+ unitPrice?: number | undefined;
765
+ }[];
766
+ poNumber: string;
767
+ notes?: string | null | undefined;
768
+ totalAmount?: number | null | undefined;
769
+ receivedAt?: string | null | undefined;
770
+ supplierId?: string | null | undefined;
771
+ dealId?: string | null | undefined;
772
+ expectedAt?: string | null | undefined;
773
+ };
774
+ relationships?: Record<string, unknown> | undefined;
775
+ links?: Record<string, string> | undefined;
776
+ meta?: Record<string, unknown> | undefined;
777
+ }[];
778
+ links?: Record<string, string> | undefined;
779
+ meta?: Record<string, unknown> | undefined;
780
+ included?: {
781
+ type: string;
782
+ id: string;
783
+ attributes?: Record<string, unknown> | undefined;
784
+ relationships?: Record<string, unknown> | undefined;
785
+ links?: Record<string, string> | undefined;
786
+ meta?: Record<string, unknown> | undefined;
787
+ }[] | undefined;
788
+ }, {
789
+ data: {
790
+ type: string;
791
+ id: string;
792
+ attributes: {
793
+ status: "received" | "cancelled" | "draft" | "ordered";
794
+ createdAt: string;
795
+ updatedAt: string;
796
+ organizationId: string;
797
+ items: {
798
+ description: string;
799
+ quantity: number;
800
+ unit: string;
801
+ amount?: number | undefined;
802
+ unitPrice?: number | undefined;
803
+ }[];
804
+ poNumber: string;
805
+ currency?: string | undefined;
806
+ notes?: string | null | undefined;
807
+ totalAmount?: number | null | undefined;
808
+ receivedAt?: string | null | undefined;
809
+ supplierId?: string | null | undefined;
810
+ dealId?: string | null | undefined;
811
+ expectedAt?: string | null | undefined;
812
+ };
813
+ relationships?: Record<string, unknown> | undefined;
814
+ links?: Record<string, string> | undefined;
815
+ meta?: Record<string, unknown> | undefined;
816
+ }[];
817
+ links?: Record<string, string> | undefined;
818
+ meta?: Record<string, unknown> | undefined;
819
+ included?: {
820
+ type: string;
821
+ id: string;
822
+ attributes?: Record<string, unknown> | undefined;
823
+ relationships?: Record<string, unknown> | undefined;
824
+ links?: Record<string, string> | undefined;
825
+ meta?: Record<string, unknown> | undefined;
826
+ }[] | undefined;
827
+ }>;
828
+ export declare const createPurchaseOrderSchema: z.ZodObject<{
829
+ type: z.ZodLiteral<"purchase-orders">;
830
+ attributes: z.ZodObject<{
831
+ supplierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
832
+ items: z.ZodArray<z.ZodObject<{
833
+ description: z.ZodString;
834
+ quantity: z.ZodNumber;
835
+ unit: z.ZodString;
836
+ unitPrice: z.ZodOptional<z.ZodNumber>;
837
+ amount: z.ZodOptional<z.ZodNumber>;
838
+ }, "strip", z.ZodTypeAny, {
839
+ description: string;
840
+ quantity: number;
841
+ unit: string;
842
+ amount?: number | undefined;
843
+ unitPrice?: number | undefined;
844
+ }, {
845
+ description: string;
846
+ quantity: number;
847
+ unit: string;
848
+ amount?: number | undefined;
849
+ unitPrice?: number | undefined;
850
+ }>, "many">;
851
+ totalAmount: z.ZodOptional<z.ZodNumber>;
852
+ currency: z.ZodDefault<z.ZodOptional<z.ZodString>>;
853
+ expectedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
854
+ dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
855
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
856
+ status: z.ZodOptional<z.ZodEnum<["draft", "ordered", "received", "cancelled"]>>;
857
+ }, "strip", z.ZodTypeAny, {
858
+ currency: string;
859
+ items: {
860
+ description: string;
861
+ quantity: number;
862
+ unit: string;
863
+ amount?: number | undefined;
864
+ unitPrice?: number | undefined;
865
+ }[];
866
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
867
+ notes?: string | null | undefined;
868
+ totalAmount?: number | undefined;
869
+ supplierId?: string | null | undefined;
870
+ dealId?: string | null | undefined;
871
+ expectedAt?: string | null | undefined;
872
+ }, {
873
+ items: {
874
+ description: string;
875
+ quantity: number;
876
+ unit: string;
877
+ amount?: number | undefined;
878
+ unitPrice?: number | undefined;
879
+ }[];
880
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
881
+ currency?: string | undefined;
882
+ notes?: string | null | undefined;
883
+ totalAmount?: number | undefined;
884
+ supplierId?: string | null | undefined;
885
+ dealId?: string | null | undefined;
886
+ expectedAt?: string | null | undefined;
887
+ }>;
888
+ }, "strip", z.ZodTypeAny, {
889
+ type: "purchase-orders";
890
+ attributes: {
891
+ currency: string;
892
+ items: {
893
+ description: string;
894
+ quantity: number;
895
+ unit: string;
896
+ amount?: number | undefined;
897
+ unitPrice?: number | undefined;
898
+ }[];
899
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
900
+ notes?: string | null | undefined;
901
+ totalAmount?: number | undefined;
902
+ supplierId?: string | null | undefined;
903
+ dealId?: string | null | undefined;
904
+ expectedAt?: string | null | undefined;
905
+ };
906
+ }, {
907
+ type: "purchase-orders";
908
+ attributes: {
909
+ items: {
910
+ description: string;
911
+ quantity: number;
912
+ unit: string;
913
+ amount?: number | undefined;
914
+ unitPrice?: number | undefined;
915
+ }[];
916
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
917
+ currency?: string | undefined;
918
+ notes?: string | null | undefined;
919
+ totalAmount?: number | undefined;
920
+ supplierId?: string | null | undefined;
921
+ dealId?: string | null | undefined;
922
+ expectedAt?: string | null | undefined;
923
+ };
924
+ }>;
925
+ export declare const updatePurchaseOrderSchema: z.ZodObject<{
926
+ type: z.ZodLiteral<"purchase-orders">;
927
+ id: z.ZodOptional<z.ZodString>;
928
+ attributes: z.ZodObject<{
929
+ supplierId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
930
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
931
+ description: z.ZodString;
932
+ quantity: z.ZodNumber;
933
+ unit: z.ZodString;
934
+ unitPrice: z.ZodOptional<z.ZodNumber>;
935
+ amount: z.ZodOptional<z.ZodNumber>;
936
+ }, "strip", z.ZodTypeAny, {
937
+ description: string;
938
+ quantity: number;
939
+ unit: string;
940
+ amount?: number | undefined;
941
+ unitPrice?: number | undefined;
942
+ }, {
943
+ description: string;
944
+ quantity: number;
945
+ unit: string;
946
+ amount?: number | undefined;
947
+ unitPrice?: number | undefined;
948
+ }>, "many">>;
949
+ totalAmount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
950
+ currency: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodString>>>;
951
+ expectedAt: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
952
+ dealId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
953
+ notes: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
954
+ status: z.ZodOptional<z.ZodOptional<z.ZodEnum<["draft", "ordered", "received", "cancelled"]>>>;
955
+ } & {
956
+ receivedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
957
+ }, "strip", z.ZodTypeAny, {
958
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
959
+ currency?: string | undefined;
960
+ notes?: string | null | undefined;
961
+ totalAmount?: number | undefined;
962
+ items?: {
963
+ description: string;
964
+ quantity: number;
965
+ unit: string;
966
+ amount?: number | undefined;
967
+ unitPrice?: number | undefined;
968
+ }[] | undefined;
969
+ receivedAt?: string | null | undefined;
970
+ supplierId?: string | null | undefined;
971
+ dealId?: string | null | undefined;
972
+ expectedAt?: string | null | undefined;
973
+ }, {
974
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
975
+ currency?: string | undefined;
976
+ notes?: string | null | undefined;
977
+ totalAmount?: number | undefined;
978
+ items?: {
979
+ description: string;
980
+ quantity: number;
981
+ unit: string;
982
+ amount?: number | undefined;
983
+ unitPrice?: number | undefined;
984
+ }[] | undefined;
985
+ receivedAt?: string | null | undefined;
986
+ supplierId?: string | null | undefined;
987
+ dealId?: string | null | undefined;
988
+ expectedAt?: string | null | undefined;
989
+ }>;
990
+ }, "strip", z.ZodTypeAny, {
991
+ type: "purchase-orders";
992
+ attributes: {
993
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
994
+ currency?: string | undefined;
995
+ notes?: string | null | undefined;
996
+ totalAmount?: number | undefined;
997
+ items?: {
998
+ description: string;
999
+ quantity: number;
1000
+ unit: string;
1001
+ amount?: number | undefined;
1002
+ unitPrice?: number | undefined;
1003
+ }[] | undefined;
1004
+ receivedAt?: string | null | undefined;
1005
+ supplierId?: string | null | undefined;
1006
+ dealId?: string | null | undefined;
1007
+ expectedAt?: string | null | undefined;
1008
+ };
1009
+ id?: string | undefined;
1010
+ }, {
1011
+ type: "purchase-orders";
1012
+ attributes: {
1013
+ status?: "received" | "cancelled" | "draft" | "ordered" | undefined;
1014
+ currency?: string | undefined;
1015
+ notes?: string | null | undefined;
1016
+ totalAmount?: number | undefined;
1017
+ items?: {
1018
+ description: string;
1019
+ quantity: number;
1020
+ unit: string;
1021
+ amount?: number | undefined;
1022
+ unitPrice?: number | undefined;
1023
+ }[] | undefined;
1024
+ receivedAt?: string | null | undefined;
1025
+ supplierId?: string | null | undefined;
1026
+ dealId?: string | null | undefined;
1027
+ expectedAt?: string | null | undefined;
1028
+ };
1029
+ id?: string | undefined;
1030
+ }>;
1031
+ //# sourceMappingURL=purchase-orders.schemas.d.ts.map