@deepintel-ltd/farmpro-contracts 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routes/admin.routes.d.ts +438 -0
- package/dist/routes/admin.routes.d.ts.map +1 -1
- package/dist/routes/admin.routes.js +26 -0
- package/dist/routes/commodity-deals.routes.d.ts +3641 -22
- package/dist/routes/commodity-deals.routes.d.ts.map +1 -1
- package/dist/routes/commodity-deals.routes.js +70 -1
- package/dist/routes/organizations.routes.d.ts +1753 -0
- package/dist/routes/organizations.routes.d.ts.map +1 -1
- package/dist/routes/organizations.routes.js +49 -1
- package/dist/schemas/commodity-deals.schemas.d.ts +662 -0
- package/dist/schemas/commodity-deals.schemas.d.ts.map +1 -1
- package/dist/schemas/commodity-deals.schemas.js +50 -0
- package/dist/schemas/organizations.schemas.d.ts +541 -0
- package/dist/schemas/organizations.schemas.d.ts.map +1 -1
- package/dist/schemas/organizations.schemas.js +38 -0
- package/package.json +1 -1
|
@@ -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;AAyBxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;CA4O9B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { createOrganizationSchema, updateOrganizationSchema, organizationResponseSchema, organizationListResponseSchema, createBankAccountSchema, updateBankAccountSchema, bankAccountResponseSchema, bankAccountListResponseSchema, } from '../schemas/organizations.schemas';
|
|
3
|
+
import { createOrganizationSchema, updateOrganizationSchema, organizationResponseSchema, organizationListResponseSchema, createBankAccountSchema, updateBankAccountSchema, bankAccountResponseSchema, bankAccountListResponseSchema, createOrganizationContactSchema, updateOrganizationContactSchema, organizationContactResponseSchema, organizationContactListResponseSchema, } from '../schemas/organizations.schemas';
|
|
4
4
|
import { jsonApiErrorResponseSchema, idParamSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, } from '../schemas/common.schemas';
|
|
5
5
|
import { uploadFileBodySchema } from '../schemas/files.schemas';
|
|
6
6
|
const c = initContract();
|
|
@@ -93,6 +93,54 @@ export const organizationsRouter = c.router({
|
|
|
93
93
|
description: 'Stream or download an organization logo by its ID. Extension is optional - both /organizations/{id}/logo and /organizations/{id}/logo.{ext} work for the same file. Requires authentication and validates that the requesting user has permission to access the organization.',
|
|
94
94
|
},
|
|
95
95
|
// ============================================================================
|
|
96
|
+
// Organization Contact Routes
|
|
97
|
+
// ============================================================================
|
|
98
|
+
listOrganizationContacts: {
|
|
99
|
+
method: 'GET',
|
|
100
|
+
path: '/organizations/:id/contacts',
|
|
101
|
+
pathParams: idParamSchema,
|
|
102
|
+
responses: {
|
|
103
|
+
200: organizationContactListResponseSchema,
|
|
104
|
+
401: jsonApiErrorResponseSchema,
|
|
105
|
+
404: jsonApiErrorResponseSchema,
|
|
106
|
+
},
|
|
107
|
+
summary: 'List organization contacts',
|
|
108
|
+
description: 'List contact persons for an organization, including investor/admin role',
|
|
109
|
+
},
|
|
110
|
+
addOrganizationContact: {
|
|
111
|
+
method: 'POST',
|
|
112
|
+
path: '/organizations/:id/contacts',
|
|
113
|
+
pathParams: idParamSchema,
|
|
114
|
+
body: z.object({ data: createOrganizationContactSchema }),
|
|
115
|
+
responses: {
|
|
116
|
+
201: organizationContactResponseSchema,
|
|
117
|
+
400: jsonApiErrorResponseSchema,
|
|
118
|
+
401: jsonApiErrorResponseSchema,
|
|
119
|
+
403: jsonApiErrorResponseSchema,
|
|
120
|
+
404: jsonApiErrorResponseSchema,
|
|
121
|
+
422: jsonApiErrorResponseSchema,
|
|
122
|
+
},
|
|
123
|
+
summary: 'Add an organization contact',
|
|
124
|
+
description: 'Attach an existing user as an org contact with role admin or investor',
|
|
125
|
+
},
|
|
126
|
+
updateOrganizationContact: {
|
|
127
|
+
method: 'PATCH',
|
|
128
|
+
path: '/organizations/:id/contacts/:contactId',
|
|
129
|
+
pathParams: idParamSchema.extend({
|
|
130
|
+
contactId: z.string().uuid(),
|
|
131
|
+
}),
|
|
132
|
+
body: z.object({ data: updateOrganizationContactSchema }),
|
|
133
|
+
responses: {
|
|
134
|
+
200: organizationContactResponseSchema,
|
|
135
|
+
400: jsonApiErrorResponseSchema,
|
|
136
|
+
401: jsonApiErrorResponseSchema,
|
|
137
|
+
403: jsonApiErrorResponseSchema,
|
|
138
|
+
404: jsonApiErrorResponseSchema,
|
|
139
|
+
422: jsonApiErrorResponseSchema,
|
|
140
|
+
},
|
|
141
|
+
summary: 'Update organization contact role',
|
|
142
|
+
},
|
|
143
|
+
// ============================================================================
|
|
96
144
|
// Bank Account Routes
|
|
97
145
|
// ============================================================================
|
|
98
146
|
// List all bank accounts for an organization
|