@deepintel-ltd/farmpro-contracts 1.23.0 → 1.23.2

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 (53) hide show
  1. package/dist/routes/categories.routes.d.ts +26 -26
  2. package/dist/routes/commodity-deals.routes.d.ts +42 -42
  3. package/dist/routes/crop-profile.routes.d.ts +8 -8
  4. package/dist/routes/farm-enterprises.routes.d.ts +395 -0
  5. package/dist/routes/farm-enterprises.routes.d.ts.map +1 -1
  6. package/dist/routes/farm-enterprises.routes.js +14 -1
  7. package/dist/routes/farms.routes.d.ts +73 -20
  8. package/dist/routes/farms.routes.d.ts.map +1 -1
  9. package/dist/routes/fertigation.routes.d.ts +96 -96
  10. package/dist/routes/field-monitoring.routes.d.ts +2 -2
  11. package/dist/routes/finance.routes.d.ts +8 -8
  12. package/dist/routes/invoices.routes.d.ts +63 -60
  13. package/dist/routes/invoices.routes.d.ts.map +1 -1
  14. package/dist/routes/invoices.routes.js +4 -1
  15. package/dist/routes/monitoring-visualization.routes.d.ts +2 -2
  16. package/dist/routes/notifications.routes.d.ts +12 -12
  17. package/dist/routes/organizations.routes.d.ts +90 -47
  18. package/dist/routes/organizations.routes.d.ts.map +1 -1
  19. package/dist/routes/purchase-orders.routes.d.ts +9 -9
  20. package/dist/routes/suppliers.routes.d.ts +96 -96
  21. package/dist/routes/team-payments.routes.d.ts +105 -105
  22. package/dist/routes/team.routes.d.ts +125 -25
  23. package/dist/routes/team.routes.d.ts.map +1 -1
  24. package/dist/routes/trade-cash-events.routes.d.ts +46 -46
  25. package/dist/routes/waybills.routes.d.ts +61 -57
  26. package/dist/routes/waybills.routes.d.ts.map +1 -1
  27. package/dist/routes/waybills.routes.js +4 -1
  28. package/dist/schemas/categories.schemas.d.ts +21 -21
  29. package/dist/schemas/commodity-deals.schemas.d.ts +18 -18
  30. package/dist/schemas/crop-profile.schemas.d.ts +12 -12
  31. package/dist/schemas/farm-enterprises.schemas.d.ts +185 -0
  32. package/dist/schemas/farm-enterprises.schemas.d.ts.map +1 -1
  33. package/dist/schemas/farm-enterprises.schemas.js +21 -0
  34. package/dist/schemas/farms.schemas.d.ts +121 -19
  35. package/dist/schemas/farms.schemas.d.ts.map +1 -1
  36. package/dist/schemas/farms.schemas.js +15 -1
  37. package/dist/schemas/fertigation.schemas.d.ts +36 -36
  38. package/dist/schemas/field-monitoring.schemas.d.ts +2 -2
  39. package/dist/schemas/finance.schemas.d.ts +8 -8
  40. package/dist/schemas/invoices.schemas.d.ts +39 -39
  41. package/dist/schemas/notifications.schemas.d.ts +18 -18
  42. package/dist/schemas/organizations.schemas.d.ts +105 -46
  43. package/dist/schemas/organizations.schemas.d.ts.map +1 -1
  44. package/dist/schemas/organizations.schemas.js +8 -1
  45. package/dist/schemas/purchase-orders.schemas.d.ts +9 -9
  46. package/dist/schemas/suppliers.schemas.d.ts +96 -96
  47. package/dist/schemas/team-payments.schemas.d.ts +87 -87
  48. package/dist/schemas/team.schemas.d.ts +137 -20
  49. package/dist/schemas/team.schemas.d.ts.map +1 -1
  50. package/dist/schemas/team.schemas.js +29 -1
  51. package/dist/schemas/trade-cash-events.schemas.d.ts +60 -60
  52. package/dist/schemas/waybills.schemas.d.ts +39 -39
  53. package/package.json +1 -1
@@ -429,7 +429,192 @@ export declare const replaceFarmEnterprisesSchema: z.ZodObject<{
429
429
  }[];
430
430
  };
431
431
  }>;
432
+ /** Effective workspace packs for the current user on a farm (+ org Trade). */
433
+ export declare const effectiveWorkspacePacksSchema: z.ZodObject<{
434
+ farmId: z.ZodString;
435
+ organizationId: z.ZodNullable<z.ZodString>;
436
+ enabledFarmPacks: z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">;
437
+ grantedFarmPacks: z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">;
438
+ effectiveFarmPacks: z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">;
439
+ trade: z.ZodObject<{
440
+ enabled: z.ZodBoolean;
441
+ granted: z.ZodBoolean;
442
+ effective: z.ZodBoolean;
443
+ }, "strip", z.ZodTypeAny, {
444
+ enabled: boolean;
445
+ granted: boolean;
446
+ effective: boolean;
447
+ }, {
448
+ enabled: boolean;
449
+ granted: boolean;
450
+ effective: boolean;
451
+ }>;
452
+ /** Packs the user may switch into (farm packs + trade when effective). */
453
+ effectiveWorkspaces: z.ZodArray<z.ZodUnion<[z.ZodObject<{
454
+ kind: z.ZodLiteral<"farm">;
455
+ pack: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ kind: "farm";
458
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
459
+ }, {
460
+ kind: "farm";
461
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
462
+ }>, z.ZodObject<{
463
+ kind: z.ZodLiteral<"trade">;
464
+ }, "strip", z.ZodTypeAny, {
465
+ kind: "trade";
466
+ }, {
467
+ kind: "trade";
468
+ }>]>, "many">;
469
+ }, "strip", z.ZodTypeAny, {
470
+ organizationId: string | null;
471
+ farmId: string;
472
+ enabledFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
473
+ grantedFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
474
+ effectiveFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
475
+ trade: {
476
+ enabled: boolean;
477
+ granted: boolean;
478
+ effective: boolean;
479
+ };
480
+ effectiveWorkspaces: ({
481
+ kind: "farm";
482
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
483
+ } | {
484
+ kind: "trade";
485
+ })[];
486
+ }, {
487
+ organizationId: string | null;
488
+ farmId: string;
489
+ enabledFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
490
+ grantedFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
491
+ effectiveFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
492
+ trade: {
493
+ enabled: boolean;
494
+ granted: boolean;
495
+ effective: boolean;
496
+ };
497
+ effectiveWorkspaces: ({
498
+ kind: "farm";
499
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
500
+ } | {
501
+ kind: "trade";
502
+ })[];
503
+ }>;
504
+ export declare const effectiveWorkspacePacksResponseSchema: z.ZodObject<{
505
+ data: z.ZodObject<{
506
+ farmId: z.ZodString;
507
+ organizationId: z.ZodNullable<z.ZodString>;
508
+ enabledFarmPacks: z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">;
509
+ grantedFarmPacks: z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">;
510
+ effectiveFarmPacks: z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">;
511
+ trade: z.ZodObject<{
512
+ enabled: z.ZodBoolean;
513
+ granted: z.ZodBoolean;
514
+ effective: z.ZodBoolean;
515
+ }, "strip", z.ZodTypeAny, {
516
+ enabled: boolean;
517
+ granted: boolean;
518
+ effective: boolean;
519
+ }, {
520
+ enabled: boolean;
521
+ granted: boolean;
522
+ effective: boolean;
523
+ }>;
524
+ /** Packs the user may switch into (farm packs + trade when effective). */
525
+ effectiveWorkspaces: z.ZodArray<z.ZodUnion<[z.ZodObject<{
526
+ kind: z.ZodLiteral<"farm">;
527
+ pack: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
528
+ }, "strip", z.ZodTypeAny, {
529
+ kind: "farm";
530
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
531
+ }, {
532
+ kind: "farm";
533
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
534
+ }>, z.ZodObject<{
535
+ kind: z.ZodLiteral<"trade">;
536
+ }, "strip", z.ZodTypeAny, {
537
+ kind: "trade";
538
+ }, {
539
+ kind: "trade";
540
+ }>]>, "many">;
541
+ }, "strip", z.ZodTypeAny, {
542
+ organizationId: string | null;
543
+ farmId: string;
544
+ enabledFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
545
+ grantedFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
546
+ effectiveFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
547
+ trade: {
548
+ enabled: boolean;
549
+ granted: boolean;
550
+ effective: boolean;
551
+ };
552
+ effectiveWorkspaces: ({
553
+ kind: "farm";
554
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
555
+ } | {
556
+ kind: "trade";
557
+ })[];
558
+ }, {
559
+ organizationId: string | null;
560
+ farmId: string;
561
+ enabledFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
562
+ grantedFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
563
+ effectiveFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
564
+ trade: {
565
+ enabled: boolean;
566
+ granted: boolean;
567
+ effective: boolean;
568
+ };
569
+ effectiveWorkspaces: ({
570
+ kind: "farm";
571
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
572
+ } | {
573
+ kind: "trade";
574
+ })[];
575
+ }>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ data: {
578
+ organizationId: string | null;
579
+ farmId: string;
580
+ enabledFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
581
+ grantedFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
582
+ effectiveFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
583
+ trade: {
584
+ enabled: boolean;
585
+ granted: boolean;
586
+ effective: boolean;
587
+ };
588
+ effectiveWorkspaces: ({
589
+ kind: "farm";
590
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
591
+ } | {
592
+ kind: "trade";
593
+ })[];
594
+ };
595
+ }, {
596
+ data: {
597
+ organizationId: string | null;
598
+ farmId: string;
599
+ enabledFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
600
+ grantedFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
601
+ effectiveFarmPacks: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[];
602
+ trade: {
603
+ enabled: boolean;
604
+ granted: boolean;
605
+ effective: boolean;
606
+ };
607
+ effectiveWorkspaces: ({
608
+ kind: "farm";
609
+ pack: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
610
+ } | {
611
+ kind: "trade";
612
+ })[];
613
+ };
614
+ }>;
432
615
  export type FarmEnterpriseType = z.infer<typeof farmEnterpriseTypeSchema>;
433
616
  export type FarmEnterpriseAttributes = z.infer<typeof farmEnterpriseAttributesSchema>;
434
617
  export type CreateFarmEnterpriseAttributes = z.infer<typeof createFarmEnterpriseAttributesSchema>;
618
+ export type EffectiveWorkspacePacks = z.infer<typeof effectiveWorkspacePacksSchema>;
619
+ export type EffectiveWorkspacePacksResponse = z.infer<typeof effectiveWorkspacePacksResponseSchema>;
435
620
  //# sourceMapping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AAqC;;;;;;;;;;;;;;;;;;;;QAThD,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1E,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,qCAAqC,CAC7C,CAAC"}
@@ -37,3 +37,24 @@ export const replaceFarmEnterprisesSchema = z.object({
37
37
  type: z.literal('farm-enterprises'),
38
38
  attributes: replaceFarmEnterprisesAttributesSchema,
39
39
  });
40
+ /** Effective workspace packs for the current user on a farm (+ org Trade). */
41
+ export const effectiveWorkspacePacksSchema = z.object({
42
+ farmId: z.string().uuid(),
43
+ organizationId: z.string().uuid().nullable(),
44
+ enabledFarmPacks: z.array(farmEnterpriseTypeSchema),
45
+ grantedFarmPacks: z.array(farmEnterpriseTypeSchema),
46
+ effectiveFarmPacks: z.array(farmEnterpriseTypeSchema),
47
+ trade: z.object({
48
+ enabled: z.boolean(),
49
+ granted: z.boolean(),
50
+ effective: z.boolean(),
51
+ }),
52
+ /** Packs the user may switch into (farm packs + trade when effective). */
53
+ effectiveWorkspaces: z.array(z.union([
54
+ z.object({ kind: z.literal('farm'), pack: farmEnterpriseTypeSchema }),
55
+ z.object({ kind: z.literal('trade') }),
56
+ ])),
57
+ });
58
+ export const effectiveWorkspacePacksResponseSchema = z.object({
59
+ data: effectiveWorkspacePacksSchema,
60
+ });
@@ -1753,7 +1753,7 @@ export declare const onboardingFirstFieldSchema: z.ZodObject<{
1753
1753
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1754
1754
  };
1755
1755
  }>;
1756
- export declare const farmOnboardingAttributesSchema: z.ZodObject<{
1756
+ export declare const farmOnboardingAttributesSchema: z.ZodEffects<z.ZodObject<{
1757
1757
  name: z.ZodString;
1758
1758
  countryCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1759
1759
  location: z.ZodObject<{
@@ -1782,7 +1782,7 @@ export declare const farmOnboardingAttributesSchema: z.ZodObject<{
1782
1782
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1783
1783
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1784
1784
  }>;
1785
- firstField: z.ZodObject<{
1785
+ firstField: z.ZodOptional<z.ZodObject<{
1786
1786
  name: z.ZodString;
1787
1787
  crop: z.ZodString;
1788
1788
  geometry: z.ZodObject<{
@@ -1809,7 +1809,9 @@ export declare const farmOnboardingAttributesSchema: z.ZodObject<{
1809
1809
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1810
1810
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1811
1811
  };
1812
- }>;
1812
+ }>>;
1813
+ /** Enterprise packs to enable on this farm. Defaults to CROPS when omitted. */
1814
+ enterprises: z.ZodOptional<z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">>;
1813
1815
  currency: z.ZodOptional<z.ZodEnum<["NGN", "USD", "GHS", "KES", "CAD", "AED", "GBP", "EUR"]>>;
1814
1816
  }, "strip", z.ZodTypeAny, {
1815
1817
  name: string;
@@ -1824,17 +1826,42 @@ export declare const farmOnboardingAttributesSchema: z.ZodObject<{
1824
1826
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1825
1827
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1826
1828
  };
1827
- firstField: {
1829
+ currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
1830
+ firstField?: {
1828
1831
  name: string;
1829
1832
  crop: string;
1830
1833
  geometry: {
1831
1834
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1832
1835
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1833
1836
  };
1837
+ } | undefined;
1838
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
1839
+ }, {
1840
+ name: string;
1841
+ location: {
1842
+ state: string;
1843
+ lat: number;
1844
+ lng: number;
1845
+ lga: string;
1846
+ };
1847
+ boundary: {
1848
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1849
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1834
1850
  };
1851
+ countryCode?: string | undefined;
1835
1852
  currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
1836
- }, {
1853
+ firstField?: {
1854
+ name: string;
1855
+ crop: string;
1856
+ geometry: {
1857
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1858
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1859
+ };
1860
+ } | undefined;
1861
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
1862
+ }>, {
1837
1863
  name: string;
1864
+ countryCode: string;
1838
1865
  location: {
1839
1866
  state: string;
1840
1867
  lat: number;
@@ -1845,20 +1872,43 @@ export declare const farmOnboardingAttributesSchema: z.ZodObject<{
1845
1872
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1846
1873
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1847
1874
  };
1848
- firstField: {
1875
+ currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
1876
+ firstField?: {
1849
1877
  name: string;
1850
1878
  crop: string;
1851
1879
  geometry: {
1852
1880
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1853
1881
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1854
1882
  };
1883
+ } | undefined;
1884
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
1885
+ }, {
1886
+ name: string;
1887
+ location: {
1888
+ state: string;
1889
+ lat: number;
1890
+ lng: number;
1891
+ lga: string;
1892
+ };
1893
+ boundary: {
1894
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1895
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1855
1896
  };
1856
1897
  countryCode?: string | undefined;
1857
1898
  currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
1899
+ firstField?: {
1900
+ name: string;
1901
+ crop: string;
1902
+ geometry: {
1903
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1904
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1905
+ };
1906
+ } | undefined;
1907
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
1858
1908
  }>;
1859
1909
  export declare const farmOnboardingInputSchema: z.ZodObject<{
1860
1910
  type: z.ZodLiteral<"farm-onboarding">;
1861
- attributes: z.ZodObject<{
1911
+ attributes: z.ZodEffects<z.ZodObject<{
1862
1912
  name: z.ZodString;
1863
1913
  countryCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1864
1914
  location: z.ZodObject<{
@@ -1887,7 +1937,7 @@ export declare const farmOnboardingInputSchema: z.ZodObject<{
1887
1937
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1888
1938
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1889
1939
  }>;
1890
- firstField: z.ZodObject<{
1940
+ firstField: z.ZodOptional<z.ZodObject<{
1891
1941
  name: z.ZodString;
1892
1942
  crop: z.ZodString;
1893
1943
  geometry: z.ZodObject<{
@@ -1914,7 +1964,9 @@ export declare const farmOnboardingInputSchema: z.ZodObject<{
1914
1964
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1915
1965
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1916
1966
  };
1917
- }>;
1967
+ }>>;
1968
+ /** Enterprise packs to enable on this farm. Defaults to CROPS when omitted. */
1969
+ enterprises: z.ZodOptional<z.ZodArray<z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>, "many">>;
1918
1970
  currency: z.ZodOptional<z.ZodEnum<["NGN", "USD", "GHS", "KES", "CAD", "AED", "GBP", "EUR"]>>;
1919
1971
  }, "strip", z.ZodTypeAny, {
1920
1972
  name: string;
@@ -1929,17 +1981,42 @@ export declare const farmOnboardingInputSchema: z.ZodObject<{
1929
1981
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1930
1982
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1931
1983
  };
1932
- firstField: {
1984
+ currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
1985
+ firstField?: {
1933
1986
  name: string;
1934
1987
  crop: string;
1935
1988
  geometry: {
1936
1989
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1937
1990
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1938
1991
  };
1992
+ } | undefined;
1993
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
1994
+ }, {
1995
+ name: string;
1996
+ location: {
1997
+ state: string;
1998
+ lat: number;
1999
+ lng: number;
2000
+ lga: string;
1939
2001
  };
2002
+ boundary: {
2003
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2004
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2005
+ };
2006
+ countryCode?: string | undefined;
1940
2007
  currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
1941
- }, {
2008
+ firstField?: {
2009
+ name: string;
2010
+ crop: string;
2011
+ geometry: {
2012
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2013
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2014
+ };
2015
+ } | undefined;
2016
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
2017
+ }>, {
1942
2018
  name: string;
2019
+ countryCode: string;
1943
2020
  location: {
1944
2021
  state: string;
1945
2022
  lat: number;
@@ -1950,16 +2027,39 @@ export declare const farmOnboardingInputSchema: z.ZodObject<{
1950
2027
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1951
2028
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1952
2029
  };
1953
- firstField: {
2030
+ currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
2031
+ firstField?: {
1954
2032
  name: string;
1955
2033
  crop: string;
1956
2034
  geometry: {
1957
2035
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1958
2036
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1959
2037
  };
2038
+ } | undefined;
2039
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
2040
+ }, {
2041
+ name: string;
2042
+ location: {
2043
+ state: string;
2044
+ lat: number;
2045
+ lng: number;
2046
+ lga: string;
2047
+ };
2048
+ boundary: {
2049
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2050
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
1960
2051
  };
1961
2052
  countryCode?: string | undefined;
1962
2053
  currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
2054
+ firstField?: {
2055
+ name: string;
2056
+ crop: string;
2057
+ geometry: {
2058
+ type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2059
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
2060
+ };
2061
+ } | undefined;
2062
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
1963
2063
  }>;
1964
2064
  }, "strip", z.ZodTypeAny, {
1965
2065
  type: "farm-onboarding";
@@ -1976,15 +2076,16 @@ export declare const farmOnboardingInputSchema: z.ZodObject<{
1976
2076
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1977
2077
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1978
2078
  };
1979
- firstField: {
2079
+ currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
2080
+ firstField?: {
1980
2081
  name: string;
1981
2082
  crop: string;
1982
2083
  geometry: {
1983
2084
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
1984
2085
  coordinates: number[] | number[][] | number[][][] | number[][][][];
1985
2086
  };
1986
- };
1987
- currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
2087
+ } | undefined;
2088
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
1988
2089
  };
1989
2090
  }, {
1990
2091
  type: "farm-onboarding";
@@ -2000,16 +2101,17 @@ export declare const farmOnboardingInputSchema: z.ZodObject<{
2000
2101
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2001
2102
  coordinates: number[] | number[][] | number[][][] | number[][][][];
2002
2103
  };
2003
- firstField: {
2104
+ countryCode?: string | undefined;
2105
+ currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
2106
+ firstField?: {
2004
2107
  name: string;
2005
2108
  crop: string;
2006
2109
  geometry: {
2007
2110
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
2008
2111
  coordinates: number[] | number[][] | number[][][] | number[][][][];
2009
2112
  };
2010
- };
2011
- countryCode?: string | undefined;
2012
- currency?: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR" | undefined;
2113
+ } | undefined;
2114
+ enterprises?: ("CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT")[] | undefined;
2013
2115
  };
2014
2116
  }>;
2015
2117
  export declare const farmOnboardingResponseSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"farms.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/farms.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB;;GAEG;AAGH,eAAO,MAAM,cAAc,qEAAwB,CAAC;AAGpD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;IAe/B,yDAAyD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjC,CAAC;AAG3B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAerC,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAuC,CAAC;AAG/E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3B,CAAC;AAGH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI3B,CAAC;AAGH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;QAvC7B,yDAAyD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -100,8 +100,22 @@ export const farmOnboardingAttributesSchema = z.object({
100
100
  countryCode: countryCodeSchema.optional().default('NG'),
101
101
  location: farmLocationSchema,
102
102
  boundary: geoJSONGeometrySchema,
103
- firstField: onboardingFirstFieldSchema,
103
+ firstField: onboardingFirstFieldSchema.optional(),
104
+ /** Enterprise packs to enable on this farm. Defaults to CROPS when omitted. */
105
+ enterprises: z
106
+ .array(z.enum(['CROPS', 'POULTRY', 'AQUACULTURE', 'CATTLE', 'GOAT']))
107
+ .min(1)
108
+ .optional(),
104
109
  currency: currencySchema.optional(),
110
+ }).superRefine((data, ctx) => {
111
+ const packs = data.enterprises?.length ? data.enterprises : ['CROPS'];
112
+ if (packs.includes('CROPS') && !data.firstField) {
113
+ ctx.addIssue({
114
+ code: z.ZodIssueCode.custom,
115
+ message: 'First field is required when Crops is enabled',
116
+ path: ['firstField'],
117
+ });
118
+ }
105
119
  });
106
120
  export const farmOnboardingInputSchema = z.object({
107
121
  type: z.literal('farm-onboarding'),