@deepintel-ltd/farmpro-contracts 1.7.8 → 1.7.9
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/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/routes/crop-profile.routes.d.ts +556 -0
- package/dist/routes/crop-profile.routes.d.ts.map +1 -0
- package/dist/routes/crop-profile.routes.js +55 -0
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -0
- package/dist/routes/measurements.routes.d.ts +1081 -0
- package/dist/routes/measurements.routes.d.ts.map +1 -0
- package/dist/routes/measurements.routes.js +69 -0
- package/dist/routes/monitoring-visualization.routes.d.ts +1637 -0
- package/dist/routes/monitoring-visualization.routes.d.ts.map +1 -1
- package/dist/routes/monitoring-visualization.routes.js +153 -0
- package/dist/routes/prescription-maps.routes.d.ts +1611 -40
- package/dist/routes/prescription-maps.routes.d.ts.map +1 -1
- package/dist/routes/prescription-maps.routes.js +75 -1
- package/dist/schemas/crop-profile.schemas.d.ts +724 -0
- package/dist/schemas/crop-profile.schemas.d.ts.map +1 -0
- package/dist/schemas/crop-profile.schemas.js +84 -0
- package/dist/schemas/measurements.schemas.d.ts +234 -0
- package/dist/schemas/measurements.schemas.d.ts.map +1 -0
- package/dist/schemas/measurements.schemas.js +57 -0
- package/dist/schemas/monitoring-visualization.schemas.d.ts +1703 -0
- package/dist/schemas/monitoring-visualization.schemas.d.ts.map +1 -1
- package/dist/schemas/monitoring-visualization.schemas.js +338 -0
- package/dist/schemas/prescription-maps.schemas.d.ts +400 -41
- package/dist/schemas/prescription-maps.schemas.d.ts.map +1 -1
- package/dist/schemas/prescription-maps.schemas.js +95 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measurements.routes.d.ts","sourceRoot":"","sources":["../../src/routes/measurements.routes.ts"],"names":[],"mappings":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D7B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { initContract } from '@ts-rest/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { measurementListResponseSchema, measurementSingleResponseSchema, createMeasurementBodySchema, measurementListQuerySchema, } from '../schemas/measurements.schemas';
|
|
4
|
+
import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
|
|
5
|
+
const c = initContract();
|
|
6
|
+
export const measurementsRouter = c.router({
|
|
7
|
+
list: {
|
|
8
|
+
method: 'GET',
|
|
9
|
+
path: '/farms/:farmId/fields/:fieldId/measurements',
|
|
10
|
+
pathParams: z.object({
|
|
11
|
+
farmId: z.string().uuid(),
|
|
12
|
+
fieldId: z.string().uuid(),
|
|
13
|
+
}),
|
|
14
|
+
query: measurementListQuerySchema,
|
|
15
|
+
responses: {
|
|
16
|
+
200: measurementListResponseSchema,
|
|
17
|
+
403: jsonApiErrorResponseSchema,
|
|
18
|
+
404: jsonApiErrorResponseSchema,
|
|
19
|
+
},
|
|
20
|
+
summary: 'List measurements for a field',
|
|
21
|
+
},
|
|
22
|
+
getOne: {
|
|
23
|
+
method: 'GET',
|
|
24
|
+
path: '/farms/:farmId/fields/:fieldId/measurements/:measurementId',
|
|
25
|
+
pathParams: z.object({
|
|
26
|
+
farmId: z.string().uuid(),
|
|
27
|
+
fieldId: z.string().uuid(),
|
|
28
|
+
measurementId: z.string().uuid(),
|
|
29
|
+
}),
|
|
30
|
+
responses: {
|
|
31
|
+
200: measurementSingleResponseSchema,
|
|
32
|
+
403: jsonApiErrorResponseSchema,
|
|
33
|
+
404: jsonApiErrorResponseSchema,
|
|
34
|
+
},
|
|
35
|
+
summary: 'Get measurement by ID',
|
|
36
|
+
},
|
|
37
|
+
create: {
|
|
38
|
+
method: 'POST',
|
|
39
|
+
path: '/farms/:farmId/fields/:fieldId/measurements',
|
|
40
|
+
pathParams: z.object({
|
|
41
|
+
farmId: z.string().uuid(),
|
|
42
|
+
fieldId: z.string().uuid(),
|
|
43
|
+
}),
|
|
44
|
+
body: createMeasurementBodySchema,
|
|
45
|
+
responses: {
|
|
46
|
+
201: measurementSingleResponseSchema,
|
|
47
|
+
400: jsonApiErrorResponseSchema,
|
|
48
|
+
403: jsonApiErrorResponseSchema,
|
|
49
|
+
404: jsonApiErrorResponseSchema,
|
|
50
|
+
},
|
|
51
|
+
summary: 'Create measurement',
|
|
52
|
+
},
|
|
53
|
+
delete: {
|
|
54
|
+
method: 'DELETE',
|
|
55
|
+
path: '/farms/:farmId/fields/:fieldId/measurements/:measurementId',
|
|
56
|
+
pathParams: z.object({
|
|
57
|
+
farmId: z.string().uuid(),
|
|
58
|
+
fieldId: z.string().uuid(),
|
|
59
|
+
measurementId: z.string().uuid(),
|
|
60
|
+
}),
|
|
61
|
+
body: z.object({}),
|
|
62
|
+
responses: {
|
|
63
|
+
204: z.object({}),
|
|
64
|
+
403: jsonApiErrorResponseSchema,
|
|
65
|
+
404: jsonApiErrorResponseSchema,
|
|
66
|
+
},
|
|
67
|
+
summary: 'Delete measurement',
|
|
68
|
+
},
|
|
69
|
+
});
|