@deepintel-ltd/farmpro-contracts 1.0.2 → 1.0.4

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 (106) hide show
  1. package/dist/index.d.ts +43 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +84 -0
  4. package/dist/routes/analytics.routes.d.ts +754 -0
  5. package/dist/routes/analytics.routes.d.ts.map +1 -0
  6. package/dist/routes/analytics.routes.js +24 -0
  7. package/dist/routes/auth.routes.d.ts +3836 -0
  8. package/dist/routes/auth.routes.d.ts.map +1 -0
  9. package/dist/routes/auth.routes.js +158 -0
  10. package/dist/routes/categories.routes.d.ts +800 -0
  11. package/dist/routes/categories.routes.d.ts.map +1 -0
  12. package/dist/routes/categories.routes.js +120 -0
  13. package/dist/routes/documents.routes.d.ts +2476 -0
  14. package/dist/routes/documents.routes.d.ts.map +1 -0
  15. package/dist/routes/documents.routes.js +100 -0
  16. package/dist/routes/equipment.routes.d.ts +3617 -0
  17. package/dist/routes/equipment.routes.d.ts.map +1 -0
  18. package/dist/routes/equipment.routes.js +118 -0
  19. package/dist/routes/farms.routes.d.ts +2202 -0
  20. package/dist/routes/farms.routes.d.ts.map +1 -0
  21. package/dist/routes/farms.routes.js +111 -0
  22. package/dist/routes/fields.routes.d.ts +3479 -0
  23. package/dist/routes/fields.routes.d.ts.map +1 -0
  24. package/dist/routes/fields.routes.js +96 -0
  25. package/dist/routes/finance.routes.d.ts +6855 -0
  26. package/dist/routes/finance.routes.d.ts.map +1 -0
  27. package/dist/routes/finance.routes.js +259 -0
  28. package/dist/routes/harvest.routes.d.ts +2337 -0
  29. package/dist/routes/harvest.routes.d.ts.map +1 -0
  30. package/dist/routes/harvest.routes.js +99 -0
  31. package/dist/routes/index.d.ts +71 -0
  32. package/dist/routes/index.d.ts.map +1 -0
  33. package/dist/routes/index.js +45 -0
  34. package/dist/routes/inventory.routes.d.ts +2853 -0
  35. package/dist/routes/inventory.routes.d.ts.map +1 -0
  36. package/dist/routes/inventory.routes.js +121 -0
  37. package/dist/routes/soil-tests.routes.d.ts +3005 -0
  38. package/dist/routes/soil-tests.routes.d.ts.map +1 -0
  39. package/dist/routes/soil-tests.routes.js +98 -0
  40. package/dist/routes/suppliers.routes.d.ts +4190 -0
  41. package/dist/routes/suppliers.routes.d.ts.map +1 -0
  42. package/dist/routes/suppliers.routes.js +146 -0
  43. package/dist/routes/tasks.routes.d.ts +4248 -0
  44. package/dist/routes/tasks.routes.d.ts.map +1 -0
  45. package/dist/routes/tasks.routes.js +138 -0
  46. package/dist/routes/team.routes.d.ts +2210 -0
  47. package/dist/routes/team.routes.d.ts.map +1 -0
  48. package/dist/routes/team.routes.js +98 -0
  49. package/dist/routes/users.routes.d.ts +721 -0
  50. package/dist/routes/users.routes.d.ts.map +1 -0
  51. package/dist/routes/users.routes.js +35 -0
  52. package/dist/routes/weather.routes.d.ts +500 -0
  53. package/dist/routes/weather.routes.d.ts.map +1 -0
  54. package/dist/routes/weather.routes.js +23 -0
  55. package/dist/schemas/analytics.schemas.d.ts +1344 -0
  56. package/dist/schemas/analytics.schemas.d.ts.map +1 -0
  57. package/dist/schemas/analytics.schemas.js +73 -0
  58. package/dist/schemas/auth.schemas.d.ts +1093 -0
  59. package/dist/schemas/auth.schemas.d.ts.map +1 -0
  60. package/dist/schemas/auth.schemas.js +159 -0
  61. package/dist/schemas/categories.schemas.d.ts +471 -0
  62. package/dist/schemas/categories.schemas.d.ts.map +1 -0
  63. package/dist/schemas/categories.schemas.js +51 -0
  64. package/dist/schemas/common.schemas.d.ts +562 -0
  65. package/dist/schemas/common.schemas.d.ts.map +1 -0
  66. package/dist/schemas/common.schemas.js +122 -0
  67. package/dist/schemas/documents.schemas.d.ts +850 -0
  68. package/dist/schemas/documents.schemas.d.ts.map +1 -0
  69. package/dist/schemas/documents.schemas.js +75 -0
  70. package/dist/schemas/equipment.schemas.d.ts +1618 -0
  71. package/dist/schemas/equipment.schemas.d.ts.map +1 -0
  72. package/dist/schemas/equipment.schemas.js +125 -0
  73. package/dist/schemas/farms.schemas.d.ts +1171 -0
  74. package/dist/schemas/farms.schemas.d.ts.map +1 -0
  75. package/dist/schemas/farms.schemas.js +62 -0
  76. package/dist/schemas/fields.schemas.d.ts +2508 -0
  77. package/dist/schemas/fields.schemas.d.ts.map +1 -0
  78. package/dist/schemas/fields.schemas.js +125 -0
  79. package/dist/schemas/finance.schemas.d.ts +2869 -0
  80. package/dist/schemas/finance.schemas.d.ts.map +1 -0
  81. package/dist/schemas/finance.schemas.js +196 -0
  82. package/dist/schemas/harvest.schemas.d.ts +1051 -0
  83. package/dist/schemas/harvest.schemas.d.ts.map +1 -0
  84. package/dist/schemas/harvest.schemas.js +71 -0
  85. package/dist/schemas/inventory.schemas.d.ts +1138 -0
  86. package/dist/schemas/inventory.schemas.d.ts.map +1 -0
  87. package/dist/schemas/inventory.schemas.js +89 -0
  88. package/dist/schemas/soil-tests.schemas.d.ts +1885 -0
  89. package/dist/schemas/soil-tests.schemas.d.ts.map +1 -0
  90. package/dist/schemas/soil-tests.schemas.js +102 -0
  91. package/dist/schemas/suppliers.schemas.d.ts +1774 -0
  92. package/dist/schemas/suppliers.schemas.d.ts.map +1 -0
  93. package/dist/schemas/suppliers.schemas.js +121 -0
  94. package/dist/schemas/tasks.schemas.d.ts +1811 -0
  95. package/dist/schemas/tasks.schemas.d.ts.map +1 -0
  96. package/dist/schemas/tasks.schemas.js +124 -0
  97. package/dist/schemas/team.schemas.d.ts +583 -0
  98. package/dist/schemas/team.schemas.d.ts.map +1 -0
  99. package/dist/schemas/team.schemas.js +60 -0
  100. package/dist/schemas/users.schemas.d.ts +288 -0
  101. package/dist/schemas/users.schemas.d.ts.map +1 -0
  102. package/dist/schemas/users.schemas.js +32 -0
  103. package/dist/schemas/weather.schemas.d.ts +682 -0
  104. package/dist/schemas/weather.schemas.d.ts.map +1 -0
  105. package/dist/schemas/weather.schemas.js +49 -0
  106. package/package.json +1 -1
@@ -0,0 +1,3479 @@
1
+ import { z } from 'zod';
2
+ export declare const fieldsRouter: {
3
+ listFields: {
4
+ pathParams: z.ZodObject<{
5
+ farmId: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ farmId: string;
8
+ }, {
9
+ farmId: string;
10
+ }>;
11
+ query: z.ZodObject<{
12
+ 'page[number]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
13
+ 'page[size]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
14
+ } & {
15
+ sort: z.ZodOptional<z.ZodString>;
16
+ } & {
17
+ include: z.ZodOptional<z.ZodString>;
18
+ } & {
19
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
20
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
21
+ 'filter[status]': z.ZodOptional<z.ZodString>;
22
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ sort?: string | undefined;
25
+ 'page[number]'?: number | undefined;
26
+ 'page[size]'?: number | undefined;
27
+ 'filter[startDate]'?: string | undefined;
28
+ 'filter[endDate]'?: string | undefined;
29
+ 'filter[status]'?: string | undefined;
30
+ 'filter[crop]'?: string | undefined;
31
+ include?: string | undefined;
32
+ }, {
33
+ sort?: string | undefined;
34
+ 'page[number]'?: number | undefined;
35
+ 'page[size]'?: number | undefined;
36
+ 'filter[startDate]'?: string | undefined;
37
+ 'filter[endDate]'?: string | undefined;
38
+ 'filter[status]'?: string | undefined;
39
+ 'filter[crop]'?: string | undefined;
40
+ include?: string | undefined;
41
+ }>;
42
+ summary: "List fields for a farm";
43
+ description: "Get all fields for a specific farm with optional filtering";
44
+ method: "GET";
45
+ path: "/farms/:farmId/fields";
46
+ responses: {
47
+ 200: z.ZodObject<{
48
+ data: z.ZodArray<z.ZodObject<{
49
+ type: z.ZodLiteral<string>;
50
+ id: z.ZodString;
51
+ attributes: z.ZodObject<{
52
+ name: z.ZodString;
53
+ geometry: z.ZodNullable<z.ZodObject<{
54
+ type: z.ZodEnum<["Polygon", "MultiPolygon", "Point", "LineString"]>;
55
+ coordinates: z.ZodUnion<[z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
58
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
59
+ }, {
60
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
61
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
62
+ }>>;
63
+ ndvi: z.ZodNullable<z.ZodNumber>;
64
+ moisture: z.ZodNullable<z.ZodString>;
65
+ status: z.ZodEnum<["ok", "alert", "critical"]>;
66
+ area: z.ZodNullable<z.ZodString>;
67
+ crop: z.ZodNullable<z.ZodString>;
68
+ soilType: z.ZodNullable<z.ZodString>;
69
+ currentCrop: z.ZodNullable<z.ZodString>;
70
+ plantingDate: z.ZodNullable<z.ZodString>;
71
+ expectedHarvestDate: z.ZodNullable<z.ZodString>;
72
+ cropStage: z.ZodNullable<z.ZodEnum<["planted", "growing", "flowering", "mature", "harvested"]>>;
73
+ historicalNdvi: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
+ date: z.ZodString;
75
+ value: z.ZodNumber;
76
+ }, "strip", z.ZodTypeAny, {
77
+ value: number;
78
+ date: string;
79
+ }, {
80
+ value: number;
81
+ date: string;
82
+ }>, "many">>;
83
+ cropHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
+ id: z.ZodString;
85
+ season: z.ZodString;
86
+ crop: z.ZodString;
87
+ plantingDate: z.ZodString;
88
+ harvestDate: z.ZodNullable<z.ZodString>;
89
+ yield: z.ZodNullable<z.ZodNumber>;
90
+ yieldUnit: z.ZodNullable<z.ZodString>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ id: string;
93
+ season: string;
94
+ crop: string;
95
+ plantingDate: string;
96
+ harvestDate: string | null;
97
+ yield: number | null;
98
+ yieldUnit: string | null;
99
+ }, {
100
+ id: string;
101
+ season: string;
102
+ crop: string;
103
+ plantingDate: string;
104
+ harvestDate: string | null;
105
+ yield: number | null;
106
+ yieldUnit: string | null;
107
+ }>, "many">>;
108
+ } & {
109
+ createdAt: z.ZodString;
110
+ updatedAt: z.ZodString;
111
+ }, "strip", z.ZodTypeAny, {
112
+ status: "ok" | "alert" | "critical";
113
+ createdAt: string;
114
+ updatedAt: string;
115
+ name: string;
116
+ crop: string | null;
117
+ plantingDate: string | null;
118
+ geometry: {
119
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
120
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
121
+ } | null;
122
+ ndvi: number | null;
123
+ moisture: string | null;
124
+ area: string | null;
125
+ soilType: string | null;
126
+ currentCrop: string | null;
127
+ expectedHarvestDate: string | null;
128
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
129
+ historicalNdvi?: {
130
+ value: number;
131
+ date: string;
132
+ }[] | undefined;
133
+ cropHistory?: {
134
+ id: string;
135
+ season: string;
136
+ crop: string;
137
+ plantingDate: string;
138
+ harvestDate: string | null;
139
+ yield: number | null;
140
+ yieldUnit: string | null;
141
+ }[] | undefined;
142
+ }, {
143
+ status: "ok" | "alert" | "critical";
144
+ createdAt: string;
145
+ updatedAt: string;
146
+ name: string;
147
+ crop: string | null;
148
+ plantingDate: string | null;
149
+ geometry: {
150
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
151
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
152
+ } | null;
153
+ ndvi: number | null;
154
+ moisture: string | null;
155
+ area: string | null;
156
+ soilType: string | null;
157
+ currentCrop: string | null;
158
+ expectedHarvestDate: string | null;
159
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
160
+ historicalNdvi?: {
161
+ value: number;
162
+ date: string;
163
+ }[] | undefined;
164
+ cropHistory?: {
165
+ id: string;
166
+ season: string;
167
+ crop: string;
168
+ plantingDate: string;
169
+ harvestDate: string | null;
170
+ yield: number | null;
171
+ yieldUnit: string | null;
172
+ }[] | undefined;
173
+ }>;
174
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
175
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
176
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
177
+ }, "strip", z.ZodTypeAny, {
178
+ type: string;
179
+ id: string;
180
+ attributes: {
181
+ status: "ok" | "alert" | "critical";
182
+ createdAt: string;
183
+ updatedAt: string;
184
+ name: string;
185
+ crop: string | null;
186
+ plantingDate: string | null;
187
+ geometry: {
188
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
189
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
190
+ } | null;
191
+ ndvi: number | null;
192
+ moisture: string | null;
193
+ area: string | null;
194
+ soilType: string | null;
195
+ currentCrop: string | null;
196
+ expectedHarvestDate: string | null;
197
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
198
+ historicalNdvi?: {
199
+ value: number;
200
+ date: string;
201
+ }[] | undefined;
202
+ cropHistory?: {
203
+ id: string;
204
+ season: string;
205
+ crop: string;
206
+ plantingDate: string;
207
+ harvestDate: string | null;
208
+ yield: number | null;
209
+ yieldUnit: string | null;
210
+ }[] | undefined;
211
+ };
212
+ relationships?: Record<string, unknown> | undefined;
213
+ links?: Record<string, string> | undefined;
214
+ meta?: Record<string, unknown> | undefined;
215
+ }, {
216
+ type: string;
217
+ id: string;
218
+ attributes: {
219
+ status: "ok" | "alert" | "critical";
220
+ createdAt: string;
221
+ updatedAt: string;
222
+ name: string;
223
+ crop: string | null;
224
+ plantingDate: string | null;
225
+ geometry: {
226
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
227
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
228
+ } | null;
229
+ ndvi: number | null;
230
+ moisture: string | null;
231
+ area: string | null;
232
+ soilType: string | null;
233
+ currentCrop: string | null;
234
+ expectedHarvestDate: string | null;
235
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
236
+ historicalNdvi?: {
237
+ value: number;
238
+ date: string;
239
+ }[] | undefined;
240
+ cropHistory?: {
241
+ id: string;
242
+ season: string;
243
+ crop: string;
244
+ plantingDate: string;
245
+ harvestDate: string | null;
246
+ yield: number | null;
247
+ yieldUnit: string | null;
248
+ }[] | undefined;
249
+ };
250
+ relationships?: Record<string, unknown> | undefined;
251
+ links?: Record<string, string> | undefined;
252
+ meta?: Record<string, unknown> | undefined;
253
+ }>, "many">;
254
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
255
+ type: z.ZodString;
256
+ id: z.ZodString;
257
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
258
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
259
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
260
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ type: string;
263
+ id: string;
264
+ attributes?: Record<string, unknown> | undefined;
265
+ relationships?: Record<string, unknown> | undefined;
266
+ links?: Record<string, string> | undefined;
267
+ meta?: Record<string, unknown> | undefined;
268
+ }, {
269
+ type: string;
270
+ id: string;
271
+ attributes?: Record<string, unknown> | undefined;
272
+ relationships?: Record<string, unknown> | undefined;
273
+ links?: Record<string, string> | undefined;
274
+ meta?: Record<string, unknown> | undefined;
275
+ }>, "many">>;
276
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
277
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ data: {
280
+ type: string;
281
+ id: string;
282
+ attributes: {
283
+ status: "ok" | "alert" | "critical";
284
+ createdAt: string;
285
+ updatedAt: string;
286
+ name: string;
287
+ crop: string | null;
288
+ plantingDate: string | null;
289
+ geometry: {
290
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
291
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
292
+ } | null;
293
+ ndvi: number | null;
294
+ moisture: string | null;
295
+ area: string | null;
296
+ soilType: string | null;
297
+ currentCrop: string | null;
298
+ expectedHarvestDate: string | null;
299
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
300
+ historicalNdvi?: {
301
+ value: number;
302
+ date: string;
303
+ }[] | undefined;
304
+ cropHistory?: {
305
+ id: string;
306
+ season: string;
307
+ crop: string;
308
+ plantingDate: string;
309
+ harvestDate: string | null;
310
+ yield: number | null;
311
+ yieldUnit: string | null;
312
+ }[] | undefined;
313
+ };
314
+ relationships?: Record<string, unknown> | undefined;
315
+ links?: Record<string, string> | undefined;
316
+ meta?: Record<string, unknown> | undefined;
317
+ }[];
318
+ links?: Record<string, string> | undefined;
319
+ meta?: Record<string, unknown> | undefined;
320
+ included?: {
321
+ type: string;
322
+ id: string;
323
+ attributes?: Record<string, unknown> | undefined;
324
+ relationships?: Record<string, unknown> | undefined;
325
+ links?: Record<string, string> | undefined;
326
+ meta?: Record<string, unknown> | undefined;
327
+ }[] | undefined;
328
+ }, {
329
+ data: {
330
+ type: string;
331
+ id: string;
332
+ attributes: {
333
+ status: "ok" | "alert" | "critical";
334
+ createdAt: string;
335
+ updatedAt: string;
336
+ name: string;
337
+ crop: string | null;
338
+ plantingDate: string | null;
339
+ geometry: {
340
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
341
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
342
+ } | null;
343
+ ndvi: number | null;
344
+ moisture: string | null;
345
+ area: string | null;
346
+ soilType: string | null;
347
+ currentCrop: string | null;
348
+ expectedHarvestDate: string | null;
349
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
350
+ historicalNdvi?: {
351
+ value: number;
352
+ date: string;
353
+ }[] | undefined;
354
+ cropHistory?: {
355
+ id: string;
356
+ season: string;
357
+ crop: string;
358
+ plantingDate: string;
359
+ harvestDate: string | null;
360
+ yield: number | null;
361
+ yieldUnit: string | null;
362
+ }[] | undefined;
363
+ };
364
+ relationships?: Record<string, unknown> | undefined;
365
+ links?: Record<string, string> | undefined;
366
+ meta?: Record<string, unknown> | undefined;
367
+ }[];
368
+ links?: Record<string, string> | undefined;
369
+ meta?: Record<string, unknown> | undefined;
370
+ included?: {
371
+ type: string;
372
+ id: string;
373
+ attributes?: Record<string, unknown> | undefined;
374
+ relationships?: Record<string, unknown> | undefined;
375
+ links?: Record<string, string> | undefined;
376
+ meta?: Record<string, unknown> | undefined;
377
+ }[] | undefined;
378
+ }>;
379
+ 400: z.ZodObject<{
380
+ errors: z.ZodArray<z.ZodObject<{
381
+ id: z.ZodOptional<z.ZodString>;
382
+ links: z.ZodOptional<z.ZodObject<{
383
+ about: z.ZodOptional<z.ZodString>;
384
+ }, "strip", z.ZodTypeAny, {
385
+ about?: string | undefined;
386
+ }, {
387
+ about?: string | undefined;
388
+ }>>;
389
+ status: z.ZodOptional<z.ZodString>;
390
+ code: z.ZodOptional<z.ZodString>;
391
+ title: z.ZodOptional<z.ZodString>;
392
+ detail: z.ZodOptional<z.ZodString>;
393
+ source: z.ZodOptional<z.ZodObject<{
394
+ pointer: z.ZodOptional<z.ZodString>;
395
+ parameter: z.ZodOptional<z.ZodString>;
396
+ }, "strip", z.ZodTypeAny, {
397
+ pointer?: string | undefined;
398
+ parameter?: string | undefined;
399
+ }, {
400
+ pointer?: string | undefined;
401
+ parameter?: string | undefined;
402
+ }>>;
403
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ status?: string | undefined;
406
+ code?: string | undefined;
407
+ id?: string | undefined;
408
+ links?: {
409
+ about?: string | undefined;
410
+ } | undefined;
411
+ meta?: Record<string, unknown> | undefined;
412
+ title?: string | undefined;
413
+ detail?: string | undefined;
414
+ source?: {
415
+ pointer?: string | undefined;
416
+ parameter?: string | undefined;
417
+ } | undefined;
418
+ }, {
419
+ status?: string | undefined;
420
+ code?: string | undefined;
421
+ id?: string | undefined;
422
+ links?: {
423
+ about?: string | undefined;
424
+ } | undefined;
425
+ meta?: Record<string, unknown> | undefined;
426
+ title?: string | undefined;
427
+ detail?: string | undefined;
428
+ source?: {
429
+ pointer?: string | undefined;
430
+ parameter?: string | undefined;
431
+ } | undefined;
432
+ }>, "many">;
433
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
434
+ }, "strip", z.ZodTypeAny, {
435
+ errors: {
436
+ status?: string | undefined;
437
+ code?: string | undefined;
438
+ id?: string | undefined;
439
+ links?: {
440
+ about?: string | undefined;
441
+ } | undefined;
442
+ meta?: Record<string, unknown> | undefined;
443
+ title?: string | undefined;
444
+ detail?: string | undefined;
445
+ source?: {
446
+ pointer?: string | undefined;
447
+ parameter?: string | undefined;
448
+ } | undefined;
449
+ }[];
450
+ meta?: Record<string, unknown> | undefined;
451
+ }, {
452
+ errors: {
453
+ status?: string | undefined;
454
+ code?: string | undefined;
455
+ id?: string | undefined;
456
+ links?: {
457
+ about?: string | undefined;
458
+ } | undefined;
459
+ meta?: Record<string, unknown> | undefined;
460
+ title?: string | undefined;
461
+ detail?: string | undefined;
462
+ source?: {
463
+ pointer?: string | undefined;
464
+ parameter?: string | undefined;
465
+ } | undefined;
466
+ }[];
467
+ meta?: Record<string, unknown> | undefined;
468
+ }>;
469
+ 404: z.ZodObject<{
470
+ errors: z.ZodArray<z.ZodObject<{
471
+ id: z.ZodOptional<z.ZodString>;
472
+ links: z.ZodOptional<z.ZodObject<{
473
+ about: z.ZodOptional<z.ZodString>;
474
+ }, "strip", z.ZodTypeAny, {
475
+ about?: string | undefined;
476
+ }, {
477
+ about?: string | undefined;
478
+ }>>;
479
+ status: z.ZodOptional<z.ZodString>;
480
+ code: z.ZodOptional<z.ZodString>;
481
+ title: z.ZodOptional<z.ZodString>;
482
+ detail: z.ZodOptional<z.ZodString>;
483
+ source: z.ZodOptional<z.ZodObject<{
484
+ pointer: z.ZodOptional<z.ZodString>;
485
+ parameter: z.ZodOptional<z.ZodString>;
486
+ }, "strip", z.ZodTypeAny, {
487
+ pointer?: string | undefined;
488
+ parameter?: string | undefined;
489
+ }, {
490
+ pointer?: string | undefined;
491
+ parameter?: string | undefined;
492
+ }>>;
493
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
494
+ }, "strip", z.ZodTypeAny, {
495
+ status?: string | undefined;
496
+ code?: string | undefined;
497
+ id?: string | undefined;
498
+ links?: {
499
+ about?: string | undefined;
500
+ } | undefined;
501
+ meta?: Record<string, unknown> | undefined;
502
+ title?: string | undefined;
503
+ detail?: string | undefined;
504
+ source?: {
505
+ pointer?: string | undefined;
506
+ parameter?: string | undefined;
507
+ } | undefined;
508
+ }, {
509
+ status?: string | undefined;
510
+ code?: string | undefined;
511
+ id?: string | undefined;
512
+ links?: {
513
+ about?: string | undefined;
514
+ } | undefined;
515
+ meta?: Record<string, unknown> | undefined;
516
+ title?: string | undefined;
517
+ detail?: string | undefined;
518
+ source?: {
519
+ pointer?: string | undefined;
520
+ parameter?: string | undefined;
521
+ } | undefined;
522
+ }>, "many">;
523
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
524
+ }, "strip", z.ZodTypeAny, {
525
+ errors: {
526
+ status?: string | undefined;
527
+ code?: string | undefined;
528
+ id?: string | undefined;
529
+ links?: {
530
+ about?: string | undefined;
531
+ } | undefined;
532
+ meta?: Record<string, unknown> | undefined;
533
+ title?: string | undefined;
534
+ detail?: string | undefined;
535
+ source?: {
536
+ pointer?: string | undefined;
537
+ parameter?: string | undefined;
538
+ } | undefined;
539
+ }[];
540
+ meta?: Record<string, unknown> | undefined;
541
+ }, {
542
+ errors: {
543
+ status?: string | undefined;
544
+ code?: string | undefined;
545
+ id?: string | undefined;
546
+ links?: {
547
+ about?: string | undefined;
548
+ } | undefined;
549
+ meta?: Record<string, unknown> | undefined;
550
+ title?: string | undefined;
551
+ detail?: string | undefined;
552
+ source?: {
553
+ pointer?: string | undefined;
554
+ parameter?: string | undefined;
555
+ } | undefined;
556
+ }[];
557
+ meta?: Record<string, unknown> | undefined;
558
+ }>;
559
+ 401: z.ZodObject<{
560
+ errors: z.ZodArray<z.ZodObject<{
561
+ id: z.ZodOptional<z.ZodString>;
562
+ links: z.ZodOptional<z.ZodObject<{
563
+ about: z.ZodOptional<z.ZodString>;
564
+ }, "strip", z.ZodTypeAny, {
565
+ about?: string | undefined;
566
+ }, {
567
+ about?: string | undefined;
568
+ }>>;
569
+ status: z.ZodOptional<z.ZodString>;
570
+ code: z.ZodOptional<z.ZodString>;
571
+ title: z.ZodOptional<z.ZodString>;
572
+ detail: z.ZodOptional<z.ZodString>;
573
+ source: z.ZodOptional<z.ZodObject<{
574
+ pointer: z.ZodOptional<z.ZodString>;
575
+ parameter: z.ZodOptional<z.ZodString>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ pointer?: string | undefined;
578
+ parameter?: string | undefined;
579
+ }, {
580
+ pointer?: string | undefined;
581
+ parameter?: string | undefined;
582
+ }>>;
583
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
584
+ }, "strip", z.ZodTypeAny, {
585
+ status?: string | undefined;
586
+ code?: string | undefined;
587
+ id?: string | undefined;
588
+ links?: {
589
+ about?: string | undefined;
590
+ } | undefined;
591
+ meta?: Record<string, unknown> | undefined;
592
+ title?: string | undefined;
593
+ detail?: string | undefined;
594
+ source?: {
595
+ pointer?: string | undefined;
596
+ parameter?: string | undefined;
597
+ } | undefined;
598
+ }, {
599
+ status?: string | undefined;
600
+ code?: string | undefined;
601
+ id?: string | undefined;
602
+ links?: {
603
+ about?: string | undefined;
604
+ } | undefined;
605
+ meta?: Record<string, unknown> | undefined;
606
+ title?: string | undefined;
607
+ detail?: string | undefined;
608
+ source?: {
609
+ pointer?: string | undefined;
610
+ parameter?: string | undefined;
611
+ } | undefined;
612
+ }>, "many">;
613
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
614
+ }, "strip", z.ZodTypeAny, {
615
+ errors: {
616
+ status?: string | undefined;
617
+ code?: string | undefined;
618
+ id?: string | undefined;
619
+ links?: {
620
+ about?: string | undefined;
621
+ } | undefined;
622
+ meta?: Record<string, unknown> | undefined;
623
+ title?: string | undefined;
624
+ detail?: string | undefined;
625
+ source?: {
626
+ pointer?: string | undefined;
627
+ parameter?: string | undefined;
628
+ } | undefined;
629
+ }[];
630
+ meta?: Record<string, unknown> | undefined;
631
+ }, {
632
+ errors: {
633
+ status?: string | undefined;
634
+ code?: string | undefined;
635
+ id?: string | undefined;
636
+ links?: {
637
+ about?: string | undefined;
638
+ } | undefined;
639
+ meta?: Record<string, unknown> | undefined;
640
+ title?: string | undefined;
641
+ detail?: string | undefined;
642
+ source?: {
643
+ pointer?: string | undefined;
644
+ parameter?: string | undefined;
645
+ } | undefined;
646
+ }[];
647
+ meta?: Record<string, unknown> | undefined;
648
+ }>;
649
+ };
650
+ };
651
+ createField: {
652
+ pathParams: z.ZodObject<{
653
+ farmId: z.ZodString;
654
+ }, "strip", z.ZodTypeAny, {
655
+ farmId: string;
656
+ }, {
657
+ farmId: string;
658
+ }>;
659
+ summary: "Create a new field";
660
+ description: "Create a new field with optional geometry";
661
+ method: "POST";
662
+ body: z.ZodObject<{
663
+ data: z.ZodObject<{
664
+ type: z.ZodLiteral<"fields">;
665
+ attributes: z.ZodObject<{
666
+ name: z.ZodString;
667
+ geometry: z.ZodOptional<z.ZodObject<{
668
+ type: z.ZodEnum<["Polygon", "MultiPolygon", "Point", "LineString"]>;
669
+ coordinates: z.ZodUnion<[z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
672
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
673
+ }, {
674
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
675
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
676
+ }>>;
677
+ ndvi: z.ZodOptional<z.ZodNumber>;
678
+ moisture: z.ZodOptional<z.ZodString>;
679
+ crop: z.ZodOptional<z.ZodString>;
680
+ soilType: z.ZodOptional<z.ZodString>;
681
+ currentCrop: z.ZodOptional<z.ZodString>;
682
+ plantingDate: z.ZodOptional<z.ZodString>;
683
+ expectedHarvestDate: z.ZodOptional<z.ZodString>;
684
+ cropStage: z.ZodOptional<z.ZodEnum<["planted", "growing", "flowering", "mature", "harvested"]>>;
685
+ }, "strip", z.ZodTypeAny, {
686
+ name: string;
687
+ crop?: string | undefined;
688
+ plantingDate?: string | undefined;
689
+ geometry?: {
690
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
691
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
692
+ } | undefined;
693
+ ndvi?: number | undefined;
694
+ moisture?: string | undefined;
695
+ soilType?: string | undefined;
696
+ currentCrop?: string | undefined;
697
+ expectedHarvestDate?: string | undefined;
698
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
699
+ }, {
700
+ name: string;
701
+ crop?: string | undefined;
702
+ plantingDate?: string | undefined;
703
+ geometry?: {
704
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
705
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
706
+ } | undefined;
707
+ ndvi?: number | undefined;
708
+ moisture?: string | undefined;
709
+ soilType?: string | undefined;
710
+ currentCrop?: string | undefined;
711
+ expectedHarvestDate?: string | undefined;
712
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
713
+ }>;
714
+ relationships: z.ZodObject<{
715
+ farm: z.ZodObject<{
716
+ data: z.ZodObject<{
717
+ type: z.ZodLiteral<"farms">;
718
+ id: z.ZodString;
719
+ }, "strip", z.ZodTypeAny, {
720
+ type: "farms";
721
+ id: string;
722
+ }, {
723
+ type: "farms";
724
+ id: string;
725
+ }>;
726
+ }, "strip", z.ZodTypeAny, {
727
+ data: {
728
+ type: "farms";
729
+ id: string;
730
+ };
731
+ }, {
732
+ data: {
733
+ type: "farms";
734
+ id: string;
735
+ };
736
+ }>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ farm: {
739
+ data: {
740
+ type: "farms";
741
+ id: string;
742
+ };
743
+ };
744
+ }, {
745
+ farm: {
746
+ data: {
747
+ type: "farms";
748
+ id: string;
749
+ };
750
+ };
751
+ }>;
752
+ }, "strip", z.ZodTypeAny, {
753
+ type: "fields";
754
+ attributes: {
755
+ name: string;
756
+ crop?: string | undefined;
757
+ plantingDate?: string | undefined;
758
+ geometry?: {
759
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
760
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
761
+ } | undefined;
762
+ ndvi?: number | undefined;
763
+ moisture?: string | undefined;
764
+ soilType?: string | undefined;
765
+ currentCrop?: string | undefined;
766
+ expectedHarvestDate?: string | undefined;
767
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
768
+ };
769
+ relationships: {
770
+ farm: {
771
+ data: {
772
+ type: "farms";
773
+ id: string;
774
+ };
775
+ };
776
+ };
777
+ }, {
778
+ type: "fields";
779
+ attributes: {
780
+ name: string;
781
+ crop?: string | undefined;
782
+ plantingDate?: string | undefined;
783
+ geometry?: {
784
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
785
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
786
+ } | undefined;
787
+ ndvi?: number | undefined;
788
+ moisture?: string | undefined;
789
+ soilType?: string | undefined;
790
+ currentCrop?: string | undefined;
791
+ expectedHarvestDate?: string | undefined;
792
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
793
+ };
794
+ relationships: {
795
+ farm: {
796
+ data: {
797
+ type: "farms";
798
+ id: string;
799
+ };
800
+ };
801
+ };
802
+ }>;
803
+ }, "strip", z.ZodTypeAny, {
804
+ data: {
805
+ type: "fields";
806
+ attributes: {
807
+ name: string;
808
+ crop?: string | undefined;
809
+ plantingDate?: string | undefined;
810
+ geometry?: {
811
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
812
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
813
+ } | undefined;
814
+ ndvi?: number | undefined;
815
+ moisture?: string | undefined;
816
+ soilType?: string | undefined;
817
+ currentCrop?: string | undefined;
818
+ expectedHarvestDate?: string | undefined;
819
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
820
+ };
821
+ relationships: {
822
+ farm: {
823
+ data: {
824
+ type: "farms";
825
+ id: string;
826
+ };
827
+ };
828
+ };
829
+ };
830
+ }, {
831
+ data: {
832
+ type: "fields";
833
+ attributes: {
834
+ name: string;
835
+ crop?: string | undefined;
836
+ plantingDate?: string | undefined;
837
+ geometry?: {
838
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
839
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
840
+ } | undefined;
841
+ ndvi?: number | undefined;
842
+ moisture?: string | undefined;
843
+ soilType?: string | undefined;
844
+ currentCrop?: string | undefined;
845
+ expectedHarvestDate?: string | undefined;
846
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
847
+ };
848
+ relationships: {
849
+ farm: {
850
+ data: {
851
+ type: "farms";
852
+ id: string;
853
+ };
854
+ };
855
+ };
856
+ };
857
+ }>;
858
+ path: "/farms/:farmId/fields";
859
+ responses: {
860
+ 201: z.ZodObject<{
861
+ data: z.ZodObject<{
862
+ type: z.ZodLiteral<string>;
863
+ id: z.ZodString;
864
+ attributes: z.ZodObject<{
865
+ name: z.ZodString;
866
+ geometry: z.ZodNullable<z.ZodObject<{
867
+ type: z.ZodEnum<["Polygon", "MultiPolygon", "Point", "LineString"]>;
868
+ coordinates: z.ZodUnion<[z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
871
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
872
+ }, {
873
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
874
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
875
+ }>>;
876
+ ndvi: z.ZodNullable<z.ZodNumber>;
877
+ moisture: z.ZodNullable<z.ZodString>;
878
+ status: z.ZodEnum<["ok", "alert", "critical"]>;
879
+ area: z.ZodNullable<z.ZodString>;
880
+ crop: z.ZodNullable<z.ZodString>;
881
+ soilType: z.ZodNullable<z.ZodString>;
882
+ currentCrop: z.ZodNullable<z.ZodString>;
883
+ plantingDate: z.ZodNullable<z.ZodString>;
884
+ expectedHarvestDate: z.ZodNullable<z.ZodString>;
885
+ cropStage: z.ZodNullable<z.ZodEnum<["planted", "growing", "flowering", "mature", "harvested"]>>;
886
+ historicalNdvi: z.ZodOptional<z.ZodArray<z.ZodObject<{
887
+ date: z.ZodString;
888
+ value: z.ZodNumber;
889
+ }, "strip", z.ZodTypeAny, {
890
+ value: number;
891
+ date: string;
892
+ }, {
893
+ value: number;
894
+ date: string;
895
+ }>, "many">>;
896
+ cropHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
897
+ id: z.ZodString;
898
+ season: z.ZodString;
899
+ crop: z.ZodString;
900
+ plantingDate: z.ZodString;
901
+ harvestDate: z.ZodNullable<z.ZodString>;
902
+ yield: z.ZodNullable<z.ZodNumber>;
903
+ yieldUnit: z.ZodNullable<z.ZodString>;
904
+ }, "strip", z.ZodTypeAny, {
905
+ id: string;
906
+ season: string;
907
+ crop: string;
908
+ plantingDate: string;
909
+ harvestDate: string | null;
910
+ yield: number | null;
911
+ yieldUnit: string | null;
912
+ }, {
913
+ id: string;
914
+ season: string;
915
+ crop: string;
916
+ plantingDate: string;
917
+ harvestDate: string | null;
918
+ yield: number | null;
919
+ yieldUnit: string | null;
920
+ }>, "many">>;
921
+ } & {
922
+ createdAt: z.ZodString;
923
+ updatedAt: z.ZodString;
924
+ }, "strip", z.ZodTypeAny, {
925
+ status: "ok" | "alert" | "critical";
926
+ createdAt: string;
927
+ updatedAt: string;
928
+ name: string;
929
+ crop: string | null;
930
+ plantingDate: string | null;
931
+ geometry: {
932
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
933
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
934
+ } | null;
935
+ ndvi: number | null;
936
+ moisture: string | null;
937
+ area: string | null;
938
+ soilType: string | null;
939
+ currentCrop: string | null;
940
+ expectedHarvestDate: string | null;
941
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
942
+ historicalNdvi?: {
943
+ value: number;
944
+ date: string;
945
+ }[] | undefined;
946
+ cropHistory?: {
947
+ id: string;
948
+ season: string;
949
+ crop: string;
950
+ plantingDate: string;
951
+ harvestDate: string | null;
952
+ yield: number | null;
953
+ yieldUnit: string | null;
954
+ }[] | undefined;
955
+ }, {
956
+ status: "ok" | "alert" | "critical";
957
+ createdAt: string;
958
+ updatedAt: string;
959
+ name: string;
960
+ crop: string | null;
961
+ plantingDate: string | null;
962
+ geometry: {
963
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
964
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
965
+ } | null;
966
+ ndvi: number | null;
967
+ moisture: string | null;
968
+ area: string | null;
969
+ soilType: string | null;
970
+ currentCrop: string | null;
971
+ expectedHarvestDate: string | null;
972
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
973
+ historicalNdvi?: {
974
+ value: number;
975
+ date: string;
976
+ }[] | undefined;
977
+ cropHistory?: {
978
+ id: string;
979
+ season: string;
980
+ crop: string;
981
+ plantingDate: string;
982
+ harvestDate: string | null;
983
+ yield: number | null;
984
+ yieldUnit: string | null;
985
+ }[] | undefined;
986
+ }>;
987
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
988
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
989
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
990
+ }, "strip", z.ZodTypeAny, {
991
+ type: string;
992
+ id: string;
993
+ attributes: {
994
+ status: "ok" | "alert" | "critical";
995
+ createdAt: string;
996
+ updatedAt: string;
997
+ name: string;
998
+ crop: string | null;
999
+ plantingDate: string | null;
1000
+ geometry: {
1001
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1002
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1003
+ } | null;
1004
+ ndvi: number | null;
1005
+ moisture: string | null;
1006
+ area: string | null;
1007
+ soilType: string | null;
1008
+ currentCrop: string | null;
1009
+ expectedHarvestDate: string | null;
1010
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1011
+ historicalNdvi?: {
1012
+ value: number;
1013
+ date: string;
1014
+ }[] | undefined;
1015
+ cropHistory?: {
1016
+ id: string;
1017
+ season: string;
1018
+ crop: string;
1019
+ plantingDate: string;
1020
+ harvestDate: string | null;
1021
+ yield: number | null;
1022
+ yieldUnit: string | null;
1023
+ }[] | undefined;
1024
+ };
1025
+ relationships?: Record<string, unknown> | undefined;
1026
+ links?: Record<string, string> | undefined;
1027
+ meta?: Record<string, unknown> | undefined;
1028
+ }, {
1029
+ type: string;
1030
+ id: string;
1031
+ attributes: {
1032
+ status: "ok" | "alert" | "critical";
1033
+ createdAt: string;
1034
+ updatedAt: string;
1035
+ name: string;
1036
+ crop: string | null;
1037
+ plantingDate: string | null;
1038
+ geometry: {
1039
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1040
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1041
+ } | null;
1042
+ ndvi: number | null;
1043
+ moisture: string | null;
1044
+ area: string | null;
1045
+ soilType: string | null;
1046
+ currentCrop: string | null;
1047
+ expectedHarvestDate: string | null;
1048
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1049
+ historicalNdvi?: {
1050
+ value: number;
1051
+ date: string;
1052
+ }[] | undefined;
1053
+ cropHistory?: {
1054
+ id: string;
1055
+ season: string;
1056
+ crop: string;
1057
+ plantingDate: string;
1058
+ harvestDate: string | null;
1059
+ yield: number | null;
1060
+ yieldUnit: string | null;
1061
+ }[] | undefined;
1062
+ };
1063
+ relationships?: Record<string, unknown> | undefined;
1064
+ links?: Record<string, string> | undefined;
1065
+ meta?: Record<string, unknown> | undefined;
1066
+ }>;
1067
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
1068
+ type: z.ZodString;
1069
+ id: z.ZodString;
1070
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1071
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1072
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1073
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ type: string;
1076
+ id: string;
1077
+ attributes?: Record<string, unknown> | undefined;
1078
+ relationships?: Record<string, unknown> | undefined;
1079
+ links?: Record<string, string> | undefined;
1080
+ meta?: Record<string, unknown> | undefined;
1081
+ }, {
1082
+ type: string;
1083
+ id: string;
1084
+ attributes?: Record<string, unknown> | undefined;
1085
+ relationships?: Record<string, unknown> | undefined;
1086
+ links?: Record<string, string> | undefined;
1087
+ meta?: Record<string, unknown> | undefined;
1088
+ }>, "many">>;
1089
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1090
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1091
+ }, "strip", z.ZodTypeAny, {
1092
+ data: {
1093
+ type: string;
1094
+ id: string;
1095
+ attributes: {
1096
+ status: "ok" | "alert" | "critical";
1097
+ createdAt: string;
1098
+ updatedAt: string;
1099
+ name: string;
1100
+ crop: string | null;
1101
+ plantingDate: string | null;
1102
+ geometry: {
1103
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1104
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1105
+ } | null;
1106
+ ndvi: number | null;
1107
+ moisture: string | null;
1108
+ area: string | null;
1109
+ soilType: string | null;
1110
+ currentCrop: string | null;
1111
+ expectedHarvestDate: string | null;
1112
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1113
+ historicalNdvi?: {
1114
+ value: number;
1115
+ date: string;
1116
+ }[] | undefined;
1117
+ cropHistory?: {
1118
+ id: string;
1119
+ season: string;
1120
+ crop: string;
1121
+ plantingDate: string;
1122
+ harvestDate: string | null;
1123
+ yield: number | null;
1124
+ yieldUnit: string | null;
1125
+ }[] | undefined;
1126
+ };
1127
+ relationships?: Record<string, unknown> | undefined;
1128
+ links?: Record<string, string> | undefined;
1129
+ meta?: Record<string, unknown> | undefined;
1130
+ };
1131
+ links?: Record<string, string> | undefined;
1132
+ meta?: Record<string, unknown> | undefined;
1133
+ included?: {
1134
+ type: string;
1135
+ id: string;
1136
+ attributes?: Record<string, unknown> | undefined;
1137
+ relationships?: Record<string, unknown> | undefined;
1138
+ links?: Record<string, string> | undefined;
1139
+ meta?: Record<string, unknown> | undefined;
1140
+ }[] | undefined;
1141
+ }, {
1142
+ data: {
1143
+ type: string;
1144
+ id: string;
1145
+ attributes: {
1146
+ status: "ok" | "alert" | "critical";
1147
+ createdAt: string;
1148
+ updatedAt: string;
1149
+ name: string;
1150
+ crop: string | null;
1151
+ plantingDate: string | null;
1152
+ geometry: {
1153
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1154
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1155
+ } | null;
1156
+ ndvi: number | null;
1157
+ moisture: string | null;
1158
+ area: string | null;
1159
+ soilType: string | null;
1160
+ currentCrop: string | null;
1161
+ expectedHarvestDate: string | null;
1162
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1163
+ historicalNdvi?: {
1164
+ value: number;
1165
+ date: string;
1166
+ }[] | undefined;
1167
+ cropHistory?: {
1168
+ id: string;
1169
+ season: string;
1170
+ crop: string;
1171
+ plantingDate: string;
1172
+ harvestDate: string | null;
1173
+ yield: number | null;
1174
+ yieldUnit: string | null;
1175
+ }[] | undefined;
1176
+ };
1177
+ relationships?: Record<string, unknown> | undefined;
1178
+ links?: Record<string, string> | undefined;
1179
+ meta?: Record<string, unknown> | undefined;
1180
+ };
1181
+ links?: Record<string, string> | undefined;
1182
+ meta?: Record<string, unknown> | undefined;
1183
+ included?: {
1184
+ type: string;
1185
+ id: string;
1186
+ attributes?: Record<string, unknown> | undefined;
1187
+ relationships?: Record<string, unknown> | undefined;
1188
+ links?: Record<string, string> | undefined;
1189
+ meta?: Record<string, unknown> | undefined;
1190
+ }[] | undefined;
1191
+ }>;
1192
+ 400: z.ZodObject<{
1193
+ errors: z.ZodArray<z.ZodObject<{
1194
+ id: z.ZodOptional<z.ZodString>;
1195
+ links: z.ZodOptional<z.ZodObject<{
1196
+ about: z.ZodOptional<z.ZodString>;
1197
+ }, "strip", z.ZodTypeAny, {
1198
+ about?: string | undefined;
1199
+ }, {
1200
+ about?: string | undefined;
1201
+ }>>;
1202
+ status: z.ZodOptional<z.ZodString>;
1203
+ code: z.ZodOptional<z.ZodString>;
1204
+ title: z.ZodOptional<z.ZodString>;
1205
+ detail: z.ZodOptional<z.ZodString>;
1206
+ source: z.ZodOptional<z.ZodObject<{
1207
+ pointer: z.ZodOptional<z.ZodString>;
1208
+ parameter: z.ZodOptional<z.ZodString>;
1209
+ }, "strip", z.ZodTypeAny, {
1210
+ pointer?: string | undefined;
1211
+ parameter?: string | undefined;
1212
+ }, {
1213
+ pointer?: string | undefined;
1214
+ parameter?: string | undefined;
1215
+ }>>;
1216
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1217
+ }, "strip", z.ZodTypeAny, {
1218
+ status?: string | undefined;
1219
+ code?: string | undefined;
1220
+ id?: string | undefined;
1221
+ links?: {
1222
+ about?: string | undefined;
1223
+ } | undefined;
1224
+ meta?: Record<string, unknown> | undefined;
1225
+ title?: string | undefined;
1226
+ detail?: string | undefined;
1227
+ source?: {
1228
+ pointer?: string | undefined;
1229
+ parameter?: string | undefined;
1230
+ } | undefined;
1231
+ }, {
1232
+ status?: string | undefined;
1233
+ code?: string | undefined;
1234
+ id?: string | undefined;
1235
+ links?: {
1236
+ about?: string | undefined;
1237
+ } | undefined;
1238
+ meta?: Record<string, unknown> | undefined;
1239
+ title?: string | undefined;
1240
+ detail?: string | undefined;
1241
+ source?: {
1242
+ pointer?: string | undefined;
1243
+ parameter?: string | undefined;
1244
+ } | undefined;
1245
+ }>, "many">;
1246
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1247
+ }, "strip", z.ZodTypeAny, {
1248
+ errors: {
1249
+ status?: string | undefined;
1250
+ code?: string | undefined;
1251
+ id?: string | undefined;
1252
+ links?: {
1253
+ about?: string | undefined;
1254
+ } | undefined;
1255
+ meta?: Record<string, unknown> | undefined;
1256
+ title?: string | undefined;
1257
+ detail?: string | undefined;
1258
+ source?: {
1259
+ pointer?: string | undefined;
1260
+ parameter?: string | undefined;
1261
+ } | undefined;
1262
+ }[];
1263
+ meta?: Record<string, unknown> | undefined;
1264
+ }, {
1265
+ errors: {
1266
+ status?: string | undefined;
1267
+ code?: string | undefined;
1268
+ id?: string | undefined;
1269
+ links?: {
1270
+ about?: string | undefined;
1271
+ } | undefined;
1272
+ meta?: Record<string, unknown> | undefined;
1273
+ title?: string | undefined;
1274
+ detail?: string | undefined;
1275
+ source?: {
1276
+ pointer?: string | undefined;
1277
+ parameter?: string | undefined;
1278
+ } | undefined;
1279
+ }[];
1280
+ meta?: Record<string, unknown> | undefined;
1281
+ }>;
1282
+ 404: z.ZodObject<{
1283
+ errors: z.ZodArray<z.ZodObject<{
1284
+ id: z.ZodOptional<z.ZodString>;
1285
+ links: z.ZodOptional<z.ZodObject<{
1286
+ about: z.ZodOptional<z.ZodString>;
1287
+ }, "strip", z.ZodTypeAny, {
1288
+ about?: string | undefined;
1289
+ }, {
1290
+ about?: string | undefined;
1291
+ }>>;
1292
+ status: z.ZodOptional<z.ZodString>;
1293
+ code: z.ZodOptional<z.ZodString>;
1294
+ title: z.ZodOptional<z.ZodString>;
1295
+ detail: z.ZodOptional<z.ZodString>;
1296
+ source: z.ZodOptional<z.ZodObject<{
1297
+ pointer: z.ZodOptional<z.ZodString>;
1298
+ parameter: z.ZodOptional<z.ZodString>;
1299
+ }, "strip", z.ZodTypeAny, {
1300
+ pointer?: string | undefined;
1301
+ parameter?: string | undefined;
1302
+ }, {
1303
+ pointer?: string | undefined;
1304
+ parameter?: string | undefined;
1305
+ }>>;
1306
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1307
+ }, "strip", z.ZodTypeAny, {
1308
+ status?: string | undefined;
1309
+ code?: string | undefined;
1310
+ id?: string | undefined;
1311
+ links?: {
1312
+ about?: string | undefined;
1313
+ } | undefined;
1314
+ meta?: Record<string, unknown> | undefined;
1315
+ title?: string | undefined;
1316
+ detail?: string | undefined;
1317
+ source?: {
1318
+ pointer?: string | undefined;
1319
+ parameter?: string | undefined;
1320
+ } | undefined;
1321
+ }, {
1322
+ status?: string | undefined;
1323
+ code?: string | undefined;
1324
+ id?: string | undefined;
1325
+ links?: {
1326
+ about?: string | undefined;
1327
+ } | undefined;
1328
+ meta?: Record<string, unknown> | undefined;
1329
+ title?: string | undefined;
1330
+ detail?: string | undefined;
1331
+ source?: {
1332
+ pointer?: string | undefined;
1333
+ parameter?: string | undefined;
1334
+ } | undefined;
1335
+ }>, "many">;
1336
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1337
+ }, "strip", z.ZodTypeAny, {
1338
+ errors: {
1339
+ status?: string | undefined;
1340
+ code?: string | undefined;
1341
+ id?: string | undefined;
1342
+ links?: {
1343
+ about?: string | undefined;
1344
+ } | undefined;
1345
+ meta?: Record<string, unknown> | undefined;
1346
+ title?: string | undefined;
1347
+ detail?: string | undefined;
1348
+ source?: {
1349
+ pointer?: string | undefined;
1350
+ parameter?: string | undefined;
1351
+ } | undefined;
1352
+ }[];
1353
+ meta?: Record<string, unknown> | undefined;
1354
+ }, {
1355
+ errors: {
1356
+ status?: string | undefined;
1357
+ code?: string | undefined;
1358
+ id?: string | undefined;
1359
+ links?: {
1360
+ about?: string | undefined;
1361
+ } | undefined;
1362
+ meta?: Record<string, unknown> | undefined;
1363
+ title?: string | undefined;
1364
+ detail?: string | undefined;
1365
+ source?: {
1366
+ pointer?: string | undefined;
1367
+ parameter?: string | undefined;
1368
+ } | undefined;
1369
+ }[];
1370
+ meta?: Record<string, unknown> | undefined;
1371
+ }>;
1372
+ 401: z.ZodObject<{
1373
+ errors: z.ZodArray<z.ZodObject<{
1374
+ id: z.ZodOptional<z.ZodString>;
1375
+ links: z.ZodOptional<z.ZodObject<{
1376
+ about: z.ZodOptional<z.ZodString>;
1377
+ }, "strip", z.ZodTypeAny, {
1378
+ about?: string | undefined;
1379
+ }, {
1380
+ about?: string | undefined;
1381
+ }>>;
1382
+ status: z.ZodOptional<z.ZodString>;
1383
+ code: z.ZodOptional<z.ZodString>;
1384
+ title: z.ZodOptional<z.ZodString>;
1385
+ detail: z.ZodOptional<z.ZodString>;
1386
+ source: z.ZodOptional<z.ZodObject<{
1387
+ pointer: z.ZodOptional<z.ZodString>;
1388
+ parameter: z.ZodOptional<z.ZodString>;
1389
+ }, "strip", z.ZodTypeAny, {
1390
+ pointer?: string | undefined;
1391
+ parameter?: string | undefined;
1392
+ }, {
1393
+ pointer?: string | undefined;
1394
+ parameter?: string | undefined;
1395
+ }>>;
1396
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1397
+ }, "strip", z.ZodTypeAny, {
1398
+ status?: string | undefined;
1399
+ code?: string | undefined;
1400
+ id?: string | undefined;
1401
+ links?: {
1402
+ about?: string | undefined;
1403
+ } | undefined;
1404
+ meta?: Record<string, unknown> | undefined;
1405
+ title?: string | undefined;
1406
+ detail?: string | undefined;
1407
+ source?: {
1408
+ pointer?: string | undefined;
1409
+ parameter?: string | undefined;
1410
+ } | undefined;
1411
+ }, {
1412
+ status?: string | undefined;
1413
+ code?: string | undefined;
1414
+ id?: string | undefined;
1415
+ links?: {
1416
+ about?: string | undefined;
1417
+ } | undefined;
1418
+ meta?: Record<string, unknown> | undefined;
1419
+ title?: string | undefined;
1420
+ detail?: string | undefined;
1421
+ source?: {
1422
+ pointer?: string | undefined;
1423
+ parameter?: string | undefined;
1424
+ } | undefined;
1425
+ }>, "many">;
1426
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1427
+ }, "strip", z.ZodTypeAny, {
1428
+ errors: {
1429
+ status?: string | undefined;
1430
+ code?: string | undefined;
1431
+ id?: string | undefined;
1432
+ links?: {
1433
+ about?: string | undefined;
1434
+ } | undefined;
1435
+ meta?: Record<string, unknown> | undefined;
1436
+ title?: string | undefined;
1437
+ detail?: string | undefined;
1438
+ source?: {
1439
+ pointer?: string | undefined;
1440
+ parameter?: string | undefined;
1441
+ } | undefined;
1442
+ }[];
1443
+ meta?: Record<string, unknown> | undefined;
1444
+ }, {
1445
+ errors: {
1446
+ status?: string | undefined;
1447
+ code?: string | undefined;
1448
+ id?: string | undefined;
1449
+ links?: {
1450
+ about?: string | undefined;
1451
+ } | undefined;
1452
+ meta?: Record<string, unknown> | undefined;
1453
+ title?: string | undefined;
1454
+ detail?: string | undefined;
1455
+ source?: {
1456
+ pointer?: string | undefined;
1457
+ parameter?: string | undefined;
1458
+ } | undefined;
1459
+ }[];
1460
+ meta?: Record<string, unknown> | undefined;
1461
+ }>;
1462
+ 422: z.ZodObject<{
1463
+ errors: z.ZodArray<z.ZodObject<{
1464
+ id: z.ZodOptional<z.ZodString>;
1465
+ links: z.ZodOptional<z.ZodObject<{
1466
+ about: z.ZodOptional<z.ZodString>;
1467
+ }, "strip", z.ZodTypeAny, {
1468
+ about?: string | undefined;
1469
+ }, {
1470
+ about?: string | undefined;
1471
+ }>>;
1472
+ status: z.ZodOptional<z.ZodString>;
1473
+ code: z.ZodOptional<z.ZodString>;
1474
+ title: z.ZodOptional<z.ZodString>;
1475
+ detail: z.ZodOptional<z.ZodString>;
1476
+ source: z.ZodOptional<z.ZodObject<{
1477
+ pointer: z.ZodOptional<z.ZodString>;
1478
+ parameter: z.ZodOptional<z.ZodString>;
1479
+ }, "strip", z.ZodTypeAny, {
1480
+ pointer?: string | undefined;
1481
+ parameter?: string | undefined;
1482
+ }, {
1483
+ pointer?: string | undefined;
1484
+ parameter?: string | undefined;
1485
+ }>>;
1486
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1487
+ }, "strip", z.ZodTypeAny, {
1488
+ status?: string | undefined;
1489
+ code?: string | undefined;
1490
+ id?: string | undefined;
1491
+ links?: {
1492
+ about?: string | undefined;
1493
+ } | undefined;
1494
+ meta?: Record<string, unknown> | undefined;
1495
+ title?: string | undefined;
1496
+ detail?: string | undefined;
1497
+ source?: {
1498
+ pointer?: string | undefined;
1499
+ parameter?: string | undefined;
1500
+ } | undefined;
1501
+ }, {
1502
+ status?: string | undefined;
1503
+ code?: string | undefined;
1504
+ id?: string | undefined;
1505
+ links?: {
1506
+ about?: string | undefined;
1507
+ } | undefined;
1508
+ meta?: Record<string, unknown> | undefined;
1509
+ title?: string | undefined;
1510
+ detail?: string | undefined;
1511
+ source?: {
1512
+ pointer?: string | undefined;
1513
+ parameter?: string | undefined;
1514
+ } | undefined;
1515
+ }>, "many">;
1516
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1517
+ }, "strip", z.ZodTypeAny, {
1518
+ errors: {
1519
+ status?: string | undefined;
1520
+ code?: string | undefined;
1521
+ id?: string | undefined;
1522
+ links?: {
1523
+ about?: string | undefined;
1524
+ } | undefined;
1525
+ meta?: Record<string, unknown> | undefined;
1526
+ title?: string | undefined;
1527
+ detail?: string | undefined;
1528
+ source?: {
1529
+ pointer?: string | undefined;
1530
+ parameter?: string | undefined;
1531
+ } | undefined;
1532
+ }[];
1533
+ meta?: Record<string, unknown> | undefined;
1534
+ }, {
1535
+ errors: {
1536
+ status?: string | undefined;
1537
+ code?: string | undefined;
1538
+ id?: string | undefined;
1539
+ links?: {
1540
+ about?: string | undefined;
1541
+ } | undefined;
1542
+ meta?: Record<string, unknown> | undefined;
1543
+ title?: string | undefined;
1544
+ detail?: string | undefined;
1545
+ source?: {
1546
+ pointer?: string | undefined;
1547
+ parameter?: string | undefined;
1548
+ } | undefined;
1549
+ }[];
1550
+ meta?: Record<string, unknown> | undefined;
1551
+ }>;
1552
+ };
1553
+ };
1554
+ getField: {
1555
+ pathParams: z.ZodObject<{
1556
+ farmId: z.ZodString;
1557
+ id: z.ZodString;
1558
+ }, "strip", z.ZodTypeAny, {
1559
+ id: string;
1560
+ farmId: string;
1561
+ }, {
1562
+ id: string;
1563
+ farmId: string;
1564
+ }>;
1565
+ query: z.ZodObject<{
1566
+ include: z.ZodOptional<z.ZodString>;
1567
+ }, "strip", z.ZodTypeAny, {
1568
+ include?: string | undefined;
1569
+ }, {
1570
+ include?: string | undefined;
1571
+ }>;
1572
+ summary: "Get field by ID";
1573
+ description: "Get detailed information about a specific field";
1574
+ method: "GET";
1575
+ path: "/farms/:farmId/fields/:id";
1576
+ responses: {
1577
+ 200: z.ZodObject<{
1578
+ data: z.ZodObject<{
1579
+ type: z.ZodLiteral<string>;
1580
+ id: z.ZodString;
1581
+ attributes: z.ZodObject<{
1582
+ name: z.ZodString;
1583
+ geometry: z.ZodNullable<z.ZodObject<{
1584
+ type: z.ZodEnum<["Polygon", "MultiPolygon", "Point", "LineString"]>;
1585
+ coordinates: z.ZodUnion<[z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;
1586
+ }, "strip", z.ZodTypeAny, {
1587
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1588
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1589
+ }, {
1590
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1591
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1592
+ }>>;
1593
+ ndvi: z.ZodNullable<z.ZodNumber>;
1594
+ moisture: z.ZodNullable<z.ZodString>;
1595
+ status: z.ZodEnum<["ok", "alert", "critical"]>;
1596
+ area: z.ZodNullable<z.ZodString>;
1597
+ crop: z.ZodNullable<z.ZodString>;
1598
+ soilType: z.ZodNullable<z.ZodString>;
1599
+ currentCrop: z.ZodNullable<z.ZodString>;
1600
+ plantingDate: z.ZodNullable<z.ZodString>;
1601
+ expectedHarvestDate: z.ZodNullable<z.ZodString>;
1602
+ cropStage: z.ZodNullable<z.ZodEnum<["planted", "growing", "flowering", "mature", "harvested"]>>;
1603
+ historicalNdvi: z.ZodOptional<z.ZodArray<z.ZodObject<{
1604
+ date: z.ZodString;
1605
+ value: z.ZodNumber;
1606
+ }, "strip", z.ZodTypeAny, {
1607
+ value: number;
1608
+ date: string;
1609
+ }, {
1610
+ value: number;
1611
+ date: string;
1612
+ }>, "many">>;
1613
+ cropHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
1614
+ id: z.ZodString;
1615
+ season: z.ZodString;
1616
+ crop: z.ZodString;
1617
+ plantingDate: z.ZodString;
1618
+ harvestDate: z.ZodNullable<z.ZodString>;
1619
+ yield: z.ZodNullable<z.ZodNumber>;
1620
+ yieldUnit: z.ZodNullable<z.ZodString>;
1621
+ }, "strip", z.ZodTypeAny, {
1622
+ id: string;
1623
+ season: string;
1624
+ crop: string;
1625
+ plantingDate: string;
1626
+ harvestDate: string | null;
1627
+ yield: number | null;
1628
+ yieldUnit: string | null;
1629
+ }, {
1630
+ id: string;
1631
+ season: string;
1632
+ crop: string;
1633
+ plantingDate: string;
1634
+ harvestDate: string | null;
1635
+ yield: number | null;
1636
+ yieldUnit: string | null;
1637
+ }>, "many">>;
1638
+ } & {
1639
+ createdAt: z.ZodString;
1640
+ updatedAt: z.ZodString;
1641
+ }, "strip", z.ZodTypeAny, {
1642
+ status: "ok" | "alert" | "critical";
1643
+ createdAt: string;
1644
+ updatedAt: string;
1645
+ name: string;
1646
+ crop: string | null;
1647
+ plantingDate: string | null;
1648
+ geometry: {
1649
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1650
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1651
+ } | null;
1652
+ ndvi: number | null;
1653
+ moisture: string | null;
1654
+ area: string | null;
1655
+ soilType: string | null;
1656
+ currentCrop: string | null;
1657
+ expectedHarvestDate: string | null;
1658
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1659
+ historicalNdvi?: {
1660
+ value: number;
1661
+ date: string;
1662
+ }[] | undefined;
1663
+ cropHistory?: {
1664
+ id: string;
1665
+ season: string;
1666
+ crop: string;
1667
+ plantingDate: string;
1668
+ harvestDate: string | null;
1669
+ yield: number | null;
1670
+ yieldUnit: string | null;
1671
+ }[] | undefined;
1672
+ }, {
1673
+ status: "ok" | "alert" | "critical";
1674
+ createdAt: string;
1675
+ updatedAt: string;
1676
+ name: string;
1677
+ crop: string | null;
1678
+ plantingDate: string | null;
1679
+ geometry: {
1680
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1681
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1682
+ } | null;
1683
+ ndvi: number | null;
1684
+ moisture: string | null;
1685
+ area: string | null;
1686
+ soilType: string | null;
1687
+ currentCrop: string | null;
1688
+ expectedHarvestDate: string | null;
1689
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1690
+ historicalNdvi?: {
1691
+ value: number;
1692
+ date: string;
1693
+ }[] | undefined;
1694
+ cropHistory?: {
1695
+ id: string;
1696
+ season: string;
1697
+ crop: string;
1698
+ plantingDate: string;
1699
+ harvestDate: string | null;
1700
+ yield: number | null;
1701
+ yieldUnit: string | null;
1702
+ }[] | undefined;
1703
+ }>;
1704
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1705
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1706
+ } & {
1707
+ relationships: z.ZodOptional<z.ZodObject<{
1708
+ farm: z.ZodObject<{
1709
+ data: z.ZodObject<{
1710
+ type: z.ZodLiteral<"farms">;
1711
+ id: z.ZodString;
1712
+ }, "strip", z.ZodTypeAny, {
1713
+ type: "farms";
1714
+ id: string;
1715
+ }, {
1716
+ type: "farms";
1717
+ id: string;
1718
+ }>;
1719
+ links: z.ZodObject<{
1720
+ related: z.ZodString;
1721
+ }, "strip", z.ZodTypeAny, {
1722
+ related: string;
1723
+ }, {
1724
+ related: string;
1725
+ }>;
1726
+ }, "strip", z.ZodTypeAny, {
1727
+ links: {
1728
+ related: string;
1729
+ };
1730
+ data: {
1731
+ type: "farms";
1732
+ id: string;
1733
+ };
1734
+ }, {
1735
+ links: {
1736
+ related: string;
1737
+ };
1738
+ data: {
1739
+ type: "farms";
1740
+ id: string;
1741
+ };
1742
+ }>;
1743
+ tasks: z.ZodOptional<z.ZodObject<{
1744
+ meta: z.ZodObject<{
1745
+ count: z.ZodNumber;
1746
+ }, "strip", z.ZodTypeAny, {
1747
+ count: number;
1748
+ }, {
1749
+ count: number;
1750
+ }>;
1751
+ links: z.ZodObject<{
1752
+ related: z.ZodString;
1753
+ }, "strip", z.ZodTypeAny, {
1754
+ related: string;
1755
+ }, {
1756
+ related: string;
1757
+ }>;
1758
+ }, "strip", z.ZodTypeAny, {
1759
+ links: {
1760
+ related: string;
1761
+ };
1762
+ meta: {
1763
+ count: number;
1764
+ };
1765
+ }, {
1766
+ links: {
1767
+ related: string;
1768
+ };
1769
+ meta: {
1770
+ count: number;
1771
+ };
1772
+ }>>;
1773
+ harvests: z.ZodOptional<z.ZodObject<{
1774
+ meta: z.ZodObject<{
1775
+ count: z.ZodNumber;
1776
+ }, "strip", z.ZodTypeAny, {
1777
+ count: number;
1778
+ }, {
1779
+ count: number;
1780
+ }>;
1781
+ links: z.ZodObject<{
1782
+ related: z.ZodString;
1783
+ }, "strip", z.ZodTypeAny, {
1784
+ related: string;
1785
+ }, {
1786
+ related: string;
1787
+ }>;
1788
+ }, "strip", z.ZodTypeAny, {
1789
+ links: {
1790
+ related: string;
1791
+ };
1792
+ meta: {
1793
+ count: number;
1794
+ };
1795
+ }, {
1796
+ links: {
1797
+ related: string;
1798
+ };
1799
+ meta: {
1800
+ count: number;
1801
+ };
1802
+ }>>;
1803
+ soilTests: z.ZodOptional<z.ZodObject<{
1804
+ meta: z.ZodObject<{
1805
+ count: z.ZodNumber;
1806
+ }, "strip", z.ZodTypeAny, {
1807
+ count: number;
1808
+ }, {
1809
+ count: number;
1810
+ }>;
1811
+ links: z.ZodObject<{
1812
+ related: z.ZodString;
1813
+ }, "strip", z.ZodTypeAny, {
1814
+ related: string;
1815
+ }, {
1816
+ related: string;
1817
+ }>;
1818
+ }, "strip", z.ZodTypeAny, {
1819
+ links: {
1820
+ related: string;
1821
+ };
1822
+ meta: {
1823
+ count: number;
1824
+ };
1825
+ }, {
1826
+ links: {
1827
+ related: string;
1828
+ };
1829
+ meta: {
1830
+ count: number;
1831
+ };
1832
+ }>>;
1833
+ }, "strip", z.ZodTypeAny, {
1834
+ farm: {
1835
+ links: {
1836
+ related: string;
1837
+ };
1838
+ data: {
1839
+ type: "farms";
1840
+ id: string;
1841
+ };
1842
+ };
1843
+ tasks?: {
1844
+ links: {
1845
+ related: string;
1846
+ };
1847
+ meta: {
1848
+ count: number;
1849
+ };
1850
+ } | undefined;
1851
+ harvests?: {
1852
+ links: {
1853
+ related: string;
1854
+ };
1855
+ meta: {
1856
+ count: number;
1857
+ };
1858
+ } | undefined;
1859
+ soilTests?: {
1860
+ links: {
1861
+ related: string;
1862
+ };
1863
+ meta: {
1864
+ count: number;
1865
+ };
1866
+ } | undefined;
1867
+ }, {
1868
+ farm: {
1869
+ links: {
1870
+ related: string;
1871
+ };
1872
+ data: {
1873
+ type: "farms";
1874
+ id: string;
1875
+ };
1876
+ };
1877
+ tasks?: {
1878
+ links: {
1879
+ related: string;
1880
+ };
1881
+ meta: {
1882
+ count: number;
1883
+ };
1884
+ } | undefined;
1885
+ harvests?: {
1886
+ links: {
1887
+ related: string;
1888
+ };
1889
+ meta: {
1890
+ count: number;
1891
+ };
1892
+ } | undefined;
1893
+ soilTests?: {
1894
+ links: {
1895
+ related: string;
1896
+ };
1897
+ meta: {
1898
+ count: number;
1899
+ };
1900
+ } | undefined;
1901
+ }>>;
1902
+ }, "strip", z.ZodTypeAny, {
1903
+ type: string;
1904
+ id: string;
1905
+ attributes: {
1906
+ status: "ok" | "alert" | "critical";
1907
+ createdAt: string;
1908
+ updatedAt: string;
1909
+ name: string;
1910
+ crop: string | null;
1911
+ plantingDate: string | null;
1912
+ geometry: {
1913
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1914
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1915
+ } | null;
1916
+ ndvi: number | null;
1917
+ moisture: string | null;
1918
+ area: string | null;
1919
+ soilType: string | null;
1920
+ currentCrop: string | null;
1921
+ expectedHarvestDate: string | null;
1922
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1923
+ historicalNdvi?: {
1924
+ value: number;
1925
+ date: string;
1926
+ }[] | undefined;
1927
+ cropHistory?: {
1928
+ id: string;
1929
+ season: string;
1930
+ crop: string;
1931
+ plantingDate: string;
1932
+ harvestDate: string | null;
1933
+ yield: number | null;
1934
+ yieldUnit: string | null;
1935
+ }[] | undefined;
1936
+ };
1937
+ relationships?: {
1938
+ farm: {
1939
+ links: {
1940
+ related: string;
1941
+ };
1942
+ data: {
1943
+ type: "farms";
1944
+ id: string;
1945
+ };
1946
+ };
1947
+ tasks?: {
1948
+ links: {
1949
+ related: string;
1950
+ };
1951
+ meta: {
1952
+ count: number;
1953
+ };
1954
+ } | undefined;
1955
+ harvests?: {
1956
+ links: {
1957
+ related: string;
1958
+ };
1959
+ meta: {
1960
+ count: number;
1961
+ };
1962
+ } | undefined;
1963
+ soilTests?: {
1964
+ links: {
1965
+ related: string;
1966
+ };
1967
+ meta: {
1968
+ count: number;
1969
+ };
1970
+ } | undefined;
1971
+ } | undefined;
1972
+ links?: Record<string, string> | undefined;
1973
+ meta?: Record<string, unknown> | undefined;
1974
+ }, {
1975
+ type: string;
1976
+ id: string;
1977
+ attributes: {
1978
+ status: "ok" | "alert" | "critical";
1979
+ createdAt: string;
1980
+ updatedAt: string;
1981
+ name: string;
1982
+ crop: string | null;
1983
+ plantingDate: string | null;
1984
+ geometry: {
1985
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1986
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1987
+ } | null;
1988
+ ndvi: number | null;
1989
+ moisture: string | null;
1990
+ area: string | null;
1991
+ soilType: string | null;
1992
+ currentCrop: string | null;
1993
+ expectedHarvestDate: string | null;
1994
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
1995
+ historicalNdvi?: {
1996
+ value: number;
1997
+ date: string;
1998
+ }[] | undefined;
1999
+ cropHistory?: {
2000
+ id: string;
2001
+ season: string;
2002
+ crop: string;
2003
+ plantingDate: string;
2004
+ harvestDate: string | null;
2005
+ yield: number | null;
2006
+ yieldUnit: string | null;
2007
+ }[] | undefined;
2008
+ };
2009
+ relationships?: {
2010
+ farm: {
2011
+ links: {
2012
+ related: string;
2013
+ };
2014
+ data: {
2015
+ type: "farms";
2016
+ id: string;
2017
+ };
2018
+ };
2019
+ tasks?: {
2020
+ links: {
2021
+ related: string;
2022
+ };
2023
+ meta: {
2024
+ count: number;
2025
+ };
2026
+ } | undefined;
2027
+ harvests?: {
2028
+ links: {
2029
+ related: string;
2030
+ };
2031
+ meta: {
2032
+ count: number;
2033
+ };
2034
+ } | undefined;
2035
+ soilTests?: {
2036
+ links: {
2037
+ related: string;
2038
+ };
2039
+ meta: {
2040
+ count: number;
2041
+ };
2042
+ } | undefined;
2043
+ } | undefined;
2044
+ links?: Record<string, string> | undefined;
2045
+ meta?: Record<string, unknown> | undefined;
2046
+ }>;
2047
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
2048
+ type: z.ZodString;
2049
+ id: z.ZodString;
2050
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2051
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2052
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2053
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2054
+ }, "strip", z.ZodTypeAny, {
2055
+ type: string;
2056
+ id: string;
2057
+ attributes?: Record<string, unknown> | undefined;
2058
+ relationships?: Record<string, unknown> | undefined;
2059
+ links?: Record<string, string> | undefined;
2060
+ meta?: Record<string, unknown> | undefined;
2061
+ }, {
2062
+ type: string;
2063
+ id: string;
2064
+ attributes?: Record<string, unknown> | undefined;
2065
+ relationships?: Record<string, unknown> | undefined;
2066
+ links?: Record<string, string> | undefined;
2067
+ meta?: Record<string, unknown> | undefined;
2068
+ }>, "many">>;
2069
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2070
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2071
+ }, "strip", z.ZodTypeAny, {
2072
+ data: {
2073
+ type: string;
2074
+ id: string;
2075
+ attributes: {
2076
+ status: "ok" | "alert" | "critical";
2077
+ createdAt: string;
2078
+ updatedAt: string;
2079
+ name: string;
2080
+ crop: string | null;
2081
+ plantingDate: string | null;
2082
+ geometry: {
2083
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2084
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2085
+ } | null;
2086
+ ndvi: number | null;
2087
+ moisture: string | null;
2088
+ area: string | null;
2089
+ soilType: string | null;
2090
+ currentCrop: string | null;
2091
+ expectedHarvestDate: string | null;
2092
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2093
+ historicalNdvi?: {
2094
+ value: number;
2095
+ date: string;
2096
+ }[] | undefined;
2097
+ cropHistory?: {
2098
+ id: string;
2099
+ season: string;
2100
+ crop: string;
2101
+ plantingDate: string;
2102
+ harvestDate: string | null;
2103
+ yield: number | null;
2104
+ yieldUnit: string | null;
2105
+ }[] | undefined;
2106
+ };
2107
+ relationships?: {
2108
+ farm: {
2109
+ links: {
2110
+ related: string;
2111
+ };
2112
+ data: {
2113
+ type: "farms";
2114
+ id: string;
2115
+ };
2116
+ };
2117
+ tasks?: {
2118
+ links: {
2119
+ related: string;
2120
+ };
2121
+ meta: {
2122
+ count: number;
2123
+ };
2124
+ } | undefined;
2125
+ harvests?: {
2126
+ links: {
2127
+ related: string;
2128
+ };
2129
+ meta: {
2130
+ count: number;
2131
+ };
2132
+ } | undefined;
2133
+ soilTests?: {
2134
+ links: {
2135
+ related: string;
2136
+ };
2137
+ meta: {
2138
+ count: number;
2139
+ };
2140
+ } | undefined;
2141
+ } | undefined;
2142
+ links?: Record<string, string> | undefined;
2143
+ meta?: Record<string, unknown> | undefined;
2144
+ };
2145
+ links?: Record<string, string> | undefined;
2146
+ meta?: Record<string, unknown> | undefined;
2147
+ included?: {
2148
+ type: string;
2149
+ id: string;
2150
+ attributes?: Record<string, unknown> | undefined;
2151
+ relationships?: Record<string, unknown> | undefined;
2152
+ links?: Record<string, string> | undefined;
2153
+ meta?: Record<string, unknown> | undefined;
2154
+ }[] | undefined;
2155
+ }, {
2156
+ data: {
2157
+ type: string;
2158
+ id: string;
2159
+ attributes: {
2160
+ status: "ok" | "alert" | "critical";
2161
+ createdAt: string;
2162
+ updatedAt: string;
2163
+ name: string;
2164
+ crop: string | null;
2165
+ plantingDate: string | null;
2166
+ geometry: {
2167
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2168
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2169
+ } | null;
2170
+ ndvi: number | null;
2171
+ moisture: string | null;
2172
+ area: string | null;
2173
+ soilType: string | null;
2174
+ currentCrop: string | null;
2175
+ expectedHarvestDate: string | null;
2176
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2177
+ historicalNdvi?: {
2178
+ value: number;
2179
+ date: string;
2180
+ }[] | undefined;
2181
+ cropHistory?: {
2182
+ id: string;
2183
+ season: string;
2184
+ crop: string;
2185
+ plantingDate: string;
2186
+ harvestDate: string | null;
2187
+ yield: number | null;
2188
+ yieldUnit: string | null;
2189
+ }[] | undefined;
2190
+ };
2191
+ relationships?: {
2192
+ farm: {
2193
+ links: {
2194
+ related: string;
2195
+ };
2196
+ data: {
2197
+ type: "farms";
2198
+ id: string;
2199
+ };
2200
+ };
2201
+ tasks?: {
2202
+ links: {
2203
+ related: string;
2204
+ };
2205
+ meta: {
2206
+ count: number;
2207
+ };
2208
+ } | undefined;
2209
+ harvests?: {
2210
+ links: {
2211
+ related: string;
2212
+ };
2213
+ meta: {
2214
+ count: number;
2215
+ };
2216
+ } | undefined;
2217
+ soilTests?: {
2218
+ links: {
2219
+ related: string;
2220
+ };
2221
+ meta: {
2222
+ count: number;
2223
+ };
2224
+ } | undefined;
2225
+ } | undefined;
2226
+ links?: Record<string, string> | undefined;
2227
+ meta?: Record<string, unknown> | undefined;
2228
+ };
2229
+ links?: Record<string, string> | undefined;
2230
+ meta?: Record<string, unknown> | undefined;
2231
+ included?: {
2232
+ type: string;
2233
+ id: string;
2234
+ attributes?: Record<string, unknown> | undefined;
2235
+ relationships?: Record<string, unknown> | undefined;
2236
+ links?: Record<string, string> | undefined;
2237
+ meta?: Record<string, unknown> | undefined;
2238
+ }[] | undefined;
2239
+ }>;
2240
+ 404: z.ZodObject<{
2241
+ errors: z.ZodArray<z.ZodObject<{
2242
+ id: z.ZodOptional<z.ZodString>;
2243
+ links: z.ZodOptional<z.ZodObject<{
2244
+ about: z.ZodOptional<z.ZodString>;
2245
+ }, "strip", z.ZodTypeAny, {
2246
+ about?: string | undefined;
2247
+ }, {
2248
+ about?: string | undefined;
2249
+ }>>;
2250
+ status: z.ZodOptional<z.ZodString>;
2251
+ code: z.ZodOptional<z.ZodString>;
2252
+ title: z.ZodOptional<z.ZodString>;
2253
+ detail: z.ZodOptional<z.ZodString>;
2254
+ source: z.ZodOptional<z.ZodObject<{
2255
+ pointer: z.ZodOptional<z.ZodString>;
2256
+ parameter: z.ZodOptional<z.ZodString>;
2257
+ }, "strip", z.ZodTypeAny, {
2258
+ pointer?: string | undefined;
2259
+ parameter?: string | undefined;
2260
+ }, {
2261
+ pointer?: string | undefined;
2262
+ parameter?: string | undefined;
2263
+ }>>;
2264
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2265
+ }, "strip", z.ZodTypeAny, {
2266
+ status?: string | undefined;
2267
+ code?: string | undefined;
2268
+ id?: string | undefined;
2269
+ links?: {
2270
+ about?: string | undefined;
2271
+ } | undefined;
2272
+ meta?: Record<string, unknown> | undefined;
2273
+ title?: string | undefined;
2274
+ detail?: string | undefined;
2275
+ source?: {
2276
+ pointer?: string | undefined;
2277
+ parameter?: string | undefined;
2278
+ } | undefined;
2279
+ }, {
2280
+ status?: string | undefined;
2281
+ code?: string | undefined;
2282
+ id?: string | undefined;
2283
+ links?: {
2284
+ about?: string | undefined;
2285
+ } | undefined;
2286
+ meta?: Record<string, unknown> | undefined;
2287
+ title?: string | undefined;
2288
+ detail?: string | undefined;
2289
+ source?: {
2290
+ pointer?: string | undefined;
2291
+ parameter?: string | undefined;
2292
+ } | undefined;
2293
+ }>, "many">;
2294
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2295
+ }, "strip", z.ZodTypeAny, {
2296
+ errors: {
2297
+ status?: string | undefined;
2298
+ code?: string | undefined;
2299
+ id?: string | undefined;
2300
+ links?: {
2301
+ about?: string | undefined;
2302
+ } | undefined;
2303
+ meta?: Record<string, unknown> | undefined;
2304
+ title?: string | undefined;
2305
+ detail?: string | undefined;
2306
+ source?: {
2307
+ pointer?: string | undefined;
2308
+ parameter?: string | undefined;
2309
+ } | undefined;
2310
+ }[];
2311
+ meta?: Record<string, unknown> | undefined;
2312
+ }, {
2313
+ errors: {
2314
+ status?: string | undefined;
2315
+ code?: string | undefined;
2316
+ id?: string | undefined;
2317
+ links?: {
2318
+ about?: string | undefined;
2319
+ } | undefined;
2320
+ meta?: Record<string, unknown> | undefined;
2321
+ title?: string | undefined;
2322
+ detail?: string | undefined;
2323
+ source?: {
2324
+ pointer?: string | undefined;
2325
+ parameter?: string | undefined;
2326
+ } | undefined;
2327
+ }[];
2328
+ meta?: Record<string, unknown> | undefined;
2329
+ }>;
2330
+ 401: z.ZodObject<{
2331
+ errors: z.ZodArray<z.ZodObject<{
2332
+ id: z.ZodOptional<z.ZodString>;
2333
+ links: z.ZodOptional<z.ZodObject<{
2334
+ about: z.ZodOptional<z.ZodString>;
2335
+ }, "strip", z.ZodTypeAny, {
2336
+ about?: string | undefined;
2337
+ }, {
2338
+ about?: string | undefined;
2339
+ }>>;
2340
+ status: z.ZodOptional<z.ZodString>;
2341
+ code: z.ZodOptional<z.ZodString>;
2342
+ title: z.ZodOptional<z.ZodString>;
2343
+ detail: z.ZodOptional<z.ZodString>;
2344
+ source: z.ZodOptional<z.ZodObject<{
2345
+ pointer: z.ZodOptional<z.ZodString>;
2346
+ parameter: z.ZodOptional<z.ZodString>;
2347
+ }, "strip", z.ZodTypeAny, {
2348
+ pointer?: string | undefined;
2349
+ parameter?: string | undefined;
2350
+ }, {
2351
+ pointer?: string | undefined;
2352
+ parameter?: string | undefined;
2353
+ }>>;
2354
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2355
+ }, "strip", z.ZodTypeAny, {
2356
+ status?: string | undefined;
2357
+ code?: string | undefined;
2358
+ id?: string | undefined;
2359
+ links?: {
2360
+ about?: string | undefined;
2361
+ } | undefined;
2362
+ meta?: Record<string, unknown> | undefined;
2363
+ title?: string | undefined;
2364
+ detail?: string | undefined;
2365
+ source?: {
2366
+ pointer?: string | undefined;
2367
+ parameter?: string | undefined;
2368
+ } | undefined;
2369
+ }, {
2370
+ status?: string | undefined;
2371
+ code?: string | undefined;
2372
+ id?: string | undefined;
2373
+ links?: {
2374
+ about?: string | undefined;
2375
+ } | undefined;
2376
+ meta?: Record<string, unknown> | undefined;
2377
+ title?: string | undefined;
2378
+ detail?: string | undefined;
2379
+ source?: {
2380
+ pointer?: string | undefined;
2381
+ parameter?: string | undefined;
2382
+ } | undefined;
2383
+ }>, "many">;
2384
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2385
+ }, "strip", z.ZodTypeAny, {
2386
+ errors: {
2387
+ status?: string | undefined;
2388
+ code?: string | undefined;
2389
+ id?: string | undefined;
2390
+ links?: {
2391
+ about?: string | undefined;
2392
+ } | undefined;
2393
+ meta?: Record<string, unknown> | undefined;
2394
+ title?: string | undefined;
2395
+ detail?: string | undefined;
2396
+ source?: {
2397
+ pointer?: string | undefined;
2398
+ parameter?: string | undefined;
2399
+ } | undefined;
2400
+ }[];
2401
+ meta?: Record<string, unknown> | undefined;
2402
+ }, {
2403
+ errors: {
2404
+ status?: string | undefined;
2405
+ code?: string | undefined;
2406
+ id?: string | undefined;
2407
+ links?: {
2408
+ about?: string | undefined;
2409
+ } | undefined;
2410
+ meta?: Record<string, unknown> | undefined;
2411
+ title?: string | undefined;
2412
+ detail?: string | undefined;
2413
+ source?: {
2414
+ pointer?: string | undefined;
2415
+ parameter?: string | undefined;
2416
+ } | undefined;
2417
+ }[];
2418
+ meta?: Record<string, unknown> | undefined;
2419
+ }>;
2420
+ };
2421
+ };
2422
+ updateField: {
2423
+ pathParams: z.ZodObject<{
2424
+ farmId: z.ZodString;
2425
+ id: z.ZodString;
2426
+ }, "strip", z.ZodTypeAny, {
2427
+ id: string;
2428
+ farmId: string;
2429
+ }, {
2430
+ id: string;
2431
+ farmId: string;
2432
+ }>;
2433
+ summary: "Update field";
2434
+ description: "Update field information including geometry and crop lifecycle";
2435
+ method: "PATCH";
2436
+ body: z.ZodObject<{
2437
+ data: z.ZodObject<{
2438
+ type: z.ZodLiteral<"fields">;
2439
+ id: z.ZodString;
2440
+ attributes: z.ZodObject<{
2441
+ name: z.ZodOptional<z.ZodString>;
2442
+ geometry: z.ZodOptional<z.ZodOptional<z.ZodObject<{
2443
+ type: z.ZodEnum<["Polygon", "MultiPolygon", "Point", "LineString"]>;
2444
+ coordinates: z.ZodUnion<[z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;
2445
+ }, "strip", z.ZodTypeAny, {
2446
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2447
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2448
+ }, {
2449
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2450
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2451
+ }>>>;
2452
+ ndvi: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
2453
+ moisture: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2454
+ crop: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2455
+ soilType: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2456
+ currentCrop: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2457
+ plantingDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2458
+ expectedHarvestDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2459
+ cropStage: z.ZodOptional<z.ZodOptional<z.ZodEnum<["planted", "growing", "flowering", "mature", "harvested"]>>>;
2460
+ }, "strip", z.ZodTypeAny, {
2461
+ name?: string | undefined;
2462
+ crop?: string | undefined;
2463
+ plantingDate?: string | undefined;
2464
+ geometry?: {
2465
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2466
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2467
+ } | undefined;
2468
+ ndvi?: number | undefined;
2469
+ moisture?: string | undefined;
2470
+ soilType?: string | undefined;
2471
+ currentCrop?: string | undefined;
2472
+ expectedHarvestDate?: string | undefined;
2473
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
2474
+ }, {
2475
+ name?: string | undefined;
2476
+ crop?: string | undefined;
2477
+ plantingDate?: string | undefined;
2478
+ geometry?: {
2479
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2480
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2481
+ } | undefined;
2482
+ ndvi?: number | undefined;
2483
+ moisture?: string | undefined;
2484
+ soilType?: string | undefined;
2485
+ currentCrop?: string | undefined;
2486
+ expectedHarvestDate?: string | undefined;
2487
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
2488
+ }>;
2489
+ }, "strip", z.ZodTypeAny, {
2490
+ type: "fields";
2491
+ id: string;
2492
+ attributes: {
2493
+ name?: string | undefined;
2494
+ crop?: string | undefined;
2495
+ plantingDate?: string | undefined;
2496
+ geometry?: {
2497
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2498
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2499
+ } | undefined;
2500
+ ndvi?: number | undefined;
2501
+ moisture?: string | undefined;
2502
+ soilType?: string | undefined;
2503
+ currentCrop?: string | undefined;
2504
+ expectedHarvestDate?: string | undefined;
2505
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
2506
+ };
2507
+ }, {
2508
+ type: "fields";
2509
+ id: string;
2510
+ attributes: {
2511
+ name?: string | undefined;
2512
+ crop?: string | undefined;
2513
+ plantingDate?: string | undefined;
2514
+ geometry?: {
2515
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2516
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2517
+ } | undefined;
2518
+ ndvi?: number | undefined;
2519
+ moisture?: string | undefined;
2520
+ soilType?: string | undefined;
2521
+ currentCrop?: string | undefined;
2522
+ expectedHarvestDate?: string | undefined;
2523
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
2524
+ };
2525
+ }>;
2526
+ }, "strip", z.ZodTypeAny, {
2527
+ data: {
2528
+ type: "fields";
2529
+ id: string;
2530
+ attributes: {
2531
+ name?: string | undefined;
2532
+ crop?: string | undefined;
2533
+ plantingDate?: string | undefined;
2534
+ geometry?: {
2535
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2536
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2537
+ } | undefined;
2538
+ ndvi?: number | undefined;
2539
+ moisture?: string | undefined;
2540
+ soilType?: string | undefined;
2541
+ currentCrop?: string | undefined;
2542
+ expectedHarvestDate?: string | undefined;
2543
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
2544
+ };
2545
+ };
2546
+ }, {
2547
+ data: {
2548
+ type: "fields";
2549
+ id: string;
2550
+ attributes: {
2551
+ name?: string | undefined;
2552
+ crop?: string | undefined;
2553
+ plantingDate?: string | undefined;
2554
+ geometry?: {
2555
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2556
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2557
+ } | undefined;
2558
+ ndvi?: number | undefined;
2559
+ moisture?: string | undefined;
2560
+ soilType?: string | undefined;
2561
+ currentCrop?: string | undefined;
2562
+ expectedHarvestDate?: string | undefined;
2563
+ cropStage?: "planted" | "growing" | "flowering" | "mature" | "harvested" | undefined;
2564
+ };
2565
+ };
2566
+ }>;
2567
+ path: "/farms/:farmId/fields/:id";
2568
+ responses: {
2569
+ 200: z.ZodObject<{
2570
+ data: z.ZodObject<{
2571
+ type: z.ZodLiteral<string>;
2572
+ id: z.ZodString;
2573
+ attributes: z.ZodObject<{
2574
+ name: z.ZodString;
2575
+ geometry: z.ZodNullable<z.ZodObject<{
2576
+ type: z.ZodEnum<["Polygon", "MultiPolygon", "Point", "LineString"]>;
2577
+ coordinates: z.ZodUnion<[z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;
2578
+ }, "strip", z.ZodTypeAny, {
2579
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2580
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2581
+ }, {
2582
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2583
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2584
+ }>>;
2585
+ ndvi: z.ZodNullable<z.ZodNumber>;
2586
+ moisture: z.ZodNullable<z.ZodString>;
2587
+ status: z.ZodEnum<["ok", "alert", "critical"]>;
2588
+ area: z.ZodNullable<z.ZodString>;
2589
+ crop: z.ZodNullable<z.ZodString>;
2590
+ soilType: z.ZodNullable<z.ZodString>;
2591
+ currentCrop: z.ZodNullable<z.ZodString>;
2592
+ plantingDate: z.ZodNullable<z.ZodString>;
2593
+ expectedHarvestDate: z.ZodNullable<z.ZodString>;
2594
+ cropStage: z.ZodNullable<z.ZodEnum<["planted", "growing", "flowering", "mature", "harvested"]>>;
2595
+ historicalNdvi: z.ZodOptional<z.ZodArray<z.ZodObject<{
2596
+ date: z.ZodString;
2597
+ value: z.ZodNumber;
2598
+ }, "strip", z.ZodTypeAny, {
2599
+ value: number;
2600
+ date: string;
2601
+ }, {
2602
+ value: number;
2603
+ date: string;
2604
+ }>, "many">>;
2605
+ cropHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
2606
+ id: z.ZodString;
2607
+ season: z.ZodString;
2608
+ crop: z.ZodString;
2609
+ plantingDate: z.ZodString;
2610
+ harvestDate: z.ZodNullable<z.ZodString>;
2611
+ yield: z.ZodNullable<z.ZodNumber>;
2612
+ yieldUnit: z.ZodNullable<z.ZodString>;
2613
+ }, "strip", z.ZodTypeAny, {
2614
+ id: string;
2615
+ season: string;
2616
+ crop: string;
2617
+ plantingDate: string;
2618
+ harvestDate: string | null;
2619
+ yield: number | null;
2620
+ yieldUnit: string | null;
2621
+ }, {
2622
+ id: string;
2623
+ season: string;
2624
+ crop: string;
2625
+ plantingDate: string;
2626
+ harvestDate: string | null;
2627
+ yield: number | null;
2628
+ yieldUnit: string | null;
2629
+ }>, "many">>;
2630
+ } & {
2631
+ createdAt: z.ZodString;
2632
+ updatedAt: z.ZodString;
2633
+ }, "strip", z.ZodTypeAny, {
2634
+ status: "ok" | "alert" | "critical";
2635
+ createdAt: string;
2636
+ updatedAt: string;
2637
+ name: string;
2638
+ crop: string | null;
2639
+ plantingDate: string | null;
2640
+ geometry: {
2641
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2642
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2643
+ } | null;
2644
+ ndvi: number | null;
2645
+ moisture: string | null;
2646
+ area: string | null;
2647
+ soilType: string | null;
2648
+ currentCrop: string | null;
2649
+ expectedHarvestDate: string | null;
2650
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2651
+ historicalNdvi?: {
2652
+ value: number;
2653
+ date: string;
2654
+ }[] | undefined;
2655
+ cropHistory?: {
2656
+ id: string;
2657
+ season: string;
2658
+ crop: string;
2659
+ plantingDate: string;
2660
+ harvestDate: string | null;
2661
+ yield: number | null;
2662
+ yieldUnit: string | null;
2663
+ }[] | undefined;
2664
+ }, {
2665
+ status: "ok" | "alert" | "critical";
2666
+ createdAt: string;
2667
+ updatedAt: string;
2668
+ name: string;
2669
+ crop: string | null;
2670
+ plantingDate: string | null;
2671
+ geometry: {
2672
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2673
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2674
+ } | null;
2675
+ ndvi: number | null;
2676
+ moisture: string | null;
2677
+ area: string | null;
2678
+ soilType: string | null;
2679
+ currentCrop: string | null;
2680
+ expectedHarvestDate: string | null;
2681
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2682
+ historicalNdvi?: {
2683
+ value: number;
2684
+ date: string;
2685
+ }[] | undefined;
2686
+ cropHistory?: {
2687
+ id: string;
2688
+ season: string;
2689
+ crop: string;
2690
+ plantingDate: string;
2691
+ harvestDate: string | null;
2692
+ yield: number | null;
2693
+ yieldUnit: string | null;
2694
+ }[] | undefined;
2695
+ }>;
2696
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2697
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2698
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2699
+ }, "strip", z.ZodTypeAny, {
2700
+ type: string;
2701
+ id: string;
2702
+ attributes: {
2703
+ status: "ok" | "alert" | "critical";
2704
+ createdAt: string;
2705
+ updatedAt: string;
2706
+ name: string;
2707
+ crop: string | null;
2708
+ plantingDate: string | null;
2709
+ geometry: {
2710
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2711
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2712
+ } | null;
2713
+ ndvi: number | null;
2714
+ moisture: string | null;
2715
+ area: string | null;
2716
+ soilType: string | null;
2717
+ currentCrop: string | null;
2718
+ expectedHarvestDate: string | null;
2719
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2720
+ historicalNdvi?: {
2721
+ value: number;
2722
+ date: string;
2723
+ }[] | undefined;
2724
+ cropHistory?: {
2725
+ id: string;
2726
+ season: string;
2727
+ crop: string;
2728
+ plantingDate: string;
2729
+ harvestDate: string | null;
2730
+ yield: number | null;
2731
+ yieldUnit: string | null;
2732
+ }[] | undefined;
2733
+ };
2734
+ relationships?: Record<string, unknown> | undefined;
2735
+ links?: Record<string, string> | undefined;
2736
+ meta?: Record<string, unknown> | undefined;
2737
+ }, {
2738
+ type: string;
2739
+ id: string;
2740
+ attributes: {
2741
+ status: "ok" | "alert" | "critical";
2742
+ createdAt: string;
2743
+ updatedAt: string;
2744
+ name: string;
2745
+ crop: string | null;
2746
+ plantingDate: string | null;
2747
+ geometry: {
2748
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2749
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2750
+ } | null;
2751
+ ndvi: number | null;
2752
+ moisture: string | null;
2753
+ area: string | null;
2754
+ soilType: string | null;
2755
+ currentCrop: string | null;
2756
+ expectedHarvestDate: string | null;
2757
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2758
+ historicalNdvi?: {
2759
+ value: number;
2760
+ date: string;
2761
+ }[] | undefined;
2762
+ cropHistory?: {
2763
+ id: string;
2764
+ season: string;
2765
+ crop: string;
2766
+ plantingDate: string;
2767
+ harvestDate: string | null;
2768
+ yield: number | null;
2769
+ yieldUnit: string | null;
2770
+ }[] | undefined;
2771
+ };
2772
+ relationships?: Record<string, unknown> | undefined;
2773
+ links?: Record<string, string> | undefined;
2774
+ meta?: Record<string, unknown> | undefined;
2775
+ }>;
2776
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
2777
+ type: z.ZodString;
2778
+ id: z.ZodString;
2779
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2780
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2781
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2782
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2783
+ }, "strip", z.ZodTypeAny, {
2784
+ type: string;
2785
+ id: string;
2786
+ attributes?: Record<string, unknown> | undefined;
2787
+ relationships?: Record<string, unknown> | undefined;
2788
+ links?: Record<string, string> | undefined;
2789
+ meta?: Record<string, unknown> | undefined;
2790
+ }, {
2791
+ type: string;
2792
+ id: string;
2793
+ attributes?: Record<string, unknown> | undefined;
2794
+ relationships?: Record<string, unknown> | undefined;
2795
+ links?: Record<string, string> | undefined;
2796
+ meta?: Record<string, unknown> | undefined;
2797
+ }>, "many">>;
2798
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2799
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2800
+ }, "strip", z.ZodTypeAny, {
2801
+ data: {
2802
+ type: string;
2803
+ id: string;
2804
+ attributes: {
2805
+ status: "ok" | "alert" | "critical";
2806
+ createdAt: string;
2807
+ updatedAt: string;
2808
+ name: string;
2809
+ crop: string | null;
2810
+ plantingDate: string | null;
2811
+ geometry: {
2812
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2813
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2814
+ } | null;
2815
+ ndvi: number | null;
2816
+ moisture: string | null;
2817
+ area: string | null;
2818
+ soilType: string | null;
2819
+ currentCrop: string | null;
2820
+ expectedHarvestDate: string | null;
2821
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2822
+ historicalNdvi?: {
2823
+ value: number;
2824
+ date: string;
2825
+ }[] | undefined;
2826
+ cropHistory?: {
2827
+ id: string;
2828
+ season: string;
2829
+ crop: string;
2830
+ plantingDate: string;
2831
+ harvestDate: string | null;
2832
+ yield: number | null;
2833
+ yieldUnit: string | null;
2834
+ }[] | undefined;
2835
+ };
2836
+ relationships?: Record<string, unknown> | undefined;
2837
+ links?: Record<string, string> | undefined;
2838
+ meta?: Record<string, unknown> | undefined;
2839
+ };
2840
+ links?: Record<string, string> | undefined;
2841
+ meta?: Record<string, unknown> | undefined;
2842
+ included?: {
2843
+ type: string;
2844
+ id: string;
2845
+ attributes?: Record<string, unknown> | undefined;
2846
+ relationships?: Record<string, unknown> | undefined;
2847
+ links?: Record<string, string> | undefined;
2848
+ meta?: Record<string, unknown> | undefined;
2849
+ }[] | undefined;
2850
+ }, {
2851
+ data: {
2852
+ type: string;
2853
+ id: string;
2854
+ attributes: {
2855
+ status: "ok" | "alert" | "critical";
2856
+ createdAt: string;
2857
+ updatedAt: string;
2858
+ name: string;
2859
+ crop: string | null;
2860
+ plantingDate: string | null;
2861
+ geometry: {
2862
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2863
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2864
+ } | null;
2865
+ ndvi: number | null;
2866
+ moisture: string | null;
2867
+ area: string | null;
2868
+ soilType: string | null;
2869
+ currentCrop: string | null;
2870
+ expectedHarvestDate: string | null;
2871
+ cropStage: "planted" | "growing" | "flowering" | "mature" | "harvested" | null;
2872
+ historicalNdvi?: {
2873
+ value: number;
2874
+ date: string;
2875
+ }[] | undefined;
2876
+ cropHistory?: {
2877
+ id: string;
2878
+ season: string;
2879
+ crop: string;
2880
+ plantingDate: string;
2881
+ harvestDate: string | null;
2882
+ yield: number | null;
2883
+ yieldUnit: string | null;
2884
+ }[] | undefined;
2885
+ };
2886
+ relationships?: Record<string, unknown> | undefined;
2887
+ links?: Record<string, string> | undefined;
2888
+ meta?: Record<string, unknown> | undefined;
2889
+ };
2890
+ links?: Record<string, string> | undefined;
2891
+ meta?: Record<string, unknown> | undefined;
2892
+ included?: {
2893
+ type: string;
2894
+ id: string;
2895
+ attributes?: Record<string, unknown> | undefined;
2896
+ relationships?: Record<string, unknown> | undefined;
2897
+ links?: Record<string, string> | undefined;
2898
+ meta?: Record<string, unknown> | undefined;
2899
+ }[] | undefined;
2900
+ }>;
2901
+ 400: z.ZodObject<{
2902
+ errors: z.ZodArray<z.ZodObject<{
2903
+ id: z.ZodOptional<z.ZodString>;
2904
+ links: z.ZodOptional<z.ZodObject<{
2905
+ about: z.ZodOptional<z.ZodString>;
2906
+ }, "strip", z.ZodTypeAny, {
2907
+ about?: string | undefined;
2908
+ }, {
2909
+ about?: string | undefined;
2910
+ }>>;
2911
+ status: z.ZodOptional<z.ZodString>;
2912
+ code: z.ZodOptional<z.ZodString>;
2913
+ title: z.ZodOptional<z.ZodString>;
2914
+ detail: z.ZodOptional<z.ZodString>;
2915
+ source: z.ZodOptional<z.ZodObject<{
2916
+ pointer: z.ZodOptional<z.ZodString>;
2917
+ parameter: z.ZodOptional<z.ZodString>;
2918
+ }, "strip", z.ZodTypeAny, {
2919
+ pointer?: string | undefined;
2920
+ parameter?: string | undefined;
2921
+ }, {
2922
+ pointer?: string | undefined;
2923
+ parameter?: string | undefined;
2924
+ }>>;
2925
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2926
+ }, "strip", z.ZodTypeAny, {
2927
+ status?: string | undefined;
2928
+ code?: string | undefined;
2929
+ id?: string | undefined;
2930
+ links?: {
2931
+ about?: string | undefined;
2932
+ } | undefined;
2933
+ meta?: Record<string, unknown> | undefined;
2934
+ title?: string | undefined;
2935
+ detail?: string | undefined;
2936
+ source?: {
2937
+ pointer?: string | undefined;
2938
+ parameter?: string | undefined;
2939
+ } | undefined;
2940
+ }, {
2941
+ status?: string | undefined;
2942
+ code?: string | undefined;
2943
+ id?: string | undefined;
2944
+ links?: {
2945
+ about?: string | undefined;
2946
+ } | undefined;
2947
+ meta?: Record<string, unknown> | undefined;
2948
+ title?: string | undefined;
2949
+ detail?: string | undefined;
2950
+ source?: {
2951
+ pointer?: string | undefined;
2952
+ parameter?: string | undefined;
2953
+ } | undefined;
2954
+ }>, "many">;
2955
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2956
+ }, "strip", z.ZodTypeAny, {
2957
+ errors: {
2958
+ status?: string | undefined;
2959
+ code?: string | undefined;
2960
+ id?: string | undefined;
2961
+ links?: {
2962
+ about?: string | undefined;
2963
+ } | undefined;
2964
+ meta?: Record<string, unknown> | undefined;
2965
+ title?: string | undefined;
2966
+ detail?: string | undefined;
2967
+ source?: {
2968
+ pointer?: string | undefined;
2969
+ parameter?: string | undefined;
2970
+ } | undefined;
2971
+ }[];
2972
+ meta?: Record<string, unknown> | undefined;
2973
+ }, {
2974
+ errors: {
2975
+ status?: string | undefined;
2976
+ code?: string | undefined;
2977
+ id?: string | undefined;
2978
+ links?: {
2979
+ about?: string | undefined;
2980
+ } | undefined;
2981
+ meta?: Record<string, unknown> | undefined;
2982
+ title?: string | undefined;
2983
+ detail?: string | undefined;
2984
+ source?: {
2985
+ pointer?: string | undefined;
2986
+ parameter?: string | undefined;
2987
+ } | undefined;
2988
+ }[];
2989
+ meta?: Record<string, unknown> | undefined;
2990
+ }>;
2991
+ 404: z.ZodObject<{
2992
+ errors: z.ZodArray<z.ZodObject<{
2993
+ id: z.ZodOptional<z.ZodString>;
2994
+ links: z.ZodOptional<z.ZodObject<{
2995
+ about: z.ZodOptional<z.ZodString>;
2996
+ }, "strip", z.ZodTypeAny, {
2997
+ about?: string | undefined;
2998
+ }, {
2999
+ about?: string | undefined;
3000
+ }>>;
3001
+ status: z.ZodOptional<z.ZodString>;
3002
+ code: z.ZodOptional<z.ZodString>;
3003
+ title: z.ZodOptional<z.ZodString>;
3004
+ detail: z.ZodOptional<z.ZodString>;
3005
+ source: z.ZodOptional<z.ZodObject<{
3006
+ pointer: z.ZodOptional<z.ZodString>;
3007
+ parameter: z.ZodOptional<z.ZodString>;
3008
+ }, "strip", z.ZodTypeAny, {
3009
+ pointer?: string | undefined;
3010
+ parameter?: string | undefined;
3011
+ }, {
3012
+ pointer?: string | undefined;
3013
+ parameter?: string | undefined;
3014
+ }>>;
3015
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3016
+ }, "strip", z.ZodTypeAny, {
3017
+ status?: string | undefined;
3018
+ code?: string | undefined;
3019
+ id?: string | undefined;
3020
+ links?: {
3021
+ about?: string | undefined;
3022
+ } | undefined;
3023
+ meta?: Record<string, unknown> | undefined;
3024
+ title?: string | undefined;
3025
+ detail?: string | undefined;
3026
+ source?: {
3027
+ pointer?: string | undefined;
3028
+ parameter?: string | undefined;
3029
+ } | undefined;
3030
+ }, {
3031
+ status?: string | undefined;
3032
+ code?: string | undefined;
3033
+ id?: string | undefined;
3034
+ links?: {
3035
+ about?: string | undefined;
3036
+ } | undefined;
3037
+ meta?: Record<string, unknown> | undefined;
3038
+ title?: string | undefined;
3039
+ detail?: string | undefined;
3040
+ source?: {
3041
+ pointer?: string | undefined;
3042
+ parameter?: string | undefined;
3043
+ } | undefined;
3044
+ }>, "many">;
3045
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3046
+ }, "strip", z.ZodTypeAny, {
3047
+ errors: {
3048
+ status?: string | undefined;
3049
+ code?: string | undefined;
3050
+ id?: string | undefined;
3051
+ links?: {
3052
+ about?: string | undefined;
3053
+ } | undefined;
3054
+ meta?: Record<string, unknown> | undefined;
3055
+ title?: string | undefined;
3056
+ detail?: string | undefined;
3057
+ source?: {
3058
+ pointer?: string | undefined;
3059
+ parameter?: string | undefined;
3060
+ } | undefined;
3061
+ }[];
3062
+ meta?: Record<string, unknown> | undefined;
3063
+ }, {
3064
+ errors: {
3065
+ status?: string | undefined;
3066
+ code?: string | undefined;
3067
+ id?: string | undefined;
3068
+ links?: {
3069
+ about?: string | undefined;
3070
+ } | undefined;
3071
+ meta?: Record<string, unknown> | undefined;
3072
+ title?: string | undefined;
3073
+ detail?: string | undefined;
3074
+ source?: {
3075
+ pointer?: string | undefined;
3076
+ parameter?: string | undefined;
3077
+ } | undefined;
3078
+ }[];
3079
+ meta?: Record<string, unknown> | undefined;
3080
+ }>;
3081
+ 401: z.ZodObject<{
3082
+ errors: z.ZodArray<z.ZodObject<{
3083
+ id: z.ZodOptional<z.ZodString>;
3084
+ links: z.ZodOptional<z.ZodObject<{
3085
+ about: z.ZodOptional<z.ZodString>;
3086
+ }, "strip", z.ZodTypeAny, {
3087
+ about?: string | undefined;
3088
+ }, {
3089
+ about?: string | undefined;
3090
+ }>>;
3091
+ status: z.ZodOptional<z.ZodString>;
3092
+ code: z.ZodOptional<z.ZodString>;
3093
+ title: z.ZodOptional<z.ZodString>;
3094
+ detail: z.ZodOptional<z.ZodString>;
3095
+ source: z.ZodOptional<z.ZodObject<{
3096
+ pointer: z.ZodOptional<z.ZodString>;
3097
+ parameter: z.ZodOptional<z.ZodString>;
3098
+ }, "strip", z.ZodTypeAny, {
3099
+ pointer?: string | undefined;
3100
+ parameter?: string | undefined;
3101
+ }, {
3102
+ pointer?: string | undefined;
3103
+ parameter?: string | undefined;
3104
+ }>>;
3105
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3106
+ }, "strip", z.ZodTypeAny, {
3107
+ status?: string | undefined;
3108
+ code?: string | undefined;
3109
+ id?: string | undefined;
3110
+ links?: {
3111
+ about?: string | undefined;
3112
+ } | undefined;
3113
+ meta?: Record<string, unknown> | undefined;
3114
+ title?: string | undefined;
3115
+ detail?: string | undefined;
3116
+ source?: {
3117
+ pointer?: string | undefined;
3118
+ parameter?: string | undefined;
3119
+ } | undefined;
3120
+ }, {
3121
+ status?: string | undefined;
3122
+ code?: string | undefined;
3123
+ id?: string | undefined;
3124
+ links?: {
3125
+ about?: string | undefined;
3126
+ } | undefined;
3127
+ meta?: Record<string, unknown> | undefined;
3128
+ title?: string | undefined;
3129
+ detail?: string | undefined;
3130
+ source?: {
3131
+ pointer?: string | undefined;
3132
+ parameter?: string | undefined;
3133
+ } | undefined;
3134
+ }>, "many">;
3135
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3136
+ }, "strip", z.ZodTypeAny, {
3137
+ errors: {
3138
+ status?: string | undefined;
3139
+ code?: string | undefined;
3140
+ id?: string | undefined;
3141
+ links?: {
3142
+ about?: string | undefined;
3143
+ } | undefined;
3144
+ meta?: Record<string, unknown> | undefined;
3145
+ title?: string | undefined;
3146
+ detail?: string | undefined;
3147
+ source?: {
3148
+ pointer?: string | undefined;
3149
+ parameter?: string | undefined;
3150
+ } | undefined;
3151
+ }[];
3152
+ meta?: Record<string, unknown> | undefined;
3153
+ }, {
3154
+ errors: {
3155
+ status?: string | undefined;
3156
+ code?: string | undefined;
3157
+ id?: string | undefined;
3158
+ links?: {
3159
+ about?: string | undefined;
3160
+ } | undefined;
3161
+ meta?: Record<string, unknown> | undefined;
3162
+ title?: string | undefined;
3163
+ detail?: string | undefined;
3164
+ source?: {
3165
+ pointer?: string | undefined;
3166
+ parameter?: string | undefined;
3167
+ } | undefined;
3168
+ }[];
3169
+ meta?: Record<string, unknown> | undefined;
3170
+ }>;
3171
+ 422: z.ZodObject<{
3172
+ errors: z.ZodArray<z.ZodObject<{
3173
+ id: z.ZodOptional<z.ZodString>;
3174
+ links: z.ZodOptional<z.ZodObject<{
3175
+ about: z.ZodOptional<z.ZodString>;
3176
+ }, "strip", z.ZodTypeAny, {
3177
+ about?: string | undefined;
3178
+ }, {
3179
+ about?: string | undefined;
3180
+ }>>;
3181
+ status: z.ZodOptional<z.ZodString>;
3182
+ code: z.ZodOptional<z.ZodString>;
3183
+ title: z.ZodOptional<z.ZodString>;
3184
+ detail: z.ZodOptional<z.ZodString>;
3185
+ source: z.ZodOptional<z.ZodObject<{
3186
+ pointer: z.ZodOptional<z.ZodString>;
3187
+ parameter: z.ZodOptional<z.ZodString>;
3188
+ }, "strip", z.ZodTypeAny, {
3189
+ pointer?: string | undefined;
3190
+ parameter?: string | undefined;
3191
+ }, {
3192
+ pointer?: string | undefined;
3193
+ parameter?: string | undefined;
3194
+ }>>;
3195
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3196
+ }, "strip", z.ZodTypeAny, {
3197
+ status?: string | undefined;
3198
+ code?: string | undefined;
3199
+ id?: string | undefined;
3200
+ links?: {
3201
+ about?: string | undefined;
3202
+ } | undefined;
3203
+ meta?: Record<string, unknown> | undefined;
3204
+ title?: string | undefined;
3205
+ detail?: string | undefined;
3206
+ source?: {
3207
+ pointer?: string | undefined;
3208
+ parameter?: string | undefined;
3209
+ } | undefined;
3210
+ }, {
3211
+ status?: string | undefined;
3212
+ code?: string | undefined;
3213
+ id?: string | undefined;
3214
+ links?: {
3215
+ about?: string | undefined;
3216
+ } | undefined;
3217
+ meta?: Record<string, unknown> | undefined;
3218
+ title?: string | undefined;
3219
+ detail?: string | undefined;
3220
+ source?: {
3221
+ pointer?: string | undefined;
3222
+ parameter?: string | undefined;
3223
+ } | undefined;
3224
+ }>, "many">;
3225
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3226
+ }, "strip", z.ZodTypeAny, {
3227
+ errors: {
3228
+ status?: string | undefined;
3229
+ code?: string | undefined;
3230
+ id?: string | undefined;
3231
+ links?: {
3232
+ about?: string | undefined;
3233
+ } | undefined;
3234
+ meta?: Record<string, unknown> | undefined;
3235
+ title?: string | undefined;
3236
+ detail?: string | undefined;
3237
+ source?: {
3238
+ pointer?: string | undefined;
3239
+ parameter?: string | undefined;
3240
+ } | undefined;
3241
+ }[];
3242
+ meta?: Record<string, unknown> | undefined;
3243
+ }, {
3244
+ errors: {
3245
+ status?: string | undefined;
3246
+ code?: string | undefined;
3247
+ id?: string | undefined;
3248
+ links?: {
3249
+ about?: string | undefined;
3250
+ } | undefined;
3251
+ meta?: Record<string, unknown> | undefined;
3252
+ title?: string | undefined;
3253
+ detail?: string | undefined;
3254
+ source?: {
3255
+ pointer?: string | undefined;
3256
+ parameter?: string | undefined;
3257
+ } | undefined;
3258
+ }[];
3259
+ meta?: Record<string, unknown> | undefined;
3260
+ }>;
3261
+ };
3262
+ };
3263
+ deleteField: {
3264
+ pathParams: z.ZodObject<{
3265
+ farmId: z.ZodString;
3266
+ id: z.ZodString;
3267
+ }, "strip", z.ZodTypeAny, {
3268
+ id: string;
3269
+ farmId: string;
3270
+ }, {
3271
+ id: string;
3272
+ farmId: string;
3273
+ }>;
3274
+ summary: "Delete field";
3275
+ description: "Delete a field and all associated data";
3276
+ method: "DELETE";
3277
+ path: "/farms/:farmId/fields/:id";
3278
+ responses: {
3279
+ 204: z.ZodObject<{
3280
+ meta: z.ZodObject<{
3281
+ message: z.ZodString;
3282
+ }, "strip", z.ZodTypeAny, {
3283
+ message: string;
3284
+ }, {
3285
+ message: string;
3286
+ }>;
3287
+ }, "strip", z.ZodTypeAny, {
3288
+ meta: {
3289
+ message: string;
3290
+ };
3291
+ }, {
3292
+ meta: {
3293
+ message: string;
3294
+ };
3295
+ }>;
3296
+ 404: z.ZodObject<{
3297
+ errors: z.ZodArray<z.ZodObject<{
3298
+ id: z.ZodOptional<z.ZodString>;
3299
+ links: z.ZodOptional<z.ZodObject<{
3300
+ about: z.ZodOptional<z.ZodString>;
3301
+ }, "strip", z.ZodTypeAny, {
3302
+ about?: string | undefined;
3303
+ }, {
3304
+ about?: string | undefined;
3305
+ }>>;
3306
+ status: z.ZodOptional<z.ZodString>;
3307
+ code: z.ZodOptional<z.ZodString>;
3308
+ title: z.ZodOptional<z.ZodString>;
3309
+ detail: z.ZodOptional<z.ZodString>;
3310
+ source: z.ZodOptional<z.ZodObject<{
3311
+ pointer: z.ZodOptional<z.ZodString>;
3312
+ parameter: z.ZodOptional<z.ZodString>;
3313
+ }, "strip", z.ZodTypeAny, {
3314
+ pointer?: string | undefined;
3315
+ parameter?: string | undefined;
3316
+ }, {
3317
+ pointer?: string | undefined;
3318
+ parameter?: string | undefined;
3319
+ }>>;
3320
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3321
+ }, "strip", z.ZodTypeAny, {
3322
+ status?: string | undefined;
3323
+ code?: string | undefined;
3324
+ id?: string | undefined;
3325
+ links?: {
3326
+ about?: string | undefined;
3327
+ } | undefined;
3328
+ meta?: Record<string, unknown> | undefined;
3329
+ title?: string | undefined;
3330
+ detail?: string | undefined;
3331
+ source?: {
3332
+ pointer?: string | undefined;
3333
+ parameter?: string | undefined;
3334
+ } | undefined;
3335
+ }, {
3336
+ status?: string | undefined;
3337
+ code?: string | undefined;
3338
+ id?: string | undefined;
3339
+ links?: {
3340
+ about?: string | undefined;
3341
+ } | undefined;
3342
+ meta?: Record<string, unknown> | undefined;
3343
+ title?: string | undefined;
3344
+ detail?: string | undefined;
3345
+ source?: {
3346
+ pointer?: string | undefined;
3347
+ parameter?: string | undefined;
3348
+ } | undefined;
3349
+ }>, "many">;
3350
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3351
+ }, "strip", z.ZodTypeAny, {
3352
+ errors: {
3353
+ status?: string | undefined;
3354
+ code?: string | undefined;
3355
+ id?: string | undefined;
3356
+ links?: {
3357
+ about?: string | undefined;
3358
+ } | undefined;
3359
+ meta?: Record<string, unknown> | undefined;
3360
+ title?: string | undefined;
3361
+ detail?: string | undefined;
3362
+ source?: {
3363
+ pointer?: string | undefined;
3364
+ parameter?: string | undefined;
3365
+ } | undefined;
3366
+ }[];
3367
+ meta?: Record<string, unknown> | undefined;
3368
+ }, {
3369
+ errors: {
3370
+ status?: string | undefined;
3371
+ code?: string | undefined;
3372
+ id?: string | undefined;
3373
+ links?: {
3374
+ about?: string | undefined;
3375
+ } | undefined;
3376
+ meta?: Record<string, unknown> | undefined;
3377
+ title?: string | undefined;
3378
+ detail?: string | undefined;
3379
+ source?: {
3380
+ pointer?: string | undefined;
3381
+ parameter?: string | undefined;
3382
+ } | undefined;
3383
+ }[];
3384
+ meta?: Record<string, unknown> | undefined;
3385
+ }>;
3386
+ 401: z.ZodObject<{
3387
+ errors: z.ZodArray<z.ZodObject<{
3388
+ id: z.ZodOptional<z.ZodString>;
3389
+ links: z.ZodOptional<z.ZodObject<{
3390
+ about: z.ZodOptional<z.ZodString>;
3391
+ }, "strip", z.ZodTypeAny, {
3392
+ about?: string | undefined;
3393
+ }, {
3394
+ about?: string | undefined;
3395
+ }>>;
3396
+ status: z.ZodOptional<z.ZodString>;
3397
+ code: z.ZodOptional<z.ZodString>;
3398
+ title: z.ZodOptional<z.ZodString>;
3399
+ detail: z.ZodOptional<z.ZodString>;
3400
+ source: z.ZodOptional<z.ZodObject<{
3401
+ pointer: z.ZodOptional<z.ZodString>;
3402
+ parameter: z.ZodOptional<z.ZodString>;
3403
+ }, "strip", z.ZodTypeAny, {
3404
+ pointer?: string | undefined;
3405
+ parameter?: string | undefined;
3406
+ }, {
3407
+ pointer?: string | undefined;
3408
+ parameter?: string | undefined;
3409
+ }>>;
3410
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3411
+ }, "strip", z.ZodTypeAny, {
3412
+ status?: string | undefined;
3413
+ code?: string | undefined;
3414
+ id?: string | undefined;
3415
+ links?: {
3416
+ about?: string | undefined;
3417
+ } | undefined;
3418
+ meta?: Record<string, unknown> | undefined;
3419
+ title?: string | undefined;
3420
+ detail?: string | undefined;
3421
+ source?: {
3422
+ pointer?: string | undefined;
3423
+ parameter?: string | undefined;
3424
+ } | undefined;
3425
+ }, {
3426
+ status?: string | undefined;
3427
+ code?: string | undefined;
3428
+ id?: string | undefined;
3429
+ links?: {
3430
+ about?: string | undefined;
3431
+ } | undefined;
3432
+ meta?: Record<string, unknown> | undefined;
3433
+ title?: string | undefined;
3434
+ detail?: string | undefined;
3435
+ source?: {
3436
+ pointer?: string | undefined;
3437
+ parameter?: string | undefined;
3438
+ } | undefined;
3439
+ }>, "many">;
3440
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3441
+ }, "strip", z.ZodTypeAny, {
3442
+ errors: {
3443
+ status?: string | undefined;
3444
+ code?: string | undefined;
3445
+ id?: string | undefined;
3446
+ links?: {
3447
+ about?: string | undefined;
3448
+ } | undefined;
3449
+ meta?: Record<string, unknown> | undefined;
3450
+ title?: string | undefined;
3451
+ detail?: string | undefined;
3452
+ source?: {
3453
+ pointer?: string | undefined;
3454
+ parameter?: string | undefined;
3455
+ } | undefined;
3456
+ }[];
3457
+ meta?: Record<string, unknown> | undefined;
3458
+ }, {
3459
+ errors: {
3460
+ status?: string | undefined;
3461
+ code?: string | undefined;
3462
+ id?: string | undefined;
3463
+ links?: {
3464
+ about?: string | undefined;
3465
+ } | undefined;
3466
+ meta?: Record<string, unknown> | undefined;
3467
+ title?: string | undefined;
3468
+ detail?: string | undefined;
3469
+ source?: {
3470
+ pointer?: string | undefined;
3471
+ parameter?: string | undefined;
3472
+ } | undefined;
3473
+ }[];
3474
+ meta?: Record<string, unknown> | undefined;
3475
+ }>;
3476
+ };
3477
+ };
3478
+ };
3479
+ //# sourceMappingURL=fields.routes.d.ts.map