@deepintel-ltd/farmpro-contracts 1.11.12 → 1.14.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.
@@ -1,4 +1,53 @@
1
1
  import { z } from 'zod';
2
+ declare const cropPriceProjectionSchema: z.ZodObject<{
3
+ crop: z.ZodString;
4
+ unit: z.ZodString;
5
+ currency: z.ZodString;
6
+ farmAveragePrice: z.ZodNullable<z.ZodNumber>;
7
+ farmRecentAveragePrice: z.ZodNullable<z.ZodNumber>;
8
+ farmSaleCount: z.ZodNumber;
9
+ farmLastSaleDate: z.ZodNullable<z.ZodString>;
10
+ platformAveragePrice: z.ZodNullable<z.ZodNumber>;
11
+ platformFarmCount: z.ZodNumber;
12
+ /**
13
+ * Best estimate for planning:
14
+ * farm recent → farm all-time → farm report → platform (sales + corroborated reports) → public
15
+ */
16
+ projectedPrice: z.ZodNullable<z.ZodNumber>;
17
+ source: z.ZodEnum<["farm_recent", "farm", "farm_report", "platform", "public", "none"]>;
18
+ /** Farm avg vs platform avg (%); null if either side missing */
19
+ vsPlatformPercent: z.ZodNullable<z.ZodNumber>;
20
+ /** Sum of field area (ha) for this crop on the farm; null if unknown / sales-only */
21
+ areaHa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
24
+ currency: string;
25
+ crop: string;
26
+ unit: string;
27
+ farmAveragePrice: number | null;
28
+ farmRecentAveragePrice: number | null;
29
+ farmSaleCount: number;
30
+ farmLastSaleDate: string | null;
31
+ platformAveragePrice: number | null;
32
+ platformFarmCount: number;
33
+ projectedPrice: number | null;
34
+ vsPlatformPercent: number | null;
35
+ areaHa?: number | null | undefined;
36
+ }, {
37
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
38
+ currency: string;
39
+ crop: string;
40
+ unit: string;
41
+ farmAveragePrice: number | null;
42
+ farmRecentAveragePrice: number | null;
43
+ farmSaleCount: number;
44
+ farmLastSaleDate: string | null;
45
+ platformAveragePrice: number | null;
46
+ platformFarmCount: number;
47
+ projectedPrice: number | null;
48
+ vsPlatformPercent: number | null;
49
+ areaHa?: number | null | undefined;
50
+ }>;
2
51
  export declare const marketIntelligenceOverviewSchema: z.ZodObject<{
3
52
  farmId: z.ZodString;
4
53
  domesticSummary: z.ZodNullable<z.ZodObject<{
@@ -40,6 +89,55 @@ export declare const marketIntelligenceOverviewSchema: z.ZodObject<{
40
89
  details: string;
41
90
  outlook: string;
42
91
  }>, "many">;
92
+ priceProjections: z.ZodArray<z.ZodObject<{
93
+ crop: z.ZodString;
94
+ unit: z.ZodString;
95
+ currency: z.ZodString;
96
+ farmAveragePrice: z.ZodNullable<z.ZodNumber>;
97
+ farmRecentAveragePrice: z.ZodNullable<z.ZodNumber>;
98
+ farmSaleCount: z.ZodNumber;
99
+ farmLastSaleDate: z.ZodNullable<z.ZodString>;
100
+ platformAveragePrice: z.ZodNullable<z.ZodNumber>;
101
+ platformFarmCount: z.ZodNumber;
102
+ /**
103
+ * Best estimate for planning:
104
+ * farm recent → farm all-time → farm report → platform (sales + corroborated reports) → public
105
+ */
106
+ projectedPrice: z.ZodNullable<z.ZodNumber>;
107
+ source: z.ZodEnum<["farm_recent", "farm", "farm_report", "platform", "public", "none"]>;
108
+ /** Farm avg vs platform avg (%); null if either side missing */
109
+ vsPlatformPercent: z.ZodNullable<z.ZodNumber>;
110
+ /** Sum of field area (ha) for this crop on the farm; null if unknown / sales-only */
111
+ areaHa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
114
+ currency: string;
115
+ crop: string;
116
+ unit: string;
117
+ farmAveragePrice: number | null;
118
+ farmRecentAveragePrice: number | null;
119
+ farmSaleCount: number;
120
+ farmLastSaleDate: string | null;
121
+ platformAveragePrice: number | null;
122
+ platformFarmCount: number;
123
+ projectedPrice: number | null;
124
+ vsPlatformPercent: number | null;
125
+ areaHa?: number | null | undefined;
126
+ }, {
127
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
128
+ currency: string;
129
+ crop: string;
130
+ unit: string;
131
+ farmAveragePrice: number | null;
132
+ farmRecentAveragePrice: number | null;
133
+ farmSaleCount: number;
134
+ farmLastSaleDate: string | null;
135
+ platformAveragePrice: number | null;
136
+ platformFarmCount: number;
137
+ projectedPrice: number | null;
138
+ vsPlatformPercent: number | null;
139
+ areaHa?: number | null | undefined;
140
+ }>, "many">;
43
141
  eudrAlertTitle: z.ZodNullable<z.ZodString>;
44
142
  updatedAt: z.ZodString;
45
143
  }, "strip", z.ZodTypeAny, {
@@ -60,6 +158,21 @@ export declare const marketIntelligenceOverviewSchema: z.ZodObject<{
60
158
  analysis: string;
61
159
  keyTakeaway: string;
62
160
  } | null;
161
+ priceProjections: {
162
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
163
+ currency: string;
164
+ crop: string;
165
+ unit: string;
166
+ farmAveragePrice: number | null;
167
+ farmRecentAveragePrice: number | null;
168
+ farmSaleCount: number;
169
+ farmLastSaleDate: string | null;
170
+ platformAveragePrice: number | null;
171
+ platformFarmCount: number;
172
+ projectedPrice: number | null;
173
+ vsPlatformPercent: number | null;
174
+ areaHa?: number | null | undefined;
175
+ }[];
63
176
  eudrAlertTitle: string | null;
64
177
  }, {
65
178
  updatedAt: string;
@@ -79,8 +192,79 @@ export declare const marketIntelligenceOverviewSchema: z.ZodObject<{
79
192
  analysis: string;
80
193
  keyTakeaway: string;
81
194
  } | null;
195
+ priceProjections: {
196
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
197
+ currency: string;
198
+ crop: string;
199
+ unit: string;
200
+ farmAveragePrice: number | null;
201
+ farmRecentAveragePrice: number | null;
202
+ farmSaleCount: number;
203
+ farmLastSaleDate: string | null;
204
+ platformAveragePrice: number | null;
205
+ platformFarmCount: number;
206
+ projectedPrice: number | null;
207
+ vsPlatformPercent: number | null;
208
+ areaHa?: number | null | undefined;
209
+ }[];
82
210
  eudrAlertTitle: string | null;
83
211
  }>;
212
+ export declare const createMarketPriceReportSchema: z.ZodObject<{
213
+ crop: z.ZodString;
214
+ pricePerUnit: z.ZodNumber;
215
+ unit: z.ZodEffects<z.ZodOptional<z.ZodString>, string, string | undefined>;
216
+ currency: z.ZodOptional<z.ZodEnum<["NGN", "USD"]>>;
217
+ observedAt: z.ZodOptional<z.ZodString>;
218
+ marketLabel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ crop: string;
221
+ unit: string;
222
+ pricePerUnit: number;
223
+ currency?: "NGN" | "USD" | undefined;
224
+ observedAt?: string | undefined;
225
+ marketLabel?: string | null | undefined;
226
+ }, {
227
+ crop: string;
228
+ pricePerUnit: number;
229
+ currency?: "NGN" | "USD" | undefined;
230
+ unit?: string | undefined;
231
+ observedAt?: string | undefined;
232
+ marketLabel?: string | null | undefined;
233
+ }>;
234
+ export declare const marketPriceReportSchema: z.ZodObject<{
235
+ id: z.ZodString;
236
+ farmId: z.ZodString;
237
+ crop: z.ZodString;
238
+ cropKey: z.ZodString;
239
+ pricePerUnit: z.ZodNumber;
240
+ unit: z.ZodString;
241
+ currency: z.ZodString;
242
+ observedAt: z.ZodString;
243
+ marketLabel: z.ZodNullable<z.ZodString>;
244
+ createdAt: z.ZodString;
245
+ }, "strip", z.ZodTypeAny, {
246
+ id: string;
247
+ createdAt: string;
248
+ farmId: string;
249
+ currency: string;
250
+ crop: string;
251
+ unit: string;
252
+ pricePerUnit: number;
253
+ observedAt: string;
254
+ marketLabel: string | null;
255
+ cropKey: string;
256
+ }, {
257
+ id: string;
258
+ createdAt: string;
259
+ farmId: string;
260
+ currency: string;
261
+ crop: string;
262
+ unit: string;
263
+ pricePerUnit: number;
264
+ observedAt: string;
265
+ marketLabel: string | null;
266
+ cropKey: string;
267
+ }>;
84
268
  export declare const marketIntelligenceRouter: {
85
269
  getOverview: {
86
270
  pathParams: z.ZodObject<{
@@ -91,7 +275,7 @@ export declare const marketIntelligenceRouter: {
91
275
  farmId: string;
92
276
  }>;
93
277
  summary: "Farm market intelligence overview";
94
- description: "National market summaries and crop projections for sell-window decisions";
278
+ description: "National market summaries plus crop price projections: farm sales, farm reports, platform knowledge, then public reference";
95
279
  method: "GET";
96
280
  path: "/farms/:farmId/market-intelligence/overview";
97
281
  responses: {
@@ -136,6 +320,55 @@ export declare const marketIntelligenceRouter: {
136
320
  details: string;
137
321
  outlook: string;
138
322
  }>, "many">;
323
+ priceProjections: z.ZodArray<z.ZodObject<{
324
+ crop: z.ZodString;
325
+ unit: z.ZodString;
326
+ currency: z.ZodString;
327
+ farmAveragePrice: z.ZodNullable<z.ZodNumber>;
328
+ farmRecentAveragePrice: z.ZodNullable<z.ZodNumber>;
329
+ farmSaleCount: z.ZodNumber;
330
+ farmLastSaleDate: z.ZodNullable<z.ZodString>;
331
+ platformAveragePrice: z.ZodNullable<z.ZodNumber>;
332
+ platformFarmCount: z.ZodNumber;
333
+ /**
334
+ * Best estimate for planning:
335
+ * farm recent → farm all-time → farm report → platform (sales + corroborated reports) → public
336
+ */
337
+ projectedPrice: z.ZodNullable<z.ZodNumber>;
338
+ source: z.ZodEnum<["farm_recent", "farm", "farm_report", "platform", "public", "none"]>;
339
+ /** Farm avg vs platform avg (%); null if either side missing */
340
+ vsPlatformPercent: z.ZodNullable<z.ZodNumber>;
341
+ /** Sum of field area (ha) for this crop on the farm; null if unknown / sales-only */
342
+ areaHa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
343
+ }, "strip", z.ZodTypeAny, {
344
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
345
+ currency: string;
346
+ crop: string;
347
+ unit: string;
348
+ farmAveragePrice: number | null;
349
+ farmRecentAveragePrice: number | null;
350
+ farmSaleCount: number;
351
+ farmLastSaleDate: string | null;
352
+ platformAveragePrice: number | null;
353
+ platformFarmCount: number;
354
+ projectedPrice: number | null;
355
+ vsPlatformPercent: number | null;
356
+ areaHa?: number | null | undefined;
357
+ }, {
358
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
359
+ currency: string;
360
+ crop: string;
361
+ unit: string;
362
+ farmAveragePrice: number | null;
363
+ farmRecentAveragePrice: number | null;
364
+ farmSaleCount: number;
365
+ farmLastSaleDate: string | null;
366
+ platformAveragePrice: number | null;
367
+ platformFarmCount: number;
368
+ projectedPrice: number | null;
369
+ vsPlatformPercent: number | null;
370
+ areaHa?: number | null | undefined;
371
+ }>, "many">;
139
372
  eudrAlertTitle: z.ZodNullable<z.ZodString>;
140
373
  updatedAt: z.ZodString;
141
374
  }, "strip", z.ZodTypeAny, {
@@ -156,6 +389,21 @@ export declare const marketIntelligenceRouter: {
156
389
  analysis: string;
157
390
  keyTakeaway: string;
158
391
  } | null;
392
+ priceProjections: {
393
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
394
+ currency: string;
395
+ crop: string;
396
+ unit: string;
397
+ farmAveragePrice: number | null;
398
+ farmRecentAveragePrice: number | null;
399
+ farmSaleCount: number;
400
+ farmLastSaleDate: string | null;
401
+ platformAveragePrice: number | null;
402
+ platformFarmCount: number;
403
+ projectedPrice: number | null;
404
+ vsPlatformPercent: number | null;
405
+ areaHa?: number | null | undefined;
406
+ }[];
159
407
  eudrAlertTitle: string | null;
160
408
  }, {
161
409
  updatedAt: string;
@@ -175,6 +423,21 @@ export declare const marketIntelligenceRouter: {
175
423
  analysis: string;
176
424
  keyTakeaway: string;
177
425
  } | null;
426
+ priceProjections: {
427
+ source: "farm" | "none" | "farm_recent" | "farm_report" | "platform" | "public";
428
+ currency: string;
429
+ crop: string;
430
+ unit: string;
431
+ farmAveragePrice: number | null;
432
+ farmRecentAveragePrice: number | null;
433
+ farmSaleCount: number;
434
+ farmLastSaleDate: string | null;
435
+ platformAveragePrice: number | null;
436
+ platformFarmCount: number;
437
+ projectedPrice: number | null;
438
+ vsPlatformPercent: number | null;
439
+ areaHa?: number | null | undefined;
440
+ }[];
178
441
  eudrAlertTitle: string | null;
179
442
  }>;
180
443
  401: z.ZodObject<{
@@ -359,6 +622,794 @@ export declare const marketIntelligenceRouter: {
359
622
  }>;
360
623
  };
361
624
  };
625
+ createPriceReport: {
626
+ pathParams: z.ZodObject<{
627
+ farmId: z.ZodString;
628
+ }, "strip", z.ZodTypeAny, {
629
+ farmId: string;
630
+ }, {
631
+ farmId: string;
632
+ }>;
633
+ summary: "Submit a market price report";
634
+ description: "Record an overheard / local market price. Trusted immediately for this farm; shared only after corroboration.";
635
+ method: "POST";
636
+ body: z.ZodObject<{
637
+ crop: z.ZodString;
638
+ pricePerUnit: z.ZodNumber;
639
+ unit: z.ZodEffects<z.ZodOptional<z.ZodString>, string, string | undefined>;
640
+ currency: z.ZodOptional<z.ZodEnum<["NGN", "USD"]>>;
641
+ observedAt: z.ZodOptional<z.ZodString>;
642
+ marketLabel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
643
+ }, "strip", z.ZodTypeAny, {
644
+ crop: string;
645
+ unit: string;
646
+ pricePerUnit: number;
647
+ currency?: "NGN" | "USD" | undefined;
648
+ observedAt?: string | undefined;
649
+ marketLabel?: string | null | undefined;
650
+ }, {
651
+ crop: string;
652
+ pricePerUnit: number;
653
+ currency?: "NGN" | "USD" | undefined;
654
+ unit?: string | undefined;
655
+ observedAt?: string | undefined;
656
+ marketLabel?: string | null | undefined;
657
+ }>;
658
+ path: "/farms/:farmId/market-intelligence/price-reports";
659
+ responses: {
660
+ 201: z.ZodObject<{
661
+ id: z.ZodString;
662
+ farmId: z.ZodString;
663
+ crop: z.ZodString;
664
+ cropKey: z.ZodString;
665
+ pricePerUnit: z.ZodNumber;
666
+ unit: z.ZodString;
667
+ currency: z.ZodString;
668
+ observedAt: z.ZodString;
669
+ marketLabel: z.ZodNullable<z.ZodString>;
670
+ createdAt: z.ZodString;
671
+ }, "strip", z.ZodTypeAny, {
672
+ id: string;
673
+ createdAt: string;
674
+ farmId: string;
675
+ currency: string;
676
+ crop: string;
677
+ unit: string;
678
+ pricePerUnit: number;
679
+ observedAt: string;
680
+ marketLabel: string | null;
681
+ cropKey: string;
682
+ }, {
683
+ id: string;
684
+ createdAt: string;
685
+ farmId: string;
686
+ currency: string;
687
+ crop: string;
688
+ unit: string;
689
+ pricePerUnit: number;
690
+ observedAt: string;
691
+ marketLabel: string | null;
692
+ cropKey: string;
693
+ }>;
694
+ 400: z.ZodObject<{
695
+ errors: z.ZodArray<z.ZodObject<{
696
+ id: z.ZodOptional<z.ZodString>;
697
+ links: z.ZodOptional<z.ZodObject<{
698
+ about: z.ZodOptional<z.ZodString>;
699
+ }, "strip", z.ZodTypeAny, {
700
+ about?: string | undefined;
701
+ }, {
702
+ about?: string | undefined;
703
+ }>>;
704
+ status: z.ZodOptional<z.ZodString>;
705
+ code: z.ZodOptional<z.ZodString>;
706
+ title: z.ZodOptional<z.ZodString>;
707
+ detail: z.ZodOptional<z.ZodString>;
708
+ source: z.ZodOptional<z.ZodObject<{
709
+ pointer: z.ZodOptional<z.ZodString>;
710
+ parameter: z.ZodOptional<z.ZodString>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ pointer?: string | undefined;
713
+ parameter?: string | undefined;
714
+ }, {
715
+ pointer?: string | undefined;
716
+ parameter?: string | undefined;
717
+ }>>;
718
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
719
+ }, "strip", z.ZodTypeAny, {
720
+ status?: string | undefined;
721
+ code?: string | undefined;
722
+ id?: string | undefined;
723
+ links?: {
724
+ about?: string | undefined;
725
+ } | undefined;
726
+ meta?: Record<string, unknown> | undefined;
727
+ title?: string | undefined;
728
+ detail?: string | undefined;
729
+ source?: {
730
+ pointer?: string | undefined;
731
+ parameter?: string | undefined;
732
+ } | undefined;
733
+ }, {
734
+ status?: string | undefined;
735
+ code?: string | undefined;
736
+ id?: string | undefined;
737
+ links?: {
738
+ about?: string | undefined;
739
+ } | undefined;
740
+ meta?: Record<string, unknown> | undefined;
741
+ title?: string | undefined;
742
+ detail?: string | undefined;
743
+ source?: {
744
+ pointer?: string | undefined;
745
+ parameter?: string | undefined;
746
+ } | undefined;
747
+ }>, "many">;
748
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
749
+ }, "strip", z.ZodTypeAny, {
750
+ errors: {
751
+ status?: string | undefined;
752
+ code?: string | undefined;
753
+ id?: string | undefined;
754
+ links?: {
755
+ about?: string | undefined;
756
+ } | undefined;
757
+ meta?: Record<string, unknown> | undefined;
758
+ title?: string | undefined;
759
+ detail?: string | undefined;
760
+ source?: {
761
+ pointer?: string | undefined;
762
+ parameter?: string | undefined;
763
+ } | undefined;
764
+ }[];
765
+ meta?: Record<string, unknown> | undefined;
766
+ }, {
767
+ errors: {
768
+ status?: string | undefined;
769
+ code?: string | undefined;
770
+ id?: string | undefined;
771
+ links?: {
772
+ about?: string | undefined;
773
+ } | undefined;
774
+ meta?: Record<string, unknown> | undefined;
775
+ title?: string | undefined;
776
+ detail?: string | undefined;
777
+ source?: {
778
+ pointer?: string | undefined;
779
+ parameter?: string | undefined;
780
+ } | undefined;
781
+ }[];
782
+ meta?: Record<string, unknown> | undefined;
783
+ }>;
784
+ 401: z.ZodObject<{
785
+ errors: z.ZodArray<z.ZodObject<{
786
+ id: z.ZodOptional<z.ZodString>;
787
+ links: z.ZodOptional<z.ZodObject<{
788
+ about: z.ZodOptional<z.ZodString>;
789
+ }, "strip", z.ZodTypeAny, {
790
+ about?: string | undefined;
791
+ }, {
792
+ about?: string | undefined;
793
+ }>>;
794
+ status: z.ZodOptional<z.ZodString>;
795
+ code: z.ZodOptional<z.ZodString>;
796
+ title: z.ZodOptional<z.ZodString>;
797
+ detail: z.ZodOptional<z.ZodString>;
798
+ source: z.ZodOptional<z.ZodObject<{
799
+ pointer: z.ZodOptional<z.ZodString>;
800
+ parameter: z.ZodOptional<z.ZodString>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ pointer?: string | undefined;
803
+ parameter?: string | undefined;
804
+ }, {
805
+ pointer?: string | undefined;
806
+ parameter?: string | undefined;
807
+ }>>;
808
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
809
+ }, "strip", z.ZodTypeAny, {
810
+ status?: string | undefined;
811
+ code?: string | undefined;
812
+ id?: string | undefined;
813
+ links?: {
814
+ about?: string | undefined;
815
+ } | undefined;
816
+ meta?: Record<string, unknown> | undefined;
817
+ title?: string | undefined;
818
+ detail?: string | undefined;
819
+ source?: {
820
+ pointer?: string | undefined;
821
+ parameter?: string | undefined;
822
+ } | undefined;
823
+ }, {
824
+ status?: string | undefined;
825
+ code?: string | undefined;
826
+ id?: string | undefined;
827
+ links?: {
828
+ about?: string | undefined;
829
+ } | undefined;
830
+ meta?: Record<string, unknown> | undefined;
831
+ title?: string | undefined;
832
+ detail?: string | undefined;
833
+ source?: {
834
+ pointer?: string | undefined;
835
+ parameter?: string | undefined;
836
+ } | undefined;
837
+ }>, "many">;
838
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
839
+ }, "strip", z.ZodTypeAny, {
840
+ errors: {
841
+ status?: string | undefined;
842
+ code?: string | undefined;
843
+ id?: string | undefined;
844
+ links?: {
845
+ about?: string | undefined;
846
+ } | undefined;
847
+ meta?: Record<string, unknown> | undefined;
848
+ title?: string | undefined;
849
+ detail?: string | undefined;
850
+ source?: {
851
+ pointer?: string | undefined;
852
+ parameter?: string | undefined;
853
+ } | undefined;
854
+ }[];
855
+ meta?: Record<string, unknown> | undefined;
856
+ }, {
857
+ errors: {
858
+ status?: string | undefined;
859
+ code?: string | undefined;
860
+ id?: string | undefined;
861
+ links?: {
862
+ about?: string | undefined;
863
+ } | undefined;
864
+ meta?: Record<string, unknown> | undefined;
865
+ title?: string | undefined;
866
+ detail?: string | undefined;
867
+ source?: {
868
+ pointer?: string | undefined;
869
+ parameter?: string | undefined;
870
+ } | undefined;
871
+ }[];
872
+ meta?: Record<string, unknown> | undefined;
873
+ }>;
874
+ 403: z.ZodObject<{
875
+ errors: z.ZodArray<z.ZodObject<{
876
+ id: z.ZodOptional<z.ZodString>;
877
+ links: z.ZodOptional<z.ZodObject<{
878
+ about: z.ZodOptional<z.ZodString>;
879
+ }, "strip", z.ZodTypeAny, {
880
+ about?: string | undefined;
881
+ }, {
882
+ about?: string | undefined;
883
+ }>>;
884
+ status: z.ZodOptional<z.ZodString>;
885
+ code: z.ZodOptional<z.ZodString>;
886
+ title: z.ZodOptional<z.ZodString>;
887
+ detail: z.ZodOptional<z.ZodString>;
888
+ source: z.ZodOptional<z.ZodObject<{
889
+ pointer: z.ZodOptional<z.ZodString>;
890
+ parameter: z.ZodOptional<z.ZodString>;
891
+ }, "strip", z.ZodTypeAny, {
892
+ pointer?: string | undefined;
893
+ parameter?: string | undefined;
894
+ }, {
895
+ pointer?: string | undefined;
896
+ parameter?: string | undefined;
897
+ }>>;
898
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
899
+ }, "strip", z.ZodTypeAny, {
900
+ status?: string | undefined;
901
+ code?: string | undefined;
902
+ id?: string | undefined;
903
+ links?: {
904
+ about?: string | undefined;
905
+ } | undefined;
906
+ meta?: Record<string, unknown> | undefined;
907
+ title?: string | undefined;
908
+ detail?: string | undefined;
909
+ source?: {
910
+ pointer?: string | undefined;
911
+ parameter?: string | undefined;
912
+ } | undefined;
913
+ }, {
914
+ status?: string | undefined;
915
+ code?: string | undefined;
916
+ id?: string | undefined;
917
+ links?: {
918
+ about?: string | undefined;
919
+ } | undefined;
920
+ meta?: Record<string, unknown> | undefined;
921
+ title?: string | undefined;
922
+ detail?: string | undefined;
923
+ source?: {
924
+ pointer?: string | undefined;
925
+ parameter?: string | undefined;
926
+ } | undefined;
927
+ }>, "many">;
928
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
929
+ }, "strip", z.ZodTypeAny, {
930
+ errors: {
931
+ status?: string | undefined;
932
+ code?: string | undefined;
933
+ id?: string | undefined;
934
+ links?: {
935
+ about?: string | undefined;
936
+ } | undefined;
937
+ meta?: Record<string, unknown> | undefined;
938
+ title?: string | undefined;
939
+ detail?: string | undefined;
940
+ source?: {
941
+ pointer?: string | undefined;
942
+ parameter?: string | undefined;
943
+ } | undefined;
944
+ }[];
945
+ meta?: Record<string, unknown> | undefined;
946
+ }, {
947
+ errors: {
948
+ status?: string | undefined;
949
+ code?: string | undefined;
950
+ id?: string | undefined;
951
+ links?: {
952
+ about?: string | undefined;
953
+ } | undefined;
954
+ meta?: Record<string, unknown> | undefined;
955
+ title?: string | undefined;
956
+ detail?: string | undefined;
957
+ source?: {
958
+ pointer?: string | undefined;
959
+ parameter?: string | undefined;
960
+ } | undefined;
961
+ }[];
962
+ meta?: Record<string, unknown> | undefined;
963
+ }>;
964
+ 404: z.ZodObject<{
965
+ errors: z.ZodArray<z.ZodObject<{
966
+ id: z.ZodOptional<z.ZodString>;
967
+ links: z.ZodOptional<z.ZodObject<{
968
+ about: z.ZodOptional<z.ZodString>;
969
+ }, "strip", z.ZodTypeAny, {
970
+ about?: string | undefined;
971
+ }, {
972
+ about?: string | undefined;
973
+ }>>;
974
+ status: z.ZodOptional<z.ZodString>;
975
+ code: z.ZodOptional<z.ZodString>;
976
+ title: z.ZodOptional<z.ZodString>;
977
+ detail: z.ZodOptional<z.ZodString>;
978
+ source: z.ZodOptional<z.ZodObject<{
979
+ pointer: z.ZodOptional<z.ZodString>;
980
+ parameter: z.ZodOptional<z.ZodString>;
981
+ }, "strip", z.ZodTypeAny, {
982
+ pointer?: string | undefined;
983
+ parameter?: string | undefined;
984
+ }, {
985
+ pointer?: string | undefined;
986
+ parameter?: string | undefined;
987
+ }>>;
988
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
989
+ }, "strip", z.ZodTypeAny, {
990
+ status?: string | undefined;
991
+ code?: string | undefined;
992
+ id?: string | undefined;
993
+ links?: {
994
+ about?: string | undefined;
995
+ } | undefined;
996
+ meta?: Record<string, unknown> | undefined;
997
+ title?: string | undefined;
998
+ detail?: string | undefined;
999
+ source?: {
1000
+ pointer?: string | undefined;
1001
+ parameter?: string | undefined;
1002
+ } | undefined;
1003
+ }, {
1004
+ status?: string | undefined;
1005
+ code?: string | undefined;
1006
+ id?: string | undefined;
1007
+ links?: {
1008
+ about?: string | undefined;
1009
+ } | undefined;
1010
+ meta?: Record<string, unknown> | undefined;
1011
+ title?: string | undefined;
1012
+ detail?: string | undefined;
1013
+ source?: {
1014
+ pointer?: string | undefined;
1015
+ parameter?: string | undefined;
1016
+ } | undefined;
1017
+ }>, "many">;
1018
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1019
+ }, "strip", z.ZodTypeAny, {
1020
+ errors: {
1021
+ status?: string | undefined;
1022
+ code?: string | undefined;
1023
+ id?: string | undefined;
1024
+ links?: {
1025
+ about?: string | undefined;
1026
+ } | undefined;
1027
+ meta?: Record<string, unknown> | undefined;
1028
+ title?: string | undefined;
1029
+ detail?: string | undefined;
1030
+ source?: {
1031
+ pointer?: string | undefined;
1032
+ parameter?: string | undefined;
1033
+ } | undefined;
1034
+ }[];
1035
+ meta?: Record<string, unknown> | undefined;
1036
+ }, {
1037
+ errors: {
1038
+ status?: string | undefined;
1039
+ code?: string | undefined;
1040
+ id?: string | undefined;
1041
+ links?: {
1042
+ about?: string | undefined;
1043
+ } | undefined;
1044
+ meta?: Record<string, unknown> | undefined;
1045
+ title?: string | undefined;
1046
+ detail?: string | undefined;
1047
+ source?: {
1048
+ pointer?: string | undefined;
1049
+ parameter?: string | undefined;
1050
+ } | undefined;
1051
+ }[];
1052
+ meta?: Record<string, unknown> | undefined;
1053
+ }>;
1054
+ };
1055
+ };
1056
+ listPriceReports: {
1057
+ pathParams: z.ZodObject<{
1058
+ farmId: z.ZodString;
1059
+ }, "strip", z.ZodTypeAny, {
1060
+ farmId: string;
1061
+ }, {
1062
+ farmId: string;
1063
+ }>;
1064
+ query: z.ZodObject<{
1065
+ days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1066
+ }, "strip", z.ZodTypeAny, {
1067
+ days: number;
1068
+ }, {
1069
+ days?: number | undefined;
1070
+ }>;
1071
+ summary: "List recent market price reports for a farm";
1072
+ method: "GET";
1073
+ path: "/farms/:farmId/market-intelligence/price-reports";
1074
+ responses: {
1075
+ 200: z.ZodObject<{
1076
+ data: z.ZodArray<z.ZodObject<{
1077
+ id: z.ZodString;
1078
+ farmId: z.ZodString;
1079
+ crop: z.ZodString;
1080
+ cropKey: z.ZodString;
1081
+ pricePerUnit: z.ZodNumber;
1082
+ unit: z.ZodString;
1083
+ currency: z.ZodString;
1084
+ observedAt: z.ZodString;
1085
+ marketLabel: z.ZodNullable<z.ZodString>;
1086
+ createdAt: z.ZodString;
1087
+ }, "strip", z.ZodTypeAny, {
1088
+ id: string;
1089
+ createdAt: string;
1090
+ farmId: string;
1091
+ currency: string;
1092
+ crop: string;
1093
+ unit: string;
1094
+ pricePerUnit: number;
1095
+ observedAt: string;
1096
+ marketLabel: string | null;
1097
+ cropKey: string;
1098
+ }, {
1099
+ id: string;
1100
+ createdAt: string;
1101
+ farmId: string;
1102
+ currency: string;
1103
+ crop: string;
1104
+ unit: string;
1105
+ pricePerUnit: number;
1106
+ observedAt: string;
1107
+ marketLabel: string | null;
1108
+ cropKey: string;
1109
+ }>, "many">;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ data: {
1112
+ id: string;
1113
+ createdAt: string;
1114
+ farmId: string;
1115
+ currency: string;
1116
+ crop: string;
1117
+ unit: string;
1118
+ pricePerUnit: number;
1119
+ observedAt: string;
1120
+ marketLabel: string | null;
1121
+ cropKey: string;
1122
+ }[];
1123
+ }, {
1124
+ data: {
1125
+ id: string;
1126
+ createdAt: string;
1127
+ farmId: string;
1128
+ currency: string;
1129
+ crop: string;
1130
+ unit: string;
1131
+ pricePerUnit: number;
1132
+ observedAt: string;
1133
+ marketLabel: string | null;
1134
+ cropKey: string;
1135
+ }[];
1136
+ }>;
1137
+ 401: z.ZodObject<{
1138
+ errors: z.ZodArray<z.ZodObject<{
1139
+ id: z.ZodOptional<z.ZodString>;
1140
+ links: z.ZodOptional<z.ZodObject<{
1141
+ about: z.ZodOptional<z.ZodString>;
1142
+ }, "strip", z.ZodTypeAny, {
1143
+ about?: string | undefined;
1144
+ }, {
1145
+ about?: string | undefined;
1146
+ }>>;
1147
+ status: z.ZodOptional<z.ZodString>;
1148
+ code: z.ZodOptional<z.ZodString>;
1149
+ title: z.ZodOptional<z.ZodString>;
1150
+ detail: z.ZodOptional<z.ZodString>;
1151
+ source: z.ZodOptional<z.ZodObject<{
1152
+ pointer: z.ZodOptional<z.ZodString>;
1153
+ parameter: z.ZodOptional<z.ZodString>;
1154
+ }, "strip", z.ZodTypeAny, {
1155
+ pointer?: string | undefined;
1156
+ parameter?: string | undefined;
1157
+ }, {
1158
+ pointer?: string | undefined;
1159
+ parameter?: string | undefined;
1160
+ }>>;
1161
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1162
+ }, "strip", z.ZodTypeAny, {
1163
+ status?: string | undefined;
1164
+ code?: string | undefined;
1165
+ id?: string | undefined;
1166
+ links?: {
1167
+ about?: string | undefined;
1168
+ } | undefined;
1169
+ meta?: Record<string, unknown> | undefined;
1170
+ title?: string | undefined;
1171
+ detail?: string | undefined;
1172
+ source?: {
1173
+ pointer?: string | undefined;
1174
+ parameter?: string | undefined;
1175
+ } | undefined;
1176
+ }, {
1177
+ status?: string | undefined;
1178
+ code?: string | undefined;
1179
+ id?: string | undefined;
1180
+ links?: {
1181
+ about?: string | undefined;
1182
+ } | undefined;
1183
+ meta?: Record<string, unknown> | undefined;
1184
+ title?: string | undefined;
1185
+ detail?: string | undefined;
1186
+ source?: {
1187
+ pointer?: string | undefined;
1188
+ parameter?: string | undefined;
1189
+ } | undefined;
1190
+ }>, "many">;
1191
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1192
+ }, "strip", z.ZodTypeAny, {
1193
+ errors: {
1194
+ status?: string | undefined;
1195
+ code?: string | undefined;
1196
+ id?: string | undefined;
1197
+ links?: {
1198
+ about?: string | undefined;
1199
+ } | undefined;
1200
+ meta?: Record<string, unknown> | undefined;
1201
+ title?: string | undefined;
1202
+ detail?: string | undefined;
1203
+ source?: {
1204
+ pointer?: string | undefined;
1205
+ parameter?: string | undefined;
1206
+ } | undefined;
1207
+ }[];
1208
+ meta?: Record<string, unknown> | undefined;
1209
+ }, {
1210
+ errors: {
1211
+ status?: string | undefined;
1212
+ code?: string | undefined;
1213
+ id?: string | undefined;
1214
+ links?: {
1215
+ about?: string | undefined;
1216
+ } | undefined;
1217
+ meta?: Record<string, unknown> | undefined;
1218
+ title?: string | undefined;
1219
+ detail?: string | undefined;
1220
+ source?: {
1221
+ pointer?: string | undefined;
1222
+ parameter?: string | undefined;
1223
+ } | undefined;
1224
+ }[];
1225
+ meta?: Record<string, unknown> | undefined;
1226
+ }>;
1227
+ 403: z.ZodObject<{
1228
+ errors: z.ZodArray<z.ZodObject<{
1229
+ id: z.ZodOptional<z.ZodString>;
1230
+ links: z.ZodOptional<z.ZodObject<{
1231
+ about: z.ZodOptional<z.ZodString>;
1232
+ }, "strip", z.ZodTypeAny, {
1233
+ about?: string | undefined;
1234
+ }, {
1235
+ about?: string | undefined;
1236
+ }>>;
1237
+ status: z.ZodOptional<z.ZodString>;
1238
+ code: z.ZodOptional<z.ZodString>;
1239
+ title: z.ZodOptional<z.ZodString>;
1240
+ detail: z.ZodOptional<z.ZodString>;
1241
+ source: z.ZodOptional<z.ZodObject<{
1242
+ pointer: z.ZodOptional<z.ZodString>;
1243
+ parameter: z.ZodOptional<z.ZodString>;
1244
+ }, "strip", z.ZodTypeAny, {
1245
+ pointer?: string | undefined;
1246
+ parameter?: string | undefined;
1247
+ }, {
1248
+ pointer?: string | undefined;
1249
+ parameter?: string | undefined;
1250
+ }>>;
1251
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ status?: string | undefined;
1254
+ code?: string | undefined;
1255
+ id?: string | undefined;
1256
+ links?: {
1257
+ about?: string | undefined;
1258
+ } | undefined;
1259
+ meta?: Record<string, unknown> | undefined;
1260
+ title?: string | undefined;
1261
+ detail?: string | undefined;
1262
+ source?: {
1263
+ pointer?: string | undefined;
1264
+ parameter?: string | undefined;
1265
+ } | undefined;
1266
+ }, {
1267
+ status?: string | undefined;
1268
+ code?: string | undefined;
1269
+ id?: string | undefined;
1270
+ links?: {
1271
+ about?: string | undefined;
1272
+ } | undefined;
1273
+ meta?: Record<string, unknown> | undefined;
1274
+ title?: string | undefined;
1275
+ detail?: string | undefined;
1276
+ source?: {
1277
+ pointer?: string | undefined;
1278
+ parameter?: string | undefined;
1279
+ } | undefined;
1280
+ }>, "many">;
1281
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ errors: {
1284
+ status?: string | undefined;
1285
+ code?: string | undefined;
1286
+ id?: string | undefined;
1287
+ links?: {
1288
+ about?: string | undefined;
1289
+ } | undefined;
1290
+ meta?: Record<string, unknown> | undefined;
1291
+ title?: string | undefined;
1292
+ detail?: string | undefined;
1293
+ source?: {
1294
+ pointer?: string | undefined;
1295
+ parameter?: string | undefined;
1296
+ } | undefined;
1297
+ }[];
1298
+ meta?: Record<string, unknown> | undefined;
1299
+ }, {
1300
+ errors: {
1301
+ status?: string | undefined;
1302
+ code?: string | undefined;
1303
+ id?: string | undefined;
1304
+ links?: {
1305
+ about?: string | undefined;
1306
+ } | undefined;
1307
+ meta?: Record<string, unknown> | undefined;
1308
+ title?: string | undefined;
1309
+ detail?: string | undefined;
1310
+ source?: {
1311
+ pointer?: string | undefined;
1312
+ parameter?: string | undefined;
1313
+ } | undefined;
1314
+ }[];
1315
+ meta?: Record<string, unknown> | undefined;
1316
+ }>;
1317
+ 404: z.ZodObject<{
1318
+ errors: z.ZodArray<z.ZodObject<{
1319
+ id: z.ZodOptional<z.ZodString>;
1320
+ links: z.ZodOptional<z.ZodObject<{
1321
+ about: z.ZodOptional<z.ZodString>;
1322
+ }, "strip", z.ZodTypeAny, {
1323
+ about?: string | undefined;
1324
+ }, {
1325
+ about?: string | undefined;
1326
+ }>>;
1327
+ status: z.ZodOptional<z.ZodString>;
1328
+ code: z.ZodOptional<z.ZodString>;
1329
+ title: z.ZodOptional<z.ZodString>;
1330
+ detail: z.ZodOptional<z.ZodString>;
1331
+ source: z.ZodOptional<z.ZodObject<{
1332
+ pointer: z.ZodOptional<z.ZodString>;
1333
+ parameter: z.ZodOptional<z.ZodString>;
1334
+ }, "strip", z.ZodTypeAny, {
1335
+ pointer?: string | undefined;
1336
+ parameter?: string | undefined;
1337
+ }, {
1338
+ pointer?: string | undefined;
1339
+ parameter?: string | undefined;
1340
+ }>>;
1341
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1342
+ }, "strip", z.ZodTypeAny, {
1343
+ status?: string | undefined;
1344
+ code?: string | undefined;
1345
+ id?: string | undefined;
1346
+ links?: {
1347
+ about?: string | undefined;
1348
+ } | undefined;
1349
+ meta?: Record<string, unknown> | undefined;
1350
+ title?: string | undefined;
1351
+ detail?: string | undefined;
1352
+ source?: {
1353
+ pointer?: string | undefined;
1354
+ parameter?: string | undefined;
1355
+ } | undefined;
1356
+ }, {
1357
+ status?: string | undefined;
1358
+ code?: string | undefined;
1359
+ id?: string | undefined;
1360
+ links?: {
1361
+ about?: string | undefined;
1362
+ } | undefined;
1363
+ meta?: Record<string, unknown> | undefined;
1364
+ title?: string | undefined;
1365
+ detail?: string | undefined;
1366
+ source?: {
1367
+ pointer?: string | undefined;
1368
+ parameter?: string | undefined;
1369
+ } | undefined;
1370
+ }>, "many">;
1371
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ errors: {
1374
+ status?: string | undefined;
1375
+ code?: string | undefined;
1376
+ id?: string | undefined;
1377
+ links?: {
1378
+ about?: string | undefined;
1379
+ } | undefined;
1380
+ meta?: Record<string, unknown> | undefined;
1381
+ title?: string | undefined;
1382
+ detail?: string | undefined;
1383
+ source?: {
1384
+ pointer?: string | undefined;
1385
+ parameter?: string | undefined;
1386
+ } | undefined;
1387
+ }[];
1388
+ meta?: Record<string, unknown> | undefined;
1389
+ }, {
1390
+ errors: {
1391
+ status?: string | undefined;
1392
+ code?: string | undefined;
1393
+ id?: string | undefined;
1394
+ links?: {
1395
+ about?: string | undefined;
1396
+ } | undefined;
1397
+ meta?: Record<string, unknown> | undefined;
1398
+ title?: string | undefined;
1399
+ detail?: string | undefined;
1400
+ source?: {
1401
+ pointer?: string | undefined;
1402
+ parameter?: string | undefined;
1403
+ } | undefined;
1404
+ }[];
1405
+ meta?: Record<string, unknown> | undefined;
1406
+ }>;
1407
+ };
1408
+ };
362
1409
  };
363
1410
  export type MarketIntelligenceRouter = typeof marketIntelligenceRouter;
1411
+ export type CropPriceProjection = z.infer<typeof cropPriceProjectionSchema>;
1412
+ export type CreateMarketPriceReport = z.infer<typeof createMarketPriceReportSchema>;
1413
+ export type MarketPriceReportDto = z.infer<typeof marketPriceReportSchema>;
1414
+ export {};
364
1415
  //# sourceMappingURL=market-intelligence.routes.d.ts.map