@deepintel-ltd/farmpro-contracts 1.5.26 → 1.7.0
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 +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/routes/fertigation.routes.d.ts +35250 -0
- package/dist/routes/fertigation.routes.d.ts.map +1 -0
- package/dist/routes/fertigation.routes.js +512 -0
- package/dist/routes/files.routes.d.ts +9 -2
- package/dist/routes/files.routes.d.ts.map +1 -1
- package/dist/routes/files.routes.js +5 -2
- package/dist/routes/index.d.ts +13 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +7 -0
- package/dist/routes/organizations.routes.d.ts +10 -10
- package/dist/routes/team.routes.d.ts +1 -1
- package/dist/routes/team.routes.js +1 -1
- package/dist/routes/waybills.routes.d.ts +0 -49
- package/dist/routes/waybills.routes.d.ts.map +1 -1
- package/dist/schemas/fertigation.schemas.d.ts +7479 -0
- package/dist/schemas/fertigation.schemas.d.ts.map +1 -0
- package/dist/schemas/fertigation.schemas.js +462 -0
- package/dist/schemas/organizations.schemas.d.ts +6 -6
- package/dist/schemas/organizations.schemas.js +2 -2
- package/dist/schemas/waybills.schemas.d.ts +0 -38
- package/dist/schemas/waybills.schemas.d.ts.map +1 -1
- package/dist/schemas/waybills.schemas.js +0 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fertigation.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/fertigation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAMH,eAAO,MAAM,iBAAiB,yFAO5B,CAAC;AAEH,eAAO,MAAM,uBAAuB,mDAIlC,CAAC;AAEH,eAAO,MAAM,oBAAoB,uDAK/B,CAAC;AAEH,eAAO,MAAM,iBAAiB,6DAK5B,CAAC;AAEH,eAAO,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B,CAAC,CAAC;AACnF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACnF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AACxG,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AACxG,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAChH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAG9F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { timestampsSchema, createJsonApiResourceSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, } from './common.schemas';
|
|
3
|
+
/**
|
|
4
|
+
* Fertigation scheduling schemas - JSON:API compliant
|
|
5
|
+
*/
|
|
6
|
+
// =============================================================================
|
|
7
|
+
// Enums
|
|
8
|
+
// =============================================================================
|
|
9
|
+
export const growthStageSchema = z.enum([
|
|
10
|
+
'transplant',
|
|
11
|
+
'vegetative',
|
|
12
|
+
'flowering',
|
|
13
|
+
'fruiting',
|
|
14
|
+
'ripening',
|
|
15
|
+
'harvest',
|
|
16
|
+
]);
|
|
17
|
+
export const applicationMethodSchema = z.enum([
|
|
18
|
+
'fertigation',
|
|
19
|
+
'broadcast',
|
|
20
|
+
'foliar',
|
|
21
|
+
]);
|
|
22
|
+
export const scheduleStatusSchema = z.enum([
|
|
23
|
+
'draft',
|
|
24
|
+
'active',
|
|
25
|
+
'paused',
|
|
26
|
+
'completed',
|
|
27
|
+
]);
|
|
28
|
+
export const eventStatusSchema = z.enum([
|
|
29
|
+
'pending',
|
|
30
|
+
'completed',
|
|
31
|
+
'skipped',
|
|
32
|
+
'cancelled',
|
|
33
|
+
]);
|
|
34
|
+
export const recommendationStatusSchema = z.enum([
|
|
35
|
+
'pending',
|
|
36
|
+
'accepted',
|
|
37
|
+
'rejected',
|
|
38
|
+
'applied',
|
|
39
|
+
]);
|
|
40
|
+
export const solubilitySchema = z.enum([
|
|
41
|
+
'soluble',
|
|
42
|
+
'partially_soluble',
|
|
43
|
+
'granular',
|
|
44
|
+
]);
|
|
45
|
+
export const cropCategorySchema = z.enum([
|
|
46
|
+
'vegetable',
|
|
47
|
+
'fruit',
|
|
48
|
+
'grain',
|
|
49
|
+
'legume',
|
|
50
|
+
'tuber',
|
|
51
|
+
'other',
|
|
52
|
+
]);
|
|
53
|
+
export const recommendationTypeSchema = z.enum([
|
|
54
|
+
'initial_schedule',
|
|
55
|
+
'adjustment',
|
|
56
|
+
'deficiency_correction',
|
|
57
|
+
]);
|
|
58
|
+
export const calculationMethodSchema = z.enum([
|
|
59
|
+
'deficit_based',
|
|
60
|
+
'ratio_based',
|
|
61
|
+
'ai_recommended',
|
|
62
|
+
]);
|
|
63
|
+
// =============================================================================
|
|
64
|
+
// Shared/Embedded Schemas
|
|
65
|
+
// =============================================================================
|
|
66
|
+
// NPK ratio for growth stages
|
|
67
|
+
export const npkRatioSchema = z.object({
|
|
68
|
+
n: z.number().nonnegative(),
|
|
69
|
+
p: z.number().nonnegative(),
|
|
70
|
+
k: z.number().nonnegative(),
|
|
71
|
+
});
|
|
72
|
+
// Growth stage configuration (embedded in CropNutrientProfile)
|
|
73
|
+
export const growthStageConfigSchema = z.object({
|
|
74
|
+
stage: growthStageSchema,
|
|
75
|
+
durationDays: z.number().int().positive(),
|
|
76
|
+
npkRatio: npkRatioSchema,
|
|
77
|
+
targetNutrients: z.object({
|
|
78
|
+
n: z.number().nonnegative(), // kg/ha
|
|
79
|
+
p: z.number().nonnegative(),
|
|
80
|
+
k: z.number().nonnegative(),
|
|
81
|
+
}),
|
|
82
|
+
weeklyApplications: z.number().int().positive().default(2),
|
|
83
|
+
});
|
|
84
|
+
// Nutrient deficits (stored in schedule)
|
|
85
|
+
export const nutrientDeficitsSchema = z.object({
|
|
86
|
+
nitrogen: z.number().nonnegative(),
|
|
87
|
+
phosphorus: z.number().nonnegative(),
|
|
88
|
+
potassium: z.number().nonnegative(),
|
|
89
|
+
calcium: z.number().nonnegative().optional(),
|
|
90
|
+
magnesium: z.number().nonnegative().optional(),
|
|
91
|
+
sulfur: z.number().nonnegative().optional(),
|
|
92
|
+
});
|
|
93
|
+
// Planned/actual nutrients for events
|
|
94
|
+
export const plannedNutrientsSchema = z.object({
|
|
95
|
+
nitrogen: z.number().nonnegative(),
|
|
96
|
+
phosphorus: z.number().nonnegative(),
|
|
97
|
+
potassium: z.number().nonnegative(),
|
|
98
|
+
});
|
|
99
|
+
// Weather conditions for event tracking
|
|
100
|
+
export const weatherConditionsSchema = z.object({
|
|
101
|
+
temperature: z.number().optional(),
|
|
102
|
+
humidity: z.number().min(0).max(100).optional(),
|
|
103
|
+
wind: z.number().nonnegative().optional(),
|
|
104
|
+
rainfall: z.number().nonnegative().optional(),
|
|
105
|
+
});
|
|
106
|
+
// Fertilizer compatibility entry
|
|
107
|
+
export const compatibilityEntrySchema = z.object({
|
|
108
|
+
productName: z.string(),
|
|
109
|
+
compatible: z.boolean(),
|
|
110
|
+
reason: z.string().optional(),
|
|
111
|
+
});
|
|
112
|
+
// =============================================================================
|
|
113
|
+
// Crop Nutrient Profile Schemas
|
|
114
|
+
// =============================================================================
|
|
115
|
+
export const cropNutrientProfileAttributesSchema = z.object({
|
|
116
|
+
cropName: z.string(),
|
|
117
|
+
cropVariety: z.string().nullable(),
|
|
118
|
+
cropCategory: z.string(),
|
|
119
|
+
growthStages: z.array(growthStageConfigSchema),
|
|
120
|
+
totalNitrogen: z.number().nonnegative(),
|
|
121
|
+
totalPhosphorus: z.number().nonnegative(),
|
|
122
|
+
totalPotassium: z.number().nonnegative(),
|
|
123
|
+
micronutrients: z.record(z.number().nonnegative()).nullable(),
|
|
124
|
+
optimalPHMin: z.number().min(0).max(14),
|
|
125
|
+
optimalPHMax: z.number().min(0).max(14),
|
|
126
|
+
optimalECMin: z.number().nullable(),
|
|
127
|
+
optimalECMax: z.number().nullable(),
|
|
128
|
+
isDefault: z.boolean(),
|
|
129
|
+
notes: z.string().nullable(),
|
|
130
|
+
source: z.string().nullable(),
|
|
131
|
+
}).merge(timestampsSchema);
|
|
132
|
+
export const createCropNutrientProfileAttributesSchema = z.object({
|
|
133
|
+
cropName: z.string().min(1).max(100),
|
|
134
|
+
cropVariety: z.string().max(100).optional(),
|
|
135
|
+
cropCategory: cropCategorySchema,
|
|
136
|
+
growthStages: z.array(growthStageConfigSchema).min(1),
|
|
137
|
+
totalNitrogen: z.number().nonnegative(),
|
|
138
|
+
totalPhosphorus: z.number().nonnegative(),
|
|
139
|
+
totalPotassium: z.number().nonnegative(),
|
|
140
|
+
micronutrients: z.record(z.number().nonnegative()).optional(),
|
|
141
|
+
optimalPHMin: z.number().min(0).max(14).default(6.0),
|
|
142
|
+
optimalPHMax: z.number().min(0).max(14).default(7.0),
|
|
143
|
+
optimalECMin: z.number().optional(),
|
|
144
|
+
optimalECMax: z.number().optional(),
|
|
145
|
+
notes: z.string().optional(),
|
|
146
|
+
source: z.string().max(200).optional(),
|
|
147
|
+
});
|
|
148
|
+
export const updateCropNutrientProfileAttributesSchema = createCropNutrientProfileAttributesSchema.partial();
|
|
149
|
+
// JSON:API input schemas
|
|
150
|
+
export const createCropNutrientProfileSchema = z.object({
|
|
151
|
+
type: z.literal('crop-nutrient-profiles'),
|
|
152
|
+
attributes: createCropNutrientProfileAttributesSchema,
|
|
153
|
+
});
|
|
154
|
+
export const updateCropNutrientProfileSchema = z.object({
|
|
155
|
+
type: z.literal('crop-nutrient-profiles'),
|
|
156
|
+
id: z.string().uuid(),
|
|
157
|
+
attributes: updateCropNutrientProfileAttributesSchema,
|
|
158
|
+
});
|
|
159
|
+
// Resource schema
|
|
160
|
+
export const cropNutrientProfileResourceSchema = createJsonApiResourceSchema('crop-nutrient-profiles', cropNutrientProfileAttributesSchema);
|
|
161
|
+
// Response schemas
|
|
162
|
+
export const cropNutrientProfileResponseSchema = jsonApiSingleResponseSchema(cropNutrientProfileResourceSchema);
|
|
163
|
+
export const cropNutrientProfileListResponseSchema = jsonApiCollectionResponseSchema(cropNutrientProfileResourceSchema);
|
|
164
|
+
// =============================================================================
|
|
165
|
+
// Fertilizer Product Schemas
|
|
166
|
+
// =============================================================================
|
|
167
|
+
export const fertilizerProductAttributesSchema = z.object({
|
|
168
|
+
name: z.string(),
|
|
169
|
+
brand: z.string().nullable(),
|
|
170
|
+
productCode: z.string().nullable(),
|
|
171
|
+
nitrogenContent: z.number().min(0).max(100),
|
|
172
|
+
phosphorusContent: z.number().min(0).max(100),
|
|
173
|
+
potassiumContent: z.number().min(0).max(100),
|
|
174
|
+
calciumContent: z.number().nullable(),
|
|
175
|
+
magnesiumContent: z.number().nullable(),
|
|
176
|
+
sulfurContent: z.number().nullable(),
|
|
177
|
+
micronutrients: z.record(z.number()).nullable(),
|
|
178
|
+
solubility: solubilitySchema,
|
|
179
|
+
applicationMethods: z.array(applicationMethodSchema),
|
|
180
|
+
solubilityRate: z.number().nullable(),
|
|
181
|
+
maxEcContribution: z.number().nullable(),
|
|
182
|
+
compatibility: z.array(compatibilityEntrySchema).nullable(),
|
|
183
|
+
defaultInventoryItemId: z.string().uuid().nullable(),
|
|
184
|
+
avgCostPerKg: z.number().nullable(),
|
|
185
|
+
isDefault: z.boolean(),
|
|
186
|
+
notes: z.string().nullable(),
|
|
187
|
+
}).merge(timestampsSchema);
|
|
188
|
+
export const createFertilizerProductAttributesSchema = z.object({
|
|
189
|
+
name: z.string().min(1).max(200),
|
|
190
|
+
brand: z.string().max(100).optional(),
|
|
191
|
+
productCode: z.string().max(50).optional(),
|
|
192
|
+
nitrogenContent: z.number().min(0).max(100),
|
|
193
|
+
phosphorusContent: z.number().min(0).max(100),
|
|
194
|
+
potassiumContent: z.number().min(0).max(100),
|
|
195
|
+
calciumContent: z.number().min(0).max(100).optional(),
|
|
196
|
+
magnesiumContent: z.number().min(0).max(100).optional(),
|
|
197
|
+
sulfurContent: z.number().min(0).max(100).optional(),
|
|
198
|
+
micronutrients: z.record(z.number().min(0).max(100)).optional(),
|
|
199
|
+
solubility: solubilitySchema.default('soluble'),
|
|
200
|
+
applicationMethods: z.array(applicationMethodSchema).min(1).default(['fertigation']),
|
|
201
|
+
solubilityRate: z.number().positive().optional(),
|
|
202
|
+
maxEcContribution: z.number().positive().optional(),
|
|
203
|
+
compatibility: z.array(compatibilityEntrySchema).optional(),
|
|
204
|
+
defaultInventoryItemId: z.string().uuid().optional(),
|
|
205
|
+
avgCostPerKg: z.number().positive().optional(),
|
|
206
|
+
notes: z.string().optional(),
|
|
207
|
+
});
|
|
208
|
+
export const updateFertilizerProductAttributesSchema = createFertilizerProductAttributesSchema.partial();
|
|
209
|
+
// JSON:API input schemas
|
|
210
|
+
export const createFertilizerProductSchema = z.object({
|
|
211
|
+
type: z.literal('fertilizer-products'),
|
|
212
|
+
attributes: createFertilizerProductAttributesSchema,
|
|
213
|
+
});
|
|
214
|
+
export const updateFertilizerProductSchema = z.object({
|
|
215
|
+
type: z.literal('fertilizer-products'),
|
|
216
|
+
id: z.string().uuid(),
|
|
217
|
+
attributes: updateFertilizerProductAttributesSchema,
|
|
218
|
+
});
|
|
219
|
+
// Resource schema
|
|
220
|
+
export const fertilizerProductResourceSchema = createJsonApiResourceSchema('fertilizer-products', fertilizerProductAttributesSchema);
|
|
221
|
+
// Response schemas
|
|
222
|
+
export const fertilizerProductResponseSchema = jsonApiSingleResponseSchema(fertilizerProductResourceSchema);
|
|
223
|
+
export const fertilizerProductListResponseSchema = jsonApiCollectionResponseSchema(fertilizerProductResourceSchema);
|
|
224
|
+
// Compatibility check schemas
|
|
225
|
+
export const checkCompatibilityInputSchema = z.object({
|
|
226
|
+
productIds: z.array(z.string().uuid()).min(2),
|
|
227
|
+
});
|
|
228
|
+
export const compatibilityIssueSchema = z.object({
|
|
229
|
+
product1: z.string(),
|
|
230
|
+
product2: z.string(),
|
|
231
|
+
reason: z.string(),
|
|
232
|
+
});
|
|
233
|
+
export const checkCompatibilityResponseSchema = z.object({
|
|
234
|
+
compatible: z.boolean(),
|
|
235
|
+
issues: z.array(compatibilityIssueSchema),
|
|
236
|
+
});
|
|
237
|
+
// =============================================================================
|
|
238
|
+
// Fertigation Schedule Schemas
|
|
239
|
+
// =============================================================================
|
|
240
|
+
export const fertigationScheduleAttributesSchema = z.object({
|
|
241
|
+
name: z.string(),
|
|
242
|
+
description: z.string().nullable(),
|
|
243
|
+
fieldId: z.string().uuid(),
|
|
244
|
+
fieldName: z.string().optional(),
|
|
245
|
+
cropNutrientProfileId: z.string().uuid(),
|
|
246
|
+
cropName: z.string(),
|
|
247
|
+
plantingDate: z.string().datetime(),
|
|
248
|
+
expectedHarvestDate: z.string().datetime().nullable(),
|
|
249
|
+
status: scheduleStatusSchema,
|
|
250
|
+
currentStage: growthStageSchema.nullable(),
|
|
251
|
+
baselineSoilTestId: z.string().uuid().nullable(),
|
|
252
|
+
nutrientDeficits: nutrientDeficitsSchema.nullable(),
|
|
253
|
+
fieldAreaHa: z.number().positive(),
|
|
254
|
+
primaryApplicationMethod: applicationMethodSchema,
|
|
255
|
+
applicationEfficiency: z.number().min(0).max(1),
|
|
256
|
+
weeklyFrequency: z.number().int().positive(),
|
|
257
|
+
totalWeeks: z.number().int().positive().nullable(),
|
|
258
|
+
estimatedTotalCost: z.number().nullable(),
|
|
259
|
+
actualTotalCost: z.number().nullable(),
|
|
260
|
+
notes: z.string().nullable(),
|
|
261
|
+
// Summary stats (populated by service)
|
|
262
|
+
pendingEvents: z.number().int().nonnegative().optional(),
|
|
263
|
+
completedEvents: z.number().int().nonnegative().optional(),
|
|
264
|
+
nextEventDate: z.string().datetime().nullable().optional(),
|
|
265
|
+
}).merge(timestampsSchema);
|
|
266
|
+
export const createFertigationScheduleAttributesSchema = z.object({
|
|
267
|
+
name: z.string().min(1).max(200),
|
|
268
|
+
description: z.string().optional(),
|
|
269
|
+
fieldId: z.string().uuid(),
|
|
270
|
+
cropNutrientProfileId: z.string().uuid(),
|
|
271
|
+
plantingDate: z.string().datetime(),
|
|
272
|
+
expectedHarvestDate: z.string().datetime().optional(),
|
|
273
|
+
baselineSoilTestId: z.string().uuid().optional(),
|
|
274
|
+
primaryApplicationMethod: applicationMethodSchema.default('fertigation'),
|
|
275
|
+
applicationEfficiency: z.number().min(0).max(1).default(0.85),
|
|
276
|
+
weeklyFrequency: z.number().int().positive().max(7).default(2),
|
|
277
|
+
notes: z.string().optional(),
|
|
278
|
+
// Option to auto-generate events
|
|
279
|
+
autoGenerateEvents: z.boolean().default(true),
|
|
280
|
+
});
|
|
281
|
+
export const updateFertigationScheduleAttributesSchema = createFertigationScheduleAttributesSchema.partial().omit({
|
|
282
|
+
fieldId: true,
|
|
283
|
+
cropNutrientProfileId: true,
|
|
284
|
+
autoGenerateEvents: true,
|
|
285
|
+
});
|
|
286
|
+
// Status update schema
|
|
287
|
+
export const updateScheduleStatusSchema = z.object({
|
|
288
|
+
status: scheduleStatusSchema,
|
|
289
|
+
});
|
|
290
|
+
// Recalculate schedule schema
|
|
291
|
+
export const recalculateScheduleSchema = z.object({
|
|
292
|
+
soilTestId: z.string().uuid(),
|
|
293
|
+
});
|
|
294
|
+
// JSON:API input schemas
|
|
295
|
+
export const createFertigationScheduleSchema = z.object({
|
|
296
|
+
type: z.literal('fertigation-schedules'),
|
|
297
|
+
attributes: createFertigationScheduleAttributesSchema,
|
|
298
|
+
});
|
|
299
|
+
export const updateFertigationScheduleSchema = z.object({
|
|
300
|
+
type: z.literal('fertigation-schedules'),
|
|
301
|
+
id: z.string().uuid(),
|
|
302
|
+
attributes: updateFertigationScheduleAttributesSchema,
|
|
303
|
+
});
|
|
304
|
+
// Resource schema
|
|
305
|
+
export const fertigationScheduleResourceSchema = createJsonApiResourceSchema('fertigation-schedules', fertigationScheduleAttributesSchema);
|
|
306
|
+
// Response schemas
|
|
307
|
+
export const fertigationScheduleResponseSchema = jsonApiSingleResponseSchema(fertigationScheduleResourceSchema);
|
|
308
|
+
export const fertigationScheduleListResponseSchema = jsonApiCollectionResponseSchema(fertigationScheduleResourceSchema);
|
|
309
|
+
// =============================================================================
|
|
310
|
+
// Fertigation Application Event Schemas
|
|
311
|
+
// =============================================================================
|
|
312
|
+
export const fertigationEventAttributesSchema = z.object({
|
|
313
|
+
scheduleId: z.string().uuid(),
|
|
314
|
+
scheduledDate: z.string().datetime(),
|
|
315
|
+
actualDate: z.string().datetime().nullable(),
|
|
316
|
+
weekNumber: z.number().int().positive(),
|
|
317
|
+
growthStage: growthStageSchema,
|
|
318
|
+
fertilizerProductId: z.string().uuid().nullable(),
|
|
319
|
+
fertilizerProductName: z.string().optional(),
|
|
320
|
+
inventoryItemId: z.string().uuid().nullable(),
|
|
321
|
+
inventoryItemName: z.string().optional(),
|
|
322
|
+
applicationMethod: applicationMethodSchema,
|
|
323
|
+
plannedQuantity: z.number().nonnegative(),
|
|
324
|
+
actualQuantity: z.number().nullable(),
|
|
325
|
+
plannedNutrients: plannedNutrientsSchema,
|
|
326
|
+
actualNutrients: plannedNutrientsSchema.nullable(),
|
|
327
|
+
waterVolume: z.number().nullable(),
|
|
328
|
+
concentrationRate: z.number().nullable(),
|
|
329
|
+
status: eventStatusSchema,
|
|
330
|
+
completedBy: z.string().uuid().nullable(),
|
|
331
|
+
completedAt: z.string().datetime().nullable(),
|
|
332
|
+
estimatedCost: z.number().nullable(),
|
|
333
|
+
actualCost: z.number().nullable(),
|
|
334
|
+
notes: z.string().nullable(),
|
|
335
|
+
weatherConditions: weatherConditionsSchema.nullable(),
|
|
336
|
+
taskId: z.string().uuid().nullable(),
|
|
337
|
+
}).merge(timestampsSchema);
|
|
338
|
+
// Complete event input
|
|
339
|
+
export const completeEventAttributesSchema = z.object({
|
|
340
|
+
actualDate: z.string().datetime().optional(),
|
|
341
|
+
actualQuantity: z.number().positive(),
|
|
342
|
+
actualCost: z.number().nonnegative().optional(),
|
|
343
|
+
notes: z.string().optional(),
|
|
344
|
+
weatherConditions: weatherConditionsSchema.optional(),
|
|
345
|
+
});
|
|
346
|
+
export const completeEventSchema = z.object({
|
|
347
|
+
type: z.literal('fertigation-events'),
|
|
348
|
+
attributes: completeEventAttributesSchema,
|
|
349
|
+
});
|
|
350
|
+
// Skip event input
|
|
351
|
+
export const skipEventSchema = z.object({
|
|
352
|
+
reason: z.string().optional(),
|
|
353
|
+
});
|
|
354
|
+
// Reschedule event input
|
|
355
|
+
export const rescheduleEventSchema = z.object({
|
|
356
|
+
newDate: z.string().datetime(),
|
|
357
|
+
reason: z.string().optional(),
|
|
358
|
+
});
|
|
359
|
+
// Resource schema
|
|
360
|
+
export const fertigationEventResourceSchema = createJsonApiResourceSchema('fertigation-events', fertigationEventAttributesSchema);
|
|
361
|
+
// Response schemas
|
|
362
|
+
export const fertigationEventResponseSchema = jsonApiSingleResponseSchema(fertigationEventResourceSchema);
|
|
363
|
+
export const fertigationEventListResponseSchema = jsonApiCollectionResponseSchema(fertigationEventResourceSchema);
|
|
364
|
+
// =============================================================================
|
|
365
|
+
// Fertigation Recommendation Schemas
|
|
366
|
+
// =============================================================================
|
|
367
|
+
// Recommended product (embedded in recommendation)
|
|
368
|
+
export const recommendedProductSchema = z.object({
|
|
369
|
+
productId: z.string().uuid(),
|
|
370
|
+
productName: z.string(),
|
|
371
|
+
quantity: z.number().positive(),
|
|
372
|
+
unit: z.string(),
|
|
373
|
+
reason: z.string(),
|
|
374
|
+
priority: z.number().int().positive(),
|
|
375
|
+
frequency: z.string().nullable(),
|
|
376
|
+
applicationMethod: applicationMethodSchema.nullable(),
|
|
377
|
+
estimatedCost: z.number().nullable(),
|
|
378
|
+
});
|
|
379
|
+
export const fertigationRecommendationAttributesSchema = z.object({
|
|
380
|
+
scheduleId: z.string().uuid().nullable(),
|
|
381
|
+
fieldId: z.string().uuid(),
|
|
382
|
+
fieldName: z.string().optional(),
|
|
383
|
+
soilTestId: z.string().uuid().nullable(),
|
|
384
|
+
recommendationType: recommendationTypeSchema,
|
|
385
|
+
nitrogenDeficit: z.number().nullable(),
|
|
386
|
+
phosphorusDeficit: z.number().nullable(),
|
|
387
|
+
potassiumDeficit: z.number().nullable(),
|
|
388
|
+
recommendedProducts: z.array(recommendedProductSchema),
|
|
389
|
+
applicationMethod: applicationMethodSchema,
|
|
390
|
+
calculationMethod: calculationMethodSchema,
|
|
391
|
+
calculationInputs: z.record(z.unknown()).nullable(),
|
|
392
|
+
status: recommendationStatusSchema,
|
|
393
|
+
acceptedAt: z.string().datetime().nullable(),
|
|
394
|
+
acceptedBy: z.string().uuid().nullable(),
|
|
395
|
+
estimatedCost: z.number().nullable(),
|
|
396
|
+
aiReasoning: z.string().nullable(),
|
|
397
|
+
confidence: z.number().min(0).max(1).nullable(),
|
|
398
|
+
}).merge(timestampsSchema);
|
|
399
|
+
// Generate recommendation input
|
|
400
|
+
export const generateRecommendationAttributesSchema = z.object({
|
|
401
|
+
fieldId: z.string().uuid(),
|
|
402
|
+
soilTestId: z.string().uuid().optional(),
|
|
403
|
+
cropNutrientProfileId: z.string().uuid(),
|
|
404
|
+
applicationMethod: applicationMethodSchema.default('fertigation'),
|
|
405
|
+
fieldAreaHa: z.number().positive().optional(), // Defaults from field
|
|
406
|
+
});
|
|
407
|
+
export const generateRecommendationSchema = z.object({
|
|
408
|
+
type: z.literal('fertigation-recommendations'),
|
|
409
|
+
attributes: generateRecommendationAttributesSchema,
|
|
410
|
+
});
|
|
411
|
+
// Accept recommendation input
|
|
412
|
+
export const acceptRecommendationSchema = z.object({
|
|
413
|
+
createSchedule: z.boolean().default(true),
|
|
414
|
+
scheduleName: z.string().max(200).optional(),
|
|
415
|
+
});
|
|
416
|
+
// Reject recommendation input
|
|
417
|
+
export const rejectRecommendationSchema = z.object({
|
|
418
|
+
reason: z.string().optional(),
|
|
419
|
+
});
|
|
420
|
+
// Resource schema
|
|
421
|
+
export const fertigationRecommendationResourceSchema = createJsonApiResourceSchema('fertigation-recommendations', fertigationRecommendationAttributesSchema);
|
|
422
|
+
// Response schemas
|
|
423
|
+
export const fertigationRecommendationResponseSchema = jsonApiSingleResponseSchema(fertigationRecommendationResourceSchema);
|
|
424
|
+
export const fertigationRecommendationListResponseSchema = jsonApiCollectionResponseSchema(fertigationRecommendationResourceSchema);
|
|
425
|
+
// Accept recommendation response (includes optional schedule)
|
|
426
|
+
export const acceptRecommendationResponseSchema = z.object({
|
|
427
|
+
recommendation: fertigationRecommendationResourceSchema,
|
|
428
|
+
schedule: fertigationScheduleResourceSchema.optional(),
|
|
429
|
+
});
|
|
430
|
+
// =============================================================================
|
|
431
|
+
// Query Schemas
|
|
432
|
+
// =============================================================================
|
|
433
|
+
export const cropNutrientProfileQuerySchema = z.object({
|
|
434
|
+
'filter[cropCategory]': cropCategorySchema.optional(),
|
|
435
|
+
'filter[cropName]': z.string().optional(),
|
|
436
|
+
'filter[isDefault]': z.coerce.boolean().optional(),
|
|
437
|
+
});
|
|
438
|
+
export const fertilizerProductQuerySchema = z.object({
|
|
439
|
+
'filter[solubility]': solubilitySchema.optional(),
|
|
440
|
+
'filter[applicationMethod]': applicationMethodSchema.optional(),
|
|
441
|
+
'filter[isDefault]': z.coerce.boolean().optional(),
|
|
442
|
+
});
|
|
443
|
+
export const fertigationScheduleQuerySchema = z.object({
|
|
444
|
+
'filter[fieldId]': z.string().uuid().optional(),
|
|
445
|
+
'filter[status]': scheduleStatusSchema.optional(),
|
|
446
|
+
'filter[cropName]': z.string().optional(),
|
|
447
|
+
});
|
|
448
|
+
export const fertigationEventQuerySchema = z.object({
|
|
449
|
+
'filter[status]': eventStatusSchema.optional(),
|
|
450
|
+
'filter[growthStage]': growthStageSchema.optional(),
|
|
451
|
+
'filter[startDate]': z.string().datetime().optional(),
|
|
452
|
+
'filter[endDate]': z.string().datetime().optional(),
|
|
453
|
+
});
|
|
454
|
+
export const upcomingEventsQuerySchema = z.object({
|
|
455
|
+
days: z.coerce.number().int().positive().max(30).default(7),
|
|
456
|
+
limit: z.coerce.number().int().positive().max(50).default(10),
|
|
457
|
+
});
|
|
458
|
+
export const fertigationRecommendationQuerySchema = z.object({
|
|
459
|
+
'filter[fieldId]': z.string().uuid().optional(),
|
|
460
|
+
'filter[status]': recommendationStatusSchema.optional(),
|
|
461
|
+
'filter[recommendationType]': recommendationTypeSchema.optional(),
|
|
462
|
+
});
|
|
@@ -108,7 +108,7 @@ export declare const createOrganizationSchema: z.ZodObject<{
|
|
|
108
108
|
}>;
|
|
109
109
|
export declare const updateOrganizationSchema: z.ZodObject<{
|
|
110
110
|
type: z.ZodLiteral<"organizations">;
|
|
111
|
-
id: z.ZodString
|
|
111
|
+
id: z.ZodOptional<z.ZodString>;
|
|
112
112
|
attributes: z.ZodObject<{
|
|
113
113
|
name: z.ZodOptional<z.ZodString>;
|
|
114
114
|
email: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -130,7 +130,6 @@ export declare const updateOrganizationSchema: z.ZodObject<{
|
|
|
130
130
|
}>;
|
|
131
131
|
}, "strip", z.ZodTypeAny, {
|
|
132
132
|
type: "organizations";
|
|
133
|
-
id: string;
|
|
134
133
|
attributes: {
|
|
135
134
|
email?: string | undefined;
|
|
136
135
|
name?: string | undefined;
|
|
@@ -138,9 +137,9 @@ export declare const updateOrganizationSchema: z.ZodObject<{
|
|
|
138
137
|
address?: string | undefined;
|
|
139
138
|
logo?: string | undefined;
|
|
140
139
|
};
|
|
140
|
+
id?: string | undefined;
|
|
141
141
|
}, {
|
|
142
142
|
type: "organizations";
|
|
143
|
-
id: string;
|
|
144
143
|
attributes: {
|
|
145
144
|
email?: string | undefined;
|
|
146
145
|
name?: string | undefined;
|
|
@@ -148,6 +147,7 @@ export declare const updateOrganizationSchema: z.ZodObject<{
|
|
|
148
147
|
address?: string | undefined;
|
|
149
148
|
logo?: string | undefined;
|
|
150
149
|
};
|
|
150
|
+
id?: string | undefined;
|
|
151
151
|
}>;
|
|
152
152
|
export declare const organizationResourceSchema: z.ZodObject<{
|
|
153
153
|
type: z.ZodLiteral<string>;
|
|
@@ -598,7 +598,7 @@ export declare const createBankAccountSchema: z.ZodObject<{
|
|
|
598
598
|
}>;
|
|
599
599
|
export declare const updateBankAccountSchema: z.ZodObject<{
|
|
600
600
|
type: z.ZodLiteral<"bank-accounts">;
|
|
601
|
-
id: z.ZodString
|
|
601
|
+
id: z.ZodOptional<z.ZodString>;
|
|
602
602
|
attributes: z.ZodObject<{
|
|
603
603
|
bankName: z.ZodOptional<z.ZodString>;
|
|
604
604
|
accountNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -617,22 +617,22 @@ export declare const updateBankAccountSchema: z.ZodObject<{
|
|
|
617
617
|
}>;
|
|
618
618
|
}, "strip", z.ZodTypeAny, {
|
|
619
619
|
type: "bank-accounts";
|
|
620
|
-
id: string;
|
|
621
620
|
attributes: {
|
|
622
621
|
isDefault?: boolean | undefined;
|
|
623
622
|
bankName?: string | undefined;
|
|
624
623
|
accountNumber?: string | undefined;
|
|
625
624
|
accountName?: string | undefined;
|
|
626
625
|
};
|
|
626
|
+
id?: string | undefined;
|
|
627
627
|
}, {
|
|
628
628
|
type: "bank-accounts";
|
|
629
|
-
id: string;
|
|
630
629
|
attributes: {
|
|
631
630
|
isDefault?: boolean | undefined;
|
|
632
631
|
bankName?: string | undefined;
|
|
633
632
|
accountNumber?: string | undefined;
|
|
634
633
|
accountName?: string | undefined;
|
|
635
634
|
};
|
|
635
|
+
id?: string | undefined;
|
|
636
636
|
}>;
|
|
637
637
|
export declare const bankAccountResourceSchema: z.ZodObject<{
|
|
638
638
|
type: z.ZodLiteral<string>;
|
|
@@ -29,7 +29,7 @@ export const createOrganizationSchema = z.object({
|
|
|
29
29
|
// Update organization input (JSON:API format)
|
|
30
30
|
export const updateOrganizationSchema = z.object({
|
|
31
31
|
type: z.literal('organizations'),
|
|
32
|
-
id: z.string().uuid(),
|
|
32
|
+
id: z.string().uuid().optional(), // Optional since ID is in URL path
|
|
33
33
|
attributes: updateOrganizationAttributesSchema,
|
|
34
34
|
});
|
|
35
35
|
// Organization resource (JSON:API resource object)
|
|
@@ -69,7 +69,7 @@ export const createBankAccountSchema = z.object({
|
|
|
69
69
|
// Update bank account input (JSON:API format)
|
|
70
70
|
export const updateBankAccountSchema = z.object({
|
|
71
71
|
type: z.literal('bank-accounts'),
|
|
72
|
-
id: z.string().uuid(),
|
|
72
|
+
id: z.string().uuid().optional(), // Optional since ID is in URL path
|
|
73
73
|
attributes: updateBankAccountAttributesSchema,
|
|
74
74
|
});
|
|
75
75
|
// Bank account resource (JSON:API resource object)
|