@deepintel-ltd/farmpro-contracts 1.2.1 → 1.3.1

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