@deepintel-ltd/farmpro-contracts 1.0.1 → 1.0.3
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 +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +81 -0
- package/dist/routes/analytics.routes.d.ts +754 -0
- package/dist/routes/analytics.routes.d.ts.map +1 -0
- package/dist/routes/analytics.routes.js +24 -0
- package/dist/routes/auth.routes.d.ts +3836 -0
- package/dist/routes/auth.routes.d.ts.map +1 -0
- package/dist/routes/auth.routes.js +158 -0
- package/dist/routes/documents.routes.d.ts +2476 -0
- package/dist/routes/documents.routes.d.ts.map +1 -0
- package/dist/routes/documents.routes.js +100 -0
- package/dist/routes/equipment.routes.d.ts +3617 -0
- package/dist/routes/equipment.routes.d.ts.map +1 -0
- package/dist/routes/equipment.routes.js +118 -0
- package/dist/routes/farms.routes.d.ts +2202 -0
- package/dist/routes/farms.routes.d.ts.map +1 -0
- package/dist/routes/farms.routes.js +111 -0
- package/dist/routes/fields.routes.d.ts +3389 -0
- package/dist/routes/fields.routes.d.ts.map +1 -0
- package/dist/routes/fields.routes.js +95 -0
- package/dist/routes/finance.routes.d.ts +6855 -0
- package/dist/routes/finance.routes.d.ts.map +1 -0
- package/dist/routes/finance.routes.js +259 -0
- package/dist/routes/harvest.routes.d.ts +2337 -0
- package/dist/routes/harvest.routes.d.ts.map +1 -0
- package/dist/routes/harvest.routes.js +99 -0
- package/dist/routes/index.d.ts +68 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +43 -0
- package/dist/routes/inventory.routes.d.ts +2853 -0
- package/dist/routes/inventory.routes.d.ts.map +1 -0
- package/dist/routes/inventory.routes.js +121 -0
- package/dist/routes/soil-tests.routes.d.ts +3005 -0
- package/dist/routes/soil-tests.routes.d.ts.map +1 -0
- package/dist/routes/soil-tests.routes.js +98 -0
- package/dist/routes/suppliers.routes.d.ts +4190 -0
- package/dist/routes/suppliers.routes.d.ts.map +1 -0
- package/dist/routes/suppliers.routes.js +146 -0
- package/dist/routes/tasks.routes.d.ts +4192 -0
- package/dist/routes/tasks.routes.d.ts.map +1 -0
- package/dist/routes/tasks.routes.js +138 -0
- package/dist/routes/team.routes.d.ts +2210 -0
- package/dist/routes/team.routes.d.ts.map +1 -0
- package/dist/routes/team.routes.js +98 -0
- package/dist/routes/users.routes.d.ts +721 -0
- package/dist/routes/users.routes.d.ts.map +1 -0
- package/dist/routes/users.routes.js +35 -0
- package/dist/routes/weather.routes.d.ts +500 -0
- package/dist/routes/weather.routes.d.ts.map +1 -0
- package/dist/routes/weather.routes.js +23 -0
- package/dist/schemas/analytics.schemas.d.ts +1344 -0
- package/dist/schemas/analytics.schemas.d.ts.map +1 -0
- package/dist/schemas/analytics.schemas.js +73 -0
- package/dist/schemas/auth.schemas.d.ts +1093 -0
- package/dist/schemas/auth.schemas.d.ts.map +1 -0
- package/dist/schemas/auth.schemas.js +159 -0
- package/dist/schemas/common.schemas.d.ts +562 -0
- package/dist/schemas/common.schemas.d.ts.map +1 -0
- package/dist/schemas/common.schemas.js +122 -0
- package/dist/schemas/documents.schemas.d.ts +850 -0
- package/dist/schemas/documents.schemas.d.ts.map +1 -0
- package/dist/schemas/documents.schemas.js +75 -0
- package/dist/schemas/equipment.schemas.d.ts +1618 -0
- package/dist/schemas/equipment.schemas.d.ts.map +1 -0
- package/dist/schemas/equipment.schemas.js +125 -0
- package/dist/schemas/farms.schemas.d.ts +1171 -0
- package/dist/schemas/farms.schemas.d.ts.map +1 -0
- package/dist/schemas/farms.schemas.js +62 -0
- package/dist/schemas/fields.schemas.d.ts +2508 -0
- package/dist/schemas/fields.schemas.d.ts.map +1 -0
- package/dist/schemas/fields.schemas.js +125 -0
- package/dist/schemas/finance.schemas.d.ts +2869 -0
- package/dist/schemas/finance.schemas.d.ts.map +1 -0
- package/dist/schemas/finance.schemas.js +196 -0
- package/dist/schemas/harvest.schemas.d.ts +1051 -0
- package/dist/schemas/harvest.schemas.d.ts.map +1 -0
- package/dist/schemas/harvest.schemas.js +71 -0
- package/dist/schemas/inventory.schemas.d.ts +1138 -0
- package/dist/schemas/inventory.schemas.d.ts.map +1 -0
- package/dist/schemas/inventory.schemas.js +89 -0
- package/dist/schemas/soil-tests.schemas.d.ts +1885 -0
- package/dist/schemas/soil-tests.schemas.d.ts.map +1 -0
- package/dist/schemas/soil-tests.schemas.js +102 -0
- package/dist/schemas/suppliers.schemas.d.ts +1774 -0
- package/dist/schemas/suppliers.schemas.d.ts.map +1 -0
- package/dist/schemas/suppliers.schemas.js +121 -0
- package/dist/schemas/tasks.schemas.d.ts +1761 -0
- package/dist/schemas/tasks.schemas.d.ts.map +1 -0
- package/dist/schemas/tasks.schemas.js +121 -0
- package/dist/schemas/team.schemas.d.ts +583 -0
- package/dist/schemas/team.schemas.d.ts.map +1 -0
- package/dist/schemas/team.schemas.js +60 -0
- package/dist/schemas/users.schemas.d.ts +288 -0
- package/dist/schemas/users.schemas.d.ts.map +1 -0
- package/dist/schemas/users.schemas.js +32 -0
- package/dist/schemas/weather.schemas.d.ts +682 -0
- package/dist/schemas/weather.schemas.d.ts.map +1 -0
- package/dist/schemas/weather.schemas.js +49 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soil-tests.routes.d.ts","sourceRoot":"","sources":["../../src/routes/soil-tests.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F1B,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.soilTestsRouter = void 0;
|
|
4
|
+
const core_1 = require("@ts-rest/core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const soil_tests_schemas_1 = require("../schemas/soil-tests.schemas");
|
|
7
|
+
const common_schemas_1 = require("../schemas/common.schemas");
|
|
8
|
+
const c = (0, core_1.initContract)();
|
|
9
|
+
exports.soilTestsRouter = c.router({
|
|
10
|
+
// List soil tests for a farm
|
|
11
|
+
listSoilTests: {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
path: '/farms/:farmId/soil-tests',
|
|
14
|
+
pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
|
|
15
|
+
query: common_schemas_1.jsonApiPaginationQuerySchema
|
|
16
|
+
.merge(common_schemas_1.jsonApiSortQuerySchema)
|
|
17
|
+
.merge(common_schemas_1.jsonApiIncludeQuerySchema)
|
|
18
|
+
.merge(common_schemas_1.jsonApiFilterQuerySchema)
|
|
19
|
+
.merge(zod_1.z.object({
|
|
20
|
+
'filter[fieldId]': zod_1.z.string().uuid().optional(),
|
|
21
|
+
})),
|
|
22
|
+
responses: {
|
|
23
|
+
200: soil_tests_schemas_1.soilTestListResponseSchema,
|
|
24
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
25
|
+
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
26
|
+
},
|
|
27
|
+
summary: 'List soil tests',
|
|
28
|
+
description: 'Get all soil tests for a farm',
|
|
29
|
+
},
|
|
30
|
+
// Create soil test
|
|
31
|
+
createSoilTest: {
|
|
32
|
+
method: 'POST',
|
|
33
|
+
path: '/farms/:farmId/soil-tests',
|
|
34
|
+
pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
|
|
35
|
+
body: zod_1.z.object({ data: soil_tests_schemas_1.createSoilTestSchema }),
|
|
36
|
+
responses: {
|
|
37
|
+
201: soil_tests_schemas_1.soilTestResponseSchema,
|
|
38
|
+
400: common_schemas_1.jsonApiErrorResponseSchema,
|
|
39
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
40
|
+
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
41
|
+
422: common_schemas_1.jsonApiErrorResponseSchema,
|
|
42
|
+
},
|
|
43
|
+
summary: 'Create soil test',
|
|
44
|
+
description: 'Record a new soil test with automatic fertilizer recommendations',
|
|
45
|
+
},
|
|
46
|
+
// Get soil test by ID
|
|
47
|
+
getSoilTest: {
|
|
48
|
+
method: 'GET',
|
|
49
|
+
path: '/farms/:farmId/soil-tests/:id',
|
|
50
|
+
pathParams: zod_1.z.object({
|
|
51
|
+
farmId: zod_1.z.string().uuid(),
|
|
52
|
+
id: zod_1.z.string().uuid(),
|
|
53
|
+
}),
|
|
54
|
+
query: common_schemas_1.jsonApiIncludeQuerySchema,
|
|
55
|
+
responses: {
|
|
56
|
+
200: soil_tests_schemas_1.soilTestDetailResponseSchema,
|
|
57
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
58
|
+
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
59
|
+
},
|
|
60
|
+
summary: 'Get soil test by ID',
|
|
61
|
+
description: 'Get detailed soil test information with recommendations',
|
|
62
|
+
},
|
|
63
|
+
// Update soil test
|
|
64
|
+
updateSoilTest: {
|
|
65
|
+
method: 'PATCH',
|
|
66
|
+
path: '/farms/:farmId/soil-tests/:id',
|
|
67
|
+
pathParams: zod_1.z.object({
|
|
68
|
+
farmId: zod_1.z.string().uuid(),
|
|
69
|
+
id: zod_1.z.string().uuid(),
|
|
70
|
+
}),
|
|
71
|
+
body: zod_1.z.object({ data: soil_tests_schemas_1.updateSoilTestSchema }),
|
|
72
|
+
responses: {
|
|
73
|
+
200: soil_tests_schemas_1.soilTestResponseSchema,
|
|
74
|
+
400: common_schemas_1.jsonApiErrorResponseSchema,
|
|
75
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
76
|
+
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
77
|
+
422: common_schemas_1.jsonApiErrorResponseSchema,
|
|
78
|
+
},
|
|
79
|
+
summary: 'Update soil test',
|
|
80
|
+
description: 'Update soil test information',
|
|
81
|
+
},
|
|
82
|
+
// Delete soil test
|
|
83
|
+
deleteSoilTest: {
|
|
84
|
+
method: 'DELETE',
|
|
85
|
+
path: '/farms/:farmId/soil-tests/:id',
|
|
86
|
+
pathParams: zod_1.z.object({
|
|
87
|
+
farmId: zod_1.z.string().uuid(),
|
|
88
|
+
id: zod_1.z.string().uuid(),
|
|
89
|
+
}),
|
|
90
|
+
responses: {
|
|
91
|
+
204: common_schemas_1.jsonApiSuccessResponseSchema,
|
|
92
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
93
|
+
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
94
|
+
},
|
|
95
|
+
summary: 'Delete soil test',
|
|
96
|
+
description: 'Delete a soil test record',
|
|
97
|
+
},
|
|
98
|
+
});
|