@deepintel-ltd/farmpro-contracts 1.4.1 → 1.4.2
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.
- package/dist/routes/field-observations.routes.d.ts +89 -40
- package/dist/routes/field-observations.routes.d.ts.map +1 -1
- package/dist/routes/field-observations.routes.js +3 -4
- package/dist/schemas/field-observations.schemas.d.ts +46 -0
- package/dist/schemas/field-observations.schemas.d.ts.map +1 -1
- package/dist/schemas/field-observations.schemas.js +4 -1
- package/package.json +1 -1
|
@@ -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:
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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:
|
|
70
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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:
|
|
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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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:
|
|
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:
|
|
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:
|
|
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',
|
|
@@ -1111,6 +1111,52 @@ export declare const createObservationInputSchema: z.ZodObject<{
|
|
|
1111
1111
|
links?: Record<string, string> | undefined;
|
|
1112
1112
|
meta?: Record<string, unknown> | undefined;
|
|
1113
1113
|
}>;
|
|
1114
|
+
export declare const uploadObservationBodySchema: z.ZodObject<{
|
|
1115
|
+
fieldId: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
observationType: z.ZodEnum<["disease", "pest", "nutrient", "weed", "general", "health_check"]>;
|
|
1117
|
+
userNotes: z.ZodOptional<z.ZodString>;
|
|
1118
|
+
cropStageAtTime: z.ZodOptional<z.ZodEnum<["planted", "germination", "vegetative", "flowering", "fruiting", "mature", "harvested"]>>;
|
|
1119
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
1120
|
+
lat: z.ZodNumber;
|
|
1121
|
+
lng: z.ZodNumber;
|
|
1122
|
+
accuracy: z.ZodOptional<z.ZodNumber>;
|
|
1123
|
+
}, "strip", z.ZodTypeAny, {
|
|
1124
|
+
lat: number;
|
|
1125
|
+
lng: number;
|
|
1126
|
+
accuracy?: number | undefined;
|
|
1127
|
+
}, {
|
|
1128
|
+
lat: number;
|
|
1129
|
+
lng: number;
|
|
1130
|
+
accuracy?: number | undefined;
|
|
1131
|
+
}>>;
|
|
1132
|
+
capturedAt: z.ZodOptional<z.ZodString>;
|
|
1133
|
+
} & {
|
|
1134
|
+
photo: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
|
|
1135
|
+
}, "strip", z.ZodTypeAny, {
|
|
1136
|
+
observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
|
|
1137
|
+
photo: import("buffer").File;
|
|
1138
|
+
location?: {
|
|
1139
|
+
lat: number;
|
|
1140
|
+
lng: number;
|
|
1141
|
+
accuracy?: number | undefined;
|
|
1142
|
+
} | undefined;
|
|
1143
|
+
fieldId?: string | undefined;
|
|
1144
|
+
capturedAt?: string | undefined;
|
|
1145
|
+
userNotes?: string | undefined;
|
|
1146
|
+
cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
|
|
1147
|
+
}, {
|
|
1148
|
+
observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
|
|
1149
|
+
photo: import("buffer").File;
|
|
1150
|
+
location?: {
|
|
1151
|
+
lat: number;
|
|
1152
|
+
lng: number;
|
|
1153
|
+
accuracy?: number | undefined;
|
|
1154
|
+
} | undefined;
|
|
1155
|
+
fieldId?: string | undefined;
|
|
1156
|
+
capturedAt?: string | undefined;
|
|
1157
|
+
userNotes?: string | undefined;
|
|
1158
|
+
cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
|
|
1159
|
+
}>;
|
|
1114
1160
|
export declare const updateObservationActionInputSchema: z.ZodObject<{
|
|
1115
1161
|
type: z.ZodLiteral<string>;
|
|
1116
1162
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-observations.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/field-observations.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,kCAAkC,CAC1C,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.observationStatsQuerySchema = exports.observationListQuerySchema = exports.observationListResponseSchema = exports.observationResponseSchema = exports.updateObservationActionInputSchema = exports.createObservationInputSchema = exports.observationResourceSchema = exports.updateObservationActionAttributesSchema = exports.createObservationAttributesSchema = exports.observationAttributesSchema = void 0;
|
|
3
|
+
exports.observationStatsQuerySchema = exports.observationListQuerySchema = exports.observationListResponseSchema = exports.observationResponseSchema = exports.updateObservationActionInputSchema = exports.uploadObservationBodySchema = exports.createObservationInputSchema = exports.observationResourceSchema = exports.updateObservationActionAttributesSchema = exports.createObservationAttributesSchema = exports.observationAttributesSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_schemas_1 = require("./common.schemas");
|
|
6
6
|
const recommendations_schemas_1 = require("./recommendations.schemas");
|
|
@@ -139,6 +139,9 @@ exports.updateObservationActionAttributesSchema = zod_1.z.object({
|
|
|
139
139
|
// JSON:API resource schemas
|
|
140
140
|
exports.observationResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('observations', exports.observationAttributesSchema);
|
|
141
141
|
exports.createObservationInputSchema = (0, common_schemas_1.createJsonApiResourceSchema)('observations', exports.createObservationAttributesSchema);
|
|
142
|
+
exports.uploadObservationBodySchema = exports.createObservationAttributesSchema.merge(zod_1.z.object({
|
|
143
|
+
photo: zod_1.z.instanceof(File),
|
|
144
|
+
}));
|
|
142
145
|
exports.updateObservationActionInputSchema = (0, common_schemas_1.createJsonApiResourceSchema)('observations', exports.updateObservationActionAttributesSchema);
|
|
143
146
|
// Response schemas
|
|
144
147
|
exports.observationResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.observationResourceSchema);
|