@deepintel-ltd/farmpro-contracts 1.36.5 → 1.36.7

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.
@@ -31,12 +31,75 @@ export declare const fertigationBoardLineSchema: z.ZodObject<{
31
31
  fieldKg: number | null;
32
32
  inStockList: boolean;
33
33
  }>;
34
+ /** A feed day that is not recorded yet: a missed one to catch up, or one coming up. */
35
+ export declare const fertigationBoardFeedDaySchema: z.ZodObject<{
36
+ plannedFor: z.ZodString;
37
+ tank: z.ZodEnum<["A", "B"]>;
38
+ lines: z.ZodArray<z.ZodObject<{
39
+ productId: z.ZodString;
40
+ name: z.ZodString;
41
+ fieldKg: z.ZodNullable<z.ZodNumber>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ name: string;
44
+ productId: string;
45
+ fieldKg: number | null;
46
+ }, {
47
+ name: string;
48
+ productId: string;
49
+ fieldKg: number | null;
50
+ }>, "many">;
51
+ }, "strip", z.ZodTypeAny, {
52
+ tank: "A" | "B";
53
+ lines: {
54
+ name: string;
55
+ productId: string;
56
+ fieldKg: number | null;
57
+ }[];
58
+ plannedFor: string;
59
+ }, {
60
+ tank: "A" | "B";
61
+ lines: {
62
+ name: string;
63
+ productId: string;
64
+ fieldKg: number | null;
65
+ }[];
66
+ plannedFor: string;
67
+ }>;
68
+ /** A feed already recorded for today, so it can be undone. */
69
+ export declare const fertigationBoardRecordedSchema: z.ZodObject<{
70
+ id: z.ZodString;
71
+ status: z.ZodEnum<["done", "skipped"]>;
72
+ tank: z.ZodEnum<["A", "B"]>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ status: "skipped" | "done";
75
+ id: string;
76
+ tank: "A" | "B";
77
+ }, {
78
+ status: "skipped" | "done";
79
+ id: string;
80
+ tank: "A" | "B";
81
+ }>;
34
82
  export declare const fertigationBoardFieldSchema: z.ZodObject<{
35
83
  fieldId: z.ZodString;
36
84
  fieldName: z.ZodString;
85
+ /** field: in the open-field plan. nursery: seedlings still in the nursery. none: no plan for this field. */
86
+ phase: z.ZodEnum<["field", "nursery", "none"]>;
87
+ /** A pepper field that needs a transplant date before it can be planned. */
88
+ needsTransplantDate: z.ZodBoolean;
37
89
  stageLabel: z.ZodNullable<z.ZodString>;
38
90
  fieldDay: z.ZodNullable<z.ZodNumber>;
39
91
  plantCount: z.ZodNullable<z.ZodNumber>;
92
+ /** The day the plan counts from; assumed when no transplant date is recorded. */
93
+ transplant: z.ZodNullable<z.ZodObject<{
94
+ date: z.ZodString;
95
+ assumed: z.ZodBoolean;
96
+ }, "strip", z.ZodTypeAny, {
97
+ date: string;
98
+ assumed: boolean;
99
+ }, {
100
+ date: string;
101
+ assumed: boolean;
102
+ }>>;
40
103
  kind: z.ZodEnum<["feed", "water", "none"]>;
41
104
  tank: z.ZodNullable<z.ZodEnum<["A", "B"]>>;
42
105
  due: z.ZodBoolean;
@@ -76,6 +139,88 @@ export declare const fertigationBoardFieldSchema: z.ZodObject<{
76
139
  fieldKg: number | null;
77
140
  inStockList: boolean;
78
141
  }>, "many">;
142
+ /** Feed days in the last two weeks nobody recorded, oldest first. */
143
+ missed: z.ZodArray<z.ZodObject<{
144
+ plannedFor: z.ZodString;
145
+ tank: z.ZodEnum<["A", "B"]>;
146
+ lines: z.ZodArray<z.ZodObject<{
147
+ productId: z.ZodString;
148
+ name: z.ZodString;
149
+ fieldKg: z.ZodNullable<z.ZodNumber>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ name: string;
152
+ productId: string;
153
+ fieldKg: number | null;
154
+ }, {
155
+ name: string;
156
+ productId: string;
157
+ fieldKg: number | null;
158
+ }>, "many">;
159
+ }, "strip", z.ZodTypeAny, {
160
+ tank: "A" | "B";
161
+ lines: {
162
+ name: string;
163
+ productId: string;
164
+ fieldKg: number | null;
165
+ }[];
166
+ plannedFor: string;
167
+ }, {
168
+ tank: "A" | "B";
169
+ lines: {
170
+ name: string;
171
+ productId: string;
172
+ fieldKg: number | null;
173
+ }[];
174
+ plannedFor: string;
175
+ }>, "many">;
176
+ /** The next feed days in the coming week. */
177
+ upcoming: z.ZodArray<z.ZodObject<{
178
+ plannedFor: z.ZodString;
179
+ tank: z.ZodEnum<["A", "B"]>;
180
+ lines: z.ZodArray<z.ZodObject<{
181
+ productId: z.ZodString;
182
+ name: z.ZodString;
183
+ fieldKg: z.ZodNullable<z.ZodNumber>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ name: string;
186
+ productId: string;
187
+ fieldKg: number | null;
188
+ }, {
189
+ name: string;
190
+ productId: string;
191
+ fieldKg: number | null;
192
+ }>, "many">;
193
+ }, "strip", z.ZodTypeAny, {
194
+ tank: "A" | "B";
195
+ lines: {
196
+ name: string;
197
+ productId: string;
198
+ fieldKg: number | null;
199
+ }[];
200
+ plannedFor: string;
201
+ }, {
202
+ tank: "A" | "B";
203
+ lines: {
204
+ name: string;
205
+ productId: string;
206
+ fieldKg: number | null;
207
+ }[];
208
+ plannedFor: string;
209
+ }>, "many">;
210
+ /** Today's feed once it has been recorded. */
211
+ recorded: z.ZodNullable<z.ZodObject<{
212
+ id: z.ZodString;
213
+ status: z.ZodEnum<["done", "skipped"]>;
214
+ tank: z.ZodEnum<["A", "B"]>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ status: "skipped" | "done";
217
+ id: string;
218
+ tank: "A" | "B";
219
+ }, {
220
+ status: "skipped" | "done";
221
+ id: string;
222
+ tank: "A" | "B";
223
+ }>>;
79
224
  message: z.ZodNullable<z.ZodString>;
80
225
  }, "strip", z.ZodTypeAny, {
81
226
  message: string | null;
@@ -85,7 +230,12 @@ export declare const fertigationBoardFieldSchema: z.ZodObject<{
85
230
  fieldName: string;
86
231
  tank: "A" | "B" | null;
87
232
  warnings: string[];
233
+ phase: "field" | "none" | "nursery";
88
234
  overdue: boolean;
235
+ transplant: {
236
+ date: string;
237
+ assumed: boolean;
238
+ } | null;
89
239
  lines: {
90
240
  name: string;
91
241
  inventoryItemId: string | null;
@@ -97,11 +247,35 @@ export declare const fertigationBoardFieldSchema: z.ZodObject<{
97
247
  fieldKg: number | null;
98
248
  inStockList: boolean;
99
249
  }[];
250
+ upcoming: {
251
+ tank: "A" | "B";
252
+ lines: {
253
+ name: string;
254
+ productId: string;
255
+ fieldKg: number | null;
256
+ }[];
257
+ plannedFor: string;
258
+ }[];
259
+ needsTransplantDate: boolean;
100
260
  stageLabel: string | null;
101
261
  fieldDay: number | null;
102
262
  due: boolean;
103
263
  feedHold: boolean;
104
264
  blockers: string[];
265
+ missed: {
266
+ tank: "A" | "B";
267
+ lines: {
268
+ name: string;
269
+ productId: string;
270
+ fieldKg: number | null;
271
+ }[];
272
+ plannedFor: string;
273
+ }[];
274
+ recorded: {
275
+ status: "skipped" | "done";
276
+ id: string;
277
+ tank: "A" | "B";
278
+ } | null;
105
279
  }, {
106
280
  message: string | null;
107
281
  kind: "none" | "water" | "feed";
@@ -110,7 +284,12 @@ export declare const fertigationBoardFieldSchema: z.ZodObject<{
110
284
  fieldName: string;
111
285
  tank: "A" | "B" | null;
112
286
  warnings: string[];
287
+ phase: "field" | "none" | "nursery";
113
288
  overdue: boolean;
289
+ transplant: {
290
+ date: string;
291
+ assumed: boolean;
292
+ } | null;
114
293
  lines: {
115
294
  name: string;
116
295
  inventoryItemId: string | null;
@@ -122,20 +301,137 @@ export declare const fertigationBoardFieldSchema: z.ZodObject<{
122
301
  fieldKg: number | null;
123
302
  inStockList: boolean;
124
303
  }[];
304
+ upcoming: {
305
+ tank: "A" | "B";
306
+ lines: {
307
+ name: string;
308
+ productId: string;
309
+ fieldKg: number | null;
310
+ }[];
311
+ plannedFor: string;
312
+ }[];
313
+ needsTransplantDate: boolean;
125
314
  stageLabel: string | null;
126
315
  fieldDay: number | null;
127
316
  due: boolean;
128
317
  feedHold: boolean;
129
318
  blockers: string[];
319
+ missed: {
320
+ tank: "A" | "B";
321
+ lines: {
322
+ name: string;
323
+ productId: string;
324
+ fieldKg: number | null;
325
+ }[];
326
+ plannedFor: string;
327
+ }[];
328
+ recorded: {
329
+ status: "skipped" | "done";
330
+ id: string;
331
+ tank: "A" | "B";
332
+ } | null;
333
+ }>;
334
+ /** One fertilizer the farm's fields use, held against the stock across every field. */
335
+ export declare const fertigationNeedSchema: z.ZodObject<{
336
+ productId: z.ZodString;
337
+ name: z.ZodString;
338
+ inventoryItemId: z.ZodNullable<z.ZodString>;
339
+ fieldCount: z.ZodNumber;
340
+ weeklyKg: z.ZodNumber;
341
+ /** Kilograms every field needs over the planning weeks. */
342
+ needKg: z.ZodNumber;
343
+ stockKg: z.ZodNullable<z.ZodNumber>;
344
+ weeksOfCover: z.ZodNullable<z.ZodNumber>;
345
+ purchaseKg: z.ZodNullable<z.ZodNumber>;
346
+ purchaseBags: z.ZodNullable<z.ZodNumber>;
347
+ bagSizeKg: z.ZodNullable<z.ZodNumber>;
348
+ /** Stock covers less than two weeks. */
349
+ low: z.ZodBoolean;
350
+ }, "strip", z.ZodTypeAny, {
351
+ name: string;
352
+ inventoryItemId: string | null;
353
+ bagSizeKg: number | null;
354
+ stockKg: number | null;
355
+ fieldCount: number;
356
+ weeksOfCover: number | null;
357
+ purchaseKg: number | null;
358
+ purchaseBags: number | null;
359
+ low: boolean;
360
+ productId: string;
361
+ weeklyKg: number;
362
+ needKg: number;
363
+ }, {
364
+ name: string;
365
+ inventoryItemId: string | null;
366
+ bagSizeKg: number | null;
367
+ stockKg: number | null;
368
+ fieldCount: number;
369
+ weeksOfCover: number | null;
370
+ purchaseKg: number | null;
371
+ purchaseBags: number | null;
372
+ low: boolean;
373
+ productId: string;
374
+ weeklyKg: number;
375
+ needKg: number;
376
+ }>;
377
+ export declare const fertigationBoardSummarySchema: z.ZodObject<{
378
+ dueToday: z.ZodNumber;
379
+ doneToday: z.ZodNumber;
380
+ missedFeeds: z.ZodNumber;
381
+ /** Cost of the feeds recorded in the last 30 days, from average stock cost. */
382
+ costLast30Days: z.ZodNumber;
383
+ }, "strip", z.ZodTypeAny, {
384
+ dueToday: number;
385
+ doneToday: number;
386
+ missedFeeds: number;
387
+ costLast30Days: number;
388
+ }, {
389
+ dueToday: number;
390
+ doneToday: number;
391
+ missedFeeds: number;
392
+ costLast30Days: number;
130
393
  }>;
131
394
  export declare const fertigationBoardSchema: z.ZodObject<{
132
395
  today: z.ZodString;
396
+ planningWeeks: z.ZodNumber;
397
+ summary: z.ZodObject<{
398
+ dueToday: z.ZodNumber;
399
+ doneToday: z.ZodNumber;
400
+ missedFeeds: z.ZodNumber;
401
+ /** Cost of the feeds recorded in the last 30 days, from average stock cost. */
402
+ costLast30Days: z.ZodNumber;
403
+ }, "strip", z.ZodTypeAny, {
404
+ dueToday: number;
405
+ doneToday: number;
406
+ missedFeeds: number;
407
+ costLast30Days: number;
408
+ }, {
409
+ dueToday: number;
410
+ doneToday: number;
411
+ missedFeeds: number;
412
+ costLast30Days: number;
413
+ }>;
133
414
  fields: z.ZodArray<z.ZodObject<{
134
415
  fieldId: z.ZodString;
135
416
  fieldName: z.ZodString;
417
+ /** field: in the open-field plan. nursery: seedlings still in the nursery. none: no plan for this field. */
418
+ phase: z.ZodEnum<["field", "nursery", "none"]>;
419
+ /** A pepper field that needs a transplant date before it can be planned. */
420
+ needsTransplantDate: z.ZodBoolean;
136
421
  stageLabel: z.ZodNullable<z.ZodString>;
137
422
  fieldDay: z.ZodNullable<z.ZodNumber>;
138
423
  plantCount: z.ZodNullable<z.ZodNumber>;
424
+ /** The day the plan counts from; assumed when no transplant date is recorded. */
425
+ transplant: z.ZodNullable<z.ZodObject<{
426
+ date: z.ZodString;
427
+ assumed: z.ZodBoolean;
428
+ }, "strip", z.ZodTypeAny, {
429
+ date: string;
430
+ assumed: boolean;
431
+ }, {
432
+ date: string;
433
+ assumed: boolean;
434
+ }>>;
139
435
  kind: z.ZodEnum<["feed", "water", "none"]>;
140
436
  tank: z.ZodNullable<z.ZodEnum<["A", "B"]>>;
141
437
  due: z.ZodBoolean;
@@ -175,6 +471,88 @@ export declare const fertigationBoardSchema: z.ZodObject<{
175
471
  fieldKg: number | null;
176
472
  inStockList: boolean;
177
473
  }>, "many">;
474
+ /** Feed days in the last two weeks nobody recorded, oldest first. */
475
+ missed: z.ZodArray<z.ZodObject<{
476
+ plannedFor: z.ZodString;
477
+ tank: z.ZodEnum<["A", "B"]>;
478
+ lines: z.ZodArray<z.ZodObject<{
479
+ productId: z.ZodString;
480
+ name: z.ZodString;
481
+ fieldKg: z.ZodNullable<z.ZodNumber>;
482
+ }, "strip", z.ZodTypeAny, {
483
+ name: string;
484
+ productId: string;
485
+ fieldKg: number | null;
486
+ }, {
487
+ name: string;
488
+ productId: string;
489
+ fieldKg: number | null;
490
+ }>, "many">;
491
+ }, "strip", z.ZodTypeAny, {
492
+ tank: "A" | "B";
493
+ lines: {
494
+ name: string;
495
+ productId: string;
496
+ fieldKg: number | null;
497
+ }[];
498
+ plannedFor: string;
499
+ }, {
500
+ tank: "A" | "B";
501
+ lines: {
502
+ name: string;
503
+ productId: string;
504
+ fieldKg: number | null;
505
+ }[];
506
+ plannedFor: string;
507
+ }>, "many">;
508
+ /** The next feed days in the coming week. */
509
+ upcoming: z.ZodArray<z.ZodObject<{
510
+ plannedFor: z.ZodString;
511
+ tank: z.ZodEnum<["A", "B"]>;
512
+ lines: z.ZodArray<z.ZodObject<{
513
+ productId: z.ZodString;
514
+ name: z.ZodString;
515
+ fieldKg: z.ZodNullable<z.ZodNumber>;
516
+ }, "strip", z.ZodTypeAny, {
517
+ name: string;
518
+ productId: string;
519
+ fieldKg: number | null;
520
+ }, {
521
+ name: string;
522
+ productId: string;
523
+ fieldKg: number | null;
524
+ }>, "many">;
525
+ }, "strip", z.ZodTypeAny, {
526
+ tank: "A" | "B";
527
+ lines: {
528
+ name: string;
529
+ productId: string;
530
+ fieldKg: number | null;
531
+ }[];
532
+ plannedFor: string;
533
+ }, {
534
+ tank: "A" | "B";
535
+ lines: {
536
+ name: string;
537
+ productId: string;
538
+ fieldKg: number | null;
539
+ }[];
540
+ plannedFor: string;
541
+ }>, "many">;
542
+ /** Today's feed once it has been recorded. */
543
+ recorded: z.ZodNullable<z.ZodObject<{
544
+ id: z.ZodString;
545
+ status: z.ZodEnum<["done", "skipped"]>;
546
+ tank: z.ZodEnum<["A", "B"]>;
547
+ }, "strip", z.ZodTypeAny, {
548
+ status: "skipped" | "done";
549
+ id: string;
550
+ tank: "A" | "B";
551
+ }, {
552
+ status: "skipped" | "done";
553
+ id: string;
554
+ tank: "A" | "B";
555
+ }>>;
178
556
  message: z.ZodNullable<z.ZodString>;
179
557
  }, "strip", z.ZodTypeAny, {
180
558
  message: string | null;
@@ -184,7 +562,12 @@ export declare const fertigationBoardSchema: z.ZodObject<{
184
562
  fieldName: string;
185
563
  tank: "A" | "B" | null;
186
564
  warnings: string[];
565
+ phase: "field" | "none" | "nursery";
187
566
  overdue: boolean;
567
+ transplant: {
568
+ date: string;
569
+ assumed: boolean;
570
+ } | null;
188
571
  lines: {
189
572
  name: string;
190
573
  inventoryItemId: string | null;
@@ -196,11 +579,35 @@ export declare const fertigationBoardSchema: z.ZodObject<{
196
579
  fieldKg: number | null;
197
580
  inStockList: boolean;
198
581
  }[];
582
+ upcoming: {
583
+ tank: "A" | "B";
584
+ lines: {
585
+ name: string;
586
+ productId: string;
587
+ fieldKg: number | null;
588
+ }[];
589
+ plannedFor: string;
590
+ }[];
591
+ needsTransplantDate: boolean;
199
592
  stageLabel: string | null;
200
593
  fieldDay: number | null;
201
594
  due: boolean;
202
595
  feedHold: boolean;
203
596
  blockers: string[];
597
+ missed: {
598
+ tank: "A" | "B";
599
+ lines: {
600
+ name: string;
601
+ productId: string;
602
+ fieldKg: number | null;
603
+ }[];
604
+ plannedFor: string;
605
+ }[];
606
+ recorded: {
607
+ status: "skipped" | "done";
608
+ id: string;
609
+ tank: "A" | "B";
610
+ } | null;
204
611
  }, {
205
612
  message: string | null;
206
613
  kind: "none" | "water" | "feed";
@@ -209,7 +616,12 @@ export declare const fertigationBoardSchema: z.ZodObject<{
209
616
  fieldName: string;
210
617
  tank: "A" | "B" | null;
211
618
  warnings: string[];
619
+ phase: "field" | "none" | "nursery";
212
620
  overdue: boolean;
621
+ transplant: {
622
+ date: string;
623
+ assumed: boolean;
624
+ } | null;
213
625
  lines: {
214
626
  name: string;
215
627
  inventoryItemId: string | null;
@@ -221,13 +633,85 @@ export declare const fertigationBoardSchema: z.ZodObject<{
221
633
  fieldKg: number | null;
222
634
  inStockList: boolean;
223
635
  }[];
636
+ upcoming: {
637
+ tank: "A" | "B";
638
+ lines: {
639
+ name: string;
640
+ productId: string;
641
+ fieldKg: number | null;
642
+ }[];
643
+ plannedFor: string;
644
+ }[];
645
+ needsTransplantDate: boolean;
224
646
  stageLabel: string | null;
225
647
  fieldDay: number | null;
226
648
  due: boolean;
227
649
  feedHold: boolean;
228
650
  blockers: string[];
651
+ missed: {
652
+ tank: "A" | "B";
653
+ lines: {
654
+ name: string;
655
+ productId: string;
656
+ fieldKg: number | null;
657
+ }[];
658
+ plannedFor: string;
659
+ }[];
660
+ recorded: {
661
+ status: "skipped" | "done";
662
+ id: string;
663
+ tank: "A" | "B";
664
+ } | null;
665
+ }>, "many">;
666
+ needs: z.ZodArray<z.ZodObject<{
667
+ productId: z.ZodString;
668
+ name: z.ZodString;
669
+ inventoryItemId: z.ZodNullable<z.ZodString>;
670
+ fieldCount: z.ZodNumber;
671
+ weeklyKg: z.ZodNumber;
672
+ /** Kilograms every field needs over the planning weeks. */
673
+ needKg: z.ZodNumber;
674
+ stockKg: z.ZodNullable<z.ZodNumber>;
675
+ weeksOfCover: z.ZodNullable<z.ZodNumber>;
676
+ purchaseKg: z.ZodNullable<z.ZodNumber>;
677
+ purchaseBags: z.ZodNullable<z.ZodNumber>;
678
+ bagSizeKg: z.ZodNullable<z.ZodNumber>;
679
+ /** Stock covers less than two weeks. */
680
+ low: z.ZodBoolean;
681
+ }, "strip", z.ZodTypeAny, {
682
+ name: string;
683
+ inventoryItemId: string | null;
684
+ bagSizeKg: number | null;
685
+ stockKg: number | null;
686
+ fieldCount: number;
687
+ weeksOfCover: number | null;
688
+ purchaseKg: number | null;
689
+ purchaseBags: number | null;
690
+ low: boolean;
691
+ productId: string;
692
+ weeklyKg: number;
693
+ needKg: number;
694
+ }, {
695
+ name: string;
696
+ inventoryItemId: string | null;
697
+ bagSizeKg: number | null;
698
+ stockKg: number | null;
699
+ fieldCount: number;
700
+ weeksOfCover: number | null;
701
+ purchaseKg: number | null;
702
+ purchaseBags: number | null;
703
+ low: boolean;
704
+ productId: string;
705
+ weeklyKg: number;
706
+ needKg: number;
229
707
  }>, "many">;
230
708
  }, "strip", z.ZodTypeAny, {
709
+ summary: {
710
+ dueToday: number;
711
+ doneToday: number;
712
+ missedFeeds: number;
713
+ costLast30Days: number;
714
+ };
231
715
  fields: {
232
716
  message: string | null;
233
717
  kind: "none" | "water" | "feed";
@@ -236,7 +720,12 @@ export declare const fertigationBoardSchema: z.ZodObject<{
236
720
  fieldName: string;
237
721
  tank: "A" | "B" | null;
238
722
  warnings: string[];
723
+ phase: "field" | "none" | "nursery";
239
724
  overdue: boolean;
725
+ transplant: {
726
+ date: string;
727
+ assumed: boolean;
728
+ } | null;
240
729
  lines: {
241
730
  name: string;
242
731
  inventoryItemId: string | null;
@@ -248,14 +737,59 @@ export declare const fertigationBoardSchema: z.ZodObject<{
248
737
  fieldKg: number | null;
249
738
  inStockList: boolean;
250
739
  }[];
740
+ upcoming: {
741
+ tank: "A" | "B";
742
+ lines: {
743
+ name: string;
744
+ productId: string;
745
+ fieldKg: number | null;
746
+ }[];
747
+ plannedFor: string;
748
+ }[];
749
+ needsTransplantDate: boolean;
251
750
  stageLabel: string | null;
252
751
  fieldDay: number | null;
253
752
  due: boolean;
254
753
  feedHold: boolean;
255
754
  blockers: string[];
755
+ missed: {
756
+ tank: "A" | "B";
757
+ lines: {
758
+ name: string;
759
+ productId: string;
760
+ fieldKg: number | null;
761
+ }[];
762
+ plannedFor: string;
763
+ }[];
764
+ recorded: {
765
+ status: "skipped" | "done";
766
+ id: string;
767
+ tank: "A" | "B";
768
+ } | null;
256
769
  }[];
770
+ planningWeeks: number;
257
771
  today: string;
772
+ needs: {
773
+ name: string;
774
+ inventoryItemId: string | null;
775
+ bagSizeKg: number | null;
776
+ stockKg: number | null;
777
+ fieldCount: number;
778
+ weeksOfCover: number | null;
779
+ purchaseKg: number | null;
780
+ purchaseBags: number | null;
781
+ low: boolean;
782
+ productId: string;
783
+ weeklyKg: number;
784
+ needKg: number;
785
+ }[];
258
786
  }, {
787
+ summary: {
788
+ dueToday: number;
789
+ doneToday: number;
790
+ missedFeeds: number;
791
+ costLast30Days: number;
792
+ };
259
793
  fields: {
260
794
  message: string | null;
261
795
  kind: "none" | "water" | "feed";
@@ -264,7 +798,12 @@ export declare const fertigationBoardSchema: z.ZodObject<{
264
798
  fieldName: string;
265
799
  tank: "A" | "B" | null;
266
800
  warnings: string[];
801
+ phase: "field" | "none" | "nursery";
267
802
  overdue: boolean;
803
+ transplant: {
804
+ date: string;
805
+ assumed: boolean;
806
+ } | null;
268
807
  lines: {
269
808
  name: string;
270
809
  inventoryItemId: string | null;
@@ -276,13 +815,52 @@ export declare const fertigationBoardSchema: z.ZodObject<{
276
815
  fieldKg: number | null;
277
816
  inStockList: boolean;
278
817
  }[];
818
+ upcoming: {
819
+ tank: "A" | "B";
820
+ lines: {
821
+ name: string;
822
+ productId: string;
823
+ fieldKg: number | null;
824
+ }[];
825
+ plannedFor: string;
826
+ }[];
827
+ needsTransplantDate: boolean;
279
828
  stageLabel: string | null;
280
829
  fieldDay: number | null;
281
830
  due: boolean;
282
831
  feedHold: boolean;
283
832
  blockers: string[];
833
+ missed: {
834
+ tank: "A" | "B";
835
+ lines: {
836
+ name: string;
837
+ productId: string;
838
+ fieldKg: number | null;
839
+ }[];
840
+ plannedFor: string;
841
+ }[];
842
+ recorded: {
843
+ status: "skipped" | "done";
844
+ id: string;
845
+ tank: "A" | "B";
846
+ } | null;
284
847
  }[];
848
+ planningWeeks: number;
285
849
  today: string;
850
+ needs: {
851
+ name: string;
852
+ inventoryItemId: string | null;
853
+ bagSizeKg: number | null;
854
+ stockKg: number | null;
855
+ fieldCount: number;
856
+ weeksOfCover: number | null;
857
+ purchaseKg: number | null;
858
+ purchaseBags: number | null;
859
+ low: boolean;
860
+ productId: string;
861
+ weeklyKg: number;
862
+ needKg: number;
863
+ }[];
286
864
  }>;
287
865
  export type FertigationBoard = z.infer<typeof fertigationBoardSchema>;
288
866
  export declare const recordFeedBodySchema: z.ZodObject<{
@@ -311,46 +889,67 @@ export declare const fertigationFeedSchema: z.ZodObject<{
311
889
  plannedFor: z.ZodString;
312
890
  status: z.ZodEnum<["done", "skipped", "void"]>;
313
891
  tank: z.ZodEnum<["A", "B"]>;
892
+ /** Field cost posted to Finance for a done feed. */
893
+ totalCost: z.ZodNumber;
894
+ expenseId: z.ZodNullable<z.ZodString>;
895
+ /** True when the stock count could not cover a line: the feed is recorded, the count should be checked. */
896
+ stockShort: z.ZodBoolean;
314
897
  lines: z.ZodArray<z.ZodObject<{
315
898
  productName: z.ZodString;
316
899
  inventoryItemId: z.ZodNullable<z.ZodString>;
317
900
  plannedKg: z.ZodNumber;
318
901
  actualKg: z.ZodNullable<z.ZodNumber>;
902
+ deductedKg: z.ZodNumber;
903
+ shortfallKg: z.ZodNumber;
319
904
  }, "strip", z.ZodTypeAny, {
320
905
  productName: string;
321
906
  inventoryItemId: string | null;
322
907
  actualKg: number | null;
323
908
  plannedKg: number;
909
+ deductedKg: number;
910
+ shortfallKg: number;
324
911
  }, {
325
912
  productName: string;
326
913
  inventoryItemId: string | null;
327
914
  actualKg: number | null;
328
915
  plannedKg: number;
916
+ deductedKg: number;
917
+ shortfallKg: number;
329
918
  }>, "many">;
330
919
  }, "strip", z.ZodTypeAny, {
331
920
  status: "void" | "skipped" | "done";
332
921
  id: string;
333
922
  fieldId: string;
334
923
  tank: "A" | "B";
924
+ totalCost: number;
925
+ expenseId: string | null;
335
926
  lines: {
336
927
  productName: string;
337
928
  inventoryItemId: string | null;
338
929
  actualKg: number | null;
339
930
  plannedKg: number;
931
+ deductedKg: number;
932
+ shortfallKg: number;
340
933
  }[];
341
934
  plannedFor: string;
935
+ stockShort: boolean;
342
936
  }, {
343
937
  status: "void" | "skipped" | "done";
344
938
  id: string;
345
939
  fieldId: string;
346
940
  tank: "A" | "B";
941
+ totalCost: number;
942
+ expenseId: string | null;
347
943
  lines: {
348
944
  productName: string;
349
945
  inventoryItemId: string | null;
350
946
  actualKg: number | null;
351
947
  plannedKg: number;
948
+ deductedKg: number;
949
+ shortfallKg: number;
352
950
  }[];
353
951
  plannedFor: string;
952
+ stockShort: boolean;
354
953
  }>;
355
954
  export type FertigationFeedContract = z.infer<typeof fertigationFeedSchema>;
356
955
  //# sourceMappingURL=fertigation-board.schemas.d.ts.map