@deepintel-ltd/farmpro-contracts 1.35.0 → 1.36.1
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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/routes/fields.routes.d.ts +84 -0
- package/dist/routes/fields.routes.d.ts.map +1 -1
- package/dist/routes/nutrient-plan.routes.d.ts +7085 -15
- package/dist/routes/nutrient-plan.routes.d.ts.map +1 -1
- package/dist/routes/nutrient-plan.routes.js +81 -9
- package/dist/routes/pest-disease-risk.routes.d.ts +22 -22
- package/dist/schemas/fields.schemas.d.ts +64 -0
- package/dist/schemas/fields.schemas.d.ts.map +1 -1
- package/dist/schemas/fields.schemas.js +5 -0
- package/dist/schemas/nutrient-plan.schemas.d.ts +1400 -18
- package/dist/schemas/nutrient-plan.schemas.d.ts.map +1 -1
- package/dist/schemas/nutrient-plan.schemas.js +148 -0
- package/dist/schemas/pest-disease-risk.schemas.d.ts +18 -18
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nutrient-plan.routes.d.ts","sourceRoot":"","sources":["../../src/routes/nutrient-plan.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"nutrient-plan.routes.d.ts","sourceRoot":"","sources":["../../src/routes/nutrient-plan.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;YAWzB,qFAAqF;;YAErF,wFAAwF;;YAExF,kDAAkD;;YAKlD,gFAAgF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FpF,CAAC"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { nutrientPlanResponseSchema } from '../schemas/nutrient-plan.schemas';
|
|
3
|
+
import { fertigationSettingsSchema, nutrientPlanResponseSchema, reportSymptomBodySchema, sapReadingBodySchema, sapReadingSchema, symptomCatalogSchema, updateSettingsBodySchema, } from '../schemas/nutrient-plan.schemas';
|
|
4
4
|
const c = initContract();
|
|
5
|
+
const fieldParams = z.object({
|
|
6
|
+
farmId: z.string().min(1),
|
|
7
|
+
fieldId: z.string().min(1),
|
|
8
|
+
});
|
|
9
|
+
const message = z.object({ message: z.string() });
|
|
5
10
|
export const nutrientPlanRouter = c.router({
|
|
6
11
|
/**
|
|
7
12
|
* The field's fertigation plan for today's growth stage: grams of each nutrient and product per plant per
|
|
8
|
-
* week and per feed, a water budget,
|
|
13
|
+
* week and per feed, a water budget, the active adjustments with their reasons, and the guardrail verdict.
|
|
14
|
+
* For a nursery it is the feed strength instead. Deterministic; does not call a model.
|
|
9
15
|
*/
|
|
10
16
|
forField: {
|
|
11
17
|
method: 'GET',
|
|
12
18
|
path: '/farms/:farmId/fields/:fieldId/nutrient-plan',
|
|
13
|
-
pathParams:
|
|
14
|
-
farmId: z.string().min(1),
|
|
15
|
-
fieldId: z.string().min(1),
|
|
16
|
-
}),
|
|
19
|
+
pathParams: fieldParams,
|
|
17
20
|
query: z.object({
|
|
18
|
-
/** Target kg of fresh fruit per plant;
|
|
21
|
+
/** Target kg of fresh fruit per plant; overrides the saved setting for this call. */
|
|
19
22
|
yieldTarget: z.coerce.number().positive().max(20).optional(),
|
|
20
23
|
/** One of the fertilizer sets, e.g. kno3-agrovert, agrovert-range, standard-soluble. */
|
|
21
24
|
fertilizerSet: z.string().min(1).max(60).optional(),
|
|
@@ -32,9 +35,78 @@ export const nutrientPlanRouter = c.router({
|
|
|
32
35
|
}),
|
|
33
36
|
responses: {
|
|
34
37
|
200: nutrientPlanResponseSchema,
|
|
35
|
-
400:
|
|
36
|
-
404:
|
|
38
|
+
400: message,
|
|
39
|
+
404: message,
|
|
37
40
|
},
|
|
38
41
|
summary: 'Per-plant fertigation plan for a field at its current growth stage',
|
|
39
42
|
},
|
|
43
|
+
/** The symptoms a farmer can report, in their words, with the quick questions each one asks. */
|
|
44
|
+
symptoms: {
|
|
45
|
+
method: 'GET',
|
|
46
|
+
path: '/nutrient-plan/symptoms',
|
|
47
|
+
query: z.object({ phase: z.enum(['nursery', 'field']).optional() }),
|
|
48
|
+
responses: { 200: symptomCatalogSchema },
|
|
49
|
+
summary: 'Symptoms a farmer can report to rebuild the plan',
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Report a problem. The plan is rebuilt straight away (bounded, explained, undoable) and returned.
|
|
53
|
+
* Works at every stage, nursery included.
|
|
54
|
+
*/
|
|
55
|
+
reportSymptom: {
|
|
56
|
+
method: 'POST',
|
|
57
|
+
path: '/farms/:farmId/fields/:fieldId/symptoms',
|
|
58
|
+
pathParams: fieldParams,
|
|
59
|
+
body: reportSymptomBodySchema,
|
|
60
|
+
responses: { 200: nutrientPlanResponseSchema, 400: message, 404: message },
|
|
61
|
+
summary: 'Report a symptom and rebuild the field’s fertigation plan',
|
|
62
|
+
},
|
|
63
|
+
/** Undo an adjustment. The plan goes back to what it was without it. */
|
|
64
|
+
undoAdjustment: {
|
|
65
|
+
method: 'POST',
|
|
66
|
+
path: '/farms/:farmId/fields/:fieldId/adjustments/:adjustmentId/undo',
|
|
67
|
+
pathParams: fieldParams.extend({ adjustmentId: z.string().min(1) }),
|
|
68
|
+
body: z.object({}),
|
|
69
|
+
responses: { 200: nutrientPlanResponseSchema, 404: message },
|
|
70
|
+
summary: 'Undo a plan adjustment',
|
|
71
|
+
},
|
|
72
|
+
/** Apply an adjustment that was proposed while automatic adjusting is off. */
|
|
73
|
+
applyAdjustment: {
|
|
74
|
+
method: 'POST',
|
|
75
|
+
path: '/farms/:farmId/fields/:fieldId/adjustments/:adjustmentId/apply',
|
|
76
|
+
pathParams: fieldParams.extend({ adjustmentId: z.string().min(1) }),
|
|
77
|
+
body: z.object({}),
|
|
78
|
+
responses: { 200: nutrientPlanResponseSchema, 404: message },
|
|
79
|
+
summary: 'Apply a proposed plan adjustment',
|
|
80
|
+
},
|
|
81
|
+
getSettings: {
|
|
82
|
+
method: 'GET',
|
|
83
|
+
path: '/farms/:farmId/fields/:fieldId/fertigation-settings',
|
|
84
|
+
pathParams: fieldParams,
|
|
85
|
+
responses: { 200: fertigationSettingsSchema, 404: message },
|
|
86
|
+
summary: 'Saved fertigation settings for a field',
|
|
87
|
+
},
|
|
88
|
+
updateSettings: {
|
|
89
|
+
method: 'PUT',
|
|
90
|
+
path: '/farms/:farmId/fields/:fieldId/fertigation-settings',
|
|
91
|
+
pathParams: fieldParams,
|
|
92
|
+
body: updateSettingsBodySchema,
|
|
93
|
+
responses: { 200: nutrientPlanResponseSchema, 400: message, 404: message },
|
|
94
|
+
summary: 'Save yield target, fertilizer set, mulch, automatic adjusting and bag-confirmed products',
|
|
95
|
+
},
|
|
96
|
+
/** Record a plant sap test. The plan is rebuilt from it (a measured result outranks hints). */
|
|
97
|
+
recordSap: {
|
|
98
|
+
method: 'POST',
|
|
99
|
+
path: '/farms/:farmId/fields/:fieldId/sap-readings',
|
|
100
|
+
pathParams: fieldParams,
|
|
101
|
+
body: sapReadingBodySchema,
|
|
102
|
+
responses: { 200: nutrientPlanResponseSchema, 400: message, 404: message },
|
|
103
|
+
summary: 'Record a sap reading and rebuild the plan from it',
|
|
104
|
+
},
|
|
105
|
+
listSap: {
|
|
106
|
+
method: 'GET',
|
|
107
|
+
path: '/farms/:farmId/fields/:fieldId/sap-readings',
|
|
108
|
+
pathParams: fieldParams,
|
|
109
|
+
responses: { 200: z.object({ readings: z.array(sapReadingSchema) }), 404: message },
|
|
110
|
+
summary: 'Sap readings for a field, newest first',
|
|
111
|
+
},
|
|
40
112
|
});
|
|
@@ -81,10 +81,10 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
81
81
|
current: z.ZodNullable<z.ZodNumber>;
|
|
82
82
|
status: z.ZodNullable<z.ZodEnum<["dry", "optimal", "wet", "saturated"]>>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
status: "optimal" | "
|
|
84
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
85
85
|
current: number | null;
|
|
86
86
|
}, {
|
|
87
|
-
status: "optimal" | "
|
|
87
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
88
88
|
current: number | null;
|
|
89
89
|
}>>;
|
|
90
90
|
windSpeed: z.ZodNullable<z.ZodObject<{
|
|
@@ -127,7 +127,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
127
127
|
avg7d: number | null;
|
|
128
128
|
};
|
|
129
129
|
soilMoisture: {
|
|
130
|
-
status: "optimal" | "
|
|
130
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
131
131
|
current: number | null;
|
|
132
132
|
} | null;
|
|
133
133
|
temperature: {
|
|
@@ -159,7 +159,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
159
159
|
avg7d: number | null;
|
|
160
160
|
};
|
|
161
161
|
soilMoisture: {
|
|
162
|
-
status: "optimal" | "
|
|
162
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
163
163
|
current: number | null;
|
|
164
164
|
} | null;
|
|
165
165
|
temperature: {
|
|
@@ -396,7 +396,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
396
396
|
avg7d: number | null;
|
|
397
397
|
};
|
|
398
398
|
soilMoisture: {
|
|
399
|
-
status: "optimal" | "
|
|
399
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
400
400
|
current: number | null;
|
|
401
401
|
} | null;
|
|
402
402
|
temperature: {
|
|
@@ -493,7 +493,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
493
493
|
avg7d: number | null;
|
|
494
494
|
};
|
|
495
495
|
soilMoisture: {
|
|
496
|
-
status: "optimal" | "
|
|
496
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
497
497
|
current: number | null;
|
|
498
498
|
} | null;
|
|
499
499
|
temperature: {
|
|
@@ -940,10 +940,10 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
940
940
|
current: z.ZodNullable<z.ZodNumber>;
|
|
941
941
|
status: z.ZodNullable<z.ZodEnum<["dry", "optimal", "wet", "saturated"]>>;
|
|
942
942
|
}, "strip", z.ZodTypeAny, {
|
|
943
|
-
status: "optimal" | "
|
|
943
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
944
944
|
current: number | null;
|
|
945
945
|
}, {
|
|
946
|
-
status: "optimal" | "
|
|
946
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
947
947
|
current: number | null;
|
|
948
948
|
}>>;
|
|
949
949
|
windSpeed: z.ZodNullable<z.ZodObject<{
|
|
@@ -986,7 +986,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
986
986
|
avg7d: number | null;
|
|
987
987
|
};
|
|
988
988
|
soilMoisture: {
|
|
989
|
-
status: "optimal" | "
|
|
989
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
990
990
|
current: number | null;
|
|
991
991
|
} | null;
|
|
992
992
|
temperature: {
|
|
@@ -1018,7 +1018,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1018
1018
|
avg7d: number | null;
|
|
1019
1019
|
};
|
|
1020
1020
|
soilMoisture: {
|
|
1021
|
-
status: "optimal" | "
|
|
1021
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1022
1022
|
current: number | null;
|
|
1023
1023
|
} | null;
|
|
1024
1024
|
temperature: {
|
|
@@ -1255,7 +1255,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1255
1255
|
avg7d: number | null;
|
|
1256
1256
|
};
|
|
1257
1257
|
soilMoisture: {
|
|
1258
|
-
status: "optimal" | "
|
|
1258
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1259
1259
|
current: number | null;
|
|
1260
1260
|
} | null;
|
|
1261
1261
|
temperature: {
|
|
@@ -1352,7 +1352,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1352
1352
|
avg7d: number | null;
|
|
1353
1353
|
};
|
|
1354
1354
|
soilMoisture: {
|
|
1355
|
-
status: "optimal" | "
|
|
1355
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1356
1356
|
current: number | null;
|
|
1357
1357
|
} | null;
|
|
1358
1358
|
temperature: {
|
|
@@ -1456,7 +1456,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1456
1456
|
avg7d: number | null;
|
|
1457
1457
|
};
|
|
1458
1458
|
soilMoisture: {
|
|
1459
|
-
status: "optimal" | "
|
|
1459
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1460
1460
|
current: number | null;
|
|
1461
1461
|
} | null;
|
|
1462
1462
|
temperature: {
|
|
@@ -1560,7 +1560,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1560
1560
|
avg7d: number | null;
|
|
1561
1561
|
};
|
|
1562
1562
|
soilMoisture: {
|
|
1563
|
-
status: "optimal" | "
|
|
1563
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1564
1564
|
current: number | null;
|
|
1565
1565
|
} | null;
|
|
1566
1566
|
temperature: {
|
|
@@ -1693,10 +1693,10 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1693
1693
|
current: z.ZodNullable<z.ZodNumber>;
|
|
1694
1694
|
status: z.ZodNullable<z.ZodEnum<["dry", "optimal", "wet", "saturated"]>>;
|
|
1695
1695
|
}, "strip", z.ZodTypeAny, {
|
|
1696
|
-
status: "optimal" | "
|
|
1696
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1697
1697
|
current: number | null;
|
|
1698
1698
|
}, {
|
|
1699
|
-
status: "optimal" | "
|
|
1699
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1700
1700
|
current: number | null;
|
|
1701
1701
|
}>>;
|
|
1702
1702
|
windSpeed: z.ZodNullable<z.ZodObject<{
|
|
@@ -1739,7 +1739,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1739
1739
|
avg7d: number | null;
|
|
1740
1740
|
};
|
|
1741
1741
|
soilMoisture: {
|
|
1742
|
-
status: "optimal" | "
|
|
1742
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1743
1743
|
current: number | null;
|
|
1744
1744
|
} | null;
|
|
1745
1745
|
temperature: {
|
|
@@ -1771,7 +1771,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
1771
1771
|
avg7d: number | null;
|
|
1772
1772
|
};
|
|
1773
1773
|
soilMoisture: {
|
|
1774
|
-
status: "optimal" | "
|
|
1774
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
1775
1775
|
current: number | null;
|
|
1776
1776
|
} | null;
|
|
1777
1777
|
temperature: {
|
|
@@ -2008,7 +2008,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
2008
2008
|
avg7d: number | null;
|
|
2009
2009
|
};
|
|
2010
2010
|
soilMoisture: {
|
|
2011
|
-
status: "optimal" | "
|
|
2011
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
2012
2012
|
current: number | null;
|
|
2013
2013
|
} | null;
|
|
2014
2014
|
temperature: {
|
|
@@ -2105,7 +2105,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
2105
2105
|
avg7d: number | null;
|
|
2106
2106
|
};
|
|
2107
2107
|
soilMoisture: {
|
|
2108
|
-
status: "optimal" | "
|
|
2108
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
2109
2109
|
current: number | null;
|
|
2110
2110
|
} | null;
|
|
2111
2111
|
temperature: {
|
|
@@ -2209,7 +2209,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
2209
2209
|
avg7d: number | null;
|
|
2210
2210
|
};
|
|
2211
2211
|
soilMoisture: {
|
|
2212
|
-
status: "optimal" | "
|
|
2212
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
2213
2213
|
current: number | null;
|
|
2214
2214
|
} | null;
|
|
2215
2215
|
temperature: {
|
|
@@ -2313,7 +2313,7 @@ export declare const pestDiseaseRiskRouter: {
|
|
|
2313
2313
|
avg7d: number | null;
|
|
2314
2314
|
};
|
|
2315
2315
|
soilMoisture: {
|
|
2316
|
-
status: "optimal" | "
|
|
2316
|
+
status: "optimal" | "wet" | "dry" | "saturated" | null;
|
|
2317
2317
|
current: number | null;
|
|
2318
2318
|
} | null;
|
|
2319
2319
|
temperature: {
|