@deepintel-ltd/farmpro-contracts 1.4.2 → 1.5.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/routes/agent-workflows.routes.js +6 -6
- package/dist/routes/farms.routes.d.ts +42 -0
- package/dist/routes/farms.routes.d.ts.map +1 -1
- package/dist/routes/field-monitoring.routes.d.ts +290 -4
- package/dist/routes/field-monitoring.routes.d.ts.map +1 -1
- package/dist/routes/field-monitoring.routes.js +48 -1
- package/dist/routes/team.routes.d.ts +343 -0
- package/dist/routes/team.routes.d.ts.map +1 -1
- package/dist/routes/team.routes.js +26 -0
- package/dist/schemas/farms.schemas.d.ts +51 -0
- package/dist/schemas/farms.schemas.d.ts.map +1 -1
- package/dist/schemas/farms.schemas.js +5 -1
- package/dist/schemas/field-monitoring.schemas.d.ts +9 -3
- package/dist/schemas/field-monitoring.schemas.d.ts.map +1 -1
- package/dist/schemas/field-monitoring.schemas.js +3 -1
- package/dist/schemas/team.schemas.d.ts +8 -0
- package/dist/schemas/team.schemas.d.ts.map +1 -1
- package/dist/schemas/team.schemas.js +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Farm schemas - JSON:API compliant
|
|
4
4
|
*/
|
|
5
|
+
export declare const currencySchema: z.ZodEnum<["NGN", "USD"]>;
|
|
5
6
|
export declare const farmAttributesSchema: z.ZodObject<{
|
|
6
7
|
name: z.ZodString;
|
|
7
8
|
location: z.ZodString;
|
|
@@ -16,6 +17,7 @@ export declare const farmAttributesSchema: z.ZodObject<{
|
|
|
16
17
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
17
18
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
18
19
|
}>>;
|
|
20
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
19
21
|
} & {
|
|
20
22
|
createdAt: z.ZodString;
|
|
21
23
|
updatedAt: z.ZodString;
|
|
@@ -29,6 +31,7 @@ export declare const farmAttributesSchema: z.ZodObject<{
|
|
|
29
31
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
30
32
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
31
33
|
} | null;
|
|
34
|
+
currency: "NGN" | "USD";
|
|
32
35
|
}, {
|
|
33
36
|
createdAt: string;
|
|
34
37
|
updatedAt: string;
|
|
@@ -39,6 +42,7 @@ export declare const farmAttributesSchema: z.ZodObject<{
|
|
|
39
42
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
40
43
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
41
44
|
} | null;
|
|
45
|
+
currency: "NGN" | "USD";
|
|
42
46
|
}>;
|
|
43
47
|
export declare const createFarmAttributesSchema: z.ZodObject<{
|
|
44
48
|
name: z.ZodString;
|
|
@@ -54,9 +58,11 @@ export declare const createFarmAttributesSchema: z.ZodObject<{
|
|
|
54
58
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
55
59
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
56
60
|
}>>;
|
|
61
|
+
currency: z.ZodDefault<z.ZodOptional<z.ZodEnum<["NGN", "USD"]>>>;
|
|
57
62
|
}, "strip", z.ZodTypeAny, {
|
|
58
63
|
name: string;
|
|
59
64
|
location: string;
|
|
65
|
+
currency: "NGN" | "USD";
|
|
60
66
|
size?: number | undefined;
|
|
61
67
|
boundary?: {
|
|
62
68
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
@@ -70,6 +76,7 @@ export declare const createFarmAttributesSchema: z.ZodObject<{
|
|
|
70
76
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
71
77
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
72
78
|
} | undefined;
|
|
79
|
+
currency?: "NGN" | "USD" | undefined;
|
|
73
80
|
}>;
|
|
74
81
|
export declare const updateFarmAttributesSchema: z.ZodObject<{
|
|
75
82
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -85,6 +92,7 @@ export declare const updateFarmAttributesSchema: z.ZodObject<{
|
|
|
85
92
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
86
93
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
87
94
|
}>>>;
|
|
95
|
+
currency: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<["NGN", "USD"]>>>>;
|
|
88
96
|
}, "strip", z.ZodTypeAny, {
|
|
89
97
|
name?: string | undefined;
|
|
90
98
|
location?: string | undefined;
|
|
@@ -93,6 +101,7 @@ export declare const updateFarmAttributesSchema: z.ZodObject<{
|
|
|
93
101
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
94
102
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
95
103
|
} | undefined;
|
|
104
|
+
currency?: "NGN" | "USD" | undefined;
|
|
96
105
|
}, {
|
|
97
106
|
name?: string | undefined;
|
|
98
107
|
location?: string | undefined;
|
|
@@ -101,6 +110,7 @@ export declare const updateFarmAttributesSchema: z.ZodObject<{
|
|
|
101
110
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
102
111
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
103
112
|
} | undefined;
|
|
113
|
+
currency?: "NGN" | "USD" | undefined;
|
|
104
114
|
}>;
|
|
105
115
|
export declare const createFarmSchema: z.ZodObject<{
|
|
106
116
|
type: z.ZodLiteral<"farms">;
|
|
@@ -118,9 +128,11 @@ export declare const createFarmSchema: z.ZodObject<{
|
|
|
118
128
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
119
129
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
120
130
|
}>>;
|
|
131
|
+
currency: z.ZodDefault<z.ZodOptional<z.ZodEnum<["NGN", "USD"]>>>;
|
|
121
132
|
}, "strip", z.ZodTypeAny, {
|
|
122
133
|
name: string;
|
|
123
134
|
location: string;
|
|
135
|
+
currency: "NGN" | "USD";
|
|
124
136
|
size?: number | undefined;
|
|
125
137
|
boundary?: {
|
|
126
138
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
@@ -134,12 +146,14 @@ export declare const createFarmSchema: z.ZodObject<{
|
|
|
134
146
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
135
147
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
136
148
|
} | undefined;
|
|
149
|
+
currency?: "NGN" | "USD" | undefined;
|
|
137
150
|
}>;
|
|
138
151
|
}, "strip", z.ZodTypeAny, {
|
|
139
152
|
type: "farms";
|
|
140
153
|
attributes: {
|
|
141
154
|
name: string;
|
|
142
155
|
location: string;
|
|
156
|
+
currency: "NGN" | "USD";
|
|
143
157
|
size?: number | undefined;
|
|
144
158
|
boundary?: {
|
|
145
159
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
@@ -156,6 +170,7 @@ export declare const createFarmSchema: z.ZodObject<{
|
|
|
156
170
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
157
171
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
158
172
|
} | undefined;
|
|
173
|
+
currency?: "NGN" | "USD" | undefined;
|
|
159
174
|
};
|
|
160
175
|
}>;
|
|
161
176
|
export declare const updateFarmSchema: z.ZodObject<{
|
|
@@ -175,6 +190,7 @@ export declare const updateFarmSchema: z.ZodObject<{
|
|
|
175
190
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
176
191
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
177
192
|
}>>>;
|
|
193
|
+
currency: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<["NGN", "USD"]>>>>;
|
|
178
194
|
}, "strip", z.ZodTypeAny, {
|
|
179
195
|
name?: string | undefined;
|
|
180
196
|
location?: string | undefined;
|
|
@@ -183,6 +199,7 @@ export declare const updateFarmSchema: z.ZodObject<{
|
|
|
183
199
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
184
200
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
185
201
|
} | undefined;
|
|
202
|
+
currency?: "NGN" | "USD" | undefined;
|
|
186
203
|
}, {
|
|
187
204
|
name?: string | undefined;
|
|
188
205
|
location?: string | undefined;
|
|
@@ -191,6 +208,7 @@ export declare const updateFarmSchema: z.ZodObject<{
|
|
|
191
208
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
192
209
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
193
210
|
} | undefined;
|
|
211
|
+
currency?: "NGN" | "USD" | undefined;
|
|
194
212
|
}>;
|
|
195
213
|
}, "strip", z.ZodTypeAny, {
|
|
196
214
|
type: "farms";
|
|
@@ -203,6 +221,7 @@ export declare const updateFarmSchema: z.ZodObject<{
|
|
|
203
221
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
204
222
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
205
223
|
} | undefined;
|
|
224
|
+
currency?: "NGN" | "USD" | undefined;
|
|
206
225
|
};
|
|
207
226
|
}, {
|
|
208
227
|
type: "farms";
|
|
@@ -215,6 +234,7 @@ export declare const updateFarmSchema: z.ZodObject<{
|
|
|
215
234
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
216
235
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
217
236
|
} | undefined;
|
|
237
|
+
currency?: "NGN" | "USD" | undefined;
|
|
218
238
|
};
|
|
219
239
|
}>;
|
|
220
240
|
export declare const farmResourceSchema: z.ZodObject<{
|
|
@@ -234,6 +254,7 @@ export declare const farmResourceSchema: z.ZodObject<{
|
|
|
234
254
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
235
255
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
236
256
|
}>>;
|
|
257
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
237
258
|
} & {
|
|
238
259
|
createdAt: z.ZodString;
|
|
239
260
|
updatedAt: z.ZodString;
|
|
@@ -247,6 +268,7 @@ export declare const farmResourceSchema: z.ZodObject<{
|
|
|
247
268
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
248
269
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
249
270
|
} | null;
|
|
271
|
+
currency: "NGN" | "USD";
|
|
250
272
|
}, {
|
|
251
273
|
createdAt: string;
|
|
252
274
|
updatedAt: string;
|
|
@@ -257,6 +279,7 @@ export declare const farmResourceSchema: z.ZodObject<{
|
|
|
257
279
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
258
280
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
259
281
|
} | null;
|
|
282
|
+
currency: "NGN" | "USD";
|
|
260
283
|
}>;
|
|
261
284
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
262
285
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -274,6 +297,7 @@ export declare const farmResourceSchema: z.ZodObject<{
|
|
|
274
297
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
275
298
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
276
299
|
} | null;
|
|
300
|
+
currency: "NGN" | "USD";
|
|
277
301
|
};
|
|
278
302
|
relationships?: Record<string, unknown> | undefined;
|
|
279
303
|
links?: Record<string, string> | undefined;
|
|
@@ -291,6 +315,7 @@ export declare const farmResourceSchema: z.ZodObject<{
|
|
|
291
315
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
292
316
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
293
317
|
} | null;
|
|
318
|
+
currency: "NGN" | "USD";
|
|
294
319
|
};
|
|
295
320
|
relationships?: Record<string, unknown> | undefined;
|
|
296
321
|
links?: Record<string, string> | undefined;
|
|
@@ -313,6 +338,7 @@ export declare const farmDetailResourceSchema: z.ZodObject<{
|
|
|
313
338
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
314
339
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
315
340
|
}>>;
|
|
341
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
316
342
|
} & {
|
|
317
343
|
createdAt: z.ZodString;
|
|
318
344
|
updatedAt: z.ZodString;
|
|
@@ -326,6 +352,7 @@ export declare const farmDetailResourceSchema: z.ZodObject<{
|
|
|
326
352
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
327
353
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
328
354
|
} | null;
|
|
355
|
+
currency: "NGN" | "USD";
|
|
329
356
|
}, {
|
|
330
357
|
createdAt: string;
|
|
331
358
|
updatedAt: string;
|
|
@@ -336,6 +363,7 @@ export declare const farmDetailResourceSchema: z.ZodObject<{
|
|
|
336
363
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
337
364
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
338
365
|
} | null;
|
|
366
|
+
currency: "NGN" | "USD";
|
|
339
367
|
}>;
|
|
340
368
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
341
369
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -449,6 +477,7 @@ export declare const farmDetailResourceSchema: z.ZodObject<{
|
|
|
449
477
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
450
478
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
451
479
|
} | null;
|
|
480
|
+
currency: "NGN" | "USD";
|
|
452
481
|
};
|
|
453
482
|
relationships?: {
|
|
454
483
|
fields?: {
|
|
@@ -483,6 +512,7 @@ export declare const farmDetailResourceSchema: z.ZodObject<{
|
|
|
483
512
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
484
513
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
485
514
|
} | null;
|
|
515
|
+
currency: "NGN" | "USD";
|
|
486
516
|
};
|
|
487
517
|
relationships?: {
|
|
488
518
|
fields?: {
|
|
@@ -523,6 +553,7 @@ export declare const farmResponseSchema: z.ZodObject<{
|
|
|
523
553
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
524
554
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
525
555
|
}>>;
|
|
556
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
526
557
|
} & {
|
|
527
558
|
createdAt: z.ZodString;
|
|
528
559
|
updatedAt: z.ZodString;
|
|
@@ -536,6 +567,7 @@ export declare const farmResponseSchema: z.ZodObject<{
|
|
|
536
567
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
537
568
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
538
569
|
} | null;
|
|
570
|
+
currency: "NGN" | "USD";
|
|
539
571
|
}, {
|
|
540
572
|
createdAt: string;
|
|
541
573
|
updatedAt: string;
|
|
@@ -546,6 +578,7 @@ export declare const farmResponseSchema: z.ZodObject<{
|
|
|
546
578
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
547
579
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
548
580
|
} | null;
|
|
581
|
+
currency: "NGN" | "USD";
|
|
549
582
|
}>;
|
|
550
583
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
551
584
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -563,6 +596,7 @@ export declare const farmResponseSchema: z.ZodObject<{
|
|
|
563
596
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
564
597
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
565
598
|
} | null;
|
|
599
|
+
currency: "NGN" | "USD";
|
|
566
600
|
};
|
|
567
601
|
relationships?: Record<string, unknown> | undefined;
|
|
568
602
|
links?: Record<string, string> | undefined;
|
|
@@ -580,6 +614,7 @@ export declare const farmResponseSchema: z.ZodObject<{
|
|
|
580
614
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
581
615
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
582
616
|
} | null;
|
|
617
|
+
currency: "NGN" | "USD";
|
|
583
618
|
};
|
|
584
619
|
relationships?: Record<string, unknown> | undefined;
|
|
585
620
|
links?: Record<string, string> | undefined;
|
|
@@ -623,6 +658,7 @@ export declare const farmResponseSchema: z.ZodObject<{
|
|
|
623
658
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
624
659
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
625
660
|
} | null;
|
|
661
|
+
currency: "NGN" | "USD";
|
|
626
662
|
};
|
|
627
663
|
relationships?: Record<string, unknown> | undefined;
|
|
628
664
|
links?: Record<string, string> | undefined;
|
|
@@ -652,6 +688,7 @@ export declare const farmResponseSchema: z.ZodObject<{
|
|
|
652
688
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
653
689
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
654
690
|
} | null;
|
|
691
|
+
currency: "NGN" | "USD";
|
|
655
692
|
};
|
|
656
693
|
relationships?: Record<string, unknown> | undefined;
|
|
657
694
|
links?: Record<string, string> | undefined;
|
|
@@ -686,6 +723,7 @@ export declare const farmDetailResponseSchema: z.ZodObject<{
|
|
|
686
723
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
687
724
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
688
725
|
}>>;
|
|
726
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
689
727
|
} & {
|
|
690
728
|
createdAt: z.ZodString;
|
|
691
729
|
updatedAt: z.ZodString;
|
|
@@ -699,6 +737,7 @@ export declare const farmDetailResponseSchema: z.ZodObject<{
|
|
|
699
737
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
700
738
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
701
739
|
} | null;
|
|
740
|
+
currency: "NGN" | "USD";
|
|
702
741
|
}, {
|
|
703
742
|
createdAt: string;
|
|
704
743
|
updatedAt: string;
|
|
@@ -709,6 +748,7 @@ export declare const farmDetailResponseSchema: z.ZodObject<{
|
|
|
709
748
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
710
749
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
711
750
|
} | null;
|
|
751
|
+
currency: "NGN" | "USD";
|
|
712
752
|
}>;
|
|
713
753
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
714
754
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -822,6 +862,7 @@ export declare const farmDetailResponseSchema: z.ZodObject<{
|
|
|
822
862
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
823
863
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
824
864
|
} | null;
|
|
865
|
+
currency: "NGN" | "USD";
|
|
825
866
|
};
|
|
826
867
|
relationships?: {
|
|
827
868
|
fields?: {
|
|
@@ -856,6 +897,7 @@ export declare const farmDetailResponseSchema: z.ZodObject<{
|
|
|
856
897
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
857
898
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
858
899
|
} | null;
|
|
900
|
+
currency: "NGN" | "USD";
|
|
859
901
|
};
|
|
860
902
|
relationships?: {
|
|
861
903
|
fields?: {
|
|
@@ -916,6 +958,7 @@ export declare const farmDetailResponseSchema: z.ZodObject<{
|
|
|
916
958
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
917
959
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
918
960
|
} | null;
|
|
961
|
+
currency: "NGN" | "USD";
|
|
919
962
|
};
|
|
920
963
|
relationships?: {
|
|
921
964
|
fields?: {
|
|
@@ -962,6 +1005,7 @@ export declare const farmDetailResponseSchema: z.ZodObject<{
|
|
|
962
1005
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
963
1006
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
964
1007
|
} | null;
|
|
1008
|
+
currency: "NGN" | "USD";
|
|
965
1009
|
};
|
|
966
1010
|
relationships?: {
|
|
967
1011
|
fields?: {
|
|
@@ -1013,6 +1057,7 @@ export declare const farmListResponseSchema: z.ZodObject<{
|
|
|
1013
1057
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
1014
1058
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
1015
1059
|
}>>;
|
|
1060
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
1016
1061
|
} & {
|
|
1017
1062
|
createdAt: z.ZodString;
|
|
1018
1063
|
updatedAt: z.ZodString;
|
|
@@ -1026,6 +1071,7 @@ export declare const farmListResponseSchema: z.ZodObject<{
|
|
|
1026
1071
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
1027
1072
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
1028
1073
|
} | null;
|
|
1074
|
+
currency: "NGN" | "USD";
|
|
1029
1075
|
}, {
|
|
1030
1076
|
createdAt: string;
|
|
1031
1077
|
updatedAt: string;
|
|
@@ -1036,6 +1082,7 @@ export declare const farmListResponseSchema: z.ZodObject<{
|
|
|
1036
1082
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
1037
1083
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
1038
1084
|
} | null;
|
|
1085
|
+
currency: "NGN" | "USD";
|
|
1039
1086
|
}>;
|
|
1040
1087
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1041
1088
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1053,6 +1100,7 @@ export declare const farmListResponseSchema: z.ZodObject<{
|
|
|
1053
1100
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
1054
1101
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
1055
1102
|
} | null;
|
|
1103
|
+
currency: "NGN" | "USD";
|
|
1056
1104
|
};
|
|
1057
1105
|
relationships?: Record<string, unknown> | undefined;
|
|
1058
1106
|
links?: Record<string, string> | undefined;
|
|
@@ -1070,6 +1118,7 @@ export declare const farmListResponseSchema: z.ZodObject<{
|
|
|
1070
1118
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
1071
1119
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
1072
1120
|
} | null;
|
|
1121
|
+
currency: "NGN" | "USD";
|
|
1073
1122
|
};
|
|
1074
1123
|
relationships?: Record<string, unknown> | undefined;
|
|
1075
1124
|
links?: Record<string, string> | undefined;
|
|
@@ -1113,6 +1162,7 @@ export declare const farmListResponseSchema: z.ZodObject<{
|
|
|
1113
1162
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
1114
1163
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
1115
1164
|
} | null;
|
|
1165
|
+
currency: "NGN" | "USD";
|
|
1116
1166
|
};
|
|
1117
1167
|
relationships?: Record<string, unknown> | undefined;
|
|
1118
1168
|
links?: Record<string, string> | undefined;
|
|
@@ -1142,6 +1192,7 @@ export declare const farmListResponseSchema: z.ZodObject<{
|
|
|
1142
1192
|
type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
|
|
1143
1193
|
coordinates: number[] | number[][] | number[][][] | number[][][][];
|
|
1144
1194
|
} | null;
|
|
1195
|
+
currency: "NGN" | "USD";
|
|
1145
1196
|
};
|
|
1146
1197
|
relationships?: Record<string, unknown> | undefined;
|
|
1147
1198
|
links?: Record<string, string> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"farms.schemas.d.ts","sourceRoot":"","sources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B,CAAC,CAAC;AAC/D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.farmListResponseSchema = exports.farmDetailResponseSchema = exports.farmResponseSchema = exports.farmDetailResourceSchema = exports.farmResourceSchema = exports.updateFarmSchema = exports.createFarmSchema = exports.updateFarmAttributesSchema = exports.createFarmAttributesSchema = exports.farmAttributesSchema = void 0;
|
|
3
|
+
exports.farmListResponseSchema = exports.farmDetailResponseSchema = exports.farmResponseSchema = exports.farmDetailResourceSchema = exports.farmResourceSchema = exports.updateFarmSchema = exports.createFarmSchema = exports.updateFarmAttributesSchema = exports.createFarmAttributesSchema = exports.farmAttributesSchema = exports.currencySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_schemas_1 = require("./common.schemas");
|
|
6
6
|
/**
|
|
7
7
|
* Farm schemas - JSON:API compliant
|
|
8
8
|
*/
|
|
9
|
+
// Currency enum for supported currencies
|
|
10
|
+
exports.currencySchema = zod_1.z.enum(['NGN', 'USD']);
|
|
9
11
|
// Farm attributes schema (for JSON:API attributes object)
|
|
10
12
|
exports.farmAttributesSchema = zod_1.z.object({
|
|
11
13
|
name: zod_1.z.string().min(1).max(100),
|
|
12
14
|
location: zod_1.z.string(),
|
|
13
15
|
size: zod_1.z.number().nullable(),
|
|
14
16
|
boundary: common_schemas_1.geoJSONGeometrySchema.nullable(),
|
|
17
|
+
currency: exports.currencySchema,
|
|
15
18
|
}).merge(common_schemas_1.timestampsSchema);
|
|
16
19
|
// Farm attributes for creation (input)
|
|
17
20
|
exports.createFarmAttributesSchema = zod_1.z.object({
|
|
@@ -19,6 +22,7 @@ exports.createFarmAttributesSchema = zod_1.z.object({
|
|
|
19
22
|
location: zod_1.z.string().min(1),
|
|
20
23
|
size: zod_1.z.number().positive().optional(),
|
|
21
24
|
boundary: common_schemas_1.geoJSONGeometrySchema.optional(),
|
|
25
|
+
currency: exports.currencySchema.optional().default('NGN'),
|
|
22
26
|
});
|
|
23
27
|
// Farm attributes for update (input)
|
|
24
28
|
exports.updateFarmAttributesSchema = exports.createFarmAttributesSchema.partial();
|
|
@@ -316,13 +316,16 @@ export declare const alertsQuerySchema: z.ZodObject<{
|
|
|
316
316
|
}>;
|
|
317
317
|
export declare const triggerAnalysisResponseSchema: z.ZodObject<{
|
|
318
318
|
message: z.ZodString;
|
|
319
|
-
jobId: z.ZodString
|
|
319
|
+
jobId: z.ZodNullable<z.ZodString>;
|
|
320
|
+
nextAvailableAt: z.ZodOptional<z.ZodString>;
|
|
320
321
|
}, "strip", z.ZodTypeAny, {
|
|
321
322
|
message: string;
|
|
322
|
-
jobId: string;
|
|
323
|
+
jobId: string | null;
|
|
324
|
+
nextAvailableAt?: string | undefined;
|
|
323
325
|
}, {
|
|
324
326
|
message: string;
|
|
325
|
-
jobId: string;
|
|
327
|
+
jobId: string | null;
|
|
328
|
+
nextAvailableAt?: string | undefined;
|
|
326
329
|
}>;
|
|
327
330
|
export declare const fieldMonitoringErrorResponseSchema: z.ZodObject<{
|
|
328
331
|
message: z.ZodString;
|
|
@@ -401,6 +404,7 @@ export type SoilReading = z.infer<typeof soilReadingSchema>;
|
|
|
401
404
|
export type SoilTrend = z.infer<typeof soilTrendSchema>;
|
|
402
405
|
export declare const historicalNDVIDataPointSchema: z.ZodObject<{
|
|
403
406
|
date: z.ZodString;
|
|
407
|
+
time: z.ZodOptional<z.ZodString>;
|
|
404
408
|
ndvi: z.ZodNumber;
|
|
405
409
|
source: z.ZodEnum<["sentinel-2", "landsat-8", "modis"]>;
|
|
406
410
|
cloudCoverage: z.ZodNumber;
|
|
@@ -411,12 +415,14 @@ export declare const historicalNDVIDataPointSchema: z.ZodObject<{
|
|
|
411
415
|
ndvi: number;
|
|
412
416
|
cloudCoverage: number;
|
|
413
417
|
imageCoverage: number;
|
|
418
|
+
time?: string | undefined;
|
|
414
419
|
}, {
|
|
415
420
|
date: string;
|
|
416
421
|
source: "sentinel-2" | "landsat-8" | "modis";
|
|
417
422
|
ndvi: number;
|
|
418
423
|
cloudCoverage: number;
|
|
419
424
|
imageCoverage: number;
|
|
425
|
+
time?: string | undefined;
|
|
420
426
|
}>;
|
|
421
427
|
export type HistoricalNDVIDataPoint = z.infer<typeof historicalNDVIDataPointSchema>;
|
|
422
428
|
//# sourceMappingURL=field-monitoring.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-monitoring.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/field-monitoring.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAGF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AA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WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAGxD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;EAOxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
|
|
@@ -85,7 +85,8 @@ exports.alertsQuerySchema = zod_1.z.object({
|
|
|
85
85
|
// Response Schemas
|
|
86
86
|
exports.triggerAnalysisResponseSchema = zod_1.z.object({
|
|
87
87
|
message: zod_1.z.string(),
|
|
88
|
-
jobId: zod_1.z.string(),
|
|
88
|
+
jobId: zod_1.z.string().nullable(),
|
|
89
|
+
nextAvailableAt: zod_1.z.string().datetime().optional(),
|
|
89
90
|
});
|
|
90
91
|
exports.fieldMonitoringErrorResponseSchema = zod_1.z.object({
|
|
91
92
|
message: zod_1.z.string(),
|
|
@@ -109,6 +110,7 @@ exports.soilTrendSchema = zod_1.z.object({
|
|
|
109
110
|
// Historical NDVI Schemas
|
|
110
111
|
exports.historicalNDVIDataPointSchema = zod_1.z.object({
|
|
111
112
|
date: zod_1.z.string().datetime(),
|
|
113
|
+
time: zod_1.z.string().datetime().optional(), // Also include 'time' for consistency with NDVI trend endpoint
|
|
112
114
|
ndvi: zod_1.z.number().min(-1).max(1),
|
|
113
115
|
source: zod_1.z.enum(['sentinel-2', 'landsat-8', 'modis']),
|
|
114
116
|
cloudCoverage: zod_1.z.number().min(0).max(100),
|
|
@@ -46,15 +46,18 @@ export declare const createTeamMemberAttributesSchema: z.ZodObject<{
|
|
|
46
46
|
email: z.ZodString;
|
|
47
47
|
role: z.ZodEnum<["owner", "farm-manager", "agronomist", "field-worker", "accountant", "other"]>;
|
|
48
48
|
phone: z.ZodOptional<z.ZodString>;
|
|
49
|
+
message: z.ZodOptional<z.ZodString>;
|
|
49
50
|
}, "strip", z.ZodTypeAny, {
|
|
50
51
|
email: string;
|
|
51
52
|
name: string;
|
|
52
53
|
role: "owner" | "farm-manager" | "agronomist" | "field-worker" | "accountant" | "other";
|
|
54
|
+
message?: string | undefined;
|
|
53
55
|
phone?: string | undefined;
|
|
54
56
|
}, {
|
|
55
57
|
email: string;
|
|
56
58
|
name: string;
|
|
57
59
|
role: "owner" | "farm-manager" | "agronomist" | "field-worker" | "accountant" | "other";
|
|
60
|
+
message?: string | undefined;
|
|
58
61
|
phone?: string | undefined;
|
|
59
62
|
}>;
|
|
60
63
|
export declare const updateTeamMemberAttributesSchema: z.ZodObject<{
|
|
@@ -80,15 +83,18 @@ export declare const createTeamMemberSchema: z.ZodObject<{
|
|
|
80
83
|
email: z.ZodString;
|
|
81
84
|
role: z.ZodEnum<["owner", "farm-manager", "agronomist", "field-worker", "accountant", "other"]>;
|
|
82
85
|
phone: z.ZodOptional<z.ZodString>;
|
|
86
|
+
message: z.ZodOptional<z.ZodString>;
|
|
83
87
|
}, "strip", z.ZodTypeAny, {
|
|
84
88
|
email: string;
|
|
85
89
|
name: string;
|
|
86
90
|
role: "owner" | "farm-manager" | "agronomist" | "field-worker" | "accountant" | "other";
|
|
91
|
+
message?: string | undefined;
|
|
87
92
|
phone?: string | undefined;
|
|
88
93
|
}, {
|
|
89
94
|
email: string;
|
|
90
95
|
name: string;
|
|
91
96
|
role: "owner" | "farm-manager" | "agronomist" | "field-worker" | "accountant" | "other";
|
|
97
|
+
message?: string | undefined;
|
|
92
98
|
phone?: string | undefined;
|
|
93
99
|
}>;
|
|
94
100
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -97,6 +103,7 @@ export declare const createTeamMemberSchema: z.ZodObject<{
|
|
|
97
103
|
email: string;
|
|
98
104
|
name: string;
|
|
99
105
|
role: "owner" | "farm-manager" | "agronomist" | "field-worker" | "accountant" | "other";
|
|
106
|
+
message?: string | undefined;
|
|
100
107
|
phone?: string | undefined;
|
|
101
108
|
};
|
|
102
109
|
}, {
|
|
@@ -105,6 +112,7 @@ export declare const createTeamMemberSchema: z.ZodObject<{
|
|
|
105
112
|
email: string;
|
|
106
113
|
name: string;
|
|
107
114
|
role: "owner" | "farm-manager" | "agronomist" | "field-worker" | "accountant" | "other";
|
|
115
|
+
message?: string | undefined;
|
|
108
116
|
phone?: string | undefined;
|
|
109
117
|
};
|
|
110
118
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/team.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,oBAAoB,2FAO/B,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWb,CAAC;AAG3B,eAAO,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"team.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/team.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,oBAAoB,2FAO/B,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWb,CAAC;AAG3B,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;EAM3C,CAAC;AAGH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;EAK3C,CAAC;AAGH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAGH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIjC,CAAC;AAGH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -34,6 +34,7 @@ exports.createTeamMemberAttributesSchema = zod_1.z.object({
|
|
|
34
34
|
email: zod_1.z.string().email(),
|
|
35
35
|
role: exports.teamMemberRoleSchema,
|
|
36
36
|
phone: zod_1.z.string().optional(),
|
|
37
|
+
message: zod_1.z.string().optional(), // Optional personal message for invitation
|
|
37
38
|
});
|
|
38
39
|
// Update team member attributes (input)
|
|
39
40
|
exports.updateTeamMemberAttributesSchema = zod_1.z.object({
|