@dalmore/api-contracts 0.0.0-dev.2dc8e92 → 0.0.0-dev.4bb6b7a

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 (206) 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/activity.types.ts +1 -1
  7. package/common/types/api-key-logs.types.ts +1 -1
  8. package/common/types/asset.types.ts +14 -14
  9. package/common/types/auth.types.ts +7 -18
  10. package/common/types/bonus-tier.types.ts +33 -0
  11. package/common/types/cart.types.ts +4 -1
  12. package/common/types/common.types.ts +38 -6
  13. package/common/types/contact-us.types.ts +6 -2
  14. package/common/types/covered-person.types.ts +2 -1
  15. package/common/types/dashboard.types.ts +2 -9
  16. package/common/types/disbursements.types.ts +119 -3
  17. package/common/types/escrow-account.types.ts +3 -3
  18. package/common/types/file.types.ts +20 -4
  19. package/common/types/i-will-do-it-later.types.ts +68 -0
  20. package/common/types/index.ts +2 -0
  21. package/common/types/individuals.types.ts +5 -17
  22. package/common/types/investor-account.types.ts +2 -1
  23. package/common/types/invite.types.ts +27 -1
  24. package/common/types/issuer-offering.types.ts +113 -30
  25. package/common/types/issuer-payment-method.types.ts +41 -0
  26. package/common/types/issuer.types.ts +9 -0
  27. package/common/types/legal-entity.types.ts +3 -2
  28. package/common/types/mail-template.types.ts +34 -0
  29. package/common/types/note.types.ts +1 -1
  30. package/common/types/notification.types.ts +525 -29
  31. package/common/types/offering.types.ts +106 -20
  32. package/common/types/site-settings.types.ts +2 -1
  33. package/common/types/site.types.ts +2 -9
  34. package/common/types/{trade-line-item.type.ts → trade-line-item.types.ts} +2 -9
  35. package/common/types/trade.types.ts +118 -2
  36. package/common/types/transaction.types.ts +12 -1
  37. package/common/types/trusted-contact.types.ts +7 -7
  38. package/common/types/user.types.ts +17 -33
  39. package/common/types/webhook.types.ts +142 -0
  40. package/contracts/{investors → clients}/cart/index.ts +11 -6
  41. package/contracts/clients/index.ts +10 -0
  42. package/contracts/{investors → clients}/issuer-payment-methods/index.ts +5 -2
  43. package/contracts/{compliance → clients}/payment-methods/index.ts +40 -12
  44. package/contracts/{investors → clients}/trade-line-items/index.ts +19 -28
  45. package/contracts/clients/trades/index.ts +65 -1
  46. package/contracts/{investors → clients}/transactions/index.ts +3 -3
  47. package/index.ts +10 -0
  48. package/package.json +23 -32
  49. package/contracts/compliance/account-contacts/index.ts +0 -82
  50. package/contracts/compliance/account-managers/index.ts +0 -142
  51. package/contracts/compliance/accounts/index.ts +0 -187
  52. package/contracts/compliance/activities/index.ts +0 -55
  53. package/contracts/compliance/aic/index.ts +0 -60
  54. package/contracts/compliance/api-keys/index.ts +0 -91
  55. package/contracts/compliance/assets/index.ts +0 -122
  56. package/contracts/compliance/auth/index.ts +0 -134
  57. package/contracts/compliance/batch-jobs/index.ts +0 -62
  58. package/contracts/compliance/bonus-tiers/index.ts +0 -55
  59. package/contracts/compliance/checklist/index.ts +0 -87
  60. package/contracts/compliance/checklist-items/index.ts +0 -86
  61. package/contracts/compliance/covered-persons/index.ts +0 -97
  62. package/contracts/compliance/dashboard/index.ts +0 -111
  63. package/contracts/compliance/data-records/index.ts +0 -116
  64. package/contracts/compliance/data-rooms/index.ts +0 -113
  65. package/contracts/compliance/default-theme-configs/index.ts +0 -95
  66. package/contracts/compliance/disbursement/index.ts +0 -165
  67. package/contracts/compliance/disbursement-approval-users/index.ts +0 -84
  68. package/contracts/compliance/disbursement-transactions/index.ts +0 -37
  69. package/contracts/compliance/domain-filters/index.ts +0 -117
  70. package/contracts/compliance/email-themes/index.ts +0 -284
  71. package/contracts/compliance/escrow-accounts/index.ts +0 -85
  72. package/contracts/compliance/exchange-api-keys/index.ts +0 -129
  73. package/contracts/compliance/exchange-imports/index.ts +0 -137
  74. package/contracts/compliance/files/index.ts +0 -267
  75. package/contracts/compliance/files-public/index.ts +0 -188
  76. package/contracts/compliance/health/index.ts +0 -26
  77. package/contracts/compliance/index.ts +0 -147
  78. package/contracts/compliance/individuals/index.ts +0 -57
  79. package/contracts/compliance/investor-accounts/index.ts +0 -141
  80. package/contracts/compliance/invites/index.ts +0 -137
  81. package/contracts/compliance/issuer-bank-accounts/index.ts +0 -81
  82. package/contracts/compliance/issuer-payment-methods/index.ts +0 -81
  83. package/contracts/compliance/issuers/index.ts +0 -97
  84. package/contracts/compliance/job-items/index.ts +0 -58
  85. package/contracts/compliance/jobs/index.ts +0 -59
  86. package/contracts/compliance/kyb/index.ts +0 -54
  87. package/contracts/compliance/kyc/index.ts +0 -77
  88. package/contracts/compliance/legal-entities/index.ts +0 -57
  89. package/contracts/compliance/login-histories/index.ts +0 -37
  90. package/contracts/compliance/notes/index.ts +0 -69
  91. package/contracts/compliance/notion-databases/index.ts +0 -107
  92. package/contracts/compliance/notion-pages/index.ts +0 -105
  93. package/contracts/compliance/offering-reports/index.ts +0 -149
  94. package/contracts/compliance/offerings/index.ts +0 -233
  95. package/contracts/compliance/pages/index.ts +0 -178
  96. package/contracts/compliance/rejection-reasons/index.ts +0 -32
  97. package/contracts/compliance/review/index.ts +0 -169
  98. package/contracts/compliance/roles/index.ts +0 -34
  99. package/contracts/compliance/secondary-customers/index.ts +0 -77
  100. package/contracts/compliance/secondary-orders/index.ts +0 -60
  101. package/contracts/compliance/secondary-trades/index.ts +0 -100
  102. package/contracts/compliance/secure-requests/index.ts +0 -54
  103. package/contracts/compliance/signer/index.ts +0 -369
  104. package/contracts/compliance/site-links/index.ts +0 -128
  105. package/contracts/compliance/site-settings/index.ts +0 -669
  106. package/contracts/compliance/sites/index.ts +0 -56
  107. package/contracts/compliance/state-machine/index.ts +0 -94
  108. package/contracts/compliance/tasks/index.ts +0 -91
  109. package/contracts/compliance/third-parties/index.ts +0 -52
  110. package/contracts/compliance/trade-line-items/index.ts +0 -59
  111. package/contracts/compliance/trades/index.ts +0 -230
  112. package/contracts/compliance/transactions/index.ts +0 -161
  113. package/contracts/compliance/user-manuals/index.ts +0 -271
  114. package/contracts/compliance/user-settings/index.ts +0 -189
  115. package/contracts/compliance/users/index.ts +0 -200
  116. package/contracts/compliance/webhooks/index.ts +0 -41
  117. package/contracts/compliance-apikey/accounts/index.ts +0 -58
  118. package/contracts/compliance-apikey/index.ts +0 -14
  119. package/contracts/index.ts +0 -6
  120. package/contracts/investors/account-contacts/index.ts +0 -58
  121. package/contracts/investors/aic/index.ts +0 -59
  122. package/contracts/investors/assets/index.ts +0 -61
  123. package/contracts/investors/auth/index.ts +0 -116
  124. package/contracts/investors/bonus-tiers/index.ts +0 -37
  125. package/contracts/investors/contact-us/index.ts +0 -48
  126. package/contracts/investors/data-records/index.ts +0 -113
  127. package/contracts/investors/data-rooms/index.ts +0 -96
  128. package/contracts/investors/files/index.ts +0 -167
  129. package/contracts/investors/files-public/index.ts +0 -185
  130. package/contracts/investors/index.ts +0 -72
  131. package/contracts/investors/individuals/index.ts +0 -99
  132. package/contracts/investors/investor-accounts/index.ts +0 -110
  133. package/contracts/investors/issuers/index.ts +0 -30
  134. package/contracts/investors/legal-entities/index.ts +0 -93
  135. package/contracts/investors/notes/index.ts +0 -69
  136. package/contracts/investors/offerings/index.ts +0 -93
  137. package/contracts/investors/pages/index.ts +0 -88
  138. package/contracts/investors/payment-methods/index.ts +0 -149
  139. package/contracts/investors/portfolios/index.ts +0 -53
  140. package/contracts/investors/sites/index.ts +0 -96
  141. package/contracts/investors/tasks/index.ts +0 -111
  142. package/contracts/investors/trades/index.ts +0 -114
  143. package/contracts/investors/trusted-contacts/index.ts +0 -93
  144. package/contracts/investors/user-manuals/index.ts +0 -62
  145. package/contracts/investors/user-settings/index.ts +0 -170
  146. package/contracts/investors/users/index.ts +0 -45
  147. package/contracts/investors/webhooks/index.ts +0 -30
  148. package/contracts/issuers/account-contacts/index.ts +0 -76
  149. package/contracts/issuers/account-integrations/index.ts +0 -97
  150. package/contracts/issuers/accounts/index.ts +0 -97
  151. package/contracts/issuers/activities/index.ts +0 -54
  152. package/contracts/issuers/aic/index.ts +0 -39
  153. package/contracts/issuers/api-key-logs/index.ts +0 -53
  154. package/contracts/issuers/api-keys/index.ts +0 -93
  155. package/contracts/issuers/assets/index.ts +0 -122
  156. package/contracts/issuers/auth/index.ts +0 -152
  157. package/contracts/issuers/bonus-tiers/index.ts +0 -55
  158. package/contracts/issuers/contact-us/index.ts +0 -48
  159. package/contracts/issuers/covered-persons/index.ts +0 -136
  160. package/contracts/issuers/dashboard/index.ts +0 -72
  161. package/contracts/issuers/data-records/index.ts +0 -257
  162. package/contracts/issuers/data-rooms/index.ts +0 -134
  163. package/contracts/issuers/disbursement-approval-users/index.ts +0 -82
  164. package/contracts/issuers/disbursement-transactions/index.ts +0 -53
  165. package/contracts/issuers/disbursements/index.ts +0 -153
  166. package/contracts/issuers/email-themes/index.ts +0 -242
  167. package/contracts/issuers/escrow-accounts/index.ts +0 -81
  168. package/contracts/issuers/exchange-api-keys/index.ts +0 -144
  169. package/contracts/issuers/files/index.ts +0 -166
  170. package/contracts/issuers/files-public/index.ts +0 -166
  171. package/contracts/issuers/health/index.ts +0 -24
  172. package/contracts/issuers/index.ts +0 -112
  173. package/contracts/issuers/investor-accounts/index.ts +0 -148
  174. package/contracts/issuers/invites/index.ts +0 -129
  175. package/contracts/issuers/issuer/index.ts +0 -94
  176. package/contracts/issuers/issuer-bank-accounts/index.ts +0 -81
  177. package/contracts/issuers/issuer-payment-methods/index.ts +0 -136
  178. package/contracts/issuers/kyc/index.ts +0 -38
  179. package/contracts/issuers/login-histories/index.ts +0 -51
  180. package/contracts/issuers/notes/index.ts +0 -69
  181. package/contracts/issuers/offerings/index.ts +0 -206
  182. package/contracts/issuers/pages/index.ts +0 -138
  183. package/contracts/issuers/payment-methods/index.ts +0 -61
  184. package/contracts/issuers/portfolios/index.ts +0 -36
  185. package/contracts/issuers/rejection-reasons/index.ts +0 -32
  186. package/contracts/issuers/review/index.ts +0 -63
  187. package/contracts/issuers/secondary-customers/index.ts +0 -55
  188. package/contracts/issuers/secondary-orders/index.ts +0 -57
  189. package/contracts/issuers/secondary-trades/index.ts +0 -57
  190. package/contracts/issuers/secure-requests/index.ts +0 -34
  191. package/contracts/issuers/site-links/index.ts +0 -116
  192. package/contracts/issuers/site-settings/index.ts +0 -585
  193. package/contracts/issuers/sites/index.ts +0 -32
  194. package/contracts/issuers/tasks/index.ts +0 -111
  195. package/contracts/issuers/trades/index.ts +0 -132
  196. package/contracts/issuers/transactions/index.ts +0 -158
  197. package/contracts/issuers/user-manuals/index.ts +0 -62
  198. package/contracts/issuers/user-settings/index.ts +0 -170
  199. package/contracts/issuers/users/index.ts +0 -126
  200. package/contracts/secondaries/accounts/index.ts +0 -58
  201. package/contracts/secondaries/index.ts +0 -23
  202. package/contracts/secondaries/secondary-customers/index.ts +0 -55
  203. package/contracts/secondaries/secondary-issuers/index.ts +0 -94
  204. package/contracts/secondaries/secondary-orders/index.ts +0 -56
  205. package/contracts/secondaries/secondary-securities/index.ts +0 -95
  206. package/contracts/secondaries/secondary-trades/index.ts +0 -56
@@ -1,144 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- InternalError,
4
- NotFoundError,
5
- UnauthorizedError,
6
- BadRequestError,
7
- ForbiddenError,
8
- PaginationOptionsZod,
9
- } from '../../../common/types';
10
- import {
11
- ExchangeApiKey,
12
- exchangeApiKeyIdSchema,
13
- PaginatedExchangeApiKeys,
14
- PostExchangeApiKey,
15
- UpdateExchangeApiKey,
16
- ExchangeApiKeyStatusResponse,
17
- } from '../../../common/types/exchange-api-key.types';
18
- import { z } from 'zod';
19
-
20
- const c = initContract();
21
-
22
- export const exchangeApiKeysContract = c.router(
23
- {
24
- postExchangeApiKey: {
25
- summary: 'Create an exchange api key for an account',
26
- method: 'POST',
27
- path: '/',
28
- metadata: {
29
- auth: true,
30
- },
31
- body: PostExchangeApiKey,
32
- responses: {
33
- 201: ExchangeApiKey,
34
- 400: BadRequestError,
35
- 401: UnauthorizedError,
36
- 404: NotFoundError,
37
- 403: ForbiddenError,
38
- 500: InternalError,
39
- },
40
- },
41
- updateExchangeApiKey: {
42
- summary: 'Update an exchange api key for an account',
43
- method: 'PUT',
44
- path: '/:id',
45
- metadata: {
46
- auth: true,
47
- },
48
- pathParams: z.object({
49
- id: exchangeApiKeyIdSchema,
50
- }),
51
- body: UpdateExchangeApiKey,
52
- responses: {
53
- 200: ExchangeApiKey,
54
- 400: BadRequestError,
55
- 401: UnauthorizedError,
56
- 404: NotFoundError,
57
- 403: ForbiddenError,
58
- 500: InternalError,
59
- },
60
- },
61
- getExchangeApiKeys: {
62
- summary: '[ADMIN] Get exchange api keys',
63
- method: 'GET',
64
- path: '/',
65
- metadata: {
66
- auth: true,
67
- },
68
- query: PaginationOptionsZod,
69
- responses: {
70
- 200: PaginatedExchangeApiKeys,
71
- 401: UnauthorizedError,
72
- 403: ForbiddenError,
73
- 404: NotFoundError,
74
- 500: InternalError,
75
- },
76
- },
77
- getExchangeApiKey: {
78
- summary: 'Get exchange api key for an account',
79
- method: 'GET',
80
- path: '/:id',
81
- metadata: {
82
- auth: true,
83
- },
84
- pathParams: z.object({ id: exchangeApiKeyIdSchema }),
85
- responses: {
86
- 200: ExchangeApiKey,
87
- 401: UnauthorizedError,
88
- 403: ForbiddenError,
89
- 404: NotFoundError,
90
- 500: InternalError,
91
- },
92
- },
93
- deactivateExchangeApiKey: {
94
- summary: 'Deactivate an exchange api key for an account',
95
- method: 'GET',
96
- path: '/:id/deactivate',
97
- metadata: {
98
- auth: true,
99
- },
100
- pathParams: z.object({ id: exchangeApiKeyIdSchema }),
101
- responses: {
102
- 200: ExchangeApiKey,
103
- 401: UnauthorizedError,
104
- 403: ForbiddenError,
105
- 404: NotFoundError,
106
- 500: InternalError,
107
- },
108
- },
109
- deleteExchangeApiKey: {
110
- summary: 'Delete an exchange api key for an account',
111
- method: 'DELETE',
112
- path: '/:id',
113
- metadata: {
114
- auth: true,
115
- },
116
- pathParams: z.object({ id: exchangeApiKeyIdSchema }),
117
- responses: {
118
- 200: ExchangeApiKey,
119
- 401: UnauthorizedError,
120
- 403: ForbiddenError,
121
- 404: NotFoundError,
122
- 500: InternalError,
123
- },
124
- },
125
- getExchangeApiKeyStatus: {
126
- summary: 'Get exchange api key status',
127
- method: 'GET',
128
- path: '/:id/status',
129
- metadata: {
130
- auth: false,
131
- },
132
- pathParams: z.object({ id: exchangeApiKeyIdSchema }),
133
- responses: {
134
- 200: ExchangeApiKeyStatusResponse,
135
- 404: NotFoundError,
136
- 500: InternalError,
137
- },
138
- },
139
- },
140
-
141
- {
142
- pathPrefix: 'exchange-api-keys',
143
- },
144
- );
@@ -1,166 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- BadGateWayError,
4
- BadRequestError,
5
- fileIdSchema,
6
- FilesIncludeQuery,
7
- FileZod,
8
- InternalError,
9
- IPaginatedFile,
10
- LinkFileZod,
11
- NotFoundError,
12
- PaginationOptionsZod,
13
- PatchFile,
14
- PostFileQueryParams,
15
- UnauthorizedError,
16
- UnprocessableError,
17
- } from '../../../common/types';
18
- import { z } from 'zod';
19
- import { authHeader, generateApiDescription } from '../../../common/helpers';
20
-
21
- const c = initContract();
22
-
23
- export const filesContract = c.router(
24
- {
25
- postFile: {
26
- summary: 'Upload a file',
27
- description: generateApiDescription(
28
- 'Upload a file to the system.',
29
- 'POST',
30
- '/files',
31
- {
32
- query: {
33
- name: 'test',
34
- category: 'application',
35
- targetId: 'trade_01j5tkg6k2fygr0x06fegt27aj',
36
- },
37
- headers: authHeader,
38
- formData: { file: '@"/Users/local/Desktop/test.csv"' },
39
- },
40
- ),
41
- method: 'POST',
42
- path: '',
43
- query: PostFileQueryParams,
44
- contentType: 'multipart/form-data',
45
- body: c.type<{ file: File }>(),
46
- metadata: {
47
- auth: true,
48
- },
49
- responses: {
50
- 201: FileZod,
51
- 400: BadRequestError,
52
- 401: UnauthorizedError,
53
- 422: UnprocessableError,
54
- 500: InternalError,
55
- 502: BadGateWayError,
56
- },
57
- },
58
- linkFile: {
59
- summary: 'Links a file to a new resource',
60
- method: 'POST',
61
- path: '/:id/link',
62
- pathParams: z.object({
63
- id: fileIdSchema,
64
- }),
65
- body: LinkFileZod,
66
- metadata: {
67
- auth: true,
68
- },
69
- responses: {
70
- 201: FileZod,
71
- 400: BadRequestError,
72
- 401: UnauthorizedError,
73
- 422: UnprocessableError,
74
- 500: InternalError,
75
- 502: BadGateWayError,
76
- },
77
- },
78
- unlinkFile: {
79
- summary: 'Unlinks a file to the parent resource',
80
- method: 'POST',
81
- path: '/:id/unlink',
82
- pathParams: z.object({
83
- id: fileIdSchema,
84
- }),
85
- body: z.object({}),
86
- metadata: {
87
- auth: true,
88
- },
89
- responses: {
90
- 202: FileZod,
91
- 400: BadRequestError,
92
- 401: UnauthorizedError,
93
- 422: UnprocessableError,
94
- 500: InternalError,
95
- 502: BadGateWayError,
96
- },
97
- },
98
- getFiles: {
99
- summary: 'Get files',
100
- method: 'GET',
101
- path: '',
102
- metadata: {
103
- auth: true,
104
- },
105
- query: PaginationOptionsZod.merge(FilesIncludeQuery),
106
- responses: {
107
- 200: IPaginatedFile,
108
- 401: UnauthorizedError,
109
- },
110
- },
111
- getFile: {
112
- summary: 'Get file by id',
113
- method: 'GET',
114
- path: '/:id',
115
- metadata: {
116
- auth: true,
117
- },
118
- pathParams: z.object({
119
- id: fileIdSchema,
120
- }),
121
- responses: {
122
- 200: FileZod,
123
- 401: UnauthorizedError,
124
- 404: NotFoundError,
125
- },
126
- },
127
- patchFile: {
128
- summary: 'Update file by id',
129
- method: 'PATCH',
130
- path: '/:id',
131
- metadata: {
132
- auth: true,
133
- },
134
- pathParams: z.object({
135
- id: fileIdSchema,
136
- }),
137
- body: PatchFile,
138
- responses: {
139
- 201: FileZod,
140
- 400: BadRequestError,
141
- 401: UnauthorizedError,
142
- 404: NotFoundError,
143
- 500: InternalError,
144
- },
145
- },
146
- previewFile: {
147
- summary: 'Preview (stream) a file by id',
148
- method: 'GET',
149
- path: '/preview/:id',
150
- metadata: {
151
- auth: true,
152
- },
153
- pathParams: z.object({
154
- id: fileIdSchema,
155
- }),
156
- responses: {
157
- 200: z.unknown(),
158
- 401: UnauthorizedError,
159
- 404: NotFoundError,
160
- },
161
- },
162
- },
163
- {
164
- pathPrefix: 'files',
165
- },
166
- );
@@ -1,166 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- BadGateWayError,
4
- BadRequestError,
5
- fileIdSchema,
6
- FilesIncludeQuery,
7
- FileZod,
8
- InternalError,
9
- IPaginatedFile,
10
- PostFileQueryParams,
11
- LinkFileZod,
12
- NotFoundError,
13
- PaginationOptionsZod,
14
- PatchFile,
15
- UnauthorizedError,
16
- UnprocessableError,
17
- } from '../../../common/types';
18
- import { z } from 'zod';
19
- import { authHeader, generateApiDescription } from '../../../common/helpers';
20
-
21
- const c = initContract();
22
-
23
- export const filesPublicContract = c.router(
24
- {
25
- postFilePublic: {
26
- summary: 'Upload an issuer file - Issuer files are public',
27
- description: generateApiDescription(
28
- 'Upload a file to the system.',
29
- 'POST',
30
- '/files-public',
31
- {
32
- query: {
33
- name: 'test',
34
- category: 'application',
35
- targetId: 'covered_person_01j5tkg6k2fygr0x06fegt27aj',
36
- },
37
- headers: authHeader,
38
- formData: { file: '@"/Users/local/Desktop/test.csv"' },
39
- },
40
- ),
41
- method: 'POST',
42
- path: '',
43
- query: PostFileQueryParams,
44
- contentType: 'multipart/form-data',
45
- body: c.type<{ file: File }>(),
46
- metadata: {
47
- auth: true,
48
- },
49
- responses: {
50
- 201: FileZod,
51
- 400: BadRequestError,
52
- 401: UnauthorizedError,
53
- 422: UnprocessableError,
54
- 500: InternalError,
55
- 502: BadGateWayError,
56
- },
57
- },
58
- linkFilePublic: {
59
- summary: 'Links a public file to a new resource',
60
- method: 'POST',
61
- path: '/:id/link',
62
- pathParams: z.object({
63
- id: fileIdSchema,
64
- }),
65
- body: LinkFileZod,
66
- metadata: {
67
- auth: true,
68
- },
69
- responses: {
70
- 201: FileZod,
71
- 400: BadRequestError,
72
- 401: UnauthorizedError,
73
- 422: UnprocessableError,
74
- 500: InternalError,
75
- 502: BadGateWayError,
76
- },
77
- },
78
- unlinkFilePublic: {
79
- summary: 'Unlinks a public file to the parent resource',
80
- method: 'POST',
81
- path: '/:id/unlink',
82
- pathParams: z.object({
83
- id: fileIdSchema,
84
- }),
85
- body: z.object({}),
86
- metadata: {
87
- auth: true,
88
- },
89
- responses: {
90
- 202: FileZod,
91
- 400: BadRequestError,
92
- 401: UnauthorizedError,
93
- 422: UnprocessableError,
94
- 500: InternalError,
95
- 502: BadGateWayError,
96
- },
97
- },
98
- getFilesPublic: {
99
- summary: 'Get public files',
100
- method: 'GET',
101
- path: '',
102
- metadata: {
103
- auth: true,
104
- },
105
- query: PaginationOptionsZod.merge(FilesIncludeQuery),
106
- responses: {
107
- 200: IPaginatedFile,
108
- 401: UnauthorizedError,
109
- },
110
- },
111
- getFilePublic: {
112
- summary: 'Get public file by id',
113
- method: 'GET',
114
- path: '/:id',
115
- metadata: {
116
- auth: true,
117
- },
118
- pathParams: z.object({
119
- id: fileIdSchema,
120
- }),
121
- responses: {
122
- 200: FileZod,
123
- 401: UnauthorizedError,
124
- 404: NotFoundError,
125
- },
126
- },
127
- patchFilePublic: {
128
- summary: 'Update public file by id',
129
- method: 'PATCH',
130
- path: '/:id',
131
- metadata: {
132
- auth: true,
133
- },
134
- pathParams: z.object({
135
- id: fileIdSchema,
136
- }),
137
- body: PatchFile,
138
- responses: {
139
- 201: FileZod,
140
- 400: BadRequestError,
141
- 401: UnauthorizedError,
142
- 404: NotFoundError,
143
- 500: InternalError,
144
- },
145
- },
146
- previewFilePublic: {
147
- summary: 'Preview (stream) a public file by id',
148
- method: 'GET',
149
- path: '/preview/:id',
150
- metadata: {
151
- auth: true,
152
- },
153
- pathParams: z.object({
154
- id: fileIdSchema,
155
- }),
156
- responses: {
157
- 200: z.unknown(),
158
- 401: UnauthorizedError,
159
- 404: NotFoundError,
160
- },
161
- },
162
- },
163
- {
164
- pathPrefix: 'files-public',
165
- },
166
- );
@@ -1,24 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import { InternalError } from '../../../common/types';
3
- import { z } from 'zod';
4
-
5
- const c = initContract();
6
-
7
- export const healthContract = c.router(
8
- {
9
- getHealth: {
10
- summary: 'Health Check',
11
- method: 'GET',
12
- path: '',
13
- responses: {
14
- 201: z.object({
15
- status: z.literal('ok'),
16
- }),
17
- 500: InternalError,
18
- },
19
- },
20
- },
21
- {
22
- pathPrefix: 'health/',
23
- },
24
- );
@@ -1,112 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import { accountsContract } from './accounts';
3
- import { accountContactsContract } from './account-contacts';
4
- import { accountIntegrationsContract } from './account-integrations';
5
- import { assetsContract } from './assets';
6
- import { healthContract } from './health';
7
- import { issuerContract } from './issuer';
8
- import { authContract } from './auth';
9
- import { issuersOfferingsContract } from './offerings';
10
- import { issuerInvitesContract } from './invites';
11
- import { issuerNotesContract } from './notes';
12
- import { issuerTradesContract } from './trades';
13
- import { investorAccountsContract } from './investor-accounts';
14
- import { issuerUsersContract } from './users';
15
- import { coveredPersonsContract } from './covered-persons';
16
- import { activitiesContract } from './activities';
17
- import { filesPublicContract } from './files-public';
18
- import { pagesContract } from './pages';
19
- import { loginHistoriesContract } from './login-histories';
20
- import { dataRoomsContract } from './data-rooms';
21
- import { dataRecordsContract } from './data-records';
22
- import { filesContract } from './files';
23
- import { issuerPaymentMethodsContract } from './issuer-payment-methods';
24
- import { issuerTasksContract } from './tasks';
25
- import { issuerTransactionsContract } from './transactions';
26
- import { dashboardContract } from './dashboard';
27
- import { siteSettingsContract } from './site-settings';
28
- import { sitesContract } from './sites';
29
- import { contactUsContract } from './contact-us';
30
- import { paymentMethodsContract } from './payment-methods';
31
- import { userManualsContract } from './user-manuals';
32
- import { issuerBankAccountsContract } from './issuer-bank-accounts';
33
- import { disbursementsContract } from './disbursements';
34
- import { escrowAccountsContract } from './escrow-accounts';
35
- import { disbursementApprovalUsersContract } from './disbursement-approval-users';
36
- import { disbursementTransactionsContract } from './disbursement-transactions';
37
- import { userSettingsContract } from './user-settings';
38
- import { siteLinksContract } from './site-links';
39
- import { emailThemesContract } from './email-themes';
40
- import { kycsContract } from './kyc';
41
- import { reviewContract } from './review';
42
- import { secondaryCustomersContract } from './secondary-customers';
43
- import { secondaryOrdersContract } from './secondary-orders';
44
- import { secondaryTradesContract } from './secondary-trades';
45
- import { portfoliosContract } from './portfolios';
46
- import { exchangeApiKeysContract } from './exchange-api-keys';
47
- import { issuerApiKeysContract } from './api-keys';
48
- import { issuerApiKeyLogsContract } from './api-key-logs';
49
- import { aicContract } from './aic';
50
- import { rejectionReasonsContract } from './rejection-reasons';
51
- import { secureRequestContract } from './secure-requests';
52
- import { bonusTiersContract } from './bonus-tiers';
53
- const c = initContract();
54
-
55
- export const issuersContract = c.router(
56
- {
57
- accounts: accountsContract,
58
- accountContacts: accountContactsContract,
59
- accountIntegrations: accountIntegrationsContract,
60
- activities: activitiesContract,
61
- aic: aicContract,
62
- assets: assetsContract,
63
- auth: authContract,
64
- bonusTiers: bonusTiersContract,
65
- contactUs: contactUsContract,
66
- coveredPersons: coveredPersonsContract,
67
- dashboard: dashboardContract,
68
- dataRecords: dataRecordsContract,
69
- dataRooms: dataRoomsContract,
70
- disbursementApprovalUsers: disbursementApprovalUsersContract,
71
- disbursements: disbursementsContract,
72
- disbursementTransactions: disbursementTransactionsContract,
73
- emailThemes: emailThemesContract,
74
- escrowAccounts: escrowAccountsContract,
75
- exchangeApiKeys: exchangeApiKeysContract,
76
- apiKeys: issuerApiKeysContract,
77
- apiKeyLogs: issuerApiKeyLogsContract,
78
- files: filesContract,
79
- filesPublic: filesPublicContract,
80
- health: healthContract,
81
- investorAccounts: investorAccountsContract,
82
- invites: issuerInvitesContract,
83
- issuerBankAccounts: issuerBankAccountsContract,
84
- issuerPaymentMethods: issuerPaymentMethodsContract,
85
- issuers: issuerContract,
86
- kycs: kycsContract,
87
- loginHistories: loginHistoriesContract,
88
- notes: issuerNotesContract,
89
- offerings: issuersOfferingsContract,
90
- pages: pagesContract,
91
- paymentMethods: paymentMethodsContract,
92
- portfolios: portfoliosContract,
93
- rejectionReasons: rejectionReasonsContract,
94
- review: reviewContract,
95
- secondaryCustomers: secondaryCustomersContract,
96
- secondaryOrders: secondaryOrdersContract,
97
- secondaryTrades: secondaryTradesContract,
98
- secureRequests: secureRequestContract,
99
- siteLinks: siteLinksContract,
100
- sites: sitesContract,
101
- siteSettings: siteSettingsContract,
102
- tasks: issuerTasksContract,
103
- trades: issuerTradesContract,
104
- transactions: issuerTransactionsContract,
105
- userManuals: userManualsContract,
106
- users: issuerUsersContract,
107
- userSettings: userSettingsContract,
108
- },
109
- {
110
- pathPrefix: '/issuers/api/v1/',
111
- },
112
- );