@deepintel-ltd/farmpro-contracts 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -735,21 +735,231 @@ export declare const fieldMonitoringRouter: {
735
735
  }>;
736
736
  };
737
737
  };
738
+ resolveAlert: {
739
+ summary: "Resolve an alert";
740
+ method: "PATCH";
741
+ body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
742
+ path: "/farms/:farmId/monitoring/alerts/:alertId/resolve";
743
+ responses: {
744
+ 200: z.ZodObject<{
745
+ id: z.ZodString;
746
+ fieldId: z.ZodString;
747
+ fieldName: z.ZodOptional<z.ZodString>;
748
+ type: z.ZodString;
749
+ severity: z.ZodEnum<["low", "medium", "high", "critical"]>;
750
+ title: z.ZodString;
751
+ message: z.ZodString;
752
+ recommendations: z.ZodNullable<z.ZodArray<z.ZodObject<{
753
+ priority: z.ZodNumber;
754
+ action: z.ZodString;
755
+ details: z.ZodString;
756
+ timing: z.ZodString;
757
+ severity: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
758
+ confidence: z.ZodOptional<z.ZodNumber>;
759
+ materials: z.ZodOptional<z.ZodArray<z.ZodObject<{
760
+ inventoryItemId: z.ZodOptional<z.ZodString>;
761
+ name: z.ZodString;
762
+ quantity: z.ZodNumber;
763
+ unit: z.ZodString;
764
+ costPerUnit: z.ZodOptional<z.ZodNumber>;
765
+ totalCost: z.ZodOptional<z.ZodNumber>;
766
+ availability: z.ZodOptional<z.ZodString>;
767
+ }, "strip", z.ZodTypeAny, {
768
+ name: string;
769
+ unit: string;
770
+ quantity: number;
771
+ inventoryItemId?: string | undefined;
772
+ totalCost?: number | undefined;
773
+ costPerUnit?: number | undefined;
774
+ availability?: string | undefined;
775
+ }, {
776
+ name: string;
777
+ unit: string;
778
+ quantity: number;
779
+ inventoryItemId?: string | undefined;
780
+ totalCost?: number | undefined;
781
+ costPerUnit?: number | undefined;
782
+ availability?: string | undefined;
783
+ }>, "many">>;
784
+ applicationMethod: z.ZodOptional<z.ZodString>;
785
+ expectedOutcome: z.ZodOptional<z.ZodString>;
786
+ preventiveMeasures: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
787
+ estimatedTime: z.ZodOptional<z.ZodString>;
788
+ riskLevel: z.ZodOptional<z.ZodString>;
789
+ }, "strip", z.ZodTypeAny, {
790
+ priority: number;
791
+ action: string;
792
+ details: string;
793
+ timing: string;
794
+ severity?: "critical" | "low" | "medium" | "high" | undefined;
795
+ confidence?: number | undefined;
796
+ materials?: {
797
+ name: string;
798
+ unit: string;
799
+ quantity: number;
800
+ inventoryItemId?: string | undefined;
801
+ totalCost?: number | undefined;
802
+ costPerUnit?: number | undefined;
803
+ availability?: string | undefined;
804
+ }[] | undefined;
805
+ applicationMethod?: string | undefined;
806
+ expectedOutcome?: string | undefined;
807
+ preventiveMeasures?: string[] | undefined;
808
+ estimatedTime?: string | undefined;
809
+ riskLevel?: string | undefined;
810
+ }, {
811
+ priority: number;
812
+ action: string;
813
+ details: string;
814
+ timing: string;
815
+ severity?: "critical" | "low" | "medium" | "high" | undefined;
816
+ confidence?: number | undefined;
817
+ materials?: {
818
+ name: string;
819
+ unit: string;
820
+ quantity: number;
821
+ inventoryItemId?: string | undefined;
822
+ totalCost?: number | undefined;
823
+ costPerUnit?: number | undefined;
824
+ availability?: string | undefined;
825
+ }[] | undefined;
826
+ applicationMethod?: string | undefined;
827
+ expectedOutcome?: string | undefined;
828
+ preventiveMeasures?: string[] | undefined;
829
+ estimatedTime?: string | undefined;
830
+ riskLevel?: string | undefined;
831
+ }>, "many">>;
832
+ status: z.ZodEnum<["active", "acknowledged", "resolved"]>;
833
+ acknowledgedAt: z.ZodNullable<z.ZodString>;
834
+ acknowledgedBy: z.ZodNullable<z.ZodString>;
835
+ resolvedAt: z.ZodNullable<z.ZodString>;
836
+ confidence: z.ZodNullable<z.ZodNumber>;
837
+ generatedBy: z.ZodString;
838
+ createdAt: z.ZodString;
839
+ }, "strip", z.ZodTypeAny, {
840
+ type: string;
841
+ status: "active" | "acknowledged" | "resolved";
842
+ message: string;
843
+ id: string;
844
+ title: string;
845
+ createdAt: string;
846
+ fieldId: string;
847
+ recommendations: {
848
+ priority: number;
849
+ action: string;
850
+ details: string;
851
+ timing: string;
852
+ severity?: "critical" | "low" | "medium" | "high" | undefined;
853
+ confidence?: number | undefined;
854
+ materials?: {
855
+ name: string;
856
+ unit: string;
857
+ quantity: number;
858
+ inventoryItemId?: string | undefined;
859
+ totalCost?: number | undefined;
860
+ costPerUnit?: number | undefined;
861
+ availability?: string | undefined;
862
+ }[] | undefined;
863
+ applicationMethod?: string | undefined;
864
+ expectedOutcome?: string | undefined;
865
+ preventiveMeasures?: string[] | undefined;
866
+ estimatedTime?: string | undefined;
867
+ riskLevel?: string | undefined;
868
+ }[] | null;
869
+ severity: "critical" | "low" | "medium" | "high";
870
+ confidence: number | null;
871
+ acknowledgedAt: string | null;
872
+ acknowledgedBy: string | null;
873
+ resolvedAt: string | null;
874
+ generatedBy: string;
875
+ fieldName?: string | undefined;
876
+ }, {
877
+ type: string;
878
+ status: "active" | "acknowledged" | "resolved";
879
+ message: string;
880
+ id: string;
881
+ title: string;
882
+ createdAt: string;
883
+ fieldId: string;
884
+ recommendations: {
885
+ priority: number;
886
+ action: string;
887
+ details: string;
888
+ timing: string;
889
+ severity?: "critical" | "low" | "medium" | "high" | undefined;
890
+ confidence?: number | undefined;
891
+ materials?: {
892
+ name: string;
893
+ unit: string;
894
+ quantity: number;
895
+ inventoryItemId?: string | undefined;
896
+ totalCost?: number | undefined;
897
+ costPerUnit?: number | undefined;
898
+ availability?: string | undefined;
899
+ }[] | undefined;
900
+ applicationMethod?: string | undefined;
901
+ expectedOutcome?: string | undefined;
902
+ preventiveMeasures?: string[] | undefined;
903
+ estimatedTime?: string | undefined;
904
+ riskLevel?: string | undefined;
905
+ }[] | null;
906
+ severity: "critical" | "low" | "medium" | "high";
907
+ confidence: number | null;
908
+ acknowledgedAt: string | null;
909
+ acknowledgedBy: string | null;
910
+ resolvedAt: string | null;
911
+ generatedBy: string;
912
+ fieldName?: string | undefined;
913
+ }>;
914
+ 404: z.ZodObject<{
915
+ message: z.ZodString;
916
+ code: z.ZodOptional<z.ZodString>;
917
+ }, "strip", z.ZodTypeAny, {
918
+ message: string;
919
+ code?: string | undefined;
920
+ }, {
921
+ message: string;
922
+ code?: string | undefined;
923
+ }>;
924
+ };
925
+ };
738
926
  triggerAnalysis: {
739
927
  summary: "Manually trigger field analysis";
740
928
  method: "POST";
741
- body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
929
+ body: z.ZodObject<{
930
+ force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
931
+ }, "strip", z.ZodTypeAny, {
932
+ force: boolean;
933
+ }, {
934
+ force?: boolean | undefined;
935
+ }>;
742
936
  path: "/farms/:farmId/fields/:fieldId/monitoring/analyze";
743
937
  responses: {
938
+ 200: z.ZodObject<{
939
+ message: z.ZodString;
940
+ jobId: z.ZodNullable<z.ZodString>;
941
+ nextAvailableAt: z.ZodOptional<z.ZodString>;
942
+ }, "strip", z.ZodTypeAny, {
943
+ message: string;
944
+ jobId: string | null;
945
+ nextAvailableAt?: string | undefined;
946
+ }, {
947
+ message: string;
948
+ jobId: string | null;
949
+ nextAvailableAt?: string | undefined;
950
+ }>;
744
951
  202: z.ZodObject<{
745
952
  message: z.ZodString;
746
- jobId: z.ZodString;
953
+ jobId: z.ZodNullable<z.ZodString>;
954
+ nextAvailableAt: z.ZodOptional<z.ZodString>;
747
955
  }, "strip", z.ZodTypeAny, {
748
956
  message: string;
749
- jobId: string;
957
+ jobId: string | null;
958
+ nextAvailableAt?: string | undefined;
750
959
  }, {
751
960
  message: string;
752
- jobId: string;
961
+ jobId: string | null;
962
+ nextAvailableAt?: string | undefined;
753
963
  }>;
754
964
  404: z.ZodObject<{
755
965
  message: z.ZodString;
@@ -783,6 +993,79 @@ export declare const fieldMonitoringRouter: {
783
993
  }>;
784
994
  };
785
995
  };
996
+ retryFailedJobs: {
997
+ summary: "Retry all failed field analysis jobs";
998
+ method: "POST";
999
+ body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1000
+ path: "/farms/:farmId/monitoring/queue/retry-failed";
1001
+ responses: {
1002
+ 200: z.ZodObject<{
1003
+ message: z.ZodString;
1004
+ retriedCount: z.ZodNumber;
1005
+ failedJobIds: z.ZodArray<z.ZodString, "many">;
1006
+ skippedCount: z.ZodNumber;
1007
+ skippedJobIds: z.ZodArray<z.ZodString, "many">;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ message: string;
1010
+ retriedCount: number;
1011
+ failedJobIds: string[];
1012
+ skippedCount: number;
1013
+ skippedJobIds: string[];
1014
+ }, {
1015
+ message: string;
1016
+ retriedCount: number;
1017
+ failedJobIds: string[];
1018
+ skippedCount: number;
1019
+ skippedJobIds: string[];
1020
+ }>;
1021
+ 500: z.ZodObject<{
1022
+ message: z.ZodString;
1023
+ code: z.ZodOptional<z.ZodString>;
1024
+ }, "strip", z.ZodTypeAny, {
1025
+ message: string;
1026
+ code?: string | undefined;
1027
+ }, {
1028
+ message: string;
1029
+ code?: string | undefined;
1030
+ }>;
1031
+ };
1032
+ };
1033
+ getQueueStats: {
1034
+ summary: "Get queue statistics";
1035
+ method: "GET";
1036
+ path: "/farms/:farmId/monitoring/queue/stats";
1037
+ responses: {
1038
+ 200: z.ZodObject<{
1039
+ waiting: z.ZodNumber;
1040
+ active: z.ZodNumber;
1041
+ delayed: z.ZodNumber;
1042
+ failed: z.ZodNumber;
1043
+ completed: z.ZodNumber;
1044
+ }, "strip", z.ZodTypeAny, {
1045
+ completed: number;
1046
+ failed: number;
1047
+ active: number;
1048
+ waiting: number;
1049
+ delayed: number;
1050
+ }, {
1051
+ completed: number;
1052
+ failed: number;
1053
+ active: number;
1054
+ waiting: number;
1055
+ delayed: number;
1056
+ }>;
1057
+ 500: z.ZodObject<{
1058
+ message: z.ZodString;
1059
+ code: z.ZodOptional<z.ZodString>;
1060
+ }, "strip", z.ZodTypeAny, {
1061
+ message: string;
1062
+ code?: string | undefined;
1063
+ }, {
1064
+ message: string;
1065
+ code?: string | undefined;
1066
+ }>;
1067
+ };
1068
+ };
786
1069
  getSoilCurrent: {
787
1070
  summary: "Get current soil moisture and temperature";
788
1071
  method: "GET";
@@ -936,6 +1219,7 @@ export declare const fieldMonitoringRouter: {
936
1219
  responses: {
937
1220
  200: z.ZodArray<z.ZodObject<{
938
1221
  date: z.ZodString;
1222
+ time: z.ZodOptional<z.ZodString>;
939
1223
  ndvi: z.ZodNumber;
940
1224
  source: z.ZodEnum<["sentinel-2", "landsat-8", "modis"]>;
941
1225
  cloudCoverage: z.ZodNumber;
@@ -946,12 +1230,14 @@ export declare const fieldMonitoringRouter: {
946
1230
  ndvi: number;
947
1231
  cloudCoverage: number;
948
1232
  imageCoverage: number;
1233
+ time?: string | undefined;
949
1234
  }, {
950
1235
  date: string;
951
1236
  source: "sentinel-2" | "landsat-8" | "modis";
952
1237
  ndvi: number;
953
1238
  cloudCoverage: number;
954
1239
  imageCoverage: number;
1240
+ time?: string | undefined;
955
1241
  }>, "many">;
956
1242
  404: z.ZodObject<{
957
1243
  message: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"field-monitoring.routes.d.ts","sourceRoot":"","sources":["../../src/routes/field-monitoring.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoNhC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC"}
@@ -79,12 +79,26 @@ exports.fieldMonitoringRouter = c.router({
79
79
  },
80
80
  summary: 'Acknowledge an alert',
81
81
  },
82
+ // Resolve alert
83
+ resolveAlert: {
84
+ method: 'PATCH',
85
+ path: '/farms/:farmId/monitoring/alerts/:alertId/resolve',
86
+ body: zod_1.z.object({}),
87
+ responses: {
88
+ 200: field_monitoring_schemas_1.fieldAlertSchema,
89
+ 404: field_monitoring_schemas_1.fieldMonitoringErrorResponseSchema,
90
+ },
91
+ summary: 'Resolve an alert',
92
+ },
82
93
  // Trigger manual field analysis
83
94
  triggerAnalysis: {
84
95
  method: 'POST',
85
96
  path: '/farms/:farmId/fields/:fieldId/monitoring/analyze',
86
- body: zod_1.z.object({}),
97
+ body: zod_1.z.object({
98
+ force: zod_1.z.boolean().optional().default(false),
99
+ }),
87
100
  responses: {
101
+ 200: field_monitoring_schemas_1.triggerAnalysisResponseSchema,
88
102
  202: field_monitoring_schemas_1.triggerAnalysisResponseSchema,
89
103
  404: field_monitoring_schemas_1.fieldMonitoringErrorResponseSchema,
90
104
  500: field_monitoring_schemas_1.fieldMonitoringErrorResponseSchema,
@@ -92,6 +106,39 @@ exports.fieldMonitoringRouter = c.router({
92
106
  },
93
107
  summary: 'Manually trigger field analysis',
94
108
  },
109
+ // Retry all failed jobs
110
+ retryFailedJobs: {
111
+ method: 'POST',
112
+ path: '/farms/:farmId/monitoring/queue/retry-failed',
113
+ body: zod_1.z.object({}),
114
+ responses: {
115
+ 200: zod_1.z.object({
116
+ message: zod_1.z.string(),
117
+ retriedCount: zod_1.z.number(),
118
+ failedJobIds: zod_1.z.array(zod_1.z.string()),
119
+ skippedCount: zod_1.z.number(),
120
+ skippedJobIds: zod_1.z.array(zod_1.z.string()),
121
+ }),
122
+ 500: field_monitoring_schemas_1.fieldMonitoringErrorResponseSchema,
123
+ },
124
+ summary: 'Retry all failed field analysis jobs',
125
+ },
126
+ // Get queue statistics
127
+ getQueueStats: {
128
+ method: 'GET',
129
+ path: '/farms/:farmId/monitoring/queue/stats',
130
+ responses: {
131
+ 200: zod_1.z.object({
132
+ waiting: zod_1.z.number(),
133
+ active: zod_1.z.number(),
134
+ delayed: zod_1.z.number(),
135
+ failed: zod_1.z.number(),
136
+ completed: zod_1.z.number(),
137
+ }),
138
+ 500: field_monitoring_schemas_1.fieldMonitoringErrorResponseSchema,
139
+ },
140
+ summary: 'Get queue statistics',
141
+ },
95
142
  // Soil Monitoring Endpoints
96
143
  getSoilCurrent: {
97
144
  method: 'GET',
@@ -4,26 +4,51 @@ export declare const fieldObservationsRouter: {
4
4
  summary: "Upload farm observation photo for AI analysis";
5
5
  method: "POST";
6
6
  contentType: "multipart/form-data";
7
- body: import("@ts-rest/core").ContractPlainType<{
8
- photo: File;
7
+ body: z.ZodObject<{
8
+ fieldId: z.ZodOptional<z.ZodString>;
9
+ observationType: z.ZodEnum<["disease", "pest", "nutrient", "weed", "general", "health_check"]>;
10
+ userNotes: z.ZodOptional<z.ZodString>;
11
+ cropStageAtTime: z.ZodOptional<z.ZodEnum<["planted", "germination", "vegetative", "flowering", "fruiting", "mature", "harvested"]>>;
12
+ location: z.ZodOptional<z.ZodObject<{
13
+ lat: z.ZodNumber;
14
+ lng: z.ZodNumber;
15
+ accuracy: z.ZodOptional<z.ZodNumber>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ lat: number;
18
+ lng: number;
19
+ accuracy?: number | undefined;
20
+ }, {
21
+ lat: number;
22
+ lng: number;
23
+ accuracy?: number | undefined;
24
+ }>>;
25
+ capturedAt: z.ZodOptional<z.ZodString>;
9
26
  } & {
10
- type: string;
11
- id: string;
12
- attributes: {
13
- observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
14
- location?: {
15
- lat: number;
16
- lng: number;
17
- accuracy?: number | undefined;
18
- } | undefined;
19
- fieldId?: string | undefined;
20
- capturedAt?: string | undefined;
21
- userNotes?: string | undefined;
22
- cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
23
- };
24
- relationships?: Record<string, unknown> | undefined;
25
- links?: Record<string, string> | undefined;
26
- meta?: Record<string, unknown> | undefined;
27
+ photo: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
30
+ photo: import("buffer").File;
31
+ location?: {
32
+ lat: number;
33
+ lng: number;
34
+ accuracy?: number | undefined;
35
+ } | undefined;
36
+ fieldId?: string | undefined;
37
+ capturedAt?: string | undefined;
38
+ userNotes?: string | undefined;
39
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
40
+ }, {
41
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
42
+ photo: import("buffer").File;
43
+ location?: {
44
+ lat: number;
45
+ lng: number;
46
+ accuracy?: number | undefined;
47
+ } | undefined;
48
+ fieldId?: string | undefined;
49
+ capturedAt?: string | undefined;
50
+ userNotes?: string | undefined;
51
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
27
52
  }>;
28
53
  path: "/farms/:farmId/observations";
29
54
  responses: {
@@ -66,26 +91,51 @@ export declare const fieldObservationsRouter: {
66
91
  summary: "Upload field observation photo for AI analysis";
67
92
  method: "POST";
68
93
  contentType: "multipart/form-data";
69
- body: import("@ts-rest/core").ContractPlainType<{
70
- photo: File;
94
+ body: z.ZodObject<{
95
+ fieldId: z.ZodOptional<z.ZodString>;
96
+ observationType: z.ZodEnum<["disease", "pest", "nutrient", "weed", "general", "health_check"]>;
97
+ userNotes: z.ZodOptional<z.ZodString>;
98
+ cropStageAtTime: z.ZodOptional<z.ZodEnum<["planted", "germination", "vegetative", "flowering", "fruiting", "mature", "harvested"]>>;
99
+ location: z.ZodOptional<z.ZodObject<{
100
+ lat: z.ZodNumber;
101
+ lng: z.ZodNumber;
102
+ accuracy: z.ZodOptional<z.ZodNumber>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ lat: number;
105
+ lng: number;
106
+ accuracy?: number | undefined;
107
+ }, {
108
+ lat: number;
109
+ lng: number;
110
+ accuracy?: number | undefined;
111
+ }>>;
112
+ capturedAt: z.ZodOptional<z.ZodString>;
71
113
  } & {
72
- type: string;
73
- id: string;
74
- attributes: {
75
- observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
76
- location?: {
77
- lat: number;
78
- lng: number;
79
- accuracy?: number | undefined;
80
- } | undefined;
81
- fieldId?: string | undefined;
82
- capturedAt?: string | undefined;
83
- userNotes?: string | undefined;
84
- cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
85
- };
86
- relationships?: Record<string, unknown> | undefined;
87
- links?: Record<string, string> | undefined;
88
- meta?: Record<string, unknown> | undefined;
114
+ photo: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
117
+ photo: import("buffer").File;
118
+ location?: {
119
+ lat: number;
120
+ lng: number;
121
+ accuracy?: number | undefined;
122
+ } | undefined;
123
+ fieldId?: string | undefined;
124
+ capturedAt?: string | undefined;
125
+ userNotes?: string | undefined;
126
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
127
+ }, {
128
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
129
+ photo: import("buffer").File;
130
+ location?: {
131
+ lat: number;
132
+ lng: number;
133
+ accuracy?: number | undefined;
134
+ } | undefined;
135
+ fieldId?: string | undefined;
136
+ capturedAt?: string | undefined;
137
+ userNotes?: string | undefined;
138
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
89
139
  }>;
90
140
  path: "/fields/:fieldId/observations";
91
141
  responses: {
@@ -3515,10 +3565,9 @@ export declare const fieldObservationsRouter: {
3515
3565
  deleteObservation: {
3516
3566
  summary: "Delete observation and associated photo";
3517
3567
  method: "DELETE";
3518
- body: typeof import("@ts-rest/core").ContractNoBody;
3519
3568
  path: "/observations/:id";
3520
3569
  responses: {
3521
- 204: typeof import("@ts-rest/core").ContractNoBody;
3570
+ 204: z.ZodVoid;
3522
3571
  404: z.ZodObject<{
3523
3572
  message: z.ZodString;
3524
3573
  code: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"field-observations.routes.d.ts","sourceRoot":"","sources":["../../src/routes/field-observations.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,uBAAuB;;;;;;mBAMV,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAkBJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHlC,CAAC"}
@@ -11,7 +11,7 @@ exports.fieldObservationsRouter = c.router({
11
11
  method: 'POST',
12
12
  path: '/farms/:farmId/observations',
13
13
  contentType: 'multipart/form-data',
14
- body: c.type(),
14
+ body: field_observations_schemas_1.uploadObservationBodySchema,
15
15
  responses: {
16
16
  202: zod_1.z.object({
17
17
  message: zod_1.z.string(),
@@ -28,7 +28,7 @@ exports.fieldObservationsRouter = c.router({
28
28
  method: 'POST',
29
29
  path: '/fields/:fieldId/observations',
30
30
  contentType: 'multipart/form-data',
31
- body: c.type(),
31
+ body: field_observations_schemas_1.uploadObservationBodySchema,
32
32
  responses: {
33
33
  202: zod_1.z.object({
34
34
  message: zod_1.z.string(),
@@ -86,9 +86,8 @@ exports.fieldObservationsRouter = c.router({
86
86
  deleteObservation: {
87
87
  method: 'DELETE',
88
88
  path: '/observations/:id',
89
- body: c.noBody(),
90
89
  responses: {
91
- 204: c.noBody(),
90
+ 204: zod_1.z.void(),
92
91
  404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
93
92
  },
94
93
  summary: 'Delete observation and associated photo',