@dalmore/api-contracts 0.0.0-dev.d6badc9 → 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 (187) 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/auth.types.ts +7 -18
  5. package/common/types/common.types.ts +22 -0
  6. package/common/types/contact-us.types.ts +6 -2
  7. package/common/types/covered-person.types.ts +2 -1
  8. package/common/types/escrow-account.types.ts +3 -3
  9. package/common/types/individuals.types.ts +3 -2
  10. package/common/types/investor-account.types.ts +2 -1
  11. package/common/types/invite.types.ts +27 -1
  12. package/common/types/legal-entity.types.ts +3 -2
  13. package/common/types/mail-template.types.ts +34 -0
  14. package/common/types/note.types.ts +1 -1
  15. package/common/types/site-settings.types.ts +2 -1
  16. package/common/types/trade.types.ts +47 -1
  17. package/common/types/trusted-contact.types.ts +7 -7
  18. package/common/types/user.types.ts +2 -5
  19. package/index.ts +10 -0
  20. package/package.json +23 -32
  21. package/contracts/compliance/account-contacts/index.ts +0 -82
  22. package/contracts/compliance/account-managers/index.ts +0 -142
  23. package/contracts/compliance/account-settings/index.ts +0 -59
  24. package/contracts/compliance/accounts/index.ts +0 -187
  25. package/contracts/compliance/activities/index.ts +0 -55
  26. package/contracts/compliance/aic/index.ts +0 -60
  27. package/contracts/compliance/api-keys/index.ts +0 -91
  28. package/contracts/compliance/assets/index.ts +0 -122
  29. package/contracts/compliance/auth/index.ts +0 -134
  30. package/contracts/compliance/batch-jobs/index.ts +0 -62
  31. package/contracts/compliance/bonus-tiers/index.ts +0 -74
  32. package/contracts/compliance/checklist/index.ts +0 -87
  33. package/contracts/compliance/checklist-items/index.ts +0 -86
  34. package/contracts/compliance/covered-persons/index.ts +0 -97
  35. package/contracts/compliance/dashboard/index.ts +0 -111
  36. package/contracts/compliance/data-records/index.ts +0 -116
  37. package/contracts/compliance/data-rooms/index.ts +0 -113
  38. package/contracts/compliance/default-theme-configs/index.ts +0 -95
  39. package/contracts/compliance/disbursement/index.ts +0 -165
  40. package/contracts/compliance/disbursement-approval-users/index.ts +0 -84
  41. package/contracts/compliance/disbursement-transactions/index.ts +0 -37
  42. package/contracts/compliance/domain-filters/index.ts +0 -117
  43. package/contracts/compliance/email-themes/index.ts +0 -284
  44. package/contracts/compliance/escrow-accounts/index.ts +0 -85
  45. package/contracts/compliance/exchange-api-keys/index.ts +0 -129
  46. package/contracts/compliance/exchange-imports/index.ts +0 -137
  47. package/contracts/compliance/files/index.ts +0 -267
  48. package/contracts/compliance/files-public/index.ts +0 -188
  49. package/contracts/compliance/health/index.ts +0 -26
  50. package/contracts/compliance/index.ts +0 -151
  51. package/contracts/compliance/individuals/index.ts +0 -57
  52. package/contracts/compliance/investor-accounts/index.ts +0 -141
  53. package/contracts/compliance/invites/index.ts +0 -137
  54. package/contracts/compliance/issuer-bank-accounts/index.ts +0 -81
  55. package/contracts/compliance/issuer-payment-methods/index.ts +0 -81
  56. package/contracts/compliance/issuers/index.ts +0 -97
  57. package/contracts/compliance/job-items/index.ts +0 -58
  58. package/contracts/compliance/jobs/index.ts +0 -59
  59. package/contracts/compliance/kyb/index.ts +0 -54
  60. package/contracts/compliance/kyc/index.ts +0 -77
  61. package/contracts/compliance/legal-entities/index.ts +0 -57
  62. package/contracts/compliance/login-histories/index.ts +0 -37
  63. package/contracts/compliance/notes/index.ts +0 -69
  64. package/contracts/compliance/notification-channels/index.ts +0 -251
  65. package/contracts/compliance/notion-databases/index.ts +0 -107
  66. package/contracts/compliance/notion-pages/index.ts +0 -105
  67. package/contracts/compliance/offering-reports/index.ts +0 -149
  68. package/contracts/compliance/offerings/index.ts +0 -233
  69. package/contracts/compliance/pages/index.ts +0 -178
  70. package/contracts/compliance/payment-methods/index.ts +0 -57
  71. package/contracts/compliance/rejection-reasons/index.ts +0 -32
  72. package/contracts/compliance/review/index.ts +0 -169
  73. package/contracts/compliance/roles/index.ts +0 -34
  74. package/contracts/compliance/secondary-customers/index.ts +0 -77
  75. package/contracts/compliance/secondary-orders/index.ts +0 -60
  76. package/contracts/compliance/secondary-trades/index.ts +0 -100
  77. package/contracts/compliance/secure-requests/index.ts +0 -54
  78. package/contracts/compliance/signer/index.ts +0 -369
  79. package/contracts/compliance/site-links/index.ts +0 -128
  80. package/contracts/compliance/site-settings/index.ts +0 -669
  81. package/contracts/compliance/sites/index.ts +0 -56
  82. package/contracts/compliance/state-machine/index.ts +0 -94
  83. package/contracts/compliance/tasks/index.ts +0 -91
  84. package/contracts/compliance/third-parties/index.ts +0 -52
  85. package/contracts/compliance/trade-line-items/index.ts +0 -59
  86. package/contracts/compliance/trades/index.ts +0 -230
  87. package/contracts/compliance/transactions/index.ts +0 -161
  88. package/contracts/compliance/user-manuals/index.ts +0 -271
  89. package/contracts/compliance/user-settings/index.ts +0 -189
  90. package/contracts/compliance/users/index.ts +0 -221
  91. package/contracts/compliance/webhooks/index.ts +0 -41
  92. package/contracts/compliance-apikey/accounts/index.ts +0 -58
  93. package/contracts/compliance-apikey/index.ts +0 -14
  94. package/contracts/index.ts +0 -6
  95. package/contracts/investors/account-contacts/index.ts +0 -58
  96. package/contracts/investors/aic/index.ts +0 -59
  97. package/contracts/investors/assets/index.ts +0 -61
  98. package/contracts/investors/auth/index.ts +0 -116
  99. package/contracts/investors/bonus-tiers/index.ts +0 -55
  100. package/contracts/investors/cart/index.ts +0 -75
  101. package/contracts/investors/contact-us/index.ts +0 -48
  102. package/contracts/investors/data-records/index.ts +0 -113
  103. package/contracts/investors/data-rooms/index.ts +0 -96
  104. package/contracts/investors/files/index.ts +0 -167
  105. package/contracts/investors/files-public/index.ts +0 -185
  106. package/contracts/investors/index.ts +0 -72
  107. package/contracts/investors/individuals/index.ts +0 -121
  108. package/contracts/investors/investor-accounts/index.ts +0 -110
  109. package/contracts/investors/issuer-payment-methods/index.ts +0 -36
  110. package/contracts/investors/issuers/index.ts +0 -30
  111. package/contracts/investors/legal-entities/index.ts +0 -93
  112. package/contracts/investors/notes/index.ts +0 -69
  113. package/contracts/investors/offerings/index.ts +0 -93
  114. package/contracts/investors/pages/index.ts +0 -88
  115. package/contracts/investors/payment-methods/index.ts +0 -149
  116. package/contracts/investors/portfolios/index.ts +0 -53
  117. package/contracts/investors/sites/index.ts +0 -96
  118. package/contracts/investors/tasks/index.ts +0 -111
  119. package/contracts/investors/trade-line-items/index.ts +0 -75
  120. package/contracts/investors/trades/index.ts +0 -114
  121. package/contracts/investors/transactions/index.ts +0 -37
  122. package/contracts/investors/trusted-contacts/index.ts +0 -93
  123. package/contracts/investors/user-manuals/index.ts +0 -62
  124. package/contracts/investors/user-settings/index.ts +0 -170
  125. package/contracts/investors/users/index.ts +0 -45
  126. package/contracts/investors/webhooks/index.ts +0 -30
  127. package/contracts/issuers/account-contacts/index.ts +0 -76
  128. package/contracts/issuers/account-integrations/index.ts +0 -97
  129. package/contracts/issuers/account-settings/index.ts +0 -36
  130. package/contracts/issuers/accounts/index.ts +0 -97
  131. package/contracts/issuers/activities/index.ts +0 -54
  132. package/contracts/issuers/aic/index.ts +0 -39
  133. package/contracts/issuers/api-key-logs/index.ts +0 -53
  134. package/contracts/issuers/api-keys/index.ts +0 -93
  135. package/contracts/issuers/assets/index.ts +0 -122
  136. package/contracts/issuers/auth/index.ts +0 -152
  137. package/contracts/issuers/bonus-tiers/index.ts +0 -73
  138. package/contracts/issuers/contact-us/index.ts +0 -48
  139. package/contracts/issuers/covered-persons/index.ts +0 -136
  140. package/contracts/issuers/dashboard/index.ts +0 -72
  141. package/contracts/issuers/data-records/index.ts +0 -257
  142. package/contracts/issuers/data-rooms/index.ts +0 -134
  143. package/contracts/issuers/disbursement-approval-users/index.ts +0 -82
  144. package/contracts/issuers/disbursement-transactions/index.ts +0 -53
  145. package/contracts/issuers/disbursements/index.ts +0 -189
  146. package/contracts/issuers/email-themes/index.ts +0 -242
  147. package/contracts/issuers/escrow-accounts/index.ts +0 -81
  148. package/contracts/issuers/exchange-api-keys/index.ts +0 -144
  149. package/contracts/issuers/files/index.ts +0 -166
  150. package/contracts/issuers/files-public/index.ts +0 -166
  151. package/contracts/issuers/health/index.ts +0 -24
  152. package/contracts/issuers/index.ts +0 -116
  153. package/contracts/issuers/investor-accounts/index.ts +0 -148
  154. package/contracts/issuers/invites/index.ts +0 -129
  155. package/contracts/issuers/issuer/index.ts +0 -94
  156. package/contracts/issuers/issuer-bank-accounts/index.ts +0 -81
  157. package/contracts/issuers/issuer-payment-methods/index.ts +0 -136
  158. package/contracts/issuers/kyc/index.ts +0 -38
  159. package/contracts/issuers/login-histories/index.ts +0 -51
  160. package/contracts/issuers/notes/index.ts +0 -69
  161. package/contracts/issuers/notification-channels/index.ts +0 -251
  162. package/contracts/issuers/offerings/index.ts +0 -206
  163. package/contracts/issuers/pages/index.ts +0 -138
  164. package/contracts/issuers/payment-methods/index.ts +0 -61
  165. package/contracts/issuers/portfolios/index.ts +0 -36
  166. package/contracts/issuers/rejection-reasons/index.ts +0 -32
  167. package/contracts/issuers/review/index.ts +0 -63
  168. package/contracts/issuers/secondary-customers/index.ts +0 -55
  169. package/contracts/issuers/secondary-orders/index.ts +0 -57
  170. package/contracts/issuers/secondary-trades/index.ts +0 -57
  171. package/contracts/issuers/secure-requests/index.ts +0 -34
  172. package/contracts/issuers/site-links/index.ts +0 -116
  173. package/contracts/issuers/site-settings/index.ts +0 -585
  174. package/contracts/issuers/sites/index.ts +0 -32
  175. package/contracts/issuers/tasks/index.ts +0 -111
  176. package/contracts/issuers/trades/index.ts +0 -132
  177. package/contracts/issuers/transactions/index.ts +0 -158
  178. package/contracts/issuers/user-manuals/index.ts +0 -62
  179. package/contracts/issuers/user-settings/index.ts +0 -170
  180. package/contracts/issuers/users/index.ts +0 -126
  181. package/contracts/secondaries/accounts/index.ts +0 -58
  182. package/contracts/secondaries/index.ts +0 -23
  183. package/contracts/secondaries/secondary-customers/index.ts +0 -55
  184. package/contracts/secondaries/secondary-issuers/index.ts +0 -94
  185. package/contracts/secondaries/secondary-orders/index.ts +0 -56
  186. package/contracts/secondaries/secondary-securities/index.ts +0 -95
  187. package/contracts/secondaries/secondary-trades/index.ts +0 -56
@@ -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,136 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- InternalError,
5
- NotFoundError,
6
- UnauthorizedError,
7
- GetIssuerPaymentMethodZod,
8
- IIssuerPaymentMethod,
9
- IPaginatedIssuerPaymentMethod,
10
- issuerPaymentMethodIdSchema,
11
- PatchIssuerPaymentMethodZod,
12
- PaginationOptionsZod,
13
- ConnectIssuerPaymentMethodZod,
14
- BadRequestError,
15
- } from '../../../common/types';
16
- import { z } from 'zod';
17
-
18
- const c = initContract();
19
-
20
- export const issuerPaymentMethodsContract = c.router(
21
- {
22
- getIssuerPaymentMethods: {
23
- summary: 'get payment methods',
24
- method: 'GET',
25
- path: '',
26
- metadata: {
27
- auth: true,
28
- },
29
- query: PaginationOptionsZod.merge(GetIssuerPaymentMethodZod),
30
- responses: {
31
- 200: IPaginatedIssuerPaymentMethod,
32
- 401: UnauthorizedError,
33
- 403: ForbiddenError,
34
- 404: NotFoundError,
35
- 500: InternalError,
36
- },
37
- },
38
- patchIssuerPaymentMethod: {
39
- summary: 'PATCH issuer payment method',
40
- method: 'PATCH',
41
- path: '/:id',
42
- pathParams: z.object({
43
- id: issuerPaymentMethodIdSchema,
44
- }),
45
- metadata: {
46
- auth: true,
47
- },
48
- body: PatchIssuerPaymentMethodZod,
49
- responses: {
50
- 201: IIssuerPaymentMethod,
51
- 401: UnauthorizedError,
52
- 403: ForbiddenError,
53
- 404: NotFoundError,
54
- 500: InternalError,
55
- },
56
- },
57
- toggleIssuerPaymentMethod: {
58
- summary: 'Toggle issuer payment method',
59
- method: 'PATCH',
60
- path: '/:id/toggle',
61
- metadata: {
62
- auth: true,
63
- },
64
- pathParams: z.object({
65
- id: issuerPaymentMethodIdSchema,
66
- }),
67
- body: z.object({
68
- enabled: z.boolean(),
69
- }),
70
- responses: {
71
- 200: IIssuerPaymentMethod,
72
- 401: UnauthorizedError,
73
- 403: ForbiddenError,
74
- 404: NotFoundError,
75
- },
76
- },
77
- connectIssuerPaymentMethod: {
78
- summary: 'Connect issuer payment method',
79
- method: 'POST',
80
- path: '/integrations/connect',
81
- metadata: {
82
- auth: true,
83
- },
84
- body: ConnectIssuerPaymentMethodZod,
85
- responses: {
86
- 200: z.array(IIssuerPaymentMethod),
87
- 400: BadRequestError,
88
- 401: UnauthorizedError,
89
- 403: ForbiddenError,
90
- 404: NotFoundError,
91
- 500: InternalError,
92
- },
93
- },
94
- disconnectIssuerPaymentMethod: {
95
- summary: 'Disconnect issuer payment method',
96
- method: 'PATCH',
97
- path: '/:id/integrations/disconnect',
98
- metadata: {
99
- auth: true,
100
- },
101
- pathParams: z.object({
102
- id: issuerPaymentMethodIdSchema,
103
- }),
104
- body: z.object({}),
105
- responses: {
106
- 200: IIssuerPaymentMethod,
107
- 401: UnauthorizedError,
108
- 403: ForbiddenError,
109
- 404: NotFoundError,
110
- 500: InternalError,
111
- },
112
- },
113
- createIssuerPaymentMethodAccountLink: {
114
- summary: 'Create issuer payment method account link',
115
- method: 'POST',
116
- path: '/:id/integrations/account-link',
117
- metadata: {
118
- auth: true,
119
- },
120
- pathParams: z.object({
121
- id: issuerPaymentMethodIdSchema,
122
- }),
123
- body: z.object({}),
124
- responses: {
125
- 200: IIssuerPaymentMethod,
126
- 401: UnauthorizedError,
127
- 403: ForbiddenError,
128
- 404: NotFoundError,
129
- 500: InternalError,
130
- },
131
- },
132
- },
133
- {
134
- pathPrefix: 'issuer-payment-methods',
135
- },
136
- );
@@ -1,38 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- ForbiddenError,
4
- InternalError,
5
- UnauthorizedError,
6
- inquiryIdSchema,
7
- InquiryResponse,
8
- ServiceUnavailableError,
9
- } from '../../../common/types';
10
- import { z } from 'zod';
11
-
12
- const c = initContract();
13
-
14
- export const kycsContract = c.router(
15
- {
16
- getInquiry: {
17
- summary: 'KYC inquiry by ID',
18
- method: 'GET',
19
- path: '/inquiries/:inquiryId',
20
- metadata: {
21
- auth: true,
22
- },
23
- pathParams: z.object({
24
- inquiryId: inquiryIdSchema,
25
- }),
26
- responses: {
27
- 200: InquiryResponse,
28
- 401: UnauthorizedError,
29
- 403: ForbiddenError,
30
- 500: InternalError,
31
- 503: ServiceUnavailableError,
32
- },
33
- },
34
- },
35
- {
36
- pathPrefix: 'kycs',
37
- },
38
- );
@@ -1,51 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
-
3
- import {
4
- BadRequestError,
5
- ForbiddenError,
6
- UnauthorizedError,
7
- IListLoginHistories,
8
- userIdSchema,
9
- } from '../../../common/types';
10
- import { z } from 'zod';
11
-
12
- const c = initContract();
13
-
14
- export const loginHistoriesContract = c.router(
15
- {
16
- getLoginHistories: {
17
- summary: 'Get Login Histories',
18
- method: 'GET',
19
- path: '',
20
- metadata: {
21
- auth: true,
22
- },
23
- responses: {
24
- 200: IListLoginHistories,
25
- 400: BadRequestError,
26
- 401: UnauthorizedError,
27
- 403: ForbiddenError,
28
- },
29
- },
30
- getLoginHistoriesByUserId: {
31
- summary: 'Get Login Histories by User id',
32
- method: 'GET',
33
- path: '/:userId',
34
- metadata: {
35
- auth: true,
36
- },
37
- pathParams: z.object({
38
- userId: userIdSchema,
39
- }),
40
- responses: {
41
- 200: IListLoginHistories,
42
- 400: BadRequestError,
43
- 401: UnauthorizedError,
44
- 403: ForbiddenError,
45
- },
46
- },
47
- },
48
- {
49
- pathPrefix: 'login-histories',
50
- },
51
- );
@@ -1,69 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import {
3
- BadRequestError,
4
- InternalError,
5
- IPaginatedNote,
6
- noteIdSchema,
7
- NotesFilters,
8
- NoteZod,
9
- NotFoundError,
10
- PaginationOptionsZod,
11
- PostNoteBody,
12
- UnauthorizedError,
13
- } from '../../../common/types';
14
- import { z } from 'zod';
15
-
16
- const c = initContract();
17
-
18
- export const issuerNotesContract = c.router(
19
- {
20
- postNote: {
21
- summary: 'Create a note',
22
- method: 'POST',
23
- path: '',
24
- metadata: {
25
- auth: true,
26
- },
27
- body: PostNoteBody,
28
- responses: {
29
- 201: NoteZod,
30
- 400: BadRequestError,
31
- 401: UnauthorizedError,
32
- 404: NotFoundError,
33
- 500: InternalError,
34
- },
35
- },
36
- getNotes: {
37
- summary: 'Get notes',
38
- method: 'GET',
39
- path: '',
40
- metadata: {
41
- auth: true,
42
- },
43
- query: PaginationOptionsZod.merge(NotesFilters),
44
- responses: {
45
- 200: IPaginatedNote,
46
- 401: UnauthorizedError,
47
- },
48
- },
49
- getNote: {
50
- summary: 'Get note by id',
51
- method: 'GET',
52
- path: '/:id',
53
- metadata: {
54
- auth: true,
55
- },
56
- pathParams: z.object({
57
- id: noteIdSchema,
58
- }),
59
- responses: {
60
- 200: NoteZod,
61
- 401: UnauthorizedError,
62
- 404: NotFoundError,
63
- },
64
- },
65
- },
66
- {
67
- pathPrefix: 'notes',
68
- },
69
- );
@@ -1,251 +0,0 @@
1
- import { initContract } from '@ts-rest/core';
2
- import { z } from 'zod';
3
- import {
4
- IssuerCreateChannelInputSchema,
5
- CreateTriggerInputSchema,
6
- IAvailableTriggersResponse,
7
- INotificationChannelTriggerZod,
8
- INotificationChannelZod,
9
- INotificationRecordZod,
10
- IPaginatedNotificationChannel,
11
- IPaginatedNotificationRecord,
12
- NotificationChannelFilters,
13
- NotificationChannelsIncludeQuery,
14
- notificationChannelIdSchema,
15
- notificationChannelTriggerIdSchema,
16
- NotificationRecordFilters,
17
- NotificationRecordsIncludeQuery,
18
- notificationRecordIdSchema,
19
- UpdateChannelInputSchema,
20
- } from '../../../common/types/notification.types';
21
- import {
22
- BadRequestError,
23
- InternalError,
24
- NotFoundError,
25
- PaginationOptionsZod,
26
- UnauthorizedError,
27
- } from '../../../common/types';
28
-
29
- const c = initContract();
30
-
31
- export const issuerNotificationChannelsContract = c.router(
32
- {
33
- getChannels: {
34
- summary: 'Get notification channels for current account',
35
- method: 'GET',
36
- path: '',
37
- metadata: {
38
- auth: true,
39
- },
40
- query: PaginationOptionsZod.merge(
41
- NotificationChannelFilters.omit({ accountSettingsId: true }),
42
- ).merge(NotificationChannelsIncludeQuery),
43
- responses: {
44
- 200: IPaginatedNotificationChannel,
45
- 401: UnauthorizedError,
46
- 500: InternalError,
47
- },
48
- },
49
- getChannel: {
50
- summary: 'Get notification channel by id',
51
- method: 'GET',
52
- path: '/:id',
53
- metadata: {
54
- auth: true,
55
- },
56
- pathParams: z.object({
57
- id: notificationChannelIdSchema,
58
- }),
59
- query: z.object({}).merge(NotificationChannelsIncludeQuery),
60
- responses: {
61
- 200: INotificationChannelZod,
62
- 401: UnauthorizedError,
63
- 404: NotFoundError,
64
- 500: InternalError,
65
- },
66
- },
67
- createChannel: {
68
- summary: 'Create notification channel for current account',
69
- method: 'POST',
70
- path: '',
71
- metadata: {
72
- auth: true,
73
- },
74
- body: IssuerCreateChannelInputSchema,
75
- responses: {
76
- 201: INotificationChannelZod,
77
- 400: BadRequestError,
78
- 401: UnauthorizedError,
79
- 500: InternalError,
80
- },
81
- },
82
- updateChannel: {
83
- summary: 'Update notification channel',
84
- method: 'PATCH',
85
- path: '/:id',
86
- metadata: {
87
- auth: true,
88
- },
89
- pathParams: z.object({
90
- id: notificationChannelIdSchema,
91
- }),
92
- body: UpdateChannelInputSchema,
93
- responses: {
94
- 200: INotificationChannelZod,
95
- 400: BadRequestError,
96
- 401: UnauthorizedError,
97
- 404: NotFoundError,
98
- 500: InternalError,
99
- },
100
- },
101
- deleteChannel: {
102
- summary: 'Delete notification channel',
103
- method: 'DELETE',
104
- path: '/:id',
105
- metadata: {
106
- auth: true,
107
- },
108
- pathParams: z.object({
109
- id: notificationChannelIdSchema,
110
- }),
111
- body: z.object({}),
112
- responses: {
113
- 200: z.object({ success: z.boolean() }),
114
- 401: UnauthorizedError,
115
- 404: NotFoundError,
116
- 500: InternalError,
117
- },
118
- },
119
- createTrigger: {
120
- summary: 'Create notification channel trigger',
121
- method: 'POST',
122
- path: '/:id/triggers',
123
- metadata: {
124
- auth: true,
125
- },
126
- pathParams: z.object({
127
- id: notificationChannelIdSchema,
128
- }),
129
- body: CreateTriggerInputSchema.omit({ notificationChannelId: true }),
130
- responses: {
131
- 201: INotificationChannelTriggerZod,
132
- 400: BadRequestError,
133
- 401: UnauthorizedError,
134
- 404: NotFoundError,
135
- 500: InternalError,
136
- },
137
- },
138
- getAvailableTriggers: {
139
- summary: 'Get all available triggers for a channel',
140
- method: 'GET',
141
- path: '/:id/triggers/available',
142
- metadata: {
143
- auth: true,
144
- },
145
- pathParams: z.object({
146
- id: notificationChannelIdSchema,
147
- }),
148
- responses: {
149
- 200: IAvailableTriggersResponse,
150
- 401: UnauthorizedError,
151
- 404: NotFoundError,
152
- 500: InternalError,
153
- },
154
- },
155
- updateTrigger: {
156
- summary: 'Update notification channel trigger',
157
- method: 'PATCH',
158
- path: '/:id/triggers/:triggerId',
159
- metadata: {
160
- auth: true,
161
- },
162
- pathParams: z.object({
163
- id: notificationChannelIdSchema,
164
- triggerId: notificationChannelTriggerIdSchema,
165
- }),
166
- body: z.object({ enabled: z.boolean() }),
167
- responses: {
168
- 200: INotificationChannelTriggerZod,
169
- 400: BadRequestError,
170
- 401: UnauthorizedError,
171
- 404: NotFoundError,
172
- 500: InternalError,
173
- },
174
- },
175
- deleteTrigger: {
176
- summary: 'Delete notification channel trigger',
177
- method: 'DELETE',
178
- path: '/:id/triggers/:triggerId',
179
- metadata: {
180
- auth: true,
181
- },
182
- pathParams: z.object({
183
- id: notificationChannelIdSchema,
184
- triggerId: notificationChannelTriggerIdSchema,
185
- }),
186
- body: z.object({}),
187
- responses: {
188
- 200: z.object({ success: z.boolean() }),
189
- 401: UnauthorizedError,
190
- 404: NotFoundError,
191
- 500: InternalError,
192
- },
193
- },
194
- getRecords: {
195
- summary: 'Get notification records for current account',
196
- method: 'GET',
197
- path: '/records',
198
- metadata: {
199
- auth: true,
200
- },
201
- query: PaginationOptionsZod.merge(NotificationRecordFilters).merge(
202
- NotificationRecordsIncludeQuery,
203
- ),
204
- responses: {
205
- 200: IPaginatedNotificationRecord,
206
- 401: UnauthorizedError,
207
- 500: InternalError,
208
- },
209
- },
210
- getRecord: {
211
- summary: 'Get notification record by id',
212
- method: 'GET',
213
- path: '/records/:recordId',
214
- metadata: {
215
- auth: true,
216
- },
217
- pathParams: z.object({
218
- recordId: notificationRecordIdSchema,
219
- }),
220
- query: z.object({}).merge(NotificationRecordsIncludeQuery),
221
- responses: {
222
- 200: INotificationRecordZod,
223
- 401: UnauthorizedError,
224
- 404: NotFoundError,
225
- 500: InternalError,
226
- },
227
- },
228
- retryRecord: {
229
- summary: 'Retry failed notification record',
230
- method: 'POST',
231
- path: '/records/:recordId/retry',
232
- metadata: {
233
- auth: true,
234
- },
235
- pathParams: z.object({
236
- recordId: notificationRecordIdSchema,
237
- }),
238
- body: z.object({}),
239
- responses: {
240
- 200: INotificationRecordZod,
241
- 400: BadRequestError,
242
- 401: UnauthorizedError,
243
- 404: NotFoundError,
244
- 500: InternalError,
245
- },
246
- },
247
- },
248
- {
249
- pathPrefix: 'notification-channels',
250
- },
251
- );