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