@deepintel-ltd/farmpro-contracts 1.11.8 → 1.11.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.
Files changed (43) hide show
  1. package/dist/index.d.ts +5 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +3 -0
  4. package/dist/routes/agents.routes.d.ts +142 -0
  5. package/dist/routes/agents.routes.d.ts.map +1 -1
  6. package/dist/routes/equipment.routes.d.ts +36 -36
  7. package/dist/routes/extension.routes.d.ts +12 -12
  8. package/dist/routes/fertigation.routes.d.ts +156 -156
  9. package/dist/routes/field-activities.routes.d.ts +2397 -0
  10. package/dist/routes/field-activities.routes.d.ts.map +1 -0
  11. package/dist/routes/field-activities.routes.js +81 -0
  12. package/dist/routes/fields.routes.d.ts +867 -0
  13. package/dist/routes/fields.routes.d.ts.map +1 -1
  14. package/dist/routes/fields.routes.js +20 -1
  15. package/dist/routes/index.d.ts +6 -0
  16. package/dist/routes/index.d.ts.map +1 -1
  17. package/dist/routes/index.js +4 -0
  18. package/dist/routes/irrigation.routes.d.ts +20 -20
  19. package/dist/routes/livestock-groups.routes.d.ts +36 -36
  20. package/dist/routes/livestock.routes.d.ts +30 -30
  21. package/dist/routes/market-intelligence.routes.d.ts +364 -0
  22. package/dist/routes/market-intelligence.routes.d.ts.map +1 -0
  23. package/dist/routes/market-intelligence.routes.js +45 -0
  24. package/dist/routes/soil-tests.routes.d.ts +36 -36
  25. package/dist/routes/tasks.routes.d.ts +120 -120
  26. package/dist/schemas/agents.schemas.d.ts +163 -0
  27. package/dist/schemas/agents.schemas.d.ts.map +1 -1
  28. package/dist/schemas/agents.schemas.js +23 -0
  29. package/dist/schemas/equipment.schemas.d.ts +30 -30
  30. package/dist/schemas/extension.schemas.d.ts +18 -18
  31. package/dist/schemas/fertigation.schemas.d.ts +42 -42
  32. package/dist/schemas/field-activities.schemas.d.ts +806 -0
  33. package/dist/schemas/field-activities.schemas.d.ts.map +1 -0
  34. package/dist/schemas/field-activities.schemas.js +68 -0
  35. package/dist/schemas/fields.schemas.d.ts +181 -0
  36. package/dist/schemas/fields.schemas.d.ts.map +1 -1
  37. package/dist/schemas/fields.schemas.js +16 -0
  38. package/dist/schemas/irrigation.schemas.d.ts +14 -14
  39. package/dist/schemas/livestock-groups.schemas.d.ts +24 -24
  40. package/dist/schemas/livestock.schemas.d.ts +24 -24
  41. package/dist/schemas/soil-tests.schemas.d.ts +34 -34
  42. package/dist/schemas/tasks.schemas.d.ts +96 -96
  43. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ import { initContract } from '@ts-rest/core';
2
+ import { z } from 'zod';
3
+ import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
4
+ const c = initContract();
5
+ const marketProjectionSchema = z.object({
6
+ crop: z.string(),
7
+ outlook: z.string(),
8
+ details: z.string(),
9
+ });
10
+ export const marketIntelligenceOverviewSchema = z.object({
11
+ farmId: z.string().uuid(),
12
+ domesticSummary: z
13
+ .object({
14
+ title: z.string(),
15
+ analysis: z.string(),
16
+ keyTakeaway: z.string(),
17
+ })
18
+ .nullable(),
19
+ exportSummary: z
20
+ .object({
21
+ title: z.string(),
22
+ analysis: z.string(),
23
+ keyTakeaway: z.string(),
24
+ })
25
+ .nullable(),
26
+ projections: z.array(marketProjectionSchema),
27
+ eudrAlertTitle: z.string().nullable(),
28
+ updatedAt: z.string().datetime(),
29
+ });
30
+ export const marketIntelligenceRouter = c.router({
31
+ getOverview: {
32
+ method: 'GET',
33
+ path: '/farms/:farmId/market-intelligence/overview',
34
+ pathParams: z.object({
35
+ farmId: z.string().uuid(),
36
+ }),
37
+ responses: {
38
+ 200: marketIntelligenceOverviewSchema,
39
+ 401: jsonApiErrorResponseSchema,
40
+ 404: jsonApiErrorResponseSchema,
41
+ },
42
+ summary: 'Farm market intelligence overview',
43
+ description: 'National market summaries and crop projections for sell-window decisions',
44
+ },
45
+ });
@@ -97,8 +97,8 @@ export declare const soilTestsRouter: {
97
97
  }, "strip", z.ZodTypeAny, {
98
98
  createdAt: string;
99
99
  updatedAt: string;
100
- fieldId: string;
101
100
  notes: string | null;
101
+ fieldId: string;
102
102
  testDate: string;
103
103
  testedBy: string | null;
104
104
  labName: string | null;
@@ -126,8 +126,8 @@ export declare const soilTestsRouter: {
126
126
  }, {
127
127
  createdAt: string;
128
128
  updatedAt: string;
129
- fieldId: string;
130
129
  notes: string | null;
130
+ fieldId: string;
131
131
  testDate: string;
132
132
  testedBy: string | null;
133
133
  labName: string | null;
@@ -162,8 +162,8 @@ export declare const soilTestsRouter: {
162
162
  attributes: {
163
163
  createdAt: string;
164
164
  updatedAt: string;
165
- fieldId: string;
166
165
  notes: string | null;
166
+ fieldId: string;
167
167
  testDate: string;
168
168
  testedBy: string | null;
169
169
  labName: string | null;
@@ -198,8 +198,8 @@ export declare const soilTestsRouter: {
198
198
  attributes: {
199
199
  createdAt: string;
200
200
  updatedAt: string;
201
- fieldId: string;
202
201
  notes: string | null;
202
+ fieldId: string;
203
203
  testDate: string;
204
204
  testedBy: string | null;
205
205
  labName: string | null;
@@ -260,8 +260,8 @@ export declare const soilTestsRouter: {
260
260
  attributes: {
261
261
  createdAt: string;
262
262
  updatedAt: string;
263
- fieldId: string;
264
263
  notes: string | null;
264
+ fieldId: string;
265
265
  testDate: string;
266
266
  testedBy: string | null;
267
267
  labName: string | null;
@@ -308,8 +308,8 @@ export declare const soilTestsRouter: {
308
308
  attributes: {
309
309
  createdAt: string;
310
310
  updatedAt: string;
311
- fieldId: string;
312
311
  notes: string | null;
312
+ fieldId: string;
313
313
  testDate: string;
314
314
  testedBy: string | null;
315
315
  labName: string | null;
@@ -735,8 +735,8 @@ export declare const soilTestsRouter: {
735
735
  }, "strip", z.ZodTypeAny, {
736
736
  createdAt: string;
737
737
  updatedAt: string;
738
- fieldId: string;
739
738
  notes: string | null;
739
+ fieldId: string;
740
740
  testDate: string;
741
741
  testedBy: string | null;
742
742
  labName: string | null;
@@ -764,8 +764,8 @@ export declare const soilTestsRouter: {
764
764
  }, {
765
765
  createdAt: string;
766
766
  updatedAt: string;
767
- fieldId: string;
768
767
  notes: string | null;
768
+ fieldId: string;
769
769
  testDate: string;
770
770
  testedBy: string | null;
771
771
  labName: string | null;
@@ -800,8 +800,8 @@ export declare const soilTestsRouter: {
800
800
  attributes: {
801
801
  createdAt: string;
802
802
  updatedAt: string;
803
- fieldId: string;
804
803
  notes: string | null;
804
+ fieldId: string;
805
805
  testDate: string;
806
806
  testedBy: string | null;
807
807
  labName: string | null;
@@ -836,8 +836,8 @@ export declare const soilTestsRouter: {
836
836
  attributes: {
837
837
  createdAt: string;
838
838
  updatedAt: string;
839
- fieldId: string;
840
839
  notes: string | null;
840
+ fieldId: string;
841
841
  testDate: string;
842
842
  testedBy: string | null;
843
843
  labName: string | null;
@@ -898,8 +898,8 @@ export declare const soilTestsRouter: {
898
898
  attributes: {
899
899
  createdAt: string;
900
900
  updatedAt: string;
901
- fieldId: string;
902
901
  notes: string | null;
902
+ fieldId: string;
903
903
  testDate: string;
904
904
  testedBy: string | null;
905
905
  labName: string | null;
@@ -946,8 +946,8 @@ export declare const soilTestsRouter: {
946
946
  attributes: {
947
947
  createdAt: string;
948
948
  updatedAt: string;
949
- fieldId: string;
950
949
  notes: string | null;
950
+ fieldId: string;
951
951
  testDate: string;
952
952
  testedBy: string | null;
953
953
  labName: string | null;
@@ -1422,8 +1422,8 @@ export declare const soilTestsRouter: {
1422
1422
  }, "strip", z.ZodTypeAny, {
1423
1423
  createdAt: string;
1424
1424
  updatedAt: string;
1425
- fieldId: string;
1426
1425
  notes: string | null;
1426
+ fieldId: string;
1427
1427
  testDate: string;
1428
1428
  testedBy: string | null;
1429
1429
  labName: string | null;
@@ -1451,8 +1451,8 @@ export declare const soilTestsRouter: {
1451
1451
  }, {
1452
1452
  createdAt: string;
1453
1453
  updatedAt: string;
1454
- fieldId: string;
1455
1454
  notes: string | null;
1455
+ fieldId: string;
1456
1456
  testDate: string;
1457
1457
  testedBy: string | null;
1458
1458
  labName: string | null;
@@ -1545,8 +1545,8 @@ export declare const soilTestsRouter: {
1545
1545
  attributes: {
1546
1546
  createdAt: string;
1547
1547
  updatedAt: string;
1548
- fieldId: string;
1549
1548
  notes: string | null;
1549
+ fieldId: string;
1550
1550
  testDate: string;
1551
1551
  testedBy: string | null;
1552
1552
  labName: string | null;
@@ -1592,8 +1592,8 @@ export declare const soilTestsRouter: {
1592
1592
  attributes: {
1593
1593
  createdAt: string;
1594
1594
  updatedAt: string;
1595
- fieldId: string;
1596
1595
  notes: string | null;
1596
+ fieldId: string;
1597
1597
  testDate: string;
1598
1598
  testedBy: string | null;
1599
1599
  labName: string | null;
@@ -1665,8 +1665,8 @@ export declare const soilTestsRouter: {
1665
1665
  attributes: {
1666
1666
  createdAt: string;
1667
1667
  updatedAt: string;
1668
- fieldId: string;
1669
1668
  notes: string | null;
1669
+ fieldId: string;
1670
1670
  testDate: string;
1671
1671
  testedBy: string | null;
1672
1672
  labName: string | null;
@@ -1724,8 +1724,8 @@ export declare const soilTestsRouter: {
1724
1724
  attributes: {
1725
1725
  createdAt: string;
1726
1726
  updatedAt: string;
1727
- fieldId: string;
1728
1727
  notes: string | null;
1728
+ fieldId: string;
1729
1729
  testDate: string;
1730
1730
  testedBy: string | null;
1731
1731
  labName: string | null;
@@ -1996,8 +1996,8 @@ export declare const soilTestsRouter: {
1996
1996
  fieldId: z.ZodOptional<z.ZodString>;
1997
1997
  testDate: z.ZodOptional<z.ZodString>;
1998
1998
  }, "strip", z.ZodTypeAny, {
1999
- fieldId?: string | undefined;
2000
1999
  notes?: string | undefined;
2000
+ fieldId?: string | undefined;
2001
2001
  testDate?: string | undefined;
2002
2002
  testedBy?: string | undefined;
2003
2003
  labName?: string | undefined;
@@ -2013,8 +2013,8 @@ export declare const soilTestsRouter: {
2013
2013
  testCost?: number | undefined;
2014
2014
  documentUrl?: string | undefined;
2015
2015
  }, {
2016
- fieldId?: string | undefined;
2017
2016
  notes?: string | undefined;
2017
+ fieldId?: string | undefined;
2018
2018
  testDate?: string | undefined;
2019
2019
  testedBy?: string | undefined;
2020
2020
  labName?: string | undefined;
@@ -2034,8 +2034,8 @@ export declare const soilTestsRouter: {
2034
2034
  type: "soil-tests";
2035
2035
  id: string;
2036
2036
  attributes: {
2037
- fieldId?: string | undefined;
2038
2037
  notes?: string | undefined;
2038
+ fieldId?: string | undefined;
2039
2039
  testDate?: string | undefined;
2040
2040
  testedBy?: string | undefined;
2041
2041
  labName?: string | undefined;
@@ -2055,8 +2055,8 @@ export declare const soilTestsRouter: {
2055
2055
  type: "soil-tests";
2056
2056
  id: string;
2057
2057
  attributes: {
2058
- fieldId?: string | undefined;
2059
2058
  notes?: string | undefined;
2059
+ fieldId?: string | undefined;
2060
2060
  testDate?: string | undefined;
2061
2061
  testedBy?: string | undefined;
2062
2062
  labName?: string | undefined;
@@ -2078,8 +2078,8 @@ export declare const soilTestsRouter: {
2078
2078
  type: "soil-tests";
2079
2079
  id: string;
2080
2080
  attributes: {
2081
- fieldId?: string | undefined;
2082
2081
  notes?: string | undefined;
2082
+ fieldId?: string | undefined;
2083
2083
  testDate?: string | undefined;
2084
2084
  testedBy?: string | undefined;
2085
2085
  labName?: string | undefined;
@@ -2101,8 +2101,8 @@ export declare const soilTestsRouter: {
2101
2101
  type: "soil-tests";
2102
2102
  id: string;
2103
2103
  attributes: {
2104
- fieldId?: string | undefined;
2105
2104
  notes?: string | undefined;
2105
+ fieldId?: string | undefined;
2106
2106
  testDate?: string | undefined;
2107
2107
  testedBy?: string | undefined;
2108
2108
  labName?: string | undefined;
@@ -2171,8 +2171,8 @@ export declare const soilTestsRouter: {
2171
2171
  }, "strip", z.ZodTypeAny, {
2172
2172
  createdAt: string;
2173
2173
  updatedAt: string;
2174
- fieldId: string;
2175
2174
  notes: string | null;
2175
+ fieldId: string;
2176
2176
  testDate: string;
2177
2177
  testedBy: string | null;
2178
2178
  labName: string | null;
@@ -2200,8 +2200,8 @@ export declare const soilTestsRouter: {
2200
2200
  }, {
2201
2201
  createdAt: string;
2202
2202
  updatedAt: string;
2203
- fieldId: string;
2204
2203
  notes: string | null;
2204
+ fieldId: string;
2205
2205
  testDate: string;
2206
2206
  testedBy: string | null;
2207
2207
  labName: string | null;
@@ -2236,8 +2236,8 @@ export declare const soilTestsRouter: {
2236
2236
  attributes: {
2237
2237
  createdAt: string;
2238
2238
  updatedAt: string;
2239
- fieldId: string;
2240
2239
  notes: string | null;
2240
+ fieldId: string;
2241
2241
  testDate: string;
2242
2242
  testedBy: string | null;
2243
2243
  labName: string | null;
@@ -2272,8 +2272,8 @@ export declare const soilTestsRouter: {
2272
2272
  attributes: {
2273
2273
  createdAt: string;
2274
2274
  updatedAt: string;
2275
- fieldId: string;
2276
2275
  notes: string | null;
2276
+ fieldId: string;
2277
2277
  testDate: string;
2278
2278
  testedBy: string | null;
2279
2279
  labName: string | null;
@@ -2334,8 +2334,8 @@ export declare const soilTestsRouter: {
2334
2334
  attributes: {
2335
2335
  createdAt: string;
2336
2336
  updatedAt: string;
2337
- fieldId: string;
2338
2337
  notes: string | null;
2338
+ fieldId: string;
2339
2339
  testDate: string;
2340
2340
  testedBy: string | null;
2341
2341
  labName: string | null;
@@ -2382,8 +2382,8 @@ export declare const soilTestsRouter: {
2382
2382
  attributes: {
2383
2383
  createdAt: string;
2384
2384
  updatedAt: string;
2385
- fieldId: string;
2386
2385
  notes: string | null;
2386
+ fieldId: string;
2387
2387
  testDate: string;
2388
2388
  testedBy: string | null;
2389
2389
  labName: string | null;
@@ -3074,8 +3074,8 @@ export declare const soilTestsRouter: {
3074
3074
  }, "strip", z.ZodTypeAny, {
3075
3075
  createdAt: string;
3076
3076
  updatedAt: string;
3077
- fieldId: string;
3078
3077
  notes: string | null;
3078
+ fieldId: string;
3079
3079
  testDate: string;
3080
3080
  testedBy: string | null;
3081
3081
  labName: string | null;
@@ -3103,8 +3103,8 @@ export declare const soilTestsRouter: {
3103
3103
  }, {
3104
3104
  createdAt: string;
3105
3105
  updatedAt: string;
3106
- fieldId: string;
3107
3106
  notes: string | null;
3107
+ fieldId: string;
3108
3108
  testDate: string;
3109
3109
  testedBy: string | null;
3110
3110
  labName: string | null;
@@ -3139,8 +3139,8 @@ export declare const soilTestsRouter: {
3139
3139
  attributes: {
3140
3140
  createdAt: string;
3141
3141
  updatedAt: string;
3142
- fieldId: string;
3143
3142
  notes: string | null;
3143
+ fieldId: string;
3144
3144
  testDate: string;
3145
3145
  testedBy: string | null;
3146
3146
  labName: string | null;
@@ -3175,8 +3175,8 @@ export declare const soilTestsRouter: {
3175
3175
  attributes: {
3176
3176
  createdAt: string;
3177
3177
  updatedAt: string;
3178
- fieldId: string;
3179
3178
  notes: string | null;
3179
+ fieldId: string;
3180
3180
  testDate: string;
3181
3181
  testedBy: string | null;
3182
3182
  labName: string | null;
@@ -3237,8 +3237,8 @@ export declare const soilTestsRouter: {
3237
3237
  attributes: {
3238
3238
  createdAt: string;
3239
3239
  updatedAt: string;
3240
- fieldId: string;
3241
3240
  notes: string | null;
3241
+ fieldId: string;
3242
3242
  testDate: string;
3243
3243
  testedBy: string | null;
3244
3244
  labName: string | null;
@@ -3285,8 +3285,8 @@ export declare const soilTestsRouter: {
3285
3285
  attributes: {
3286
3286
  createdAt: string;
3287
3287
  updatedAt: string;
3288
- fieldId: string;
3289
3288
  notes: string | null;
3289
+ fieldId: string;
3290
3290
  testDate: string;
3291
3291
  testedBy: string | null;
3292
3292
  labName: string | null;