@deepintel-ltd/farmpro-contracts 1.5.0 → 1.5.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/documents.routes.d.ts +377 -56
- package/dist/routes/documents.routes.d.ts.map +1 -1
- package/dist/routes/documents.routes.js +16 -1
- package/dist/routes/field-observations.routes.d.ts +6 -6
- package/dist/routes/tasks.routes.d.ts +455 -65
- package/dist/routes/tasks.routes.d.ts.map +1 -1
- package/dist/schemas/documents.schemas.d.ts +67 -45
- package/dist/schemas/documents.schemas.d.ts.map +1 -1
- package/dist/schemas/documents.schemas.js +6 -5
- package/dist/schemas/field-observations.schemas.d.ts +3 -3
- package/dist/schemas/field-observations.schemas.js +1 -1
- package/dist/schemas/tasks.schemas.d.ts +438 -62
- package/dist/schemas/tasks.schemas.d.ts.map +1 -1
- package/dist/schemas/tasks.schemas.js +17 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.routes.d.ts","sourceRoot":"","sources":["../../src/routes/documents.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"documents.routes.d.ts","sourceRoot":"","sources":["../../src/routes/documents.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJ1B,CAAC"}
|
|
@@ -35,7 +35,7 @@ exports.documentsRouter = c.router({
|
|
|
35
35
|
path: '/farms/:farmId/documents/upload',
|
|
36
36
|
contentType: 'multipart/form-data',
|
|
37
37
|
pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
|
|
38
|
-
body: documents_schemas_1.uploadFileBodySchema,
|
|
38
|
+
body: zod_1.z.union([documents_schemas_1.uploadFileBodySchema, zod_1.z.undefined()]),
|
|
39
39
|
responses: {
|
|
40
40
|
200: documents_schemas_1.uploadedFileResponseSchema,
|
|
41
41
|
400: common_schemas_1.jsonApiErrorResponseSchema,
|
|
@@ -132,4 +132,19 @@ exports.documentsRouter = c.router({
|
|
|
132
132
|
summary: 'Delete document',
|
|
133
133
|
description: 'Delete a document record',
|
|
134
134
|
},
|
|
135
|
+
viewDocument: {
|
|
136
|
+
method: 'GET',
|
|
137
|
+
path: '/documents/view/:docId',
|
|
138
|
+
pathParams: zod_1.z.object({
|
|
139
|
+
docId: zod_1.z.string(),
|
|
140
|
+
}),
|
|
141
|
+
responses: {
|
|
142
|
+
200: zod_1.z.any(),
|
|
143
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
144
|
+
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
145
|
+
403: common_schemas_1.jsonApiErrorResponseSchema,
|
|
146
|
+
},
|
|
147
|
+
summary: 'View document file',
|
|
148
|
+
description: 'Stream or download a document file by its UUID. Extension is optional - both /documents/view/{docId} and /documents/view/{docId}.{ext} work for the same file.',
|
|
149
|
+
},
|
|
135
150
|
});
|
|
@@ -24,10 +24,9 @@ export declare const fieldObservationsRouter: {
|
|
|
24
24
|
}>>;
|
|
25
25
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
26
26
|
} & {
|
|
27
|
-
photo: z.
|
|
27
|
+
photo: z.ZodAny;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
29
|
observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
|
|
30
|
-
photo: import("buffer").File;
|
|
31
30
|
location?: {
|
|
32
31
|
lat: number;
|
|
33
32
|
lng: number;
|
|
@@ -37,9 +36,9 @@ export declare const fieldObservationsRouter: {
|
|
|
37
36
|
capturedAt?: string | undefined;
|
|
38
37
|
userNotes?: string | undefined;
|
|
39
38
|
cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
|
|
39
|
+
photo?: any;
|
|
40
40
|
}, {
|
|
41
41
|
observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
|
|
42
|
-
photo: import("buffer").File;
|
|
43
42
|
location?: {
|
|
44
43
|
lat: number;
|
|
45
44
|
lng: number;
|
|
@@ -49,6 +48,7 @@ export declare const fieldObservationsRouter: {
|
|
|
49
48
|
capturedAt?: string | undefined;
|
|
50
49
|
userNotes?: string | undefined;
|
|
51
50
|
cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
|
|
51
|
+
photo?: any;
|
|
52
52
|
}>;
|
|
53
53
|
path: "/farms/:farmId/observations";
|
|
54
54
|
responses: {
|
|
@@ -111,10 +111,9 @@ export declare const fieldObservationsRouter: {
|
|
|
111
111
|
}>>;
|
|
112
112
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
113
113
|
} & {
|
|
114
|
-
photo: z.
|
|
114
|
+
photo: z.ZodAny;
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
116
|
observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
|
|
117
|
-
photo: import("buffer").File;
|
|
118
117
|
location?: {
|
|
119
118
|
lat: number;
|
|
120
119
|
lng: number;
|
|
@@ -124,9 +123,9 @@ export declare const fieldObservationsRouter: {
|
|
|
124
123
|
capturedAt?: string | undefined;
|
|
125
124
|
userNotes?: string | undefined;
|
|
126
125
|
cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
|
|
126
|
+
photo?: any;
|
|
127
127
|
}, {
|
|
128
128
|
observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
|
|
129
|
-
photo: import("buffer").File;
|
|
130
129
|
location?: {
|
|
131
130
|
lat: number;
|
|
132
131
|
lng: number;
|
|
@@ -136,6 +135,7 @@ export declare const fieldObservationsRouter: {
|
|
|
136
135
|
capturedAt?: string | undefined;
|
|
137
136
|
userNotes?: string | undefined;
|
|
138
137
|
cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
|
|
138
|
+
photo?: any;
|
|
139
139
|
}>;
|
|
140
140
|
path: "/fields/:fieldId/observations";
|
|
141
141
|
responses: {
|