@deepintel-ltd/farmpro-contracts 1.5.22 → 1.5.23

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.
@@ -1665,16 +1665,448 @@ export declare const organizationsRouter: {
1665
1665
  }>;
1666
1666
  };
1667
1667
  };
1668
- listBankAccounts: {
1668
+ uploadOrganizationLogo: {
1669
1669
  pathParams: z.ZodObject<{
1670
1670
  id: z.ZodString;
1671
- } & {
1672
- organizationId: z.ZodString;
1673
1671
  }, "strip", z.ZodTypeAny, {
1674
1672
  id: string;
1675
- organizationId: string;
1676
1673
  }, {
1677
1674
  id: string;
1675
+ }>;
1676
+ summary: "Upload organization logo";
1677
+ description: "Upload a logo image for an organization and update it with the logo URL";
1678
+ method: "POST";
1679
+ contentType: "multipart/form-data";
1680
+ body: z.ZodUnion<[z.ZodObject<{
1681
+ file: z.ZodAny;
1682
+ }, "strip", z.ZodTypeAny, {
1683
+ file?: any;
1684
+ }, {
1685
+ file?: any;
1686
+ }>, z.ZodUndefined]>;
1687
+ path: "/organizations/:id/logo";
1688
+ responses: {
1689
+ 200: z.ZodObject<{
1690
+ data: z.ZodObject<{
1691
+ type: z.ZodLiteral<string>;
1692
+ id: z.ZodString;
1693
+ attributes: z.ZodObject<{
1694
+ name: z.ZodString;
1695
+ email: z.ZodNullable<z.ZodString>;
1696
+ phone: z.ZodNullable<z.ZodString>;
1697
+ address: z.ZodNullable<z.ZodString>;
1698
+ logo: z.ZodNullable<z.ZodString>;
1699
+ } & {
1700
+ createdAt: z.ZodString;
1701
+ updatedAt: z.ZodString;
1702
+ }, "strip", z.ZodTypeAny, {
1703
+ email: string | null;
1704
+ createdAt: string;
1705
+ updatedAt: string;
1706
+ name: string;
1707
+ phone: string | null;
1708
+ address: string | null;
1709
+ logo: string | null;
1710
+ }, {
1711
+ email: string | null;
1712
+ createdAt: string;
1713
+ updatedAt: string;
1714
+ name: string;
1715
+ phone: string | null;
1716
+ address: string | null;
1717
+ logo: string | null;
1718
+ }>;
1719
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1720
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1721
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1722
+ }, "strip", z.ZodTypeAny, {
1723
+ type: string;
1724
+ id: string;
1725
+ attributes: {
1726
+ email: string | null;
1727
+ createdAt: string;
1728
+ updatedAt: string;
1729
+ name: string;
1730
+ phone: string | null;
1731
+ address: string | null;
1732
+ logo: string | null;
1733
+ };
1734
+ relationships?: Record<string, unknown> | undefined;
1735
+ links?: Record<string, string> | undefined;
1736
+ meta?: Record<string, unknown> | undefined;
1737
+ }, {
1738
+ type: string;
1739
+ id: string;
1740
+ attributes: {
1741
+ email: string | null;
1742
+ createdAt: string;
1743
+ updatedAt: string;
1744
+ name: string;
1745
+ phone: string | null;
1746
+ address: string | null;
1747
+ logo: string | null;
1748
+ };
1749
+ relationships?: Record<string, unknown> | undefined;
1750
+ links?: Record<string, string> | undefined;
1751
+ meta?: Record<string, unknown> | undefined;
1752
+ }>;
1753
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
1754
+ type: z.ZodString;
1755
+ id: z.ZodString;
1756
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1757
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1758
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1759
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1760
+ }, "strip", z.ZodTypeAny, {
1761
+ type: string;
1762
+ id: string;
1763
+ attributes?: Record<string, unknown> | undefined;
1764
+ relationships?: Record<string, unknown> | undefined;
1765
+ links?: Record<string, string> | undefined;
1766
+ meta?: Record<string, unknown> | undefined;
1767
+ }, {
1768
+ type: string;
1769
+ id: string;
1770
+ attributes?: Record<string, unknown> | undefined;
1771
+ relationships?: Record<string, unknown> | undefined;
1772
+ links?: Record<string, string> | undefined;
1773
+ meta?: Record<string, unknown> | undefined;
1774
+ }>, "many">>;
1775
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1776
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1777
+ }, "strip", z.ZodTypeAny, {
1778
+ data: {
1779
+ type: string;
1780
+ id: string;
1781
+ attributes: {
1782
+ email: string | null;
1783
+ createdAt: string;
1784
+ updatedAt: string;
1785
+ name: string;
1786
+ phone: string | null;
1787
+ address: string | null;
1788
+ logo: string | null;
1789
+ };
1790
+ relationships?: Record<string, unknown> | undefined;
1791
+ links?: Record<string, string> | undefined;
1792
+ meta?: Record<string, unknown> | undefined;
1793
+ };
1794
+ links?: Record<string, string> | undefined;
1795
+ meta?: Record<string, unknown> | undefined;
1796
+ included?: {
1797
+ type: string;
1798
+ id: string;
1799
+ attributes?: Record<string, unknown> | undefined;
1800
+ relationships?: Record<string, unknown> | undefined;
1801
+ links?: Record<string, string> | undefined;
1802
+ meta?: Record<string, unknown> | undefined;
1803
+ }[] | undefined;
1804
+ }, {
1805
+ data: {
1806
+ type: string;
1807
+ id: string;
1808
+ attributes: {
1809
+ email: string | null;
1810
+ createdAt: string;
1811
+ updatedAt: string;
1812
+ name: string;
1813
+ phone: string | null;
1814
+ address: string | null;
1815
+ logo: string | null;
1816
+ };
1817
+ relationships?: Record<string, unknown> | undefined;
1818
+ links?: Record<string, string> | undefined;
1819
+ meta?: Record<string, unknown> | undefined;
1820
+ };
1821
+ links?: Record<string, string> | undefined;
1822
+ meta?: Record<string, unknown> | undefined;
1823
+ included?: {
1824
+ type: string;
1825
+ id: string;
1826
+ attributes?: Record<string, unknown> | undefined;
1827
+ relationships?: Record<string, unknown> | undefined;
1828
+ links?: Record<string, string> | undefined;
1829
+ meta?: Record<string, unknown> | undefined;
1830
+ }[] | undefined;
1831
+ }>;
1832
+ 400: z.ZodObject<{
1833
+ errors: z.ZodArray<z.ZodObject<{
1834
+ id: z.ZodOptional<z.ZodString>;
1835
+ links: z.ZodOptional<z.ZodObject<{
1836
+ about: z.ZodOptional<z.ZodString>;
1837
+ }, "strip", z.ZodTypeAny, {
1838
+ about?: string | undefined;
1839
+ }, {
1840
+ about?: string | undefined;
1841
+ }>>;
1842
+ status: z.ZodOptional<z.ZodString>;
1843
+ code: z.ZodOptional<z.ZodString>;
1844
+ title: z.ZodOptional<z.ZodString>;
1845
+ detail: z.ZodOptional<z.ZodString>;
1846
+ source: z.ZodOptional<z.ZodObject<{
1847
+ pointer: z.ZodOptional<z.ZodString>;
1848
+ parameter: z.ZodOptional<z.ZodString>;
1849
+ }, "strip", z.ZodTypeAny, {
1850
+ pointer?: string | undefined;
1851
+ parameter?: string | undefined;
1852
+ }, {
1853
+ pointer?: string | undefined;
1854
+ parameter?: string | undefined;
1855
+ }>>;
1856
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1857
+ }, "strip", z.ZodTypeAny, {
1858
+ status?: string | undefined;
1859
+ code?: string | undefined;
1860
+ id?: string | undefined;
1861
+ links?: {
1862
+ about?: string | undefined;
1863
+ } | undefined;
1864
+ meta?: Record<string, unknown> | undefined;
1865
+ title?: string | undefined;
1866
+ detail?: string | undefined;
1867
+ source?: {
1868
+ pointer?: string | undefined;
1869
+ parameter?: string | undefined;
1870
+ } | undefined;
1871
+ }, {
1872
+ status?: string | undefined;
1873
+ code?: string | undefined;
1874
+ id?: string | undefined;
1875
+ links?: {
1876
+ about?: string | undefined;
1877
+ } | undefined;
1878
+ meta?: Record<string, unknown> | undefined;
1879
+ title?: string | undefined;
1880
+ detail?: string | undefined;
1881
+ source?: {
1882
+ pointer?: string | undefined;
1883
+ parameter?: string | undefined;
1884
+ } | undefined;
1885
+ }>, "many">;
1886
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1887
+ }, "strip", z.ZodTypeAny, {
1888
+ errors: {
1889
+ status?: string | undefined;
1890
+ code?: string | undefined;
1891
+ id?: string | undefined;
1892
+ links?: {
1893
+ about?: string | undefined;
1894
+ } | undefined;
1895
+ meta?: Record<string, unknown> | undefined;
1896
+ title?: string | undefined;
1897
+ detail?: string | undefined;
1898
+ source?: {
1899
+ pointer?: string | undefined;
1900
+ parameter?: string | undefined;
1901
+ } | undefined;
1902
+ }[];
1903
+ meta?: Record<string, unknown> | undefined;
1904
+ }, {
1905
+ errors: {
1906
+ status?: string | undefined;
1907
+ code?: string | undefined;
1908
+ id?: string | undefined;
1909
+ links?: {
1910
+ about?: string | undefined;
1911
+ } | undefined;
1912
+ meta?: Record<string, unknown> | undefined;
1913
+ title?: string | undefined;
1914
+ detail?: string | undefined;
1915
+ source?: {
1916
+ pointer?: string | undefined;
1917
+ parameter?: string | undefined;
1918
+ } | undefined;
1919
+ }[];
1920
+ meta?: Record<string, unknown> | undefined;
1921
+ }>;
1922
+ 404: z.ZodObject<{
1923
+ errors: z.ZodArray<z.ZodObject<{
1924
+ id: z.ZodOptional<z.ZodString>;
1925
+ links: z.ZodOptional<z.ZodObject<{
1926
+ about: z.ZodOptional<z.ZodString>;
1927
+ }, "strip", z.ZodTypeAny, {
1928
+ about?: string | undefined;
1929
+ }, {
1930
+ about?: string | undefined;
1931
+ }>>;
1932
+ status: z.ZodOptional<z.ZodString>;
1933
+ code: z.ZodOptional<z.ZodString>;
1934
+ title: z.ZodOptional<z.ZodString>;
1935
+ detail: z.ZodOptional<z.ZodString>;
1936
+ source: z.ZodOptional<z.ZodObject<{
1937
+ pointer: z.ZodOptional<z.ZodString>;
1938
+ parameter: z.ZodOptional<z.ZodString>;
1939
+ }, "strip", z.ZodTypeAny, {
1940
+ pointer?: string | undefined;
1941
+ parameter?: string | undefined;
1942
+ }, {
1943
+ pointer?: string | undefined;
1944
+ parameter?: string | undefined;
1945
+ }>>;
1946
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1947
+ }, "strip", z.ZodTypeAny, {
1948
+ status?: string | undefined;
1949
+ code?: string | undefined;
1950
+ id?: string | undefined;
1951
+ links?: {
1952
+ about?: string | undefined;
1953
+ } | undefined;
1954
+ meta?: Record<string, unknown> | undefined;
1955
+ title?: string | undefined;
1956
+ detail?: string | undefined;
1957
+ source?: {
1958
+ pointer?: string | undefined;
1959
+ parameter?: string | undefined;
1960
+ } | undefined;
1961
+ }, {
1962
+ status?: string | undefined;
1963
+ code?: string | undefined;
1964
+ id?: string | undefined;
1965
+ links?: {
1966
+ about?: string | undefined;
1967
+ } | undefined;
1968
+ meta?: Record<string, unknown> | undefined;
1969
+ title?: string | undefined;
1970
+ detail?: string | undefined;
1971
+ source?: {
1972
+ pointer?: string | undefined;
1973
+ parameter?: string | undefined;
1974
+ } | undefined;
1975
+ }>, "many">;
1976
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1977
+ }, "strip", z.ZodTypeAny, {
1978
+ errors: {
1979
+ status?: string | undefined;
1980
+ code?: string | undefined;
1981
+ id?: string | undefined;
1982
+ links?: {
1983
+ about?: string | undefined;
1984
+ } | undefined;
1985
+ meta?: Record<string, unknown> | undefined;
1986
+ title?: string | undefined;
1987
+ detail?: string | undefined;
1988
+ source?: {
1989
+ pointer?: string | undefined;
1990
+ parameter?: string | undefined;
1991
+ } | undefined;
1992
+ }[];
1993
+ meta?: Record<string, unknown> | undefined;
1994
+ }, {
1995
+ errors: {
1996
+ status?: string | undefined;
1997
+ code?: string | undefined;
1998
+ id?: string | undefined;
1999
+ links?: {
2000
+ about?: string | undefined;
2001
+ } | undefined;
2002
+ meta?: Record<string, unknown> | undefined;
2003
+ title?: string | undefined;
2004
+ detail?: string | undefined;
2005
+ source?: {
2006
+ pointer?: string | undefined;
2007
+ parameter?: string | undefined;
2008
+ } | undefined;
2009
+ }[];
2010
+ meta?: Record<string, unknown> | undefined;
2011
+ }>;
2012
+ 401: z.ZodObject<{
2013
+ errors: z.ZodArray<z.ZodObject<{
2014
+ id: z.ZodOptional<z.ZodString>;
2015
+ links: z.ZodOptional<z.ZodObject<{
2016
+ about: z.ZodOptional<z.ZodString>;
2017
+ }, "strip", z.ZodTypeAny, {
2018
+ about?: string | undefined;
2019
+ }, {
2020
+ about?: string | undefined;
2021
+ }>>;
2022
+ status: z.ZodOptional<z.ZodString>;
2023
+ code: z.ZodOptional<z.ZodString>;
2024
+ title: z.ZodOptional<z.ZodString>;
2025
+ detail: z.ZodOptional<z.ZodString>;
2026
+ source: z.ZodOptional<z.ZodObject<{
2027
+ pointer: z.ZodOptional<z.ZodString>;
2028
+ parameter: z.ZodOptional<z.ZodString>;
2029
+ }, "strip", z.ZodTypeAny, {
2030
+ pointer?: string | undefined;
2031
+ parameter?: string | undefined;
2032
+ }, {
2033
+ pointer?: string | undefined;
2034
+ parameter?: string | undefined;
2035
+ }>>;
2036
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2037
+ }, "strip", z.ZodTypeAny, {
2038
+ status?: string | undefined;
2039
+ code?: string | undefined;
2040
+ id?: string | undefined;
2041
+ links?: {
2042
+ about?: string | undefined;
2043
+ } | undefined;
2044
+ meta?: Record<string, unknown> | undefined;
2045
+ title?: string | undefined;
2046
+ detail?: string | undefined;
2047
+ source?: {
2048
+ pointer?: string | undefined;
2049
+ parameter?: string | undefined;
2050
+ } | undefined;
2051
+ }, {
2052
+ status?: string | undefined;
2053
+ code?: string | undefined;
2054
+ id?: string | undefined;
2055
+ links?: {
2056
+ about?: string | undefined;
2057
+ } | undefined;
2058
+ meta?: Record<string, unknown> | undefined;
2059
+ title?: string | undefined;
2060
+ detail?: string | undefined;
2061
+ source?: {
2062
+ pointer?: string | undefined;
2063
+ parameter?: string | undefined;
2064
+ } | undefined;
2065
+ }>, "many">;
2066
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2067
+ }, "strip", z.ZodTypeAny, {
2068
+ errors: {
2069
+ status?: string | undefined;
2070
+ code?: string | undefined;
2071
+ id?: string | undefined;
2072
+ links?: {
2073
+ about?: string | undefined;
2074
+ } | undefined;
2075
+ meta?: Record<string, unknown> | undefined;
2076
+ title?: string | undefined;
2077
+ detail?: string | undefined;
2078
+ source?: {
2079
+ pointer?: string | undefined;
2080
+ parameter?: string | undefined;
2081
+ } | undefined;
2082
+ }[];
2083
+ meta?: Record<string, unknown> | undefined;
2084
+ }, {
2085
+ errors: {
2086
+ status?: string | undefined;
2087
+ code?: string | undefined;
2088
+ id?: string | undefined;
2089
+ links?: {
2090
+ about?: string | undefined;
2091
+ } | undefined;
2092
+ meta?: Record<string, unknown> | undefined;
2093
+ title?: string | undefined;
2094
+ detail?: string | undefined;
2095
+ source?: {
2096
+ pointer?: string | undefined;
2097
+ parameter?: string | undefined;
2098
+ } | undefined;
2099
+ }[];
2100
+ meta?: Record<string, unknown> | undefined;
2101
+ }>;
2102
+ };
2103
+ };
2104
+ listBankAccounts: {
2105
+ pathParams: z.ZodObject<{
2106
+ organizationId: z.ZodString;
2107
+ }, "strip", z.ZodTypeAny, {
2108
+ organizationId: string;
2109
+ }, {
1678
2110
  organizationId: string;
1679
2111
  }>;
1680
2112
  query: z.ZodObject<{
@@ -2016,14 +2448,10 @@ export declare const organizationsRouter: {
2016
2448
  };
2017
2449
  createBankAccount: {
2018
2450
  pathParams: z.ZodObject<{
2019
- id: z.ZodString;
2020
- } & {
2021
2451
  organizationId: z.ZodString;
2022
2452
  }, "strip", z.ZodTypeAny, {
2023
- id: string;
2024
2453
  organizationId: string;
2025
2454
  }, {
2026
- id: string;
2027
2455
  organizationId: string;
2028
2456
  }>;
2029
2457
  summary: "Create a new bank account";
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.routes.d.ts","sourceRoot":"","sources":["../../src/routes/organizations.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ganizationSchema, organizationResponseSchema, organizationListResponseSchema, createBankAccountSchema, updateBankAccountSchema, bankAccountResponseSchema, bankAccountListResponseSchema, } from '../schemas/organizations.schemas';
4
4
  import { jsonApiErrorResponseSchema, idParamSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, } from '../schemas/common.schemas';
5
+ import { uploadFileBodySchema } from '../schemas/documents.schemas';
5
6
  const c = initContract();
6
7
  export const organizationsRouter = c.router({
7
8
  // List all organizations for the authenticated user
@@ -60,6 +61,22 @@ export const organizationsRouter = c.router({
60
61
  summary: 'Update organization',
61
62
  description: 'Update organization information',
62
63
  },
64
+ // Upload organization logo
65
+ uploadOrganizationLogo: {
66
+ method: 'POST',
67
+ path: '/organizations/:id/logo',
68
+ contentType: 'multipart/form-data',
69
+ pathParams: idParamSchema,
70
+ body: z.union([uploadFileBodySchema, z.undefined()]),
71
+ responses: {
72
+ 200: organizationResponseSchema,
73
+ 400: jsonApiErrorResponseSchema,
74
+ 404: jsonApiErrorResponseSchema,
75
+ 401: jsonApiErrorResponseSchema,
76
+ },
77
+ summary: 'Upload organization logo',
78
+ description: 'Upload a logo image for an organization and update it with the logo URL',
79
+ },
63
80
  // ============================================================================
64
81
  // Bank Account Routes
65
82
  // ============================================================================
@@ -67,7 +84,7 @@ export const organizationsRouter = c.router({
67
84
  listBankAccounts: {
68
85
  method: 'GET',
69
86
  path: '/organizations/:organizationId/bank-accounts',
70
- pathParams: idParamSchema.extend({ organizationId: z.string().uuid() }),
87
+ pathParams: z.object({ organizationId: z.string().uuid() }),
71
88
  query: jsonApiPaginationQuerySchema.merge(jsonApiSortQuerySchema),
72
89
  responses: {
73
90
  200: bankAccountListResponseSchema,
@@ -81,7 +98,7 @@ export const organizationsRouter = c.router({
81
98
  createBankAccount: {
82
99
  method: 'POST',
83
100
  path: '/organizations/:organizationId/bank-accounts',
84
- pathParams: idParamSchema.extend({ organizationId: z.string().uuid() }),
101
+ pathParams: z.object({ organizationId: z.string().uuid() }),
85
102
  body: z.object({ data: createBankAccountSchema }),
86
103
  responses: {
87
104
  201: bankAccountResponseSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepintel-ltd/farmpro-contracts",
3
- "version": "1.5.22",
3
+ "version": "1.5.23",
4
4
  "description": "Type-safe API contracts for FarmPro API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",