@dalmore/api-contracts 0.0.0-dev.988f3c3 → 0.0.0-dev.9d42e16

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 (191) 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.types.ts +1 -0
  5. package/common/types/auth.types.ts +7 -18
  6. package/common/types/common.types.ts +22 -0
  7. package/common/types/comply-advantage-api.types.ts +3 -3
  8. package/common/types/contact-us.types.ts +6 -2
  9. package/common/types/covered-person.types.ts +2 -1
  10. package/common/types/escrow-account.types.ts +3 -3
  11. package/common/types/individuals.types.ts +3 -2
  12. package/common/types/investor-account.types.ts +2 -1
  13. package/common/types/invite.types.ts +27 -1
  14. package/common/types/legal-entity.types.ts +3 -2
  15. package/common/types/mail-template.types.ts +34 -0
  16. package/common/types/note.types.ts +1 -1
  17. package/common/types/notification.types.ts +10 -0
  18. package/common/types/site-settings.types.ts +2 -1
  19. package/common/types/trade.types.ts +49 -1
  20. package/common/types/trusted-contact.types.ts +7 -7
  21. package/common/types/user.types.ts +2 -5
  22. package/common/types/webhook.types.ts +142 -0
  23. package/index.ts +10 -0
  24. package/package.json +23 -32
  25. package/contracts/compliance/account-contacts/index.ts +0 -82
  26. package/contracts/compliance/account-managers/index.ts +0 -142
  27. package/contracts/compliance/account-settings/index.ts +0 -59
  28. package/contracts/compliance/accounts/index.ts +0 -187
  29. package/contracts/compliance/activities/index.ts +0 -55
  30. package/contracts/compliance/aic/index.ts +0 -60
  31. package/contracts/compliance/api-keys/index.ts +0 -91
  32. package/contracts/compliance/assets/index.ts +0 -122
  33. package/contracts/compliance/auth/index.ts +0 -134
  34. package/contracts/compliance/batch-jobs/index.ts +0 -62
  35. package/contracts/compliance/bonus-tiers/index.ts +0 -74
  36. package/contracts/compliance/checklist/index.ts +0 -87
  37. package/contracts/compliance/checklist-items/index.ts +0 -86
  38. package/contracts/compliance/covered-persons/index.ts +0 -97
  39. package/contracts/compliance/dashboard/index.ts +0 -111
  40. package/contracts/compliance/data-records/index.ts +0 -116
  41. package/contracts/compliance/data-rooms/index.ts +0 -113
  42. package/contracts/compliance/default-theme-configs/index.ts +0 -95
  43. package/contracts/compliance/disbursement/index.ts +0 -165
  44. package/contracts/compliance/disbursement-approval-users/index.ts +0 -84
  45. package/contracts/compliance/disbursement-transactions/index.ts +0 -37
  46. package/contracts/compliance/domain-filters/index.ts +0 -117
  47. package/contracts/compliance/email-themes/index.ts +0 -284
  48. package/contracts/compliance/escrow-accounts/index.ts +0 -85
  49. package/contracts/compliance/exchange-api-keys/index.ts +0 -129
  50. package/contracts/compliance/exchange-imports/index.ts +0 -137
  51. package/contracts/compliance/files/index.ts +0 -267
  52. package/contracts/compliance/files-public/index.ts +0 -188
  53. package/contracts/compliance/health/index.ts +0 -26
  54. package/contracts/compliance/index.ts +0 -151
  55. package/contracts/compliance/individuals/index.ts +0 -57
  56. package/contracts/compliance/investor-accounts/index.ts +0 -141
  57. package/contracts/compliance/invites/index.ts +0 -137
  58. package/contracts/compliance/issuer-bank-accounts/index.ts +0 -81
  59. package/contracts/compliance/issuer-payment-methods/index.ts +0 -81
  60. package/contracts/compliance/issuers/index.ts +0 -97
  61. package/contracts/compliance/job-items/index.ts +0 -58
  62. package/contracts/compliance/jobs/index.ts +0 -59
  63. package/contracts/compliance/kyb/index.ts +0 -54
  64. package/contracts/compliance/kyc/index.ts +0 -77
  65. package/contracts/compliance/legal-entities/index.ts +0 -57
  66. package/contracts/compliance/login-histories/index.ts +0 -37
  67. package/contracts/compliance/notes/index.ts +0 -69
  68. package/contracts/compliance/notification-channels/index.ts +0 -251
  69. package/contracts/compliance/notion-databases/index.ts +0 -107
  70. package/contracts/compliance/notion-pages/index.ts +0 -105
  71. package/contracts/compliance/offering-reports/index.ts +0 -149
  72. package/contracts/compliance/offerings/index.ts +0 -233
  73. package/contracts/compliance/pages/index.ts +0 -178
  74. package/contracts/compliance/payment-methods/index.ts +0 -57
  75. package/contracts/compliance/rejection-reasons/index.ts +0 -32
  76. package/contracts/compliance/review/index.ts +0 -169
  77. package/contracts/compliance/roles/index.ts +0 -34
  78. package/contracts/compliance/secondary-customers/index.ts +0 -77
  79. package/contracts/compliance/secondary-orders/index.ts +0 -60
  80. package/contracts/compliance/secondary-trades/index.ts +0 -100
  81. package/contracts/compliance/secure-requests/index.ts +0 -54
  82. package/contracts/compliance/signer/index.ts +0 -369
  83. package/contracts/compliance/site-links/index.ts +0 -128
  84. package/contracts/compliance/site-settings/index.ts +0 -669
  85. package/contracts/compliance/sites/index.ts +0 -56
  86. package/contracts/compliance/state-machine/index.ts +0 -94
  87. package/contracts/compliance/tasks/index.ts +0 -91
  88. package/contracts/compliance/third-parties/index.ts +0 -52
  89. package/contracts/compliance/trade-line-items/index.ts +0 -59
  90. package/contracts/compliance/trades/index.ts +0 -230
  91. package/contracts/compliance/transactions/index.ts +0 -161
  92. package/contracts/compliance/user-manuals/index.ts +0 -271
  93. package/contracts/compliance/user-settings/index.ts +0 -189
  94. package/contracts/compliance/users/index.ts +0 -221
  95. package/contracts/compliance/webhooks/index.ts +0 -41
  96. package/contracts/compliance-apikey/accounts/index.ts +0 -58
  97. package/contracts/compliance-apikey/index.ts +0 -14
  98. package/contracts/index.ts +0 -6
  99. package/contracts/investors/account-contacts/index.ts +0 -58
  100. package/contracts/investors/aic/index.ts +0 -59
  101. package/contracts/investors/assets/index.ts +0 -61
  102. package/contracts/investors/auth/index.ts +0 -116
  103. package/contracts/investors/bonus-tiers/index.ts +0 -55
  104. package/contracts/investors/cart/index.ts +0 -75
  105. package/contracts/investors/contact-us/index.ts +0 -48
  106. package/contracts/investors/data-records/index.ts +0 -113
  107. package/contracts/investors/data-rooms/index.ts +0 -96
  108. package/contracts/investors/files/index.ts +0 -167
  109. package/contracts/investors/files-public/index.ts +0 -185
  110. package/contracts/investors/index.ts +0 -72
  111. package/contracts/investors/individuals/index.ts +0 -121
  112. package/contracts/investors/investor-accounts/index.ts +0 -110
  113. package/contracts/investors/issuer-payment-methods/index.ts +0 -36
  114. package/contracts/investors/issuers/index.ts +0 -30
  115. package/contracts/investors/legal-entities/index.ts +0 -93
  116. package/contracts/investors/notes/index.ts +0 -69
  117. package/contracts/investors/offerings/index.ts +0 -93
  118. package/contracts/investors/pages/index.ts +0 -88
  119. package/contracts/investors/payment-methods/index.ts +0 -149
  120. package/contracts/investors/portfolios/index.ts +0 -53
  121. package/contracts/investors/sites/index.ts +0 -96
  122. package/contracts/investors/tasks/index.ts +0 -111
  123. package/contracts/investors/trade-line-items/index.ts +0 -75
  124. package/contracts/investors/trades/index.ts +0 -114
  125. package/contracts/investors/transactions/index.ts +0 -37
  126. package/contracts/investors/trusted-contacts/index.ts +0 -93
  127. package/contracts/investors/user-manuals/index.ts +0 -62
  128. package/contracts/investors/user-settings/index.ts +0 -170
  129. package/contracts/investors/users/index.ts +0 -45
  130. package/contracts/investors/webhooks/index.ts +0 -30
  131. package/contracts/issuers/account-contacts/index.ts +0 -76
  132. package/contracts/issuers/account-integrations/index.ts +0 -97
  133. package/contracts/issuers/account-settings/index.ts +0 -36
  134. package/contracts/issuers/accounts/index.ts +0 -97
  135. package/contracts/issuers/activities/index.ts +0 -54
  136. package/contracts/issuers/aic/index.ts +0 -39
  137. package/contracts/issuers/api-key-logs/index.ts +0 -53
  138. package/contracts/issuers/api-keys/index.ts +0 -93
  139. package/contracts/issuers/assets/index.ts +0 -122
  140. package/contracts/issuers/auth/index.ts +0 -152
  141. package/contracts/issuers/bonus-tiers/index.ts +0 -73
  142. package/contracts/issuers/contact-us/index.ts +0 -48
  143. package/contracts/issuers/covered-persons/index.ts +0 -136
  144. package/contracts/issuers/dashboard/index.ts +0 -72
  145. package/contracts/issuers/data-records/index.ts +0 -257
  146. package/contracts/issuers/data-rooms/index.ts +0 -134
  147. package/contracts/issuers/disbursement-approval-users/index.ts +0 -82
  148. package/contracts/issuers/disbursement-transactions/index.ts +0 -53
  149. package/contracts/issuers/disbursements/index.ts +0 -189
  150. package/contracts/issuers/email-themes/index.ts +0 -242
  151. package/contracts/issuers/escrow-accounts/index.ts +0 -81
  152. package/contracts/issuers/exchange-api-keys/index.ts +0 -144
  153. package/contracts/issuers/files/index.ts +0 -166
  154. package/contracts/issuers/files-public/index.ts +0 -166
  155. package/contracts/issuers/health/index.ts +0 -24
  156. package/contracts/issuers/index.ts +0 -116
  157. package/contracts/issuers/investor-accounts/index.ts +0 -148
  158. package/contracts/issuers/invites/index.ts +0 -129
  159. package/contracts/issuers/issuer/index.ts +0 -94
  160. package/contracts/issuers/issuer-bank-accounts/index.ts +0 -81
  161. package/contracts/issuers/issuer-payment-methods/index.ts +0 -136
  162. package/contracts/issuers/kyc/index.ts +0 -38
  163. package/contracts/issuers/login-histories/index.ts +0 -51
  164. package/contracts/issuers/notes/index.ts +0 -69
  165. package/contracts/issuers/notification-channels/index.ts +0 -251
  166. package/contracts/issuers/offerings/index.ts +0 -206
  167. package/contracts/issuers/pages/index.ts +0 -138
  168. package/contracts/issuers/payment-methods/index.ts +0 -61
  169. package/contracts/issuers/portfolios/index.ts +0 -36
  170. package/contracts/issuers/rejection-reasons/index.ts +0 -32
  171. package/contracts/issuers/review/index.ts +0 -63
  172. package/contracts/issuers/secondary-customers/index.ts +0 -55
  173. package/contracts/issuers/secondary-orders/index.ts +0 -57
  174. package/contracts/issuers/secondary-trades/index.ts +0 -57
  175. package/contracts/issuers/secure-requests/index.ts +0 -34
  176. package/contracts/issuers/site-links/index.ts +0 -116
  177. package/contracts/issuers/site-settings/index.ts +0 -585
  178. package/contracts/issuers/sites/index.ts +0 -32
  179. package/contracts/issuers/tasks/index.ts +0 -111
  180. package/contracts/issuers/trades/index.ts +0 -132
  181. package/contracts/issuers/transactions/index.ts +0 -158
  182. package/contracts/issuers/user-manuals/index.ts +0 -62
  183. package/contracts/issuers/user-settings/index.ts +0 -170
  184. package/contracts/issuers/users/index.ts +0 -126
  185. package/contracts/secondaries/accounts/index.ts +0 -58
  186. package/contracts/secondaries/index.ts +0 -23
  187. package/contracts/secondaries/secondary-customers/index.ts +0 -55
  188. package/contracts/secondaries/secondary-issuers/index.ts +0 -94
  189. package/contracts/secondaries/secondary-orders/index.ts +0 -56
  190. package/contracts/secondaries/secondary-securities/index.ts +0 -95
  191. package/contracts/secondaries/secondary-trades/index.ts +0 -56
@@ -1,141 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- accountIdSchema,
4
- BadRequestError,
5
- ForbiddenError,
6
- InternalError,
7
- NotFoundError,
8
- PaginationOptionsZod,
9
- tradeIdSchema,
10
- UnauthorizedError,
11
- } from '../../../common/types';
12
- import { z } from 'zod';
13
- import {
14
- ExportInvestorAccountsResponse,
15
- IInvestorAccount,
16
- IInvestorAccountSummary,
17
- investorAccountIdSchema,
18
- InvestorAccountsFiltersZod,
19
- InvestorAccountsIncludeQuery,
20
- InvestorAccountsSortZod,
21
- IPaginatedInvestorAccounts,
22
- IPaginatedRegisteredInvestorUserZod,
23
- RegisteredInvestorUserFiltersZod,
24
- SeedInvestorAccountsForDemoUsersZod,
25
- } from '../../../common/types/investor-account.types';
26
-
27
- const c = initContract();
28
-
29
- export const investorAccountsContract = c.router(
30
- {
31
- getRegisteredInvestorUsers: {
32
- summary: 'Get registered investor users',
33
- method: 'GET',
34
- path: '/registered-users/:accountId',
35
- metadata: {
36
- auth: true,
37
- },
38
- pathParams: z.object({
39
- accountId: accountIdSchema,
40
- }),
41
- query: PaginationOptionsZod.merge(RegisteredInvestorUserFiltersZod),
42
- responses: {
43
- 200: IPaginatedRegisteredInvestorUserZod,
44
- 401: UnauthorizedError,
45
- 403: ForbiddenError,
46
- 500: InternalError,
47
- },
48
- },
49
- getInvestorAccount: {
50
- summary: 'Get investor account by id',
51
- method: 'GET',
52
- path: '/:id',
53
- metadata: {
54
- auth: true,
55
- },
56
- query: z.object({}).merge(InvestorAccountsIncludeQuery),
57
- pathParams: z.object({
58
- id: investorAccountIdSchema,
59
- }),
60
- responses: {
61
- 200: IInvestorAccount,
62
- 401: UnauthorizedError,
63
- 403: ForbiddenError,
64
- 404: NotFoundError,
65
- },
66
- },
67
- getInvestorAccounts: {
68
- summary: 'Get investor accounts',
69
- method: 'GET',
70
- path: '',
71
- metadata: {
72
- auth: true,
73
- },
74
- query: PaginationOptionsZod.merge(InvestorAccountsFiltersZod).merge(
75
- InvestorAccountsSortZod,
76
- ),
77
- responses: {
78
- 200: IPaginatedInvestorAccounts,
79
- 401: UnauthorizedError,
80
- 403: ForbiddenError,
81
- },
82
- },
83
- getInvestorAccountSummary: {
84
- summary: 'Get investor account summary',
85
- method: 'GET',
86
- path: '/:id/summary',
87
- metadata: {
88
- auth: true,
89
- },
90
- pathParams: z.object({
91
- id: investorAccountIdSchema,
92
- }),
93
- query: z.object({
94
- tradeId: tradeIdSchema.optional(),
95
- }),
96
- responses: {
97
- 200: IInvestorAccountSummary,
98
- 401: UnauthorizedError,
99
- 403: ForbiddenError,
100
- 404: NotFoundError,
101
- },
102
- },
103
- seedInvestorAccountsForDemoUsers: {
104
- summary: '[Admin] Seed investor accounts for demo users',
105
- method: 'POST',
106
- path: '/seed',
107
- metadata: {
108
- auth: true,
109
- },
110
- body: SeedInvestorAccountsForDemoUsersZod,
111
- responses: {
112
- 200: ExportInvestorAccountsResponse,
113
- 400: BadRequestError,
114
- 401: UnauthorizedError,
115
- 403: ForbiddenError,
116
- 404: NotFoundError,
117
- 500: InternalError,
118
- },
119
- },
120
- seedInvestorAccountsForAllDemoUsers: {
121
- summary: '[Admin] Seed investor accounts for all demo users',
122
- method: 'POST',
123
- path: '/seed-all',
124
- metadata: {
125
- auth: true,
126
- },
127
- body: z.object({}),
128
- responses: {
129
- 200: ExportInvestorAccountsResponse,
130
- 400: BadRequestError,
131
- 401: UnauthorizedError,
132
- 403: ForbiddenError,
133
- 404: NotFoundError,
134
- 500: InternalError,
135
- },
136
- },
137
- },
138
- {
139
- pathPrefix: 'investor-accounts',
140
- },
141
- );
@@ -1,137 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- BadRequestError,
4
- ForbiddenError,
5
- InternalError,
6
- inviteIdSchema,
7
- InviteWithoutSecretZod,
8
- InviteWithUrl,
9
- IPaginatedInvite,
10
- NotFoundError,
11
- PaginationOptionsZod,
12
- PatchInviteForComplianceZod,
13
- PortalType,
14
- UnauthorizedError,
15
- UserRole,
16
- } from '../../../common/types';
17
- import { z } from 'zod';
18
-
19
- const c = initContract();
20
-
21
- export const invitesContract = c.router(
22
- {
23
- getInvites: {
24
- summary: '[ADMIN] Get invites',
25
- method: 'GET',
26
- path: '',
27
- metadata: {
28
- auth: true,
29
- },
30
- query: PaginationOptionsZod,
31
- responses: {
32
- 200: IPaginatedInvite,
33
- 400: BadRequestError,
34
- 401: UnauthorizedError,
35
- 403: ForbiddenError,
36
- },
37
- },
38
- postInvite: {
39
- summary: '[ADMIN] Invite user',
40
- method: 'POST',
41
- path: '',
42
- metadata: {
43
- auth: true,
44
- },
45
- body: z.object({
46
- email: z.string().email(),
47
- role: z.nativeEnum(UserRole),
48
- accountId: z.string().optional(),
49
- portalType: z.nativeEnum(PortalType).optional(),
50
- }),
51
- responses: {
52
- 201: InviteWithUrl,
53
- 400: BadRequestError,
54
- 401: UnauthorizedError,
55
- 403: ForbiddenError,
56
- },
57
- },
58
- postInviteForCompliance: {
59
- summary: '[ADMIN] Invite user for Compliance',
60
- method: 'POST',
61
- path: '/compliance',
62
- metadata: {
63
- auth: true,
64
- },
65
- body: z.object({
66
- email: z.string().email(),
67
- role: z.nativeEnum(UserRole),
68
- }),
69
- responses: {
70
- 201: InviteWithUrl,
71
- 400: BadRequestError,
72
- 401: UnauthorizedError,
73
- 403: ForbiddenError,
74
- 500: InternalError,
75
- },
76
- },
77
- verifyInvite: {
78
- summary: 'Verify invite',
79
- method: 'GET',
80
- path: '/verify/:code',
81
- pathParams: z.object({
82
- code: z.string(),
83
- }),
84
- responses: {
85
- 200: z.object({
86
- valid: z.boolean(),
87
- email: z.string().email().nullable(),
88
- }),
89
- 400: BadRequestError,
90
- },
91
- },
92
- patchInviteRole: {
93
- summary: 'Patch invite role',
94
- method: 'PATCH',
95
- path: '/:id/role',
96
- pathParams: z.object({
97
- id: inviteIdSchema,
98
- }),
99
- metadata: {
100
- auth: true,
101
- },
102
- body: PatchInviteForComplianceZod,
103
- responses: {
104
- 201: InviteWithoutSecretZod,
105
- 400: BadRequestError,
106
- 401: UnauthorizedError,
107
- 403: ForbiddenError,
108
- 404: NotFoundError,
109
- 500: InternalError,
110
- },
111
- },
112
- deleteInvite: {
113
- summary: 'Delete invite by id',
114
- method: 'DELETE',
115
- path: '/:id',
116
- metadata: {
117
- auth: true,
118
- },
119
- pathParams: z.object({
120
- id: inviteIdSchema,
121
- }),
122
- responses: {
123
- 200: z.object({
124
- message: z.string(),
125
- }),
126
- 400: BadRequestError,
127
- 401: UnauthorizedError,
128
- 403: ForbiddenError,
129
- 404: NotFoundError,
130
- 500: InternalError,
131
- },
132
- },
133
- },
134
- {
135
- pathPrefix: 'invites',
136
- },
137
- );
@@ -1,81 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- InternalError,
5
- NotFoundError,
6
- UnauthorizedError,
7
- PaginationOptionsZod,
8
- BadRequestError,
9
- } from '../../../common/types';
10
- import {
11
- IIssuerBankAccount,
12
- IPaginatedIssuerBankAccount,
13
- issuerBankAccountIdSchema,
14
- IssuerBankAccountsFilter,
15
- IssuerBankAccountsIncludeQuery,
16
- PatchIssuerBankAccount,
17
- PostIssuerBankAccount,
18
- } from '../../../common/types/issuer-bank-account.types';
19
- import { z } from 'zod';
20
-
21
- const c = initContract();
22
-
23
- export const issuerBankAccountsContract = c.router(
24
- {
25
- getIssuerBankAccounts: {
26
- summary: 'Get issuer bank accounts',
27
- method: 'GET',
28
- path: '',
29
- metadata: {
30
- auth: true,
31
- },
32
- query: PaginationOptionsZod.merge(IssuerBankAccountsFilter).merge(
33
- IssuerBankAccountsIncludeQuery,
34
- ),
35
- responses: {
36
- 200: IPaginatedIssuerBankAccount,
37
- 401: UnauthorizedError,
38
- 403: ForbiddenError,
39
- 404: NotFoundError,
40
- 500: InternalError,
41
- },
42
- },
43
- postIssuerBankAccount: {
44
- summary: 'Create an issuer bank account',
45
- method: 'POST',
46
- path: '',
47
- metadata: {
48
- auth: true,
49
- },
50
- body: PostIssuerBankAccount,
51
- responses: {
52
- 201: IIssuerBankAccount,
53
- 400: BadRequestError,
54
- 401: UnauthorizedError,
55
- 404: NotFoundError,
56
- 500: InternalError,
57
- },
58
- },
59
- patchIssuerBankAccount: {
60
- summary: 'Update issuer bank account',
61
- method: 'PATCH',
62
- path: '/:id',
63
- metadata: {
64
- auth: true,
65
- },
66
- pathParams: z.object({ id: issuerBankAccountIdSchema }),
67
- body: PatchIssuerBankAccount,
68
- responses: {
69
- 201: IIssuerBankAccount,
70
- 400: BadRequestError,
71
- 401: UnauthorizedError,
72
- 403: ForbiddenError,
73
- 404: NotFoundError,
74
- 500: InternalError,
75
- },
76
- },
77
- },
78
- {
79
- pathPrefix: 'issuer-bank-accounts',
80
- },
81
- );
@@ -1,81 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- InternalError,
5
- NotFoundError,
6
- UnauthorizedError,
7
- ComplianceGetIssuerPaymentMethodZod,
8
- IIssuerPaymentMethod,
9
- IPaginatedIssuerPaymentMethod,
10
- issuerPaymentMethodIdSchema,
11
- PaginationOptionsZod,
12
- accountIdSchema,
13
- CompliancePatchIssuerPaymentMethodZod,
14
- } from '../../../common/types';
15
- import { z } from 'zod';
16
-
17
- const c = initContract();
18
-
19
- export const issuerPaymentMethodsContract = c.router(
20
- {
21
- getIssuerPaymentMethods: {
22
- summary: 'get payment methods',
23
- method: 'GET',
24
- path: '',
25
- metadata: {
26
- auth: true,
27
- },
28
- query: PaginationOptionsZod.merge(ComplianceGetIssuerPaymentMethodZod),
29
- responses: {
30
- 200: IPaginatedIssuerPaymentMethod,
31
- 401: UnauthorizedError,
32
- 403: ForbiddenError,
33
- 404: NotFoundError,
34
- 500: InternalError,
35
- },
36
- },
37
- patchIssuerPaymentMethod: {
38
- summary: 'PATCH issuer payment method for compliance',
39
- method: 'PATCH',
40
- path: '/:id',
41
- pathParams: z.object({
42
- id: issuerPaymentMethodIdSchema,
43
- }),
44
- metadata: {
45
- auth: true,
46
- },
47
- body: CompliancePatchIssuerPaymentMethodZod,
48
- responses: {
49
- 201: IIssuerPaymentMethod,
50
- 401: UnauthorizedError,
51
- 403: ForbiddenError,
52
- 404: NotFoundError,
53
- 500: InternalError,
54
- },
55
- },
56
- toggleIssuerPaymentMethod: {
57
- summary: 'Toggle issuer payment method',
58
- method: 'PATCH',
59
- path: '/:id/toggle',
60
- metadata: {
61
- auth: true,
62
- },
63
- pathParams: z.object({
64
- id: issuerPaymentMethodIdSchema,
65
- }),
66
- body: z.object({
67
- enabled: z.boolean(),
68
- accountId: accountIdSchema,
69
- }),
70
- responses: {
71
- 200: IIssuerPaymentMethod,
72
- 401: UnauthorizedError,
73
- 403: ForbiddenError,
74
- 404: NotFoundError,
75
- },
76
- },
77
- },
78
- {
79
- pathPrefix: 'issuer-payment-methods',
80
- },
81
- );
@@ -1,97 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- BadRequestError,
4
- ForbiddenError,
5
- InternalError,
6
- NotFoundError,
7
- PaginationOptionsZod,
8
- UnauthorizedError,
9
- } from '../../../common/types';
10
- import {
11
- CompliancePostIssuerZod,
12
- IIssuer,
13
- IPaginatedIssersSummary,
14
- issuerIdSchema,
15
- IssuersIncludeQuery,
16
- IssuersSortZod,
17
- IssuersSummaryFilterZod,
18
- PutIssuerZod,
19
- } from '../../../common/types/issuer.types';
20
- import { z } from 'zod';
21
-
22
- const c = initContract();
23
-
24
- export const issuersContract = c.router(
25
- {
26
- getIssuersSummary: {
27
- summary: 'Get Issuers Summary',
28
- method: 'GET',
29
- path: '',
30
- metadata: {
31
- auth: true,
32
- },
33
- query: PaginationOptionsZod.merge(IssuersSummaryFilterZod).merge(
34
- IssuersSortZod,
35
- ),
36
- responses: {
37
- 200: IPaginatedIssersSummary,
38
- 401: UnauthorizedError,
39
- 403: ForbiddenError,
40
- },
41
- },
42
- getIssuer: {
43
- summary: 'Get issuer by id',
44
- method: 'GET',
45
- path: '/:id',
46
- metadata: {
47
- auth: true,
48
- },
49
- query: z.object({}).merge(IssuersIncludeQuery),
50
- pathParams: z.object({ id: issuerIdSchema }),
51
- responses: {
52
- 200: IIssuer,
53
- 401: UnauthorizedError,
54
- 403: ForbiddenError,
55
- 404: NotFoundError,
56
- },
57
- },
58
- postIssuer: {
59
- summary: '[ADMIN] Create an issuer for a specific account',
60
- method: 'POST',
61
- path: '',
62
- metadata: {
63
- auth: true,
64
- },
65
- body: CompliancePostIssuerZod,
66
- responses: {
67
- 201: IIssuer,
68
- 401: UnauthorizedError,
69
- 403: ForbiddenError,
70
- 500: InternalError,
71
- },
72
- },
73
- updateIssuer: {
74
- summary: 'Update issuer',
75
- method: 'PUT',
76
- path: '/:id',
77
- metadata: {
78
- auth: true,
79
- },
80
- pathParams: z.object({
81
- id: issuerIdSchema,
82
- }),
83
- body: PutIssuerZod,
84
- responses: {
85
- 200: IIssuer,
86
- 400: BadRequestError,
87
- 401: UnauthorizedError,
88
- 403: ForbiddenError,
89
- 404: NotFoundError,
90
- 500: InternalError,
91
- },
92
- },
93
- },
94
- {
95
- pathPrefix: 'issuers',
96
- },
97
- );
@@ -1,58 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- InternalError,
5
- NotFoundError,
6
- PaginationOptionsZod,
7
- UnauthorizedError,
8
- } from '../../../common/types';
9
- import { z } from 'zod';
10
- import {
11
- IPaginatedJobItem,
12
- JobItemFiltersZod,
13
- JobItemIdSchema,
14
- JobItemZod,
15
- } from '../../../common/types/job-item.types';
16
-
17
- const c = initContract();
18
-
19
- export const jobItemsContract = c.router(
20
- {
21
- getJobItems: {
22
- summary: 'Get job items',
23
- method: 'GET',
24
- path: '',
25
- metadata: {
26
- auth: true,
27
- },
28
- query: PaginationOptionsZod.merge(JobItemFiltersZod),
29
- responses: {
30
- 200: IPaginatedJobItem,
31
- 401: UnauthorizedError,
32
- 403: ForbiddenError,
33
- 500: InternalError,
34
- },
35
- },
36
- getJobItem: {
37
- summary: 'Get job item by id',
38
- method: 'GET',
39
- path: '/:id',
40
- metadata: {
41
- auth: true,
42
- },
43
- pathParams: z.object({
44
- id: JobItemIdSchema,
45
- }),
46
- responses: {
47
- 200: JobItemZod,
48
- 401: UnauthorizedError,
49
- 403: ForbiddenError,
50
- 404: NotFoundError,
51
- 500: InternalError,
52
- },
53
- },
54
- },
55
- {
56
- pathPrefix: 'job-items',
57
- },
58
- );
@@ -1,59 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- CheckInvestorParamsSchema,
4
- ForbiddenError,
5
- QueueTradeSaLogSchema,
6
- UnauthorizedError,
7
- } from '../../../common/types';
8
- import { z } from 'zod';
9
-
10
- const c = initContract();
11
-
12
- export const jobsContract = c.router(
13
- {
14
- postInvestorCheck: {
15
- summary: 'Create a investor check',
16
- method: 'POST',
17
- path: '/investor-check',
18
- metadata: {
19
- auth: true,
20
- },
21
- body: CheckInvestorParamsSchema,
22
- responses: {
23
- 201: z.object({ success: z.boolean() }),
24
- 401: UnauthorizedError,
25
- 403: ForbiddenError,
26
- },
27
- },
28
- queueInvestorCheck: {
29
- summary: 'Manually trigger the queue check',
30
- method: 'GET',
31
- path: '/queue-investor-check',
32
- metadata: {
33
- auth: true,
34
- },
35
- responses: {
36
- 201: z.object({ success: z.boolean() }),
37
- 401: UnauthorizedError,
38
- 403: ForbiddenError,
39
- },
40
- },
41
- queueTradeSaLog: {
42
- summary: 'Manually trigger the queue trade sa log',
43
- method: 'POST',
44
- path: '/queue-trade-salog',
45
- metadata: {
46
- auth: true,
47
- },
48
- body: QueueTradeSaLogSchema,
49
- responses: {
50
- 201: z.object({ success: z.boolean() }),
51
- 401: UnauthorizedError,
52
- 403: ForbiddenError,
53
- },
54
- },
55
- },
56
- {
57
- pathPrefix: 'jobs',
58
- },
59
- );
@@ -1,54 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- IPaginatedKyb,
5
- NotFoundError,
6
- PaginationOptionsZod,
7
- UnauthorizedError,
8
- KybZod,
9
- KybFiltersZod,
10
- kybIdSchema,
11
- } from '../../../common/types';
12
- import { z } from 'zod';
13
-
14
- const c = initContract();
15
-
16
- export const kybsContract = c.router(
17
- {
18
- getKyb: {
19
- summary: 'Get kyb by id',
20
- method: 'GET',
21
- path: '/:id',
22
- metadata: {
23
- auth: true,
24
- },
25
- query: z.object({}).merge(KybFiltersZod),
26
- pathParams: z.object({
27
- id: kybIdSchema,
28
- }),
29
- responses: {
30
- 200: KybZod,
31
- 401: UnauthorizedError,
32
- 403: ForbiddenError,
33
- 404: NotFoundError,
34
- },
35
- },
36
- getKybs: {
37
- summary: 'Get kybs',
38
- method: 'GET',
39
- path: '',
40
- metadata: {
41
- auth: true,
42
- },
43
- query: PaginationOptionsZod.merge(KybFiltersZod),
44
- responses: {
45
- 200: IPaginatedKyb,
46
- 401: UnauthorizedError,
47
- 403: ForbiddenError,
48
- },
49
- },
50
- },
51
- {
52
- pathPrefix: 'kybs',
53
- },
54
- );