@deepintel-ltd/farmpro-contracts 1.5.22 → 1.5.24
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/documents.routes.d.ts +12 -12
- package/dist/routes/files.routes.d.ts +794 -0
- package/dist/routes/files.routes.d.ts.map +1 -0
- package/dist/routes/files.routes.js +38 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +2 -0
- package/dist/routes/organizations.routes.d.ts +436 -8
- package/dist/routes/organizations.routes.d.ts.map +1 -1
- package/dist/routes/organizations.routes.js +19 -2
- package/dist/schemas/documents.schemas.d.ts +13 -221
- package/dist/schemas/documents.schemas.d.ts.map +1 -1
- package/dist/schemas/documents.schemas.js +2 -12
- package/dist/schemas/files.schemas.d.ts +229 -0
- package/dist/schemas/files.schemas.d.ts.map +1 -0
- package/dist/schemas/files.schemas.js +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.routes.d.ts","sourceRoot":"","sources":["../../src/routes/files.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCtB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { initContract } from '@ts-rest/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { uploadedFileResponseSchema, uploadFileBodySchema, } from '../schemas/files.schemas';
|
|
4
|
+
import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
|
|
5
|
+
const c = initContract();
|
|
6
|
+
export const filesRouter = c.router({
|
|
7
|
+
// Generic file upload endpoint - accepts any file type
|
|
8
|
+
uploadFile: {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
path: '/files/upload',
|
|
11
|
+
contentType: 'multipart/form-data',
|
|
12
|
+
body: z.union([uploadFileBodySchema, z.undefined()]),
|
|
13
|
+
responses: {
|
|
14
|
+
200: uploadedFileResponseSchema,
|
|
15
|
+
400: jsonApiErrorResponseSchema,
|
|
16
|
+
401: jsonApiErrorResponseSchema,
|
|
17
|
+
413: jsonApiErrorResponseSchema, // Payload too large
|
|
18
|
+
},
|
|
19
|
+
summary: 'Upload any file',
|
|
20
|
+
description: 'Upload any type of file and get back the file URL in JSON:API format. Files are stored in a generic uploads directory. The returned fileUrl is a proxy URL that requires authentication.',
|
|
21
|
+
},
|
|
22
|
+
viewFile: {
|
|
23
|
+
method: 'GET',
|
|
24
|
+
path: '/files/view/:fileId',
|
|
25
|
+
pathParams: z.object({
|
|
26
|
+
fileId: z.string(),
|
|
27
|
+
}),
|
|
28
|
+
responses: {
|
|
29
|
+
200: z.any(), // File stream response
|
|
30
|
+
400: jsonApiErrorResponseSchema,
|
|
31
|
+
401: jsonApiErrorResponseSchema,
|
|
32
|
+
403: jsonApiErrorResponseSchema,
|
|
33
|
+
404: jsonApiErrorResponseSchema,
|
|
34
|
+
},
|
|
35
|
+
summary: 'View file',
|
|
36
|
+
description: 'Stream or download a file by its UUID. Extension is optional - both /files/view/{fileId} and /files/view/{fileId}.{ext} work for the same file. Requires authentication and validates that the requesting user has permission to access the file.',
|
|
37
|
+
},
|
|
38
|
+
});
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { subscriptionsRouter } from './subscriptions.routes';
|
|
|
27
27
|
import { organizationsRouter } from './organizations.routes';
|
|
28
28
|
import { waybillsRouter } from './waybills.routes';
|
|
29
29
|
import { invoicesRouter } from './invoices.routes';
|
|
30
|
+
import { filesRouter } from './files.routes';
|
|
30
31
|
/**
|
|
31
32
|
* Explicit interface definition for the API contract.
|
|
32
33
|
* This avoids TypeScript's type serialization limit when combining many routers
|
|
@@ -62,6 +63,7 @@ export interface ApiContractDefinition {
|
|
|
62
63
|
organizations: typeof organizationsRouter;
|
|
63
64
|
waybills: typeof waybillsRouter;
|
|
64
65
|
invoices: typeof invoicesRouter;
|
|
66
|
+
files: typeof filesRouter;
|
|
65
67
|
}
|
|
66
68
|
/**
|
|
67
69
|
* Main API contract combining all routers
|
|
@@ -107,4 +109,5 @@ export type SubscriptionsEndpoints = ApiContractType['subscriptions'];
|
|
|
107
109
|
export type OrganizationsEndpoints = ApiContractType['organizations'];
|
|
108
110
|
export type WaybillsEndpoints = ApiContractType['waybills'];
|
|
109
111
|
export type InvoicesEndpoints = ApiContractType['invoices'];
|
|
112
|
+
export type FilesEndpoints = ApiContractType['files'];
|
|
110
113
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAA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AAC5D,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;AACtE,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC"}
|
package/dist/routes/index.js
CHANGED
|
@@ -28,6 +28,7 @@ import { subscriptionsRouter } from './subscriptions.routes';
|
|
|
28
28
|
import { organizationsRouter } from './organizations.routes';
|
|
29
29
|
import { waybillsRouter } from './waybills.routes';
|
|
30
30
|
import { invoicesRouter } from './invoices.routes';
|
|
31
|
+
import { filesRouter } from './files.routes';
|
|
31
32
|
const c = initContract();
|
|
32
33
|
/**
|
|
33
34
|
* Main API contract combining all routers
|
|
@@ -65,4 +66,5 @@ export const apiContract = c.router({
|
|
|
65
66
|
organizations: organizationsRouter,
|
|
66
67
|
waybills: waybillsRouter,
|
|
67
68
|
invoices: invoicesRouter,
|
|
69
|
+
files: filesRouter,
|
|
68
70
|
});
|
|
@@ -1665,16 +1665,448 @@ export declare const organizationsRouter: {
|
|
|
1665
1665
|
}>;
|
|
1666
1666
|
};
|
|
1667
1667
|
};
|
|
1668
|
-
|
|
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;
|
|
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;AAqBxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwK9B,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { initContract } from '@ts-rest/core';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { createOrganizationSchema, updateOrganizationSchema, 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/files.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:
|
|
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:
|
|
101
|
+
pathParams: z.object({ organizationId: z.string().uuid() }),
|
|
85
102
|
body: z.object({ data: createBankAccountSchema }),
|
|
86
103
|
responses: {
|
|
87
104
|
201: bankAccountResponseSchema,
|