@deepintel-ltd/farmpro-contracts 1.36.8 → 1.36.10

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.
@@ -239,6 +239,37 @@ export declare const scoutProtocolSchema: z.ZodObject<{
239
239
  export declare const pillarStageSchema: z.ZodObject<{
240
240
  stageId: z.ZodString;
241
241
  summary: z.ZodString;
242
+ /** The stage's short jobs: what, how often, by when. The card leads with these. */
243
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
244
+ id: z.ZodString;
245
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
246
+ headline: z.ZodString;
247
+ detail: z.ZodOptional<z.ZodString>;
248
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
249
+ when: z.ZodOptional<z.ZodString>;
250
+ dayStart: z.ZodOptional<z.ZodNumber>;
251
+ dayEnd: z.ZodOptional<z.ZodNumber>;
252
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
253
+ id: z.ZodString;
254
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
255
+ headline: z.ZodString;
256
+ detail: z.ZodOptional<z.ZodString>;
257
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
258
+ when: z.ZodOptional<z.ZodString>;
259
+ dayStart: z.ZodOptional<z.ZodNumber>;
260
+ dayEnd: z.ZodOptional<z.ZodNumber>;
261
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
262
+ id: z.ZodString;
263
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
264
+ headline: z.ZodString;
265
+ detail: z.ZodOptional<z.ZodString>;
266
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
267
+ when: z.ZodOptional<z.ZodString>;
268
+ dayStart: z.ZodOptional<z.ZodNumber>;
269
+ dayEnd: z.ZodOptional<z.ZodNumber>;
270
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
271
+ /** FAO-56 crop coefficient for the stage; crop water use is ET0 x Kc. Water plans only. */
272
+ kc: z.ZodOptional<z.ZodNumber>;
242
273
  prevent: z.ZodArray<z.ZodString, "many">;
243
274
  scout: z.ZodOptional<z.ZodObject<{
244
275
  perWeek: z.ZodNumber;
@@ -268,6 +299,16 @@ export declare const pillarStageSchema: z.ZodObject<{
268
299
  watch: string[];
269
300
  prevent: string[];
270
301
  stageId: string;
302
+ actions?: z.objectOutputType<{
303
+ id: z.ZodString;
304
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
305
+ headline: z.ZodString;
306
+ detail: z.ZodOptional<z.ZodString>;
307
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
308
+ when: z.ZodOptional<z.ZodString>;
309
+ dayStart: z.ZodOptional<z.ZodNumber>;
310
+ dayEnd: z.ZodOptional<z.ZodNumber>;
311
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
271
312
  scout?: {
272
313
  grade: "A" | "B" | "C";
273
314
  sourceIds: string[];
@@ -276,11 +317,22 @@ export declare const pillarStageSchema: z.ZodObject<{
276
317
  samplePlants: number;
277
318
  pattern: "W" | "Z";
278
319
  } | undefined;
320
+ kc?: number | undefined;
279
321
  }, {
280
322
  summary: string;
281
323
  watch: string[];
282
324
  prevent: string[];
283
325
  stageId: string;
326
+ actions?: z.objectInputType<{
327
+ id: z.ZodString;
328
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
329
+ headline: z.ZodString;
330
+ detail: z.ZodOptional<z.ZodString>;
331
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
332
+ when: z.ZodOptional<z.ZodString>;
333
+ dayStart: z.ZodOptional<z.ZodNumber>;
334
+ dayEnd: z.ZodOptional<z.ZodNumber>;
335
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
284
336
  scout?: {
285
337
  grade: "A" | "B" | "C";
286
338
  sourceIds: string[];
@@ -289,6 +341,7 @@ export declare const pillarStageSchema: z.ZodObject<{
289
341
  samplePlants: number;
290
342
  pattern: "W" | "Z";
291
343
  } | undefined;
344
+ kc?: number | undefined;
292
345
  }>;
293
346
  /** The plan's own header, without every stage: the client already has the crop-care card for the calendar. */
294
347
  export declare const resolvedPillarSchema: z.ZodObject<{
@@ -322,6 +375,37 @@ export declare const resolvedPillarSchema: z.ZodObject<{
322
375
  stage: z.ZodNullable<z.ZodObject<{
323
376
  stageId: z.ZodString;
324
377
  summary: z.ZodString;
378
+ /** The stage's short jobs: what, how often, by when. The card leads with these. */
379
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
380
+ id: z.ZodString;
381
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
382
+ headline: z.ZodString;
383
+ detail: z.ZodOptional<z.ZodString>;
384
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
385
+ when: z.ZodOptional<z.ZodString>;
386
+ dayStart: z.ZodOptional<z.ZodNumber>;
387
+ dayEnd: z.ZodOptional<z.ZodNumber>;
388
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
389
+ id: z.ZodString;
390
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
391
+ headline: z.ZodString;
392
+ detail: z.ZodOptional<z.ZodString>;
393
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
394
+ when: z.ZodOptional<z.ZodString>;
395
+ dayStart: z.ZodOptional<z.ZodNumber>;
396
+ dayEnd: z.ZodOptional<z.ZodNumber>;
397
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
398
+ id: z.ZodString;
399
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
400
+ headline: z.ZodString;
401
+ detail: z.ZodOptional<z.ZodString>;
402
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
403
+ when: z.ZodOptional<z.ZodString>;
404
+ dayStart: z.ZodOptional<z.ZodNumber>;
405
+ dayEnd: z.ZodOptional<z.ZodNumber>;
406
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
407
+ /** FAO-56 crop coefficient for the stage; crop water use is ET0 x Kc. Water plans only. */
408
+ kc: z.ZodOptional<z.ZodNumber>;
325
409
  prevent: z.ZodArray<z.ZodString, "many">;
326
410
  scout: z.ZodOptional<z.ZodObject<{
327
411
  perWeek: z.ZodNumber;
@@ -351,6 +435,16 @@ export declare const resolvedPillarSchema: z.ZodObject<{
351
435
  watch: string[];
352
436
  prevent: string[];
353
437
  stageId: string;
438
+ actions?: z.objectOutputType<{
439
+ id: z.ZodString;
440
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
441
+ headline: z.ZodString;
442
+ detail: z.ZodOptional<z.ZodString>;
443
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
444
+ when: z.ZodOptional<z.ZodString>;
445
+ dayStart: z.ZodOptional<z.ZodNumber>;
446
+ dayEnd: z.ZodOptional<z.ZodNumber>;
447
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
354
448
  scout?: {
355
449
  grade: "A" | "B" | "C";
356
450
  sourceIds: string[];
@@ -359,11 +453,22 @@ export declare const resolvedPillarSchema: z.ZodObject<{
359
453
  samplePlants: number;
360
454
  pattern: "W" | "Z";
361
455
  } | undefined;
456
+ kc?: number | undefined;
362
457
  }, {
363
458
  summary: string;
364
459
  watch: string[];
365
460
  prevent: string[];
366
461
  stageId: string;
462
+ actions?: z.objectInputType<{
463
+ id: z.ZodString;
464
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
465
+ headline: z.ZodString;
466
+ detail: z.ZodOptional<z.ZodString>;
467
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
468
+ when: z.ZodOptional<z.ZodString>;
469
+ dayStart: z.ZodOptional<z.ZodNumber>;
470
+ dayEnd: z.ZodOptional<z.ZodNumber>;
471
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
367
472
  scout?: {
368
473
  grade: "A" | "B" | "C";
369
474
  sourceIds: string[];
@@ -372,6 +477,7 @@ export declare const resolvedPillarSchema: z.ZodObject<{
372
477
  samplePlants: number;
373
478
  pattern: "W" | "Z";
374
479
  } | undefined;
480
+ kc?: number | undefined;
375
481
  }>>;
376
482
  stageFallback: z.ZodBoolean;
377
483
  /** Threats for this stage, most important first. */
@@ -522,6 +628,16 @@ export declare const resolvedPillarSchema: z.ZodObject<{
522
628
  watch: string[];
523
629
  prevent: string[];
524
630
  stageId: string;
631
+ actions?: z.objectOutputType<{
632
+ id: z.ZodString;
633
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
634
+ headline: z.ZodString;
635
+ detail: z.ZodOptional<z.ZodString>;
636
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
637
+ when: z.ZodOptional<z.ZodString>;
638
+ dayStart: z.ZodOptional<z.ZodNumber>;
639
+ dayEnd: z.ZodOptional<z.ZodNumber>;
640
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
525
641
  scout?: {
526
642
  grade: "A" | "B" | "C";
527
643
  sourceIds: string[];
@@ -530,6 +646,7 @@ export declare const resolvedPillarSchema: z.ZodObject<{
530
646
  samplePlants: number;
531
647
  pattern: "W" | "Z";
532
648
  } | undefined;
649
+ kc?: number | undefined;
533
650
  } | null;
534
651
  day: number | null;
535
652
  phase: "field" | "nursery";
@@ -585,6 +702,16 @@ export declare const resolvedPillarSchema: z.ZodObject<{
585
702
  watch: string[];
586
703
  prevent: string[];
587
704
  stageId: string;
705
+ actions?: z.objectInputType<{
706
+ id: z.ZodString;
707
+ kind: z.ZodEnum<["do", "avoid", "scout"]>;
708
+ headline: z.ZodString;
709
+ detail: z.ZodOptional<z.ZodString>;
710
+ cadence: z.ZodEnum<["once", "daily", "every-few-days", "weekly", "monthly", "each-feed", "as-needed", "always"]>;
711
+ when: z.ZodOptional<z.ZodString>;
712
+ dayStart: z.ZodOptional<z.ZodNumber>;
713
+ dayEnd: z.ZodOptional<z.ZodNumber>;
714
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
588
715
  scout?: {
589
716
  grade: "A" | "B" | "C";
590
717
  sourceIds: string[];
@@ -593,6 +720,7 @@ export declare const resolvedPillarSchema: z.ZodObject<{
593
720
  samplePlants: number;
594
721
  pattern: "W" | "Z";
595
722
  } | undefined;
723
+ kc?: number | undefined;
596
724
  } | null;
597
725
  day: number | null;
598
726
  phase: "field" | "nursery";
@@ -725,4 +853,86 @@ export type ResponseStepContract = z.infer<typeof responseStepSchema>;
725
853
  export type ScoutProtocolContract = z.infer<typeof scoutProtocolSchema>;
726
854
  export type PillarStageContract = z.infer<typeof pillarStageSchema>;
727
855
  export type PillarSourceContract = z.infer<typeof pillarSourceSchema>;
856
+ /** What a harvest on a given day must wait for. */
857
+ export declare const harvestHoldResponseSchema: z.ZodObject<{
858
+ date: z.ZodString;
859
+ /** A recorded waiting period has not ended by `date`. */
860
+ hold: z.ZodBoolean;
861
+ /** A recent spray never recorded its waiting period. */
862
+ unknown: z.ZodBoolean;
863
+ safeHarvestDate: z.ZodNullable<z.ZodString>;
864
+ daysRemaining: z.ZodNullable<z.ZodNumber>;
865
+ message: z.ZodNullable<z.ZodString>;
866
+ treatments: z.ZodArray<z.ZodObject<{
867
+ productName: z.ZodString;
868
+ activeIngredient: z.ZodOptional<z.ZodString>;
869
+ appliedOn: z.ZodString;
870
+ phiDays: z.ZodNumber;
871
+ safeHarvestDate: z.ZodString;
872
+ daysRemaining: z.ZodNumber;
873
+ }, "strip", z.ZodTypeAny, {
874
+ productName: string;
875
+ appliedOn: string;
876
+ phiDays: number;
877
+ safeHarvestDate: string;
878
+ daysRemaining: number;
879
+ activeIngredient?: string | undefined;
880
+ }, {
881
+ productName: string;
882
+ appliedOn: string;
883
+ phiDays: number;
884
+ safeHarvestDate: string;
885
+ daysRemaining: number;
886
+ activeIngredient?: string | undefined;
887
+ }>, "many">;
888
+ unknownTreatments: z.ZodArray<z.ZodObject<{
889
+ productName: z.ZodString;
890
+ appliedOn: z.ZodString;
891
+ }, "strip", z.ZodTypeAny, {
892
+ productName: string;
893
+ appliedOn: string;
894
+ }, {
895
+ productName: string;
896
+ appliedOn: string;
897
+ }>, "many">;
898
+ }, "strip", z.ZodTypeAny, {
899
+ message: string | null;
900
+ date: string;
901
+ unknown: boolean;
902
+ safeHarvestDate: string | null;
903
+ daysRemaining: number | null;
904
+ hold: boolean;
905
+ treatments: {
906
+ productName: string;
907
+ appliedOn: string;
908
+ phiDays: number;
909
+ safeHarvestDate: string;
910
+ daysRemaining: number;
911
+ activeIngredient?: string | undefined;
912
+ }[];
913
+ unknownTreatments: {
914
+ productName: string;
915
+ appliedOn: string;
916
+ }[];
917
+ }, {
918
+ message: string | null;
919
+ date: string;
920
+ unknown: boolean;
921
+ safeHarvestDate: string | null;
922
+ daysRemaining: number | null;
923
+ hold: boolean;
924
+ treatments: {
925
+ productName: string;
926
+ appliedOn: string;
927
+ phiDays: number;
928
+ safeHarvestDate: string;
929
+ daysRemaining: number;
930
+ activeIngredient?: string | undefined;
931
+ }[];
932
+ unknownTreatments: {
933
+ productName: string;
934
+ appliedOn: string;
935
+ }[];
936
+ }>;
937
+ export type HarvestHoldResponse = z.infer<typeof harvestHoldResponseSchema>;
728
938
  //# sourceMappingURL=care-pillar.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"care-pillar.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/care-pillar.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,YAAY,iDAA+C,CAAC;AAEzE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAM7B,CAAC;AAEH,eAAO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B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC9E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACtE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACxE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAWtE,mDAAmD;AACnD,eAAO,MAAM,yBAAyB;;IAEpC,yDAAyD;;IAEzD,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxD,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { careActionSchema } from './crop-care.schemas';
2
3
  const gradeSchema = z.enum(['A', 'B', 'C']);
3
4
  export const pillarSchema = z.enum(['ipm', 'water', 'weeds', 'pruning']);
4
5
  export const pillarSourceSchema = z.object({
@@ -49,6 +50,10 @@ export const scoutProtocolSchema = z.object({
49
50
  export const pillarStageSchema = z.object({
50
51
  stageId: z.string(),
51
52
  summary: z.string(),
53
+ /** The stage's short jobs: what, how often, by when. The card leads with these. */
54
+ actions: z.array(careActionSchema).optional(),
55
+ /** FAO-56 crop coefficient for the stage; crop water use is ET0 x Kc. Water plans only. */
56
+ kc: z.number().optional(),
52
57
  prevent: z.array(z.string()),
53
58
  scout: scoutProtocolSchema.optional(),
54
59
  watch: z.array(z.string()),
@@ -86,3 +91,24 @@ export const pillarAdjustmentsResponseSchema = z.object({
86
91
  weatherAvailable: z.boolean(),
87
92
  generatedAt: z.string().datetime(),
88
93
  });
94
+ const holdTreatmentSchema = z.object({
95
+ productName: z.string(),
96
+ activeIngredient: z.string().optional(),
97
+ appliedOn: z.string(),
98
+ phiDays: z.number(),
99
+ safeHarvestDate: z.string(),
100
+ daysRemaining: z.number(),
101
+ });
102
+ /** What a harvest on a given day must wait for. */
103
+ export const harvestHoldResponseSchema = z.object({
104
+ date: z.string(),
105
+ /** A recorded waiting period has not ended by `date`. */
106
+ hold: z.boolean(),
107
+ /** A recent spray never recorded its waiting period. */
108
+ unknown: z.boolean(),
109
+ safeHarvestDate: z.string().nullable(),
110
+ daysRemaining: z.number().nullable(),
111
+ message: z.string().nullable(),
112
+ treatments: z.array(holdTreatmentSchema),
113
+ unknownTreatments: z.array(z.object({ productName: z.string(), appliedOn: z.string() })),
114
+ });
@@ -15,7 +15,7 @@ export const farmAttributesSchema = z.object({
15
15
  boundary: geoJSONGeometrySchema.nullable(),
16
16
  currency: currencySchema,
17
17
  countryCode: countryCodeSchema,
18
- regionCode: z.string().max(20).nullable(),
18
+ regionCode: z.string().max(100).nullable(),
19
19
  subRegionCode: z.string().max(100).nullable(),
20
20
  timezone: z.string().min(1).max(64),
21
21
  locale: z.string().min(2).max(10),
@@ -34,7 +34,7 @@ export const createFarmAttributesSchema = z.object({
34
34
  boundary: geoJSONGeometrySchema.optional(),
35
35
  currency: currencySchema.optional(),
36
36
  countryCode: countryCodeSchema.optional(),
37
- regionCode: z.string().max(20).optional(),
37
+ regionCode: z.string().max(100).optional(),
38
38
  subRegionCode: z.string().max(100).optional(),
39
39
  timezone: z.string().min(1).max(64).optional(),
40
40
  locale: z.string().min(2).max(10).optional(),