@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,74 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- BadRequestError,
4
- ForbiddenError,
5
- InternalError,
6
- UnauthorizedError,
7
- } from '../../../common/types';
8
- import {
9
- CompliancePostBonusTierZod,
10
- EstimateBonusTierCalculationResponseZod,
11
- EstimateBonusTierCalculationZod,
12
- IBonusTierList,
13
- PurchaseCalculationResponseZod,
14
- PurchaseCalculationZod,
15
- } from '../../../common/types/bonus-tier.types';
16
-
17
- const c = initContract();
18
-
19
- export const bonusTiersContract = c.router(
20
- {
21
- estimateCalculation: {
22
- summary: 'Estimate bonus tier calculation',
23
- method: 'POST',
24
- path: '/estimate-calculation',
25
- metadata: {
26
- auth: true,
27
- },
28
- body: EstimateBonusTierCalculationZod,
29
- responses: {
30
- 200: EstimateBonusTierCalculationResponseZod,
31
- 400: BadRequestError,
32
- 401: UnauthorizedError,
33
- 403: ForbiddenError,
34
- 500: InternalError,
35
- },
36
- },
37
- purchaseCalculation: {
38
- summary:
39
- '[ADMIN] Calculate the bonus shares that would be awarded for a trade',
40
- method: 'POST',
41
- path: '/purchase-calculation',
42
- metadata: {
43
- auth: true,
44
- },
45
- body: PurchaseCalculationZod,
46
- responses: {
47
- 200: PurchaseCalculationResponseZod,
48
- 400: BadRequestError,
49
- 401: UnauthorizedError,
50
- 403: ForbiddenError,
51
- 500: InternalError,
52
- },
53
- },
54
- postBonusTier: {
55
- summary: 'Create a new bonus tier',
56
- method: 'POST',
57
- path: '/',
58
- metadata: {
59
- auth: true,
60
- },
61
- body: CompliancePostBonusTierZod,
62
- responses: {
63
- 201: IBonusTierList,
64
- 400: BadRequestError,
65
- 401: UnauthorizedError,
66
- 403: ForbiddenError,
67
- 500: InternalError,
68
- },
69
- },
70
- },
71
- {
72
- pathPrefix: 'bonus-tiers',
73
- },
74
- );
@@ -1,87 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- NotFoundError,
5
- PaginationOptionsZod,
6
- UnauthorizedError,
7
- } from '../../../common/types';
8
- import {
9
- ChecklistFiltersZodSchema,
10
- ChecklistIncludeQuerySchema,
11
- ChecklistParamsZodSchema,
12
- IPaginatedChecklistSchema,
13
- PatchChecklistSchema,
14
- PostChecklistSchema,
15
- ResponseChecklistZodSchema,
16
- } from '../../../common/types/checklist.types';
17
-
18
- const c = initContract();
19
-
20
- export const checkListContract = c.router(
21
- {
22
- getChecklist: {
23
- summary: 'Get checklist by id',
24
- method: 'GET',
25
- path: '/:id',
26
- metadata: {
27
- auth: true,
28
- },
29
- pathParams: ChecklistParamsZodSchema,
30
- query: ChecklistIncludeQuerySchema,
31
- responses: {
32
- 200: ResponseChecklistZodSchema,
33
- 401: UnauthorizedError,
34
- 403: ForbiddenError,
35
- 404: NotFoundError,
36
- },
37
- },
38
- getChecklists: {
39
- summary: 'Query checklist by name or type',
40
- method: 'GET',
41
- path: '',
42
- metadata: {
43
- auth: true,
44
- },
45
- query: PaginationOptionsZod.merge(ChecklistFiltersZodSchema).merge(
46
- ChecklistIncludeQuerySchema,
47
- ),
48
- responses: {
49
- 200: IPaginatedChecklistSchema,
50
- 401: UnauthorizedError,
51
- 403: ForbiddenError,
52
- 404: NotFoundError,
53
- },
54
- },
55
- createChecklist: {
56
- summary: 'Create checklist ',
57
- method: 'POST',
58
- path: '',
59
- body: PostChecklistSchema,
60
- responses: {
61
- 201: ResponseChecklistZodSchema,
62
- 401: UnauthorizedError,
63
- 403: ForbiddenError,
64
- 404: NotFoundError,
65
- },
66
- },
67
- updateChecklist: {
68
- summary: 'Update checklist ',
69
- method: 'PATCH',
70
- path: '/:id',
71
- metadata: {
72
- auth: true,
73
- },
74
- body: PatchChecklistSchema,
75
- pathParams: ChecklistParamsZodSchema,
76
- responses: {
77
- 201: ResponseChecklistZodSchema,
78
- 401: UnauthorizedError,
79
- 403: ForbiddenError,
80
- 404: NotFoundError,
81
- },
82
- },
83
- },
84
- {
85
- pathPrefix: 'checklists',
86
- },
87
- );
@@ -1,86 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- NotFoundError,
5
- PaginationOptionsZod,
6
- UnauthorizedError,
7
- } from '../../../common/types';
8
- import {
9
- ChecklistItemsFiltersZodSchema,
10
- IPaginatedChecklistItemSchema,
11
- ParamsChecklistItemSchema,
12
- PatchChecklistItemSchema,
13
- PostChecklistItemSchema,
14
- ResponseChecklistItemSchema,
15
- } from '../../../common/types/checklist-items.types';
16
-
17
- const c = initContract();
18
-
19
- export const checkListItemsContract = c.router(
20
- {
21
- createChecklistItem: {
22
- summary: 'Create checklist Item ',
23
- method: 'POST',
24
- path: '/',
25
- metadata: {
26
- auth: true,
27
- },
28
- body: PostChecklistItemSchema,
29
- responses: {
30
- 201: ResponseChecklistItemSchema,
31
- 401: UnauthorizedError,
32
- 403: ForbiddenError,
33
- 404: NotFoundError,
34
- },
35
- },
36
- updateChecklistItem: {
37
- summary: 'Update checklist item',
38
- method: 'PATCH',
39
- path: '/:id',
40
- metadata: {
41
- auth: true,
42
- },
43
- body: PatchChecklistItemSchema,
44
- pathParams: ParamsChecklistItemSchema,
45
- responses: {
46
- 201: ResponseChecklistItemSchema,
47
- 401: UnauthorizedError,
48
- 403: ForbiddenError,
49
- 404: NotFoundError,
50
- },
51
- },
52
- queryChecklistItem: {
53
- summary: 'GET checklist items by Checklist id',
54
- method: 'GET',
55
- path: '/',
56
- metadata: {
57
- auth: true,
58
- },
59
- query: PaginationOptionsZod.merge(ChecklistItemsFiltersZodSchema),
60
- responses: {
61
- 200: IPaginatedChecklistItemSchema,
62
- 401: UnauthorizedError,
63
- 403: ForbiddenError,
64
- 404: NotFoundError,
65
- },
66
- },
67
- getChecklistItem: {
68
- summary: 'GET checklist items by Checklist id',
69
- method: 'GET',
70
- pathParams: ParamsChecklistItemSchema,
71
- path: '/:id',
72
- metadata: {
73
- auth: true,
74
- },
75
- responses: {
76
- 200: ResponseChecklistItemSchema,
77
- 401: UnauthorizedError,
78
- 403: ForbiddenError,
79
- 404: NotFoundError,
80
- },
81
- },
82
- },
83
- {
84
- pathPrefix: 'checklist-items',
85
- },
86
- );
@@ -1,97 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- BadRequestError,
4
- ForbiddenError,
5
- InternalError,
6
- NotFoundError,
7
- PaginationOptionsZod,
8
- PatchCoveredPersonsZod,
9
- ReviewCoveredPersons,
10
- UnauthorizedError,
11
- } from '../../../common/types';
12
-
13
- import {
14
- coveredPersonIdSchema,
15
- CoveredPersonsIncludeQuery,
16
- GetCoveredPersonsZod,
17
- ICoveredPerson,
18
- IPaginatedCoveredPerson,
19
- } from '../../../common/types';
20
- import { z } from 'zod';
21
-
22
- const c = initContract();
23
-
24
- export const coveredPersonsContract = c.router(
25
- {
26
- getCoveredPersons: {
27
- summary: 'Get Covered Persons',
28
- method: 'GET',
29
- path: '',
30
- metadata: {
31
- auth: true,
32
- },
33
- query: PaginationOptionsZod.merge(CoveredPersonsIncludeQuery).merge(
34
- GetCoveredPersonsZod,
35
- ),
36
- responses: {
37
- 200: IPaginatedCoveredPerson,
38
- 401: UnauthorizedError,
39
- 403: ForbiddenError,
40
- 500: InternalError,
41
- },
42
- },
43
- getCoveredPerson: {
44
- summary: 'Get covered person by id',
45
- method: 'GET',
46
- path: '/:id',
47
- metadata: {
48
- auth: true,
49
- },
50
- query: z.object({}).merge(CoveredPersonsIncludeQuery),
51
- pathParams: z.object({ id: coveredPersonIdSchema }),
52
- responses: {
53
- 200: ICoveredPerson,
54
- 401: UnauthorizedError,
55
- 403: ForbiddenError,
56
- 404: NotFoundError,
57
- },
58
- },
59
- patchCoveredPerson: {
60
- summary: 'Update covered person',
61
- method: 'PATCH',
62
- path: '/:id',
63
- metadata: {
64
- auth: true,
65
- },
66
- pathParams: z.object({ id: coveredPersonIdSchema }),
67
- body: PatchCoveredPersonsZod,
68
- responses: {
69
- 201: ICoveredPerson,
70
- 400: BadRequestError,
71
- 401: UnauthorizedError,
72
- 403: ForbiddenError,
73
- 404: NotFoundError,
74
- 500: InternalError,
75
- },
76
- },
77
- reviewCoveredPersons: {
78
- summary: 'Review CoveredPersons',
79
- method: 'POST',
80
- path: '/review',
81
- metadata: {
82
- auth: true,
83
- },
84
- body: ReviewCoveredPersons,
85
- responses: {
86
- 201: z.object({ success: z.boolean() }),
87
- 401: UnauthorizedError,
88
- 403: ForbiddenError,
89
- 404: NotFoundError,
90
- 500: InternalError,
91
- },
92
- },
93
- },
94
- {
95
- pathPrefix: 'covered-persons',
96
- },
97
- );
@@ -1,111 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- PaginationOptionsZod,
5
- UnauthorizedError,
6
- IPaginatedTradeSummaryResponse,
7
- InternalError,
8
- BadRequestError,
9
- TradeSummaryFilterZod,
10
- IPaginatedOnboardingOfferingSummaryResponse,
11
- OnboardingOfferingSummaryFilterZod,
12
- } from '../../../common/types';
13
- import { IPaginatedSecondaryTradeSummaryResponse } from '../../../common/types/secondary-trade.types';
14
- import {
15
- DocumentSummaryFilterZod,
16
- IPaginatedDocumentSummaryResponse,
17
- } from '../../../common/types/dashboard.types';
18
- import {
19
- IPaginatedOnboardingAccountSummaryResponse,
20
- OnboardingAccountSummaryFilterZod,
21
- } from '../../../common/types/account.types';
22
-
23
- const c = initContract();
24
-
25
- export const dashboardContract = c.router(
26
- {
27
- getPaginatedTradesSummary: {
28
- summary: 'Get trades summary with pagination',
29
- method: 'GET',
30
- path: '/trades',
31
- metadata: {
32
- auth: true,
33
- },
34
- query: PaginationOptionsZod.merge(TradeSummaryFilterZod),
35
- responses: {
36
- 200: IPaginatedTradeSummaryResponse,
37
- 400: BadRequestError,
38
- 401: UnauthorizedError,
39
- 403: ForbiddenError,
40
- 500: InternalError,
41
- },
42
- },
43
- getPaginatedSecondaryTradesSummary: {
44
- summary: 'Get secondary trades summary with pagination',
45
- method: 'GET',
46
- path: '/secondary-trades',
47
- metadata: {
48
- auth: true,
49
- },
50
- query: PaginationOptionsZod,
51
- responses: {
52
- 200: IPaginatedSecondaryTradeSummaryResponse,
53
- 400: BadRequestError,
54
- 401: UnauthorizedError,
55
- 403: ForbiddenError,
56
- 500: InternalError,
57
- },
58
- },
59
- getDocumentsSummary: {
60
- summary: 'Get documents summary with pagination',
61
- method: 'GET',
62
- path: '/documents',
63
- metadata: {
64
- auth: true,
65
- },
66
- query: PaginationOptionsZod.merge(DocumentSummaryFilterZod),
67
- responses: {
68
- 200: IPaginatedDocumentSummaryResponse,
69
- 400: BadRequestError,
70
- 401: UnauthorizedError,
71
- 403: ForbiddenError,
72
- 500: InternalError,
73
- },
74
- },
75
- getPaginatedOnBoardingAccountSummary: {
76
- summary: 'Get onboarding account summary with pagination',
77
- method: 'GET',
78
- path: '/onboarding-accounts',
79
- metadata: {
80
- auth: true,
81
- },
82
- query: PaginationOptionsZod.merge(OnboardingAccountSummaryFilterZod),
83
- responses: {
84
- 200: IPaginatedOnboardingAccountSummaryResponse,
85
- 400: BadRequestError,
86
- 401: UnauthorizedError,
87
- 403: ForbiddenError,
88
- 500: InternalError,
89
- },
90
- },
91
- getPaginatedOnBoardingOfferingSummary: {
92
- summary: 'Get onboarding offering summary with pagination',
93
- method: 'GET',
94
- path: '/onboarding-offerings',
95
- metadata: {
96
- auth: true,
97
- },
98
- query: PaginationOptionsZod.merge(OnboardingOfferingSummaryFilterZod),
99
- responses: {
100
- 200: IPaginatedOnboardingOfferingSummaryResponse,
101
- 400: BadRequestError,
102
- 401: UnauthorizedError,
103
- 403: ForbiddenError,
104
- 500: InternalError,
105
- },
106
- },
107
- },
108
- {
109
- pathPrefix: 'dashboard',
110
- },
111
- );
@@ -1,116 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ComplianceReview,
4
- ForbiddenError,
5
- InternalError,
6
- NotFoundError,
7
- PaginationOptionsZod,
8
- UnauthorizedError,
9
- } from '../../../common/types';
10
- import {
11
- dataRecordIdSchema,
12
- DataRecordsFilters,
13
- DataRecordsIncludeQuery,
14
- DataRecordStructureZod,
15
- DataRecordZod,
16
- IPaginatedDataRecords,
17
- NavigationSummaryZod,
18
- RecordPathResponse,
19
- } from '../../../common/types/data-record.types';
20
- import { z } from 'zod';
21
-
22
- const c = initContract();
23
-
24
- export const dataRecordsContract = c.router(
25
- {
26
- getDataRecords: {
27
- summary: 'Get Data Records',
28
- method: 'GET',
29
- path: '',
30
- metadata: {
31
- auth: true,
32
- },
33
- query: PaginationOptionsZod.merge(DataRecordsFilters).merge(
34
- DataRecordsIncludeQuery,
35
- ),
36
- responses: {
37
- 200: IPaginatedDataRecords,
38
- 401: UnauthorizedError,
39
- 403: ForbiddenError,
40
- 500: InternalError,
41
- },
42
- },
43
- getDataRecord: {
44
- summary: 'Get data record by id',
45
- method: 'GET',
46
- path: '/:id',
47
- metadata: {
48
- auth: true,
49
- },
50
- pathParams: z.object({ id: dataRecordIdSchema }),
51
- query: z
52
- .object({ status: z.nativeEnum(ComplianceReview) })
53
- .merge(DataRecordsIncludeQuery),
54
- responses: {
55
- 200: DataRecordZod,
56
- 401: UnauthorizedError,
57
- 403: ForbiddenError,
58
- 404: NotFoundError,
59
- 500: InternalError,
60
- },
61
- },
62
- getDataRecordStructure: {
63
- summary:
64
- 'Get data record structure by id - shows the proper tree structure of the data record',
65
- method: 'GET',
66
- path: '/:id/structure',
67
- metadata: {
68
- auth: true,
69
- },
70
- pathParams: z.object({ id: dataRecordIdSchema }),
71
- responses: {
72
- 200: DataRecordStructureZod,
73
- 401: UnauthorizedError,
74
- 403: ForbiddenError,
75
- 404: NotFoundError,
76
- 500: InternalError,
77
- },
78
- },
79
- getDataRecordPath: {
80
- summary:
81
- 'Get data record path by id - useful for navigation and showing the user where they are in the folder structure. Returns the path to the record',
82
- method: 'GET',
83
- path: '/:id/path',
84
- metadata: {
85
- auth: true,
86
- },
87
- pathParams: z.object({ id: dataRecordIdSchema }),
88
- responses: {
89
- 200: RecordPathResponse,
90
- 401: UnauthorizedError,
91
- 403: ForbiddenError,
92
- 404: NotFoundError,
93
- 500: InternalError,
94
- },
95
- },
96
- getNavigationSummary: {
97
- summary:
98
- 'Get navigation summary for a data record - useful for breadcrumbs',
99
- method: 'GET',
100
- path: '/:id/navigation',
101
- metadata: {
102
- auth: true,
103
- },
104
- pathParams: z.object({ id: dataRecordIdSchema }),
105
- responses: {
106
- 200: NavigationSummaryZod,
107
- 401: UnauthorizedError,
108
- 403: ForbiddenError,
109
- 500: InternalError,
110
- },
111
- },
112
- },
113
- {
114
- pathPrefix: 'data-records',
115
- },
116
- );
@@ -1,113 +0,0 @@
1
- import { z } from 'zod';
2
- import { initContract } from '@ts-rest/core';
3
- import {
4
- ComplianceReview,
5
- ForbiddenError,
6
- InternalError,
7
- NotFoundError,
8
- PaginationOptionsZod,
9
- UnauthorizedError,
10
- } from '../../../common/types';
11
- import {
12
- dataRoomIdSchema,
13
- DataRoomApprovalsZod,
14
- DataRoomsFilters,
15
- DataRoomsIncludeQuery,
16
- IPaginatedDataRooms,
17
- DataRoomZod,
18
- DataRoomStructureZod,
19
- DataRoomFilesSummaryFilterZod,
20
- IPaginatedDataRoomFilesSummaryZod,
21
- DataRoomPasswordQueryZod,
22
- } from '../../../common/types/data-room.types';
23
-
24
- const c = initContract();
25
-
26
- export const dataRoomsContract = c.router(
27
- {
28
- getDataRooms: {
29
- summary: 'Get paginated data-rooms',
30
- method: 'GET',
31
- path: '',
32
- metadata: {
33
- auth: true,
34
- },
35
- query: PaginationOptionsZod.merge(DataRoomsFilters).merge(
36
- DataRoomsIncludeQuery,
37
- ),
38
- responses: {
39
- 200: IPaginatedDataRooms,
40
- 401: UnauthorizedError,
41
- 403: ForbiddenError,
42
- 500: InternalError,
43
- },
44
- },
45
- getDataRoom: {
46
- summary: 'Get data-room by id',
47
- method: 'GET',
48
- path: '/:id',
49
- metadata: {
50
- auth: true,
51
- },
52
- query: DataRoomsIncludeQuery.merge(DataRoomPasswordQueryZod),
53
- pathParams: z.object({ id: dataRoomIdSchema }),
54
- responses: {
55
- 200: DataRoomZod,
56
- 401: UnauthorizedError,
57
- 403: ForbiddenError,
58
- 404: NotFoundError,
59
- },
60
- },
61
- getDataRoomApprovals: {
62
- summary: 'Get data-room approvals',
63
- method: 'GET',
64
- path: '/approvals',
65
- metadata: {
66
- auth: true,
67
- },
68
- query: z.object({ status: z.nativeEnum(ComplianceReview) }),
69
- responses: {
70
- 200: z.array(DataRoomApprovalsZod),
71
- 401: UnauthorizedError,
72
- 403: ForbiddenError,
73
- 500: InternalError,
74
- },
75
- },
76
- getDataRoomStructure: {
77
- summary:
78
- 'Get data room structure by id - shows the proper tree structure of the data room',
79
- method: 'GET',
80
- path: '/:id/structure',
81
- metadata: {
82
- auth: true,
83
- },
84
- pathParams: z.object({ id: dataRoomIdSchema }),
85
- query: DataRoomPasswordQueryZod,
86
- responses: {
87
- 200: DataRoomStructureZod,
88
- 401: UnauthorizedError,
89
- 403: ForbiddenError,
90
- 404: NotFoundError,
91
- 500: InternalError,
92
- },
93
- },
94
- getDataRoomFilesSummary: {
95
- summary: 'Get dataroom files based on compliancereview and structure',
96
- method: 'GET',
97
- path: '/files/summary',
98
- metadata: {
99
- auth: true,
100
- },
101
- query: PaginationOptionsZod.merge(DataRoomFilesSummaryFilterZod),
102
- responses: {
103
- 200: IPaginatedDataRoomFilesSummaryZod,
104
- 401: UnauthorizedError,
105
- 403: ForbiddenError,
106
- 500: InternalError,
107
- },
108
- },
109
- },
110
- {
111
- pathPrefix: 'data-rooms',
112
- },
113
- );