@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.
@@ -1 +1 @@
1
- {"version":3,"file":"fertigation-board.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/fertigation-board.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,0BAA0B;;;;;;;;;IASrC,qFAAqF;;;;;;;;;;;;;;;;;;;;;;EAErF,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;QAJtC,qFAAqF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBrF,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;YArBjC,qFAAqF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBrF,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;IAG/B,iFAAiF;;;;;;;;;;;;;;;;EAIjF,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAchC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"fertigation-board.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/fertigation-board.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAA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A8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAY9C,2DAA2D;;;;;;;QAO3D,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBxC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;IAG/B,iFAAiF;;;;;;;;;;;;;;;;EAIjF,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;IAMhC,oDAAoD;;;IAGpD,2GAA2G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY3G,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -12,12 +12,30 @@ export const fertigationBoardLineSchema = z.object({
12
12
  /** False when the plan names a product the farm has not entered as a supply item. */
13
13
  inStockList: z.boolean(),
14
14
  });
15
+ /** A feed day that is not recorded yet: a missed one to catch up, or one coming up. */
16
+ export const fertigationBoardFeedDaySchema = z.object({
17
+ plannedFor: z.string(),
18
+ tank,
19
+ lines: z.array(z.object({ productId: z.string(), name: z.string(), fieldKg: z.number().nullable() })),
20
+ });
21
+ /** A feed already recorded for today, so it can be undone. */
22
+ export const fertigationBoardRecordedSchema = z.object({
23
+ id: z.string(),
24
+ status: z.enum(['done', 'skipped']),
25
+ tank,
26
+ });
15
27
  export const fertigationBoardFieldSchema = z.object({
16
28
  fieldId: z.string(),
17
29
  fieldName: z.string(),
30
+ /** field: in the open-field plan. nursery: seedlings still in the nursery. none: no plan for this field. */
31
+ phase: z.enum(['field', 'nursery', 'none']),
32
+ /** A pepper field that needs a transplant date before it can be planned. */
33
+ needsTransplantDate: z.boolean(),
18
34
  stageLabel: z.string().nullable(),
19
35
  fieldDay: z.number().nullable(),
20
36
  plantCount: z.number().nullable(),
37
+ /** The day the plan counts from; assumed when no transplant date is recorded. */
38
+ transplant: z.object({ date: z.string(), assumed: z.boolean() }).nullable(),
21
39
  kind: z.enum(['feed', 'water', 'none']),
22
40
  tank: tank.nullable(),
23
41
  due: z.boolean(),
@@ -26,11 +44,44 @@ export const fertigationBoardFieldSchema = z.object({
26
44
  blockers: z.array(z.string()),
27
45
  warnings: z.array(z.string()),
28
46
  lines: z.array(fertigationBoardLineSchema),
47
+ /** Feed days in the last two weeks nobody recorded, oldest first. */
48
+ missed: z.array(fertigationBoardFeedDaySchema),
49
+ /** The next feed days in the coming week. */
50
+ upcoming: z.array(fertigationBoardFeedDaySchema),
51
+ /** Today's feed once it has been recorded. */
52
+ recorded: fertigationBoardRecordedSchema.nullable(),
29
53
  message: z.string().nullable(),
30
54
  });
55
+ /** One fertilizer the farm's fields use, held against the stock across every field. */
56
+ export const fertigationNeedSchema = z.object({
57
+ productId: z.string(),
58
+ name: z.string(),
59
+ inventoryItemId: z.string().nullable(),
60
+ fieldCount: z.number(),
61
+ weeklyKg: z.number(),
62
+ /** Kilograms every field needs over the planning weeks. */
63
+ needKg: z.number(),
64
+ stockKg: z.number().nullable(),
65
+ weeksOfCover: z.number().nullable(),
66
+ purchaseKg: z.number().nullable(),
67
+ purchaseBags: z.number().nullable(),
68
+ bagSizeKg: z.number().nullable(),
69
+ /** Stock covers less than two weeks. */
70
+ low: z.boolean(),
71
+ });
72
+ export const fertigationBoardSummarySchema = z.object({
73
+ dueToday: z.number(),
74
+ doneToday: z.number(),
75
+ missedFeeds: z.number(),
76
+ /** Cost of the feeds recorded in the last 30 days, from average stock cost. */
77
+ costLast30Days: z.number(),
78
+ });
31
79
  export const fertigationBoardSchema = z.object({
32
80
  today: z.string(),
81
+ planningWeeks: z.number(),
82
+ summary: fertigationBoardSummarySchema,
33
83
  fields: z.array(fertigationBoardFieldSchema),
84
+ needs: z.array(fertigationNeedSchema),
34
85
  });
35
86
  export const recordFeedBodySchema = z.object({
36
87
  plannedFor: z.string().regex(/^\d{4}-\d{2}-\d{2}/),
@@ -46,10 +97,17 @@ export const fertigationFeedSchema = z.object({
46
97
  plannedFor: z.string(),
47
98
  status: z.enum(['done', 'skipped', 'void']),
48
99
  tank,
100
+ /** Field cost posted to Finance for a done feed. */
101
+ totalCost: z.number(),
102
+ expenseId: z.string().nullable(),
103
+ /** True when the stock count could not cover a line: the feed is recorded, the count should be checked. */
104
+ stockShort: z.boolean(),
49
105
  lines: z.array(z.object({
50
106
  productName: z.string(),
51
107
  inventoryItemId: z.string().nullable(),
52
108
  plannedKg: z.number(),
53
109
  actualKg: z.number().nullable(),
110
+ deductedKg: z.number(),
111
+ shortfallKg: z.number(),
54
112
  })),
55
113
  });
@@ -391,6 +391,17 @@ export declare const yieldToDateSchema: z.ZodObject<{
391
391
  skippedUnits: boolean;
392
392
  }>;
393
393
  export declare const nutrientPlanSchema: z.ZodObject<{
394
+ /** The day the plan counts from. Assumed when the farmer has not recorded a transplant date. */
395
+ transplant: z.ZodNullable<z.ZodObject<{
396
+ date: z.ZodString;
397
+ assumed: z.ZodBoolean;
398
+ }, "strip", z.ZodTypeAny, {
399
+ date: string;
400
+ assumed: boolean;
401
+ }, {
402
+ date: string;
403
+ assumed: boolean;
404
+ }>>;
394
405
  sheet: z.ZodObject<{
395
406
  id: z.ZodString;
396
407
  version: z.ZodNumber;
@@ -729,6 +740,10 @@ export declare const nutrientPlanSchema: z.ZodObject<{
729
740
  name: string;
730
741
  };
731
742
  warnings: string[];
743
+ transplant: {
744
+ date: string;
745
+ assumed: boolean;
746
+ } | null;
732
747
  water: {
733
748
  notes: string[];
734
749
  kc: number;
@@ -850,6 +865,10 @@ export declare const nutrientPlanSchema: z.ZodObject<{
850
865
  name: string;
851
866
  };
852
867
  warnings: string[];
868
+ transplant: {
869
+ date: string;
870
+ assumed: boolean;
871
+ } | null;
853
872
  water: {
854
873
  notes: string[];
855
874
  kc: number;
@@ -966,6 +985,17 @@ export declare const nutrientPlanResponseSchema: z.ZodObject<{
966
985
  /** Why there is no plan, in words the farmer can act on. Null when status is ok. */
967
986
  message: z.ZodNullable<z.ZodString>;
968
987
  plan: z.ZodNullable<z.ZodObject<{
988
+ /** The day the plan counts from. Assumed when the farmer has not recorded a transplant date. */
989
+ transplant: z.ZodNullable<z.ZodObject<{
990
+ date: z.ZodString;
991
+ assumed: z.ZodBoolean;
992
+ }, "strip", z.ZodTypeAny, {
993
+ date: string;
994
+ assumed: boolean;
995
+ }, {
996
+ date: string;
997
+ assumed: boolean;
998
+ }>>;
969
999
  sheet: z.ZodObject<{
970
1000
  id: z.ZodString;
971
1001
  version: z.ZodNumber;
@@ -1304,6 +1334,10 @@ export declare const nutrientPlanResponseSchema: z.ZodObject<{
1304
1334
  name: string;
1305
1335
  };
1306
1336
  warnings: string[];
1337
+ transplant: {
1338
+ date: string;
1339
+ assumed: boolean;
1340
+ } | null;
1307
1341
  water: {
1308
1342
  notes: string[];
1309
1343
  kc: number;
@@ -1425,6 +1459,10 @@ export declare const nutrientPlanResponseSchema: z.ZodObject<{
1425
1459
  name: string;
1426
1460
  };
1427
1461
  warnings: string[];
1462
+ transplant: {
1463
+ date: string;
1464
+ assumed: boolean;
1465
+ } | null;
1428
1466
  water: {
1429
1467
  notes: string[];
1430
1468
  kc: number;
@@ -1842,6 +1880,10 @@ export declare const nutrientPlanResponseSchema: z.ZodObject<{
1842
1880
  name: string;
1843
1881
  };
1844
1882
  warnings: string[];
1883
+ transplant: {
1884
+ date: string;
1885
+ assumed: boolean;
1886
+ } | null;
1845
1887
  water: {
1846
1888
  notes: string[];
1847
1889
  kc: number;
@@ -2032,6 +2074,10 @@ export declare const nutrientPlanResponseSchema: z.ZodObject<{
2032
2074
  name: string;
2033
2075
  };
2034
2076
  warnings: string[];
2077
+ transplant: {
2078
+ date: string;
2079
+ assumed: boolean;
2080
+ } | null;
2035
2081
  water: {
2036
2082
  notes: string[];
2037
2083
  kc: number;
@@ -1 +1 @@
1
- {"version":3,"file":"nutrient-plan.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/nutrient-plan.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,uBAAuB;;;IAGlC,4FAA4F;;;IAG5F,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtF,CAAC;AAEH,eAAO,MAAM,eAAe,sOAa1B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,wFAAwF;AACxF,eAAO,MAAM,oBAAoB;;;;;;;IAO/B,gDAAgD;;;;;IAKhD,wDAAwD;;IAExD,yEAAyE;;IAEzE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjF,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAb5B,gDAAgD;;;;;QAKhD,wDAAwD;;QAExD,yEAAyE;;QAEzE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBjF,CAAC;AAEH,eAAO,MAAM,sBAAsB;;IAEjC,uFAAuF;;;;;;;;;;;;;;;;;;;;IAEvF,0DAA0D;;;;;;;;;;;;;;;;;;;;;;EAE1D,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;QANpC,uFAAuF;;;;;;;;;;;;;;;;;;;;QAEvF,0DAA0D;;;;;;;;;;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;;;;;;;;;;;;;EAO3B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;QAxKnC,uFAAuF;;;;;;;;;;;;;;;;;;;;QAEvF,0DAA0D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6K1D,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAClE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -99,6 +99,8 @@ export const yieldToDateSchema = z.object({
99
99
  skippedUnits: z.boolean(),
100
100
  });
101
101
  export const nutrientPlanSchema = z.object({
102
+ /** The day the plan counts from. Assumed when the farmer has not recorded a transplant date. */
103
+ transplant: z.object({ date: z.string(), assumed: z.boolean() }).nullable(),
102
104
  sheet: z.object({
103
105
  id: z.string(),
104
106
  version: z.number(),
@@ -441,7 +441,7 @@ export declare const orchardPlanSchema: z.ZodObject<{
441
441
  plantedAt: string;
442
442
  ageDays: number;
443
443
  treeCount: number | null;
444
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
444
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
445
445
  }, {
446
446
  stage: {
447
447
  id: string;
@@ -454,7 +454,7 @@ export declare const orchardPlanSchema: z.ZodObject<{
454
454
  plantedAt: string;
455
455
  ageDays: number;
456
456
  treeCount: number | null;
457
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
457
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
458
458
  }>;
459
459
  month: z.ZodObject<{
460
460
  month: z.ZodNumber;
@@ -865,7 +865,7 @@ export declare const orchardPlanSchema: z.ZodObject<{
865
865
  plantedAt: string;
866
866
  ageDays: number;
867
867
  treeCount: number | null;
868
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
868
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
869
869
  };
870
870
  nutrition: {
871
871
  note: string | null;
@@ -972,7 +972,7 @@ export declare const orchardPlanSchema: z.ZodObject<{
972
972
  plantedAt: string;
973
973
  ageDays: number;
974
974
  treeCount: number | null;
975
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
975
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
976
976
  };
977
977
  nutrition: {
978
978
  note: string | null;
@@ -1113,7 +1113,7 @@ export declare const orchardPlanResponseSchema: z.ZodObject<{
1113
1113
  plantedAt: string;
1114
1114
  ageDays: number;
1115
1115
  treeCount: number | null;
1116
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
1116
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
1117
1117
  }, {
1118
1118
  stage: {
1119
1119
  id: string;
@@ -1126,7 +1126,7 @@ export declare const orchardPlanResponseSchema: z.ZodObject<{
1126
1126
  plantedAt: string;
1127
1127
  ageDays: number;
1128
1128
  treeCount: number | null;
1129
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
1129
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
1130
1130
  }>;
1131
1131
  month: z.ZodObject<{
1132
1132
  month: z.ZodNumber;
@@ -1537,7 +1537,7 @@ export declare const orchardPlanResponseSchema: z.ZodObject<{
1537
1537
  plantedAt: string;
1538
1538
  ageDays: number;
1539
1539
  treeCount: number | null;
1540
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
1540
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
1541
1541
  };
1542
1542
  nutrition: {
1543
1543
  note: string | null;
@@ -1644,7 +1644,7 @@ export declare const orchardPlanResponseSchema: z.ZodObject<{
1644
1644
  plantedAt: string;
1645
1645
  ageDays: number;
1646
1646
  treeCount: number | null;
1647
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
1647
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
1648
1648
  };
1649
1649
  nutrition: {
1650
1650
  note: string | null;
@@ -1757,7 +1757,7 @@ export declare const orchardPlanResponseSchema: z.ZodObject<{
1757
1757
  plantedAt: string;
1758
1758
  ageDays: number;
1759
1759
  treeCount: number | null;
1760
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
1760
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
1761
1761
  };
1762
1762
  nutrition: {
1763
1763
  note: string | null;
@@ -1870,7 +1870,7 @@ export declare const orchardPlanResponseSchema: z.ZodObject<{
1870
1870
  plantedAt: string;
1871
1871
  ageDays: number;
1872
1872
  treeCount: number | null;
1873
- treeCountSource: "unknown" | "counted" | "stand" | "assumed";
1873
+ treeCountSource: "unknown" | "assumed" | "counted" | "stand";
1874
1874
  };
1875
1875
  nutrition: {
1876
1876
  note: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepintel-ltd/farmpro-contracts",
3
- "version": "1.36.5",
3
+ "version": "1.36.7",
4
4
  "description": "Type-safe API contracts for FarmPro API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",