@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prescription-maps.routes.d.ts","sourceRoot":"","sources":["../../src/routes/prescription-maps.routes.ts"],"names":[],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2IjC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { prescriptionMapListResponseSchema, prescriptionMapSingleResponseSchema, createPrescriptionMapBodySchema, updatePrescriptionStatusBodySchema, } from '../schemas/prescription-maps.schemas';
|
|
3
|
+
import { prescriptionMapListResponseSchema, prescriptionMapSingleResponseSchema, createPrescriptionMapBodySchema, updatePrescriptionStatusBodySchema, generateZonesRequestSchema, zoneStatsResponseSchema, exportRequestSchema, exportResponseSchema, exportListResponseSchema, } from '../schemas/prescription-maps.schemas';
|
|
4
4
|
import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
|
|
5
5
|
const c = initContract();
|
|
6
6
|
export const prescriptionMapsRouter = c.router({
|
|
7
|
+
// ==========================================================================
|
|
8
|
+
// Existing Endpoints
|
|
9
|
+
// ==========================================================================
|
|
7
10
|
list: {
|
|
8
11
|
method: 'GET',
|
|
9
12
|
path: '/farms/:farmId/fields/:fieldId/prescription-maps',
|
|
@@ -66,4 +69,75 @@ export const prescriptionMapsRouter = c.router({
|
|
|
66
69
|
},
|
|
67
70
|
summary: 'Update prescription map status',
|
|
68
71
|
},
|
|
72
|
+
// ==========================================================================
|
|
73
|
+
// Zone Generation Endpoints
|
|
74
|
+
// ==========================================================================
|
|
75
|
+
generateZones: {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
path: '/farms/:farmId/fields/:fieldId/prescription-maps/generate-zones',
|
|
78
|
+
pathParams: z.object({
|
|
79
|
+
farmId: z.string().uuid(),
|
|
80
|
+
fieldId: z.string().uuid(),
|
|
81
|
+
}),
|
|
82
|
+
body: generateZonesRequestSchema,
|
|
83
|
+
responses: {
|
|
84
|
+
201: prescriptionMapSingleResponseSchema,
|
|
85
|
+
400: jsonApiErrorResponseSchema,
|
|
86
|
+
403: jsonApiErrorResponseSchema,
|
|
87
|
+
404: jsonApiErrorResponseSchema,
|
|
88
|
+
500: jsonApiErrorResponseSchema,
|
|
89
|
+
},
|
|
90
|
+
summary: 'Generate management zones from data layers',
|
|
91
|
+
},
|
|
92
|
+
getZoneStats: {
|
|
93
|
+
method: 'GET',
|
|
94
|
+
path: '/farms/:farmId/fields/:fieldId/prescription-maps/:prescriptionId/zone-stats',
|
|
95
|
+
pathParams: z.object({
|
|
96
|
+
farmId: z.string().uuid(),
|
|
97
|
+
fieldId: z.string().uuid(),
|
|
98
|
+
prescriptionId: z.string().uuid(),
|
|
99
|
+
}),
|
|
100
|
+
responses: {
|
|
101
|
+
200: zoneStatsResponseSchema,
|
|
102
|
+
403: jsonApiErrorResponseSchema,
|
|
103
|
+
404: jsonApiErrorResponseSchema,
|
|
104
|
+
},
|
|
105
|
+
summary: 'Get zone statistics for prescription map',
|
|
106
|
+
},
|
|
107
|
+
// ==========================================================================
|
|
108
|
+
// Export Endpoints
|
|
109
|
+
// ==========================================================================
|
|
110
|
+
exportPrescription: {
|
|
111
|
+
method: 'POST',
|
|
112
|
+
path: '/farms/:farmId/fields/:fieldId/prescription-maps/:prescriptionId/export',
|
|
113
|
+
pathParams: z.object({
|
|
114
|
+
farmId: z.string().uuid(),
|
|
115
|
+
fieldId: z.string().uuid(),
|
|
116
|
+
prescriptionId: z.string().uuid(),
|
|
117
|
+
}),
|
|
118
|
+
body: exportRequestSchema,
|
|
119
|
+
responses: {
|
|
120
|
+
200: exportResponseSchema,
|
|
121
|
+
400: jsonApiErrorResponseSchema,
|
|
122
|
+
403: jsonApiErrorResponseSchema,
|
|
123
|
+
404: jsonApiErrorResponseSchema,
|
|
124
|
+
500: jsonApiErrorResponseSchema,
|
|
125
|
+
},
|
|
126
|
+
summary: 'Export prescription map to file format',
|
|
127
|
+
},
|
|
128
|
+
listExports: {
|
|
129
|
+
method: 'GET',
|
|
130
|
+
path: '/farms/:farmId/fields/:fieldId/prescription-maps/:prescriptionId/exports',
|
|
131
|
+
pathParams: z.object({
|
|
132
|
+
farmId: z.string().uuid(),
|
|
133
|
+
fieldId: z.string().uuid(),
|
|
134
|
+
prescriptionId: z.string().uuid(),
|
|
135
|
+
}),
|
|
136
|
+
responses: {
|
|
137
|
+
200: exportListResponseSchema,
|
|
138
|
+
403: jsonApiErrorResponseSchema,
|
|
139
|
+
404: jsonApiErrorResponseSchema,
|
|
140
|
+
},
|
|
141
|
+
summary: 'List all exports for a prescription map',
|
|
142
|
+
},
|
|
69
143
|
});
|