@deepintel-ltd/farmpro-contracts 1.7.1 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2880 @@
1
+ import { z } from 'zod';
2
+ export declare const monitoringVisualizationRouter: {
3
+ getSatelliteImagery: {
4
+ query: z.ZodObject<{
5
+ date: z.ZodOptional<z.ZodString>;
6
+ resolution: z.ZodDefault<z.ZodEnum<["low", "medium", "high"]>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ resolution: "low" | "medium" | "high";
9
+ date?: string | undefined;
10
+ }, {
11
+ date?: string | undefined;
12
+ resolution?: "low" | "medium" | "high" | undefined;
13
+ }>;
14
+ summary: "Get satellite imagery for field visualization";
15
+ method: "GET";
16
+ path: "/farms/:farmId/fields/:fieldId/visualization/imagery/satellite";
17
+ responses: {
18
+ 200: z.ZodObject<{
19
+ fieldId: z.ZodString;
20
+ imageUrl: z.ZodString;
21
+ captureDate: z.ZodString;
22
+ resolution: z.ZodString;
23
+ cloudCoverage: z.ZodNumber;
24
+ source: z.ZodEnum<["sentinel-2", "landsat-8", "openweather-agro"]>;
25
+ bounds: z.ZodObject<{
26
+ north: z.ZodNumber;
27
+ south: z.ZodNumber;
28
+ east: z.ZodNumber;
29
+ west: z.ZodNumber;
30
+ }, "strip", z.ZodTypeAny, {
31
+ north: number;
32
+ south: number;
33
+ east: number;
34
+ west: number;
35
+ }, {
36
+ north: number;
37
+ south: number;
38
+ east: number;
39
+ west: number;
40
+ }>;
41
+ metadata: z.ZodOptional<z.ZodObject<{
42
+ processingLevel: z.ZodOptional<z.ZodString>;
43
+ sunAzimuth: z.ZodOptional<z.ZodNumber>;
44
+ sunElevation: z.ZodOptional<z.ZodNumber>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ processingLevel?: string | undefined;
47
+ sunAzimuth?: number | undefined;
48
+ sunElevation?: number | undefined;
49
+ }, {
50
+ processingLevel?: string | undefined;
51
+ sunAzimuth?: number | undefined;
52
+ sunElevation?: number | undefined;
53
+ }>>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ source: "sentinel-2" | "landsat-8" | "openweather-agro";
56
+ fieldId: string;
57
+ cloudCoverage: number;
58
+ resolution: string;
59
+ imageUrl: string;
60
+ captureDate: string;
61
+ bounds: {
62
+ north: number;
63
+ south: number;
64
+ east: number;
65
+ west: number;
66
+ };
67
+ metadata?: {
68
+ processingLevel?: string | undefined;
69
+ sunAzimuth?: number | undefined;
70
+ sunElevation?: number | undefined;
71
+ } | undefined;
72
+ }, {
73
+ source: "sentinel-2" | "landsat-8" | "openweather-agro";
74
+ fieldId: string;
75
+ cloudCoverage: number;
76
+ resolution: string;
77
+ imageUrl: string;
78
+ captureDate: string;
79
+ bounds: {
80
+ north: number;
81
+ south: number;
82
+ east: number;
83
+ west: number;
84
+ };
85
+ metadata?: {
86
+ processingLevel?: string | undefined;
87
+ sunAzimuth?: number | undefined;
88
+ sunElevation?: number | undefined;
89
+ } | undefined;
90
+ }>;
91
+ 404: z.ZodObject<{
92
+ message: z.ZodString;
93
+ code: z.ZodString;
94
+ }, "strip", z.ZodTypeAny, {
95
+ code: string;
96
+ message: string;
97
+ }, {
98
+ code: string;
99
+ message: string;
100
+ }>;
101
+ 503: z.ZodObject<{
102
+ message: z.ZodString;
103
+ code: z.ZodString;
104
+ }, "strip", z.ZodTypeAny, {
105
+ code: string;
106
+ message: string;
107
+ }, {
108
+ code: string;
109
+ message: string;
110
+ }>;
111
+ };
112
+ };
113
+ getNdviHeatmap: {
114
+ query: z.ZodObject<{
115
+ date: z.ZodOptional<z.ZodString>;
116
+ colorPalette: z.ZodDefault<z.ZodEnum<["standard", "detailed", "grayscale"]>>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ colorPalette: "standard" | "detailed" | "grayscale";
119
+ date?: string | undefined;
120
+ }, {
121
+ date?: string | undefined;
122
+ colorPalette?: "standard" | "detailed" | "grayscale" | undefined;
123
+ }>;
124
+ summary: "Get NDVI heatmap overlay for field";
125
+ method: "GET";
126
+ path: "/farms/:farmId/fields/:fieldId/visualization/imagery/ndvi";
127
+ responses: {
128
+ 200: z.ZodObject<{
129
+ fieldId: z.ZodString;
130
+ ndviImageUrl: z.ZodString;
131
+ captureDate: z.ZodString;
132
+ statistics: z.ZodObject<{
133
+ min: z.ZodNumber;
134
+ max: z.ZodNumber;
135
+ mean: z.ZodNumber;
136
+ median: z.ZodNumber;
137
+ stdDev: z.ZodNumber;
138
+ }, "strip", z.ZodTypeAny, {
139
+ min: number;
140
+ max: number;
141
+ mean: number;
142
+ median: number;
143
+ stdDev: number;
144
+ }, {
145
+ min: number;
146
+ max: number;
147
+ mean: number;
148
+ median: number;
149
+ stdDev: number;
150
+ }>;
151
+ colorScale: z.ZodArray<z.ZodObject<{
152
+ value: z.ZodNumber;
153
+ color: z.ZodString;
154
+ label: z.ZodString;
155
+ }, "strip", z.ZodTypeAny, {
156
+ value: number;
157
+ color: string;
158
+ label: string;
159
+ }, {
160
+ value: number;
161
+ color: string;
162
+ label: string;
163
+ }>, "many">;
164
+ source: z.ZodString;
165
+ }, "strip", z.ZodTypeAny, {
166
+ source: string;
167
+ fieldId: string;
168
+ captureDate: string;
169
+ ndviImageUrl: string;
170
+ statistics: {
171
+ min: number;
172
+ max: number;
173
+ mean: number;
174
+ median: number;
175
+ stdDev: number;
176
+ };
177
+ colorScale: {
178
+ value: number;
179
+ color: string;
180
+ label: string;
181
+ }[];
182
+ }, {
183
+ source: string;
184
+ fieldId: string;
185
+ captureDate: string;
186
+ ndviImageUrl: string;
187
+ statistics: {
188
+ min: number;
189
+ max: number;
190
+ mean: number;
191
+ median: number;
192
+ stdDev: number;
193
+ };
194
+ colorScale: {
195
+ value: number;
196
+ color: string;
197
+ label: string;
198
+ }[];
199
+ }>;
200
+ 404: z.ZodObject<{
201
+ message: z.ZodString;
202
+ code: z.ZodString;
203
+ }, "strip", z.ZodTypeAny, {
204
+ code: string;
205
+ message: string;
206
+ }, {
207
+ code: string;
208
+ message: string;
209
+ }>;
210
+ 503: z.ZodObject<{
211
+ message: z.ZodString;
212
+ code: z.ZodString;
213
+ }, "strip", z.ZodTypeAny, {
214
+ code: string;
215
+ message: string;
216
+ }, {
217
+ code: string;
218
+ message: string;
219
+ }>;
220
+ };
221
+ };
222
+ getSoilMoistureHeatmap: {
223
+ summary: "Get soil moisture heatmap data for field";
224
+ method: "GET";
225
+ path: "/farms/:farmId/fields/:fieldId/visualization/imagery/soil-moisture";
226
+ responses: {
227
+ 200: z.ZodObject<{
228
+ fieldId: z.ZodString;
229
+ moistureImageUrl: z.ZodNullable<z.ZodString>;
230
+ readingDate: z.ZodString;
231
+ hasRasterData: z.ZodBoolean;
232
+ statistics: z.ZodNullable<z.ZodObject<{
233
+ min: z.ZodNumber;
234
+ max: z.ZodNumber;
235
+ mean: z.ZodNumber;
236
+ }, "strip", z.ZodTypeAny, {
237
+ min: number;
238
+ max: number;
239
+ mean: number;
240
+ }, {
241
+ min: number;
242
+ max: number;
243
+ mean: number;
244
+ }>>;
245
+ moistureData: z.ZodOptional<z.ZodArray<z.ZodObject<{
246
+ location: z.ZodObject<{
247
+ lat: z.ZodNumber;
248
+ lng: z.ZodNumber;
249
+ }, "strip", z.ZodTypeAny, {
250
+ lat: number;
251
+ lng: number;
252
+ }, {
253
+ lat: number;
254
+ lng: number;
255
+ }>;
256
+ value: z.ZodNumber;
257
+ unit: z.ZodString;
258
+ }, "strip", z.ZodTypeAny, {
259
+ value: number;
260
+ location: {
261
+ lat: number;
262
+ lng: number;
263
+ };
264
+ unit: string;
265
+ }, {
266
+ value: number;
267
+ location: {
268
+ lat: number;
269
+ lng: number;
270
+ };
271
+ unit: string;
272
+ }>, "many">>;
273
+ colorScale: z.ZodArray<z.ZodObject<{
274
+ value: z.ZodNumber;
275
+ color: z.ZodString;
276
+ label: z.ZodString;
277
+ }, "strip", z.ZodTypeAny, {
278
+ value: number;
279
+ color: string;
280
+ label: string;
281
+ }, {
282
+ value: number;
283
+ color: string;
284
+ label: string;
285
+ }>, "many">;
286
+ }, "strip", z.ZodTypeAny, {
287
+ fieldId: string;
288
+ readingDate: string;
289
+ statistics: {
290
+ min: number;
291
+ max: number;
292
+ mean: number;
293
+ } | null;
294
+ colorScale: {
295
+ value: number;
296
+ color: string;
297
+ label: string;
298
+ }[];
299
+ moistureImageUrl: string | null;
300
+ hasRasterData: boolean;
301
+ moistureData?: {
302
+ value: number;
303
+ location: {
304
+ lat: number;
305
+ lng: number;
306
+ };
307
+ unit: string;
308
+ }[] | undefined;
309
+ }, {
310
+ fieldId: string;
311
+ readingDate: string;
312
+ statistics: {
313
+ min: number;
314
+ max: number;
315
+ mean: number;
316
+ } | null;
317
+ colorScale: {
318
+ value: number;
319
+ color: string;
320
+ label: string;
321
+ }[];
322
+ moistureImageUrl: string | null;
323
+ hasRasterData: boolean;
324
+ moistureData?: {
325
+ value: number;
326
+ location: {
327
+ lat: number;
328
+ lng: number;
329
+ };
330
+ unit: string;
331
+ }[] | undefined;
332
+ }>;
333
+ 404: z.ZodObject<{
334
+ message: z.ZodString;
335
+ code: z.ZodString;
336
+ }, "strip", z.ZodTypeAny, {
337
+ code: string;
338
+ message: string;
339
+ }, {
340
+ code: string;
341
+ message: string;
342
+ }>;
343
+ };
344
+ };
345
+ getAvailableDates: {
346
+ query: z.ZodObject<{
347
+ startDate: z.ZodString;
348
+ endDate: z.ZodString;
349
+ maxCloudCoverage: z.ZodDefault<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
350
+ }, "strip", z.ZodTypeAny, {
351
+ startDate: string;
352
+ endDate: string;
353
+ maxCloudCoverage: number;
354
+ }, {
355
+ startDate: string;
356
+ endDate: string;
357
+ maxCloudCoverage?: string | undefined;
358
+ }>;
359
+ summary: "Get available satellite imagery dates";
360
+ method: "GET";
361
+ path: "/farms/:farmId/fields/:fieldId/visualization/imagery/available-dates";
362
+ responses: {
363
+ 200: z.ZodObject<{
364
+ fieldId: z.ZodString;
365
+ dates: z.ZodArray<z.ZodObject<{
366
+ date: z.ZodString;
367
+ cloudCoverage: z.ZodNumber;
368
+ imageCoverage: z.ZodNumber;
369
+ available: z.ZodBoolean;
370
+ source: z.ZodEnum<["sentinel-2", "landsat-8", "modis"]>;
371
+ }, "strip", z.ZodTypeAny, {
372
+ date: string;
373
+ source: "sentinel-2" | "landsat-8" | "modis";
374
+ cloudCoverage: number;
375
+ imageCoverage: number;
376
+ available: boolean;
377
+ }, {
378
+ date: string;
379
+ source: "sentinel-2" | "landsat-8" | "modis";
380
+ cloudCoverage: number;
381
+ imageCoverage: number;
382
+ available: boolean;
383
+ }>, "many">;
384
+ totalAvailable: z.ZodNumber;
385
+ dateRange: z.ZodObject<{
386
+ start: z.ZodString;
387
+ end: z.ZodString;
388
+ }, "strip", z.ZodTypeAny, {
389
+ start: string;
390
+ end: string;
391
+ }, {
392
+ start: string;
393
+ end: string;
394
+ }>;
395
+ }, "strip", z.ZodTypeAny, {
396
+ fieldId: string;
397
+ dates: {
398
+ date: string;
399
+ source: "sentinel-2" | "landsat-8" | "modis";
400
+ cloudCoverage: number;
401
+ imageCoverage: number;
402
+ available: boolean;
403
+ }[];
404
+ totalAvailable: number;
405
+ dateRange: {
406
+ start: string;
407
+ end: string;
408
+ };
409
+ }, {
410
+ fieldId: string;
411
+ dates: {
412
+ date: string;
413
+ source: "sentinel-2" | "landsat-8" | "modis";
414
+ cloudCoverage: number;
415
+ imageCoverage: number;
416
+ available: boolean;
417
+ }[];
418
+ totalAvailable: number;
419
+ dateRange: {
420
+ start: string;
421
+ end: string;
422
+ };
423
+ }>;
424
+ 404: z.ZodObject<{
425
+ message: z.ZodString;
426
+ code: z.ZodString;
427
+ }, "strip", z.ZodTypeAny, {
428
+ code: string;
429
+ message: string;
430
+ }, {
431
+ code: string;
432
+ message: string;
433
+ }>;
434
+ };
435
+ };
436
+ getHistoricalImagery: {
437
+ query: z.ZodObject<{
438
+ date: z.ZodString;
439
+ type: z.ZodDefault<z.ZodEnum<["true-color", "ndvi", "both"]>>;
440
+ }, "strip", z.ZodTypeAny, {
441
+ type: "ndvi" | "true-color" | "both";
442
+ date: string;
443
+ }, {
444
+ date: string;
445
+ type?: "ndvi" | "true-color" | "both" | undefined;
446
+ }>;
447
+ summary: "Get historical satellite imagery for specific date";
448
+ method: "GET";
449
+ path: "/farms/:farmId/fields/:fieldId/visualization/imagery/historical";
450
+ responses: {
451
+ 200: z.ZodObject<{
452
+ fieldId: z.ZodString;
453
+ date: z.ZodString;
454
+ trueColorUrl: z.ZodNullable<z.ZodString>;
455
+ ndviUrl: z.ZodNullable<z.ZodString>;
456
+ ndviStatistics: z.ZodNullable<z.ZodObject<{
457
+ min: z.ZodNumber;
458
+ max: z.ZodNumber;
459
+ mean: z.ZodNumber;
460
+ median: z.ZodNumber;
461
+ }, "strip", z.ZodTypeAny, {
462
+ min: number;
463
+ max: number;
464
+ mean: number;
465
+ median: number;
466
+ }, {
467
+ min: number;
468
+ max: number;
469
+ mean: number;
470
+ median: number;
471
+ }>>;
472
+ cloudCoverage: z.ZodNumber;
473
+ source: z.ZodString;
474
+ captureTime: z.ZodOptional<z.ZodString>;
475
+ }, "strip", z.ZodTypeAny, {
476
+ date: string;
477
+ source: string;
478
+ fieldId: string;
479
+ cloudCoverage: number;
480
+ trueColorUrl: string | null;
481
+ ndviUrl: string | null;
482
+ ndviStatistics: {
483
+ min: number;
484
+ max: number;
485
+ mean: number;
486
+ median: number;
487
+ } | null;
488
+ captureTime?: string | undefined;
489
+ }, {
490
+ date: string;
491
+ source: string;
492
+ fieldId: string;
493
+ cloudCoverage: number;
494
+ trueColorUrl: string | null;
495
+ ndviUrl: string | null;
496
+ ndviStatistics: {
497
+ min: number;
498
+ max: number;
499
+ mean: number;
500
+ median: number;
501
+ } | null;
502
+ captureTime?: string | undefined;
503
+ }>;
504
+ 404: z.ZodObject<{
505
+ message: z.ZodString;
506
+ code: z.ZodString;
507
+ }, "strip", z.ZodTypeAny, {
508
+ code: string;
509
+ message: string;
510
+ }, {
511
+ code: string;
512
+ message: string;
513
+ }>;
514
+ 400: z.ZodObject<{
515
+ message: z.ZodString;
516
+ code: z.ZodString;
517
+ }, "strip", z.ZodTypeAny, {
518
+ code: string;
519
+ message: string;
520
+ }, {
521
+ code: string;
522
+ message: string;
523
+ }>;
524
+ };
525
+ };
526
+ compareImagery: {
527
+ query: z.ZodObject<{
528
+ date1: z.ZodString;
529
+ date2: z.ZodString;
530
+ type: z.ZodDefault<z.ZodEnum<["true-color", "ndvi", "both"]>>;
531
+ }, "strip", z.ZodTypeAny, {
532
+ type: "ndvi" | "true-color" | "both";
533
+ date1: string;
534
+ date2: string;
535
+ }, {
536
+ date1: string;
537
+ date2: string;
538
+ type?: "ndvi" | "true-color" | "both" | undefined;
539
+ }>;
540
+ summary: "Compare imagery between two dates";
541
+ method: "GET";
542
+ path: "/farms/:farmId/fields/:fieldId/visualization/imagery/compare";
543
+ responses: {
544
+ 200: z.ZodObject<{
545
+ fieldId: z.ZodString;
546
+ before: z.ZodObject<{
547
+ date: z.ZodString;
548
+ trueColorUrl: z.ZodNullable<z.ZodString>;
549
+ ndviUrl: z.ZodNullable<z.ZodString>;
550
+ ndviStatistics: z.ZodObject<{
551
+ min: z.ZodNumber;
552
+ max: z.ZodNumber;
553
+ mean: z.ZodNumber;
554
+ }, "strip", z.ZodTypeAny, {
555
+ min: number;
556
+ max: number;
557
+ mean: number;
558
+ }, {
559
+ min: number;
560
+ max: number;
561
+ mean: number;
562
+ }>;
563
+ }, "strip", z.ZodTypeAny, {
564
+ date: string;
565
+ trueColorUrl: string | null;
566
+ ndviUrl: string | null;
567
+ ndviStatistics: {
568
+ min: number;
569
+ max: number;
570
+ mean: number;
571
+ };
572
+ }, {
573
+ date: string;
574
+ trueColorUrl: string | null;
575
+ ndviUrl: string | null;
576
+ ndviStatistics: {
577
+ min: number;
578
+ max: number;
579
+ mean: number;
580
+ };
581
+ }>;
582
+ after: z.ZodObject<{
583
+ date: z.ZodString;
584
+ trueColorUrl: z.ZodNullable<z.ZodString>;
585
+ ndviUrl: z.ZodNullable<z.ZodString>;
586
+ ndviStatistics: z.ZodObject<{
587
+ min: z.ZodNumber;
588
+ max: z.ZodNumber;
589
+ mean: z.ZodNumber;
590
+ }, "strip", z.ZodTypeAny, {
591
+ min: number;
592
+ max: number;
593
+ mean: number;
594
+ }, {
595
+ min: number;
596
+ max: number;
597
+ mean: number;
598
+ }>;
599
+ }, "strip", z.ZodTypeAny, {
600
+ date: string;
601
+ trueColorUrl: string | null;
602
+ ndviUrl: string | null;
603
+ ndviStatistics: {
604
+ min: number;
605
+ max: number;
606
+ mean: number;
607
+ };
608
+ }, {
609
+ date: string;
610
+ trueColorUrl: string | null;
611
+ ndviUrl: string | null;
612
+ ndviStatistics: {
613
+ min: number;
614
+ max: number;
615
+ mean: number;
616
+ };
617
+ }>;
618
+ changes: z.ZodObject<{
619
+ ndviDelta: z.ZodNumber;
620
+ healthTrend: z.ZodEnum<["improving", "stable", "declining"]>;
621
+ significantChange: z.ZodBoolean;
622
+ changePct: z.ZodNumber;
623
+ }, "strip", z.ZodTypeAny, {
624
+ ndviDelta: number;
625
+ healthTrend: "stable" | "improving" | "declining";
626
+ significantChange: boolean;
627
+ changePct: number;
628
+ }, {
629
+ ndviDelta: number;
630
+ healthTrend: "stable" | "improving" | "declining";
631
+ significantChange: boolean;
632
+ changePct: number;
633
+ }>;
634
+ }, "strip", z.ZodTypeAny, {
635
+ fieldId: string;
636
+ before: {
637
+ date: string;
638
+ trueColorUrl: string | null;
639
+ ndviUrl: string | null;
640
+ ndviStatistics: {
641
+ min: number;
642
+ max: number;
643
+ mean: number;
644
+ };
645
+ };
646
+ after: {
647
+ date: string;
648
+ trueColorUrl: string | null;
649
+ ndviUrl: string | null;
650
+ ndviStatistics: {
651
+ min: number;
652
+ max: number;
653
+ mean: number;
654
+ };
655
+ };
656
+ changes: {
657
+ ndviDelta: number;
658
+ healthTrend: "stable" | "improving" | "declining";
659
+ significantChange: boolean;
660
+ changePct: number;
661
+ };
662
+ }, {
663
+ fieldId: string;
664
+ before: {
665
+ date: string;
666
+ trueColorUrl: string | null;
667
+ ndviUrl: string | null;
668
+ ndviStatistics: {
669
+ min: number;
670
+ max: number;
671
+ mean: number;
672
+ };
673
+ };
674
+ after: {
675
+ date: string;
676
+ trueColorUrl: string | null;
677
+ ndviUrl: string | null;
678
+ ndviStatistics: {
679
+ min: number;
680
+ max: number;
681
+ mean: number;
682
+ };
683
+ };
684
+ changes: {
685
+ ndviDelta: number;
686
+ healthTrend: "stable" | "improving" | "declining";
687
+ significantChange: boolean;
688
+ changePct: number;
689
+ };
690
+ }>;
691
+ 404: z.ZodObject<{
692
+ message: z.ZodString;
693
+ code: z.ZodString;
694
+ }, "strip", z.ZodTypeAny, {
695
+ code: string;
696
+ message: string;
697
+ }, {
698
+ code: string;
699
+ message: string;
700
+ }>;
701
+ 400: z.ZodObject<{
702
+ message: z.ZodString;
703
+ code: z.ZodString;
704
+ }, "strip", z.ZodTypeAny, {
705
+ code: string;
706
+ message: string;
707
+ }, {
708
+ code: string;
709
+ message: string;
710
+ }>;
711
+ };
712
+ };
713
+ generateTimelapse: {
714
+ summary: "Generate timelapse animation frames";
715
+ method: "POST";
716
+ body: z.ZodObject<{
717
+ startDate: z.ZodOptional<z.ZodString>;
718
+ endDate: z.ZodOptional<z.ZodString>;
719
+ maxFrames: z.ZodDefault<z.ZodNumber>;
720
+ type: z.ZodEnum<["true-color", "ndvi"]>;
721
+ maxCloudCoverage: z.ZodDefault<z.ZodNumber>;
722
+ }, "strip", z.ZodTypeAny, {
723
+ type: "ndvi" | "true-color";
724
+ maxCloudCoverage: number;
725
+ maxFrames: number;
726
+ startDate?: string | undefined;
727
+ endDate?: string | undefined;
728
+ }, {
729
+ type: "ndvi" | "true-color";
730
+ startDate?: string | undefined;
731
+ endDate?: string | undefined;
732
+ maxCloudCoverage?: number | undefined;
733
+ maxFrames?: number | undefined;
734
+ }>;
735
+ path: "/farms/:farmId/fields/:fieldId/visualization/imagery/timelapse";
736
+ responses: {
737
+ 200: z.ZodObject<{
738
+ fieldId: z.ZodString;
739
+ frames: z.ZodArray<z.ZodObject<{
740
+ date: z.ZodString;
741
+ imageUrl: z.ZodString;
742
+ ndviMean: z.ZodNullable<z.ZodNumber>;
743
+ cloudCoverage: z.ZodNumber;
744
+ frameIndex: z.ZodNumber;
745
+ }, "strip", z.ZodTypeAny, {
746
+ date: string;
747
+ cloudCoverage: number;
748
+ imageUrl: string;
749
+ ndviMean: number | null;
750
+ frameIndex: number;
751
+ }, {
752
+ date: string;
753
+ cloudCoverage: number;
754
+ imageUrl: string;
755
+ ndviMean: number | null;
756
+ frameIndex: number;
757
+ }>, "many">;
758
+ totalFrames: z.ZodNumber;
759
+ dateRange: z.ZodObject<{
760
+ start: z.ZodString;
761
+ end: z.ZodString;
762
+ }, "strip", z.ZodTypeAny, {
763
+ start: string;
764
+ end: string;
765
+ }, {
766
+ start: string;
767
+ end: string;
768
+ }>;
769
+ frameDurationMs: z.ZodNumber;
770
+ type: z.ZodEnum<["true-color", "ndvi"]>;
771
+ }, "strip", z.ZodTypeAny, {
772
+ type: "ndvi" | "true-color";
773
+ fieldId: string;
774
+ dateRange: {
775
+ start: string;
776
+ end: string;
777
+ };
778
+ frames: {
779
+ date: string;
780
+ cloudCoverage: number;
781
+ imageUrl: string;
782
+ ndviMean: number | null;
783
+ frameIndex: number;
784
+ }[];
785
+ totalFrames: number;
786
+ frameDurationMs: number;
787
+ }, {
788
+ type: "ndvi" | "true-color";
789
+ fieldId: string;
790
+ dateRange: {
791
+ start: string;
792
+ end: string;
793
+ };
794
+ frames: {
795
+ date: string;
796
+ cloudCoverage: number;
797
+ imageUrl: string;
798
+ ndviMean: number | null;
799
+ frameIndex: number;
800
+ }[];
801
+ totalFrames: number;
802
+ frameDurationMs: number;
803
+ }>;
804
+ 404: z.ZodObject<{
805
+ message: z.ZodString;
806
+ code: z.ZodString;
807
+ }, "strip", z.ZodTypeAny, {
808
+ code: string;
809
+ message: string;
810
+ }, {
811
+ code: string;
812
+ message: string;
813
+ }>;
814
+ 400: z.ZodObject<{
815
+ message: z.ZodString;
816
+ code: z.ZodString;
817
+ }, "strip", z.ZodTypeAny, {
818
+ code: string;
819
+ message: string;
820
+ }, {
821
+ code: string;
822
+ message: string;
823
+ }>;
824
+ };
825
+ };
826
+ getZoneAnalysis: {
827
+ query: z.ZodObject<{
828
+ zoneCount: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
829
+ date: z.ZodOptional<z.ZodString>;
830
+ }, "strip", z.ZodTypeAny, {
831
+ date?: string | undefined;
832
+ zoneCount?: number | undefined;
833
+ }, {
834
+ date?: string | undefined;
835
+ zoneCount?: string | undefined;
836
+ }>;
837
+ summary: "Get zone-based field analysis";
838
+ method: "GET";
839
+ path: "/farms/:farmId/fields/:fieldId/visualization/zones";
840
+ responses: {
841
+ 200: z.ZodObject<{
842
+ fieldId: z.ZodString;
843
+ analysisDate: z.ZodString;
844
+ zones: z.ZodArray<z.ZodObject<{
845
+ zoneId: z.ZodString;
846
+ zoneNumber: z.ZodNumber;
847
+ geometry: z.ZodObject<{
848
+ type: z.ZodLiteral<"Polygon">;
849
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
850
+ }, "strip", z.ZodTypeAny, {
851
+ type: "Polygon";
852
+ coordinates: [number, number][][];
853
+ }, {
854
+ type: "Polygon";
855
+ coordinates: [number, number][][];
856
+ }>;
857
+ area: z.ZodNumber;
858
+ centroid: z.ZodObject<{
859
+ lat: z.ZodNumber;
860
+ lng: z.ZodNumber;
861
+ }, "strip", z.ZodTypeAny, {
862
+ lat: number;
863
+ lng: number;
864
+ }, {
865
+ lat: number;
866
+ lng: number;
867
+ }>;
868
+ metrics: z.ZodObject<{
869
+ ndviMean: z.ZodNumber;
870
+ ndviMin: z.ZodNumber;
871
+ ndviMax: z.ZodNumber;
872
+ healthScore: z.ZodNumber;
873
+ status: z.ZodEnum<["healthy", "moderate", "stressed", "critical"]>;
874
+ }, "strip", z.ZodTypeAny, {
875
+ status: "critical" | "healthy" | "moderate" | "stressed";
876
+ healthScore: number;
877
+ ndviMean: number;
878
+ ndviMin: number;
879
+ ndviMax: number;
880
+ }, {
881
+ status: "critical" | "healthy" | "moderate" | "stressed";
882
+ healthScore: number;
883
+ ndviMean: number;
884
+ ndviMin: number;
885
+ ndviMax: number;
886
+ }>;
887
+ color: z.ZodString;
888
+ recommendation: z.ZodOptional<z.ZodString>;
889
+ }, "strip", z.ZodTypeAny, {
890
+ geometry: {
891
+ type: "Polygon";
892
+ coordinates: [number, number][][];
893
+ };
894
+ area: number;
895
+ color: string;
896
+ zoneId: string;
897
+ zoneNumber: number;
898
+ centroid: {
899
+ lat: number;
900
+ lng: number;
901
+ };
902
+ metrics: {
903
+ status: "critical" | "healthy" | "moderate" | "stressed";
904
+ healthScore: number;
905
+ ndviMean: number;
906
+ ndviMin: number;
907
+ ndviMax: number;
908
+ };
909
+ recommendation?: string | undefined;
910
+ }, {
911
+ geometry: {
912
+ type: "Polygon";
913
+ coordinates: [number, number][][];
914
+ };
915
+ area: number;
916
+ color: string;
917
+ zoneId: string;
918
+ zoneNumber: number;
919
+ centroid: {
920
+ lat: number;
921
+ lng: number;
922
+ };
923
+ metrics: {
924
+ status: "critical" | "healthy" | "moderate" | "stressed";
925
+ healthScore: number;
926
+ ndviMean: number;
927
+ ndviMin: number;
928
+ ndviMax: number;
929
+ };
930
+ recommendation?: string | undefined;
931
+ }>, "many">;
932
+ summary: z.ZodObject<{
933
+ totalZones: z.ZodNumber;
934
+ healthyZones: z.ZodNumber;
935
+ concernZones: z.ZodNumber;
936
+ averageHealthScore: z.ZodNumber;
937
+ }, "strip", z.ZodTypeAny, {
938
+ totalZones: number;
939
+ healthyZones: number;
940
+ concernZones: number;
941
+ averageHealthScore: number;
942
+ }, {
943
+ totalZones: number;
944
+ healthyZones: number;
945
+ concernZones: number;
946
+ averageHealthScore: number;
947
+ }>;
948
+ }, "strip", z.ZodTypeAny, {
949
+ summary: {
950
+ totalZones: number;
951
+ healthyZones: number;
952
+ concernZones: number;
953
+ averageHealthScore: number;
954
+ };
955
+ fieldId: string;
956
+ analysisDate: string;
957
+ zones: {
958
+ geometry: {
959
+ type: "Polygon";
960
+ coordinates: [number, number][][];
961
+ };
962
+ area: number;
963
+ color: string;
964
+ zoneId: string;
965
+ zoneNumber: number;
966
+ centroid: {
967
+ lat: number;
968
+ lng: number;
969
+ };
970
+ metrics: {
971
+ status: "critical" | "healthy" | "moderate" | "stressed";
972
+ healthScore: number;
973
+ ndviMean: number;
974
+ ndviMin: number;
975
+ ndviMax: number;
976
+ };
977
+ recommendation?: string | undefined;
978
+ }[];
979
+ }, {
980
+ summary: {
981
+ totalZones: number;
982
+ healthyZones: number;
983
+ concernZones: number;
984
+ averageHealthScore: number;
985
+ };
986
+ fieldId: string;
987
+ analysisDate: string;
988
+ zones: {
989
+ geometry: {
990
+ type: "Polygon";
991
+ coordinates: [number, number][][];
992
+ };
993
+ area: number;
994
+ color: string;
995
+ zoneId: string;
996
+ zoneNumber: number;
997
+ centroid: {
998
+ lat: number;
999
+ lng: number;
1000
+ };
1001
+ metrics: {
1002
+ status: "critical" | "healthy" | "moderate" | "stressed";
1003
+ healthScore: number;
1004
+ ndviMean: number;
1005
+ ndviMin: number;
1006
+ ndviMax: number;
1007
+ };
1008
+ recommendation?: string | undefined;
1009
+ }[];
1010
+ }>;
1011
+ 404: z.ZodObject<{
1012
+ message: z.ZodString;
1013
+ code: z.ZodString;
1014
+ }, "strip", z.ZodTypeAny, {
1015
+ code: string;
1016
+ message: string;
1017
+ }, {
1018
+ code: string;
1019
+ message: string;
1020
+ }>;
1021
+ };
1022
+ };
1023
+ getAnomalies: {
1024
+ query: z.ZodObject<{
1025
+ threshold: z.ZodDefault<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
1026
+ compareDate: z.ZodOptional<z.ZodString>;
1027
+ }, "strip", z.ZodTypeAny, {
1028
+ threshold: number;
1029
+ compareDate?: string | undefined;
1030
+ }, {
1031
+ threshold?: string | undefined;
1032
+ compareDate?: string | undefined;
1033
+ }>;
1034
+ summary: "Detect field anomalies based on NDVI changes";
1035
+ method: "GET";
1036
+ path: "/farms/:farmId/fields/:fieldId/visualization/anomalies";
1037
+ responses: {
1038
+ 200: z.ZodObject<{
1039
+ fieldId: z.ZodString;
1040
+ analysisDate: z.ZodString;
1041
+ comparedTo: z.ZodString;
1042
+ anomalies: z.ZodArray<z.ZodObject<{
1043
+ anomalyId: z.ZodString;
1044
+ geometry: z.ZodUnion<[z.ZodObject<{
1045
+ type: z.ZodLiteral<"Polygon">;
1046
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
1047
+ }, "strip", z.ZodTypeAny, {
1048
+ type: "Polygon";
1049
+ coordinates: [number, number][][];
1050
+ }, {
1051
+ type: "Polygon";
1052
+ coordinates: [number, number][][];
1053
+ }>, z.ZodObject<{
1054
+ type: z.ZodLiteral<"MultiPolygon">;
1055
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">;
1056
+ }, "strip", z.ZodTypeAny, {
1057
+ type: "MultiPolygon";
1058
+ coordinates: [number, number][][][];
1059
+ }, {
1060
+ type: "MultiPolygon";
1061
+ coordinates: [number, number][][][];
1062
+ }>]>;
1063
+ centroid: z.ZodObject<{
1064
+ lat: z.ZodNumber;
1065
+ lng: z.ZodNumber;
1066
+ }, "strip", z.ZodTypeAny, {
1067
+ lat: number;
1068
+ lng: number;
1069
+ }, {
1070
+ lat: number;
1071
+ lng: number;
1072
+ }>;
1073
+ area: z.ZodNumber;
1074
+ severity: z.ZodEnum<["low", "medium", "high", "critical"]>;
1075
+ ndviChange: z.ZodNumber;
1076
+ previousNdvi: z.ZodNumber;
1077
+ currentNdvi: z.ZodNumber;
1078
+ possibleCauses: z.ZodArray<z.ZodString, "many">;
1079
+ recommendation: z.ZodString;
1080
+ linkedAlertId: z.ZodOptional<z.ZodString>;
1081
+ }, "strip", z.ZodTypeAny, {
1082
+ geometry: {
1083
+ type: "Polygon";
1084
+ coordinates: [number, number][][];
1085
+ } | {
1086
+ type: "MultiPolygon";
1087
+ coordinates: [number, number][][][];
1088
+ };
1089
+ area: number;
1090
+ severity: "critical" | "low" | "medium" | "high";
1091
+ recommendation: string;
1092
+ centroid: {
1093
+ lat: number;
1094
+ lng: number;
1095
+ };
1096
+ anomalyId: string;
1097
+ ndviChange: number;
1098
+ previousNdvi: number;
1099
+ currentNdvi: number;
1100
+ possibleCauses: string[];
1101
+ linkedAlertId?: string | undefined;
1102
+ }, {
1103
+ geometry: {
1104
+ type: "Polygon";
1105
+ coordinates: [number, number][][];
1106
+ } | {
1107
+ type: "MultiPolygon";
1108
+ coordinates: [number, number][][][];
1109
+ };
1110
+ area: number;
1111
+ severity: "critical" | "low" | "medium" | "high";
1112
+ recommendation: string;
1113
+ centroid: {
1114
+ lat: number;
1115
+ lng: number;
1116
+ };
1117
+ anomalyId: string;
1118
+ ndviChange: number;
1119
+ previousNdvi: number;
1120
+ currentNdvi: number;
1121
+ possibleCauses: string[];
1122
+ linkedAlertId?: string | undefined;
1123
+ }>, "many">;
1124
+ summary: z.ZodObject<{
1125
+ totalAnomalies: z.ZodNumber;
1126
+ affectedArea: z.ZodNumber;
1127
+ affectedPercentage: z.ZodNumber;
1128
+ }, "strip", z.ZodTypeAny, {
1129
+ affectedArea: number;
1130
+ totalAnomalies: number;
1131
+ affectedPercentage: number;
1132
+ }, {
1133
+ affectedArea: number;
1134
+ totalAnomalies: number;
1135
+ affectedPercentage: number;
1136
+ }>;
1137
+ }, "strip", z.ZodTypeAny, {
1138
+ summary: {
1139
+ affectedArea: number;
1140
+ totalAnomalies: number;
1141
+ affectedPercentage: number;
1142
+ };
1143
+ fieldId: string;
1144
+ analysisDate: string;
1145
+ comparedTo: string;
1146
+ anomalies: {
1147
+ geometry: {
1148
+ type: "Polygon";
1149
+ coordinates: [number, number][][];
1150
+ } | {
1151
+ type: "MultiPolygon";
1152
+ coordinates: [number, number][][][];
1153
+ };
1154
+ area: number;
1155
+ severity: "critical" | "low" | "medium" | "high";
1156
+ recommendation: string;
1157
+ centroid: {
1158
+ lat: number;
1159
+ lng: number;
1160
+ };
1161
+ anomalyId: string;
1162
+ ndviChange: number;
1163
+ previousNdvi: number;
1164
+ currentNdvi: number;
1165
+ possibleCauses: string[];
1166
+ linkedAlertId?: string | undefined;
1167
+ }[];
1168
+ }, {
1169
+ summary: {
1170
+ affectedArea: number;
1171
+ totalAnomalies: number;
1172
+ affectedPercentage: number;
1173
+ };
1174
+ fieldId: string;
1175
+ analysisDate: string;
1176
+ comparedTo: string;
1177
+ anomalies: {
1178
+ geometry: {
1179
+ type: "Polygon";
1180
+ coordinates: [number, number][][];
1181
+ } | {
1182
+ type: "MultiPolygon";
1183
+ coordinates: [number, number][][][];
1184
+ };
1185
+ area: number;
1186
+ severity: "critical" | "low" | "medium" | "high";
1187
+ recommendation: string;
1188
+ centroid: {
1189
+ lat: number;
1190
+ lng: number;
1191
+ };
1192
+ anomalyId: string;
1193
+ ndviChange: number;
1194
+ previousNdvi: number;
1195
+ currentNdvi: number;
1196
+ possibleCauses: string[];
1197
+ linkedAlertId?: string | undefined;
1198
+ }[];
1199
+ }>;
1200
+ 404: z.ZodObject<{
1201
+ message: z.ZodString;
1202
+ code: z.ZodString;
1203
+ }, "strip", z.ZodTypeAny, {
1204
+ code: string;
1205
+ message: string;
1206
+ }, {
1207
+ code: string;
1208
+ message: string;
1209
+ }>;
1210
+ };
1211
+ };
1212
+ getWeatherSpatial: {
1213
+ query: z.ZodObject<{
1214
+ days: z.ZodDefault<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
1215
+ type: z.ZodDefault<z.ZodEnum<["rainfall", "temperature", "all"]>>;
1216
+ }, "strip", z.ZodTypeAny, {
1217
+ type: "rainfall" | "all" | "temperature";
1218
+ days: number;
1219
+ }, {
1220
+ type?: "rainfall" | "all" | "temperature" | undefined;
1221
+ days?: string | undefined;
1222
+ }>;
1223
+ summary: "Get spatial weather data for field overlay";
1224
+ method: "GET";
1225
+ path: "/farms/:farmId/fields/:fieldId/visualization/weather";
1226
+ responses: {
1227
+ 200: z.ZodObject<{
1228
+ fieldId: z.ZodString;
1229
+ fieldCentroid: z.ZodObject<{
1230
+ lat: z.ZodNumber;
1231
+ lng: z.ZodNumber;
1232
+ }, "strip", z.ZodTypeAny, {
1233
+ lat: number;
1234
+ lng: number;
1235
+ }, {
1236
+ lat: number;
1237
+ lng: number;
1238
+ }>;
1239
+ dateRange: z.ZodObject<{
1240
+ start: z.ZodString;
1241
+ end: z.ZodString;
1242
+ }, "strip", z.ZodTypeAny, {
1243
+ start: string;
1244
+ end: string;
1245
+ }, {
1246
+ start: string;
1247
+ end: string;
1248
+ }>;
1249
+ rainfall: z.ZodObject<{
1250
+ total: z.ZodNumber;
1251
+ daily: z.ZodArray<z.ZodObject<{
1252
+ date: z.ZodString;
1253
+ amount: z.ZodNumber;
1254
+ intensity: z.ZodOptional<z.ZodEnum<["none", "light", "moderate", "heavy"]>>;
1255
+ }, "strip", z.ZodTypeAny, {
1256
+ date: string;
1257
+ amount: number;
1258
+ intensity?: "none" | "moderate" | "light" | "heavy" | undefined;
1259
+ }, {
1260
+ date: string;
1261
+ amount: number;
1262
+ intensity?: "none" | "moderate" | "light" | "heavy" | undefined;
1263
+ }>, "many">;
1264
+ distribution: z.ZodOptional<z.ZodEnum<["even", "concentrated", "sporadic"]>>;
1265
+ }, "strip", z.ZodTypeAny, {
1266
+ total: number;
1267
+ daily: {
1268
+ date: string;
1269
+ amount: number;
1270
+ intensity?: "none" | "moderate" | "light" | "heavy" | undefined;
1271
+ }[];
1272
+ distribution?: "even" | "concentrated" | "sporadic" | undefined;
1273
+ }, {
1274
+ total: number;
1275
+ daily: {
1276
+ date: string;
1277
+ amount: number;
1278
+ intensity?: "none" | "moderate" | "light" | "heavy" | undefined;
1279
+ }[];
1280
+ distribution?: "even" | "concentrated" | "sporadic" | undefined;
1281
+ }>;
1282
+ temperature: z.ZodObject<{
1283
+ current: z.ZodNumber;
1284
+ min: z.ZodNumber;
1285
+ max: z.ZodNumber;
1286
+ average: z.ZodNumber;
1287
+ daily: z.ZodArray<z.ZodObject<{
1288
+ date: z.ZodString;
1289
+ min: z.ZodNumber;
1290
+ max: z.ZodNumber;
1291
+ avg: z.ZodNumber;
1292
+ }, "strip", z.ZodTypeAny, {
1293
+ date: string;
1294
+ min: number;
1295
+ max: number;
1296
+ avg: number;
1297
+ }, {
1298
+ date: string;
1299
+ min: number;
1300
+ max: number;
1301
+ avg: number;
1302
+ }>, "many">;
1303
+ }, "strip", z.ZodTypeAny, {
1304
+ min: number;
1305
+ max: number;
1306
+ current: number;
1307
+ daily: {
1308
+ date: string;
1309
+ min: number;
1310
+ max: number;
1311
+ avg: number;
1312
+ }[];
1313
+ average: number;
1314
+ }, {
1315
+ min: number;
1316
+ max: number;
1317
+ current: number;
1318
+ daily: {
1319
+ date: string;
1320
+ min: number;
1321
+ max: number;
1322
+ avg: number;
1323
+ }[];
1324
+ average: number;
1325
+ }>;
1326
+ forecast: z.ZodOptional<z.ZodObject<{
1327
+ nextRainfall: z.ZodNullable<z.ZodObject<{
1328
+ date: z.ZodString;
1329
+ amount: z.ZodNumber;
1330
+ }, "strip", z.ZodTypeAny, {
1331
+ date: string;
1332
+ amount: number;
1333
+ }, {
1334
+ date: string;
1335
+ amount: number;
1336
+ }>>;
1337
+ temperatureTrend: z.ZodEnum<["warming", "cooling", "stable"]>;
1338
+ }, "strip", z.ZodTypeAny, {
1339
+ nextRainfall: {
1340
+ date: string;
1341
+ amount: number;
1342
+ } | null;
1343
+ temperatureTrend: "stable" | "warming" | "cooling";
1344
+ }, {
1345
+ nextRainfall: {
1346
+ date: string;
1347
+ amount: number;
1348
+ } | null;
1349
+ temperatureTrend: "stable" | "warming" | "cooling";
1350
+ }>>;
1351
+ }, "strip", z.ZodTypeAny, {
1352
+ fieldId: string;
1353
+ rainfall: {
1354
+ total: number;
1355
+ daily: {
1356
+ date: string;
1357
+ amount: number;
1358
+ intensity?: "none" | "moderate" | "light" | "heavy" | undefined;
1359
+ }[];
1360
+ distribution?: "even" | "concentrated" | "sporadic" | undefined;
1361
+ };
1362
+ temperature: {
1363
+ min: number;
1364
+ max: number;
1365
+ current: number;
1366
+ daily: {
1367
+ date: string;
1368
+ min: number;
1369
+ max: number;
1370
+ avg: number;
1371
+ }[];
1372
+ average: number;
1373
+ };
1374
+ dateRange: {
1375
+ start: string;
1376
+ end: string;
1377
+ };
1378
+ fieldCentroid: {
1379
+ lat: number;
1380
+ lng: number;
1381
+ };
1382
+ forecast?: {
1383
+ nextRainfall: {
1384
+ date: string;
1385
+ amount: number;
1386
+ } | null;
1387
+ temperatureTrend: "stable" | "warming" | "cooling";
1388
+ } | undefined;
1389
+ }, {
1390
+ fieldId: string;
1391
+ rainfall: {
1392
+ total: number;
1393
+ daily: {
1394
+ date: string;
1395
+ amount: number;
1396
+ intensity?: "none" | "moderate" | "light" | "heavy" | undefined;
1397
+ }[];
1398
+ distribution?: "even" | "concentrated" | "sporadic" | undefined;
1399
+ };
1400
+ temperature: {
1401
+ min: number;
1402
+ max: number;
1403
+ current: number;
1404
+ daily: {
1405
+ date: string;
1406
+ min: number;
1407
+ max: number;
1408
+ avg: number;
1409
+ }[];
1410
+ average: number;
1411
+ };
1412
+ dateRange: {
1413
+ start: string;
1414
+ end: string;
1415
+ };
1416
+ fieldCentroid: {
1417
+ lat: number;
1418
+ lng: number;
1419
+ };
1420
+ forecast?: {
1421
+ nextRainfall: {
1422
+ date: string;
1423
+ amount: number;
1424
+ } | null;
1425
+ temperatureTrend: "stable" | "warming" | "cooling";
1426
+ } | undefined;
1427
+ }>;
1428
+ 404: z.ZodObject<{
1429
+ message: z.ZodString;
1430
+ code: z.ZodString;
1431
+ }, "strip", z.ZodTypeAny, {
1432
+ code: string;
1433
+ message: string;
1434
+ }, {
1435
+ code: string;
1436
+ message: string;
1437
+ }>;
1438
+ };
1439
+ };
1440
+ getSensors: {
1441
+ summary: "List sensors for field map visualization";
1442
+ method: "GET";
1443
+ path: "/farms/:farmId/fields/:fieldId/sensors";
1444
+ responses: {
1445
+ 200: z.ZodObject<{
1446
+ fieldId: z.ZodString;
1447
+ sensors: z.ZodArray<z.ZodObject<{
1448
+ id: z.ZodString;
1449
+ name: z.ZodString;
1450
+ type: z.ZodEnum<["SOIL_MOISTURE", "TEMPERATURE", "HUMIDITY", "SOIL_TEMPERATURE", "RAIN_GAUGE", "WIND", "LIGHT", "PH", "EC", "MULTI"]>;
1451
+ location: z.ZodObject<{
1452
+ lat: z.ZodNumber;
1453
+ lng: z.ZodNumber;
1454
+ }, "strip", z.ZodTypeAny, {
1455
+ lat: number;
1456
+ lng: number;
1457
+ }, {
1458
+ lat: number;
1459
+ lng: number;
1460
+ }>;
1461
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "ERROR", "MAINTENANCE", "LOW_BATTERY"]>;
1462
+ currentReading: z.ZodNullable<z.ZodObject<{
1463
+ value: z.ZodNumber;
1464
+ unit: z.ZodString;
1465
+ timestamp: z.ZodString;
1466
+ statusColor: z.ZodEnum<["green", "yellow", "red"]>;
1467
+ }, "strip", z.ZodTypeAny, {
1468
+ value: number;
1469
+ timestamp: string;
1470
+ unit: string;
1471
+ statusColor: "green" | "yellow" | "red";
1472
+ }, {
1473
+ value: number;
1474
+ timestamp: string;
1475
+ unit: string;
1476
+ statusColor: "green" | "yellow" | "red";
1477
+ }>>;
1478
+ batteryLevel: z.ZodNullable<z.ZodNumber>;
1479
+ lastSyncAt: z.ZodNullable<z.ZodString>;
1480
+ }, "strip", z.ZodTypeAny, {
1481
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1482
+ status: "ACTIVE" | "INACTIVE" | "ERROR" | "MAINTENANCE" | "LOW_BATTERY";
1483
+ id: string;
1484
+ name: string;
1485
+ location: {
1486
+ lat: number;
1487
+ lng: number;
1488
+ };
1489
+ currentReading: {
1490
+ value: number;
1491
+ timestamp: string;
1492
+ unit: string;
1493
+ statusColor: "green" | "yellow" | "red";
1494
+ } | null;
1495
+ batteryLevel: number | null;
1496
+ lastSyncAt: string | null;
1497
+ }, {
1498
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1499
+ status: "ACTIVE" | "INACTIVE" | "ERROR" | "MAINTENANCE" | "LOW_BATTERY";
1500
+ id: string;
1501
+ name: string;
1502
+ location: {
1503
+ lat: number;
1504
+ lng: number;
1505
+ };
1506
+ currentReading: {
1507
+ value: number;
1508
+ timestamp: string;
1509
+ unit: string;
1510
+ statusColor: "green" | "yellow" | "red";
1511
+ } | null;
1512
+ batteryLevel: number | null;
1513
+ lastSyncAt: string | null;
1514
+ }>, "many">;
1515
+ totalSensors: z.ZodNumber;
1516
+ }, "strip", z.ZodTypeAny, {
1517
+ fieldId: string;
1518
+ sensors: {
1519
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1520
+ status: "ACTIVE" | "INACTIVE" | "ERROR" | "MAINTENANCE" | "LOW_BATTERY";
1521
+ id: string;
1522
+ name: string;
1523
+ location: {
1524
+ lat: number;
1525
+ lng: number;
1526
+ };
1527
+ currentReading: {
1528
+ value: number;
1529
+ timestamp: string;
1530
+ unit: string;
1531
+ statusColor: "green" | "yellow" | "red";
1532
+ } | null;
1533
+ batteryLevel: number | null;
1534
+ lastSyncAt: string | null;
1535
+ }[];
1536
+ totalSensors: number;
1537
+ }, {
1538
+ fieldId: string;
1539
+ sensors: {
1540
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1541
+ status: "ACTIVE" | "INACTIVE" | "ERROR" | "MAINTENANCE" | "LOW_BATTERY";
1542
+ id: string;
1543
+ name: string;
1544
+ location: {
1545
+ lat: number;
1546
+ lng: number;
1547
+ };
1548
+ currentReading: {
1549
+ value: number;
1550
+ timestamp: string;
1551
+ unit: string;
1552
+ statusColor: "green" | "yellow" | "red";
1553
+ } | null;
1554
+ batteryLevel: number | null;
1555
+ lastSyncAt: string | null;
1556
+ }[];
1557
+ totalSensors: number;
1558
+ }>;
1559
+ 404: z.ZodObject<{
1560
+ message: z.ZodString;
1561
+ code: z.ZodString;
1562
+ }, "strip", z.ZodTypeAny, {
1563
+ code: string;
1564
+ message: string;
1565
+ }, {
1566
+ code: string;
1567
+ message: string;
1568
+ }>;
1569
+ };
1570
+ };
1571
+ createSensor: {
1572
+ summary: "Register a new sensor";
1573
+ method: "POST";
1574
+ body: z.ZodObject<{
1575
+ name: z.ZodString;
1576
+ type: z.ZodEnum<["SOIL_MOISTURE", "TEMPERATURE", "HUMIDITY", "SOIL_TEMPERATURE", "RAIN_GAUGE", "WIND", "LIGHT", "PH", "EC", "MULTI"]>;
1577
+ latitude: z.ZodNumber;
1578
+ longitude: z.ZodNumber;
1579
+ manufacturer: z.ZodOptional<z.ZodString>;
1580
+ model: z.ZodOptional<z.ZodString>;
1581
+ serialNumber: z.ZodOptional<z.ZodString>;
1582
+ readingInterval: z.ZodOptional<z.ZodNumber>;
1583
+ alertThresholds: z.ZodOptional<z.ZodObject<{
1584
+ min: z.ZodOptional<z.ZodNumber>;
1585
+ max: z.ZodOptional<z.ZodNumber>;
1586
+ criticalMin: z.ZodOptional<z.ZodNumber>;
1587
+ criticalMax: z.ZodOptional<z.ZodNumber>;
1588
+ }, "strip", z.ZodTypeAny, {
1589
+ min?: number | undefined;
1590
+ max?: number | undefined;
1591
+ criticalMin?: number | undefined;
1592
+ criticalMax?: number | undefined;
1593
+ }, {
1594
+ min?: number | undefined;
1595
+ max?: number | undefined;
1596
+ criticalMin?: number | undefined;
1597
+ criticalMax?: number | undefined;
1598
+ }>>;
1599
+ }, "strip", z.ZodTypeAny, {
1600
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1601
+ name: string;
1602
+ latitude: number;
1603
+ longitude: number;
1604
+ model?: string | undefined;
1605
+ serialNumber?: string | undefined;
1606
+ manufacturer?: string | undefined;
1607
+ readingInterval?: number | undefined;
1608
+ alertThresholds?: {
1609
+ min?: number | undefined;
1610
+ max?: number | undefined;
1611
+ criticalMin?: number | undefined;
1612
+ criticalMax?: number | undefined;
1613
+ } | undefined;
1614
+ }, {
1615
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1616
+ name: string;
1617
+ latitude: number;
1618
+ longitude: number;
1619
+ model?: string | undefined;
1620
+ serialNumber?: string | undefined;
1621
+ manufacturer?: string | undefined;
1622
+ readingInterval?: number | undefined;
1623
+ alertThresholds?: {
1624
+ min?: number | undefined;
1625
+ max?: number | undefined;
1626
+ criticalMin?: number | undefined;
1627
+ criticalMax?: number | undefined;
1628
+ } | undefined;
1629
+ }>;
1630
+ path: "/farms/:farmId/fields/:fieldId/sensors";
1631
+ responses: {
1632
+ 201: z.ZodObject<{
1633
+ id: z.ZodString;
1634
+ name: z.ZodString;
1635
+ type: z.ZodEnum<["SOIL_MOISTURE", "TEMPERATURE", "HUMIDITY", "SOIL_TEMPERATURE", "RAIN_GAUGE", "WIND", "LIGHT", "PH", "EC", "MULTI"]>;
1636
+ location: z.ZodObject<{
1637
+ lat: z.ZodNumber;
1638
+ lng: z.ZodNumber;
1639
+ }, "strip", z.ZodTypeAny, {
1640
+ lat: number;
1641
+ lng: number;
1642
+ }, {
1643
+ lat: number;
1644
+ lng: number;
1645
+ }>;
1646
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "ERROR", "MAINTENANCE", "LOW_BATTERY"]>;
1647
+ currentReading: z.ZodNullable<z.ZodObject<{
1648
+ value: z.ZodNumber;
1649
+ unit: z.ZodString;
1650
+ timestamp: z.ZodString;
1651
+ statusColor: z.ZodEnum<["green", "yellow", "red"]>;
1652
+ }, "strip", z.ZodTypeAny, {
1653
+ value: number;
1654
+ timestamp: string;
1655
+ unit: string;
1656
+ statusColor: "green" | "yellow" | "red";
1657
+ }, {
1658
+ value: number;
1659
+ timestamp: string;
1660
+ unit: string;
1661
+ statusColor: "green" | "yellow" | "red";
1662
+ }>>;
1663
+ batteryLevel: z.ZodNullable<z.ZodNumber>;
1664
+ lastSyncAt: z.ZodNullable<z.ZodString>;
1665
+ }, "strip", z.ZodTypeAny, {
1666
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1667
+ status: "ACTIVE" | "INACTIVE" | "ERROR" | "MAINTENANCE" | "LOW_BATTERY";
1668
+ id: string;
1669
+ name: string;
1670
+ location: {
1671
+ lat: number;
1672
+ lng: number;
1673
+ };
1674
+ currentReading: {
1675
+ value: number;
1676
+ timestamp: string;
1677
+ unit: string;
1678
+ statusColor: "green" | "yellow" | "red";
1679
+ } | null;
1680
+ batteryLevel: number | null;
1681
+ lastSyncAt: string | null;
1682
+ }, {
1683
+ type: "SOIL_MOISTURE" | "TEMPERATURE" | "HUMIDITY" | "SOIL_TEMPERATURE" | "RAIN_GAUGE" | "WIND" | "LIGHT" | "PH" | "EC" | "MULTI";
1684
+ status: "ACTIVE" | "INACTIVE" | "ERROR" | "MAINTENANCE" | "LOW_BATTERY";
1685
+ id: string;
1686
+ name: string;
1687
+ location: {
1688
+ lat: number;
1689
+ lng: number;
1690
+ };
1691
+ currentReading: {
1692
+ value: number;
1693
+ timestamp: string;
1694
+ unit: string;
1695
+ statusColor: "green" | "yellow" | "red";
1696
+ } | null;
1697
+ batteryLevel: number | null;
1698
+ lastSyncAt: string | null;
1699
+ }>;
1700
+ 404: z.ZodObject<{
1701
+ message: z.ZodString;
1702
+ code: z.ZodString;
1703
+ }, "strip", z.ZodTypeAny, {
1704
+ code: string;
1705
+ message: string;
1706
+ }, {
1707
+ code: string;
1708
+ message: string;
1709
+ }>;
1710
+ 400: z.ZodObject<{
1711
+ message: z.ZodString;
1712
+ code: z.ZodString;
1713
+ }, "strip", z.ZodTypeAny, {
1714
+ code: string;
1715
+ message: string;
1716
+ }, {
1717
+ code: string;
1718
+ message: string;
1719
+ }>;
1720
+ };
1721
+ };
1722
+ getSensorDetails: {
1723
+ query: z.ZodObject<{
1724
+ historyDays: z.ZodDefault<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
1725
+ }, "strip", z.ZodTypeAny, {
1726
+ historyDays: number;
1727
+ }, {
1728
+ historyDays?: string | undefined;
1729
+ }>;
1730
+ summary: "Get sensor details with reading history";
1731
+ method: "GET";
1732
+ path: "/farms/:farmId/fields/:fieldId/sensors/:sensorId";
1733
+ responses: {
1734
+ 200: z.ZodObject<{
1735
+ sensorId: z.ZodString;
1736
+ readings: z.ZodArray<z.ZodObject<{
1737
+ value: z.ZodNumber;
1738
+ unit: z.ZodString;
1739
+ quality: z.ZodNullable<z.ZodEnum<["good", "fair", "poor"]>>;
1740
+ readAt: z.ZodString;
1741
+ }, "strip", z.ZodTypeAny, {
1742
+ value: number;
1743
+ unit: string;
1744
+ quality: "poor" | "fair" | "good" | null;
1745
+ readAt: string;
1746
+ }, {
1747
+ value: number;
1748
+ unit: string;
1749
+ quality: "poor" | "fair" | "good" | null;
1750
+ readAt: string;
1751
+ }>, "many">;
1752
+ statistics: z.ZodObject<{
1753
+ min: z.ZodNumber;
1754
+ max: z.ZodNumber;
1755
+ avg: z.ZodNumber;
1756
+ count: z.ZodNumber;
1757
+ }, "strip", z.ZodTypeAny, {
1758
+ min: number;
1759
+ max: number;
1760
+ count: number;
1761
+ avg: number;
1762
+ }, {
1763
+ min: number;
1764
+ max: number;
1765
+ count: number;
1766
+ avg: number;
1767
+ }>;
1768
+ }, "strip", z.ZodTypeAny, {
1769
+ readings: {
1770
+ value: number;
1771
+ unit: string;
1772
+ quality: "poor" | "fair" | "good" | null;
1773
+ readAt: string;
1774
+ }[];
1775
+ statistics: {
1776
+ min: number;
1777
+ max: number;
1778
+ count: number;
1779
+ avg: number;
1780
+ };
1781
+ sensorId: string;
1782
+ }, {
1783
+ readings: {
1784
+ value: number;
1785
+ unit: string;
1786
+ quality: "poor" | "fair" | "good" | null;
1787
+ readAt: string;
1788
+ }[];
1789
+ statistics: {
1790
+ min: number;
1791
+ max: number;
1792
+ count: number;
1793
+ avg: number;
1794
+ };
1795
+ sensorId: string;
1796
+ }>;
1797
+ 404: z.ZodObject<{
1798
+ message: z.ZodString;
1799
+ code: z.ZodString;
1800
+ }, "strip", z.ZodTypeAny, {
1801
+ code: string;
1802
+ message: string;
1803
+ }, {
1804
+ code: string;
1805
+ message: string;
1806
+ }>;
1807
+ };
1808
+ };
1809
+ deleteSensor: {
1810
+ summary: "Remove a sensor";
1811
+ method: "DELETE";
1812
+ body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1813
+ path: "/farms/:farmId/fields/:fieldId/sensors/:sensorId";
1814
+ responses: {
1815
+ 204: z.ZodUndefined;
1816
+ 404: z.ZodObject<{
1817
+ message: z.ZodString;
1818
+ code: z.ZodString;
1819
+ }, "strip", z.ZodTypeAny, {
1820
+ code: string;
1821
+ message: string;
1822
+ }, {
1823
+ code: string;
1824
+ message: string;
1825
+ }>;
1826
+ };
1827
+ };
1828
+ getPhotoTimeline: {
1829
+ query: z.ZodObject<{
1830
+ startDate: z.ZodOptional<z.ZodString>;
1831
+ endDate: z.ZodOptional<z.ZodString>;
1832
+ issueType: z.ZodOptional<z.ZodEnum<["disease", "pest", "nutrient", "weed", "general", "health_check"]>>;
1833
+ groupBy: z.ZodDefault<z.ZodEnum<["day", "week", "month"]>>;
1834
+ }, "strip", z.ZodTypeAny, {
1835
+ groupBy: "day" | "week" | "month";
1836
+ startDate?: string | undefined;
1837
+ endDate?: string | undefined;
1838
+ issueType?: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check" | undefined;
1839
+ }, {
1840
+ startDate?: string | undefined;
1841
+ endDate?: string | undefined;
1842
+ issueType?: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check" | undefined;
1843
+ groupBy?: "day" | "week" | "month" | undefined;
1844
+ }>;
1845
+ summary: "Get photo timeline for field";
1846
+ method: "GET";
1847
+ path: "/farms/:farmId/fields/:fieldId/visualization/photos/timeline";
1848
+ responses: {
1849
+ 200: z.ZodObject<{
1850
+ fieldId: z.ZodString;
1851
+ dateRange: z.ZodObject<{
1852
+ start: z.ZodString;
1853
+ end: z.ZodString;
1854
+ }, "strip", z.ZodTypeAny, {
1855
+ start: string;
1856
+ end: string;
1857
+ }, {
1858
+ start: string;
1859
+ end: string;
1860
+ }>;
1861
+ timeline: z.ZodArray<z.ZodObject<{
1862
+ period: z.ZodString;
1863
+ observations: z.ZodArray<z.ZodObject<{
1864
+ id: z.ZodString;
1865
+ photoUrl: z.ZodString;
1866
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
1867
+ captureDate: z.ZodString;
1868
+ location: z.ZodNullable<z.ZodObject<{
1869
+ lat: z.ZodNumber;
1870
+ lng: z.ZodNumber;
1871
+ }, "strip", z.ZodTypeAny, {
1872
+ lat: number;
1873
+ lng: number;
1874
+ }, {
1875
+ lat: number;
1876
+ lng: number;
1877
+ }>>;
1878
+ healthScore: z.ZodNullable<z.ZodNumber>;
1879
+ issues: z.ZodArray<z.ZodString, "many">;
1880
+ cropIdentified: z.ZodNullable<z.ZodString>;
1881
+ growthStage: z.ZodNullable<z.ZodString>;
1882
+ }, "strip", z.ZodTypeAny, {
1883
+ issues: string[];
1884
+ id: string;
1885
+ location: {
1886
+ lat: number;
1887
+ lng: number;
1888
+ } | null;
1889
+ photoUrl: string;
1890
+ healthScore: number | null;
1891
+ growthStage: string | null;
1892
+ captureDate: string;
1893
+ thumbnailUrl: string | null;
1894
+ cropIdentified: string | null;
1895
+ }, {
1896
+ issues: string[];
1897
+ id: string;
1898
+ location: {
1899
+ lat: number;
1900
+ lng: number;
1901
+ } | null;
1902
+ photoUrl: string;
1903
+ healthScore: number | null;
1904
+ growthStage: string | null;
1905
+ captureDate: string;
1906
+ thumbnailUrl: string | null;
1907
+ cropIdentified: string | null;
1908
+ }>, "many">;
1909
+ summary: z.ZodObject<{
1910
+ count: z.ZodNumber;
1911
+ avgHealthScore: z.ZodNullable<z.ZodNumber>;
1912
+ issueCount: z.ZodNumber;
1913
+ }, "strip", z.ZodTypeAny, {
1914
+ count: number;
1915
+ avgHealthScore: number | null;
1916
+ issueCount: number;
1917
+ }, {
1918
+ count: number;
1919
+ avgHealthScore: number | null;
1920
+ issueCount: number;
1921
+ }>;
1922
+ }, "strip", z.ZodTypeAny, {
1923
+ summary: {
1924
+ count: number;
1925
+ avgHealthScore: number | null;
1926
+ issueCount: number;
1927
+ };
1928
+ period: string;
1929
+ observations: {
1930
+ issues: string[];
1931
+ id: string;
1932
+ location: {
1933
+ lat: number;
1934
+ lng: number;
1935
+ } | null;
1936
+ photoUrl: string;
1937
+ healthScore: number | null;
1938
+ growthStage: string | null;
1939
+ captureDate: string;
1940
+ thumbnailUrl: string | null;
1941
+ cropIdentified: string | null;
1942
+ }[];
1943
+ }, {
1944
+ summary: {
1945
+ count: number;
1946
+ avgHealthScore: number | null;
1947
+ issueCount: number;
1948
+ };
1949
+ period: string;
1950
+ observations: {
1951
+ issues: string[];
1952
+ id: string;
1953
+ location: {
1954
+ lat: number;
1955
+ lng: number;
1956
+ } | null;
1957
+ photoUrl: string;
1958
+ healthScore: number | null;
1959
+ growthStage: string | null;
1960
+ captureDate: string;
1961
+ thumbnailUrl: string | null;
1962
+ cropIdentified: string | null;
1963
+ }[];
1964
+ }>, "many">;
1965
+ totalPhotos: z.ZodNumber;
1966
+ }, "strip", z.ZodTypeAny, {
1967
+ fieldId: string;
1968
+ dateRange: {
1969
+ start: string;
1970
+ end: string;
1971
+ };
1972
+ timeline: {
1973
+ summary: {
1974
+ count: number;
1975
+ avgHealthScore: number | null;
1976
+ issueCount: number;
1977
+ };
1978
+ period: string;
1979
+ observations: {
1980
+ issues: string[];
1981
+ id: string;
1982
+ location: {
1983
+ lat: number;
1984
+ lng: number;
1985
+ } | null;
1986
+ photoUrl: string;
1987
+ healthScore: number | null;
1988
+ growthStage: string | null;
1989
+ captureDate: string;
1990
+ thumbnailUrl: string | null;
1991
+ cropIdentified: string | null;
1992
+ }[];
1993
+ }[];
1994
+ totalPhotos: number;
1995
+ }, {
1996
+ fieldId: string;
1997
+ dateRange: {
1998
+ start: string;
1999
+ end: string;
2000
+ };
2001
+ timeline: {
2002
+ summary: {
2003
+ count: number;
2004
+ avgHealthScore: number | null;
2005
+ issueCount: number;
2006
+ };
2007
+ period: string;
2008
+ observations: {
2009
+ issues: string[];
2010
+ id: string;
2011
+ location: {
2012
+ lat: number;
2013
+ lng: number;
2014
+ } | null;
2015
+ photoUrl: string;
2016
+ healthScore: number | null;
2017
+ growthStage: string | null;
2018
+ captureDate: string;
2019
+ thumbnailUrl: string | null;
2020
+ cropIdentified: string | null;
2021
+ }[];
2022
+ }[];
2023
+ totalPhotos: number;
2024
+ }>;
2025
+ 404: z.ZodObject<{
2026
+ message: z.ZodString;
2027
+ code: z.ZodString;
2028
+ }, "strip", z.ZodTypeAny, {
2029
+ code: string;
2030
+ message: string;
2031
+ }, {
2032
+ code: string;
2033
+ message: string;
2034
+ }>;
2035
+ };
2036
+ };
2037
+ getPhotoMapPins: {
2038
+ query: z.ZodObject<{
2039
+ startDate: z.ZodOptional<z.ZodString>;
2040
+ endDate: z.ZodOptional<z.ZodString>;
2041
+ minHealthScore: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
2042
+ maxHealthScore: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
2043
+ }, "strip", z.ZodTypeAny, {
2044
+ startDate?: string | undefined;
2045
+ endDate?: string | undefined;
2046
+ minHealthScore?: number | undefined;
2047
+ maxHealthScore?: number | undefined;
2048
+ }, {
2049
+ startDate?: string | undefined;
2050
+ endDate?: string | undefined;
2051
+ minHealthScore?: string | undefined;
2052
+ maxHealthScore?: string | undefined;
2053
+ }>;
2054
+ summary: "Get photo pins for map overlay";
2055
+ method: "GET";
2056
+ path: "/farms/:farmId/fields/:fieldId/visualization/photos/pins";
2057
+ responses: {
2058
+ 200: z.ZodObject<{
2059
+ fieldId: z.ZodString;
2060
+ pins: z.ZodArray<z.ZodObject<{
2061
+ id: z.ZodString;
2062
+ location: z.ZodObject<{
2063
+ lat: z.ZodNumber;
2064
+ lng: z.ZodNumber;
2065
+ }, "strip", z.ZodTypeAny, {
2066
+ lat: number;
2067
+ lng: number;
2068
+ }, {
2069
+ lat: number;
2070
+ lng: number;
2071
+ }>;
2072
+ photoUrl: z.ZodString;
2073
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
2074
+ captureDate: z.ZodString;
2075
+ healthScore: z.ZodNullable<z.ZodNumber>;
2076
+ status: z.ZodEnum<["healthy", "moderate", "concerning", "critical"]>;
2077
+ pinColor: z.ZodString;
2078
+ issues: z.ZodArray<z.ZodObject<{
2079
+ type: z.ZodString;
2080
+ severity: z.ZodString;
2081
+ confidence: z.ZodNumber;
2082
+ }, "strip", z.ZodTypeAny, {
2083
+ type: string;
2084
+ severity: string;
2085
+ confidence: number;
2086
+ }, {
2087
+ type: string;
2088
+ severity: string;
2089
+ confidence: number;
2090
+ }>, "many">;
2091
+ cropIdentified: z.ZodNullable<z.ZodString>;
2092
+ }, "strip", z.ZodTypeAny, {
2093
+ status: "critical" | "healthy" | "moderate" | "concerning";
2094
+ issues: {
2095
+ type: string;
2096
+ severity: string;
2097
+ confidence: number;
2098
+ }[];
2099
+ id: string;
2100
+ location: {
2101
+ lat: number;
2102
+ lng: number;
2103
+ };
2104
+ photoUrl: string;
2105
+ healthScore: number | null;
2106
+ captureDate: string;
2107
+ thumbnailUrl: string | null;
2108
+ cropIdentified: string | null;
2109
+ pinColor: string;
2110
+ }, {
2111
+ status: "critical" | "healthy" | "moderate" | "concerning";
2112
+ issues: {
2113
+ type: string;
2114
+ severity: string;
2115
+ confidence: number;
2116
+ }[];
2117
+ id: string;
2118
+ location: {
2119
+ lat: number;
2120
+ lng: number;
2121
+ };
2122
+ photoUrl: string;
2123
+ healthScore: number | null;
2124
+ captureDate: string;
2125
+ thumbnailUrl: string | null;
2126
+ cropIdentified: string | null;
2127
+ pinColor: string;
2128
+ }>, "many">;
2129
+ clusters: z.ZodOptional<z.ZodArray<z.ZodObject<{
2130
+ centroid: z.ZodObject<{
2131
+ lat: z.ZodNumber;
2132
+ lng: z.ZodNumber;
2133
+ }, "strip", z.ZodTypeAny, {
2134
+ lat: number;
2135
+ lng: number;
2136
+ }, {
2137
+ lat: number;
2138
+ lng: number;
2139
+ }>;
2140
+ count: z.ZodNumber;
2141
+ avgHealthScore: z.ZodNullable<z.ZodNumber>;
2142
+ }, "strip", z.ZodTypeAny, {
2143
+ count: number;
2144
+ avgHealthScore: number | null;
2145
+ centroid: {
2146
+ lat: number;
2147
+ lng: number;
2148
+ };
2149
+ }, {
2150
+ count: number;
2151
+ avgHealthScore: number | null;
2152
+ centroid: {
2153
+ lat: number;
2154
+ lng: number;
2155
+ };
2156
+ }>, "many">>;
2157
+ totalPins: z.ZodNumber;
2158
+ }, "strip", z.ZodTypeAny, {
2159
+ fieldId: string;
2160
+ pins: {
2161
+ status: "critical" | "healthy" | "moderate" | "concerning";
2162
+ issues: {
2163
+ type: string;
2164
+ severity: string;
2165
+ confidence: number;
2166
+ }[];
2167
+ id: string;
2168
+ location: {
2169
+ lat: number;
2170
+ lng: number;
2171
+ };
2172
+ photoUrl: string;
2173
+ healthScore: number | null;
2174
+ captureDate: string;
2175
+ thumbnailUrl: string | null;
2176
+ cropIdentified: string | null;
2177
+ pinColor: string;
2178
+ }[];
2179
+ totalPins: number;
2180
+ clusters?: {
2181
+ count: number;
2182
+ avgHealthScore: number | null;
2183
+ centroid: {
2184
+ lat: number;
2185
+ lng: number;
2186
+ };
2187
+ }[] | undefined;
2188
+ }, {
2189
+ fieldId: string;
2190
+ pins: {
2191
+ status: "critical" | "healthy" | "moderate" | "concerning";
2192
+ issues: {
2193
+ type: string;
2194
+ severity: string;
2195
+ confidence: number;
2196
+ }[];
2197
+ id: string;
2198
+ location: {
2199
+ lat: number;
2200
+ lng: number;
2201
+ };
2202
+ photoUrl: string;
2203
+ healthScore: number | null;
2204
+ captureDate: string;
2205
+ thumbnailUrl: string | null;
2206
+ cropIdentified: string | null;
2207
+ pinColor: string;
2208
+ }[];
2209
+ totalPins: number;
2210
+ clusters?: {
2211
+ count: number;
2212
+ avgHealthScore: number | null;
2213
+ centroid: {
2214
+ lat: number;
2215
+ lng: number;
2216
+ };
2217
+ }[] | undefined;
2218
+ }>;
2219
+ 404: z.ZodObject<{
2220
+ message: z.ZodString;
2221
+ code: z.ZodString;
2222
+ }, "strip", z.ZodTypeAny, {
2223
+ code: string;
2224
+ message: string;
2225
+ }, {
2226
+ code: string;
2227
+ message: string;
2228
+ }>;
2229
+ };
2230
+ };
2231
+ getCameras: {
2232
+ summary: "List cameras for field";
2233
+ method: "GET";
2234
+ path: "/farms/:farmId/fields/:fieldId/cameras";
2235
+ responses: {
2236
+ 200: z.ZodObject<{
2237
+ fieldId: z.ZodString;
2238
+ cameras: z.ZodArray<z.ZodObject<{
2239
+ id: z.ZodString;
2240
+ name: z.ZodString;
2241
+ type: z.ZodEnum<["IP_CAMERA", "WEBCAM", "TRAIL_CAM", "DRONE", "PHONE"]>;
2242
+ location: z.ZodObject<{
2243
+ lat: z.ZodNumber;
2244
+ lng: z.ZodNumber;
2245
+ }, "strip", z.ZodTypeAny, {
2246
+ lat: number;
2247
+ lng: number;
2248
+ }, {
2249
+ lat: number;
2250
+ lng: number;
2251
+ }>;
2252
+ status: z.ZodEnum<["ONLINE", "OFFLINE", "ERROR", "MAINTENANCE", "RECORDING"]>;
2253
+ lastFrameUrl: z.ZodNullable<z.ZodString>;
2254
+ lastFrameAt: z.ZodNullable<z.ZodString>;
2255
+ direction: z.ZodNullable<z.ZodNumber>;
2256
+ fieldOfView: z.ZodNullable<z.ZodNumber>;
2257
+ streamEnabled: z.ZodBoolean;
2258
+ }, "strip", z.ZodTypeAny, {
2259
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2260
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2261
+ id: string;
2262
+ name: string;
2263
+ location: {
2264
+ lat: number;
2265
+ lng: number;
2266
+ };
2267
+ direction: number | null;
2268
+ lastFrameUrl: string | null;
2269
+ lastFrameAt: string | null;
2270
+ fieldOfView: number | null;
2271
+ streamEnabled: boolean;
2272
+ }, {
2273
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2274
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2275
+ id: string;
2276
+ name: string;
2277
+ location: {
2278
+ lat: number;
2279
+ lng: number;
2280
+ };
2281
+ direction: number | null;
2282
+ lastFrameUrl: string | null;
2283
+ lastFrameAt: string | null;
2284
+ fieldOfView: number | null;
2285
+ streamEnabled: boolean;
2286
+ }>, "many">;
2287
+ totalCameras: z.ZodNumber;
2288
+ }, "strip", z.ZodTypeAny, {
2289
+ fieldId: string;
2290
+ cameras: {
2291
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2292
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2293
+ id: string;
2294
+ name: string;
2295
+ location: {
2296
+ lat: number;
2297
+ lng: number;
2298
+ };
2299
+ direction: number | null;
2300
+ lastFrameUrl: string | null;
2301
+ lastFrameAt: string | null;
2302
+ fieldOfView: number | null;
2303
+ streamEnabled: boolean;
2304
+ }[];
2305
+ totalCameras: number;
2306
+ }, {
2307
+ fieldId: string;
2308
+ cameras: {
2309
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2310
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2311
+ id: string;
2312
+ name: string;
2313
+ location: {
2314
+ lat: number;
2315
+ lng: number;
2316
+ };
2317
+ direction: number | null;
2318
+ lastFrameUrl: string | null;
2319
+ lastFrameAt: string | null;
2320
+ fieldOfView: number | null;
2321
+ streamEnabled: boolean;
2322
+ }[];
2323
+ totalCameras: number;
2324
+ }>;
2325
+ 404: z.ZodObject<{
2326
+ message: z.ZodString;
2327
+ code: z.ZodString;
2328
+ }, "strip", z.ZodTypeAny, {
2329
+ code: string;
2330
+ message: string;
2331
+ }, {
2332
+ code: string;
2333
+ message: string;
2334
+ }>;
2335
+ };
2336
+ };
2337
+ createCamera: {
2338
+ summary: "Register a new camera";
2339
+ method: "POST";
2340
+ body: z.ZodObject<{
2341
+ name: z.ZodString;
2342
+ type: z.ZodEnum<["IP_CAMERA", "WEBCAM", "TRAIL_CAM", "DRONE", "PHONE"]>;
2343
+ latitude: z.ZodNumber;
2344
+ longitude: z.ZodNumber;
2345
+ streamUrl: z.ZodOptional<z.ZodString>;
2346
+ direction: z.ZodOptional<z.ZodNumber>;
2347
+ fieldOfView: z.ZodOptional<z.ZodNumber>;
2348
+ manufacturer: z.ZodOptional<z.ZodString>;
2349
+ model: z.ZodOptional<z.ZodString>;
2350
+ resolution: z.ZodOptional<z.ZodString>;
2351
+ }, "strip", z.ZodTypeAny, {
2352
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2353
+ name: string;
2354
+ latitude: number;
2355
+ longitude: number;
2356
+ model?: string | undefined;
2357
+ direction?: number | undefined;
2358
+ resolution?: string | undefined;
2359
+ manufacturer?: string | undefined;
2360
+ fieldOfView?: number | undefined;
2361
+ streamUrl?: string | undefined;
2362
+ }, {
2363
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2364
+ name: string;
2365
+ latitude: number;
2366
+ longitude: number;
2367
+ model?: string | undefined;
2368
+ direction?: number | undefined;
2369
+ resolution?: string | undefined;
2370
+ manufacturer?: string | undefined;
2371
+ fieldOfView?: number | undefined;
2372
+ streamUrl?: string | undefined;
2373
+ }>;
2374
+ path: "/farms/:farmId/fields/:fieldId/cameras";
2375
+ responses: {
2376
+ 201: z.ZodObject<{
2377
+ id: z.ZodString;
2378
+ name: z.ZodString;
2379
+ type: z.ZodEnum<["IP_CAMERA", "WEBCAM", "TRAIL_CAM", "DRONE", "PHONE"]>;
2380
+ location: z.ZodObject<{
2381
+ lat: z.ZodNumber;
2382
+ lng: z.ZodNumber;
2383
+ }, "strip", z.ZodTypeAny, {
2384
+ lat: number;
2385
+ lng: number;
2386
+ }, {
2387
+ lat: number;
2388
+ lng: number;
2389
+ }>;
2390
+ status: z.ZodEnum<["ONLINE", "OFFLINE", "ERROR", "MAINTENANCE", "RECORDING"]>;
2391
+ lastFrameUrl: z.ZodNullable<z.ZodString>;
2392
+ lastFrameAt: z.ZodNullable<z.ZodString>;
2393
+ direction: z.ZodNullable<z.ZodNumber>;
2394
+ fieldOfView: z.ZodNullable<z.ZodNumber>;
2395
+ streamEnabled: z.ZodBoolean;
2396
+ }, "strip", z.ZodTypeAny, {
2397
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2398
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2399
+ id: string;
2400
+ name: string;
2401
+ location: {
2402
+ lat: number;
2403
+ lng: number;
2404
+ };
2405
+ direction: number | null;
2406
+ lastFrameUrl: string | null;
2407
+ lastFrameAt: string | null;
2408
+ fieldOfView: number | null;
2409
+ streamEnabled: boolean;
2410
+ }, {
2411
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2412
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2413
+ id: string;
2414
+ name: string;
2415
+ location: {
2416
+ lat: number;
2417
+ lng: number;
2418
+ };
2419
+ direction: number | null;
2420
+ lastFrameUrl: string | null;
2421
+ lastFrameAt: string | null;
2422
+ fieldOfView: number | null;
2423
+ streamEnabled: boolean;
2424
+ }>;
2425
+ 404: z.ZodObject<{
2426
+ message: z.ZodString;
2427
+ code: z.ZodString;
2428
+ }, "strip", z.ZodTypeAny, {
2429
+ code: string;
2430
+ message: string;
2431
+ }, {
2432
+ code: string;
2433
+ message: string;
2434
+ }>;
2435
+ 400: z.ZodObject<{
2436
+ message: z.ZodString;
2437
+ code: z.ZodString;
2438
+ }, "strip", z.ZodTypeAny, {
2439
+ code: string;
2440
+ message: string;
2441
+ }, {
2442
+ code: string;
2443
+ message: string;
2444
+ }>;
2445
+ };
2446
+ };
2447
+ getCameraDetails: {
2448
+ summary: "Get camera details";
2449
+ method: "GET";
2450
+ path: "/farms/:farmId/fields/:fieldId/cameras/:cameraId";
2451
+ responses: {
2452
+ 200: z.ZodObject<{
2453
+ id: z.ZodString;
2454
+ name: z.ZodString;
2455
+ type: z.ZodEnum<["IP_CAMERA", "WEBCAM", "TRAIL_CAM", "DRONE", "PHONE"]>;
2456
+ location: z.ZodObject<{
2457
+ lat: z.ZodNumber;
2458
+ lng: z.ZodNumber;
2459
+ }, "strip", z.ZodTypeAny, {
2460
+ lat: number;
2461
+ lng: number;
2462
+ }, {
2463
+ lat: number;
2464
+ lng: number;
2465
+ }>;
2466
+ status: z.ZodEnum<["ONLINE", "OFFLINE", "ERROR", "MAINTENANCE", "RECORDING"]>;
2467
+ lastFrameUrl: z.ZodNullable<z.ZodString>;
2468
+ lastFrameAt: z.ZodNullable<z.ZodString>;
2469
+ direction: z.ZodNullable<z.ZodNumber>;
2470
+ fieldOfView: z.ZodNullable<z.ZodNumber>;
2471
+ streamEnabled: z.ZodBoolean;
2472
+ }, "strip", z.ZodTypeAny, {
2473
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2474
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2475
+ id: string;
2476
+ name: string;
2477
+ location: {
2478
+ lat: number;
2479
+ lng: number;
2480
+ };
2481
+ direction: number | null;
2482
+ lastFrameUrl: string | null;
2483
+ lastFrameAt: string | null;
2484
+ fieldOfView: number | null;
2485
+ streamEnabled: boolean;
2486
+ }, {
2487
+ type: "IP_CAMERA" | "WEBCAM" | "TRAIL_CAM" | "DRONE" | "PHONE";
2488
+ status: "ERROR" | "MAINTENANCE" | "ONLINE" | "OFFLINE" | "RECORDING";
2489
+ id: string;
2490
+ name: string;
2491
+ location: {
2492
+ lat: number;
2493
+ lng: number;
2494
+ };
2495
+ direction: number | null;
2496
+ lastFrameUrl: string | null;
2497
+ lastFrameAt: string | null;
2498
+ fieldOfView: number | null;
2499
+ streamEnabled: boolean;
2500
+ }>;
2501
+ 404: z.ZodObject<{
2502
+ message: z.ZodString;
2503
+ code: z.ZodString;
2504
+ }, "strip", z.ZodTypeAny, {
2505
+ code: string;
2506
+ message: string;
2507
+ }, {
2508
+ code: string;
2509
+ message: string;
2510
+ }>;
2511
+ };
2512
+ };
2513
+ deleteCamera: {
2514
+ summary: "Remove a camera";
2515
+ method: "DELETE";
2516
+ body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2517
+ path: "/farms/:farmId/fields/:fieldId/cameras/:cameraId";
2518
+ responses: {
2519
+ 204: z.ZodUndefined;
2520
+ 404: z.ZodObject<{
2521
+ message: z.ZodString;
2522
+ code: z.ZodString;
2523
+ }, "strip", z.ZodTypeAny, {
2524
+ code: string;
2525
+ message: string;
2526
+ }, {
2527
+ code: string;
2528
+ message: string;
2529
+ }>;
2530
+ };
2531
+ };
2532
+ getTerrain: {
2533
+ query: z.ZodObject<{
2534
+ resolution: z.ZodDefault<z.ZodEnum<["low", "medium", "high"]>>;
2535
+ }, "strip", z.ZodTypeAny, {
2536
+ resolution: "low" | "medium" | "high";
2537
+ }, {
2538
+ resolution?: "low" | "medium" | "high" | undefined;
2539
+ }>;
2540
+ summary: "Get terrain elevation data for 3D visualization";
2541
+ method: "GET";
2542
+ path: "/farms/:farmId/fields/:fieldId/visualization/terrain";
2543
+ responses: {
2544
+ 200: z.ZodObject<{
2545
+ fieldId: z.ZodString;
2546
+ bounds: z.ZodObject<{
2547
+ north: z.ZodNumber;
2548
+ south: z.ZodNumber;
2549
+ east: z.ZodNumber;
2550
+ west: z.ZodNumber;
2551
+ }, "strip", z.ZodTypeAny, {
2552
+ north: number;
2553
+ south: number;
2554
+ east: number;
2555
+ west: number;
2556
+ }, {
2557
+ north: number;
2558
+ south: number;
2559
+ east: number;
2560
+ west: number;
2561
+ }>;
2562
+ elevation: z.ZodObject<{
2563
+ min: z.ZodNumber;
2564
+ max: z.ZodNumber;
2565
+ mean: z.ZodNumber;
2566
+ unit: z.ZodLiteral<"meters">;
2567
+ }, "strip", z.ZodTypeAny, {
2568
+ min: number;
2569
+ max: number;
2570
+ unit: "meters";
2571
+ mean: number;
2572
+ }, {
2573
+ min: number;
2574
+ max: number;
2575
+ unit: "meters";
2576
+ mean: number;
2577
+ }>;
2578
+ data: z.ZodObject<{
2579
+ format: z.ZodEnum<["grid", "geotiff"]>;
2580
+ gridData: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">>;
2581
+ geotiffUrl: z.ZodOptional<z.ZodString>;
2582
+ resolution: z.ZodNumber;
2583
+ }, "strip", z.ZodTypeAny, {
2584
+ resolution: number;
2585
+ format: "grid" | "geotiff";
2586
+ gridData?: number[][] | undefined;
2587
+ geotiffUrl?: string | undefined;
2588
+ }, {
2589
+ resolution: number;
2590
+ format: "grid" | "geotiff";
2591
+ gridData?: number[][] | undefined;
2592
+ geotiffUrl?: string | undefined;
2593
+ }>;
2594
+ drainagePatterns: z.ZodOptional<z.ZodObject<{
2595
+ flowDirection: z.ZodObject<{
2596
+ type: z.ZodLiteral<"FeatureCollection">;
2597
+ features: z.ZodArray<z.ZodUnknown, "many">;
2598
+ }, "strip", z.ZodTypeAny, {
2599
+ type: "FeatureCollection";
2600
+ features: unknown[];
2601
+ }, {
2602
+ type: "FeatureCollection";
2603
+ features: unknown[];
2604
+ }>;
2605
+ lowPoints: z.ZodArray<z.ZodObject<{
2606
+ lat: z.ZodNumber;
2607
+ lng: z.ZodNumber;
2608
+ elevation: z.ZodNumber;
2609
+ }, "strip", z.ZodTypeAny, {
2610
+ lat: number;
2611
+ lng: number;
2612
+ elevation: number;
2613
+ }, {
2614
+ lat: number;
2615
+ lng: number;
2616
+ elevation: number;
2617
+ }>, "many">;
2618
+ }, "strip", z.ZodTypeAny, {
2619
+ flowDirection: {
2620
+ type: "FeatureCollection";
2621
+ features: unknown[];
2622
+ };
2623
+ lowPoints: {
2624
+ lat: number;
2625
+ lng: number;
2626
+ elevation: number;
2627
+ }[];
2628
+ }, {
2629
+ flowDirection: {
2630
+ type: "FeatureCollection";
2631
+ features: unknown[];
2632
+ };
2633
+ lowPoints: {
2634
+ lat: number;
2635
+ lng: number;
2636
+ elevation: number;
2637
+ }[];
2638
+ }>>;
2639
+ }, "strip", z.ZodTypeAny, {
2640
+ data: {
2641
+ resolution: number;
2642
+ format: "grid" | "geotiff";
2643
+ gridData?: number[][] | undefined;
2644
+ geotiffUrl?: string | undefined;
2645
+ };
2646
+ fieldId: string;
2647
+ bounds: {
2648
+ north: number;
2649
+ south: number;
2650
+ east: number;
2651
+ west: number;
2652
+ };
2653
+ elevation: {
2654
+ min: number;
2655
+ max: number;
2656
+ unit: "meters";
2657
+ mean: number;
2658
+ };
2659
+ drainagePatterns?: {
2660
+ flowDirection: {
2661
+ type: "FeatureCollection";
2662
+ features: unknown[];
2663
+ };
2664
+ lowPoints: {
2665
+ lat: number;
2666
+ lng: number;
2667
+ elevation: number;
2668
+ }[];
2669
+ } | undefined;
2670
+ }, {
2671
+ data: {
2672
+ resolution: number;
2673
+ format: "grid" | "geotiff";
2674
+ gridData?: number[][] | undefined;
2675
+ geotiffUrl?: string | undefined;
2676
+ };
2677
+ fieldId: string;
2678
+ bounds: {
2679
+ north: number;
2680
+ south: number;
2681
+ east: number;
2682
+ west: number;
2683
+ };
2684
+ elevation: {
2685
+ min: number;
2686
+ max: number;
2687
+ unit: "meters";
2688
+ mean: number;
2689
+ };
2690
+ drainagePatterns?: {
2691
+ flowDirection: {
2692
+ type: "FeatureCollection";
2693
+ features: unknown[];
2694
+ };
2695
+ lowPoints: {
2696
+ lat: number;
2697
+ lng: number;
2698
+ elevation: number;
2699
+ }[];
2700
+ } | undefined;
2701
+ }>;
2702
+ 404: z.ZodObject<{
2703
+ message: z.ZodString;
2704
+ code: z.ZodString;
2705
+ }, "strip", z.ZodTypeAny, {
2706
+ code: string;
2707
+ message: string;
2708
+ }, {
2709
+ code: string;
2710
+ message: string;
2711
+ }>;
2712
+ 503: z.ZodObject<{
2713
+ message: z.ZodString;
2714
+ code: z.ZodString;
2715
+ }, "strip", z.ZodTypeAny, {
2716
+ code: string;
2717
+ message: string;
2718
+ }, {
2719
+ code: string;
2720
+ message: string;
2721
+ }>;
2722
+ };
2723
+ };
2724
+ getGrowthStages: {
2725
+ summary: "Get crop growth stage visualization data";
2726
+ method: "GET";
2727
+ path: "/farms/:farmId/fields/:fieldId/visualization/growth-stages";
2728
+ responses: {
2729
+ 200: z.ZodObject<{
2730
+ fieldId: z.ZodString;
2731
+ crop: z.ZodObject<{
2732
+ type: z.ZodString;
2733
+ variety: z.ZodNullable<z.ZodString>;
2734
+ plantingDate: z.ZodString;
2735
+ expectedHarvestDate: z.ZodString;
2736
+ }, "strip", z.ZodTypeAny, {
2737
+ type: string;
2738
+ plantingDate: string;
2739
+ expectedHarvestDate: string;
2740
+ variety: string | null;
2741
+ }, {
2742
+ type: string;
2743
+ plantingDate: string;
2744
+ expectedHarvestDate: string;
2745
+ variety: string | null;
2746
+ }>;
2747
+ currentStage: z.ZodObject<{
2748
+ name: z.ZodString;
2749
+ daysSincePlanting: z.ZodNumber;
2750
+ expectedDaysInStage: z.ZodNumber;
2751
+ progress: z.ZodNumber;
2752
+ }, "strip", z.ZodTypeAny, {
2753
+ name: string;
2754
+ daysSincePlanting: number;
2755
+ expectedDaysInStage: number;
2756
+ progress: number;
2757
+ }, {
2758
+ name: string;
2759
+ daysSincePlanting: number;
2760
+ expectedDaysInStage: number;
2761
+ progress: number;
2762
+ }>;
2763
+ timeline: z.ZodArray<z.ZodObject<{
2764
+ stage: z.ZodString;
2765
+ startDay: z.ZodNumber;
2766
+ endDay: z.ZodNumber;
2767
+ status: z.ZodEnum<["completed", "current", "upcoming"]>;
2768
+ healthDuringStage: z.ZodNullable<z.ZodNumber>;
2769
+ }, "strip", z.ZodTypeAny, {
2770
+ status: "completed" | "current" | "upcoming";
2771
+ stage: string;
2772
+ startDay: number;
2773
+ endDay: number;
2774
+ healthDuringStage: number | null;
2775
+ }, {
2776
+ status: "completed" | "current" | "upcoming";
2777
+ stage: string;
2778
+ startDay: number;
2779
+ endDay: number;
2780
+ healthDuringStage: number | null;
2781
+ }>, "many">;
2782
+ comparison: z.ZodObject<{
2783
+ actualVsExpected: z.ZodEnum<["ahead", "on-track", "behind"]>;
2784
+ deviationDays: z.ZodNumber;
2785
+ recommendation: z.ZodOptional<z.ZodString>;
2786
+ }, "strip", z.ZodTypeAny, {
2787
+ actualVsExpected: "ahead" | "on-track" | "behind";
2788
+ deviationDays: number;
2789
+ recommendation?: string | undefined;
2790
+ }, {
2791
+ actualVsExpected: "ahead" | "on-track" | "behind";
2792
+ deviationDays: number;
2793
+ recommendation?: string | undefined;
2794
+ }>;
2795
+ visualization: z.ZodObject<{
2796
+ iconSet: z.ZodString;
2797
+ currentIcon: z.ZodString;
2798
+ }, "strip", z.ZodTypeAny, {
2799
+ iconSet: string;
2800
+ currentIcon: string;
2801
+ }, {
2802
+ iconSet: string;
2803
+ currentIcon: string;
2804
+ }>;
2805
+ }, "strip", z.ZodTypeAny, {
2806
+ crop: {
2807
+ type: string;
2808
+ plantingDate: string;
2809
+ expectedHarvestDate: string;
2810
+ variety: string | null;
2811
+ };
2812
+ fieldId: string;
2813
+ currentStage: {
2814
+ name: string;
2815
+ daysSincePlanting: number;
2816
+ expectedDaysInStage: number;
2817
+ progress: number;
2818
+ };
2819
+ timeline: {
2820
+ status: "completed" | "current" | "upcoming";
2821
+ stage: string;
2822
+ startDay: number;
2823
+ endDay: number;
2824
+ healthDuringStage: number | null;
2825
+ }[];
2826
+ comparison: {
2827
+ actualVsExpected: "ahead" | "on-track" | "behind";
2828
+ deviationDays: number;
2829
+ recommendation?: string | undefined;
2830
+ };
2831
+ visualization: {
2832
+ iconSet: string;
2833
+ currentIcon: string;
2834
+ };
2835
+ }, {
2836
+ crop: {
2837
+ type: string;
2838
+ plantingDate: string;
2839
+ expectedHarvestDate: string;
2840
+ variety: string | null;
2841
+ };
2842
+ fieldId: string;
2843
+ currentStage: {
2844
+ name: string;
2845
+ daysSincePlanting: number;
2846
+ expectedDaysInStage: number;
2847
+ progress: number;
2848
+ };
2849
+ timeline: {
2850
+ status: "completed" | "current" | "upcoming";
2851
+ stage: string;
2852
+ startDay: number;
2853
+ endDay: number;
2854
+ healthDuringStage: number | null;
2855
+ }[];
2856
+ comparison: {
2857
+ actualVsExpected: "ahead" | "on-track" | "behind";
2858
+ deviationDays: number;
2859
+ recommendation?: string | undefined;
2860
+ };
2861
+ visualization: {
2862
+ iconSet: string;
2863
+ currentIcon: string;
2864
+ };
2865
+ }>;
2866
+ 404: z.ZodObject<{
2867
+ message: z.ZodString;
2868
+ code: z.ZodString;
2869
+ }, "strip", z.ZodTypeAny, {
2870
+ code: string;
2871
+ message: string;
2872
+ }, {
2873
+ code: string;
2874
+ message: string;
2875
+ }>;
2876
+ };
2877
+ };
2878
+ };
2879
+ export type MonitoringVisualizationRouter = typeof monitoringVisualizationRouter;
2880
+ //# sourceMappingURL=monitoring-visualization.routes.d.ts.map