@dalmore/api-contracts 0.0.0-dev.d8ef117 → 0.0.0-dev.e325dbb

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 (194) hide show
  1. package/README.md +23 -19
  2. package/common/types/account-contact.types.ts +2 -1
  3. package/common/types/account-manager.types.ts +3 -7
  4. package/common/types/account-setting.types.ts +65 -0
  5. package/common/types/account.types.ts +1 -0
  6. package/common/types/auth.types.ts +7 -18
  7. package/common/types/bonus-tier.types.ts +9 -0
  8. package/common/types/common.types.ts +38 -6
  9. package/common/types/contact-us.types.ts +6 -2
  10. package/common/types/covered-person.types.ts +2 -1
  11. package/common/types/dashboard.types.ts +2 -9
  12. package/common/types/escrow-account.types.ts +3 -3
  13. package/common/types/individuals.types.ts +3 -2
  14. package/common/types/investor-account.types.ts +2 -1
  15. package/common/types/invite.types.ts +27 -1
  16. package/common/types/issuer-offering.types.ts +11 -17
  17. package/common/types/legal-entity.types.ts +3 -2
  18. package/common/types/mail-template.types.ts +34 -0
  19. package/common/types/note.types.ts +1 -1
  20. package/common/types/notification.types.ts +515 -29
  21. package/common/types/offering.types.ts +2 -9
  22. package/common/types/site-settings.types.ts +2 -1
  23. package/common/types/site.types.ts +2 -9
  24. package/common/types/{trade-line-item.type.ts → trade-line-item.types.ts} +2 -9
  25. package/common/types/trade.types.ts +48 -2
  26. package/common/types/trusted-contact.types.ts +7 -7
  27. package/common/types/user.types.ts +11 -32
  28. package/contracts/clients/trade-line-items/index.ts +1 -1
  29. package/contracts/clients/trades/index.ts +1 -1
  30. package/index.ts +10 -0
  31. package/package.json +23 -32
  32. package/contracts/compliance/account-contacts/index.ts +0 -82
  33. package/contracts/compliance/account-managers/index.ts +0 -142
  34. package/contracts/compliance/accounts/index.ts +0 -187
  35. package/contracts/compliance/activities/index.ts +0 -55
  36. package/contracts/compliance/aic/index.ts +0 -60
  37. package/contracts/compliance/api-keys/index.ts +0 -91
  38. package/contracts/compliance/assets/index.ts +0 -122
  39. package/contracts/compliance/auth/index.ts +0 -134
  40. package/contracts/compliance/batch-jobs/index.ts +0 -62
  41. package/contracts/compliance/bonus-tiers/index.ts +0 -74
  42. package/contracts/compliance/checklist/index.ts +0 -87
  43. package/contracts/compliance/checklist-items/index.ts +0 -86
  44. package/contracts/compliance/covered-persons/index.ts +0 -97
  45. package/contracts/compliance/dashboard/index.ts +0 -111
  46. package/contracts/compliance/data-records/index.ts +0 -116
  47. package/contracts/compliance/data-rooms/index.ts +0 -113
  48. package/contracts/compliance/default-theme-configs/index.ts +0 -95
  49. package/contracts/compliance/disbursement/index.ts +0 -165
  50. package/contracts/compliance/disbursement-approval-users/index.ts +0 -84
  51. package/contracts/compliance/disbursement-transactions/index.ts +0 -37
  52. package/contracts/compliance/domain-filters/index.ts +0 -117
  53. package/contracts/compliance/email-themes/index.ts +0 -284
  54. package/contracts/compliance/escrow-accounts/index.ts +0 -85
  55. package/contracts/compliance/exchange-api-keys/index.ts +0 -129
  56. package/contracts/compliance/exchange-imports/index.ts +0 -137
  57. package/contracts/compliance/files/index.ts +0 -267
  58. package/contracts/compliance/files-public/index.ts +0 -188
  59. package/contracts/compliance/health/index.ts +0 -26
  60. package/contracts/compliance/index.ts +0 -147
  61. package/contracts/compliance/individuals/index.ts +0 -57
  62. package/contracts/compliance/investor-accounts/index.ts +0 -141
  63. package/contracts/compliance/invites/index.ts +0 -137
  64. package/contracts/compliance/issuer-bank-accounts/index.ts +0 -81
  65. package/contracts/compliance/issuer-payment-methods/index.ts +0 -81
  66. package/contracts/compliance/issuers/index.ts +0 -97
  67. package/contracts/compliance/job-items/index.ts +0 -58
  68. package/contracts/compliance/jobs/index.ts +0 -59
  69. package/contracts/compliance/kyb/index.ts +0 -54
  70. package/contracts/compliance/kyc/index.ts +0 -77
  71. package/contracts/compliance/legal-entities/index.ts +0 -57
  72. package/contracts/compliance/login-histories/index.ts +0 -37
  73. package/contracts/compliance/notes/index.ts +0 -69
  74. package/contracts/compliance/notion-databases/index.ts +0 -107
  75. package/contracts/compliance/notion-pages/index.ts +0 -105
  76. package/contracts/compliance/offering-reports/index.ts +0 -149
  77. package/contracts/compliance/offerings/index.ts +0 -233
  78. package/contracts/compliance/pages/index.ts +0 -178
  79. package/contracts/compliance/payment-methods/index.ts +0 -57
  80. package/contracts/compliance/rejection-reasons/index.ts +0 -32
  81. package/contracts/compliance/review/index.ts +0 -169
  82. package/contracts/compliance/roles/index.ts +0 -34
  83. package/contracts/compliance/secondary-customers/index.ts +0 -77
  84. package/contracts/compliance/secondary-orders/index.ts +0 -60
  85. package/contracts/compliance/secondary-trades/index.ts +0 -100
  86. package/contracts/compliance/secure-requests/index.ts +0 -54
  87. package/contracts/compliance/signer/index.ts +0 -369
  88. package/contracts/compliance/site-links/index.ts +0 -128
  89. package/contracts/compliance/site-settings/index.ts +0 -669
  90. package/contracts/compliance/sites/index.ts +0 -56
  91. package/contracts/compliance/state-machine/index.ts +0 -94
  92. package/contracts/compliance/tasks/index.ts +0 -91
  93. package/contracts/compliance/third-parties/index.ts +0 -52
  94. package/contracts/compliance/trade-line-items/index.ts +0 -59
  95. package/contracts/compliance/trades/index.ts +0 -230
  96. package/contracts/compliance/transactions/index.ts +0 -161
  97. package/contracts/compliance/user-manuals/index.ts +0 -271
  98. package/contracts/compliance/user-settings/index.ts +0 -189
  99. package/contracts/compliance/users/index.ts +0 -221
  100. package/contracts/compliance/webhooks/index.ts +0 -41
  101. package/contracts/compliance-apikey/accounts/index.ts +0 -58
  102. package/contracts/compliance-apikey/index.ts +0 -14
  103. package/contracts/index.ts +0 -6
  104. package/contracts/investors/account-contacts/index.ts +0 -58
  105. package/contracts/investors/aic/index.ts +0 -59
  106. package/contracts/investors/assets/index.ts +0 -61
  107. package/contracts/investors/auth/index.ts +0 -116
  108. package/contracts/investors/bonus-tiers/index.ts +0 -55
  109. package/contracts/investors/cart/index.ts +0 -75
  110. package/contracts/investors/contact-us/index.ts +0 -48
  111. package/contracts/investors/data-records/index.ts +0 -113
  112. package/contracts/investors/data-rooms/index.ts +0 -96
  113. package/contracts/investors/files/index.ts +0 -167
  114. package/contracts/investors/files-public/index.ts +0 -185
  115. package/contracts/investors/index.ts +0 -72
  116. package/contracts/investors/individuals/index.ts +0 -121
  117. package/contracts/investors/investor-accounts/index.ts +0 -110
  118. package/contracts/investors/issuer-payment-methods/index.ts +0 -36
  119. package/contracts/investors/issuers/index.ts +0 -30
  120. package/contracts/investors/legal-entities/index.ts +0 -93
  121. package/contracts/investors/notes/index.ts +0 -69
  122. package/contracts/investors/offerings/index.ts +0 -93
  123. package/contracts/investors/pages/index.ts +0 -88
  124. package/contracts/investors/payment-methods/index.ts +0 -149
  125. package/contracts/investors/portfolios/index.ts +0 -53
  126. package/contracts/investors/sites/index.ts +0 -96
  127. package/contracts/investors/tasks/index.ts +0 -111
  128. package/contracts/investors/trade-line-items/index.ts +0 -75
  129. package/contracts/investors/trades/index.ts +0 -114
  130. package/contracts/investors/transactions/index.ts +0 -37
  131. package/contracts/investors/trusted-contacts/index.ts +0 -93
  132. package/contracts/investors/user-manuals/index.ts +0 -62
  133. package/contracts/investors/user-settings/index.ts +0 -170
  134. package/contracts/investors/users/index.ts +0 -45
  135. package/contracts/investors/webhooks/index.ts +0 -30
  136. package/contracts/issuers/account-contacts/index.ts +0 -76
  137. package/contracts/issuers/account-integrations/index.ts +0 -97
  138. package/contracts/issuers/accounts/index.ts +0 -97
  139. package/contracts/issuers/activities/index.ts +0 -54
  140. package/contracts/issuers/aic/index.ts +0 -39
  141. package/contracts/issuers/api-key-logs/index.ts +0 -53
  142. package/contracts/issuers/api-keys/index.ts +0 -93
  143. package/contracts/issuers/assets/index.ts +0 -122
  144. package/contracts/issuers/auth/index.ts +0 -152
  145. package/contracts/issuers/bonus-tiers/index.ts +0 -73
  146. package/contracts/issuers/contact-us/index.ts +0 -48
  147. package/contracts/issuers/covered-persons/index.ts +0 -136
  148. package/contracts/issuers/dashboard/index.ts +0 -72
  149. package/contracts/issuers/data-records/index.ts +0 -257
  150. package/contracts/issuers/data-rooms/index.ts +0 -134
  151. package/contracts/issuers/disbursement-approval-users/index.ts +0 -82
  152. package/contracts/issuers/disbursement-transactions/index.ts +0 -53
  153. package/contracts/issuers/disbursements/index.ts +0 -189
  154. package/contracts/issuers/email-themes/index.ts +0 -242
  155. package/contracts/issuers/escrow-accounts/index.ts +0 -81
  156. package/contracts/issuers/exchange-api-keys/index.ts +0 -144
  157. package/contracts/issuers/files/index.ts +0 -166
  158. package/contracts/issuers/files-public/index.ts +0 -166
  159. package/contracts/issuers/health/index.ts +0 -24
  160. package/contracts/issuers/index.ts +0 -112
  161. package/contracts/issuers/investor-accounts/index.ts +0 -148
  162. package/contracts/issuers/invites/index.ts +0 -129
  163. package/contracts/issuers/issuer/index.ts +0 -94
  164. package/contracts/issuers/issuer-bank-accounts/index.ts +0 -81
  165. package/contracts/issuers/issuer-payment-methods/index.ts +0 -136
  166. package/contracts/issuers/kyc/index.ts +0 -38
  167. package/contracts/issuers/login-histories/index.ts +0 -51
  168. package/contracts/issuers/notes/index.ts +0 -69
  169. package/contracts/issuers/offerings/index.ts +0 -206
  170. package/contracts/issuers/pages/index.ts +0 -138
  171. package/contracts/issuers/payment-methods/index.ts +0 -61
  172. package/contracts/issuers/portfolios/index.ts +0 -36
  173. package/contracts/issuers/rejection-reasons/index.ts +0 -32
  174. package/contracts/issuers/review/index.ts +0 -63
  175. package/contracts/issuers/secondary-customers/index.ts +0 -55
  176. package/contracts/issuers/secondary-orders/index.ts +0 -57
  177. package/contracts/issuers/secondary-trades/index.ts +0 -57
  178. package/contracts/issuers/secure-requests/index.ts +0 -34
  179. package/contracts/issuers/site-links/index.ts +0 -116
  180. package/contracts/issuers/site-settings/index.ts +0 -585
  181. package/contracts/issuers/sites/index.ts +0 -32
  182. package/contracts/issuers/tasks/index.ts +0 -111
  183. package/contracts/issuers/trades/index.ts +0 -132
  184. package/contracts/issuers/transactions/index.ts +0 -158
  185. package/contracts/issuers/user-manuals/index.ts +0 -62
  186. package/contracts/issuers/user-settings/index.ts +0 -170
  187. package/contracts/issuers/users/index.ts +0 -126
  188. package/contracts/secondaries/accounts/index.ts +0 -58
  189. package/contracts/secondaries/index.ts +0 -23
  190. package/contracts/secondaries/secondary-customers/index.ts +0 -55
  191. package/contracts/secondaries/secondary-issuers/index.ts +0 -94
  192. package/contracts/secondaries/secondary-orders/index.ts +0 -56
  193. package/contracts/secondaries/secondary-securities/index.ts +0 -95
  194. package/contracts/secondaries/secondary-trades/index.ts +0 -56
@@ -1,267 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- accountIdSchema,
4
- BadGateWayError,
5
- BadRequestError,
6
- ComplianceFilesIncludeQuery,
7
- fileIdSchema,
8
- FilePipeLineReviewSchemaZod,
9
- FileZod,
10
- ForbiddenError,
11
- InternalError,
12
- IPaginatedFile,
13
- LinkFileZod,
14
- NotFoundError,
15
- PaginationOptionsZod,
16
- PatchFile,
17
- PatchFileMetadata,
18
- PostFileQueryParams,
19
- ReprocessAllFilesZod,
20
- UnauthorizedError,
21
- UnprocessableError,
22
- } from '../../../common/types';
23
- import { z } from 'zod';
24
- import { authHeader, generateApiDescription } from '../../../common/helpers';
25
-
26
- const c = initContract();
27
-
28
- export const filesContract = c.router(
29
- {
30
- postFile: {
31
- summary: 'Upload a file',
32
- description: generateApiDescription(
33
- 'Upload a file to the system.',
34
- 'POST',
35
- '/files',
36
- {
37
- query: {
38
- name: 'test',
39
- category: 'application',
40
- targetId: 'trade_01j5tkg6k2fygr0x06fegt27aj',
41
- accountId: 'account_01j5tkg6k2fygr0x06fegt27aj',
42
- },
43
- headers: authHeader,
44
- formData: { file: '@"/Users/local/Desktop/test.csv"' },
45
- },
46
- ),
47
- method: 'POST',
48
- path: '',
49
- query: PostFileQueryParams.merge(
50
- z.object({ accountId: accountIdSchema }),
51
- ),
52
- contentType: 'multipart/form-data',
53
- body: c.type<{ file: File }>(),
54
- metadata: {
55
- auth: true,
56
- },
57
- responses: {
58
- 201: FileZod,
59
- 400: BadRequestError,
60
- 401: UnauthorizedError,
61
- 422: UnprocessableError,
62
- 500: InternalError,
63
- 502: BadGateWayError,
64
- },
65
- },
66
- linkFile: {
67
- summary: 'Links a file to a new resource',
68
- method: 'POST',
69
- path: '/:id/link',
70
- pathParams: z.object({
71
- id: fileIdSchema,
72
- }),
73
- body: LinkFileZod,
74
- metadata: {
75
- auth: true,
76
- },
77
- responses: {
78
- 201: FileZod,
79
- 400: BadRequestError,
80
- 401: UnauthorizedError,
81
- 422: UnprocessableError,
82
- 500: InternalError,
83
- 502: BadGateWayError,
84
- },
85
- },
86
- unlinkFile: {
87
- summary: 'Unlinks a file to the parent resource',
88
- method: 'POST',
89
- path: '/:id/unlink',
90
- pathParams: z.object({
91
- id: fileIdSchema,
92
- }),
93
- body: z.object({}),
94
- metadata: {
95
- auth: true,
96
- },
97
- responses: {
98
- 202: FileZod,
99
- 400: BadRequestError,
100
- 401: UnauthorizedError,
101
- 422: UnprocessableError,
102
- 500: InternalError,
103
- 502: BadGateWayError,
104
- },
105
- },
106
- getFiles: {
107
- summary: 'Get files',
108
- method: 'GET',
109
- path: '',
110
- metadata: {
111
- auth: true,
112
- },
113
- query: PaginationOptionsZod.merge(ComplianceFilesIncludeQuery),
114
- responses: {
115
- 200: IPaginatedFile,
116
- 401: UnauthorizedError,
117
- },
118
- },
119
- getFile: {
120
- summary: 'Get file by id',
121
- method: 'GET',
122
- path: '/:id',
123
- metadata: {
124
- auth: true,
125
- },
126
- pathParams: z.object({
127
- id: fileIdSchema,
128
- }),
129
- responses: {
130
- 200: FileZod,
131
- 401: UnauthorizedError,
132
- 404: NotFoundError,
133
- },
134
- },
135
- patchFile: {
136
- summary: 'Update file by id',
137
- method: 'PATCH',
138
- path: '/:id',
139
- metadata: {
140
- auth: true,
141
- },
142
- pathParams: z.object({
143
- id: fileIdSchema,
144
- }),
145
- body: PatchFile,
146
- responses: {
147
- 201: FileZod,
148
- 400: BadRequestError,
149
- 401: UnauthorizedError,
150
- 404: NotFoundError,
151
- 500: InternalError,
152
- },
153
- },
154
- patchFileMetadata: {
155
- summary: 'Patch file metadata',
156
- method: 'PATCH',
157
- path: '/:id/metadata',
158
- metadata: {
159
- auth: true,
160
- },
161
- pathParams: z.object({
162
- id: fileIdSchema,
163
- }),
164
- body: PatchFileMetadata,
165
- responses: {
166
- 201: z.object({ success: z.boolean() }),
167
- 400: BadRequestError,
168
- 401: UnauthorizedError,
169
- 403: ForbiddenError,
170
- 404: NotFoundError,
171
- 500: InternalError,
172
- },
173
- },
174
- previewFile: {
175
- summary: 'Preview (stream) a file by id',
176
- method: 'GET',
177
- path: '/preview/:id',
178
- metadata: {
179
- auth: true,
180
- },
181
- pathParams: z.object({
182
- id: fileIdSchema,
183
- }),
184
- responses: {
185
- 200: z.unknown(),
186
- 401: UnauthorizedError,
187
- 404: NotFoundError,
188
- },
189
- },
190
- processFile: {
191
- summary: 'Process a file',
192
- method: 'POST',
193
- path: '/:id/process',
194
- metadata: {
195
- auth: true,
196
- },
197
- pathParams: z.object({
198
- id: fileIdSchema,
199
- }),
200
- body: z.object({}),
201
- responses: {
202
- 201: z.object({ success: z.boolean() }),
203
- 400: BadRequestError,
204
- 401: UnauthorizedError,
205
- 404: NotFoundError,
206
- 500: InternalError,
207
- },
208
- },
209
- reprocessFile: {
210
- summary: 'Reprocess a file',
211
- method: 'POST',
212
- path: '/:id/reprocess',
213
- metadata: {
214
- auth: true,
215
- },
216
- pathParams: z.object({
217
- id: fileIdSchema,
218
- }),
219
- body: z.object({}),
220
- responses: {
221
- 200: z.object({ success: z.boolean() }),
222
- 400: BadRequestError,
223
- 401: UnauthorizedError,
224
- 404: NotFoundError,
225
- 500: InternalError,
226
- },
227
- },
228
- reprocessAllFiles: {
229
- summary: 'Reprocess all files',
230
- method: 'POST',
231
- path: '/reprocess/all',
232
- metadata: {
233
- auth: true,
234
- },
235
- body: z.object({}),
236
- responses: {
237
- 201: ReprocessAllFilesZod,
238
- 400: BadRequestError,
239
- 401: UnauthorizedError,
240
- 404: NotFoundError,
241
- 500: InternalError,
242
- },
243
- },
244
- filePipeLineReview: {
245
- summary: 'File pipe line review',
246
- method: 'POST',
247
- path: '/:id/pipeline-review',
248
- metadata: {
249
- auth: true,
250
- },
251
- pathParams: z.object({
252
- id: fileIdSchema,
253
- }),
254
- body: FilePipeLineReviewSchemaZod,
255
- responses: {
256
- 200: z.object({ success: z.boolean() }),
257
- 400: BadRequestError,
258
- 401: UnauthorizedError,
259
- 404: NotFoundError,
260
- 500: InternalError,
261
- },
262
- },
263
- },
264
- {
265
- pathPrefix: 'files',
266
- },
267
- );
@@ -1,188 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- accountIdSchema,
4
- BadGateWayError,
5
- BadRequestError,
6
- fileIdSchema,
7
- FilesIncludeQuery,
8
- FileZod,
9
- ForbiddenError,
10
- InternalError,
11
- IPaginatedFile,
12
- LinkFileZod,
13
- NotFoundError,
14
- PaginationOptionsZod,
15
- PatchFile,
16
- PostFileQueryParams,
17
- reviewFiles,
18
- UnauthorizedError,
19
- UnprocessableError,
20
- } from '../../../common/types';
21
- import { z } from 'zod';
22
- import { authHeader, generateApiDescription } from '../../../common/helpers';
23
-
24
- const c = initContract();
25
-
26
- export const filesPublicContract = c.router(
27
- {
28
- postFilePublic: {
29
- summary: 'Upload a public file',
30
- description: generateApiDescription(
31
- 'Upload a public file to the system.',
32
- 'POST',
33
- '/files-public',
34
- {
35
- query: {
36
- name: 'test',
37
- category: 'application',
38
- targetId: 'trade_01j5tkg6k2fygr0x06fegt27aj',
39
- accountId: 'account_01j5tkg6k2fygr0x06fegt27aj',
40
- },
41
- headers: authHeader,
42
- formData: { file: '@"/Users/local/Desktop/test.csv"' },
43
- },
44
- ),
45
- method: 'POST',
46
- path: '',
47
- query: PostFileQueryParams.merge(
48
- z.object({ accountId: accountIdSchema }),
49
- ),
50
- contentType: 'multipart/form-data',
51
- body: c.type<{ file: File }>(),
52
- metadata: {
53
- auth: true,
54
- },
55
- responses: {
56
- 201: FileZod,
57
- 400: BadRequestError,
58
- 401: UnauthorizedError,
59
- 422: UnprocessableError,
60
- 500: InternalError,
61
- 502: BadGateWayError,
62
- },
63
- },
64
- linkFilePublic: {
65
- summary: 'Links a public file to a new resource',
66
- method: 'POST',
67
- path: '/:id/link',
68
- pathParams: z.object({
69
- id: fileIdSchema,
70
- }),
71
- body: LinkFileZod,
72
- metadata: {
73
- auth: true,
74
- },
75
- responses: {
76
- 201: FileZod,
77
- 400: BadRequestError,
78
- 401: UnauthorizedError,
79
- 422: UnprocessableError,
80
- 500: InternalError,
81
- 502: BadGateWayError,
82
- },
83
- },
84
- unlinkFilePublic: {
85
- summary: 'Unlinks a public file to the parent resource',
86
- method: 'POST',
87
- path: '/:id/unlink',
88
- pathParams: z.object({
89
- id: fileIdSchema,
90
- }),
91
- body: z.object({}),
92
- metadata: {
93
- auth: true,
94
- },
95
- responses: {
96
- 202: FileZod,
97
- 400: BadRequestError,
98
- 401: UnauthorizedError,
99
- 422: UnprocessableError,
100
- 500: InternalError,
101
- 502: BadGateWayError,
102
- },
103
- },
104
- getFilesPublic: {
105
- summary: 'Get public files',
106
- method: 'GET',
107
- path: '',
108
- metadata: {
109
- auth: true,
110
- },
111
- query: PaginationOptionsZod.merge(FilesIncludeQuery),
112
- responses: {
113
- 200: IPaginatedFile,
114
- 401: UnauthorizedError,
115
- },
116
- },
117
- getFilePublic: {
118
- summary: 'Get public file by id',
119
- method: 'GET',
120
- path: '/:id',
121
- metadata: {
122
- auth: true,
123
- },
124
- pathParams: z.object({
125
- id: fileIdSchema,
126
- }),
127
- responses: {
128
- 200: FileZod,
129
- 401: UnauthorizedError,
130
- 404: NotFoundError,
131
- },
132
- },
133
- patchFilePublic: {
134
- summary: 'Update public file by id',
135
- method: 'PATCH',
136
- path: '/:id',
137
- metadata: {
138
- auth: true,
139
- },
140
- pathParams: z.object({
141
- id: fileIdSchema,
142
- }),
143
- body: PatchFile,
144
- responses: {
145
- 201: FileZod,
146
- 400: BadRequestError,
147
- 401: UnauthorizedError,
148
- 404: NotFoundError,
149
- 500: InternalError,
150
- },
151
- },
152
- previewFilePublic: {
153
- summary: 'Preview (stream) a public file by id',
154
- method: 'GET',
155
- path: '/preview/:id',
156
- metadata: {
157
- auth: true,
158
- },
159
- pathParams: z.object({
160
- id: fileIdSchema,
161
- }),
162
- responses: {
163
- 200: z.unknown(),
164
- 401: UnauthorizedError,
165
- 404: NotFoundError,
166
- },
167
- },
168
- reviewPublicFiles: {
169
- summary: 'Review public files',
170
- method: 'POST',
171
- path: '/review',
172
- metadata: {
173
- auth: true,
174
- },
175
- body: reviewFiles,
176
- responses: {
177
- 201: z.object({ success: z.boolean() }),
178
- 401: UnauthorizedError,
179
- 403: ForbiddenError,
180
- 404: NotFoundError,
181
- 500: InternalError,
182
- },
183
- },
184
- },
185
- {
186
- pathPrefix: 'files-public',
187
- },
188
- );
@@ -1,26 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import { InternalError } from '../../../common/types';
3
- import {
4
- HealthCheckResponseSchema,
5
- HealthErrorSchema,
6
- } from '../../../common/types/health.types';
7
-
8
- const c = initContract();
9
-
10
- export const healthContract = c.router(
11
- {
12
- getHealth: {
13
- summary: 'Health Check',
14
- method: 'GET',
15
- path: '',
16
- responses: {
17
- 200: HealthCheckResponseSchema,
18
- 500: InternalError,
19
- 503: HealthErrorSchema,
20
- },
21
- },
22
- },
23
- {
24
- pathPrefix: 'health/',
25
- },
26
- );
@@ -1,147 +0,0 @@
1
- import { accountsContract } from './accounts';
2
- import { accountContactsContract } from './account-contacts';
3
- import { accountManagersContract } from './account-managers';
4
- import { activitiesContract } from './activities';
5
- import { apiKeysContract } from './api-keys';
6
- import { assetsContract } from './assets';
7
- import { authContract } from './auth';
8
- import { checkListContract } from './checklist';
9
- import { checkListItemsContract } from './checklist-items';
10
- import { coveredPersonsContract } from './covered-persons';
11
- import { dashboardContract } from './dashboard';
12
- import { dataRecordsContract } from './data-records';
13
- import { dataRoomsContract } from './data-rooms';
14
- import { disbursementApprovalUsersContract } from './disbursement-approval-users';
15
- import { disbursementContract } from './disbursement';
16
- import { disbursementTransactionsContract } from './disbursement-transactions';
17
- import { emailThemesContract } from './email-themes';
18
- import { escrowAccountsContract } from './escrow-accounts';
19
- import { filesContract } from './files';
20
- import { filesPublicContract } from './files-public';
21
- import { individualsContract } from './individuals';
22
- import { initContract } from '@ts-rest/core';
23
- import { investorAccountsContract } from './investor-accounts';
24
- import { invitesContract } from './invites';
25
- import { issuerBankAccountsContract } from './issuer-bank-accounts';
26
- import { issuerPaymentMethodsContract } from './issuer-payment-methods';
27
- import { issuersContract } from './issuers';
28
- import { jobsContract } from './jobs';
29
- import { kybsContract } from './kyb';
30
- import { kycsContract } from './kyc';
31
- import { legalEntitiesContract } from './legal-entities';
32
- import { loginHistoriesContract } from './login-histories';
33
- import { notesContract } from './notes';
34
- import { offeringsContract } from './offerings';
35
- import { pagesContract } from './pages';
36
- import { paymentMethodsContract } from './payment-methods';
37
- import { rejectionReasonsContract } from './rejection-reasons';
38
- import { reviewContract } from './review';
39
- import { rolesContract } from './roles';
40
- import { secureRequestContract } from './secure-requests';
41
- import { siteLinksContract } from './site-links';
42
- import { sitesContract } from './sites';
43
- import { siteSettingsContract } from './site-settings';
44
- import { tasksContract } from './tasks';
45
- import { thirdPartiesContract } from './third-parties';
46
- import { tradeLineItemsContract } from './trade-line-items';
47
- import { tradesContract } from './trades';
48
- import { transactionsContract } from './transactions';
49
- import { userManualsContract } from './user-manuals';
50
- import { usersContract } from './users';
51
- import { userSettingsContract } from './user-settings';
52
- import { webhooksContract } from './webhooks';
53
- import { domainFiltersContract } from './domain-filters';
54
- import { healthContract } from './health';
55
- import { signerContract } from './signer';
56
- import { secondaryCustomersContract } from './secondary-customers';
57
- import { secondaryOrdersContract } from './secondary-orders';
58
- import { batchJobsContract } from './batch-jobs';
59
- import { jobItemsContract } from './job-items';
60
- import { exchangeImportsContract } from './exchange-imports';
61
- import { secondaryTradesContract } from './secondary-trades';
62
- import { exchangeApiKeysContract } from './exchange-api-keys';
63
- import { notionDatabasesContract } from './notion-databases';
64
- import { notionPagesContract } from './notion-pages';
65
- import { defaultThemeConfigsContract } from './default-theme-configs';
66
- import { aicContract } from './aic';
67
- import { stateMachineContract } from './state-machine';
68
- import { offeringReportsContract } from './offering-reports';
69
- import { bonusTiersContract } from './bonus-tiers';
70
-
71
- const c = initContract();
72
-
73
- export const complianceContract = c.router(
74
- {
75
- accounts: accountsContract,
76
- accountContacts: accountContactsContract,
77
- accountManagers: accountManagersContract,
78
- activities: activitiesContract,
79
- apiKeys: apiKeysContract,
80
- assets: assetsContract,
81
- auth: authContract,
82
- aic: aicContract,
83
- batchJobs: batchJobsContract,
84
- bonusTiers: bonusTiersContract,
85
- checklist: checkListContract,
86
- checklistItems: checkListItemsContract,
87
- coveredPersons: coveredPersonsContract,
88
- dashboard: dashboardContract,
89
- dataRecords: dataRecordsContract,
90
- dataRooms: dataRoomsContract,
91
- defaultThemeConfigs: defaultThemeConfigsContract,
92
- disbursementApprovalUsers: disbursementApprovalUsersContract,
93
- disbursements: disbursementContract,
94
- disbursementTransactions: disbursementTransactionsContract,
95
- domainFilters: domainFiltersContract,
96
- emailThemes: emailThemesContract,
97
- escrowAccounts: escrowAccountsContract,
98
- exchangeApiKeys: exchangeApiKeysContract,
99
- exchangeImports: exchangeImportsContract,
100
- files: filesContract,
101
- filesPublic: filesPublicContract,
102
- health: healthContract,
103
- individuals: individualsContract,
104
- investorAccounts: investorAccountsContract,
105
- invites: invitesContract,
106
- issuerBankAccounts: issuerBankAccountsContract,
107
- issuerPaymentMethods: issuerPaymentMethodsContract,
108
- issuers: issuersContract,
109
- jobs: jobsContract,
110
- kybs: kybsContract,
111
- kycs: kycsContract,
112
- legalEntities: legalEntitiesContract,
113
- loginHistories: loginHistoriesContract,
114
- notes: notesContract,
115
- offerings: offeringsContract,
116
- pages: pagesContract,
117
- paymentMethods: paymentMethodsContract,
118
- review: reviewContract,
119
- roles: rolesContract,
120
- rejectionReasons: rejectionReasonsContract,
121
- secondaryCustomers: secondaryCustomersContract,
122
- secondaryOrders: secondaryOrdersContract,
123
- secondaryTrades: secondaryTradesContract,
124
- secureRequests: secureRequestContract,
125
- stateMachine: stateMachineContract,
126
- signer: signerContract,
127
- siteLinks: siteLinksContract,
128
- sites: sitesContract,
129
- siteSettings: siteSettingsContract,
130
- tasks: tasksContract,
131
- thirdParties: thirdPartiesContract,
132
- trades: tradesContract,
133
- transactions: transactionsContract,
134
- tradeLineItems: tradeLineItemsContract,
135
- userManuals: userManualsContract,
136
- users: usersContract,
137
- userSettings: userSettingsContract,
138
- webhooks: webhooksContract,
139
- jobItems: jobItemsContract,
140
- notionDatabases: notionDatabasesContract,
141
- notionPages: notionPagesContract,
142
- offeringReports: offeringReportsContract,
143
- },
144
- {
145
- pathPrefix: '/compliance/api/v1/',
146
- },
147
- );
@@ -1,57 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- IPaginatedIndividual,
5
- NotFoundError,
6
- PaginationOptionsZod,
7
- UnauthorizedError,
8
- ComplianceIndividualFiltersZod,
9
- IndividualsIncludeQuery,
10
- IIndividualZod,
11
- individualIdSchema,
12
- } from '../../../common/types';
13
- import { z } from 'zod';
14
-
15
- const c = initContract();
16
-
17
- export const individualsContract = c.router(
18
- {
19
- getIndividual: {
20
- summary: 'Get individual by id',
21
- method: 'GET',
22
- path: '/:id',
23
- metadata: {
24
- auth: true,
25
- },
26
- query: z.object({}).merge(IndividualsIncludeQuery),
27
- pathParams: z.object({
28
- id: individualIdSchema,
29
- }),
30
- responses: {
31
- 200: IIndividualZod,
32
- 401: UnauthorizedError,
33
- 403: ForbiddenError,
34
- 404: NotFoundError,
35
- },
36
- },
37
- getIndividuals: {
38
- summary: 'Get individuals',
39
- method: 'GET',
40
- path: '',
41
- metadata: {
42
- auth: true,
43
- },
44
- query: PaginationOptionsZod.merge(ComplianceIndividualFiltersZod).merge(
45
- IndividualsIncludeQuery,
46
- ),
47
- responses: {
48
- 200: IPaginatedIndividual,
49
- 401: UnauthorizedError,
50
- 403: ForbiddenError,
51
- },
52
- },
53
- },
54
- {
55
- pathPrefix: 'individuals',
56
- },
57
- );