@dalmore/api-contracts 1.0.3 → 1.0.5

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 (303) hide show
  1. package/README.md +34 -60
  2. package/index.d.mts +17 -0
  3. package/index.d.ts +17 -0
  4. package/index.mjs +1001 -18638
  5. package/package.json +7 -54
  6. package/clients/index.mjs +0 -10970
  7. package/compliance/index.mjs +0 -20016
  8. package/compliance-apikey/index.mjs +0 -9795
  9. package/helpers/index.mjs +0 -146
  10. package/investors/index.mjs +0 -12844
  11. package/issuers/index.mjs +0 -16168
  12. package/secondaries/index.mjs +0 -10282
  13. package/src/common/helpers/index.ts +0 -205
  14. package/src/common/types/account-contact.types.ts +0 -98
  15. package/src/common/types/account-detail.types.ts +0 -27
  16. package/src/common/types/account-integration.types.ts +0 -143
  17. package/src/common/types/account-manager.types.ts +0 -124
  18. package/src/common/types/account.types.ts +0 -296
  19. package/src/common/types/activity.types.ts +0 -274
  20. package/src/common/types/address.types.ts +0 -41
  21. package/src/common/types/aic.types.ts +0 -246
  22. package/src/common/types/aml.types.ts +0 -18
  23. package/src/common/types/api-key-logs.types.ts +0 -66
  24. package/src/common/types/api-keys.types.ts +0 -69
  25. package/src/common/types/asset.types.ts +0 -338
  26. package/src/common/types/auth.types.ts +0 -370
  27. package/src/common/types/batch-jobs.types.ts +0 -150
  28. package/src/common/types/bonus-tier.types.ts +0 -147
  29. package/src/common/types/cart.types.ts +0 -18
  30. package/src/common/types/checklist-items.types.ts +0 -70
  31. package/src/common/types/checklist.types.ts +0 -97
  32. package/src/common/types/common.types.ts +0 -1520
  33. package/src/common/types/comply-advantage-api.types.ts +0 -316
  34. package/src/common/types/comply-advantage.types.ts +0 -25
  35. package/src/common/types/contact-us.types.ts +0 -107
  36. package/src/common/types/contract-helpers.ts +0 -205
  37. package/src/common/types/countries.types.ts +0 -375
  38. package/src/common/types/covered-person.types.ts +0 -274
  39. package/src/common/types/dashboard.types.ts +0 -799
  40. package/src/common/types/data-record.types.ts +0 -325
  41. package/src/common/types/data-room.types.ts +0 -242
  42. package/src/common/types/default-theme-config.types.ts +0 -87
  43. package/src/common/types/disbursement-adjustment.types.ts +0 -32
  44. package/src/common/types/disbursement-approval-user.types.ts +0 -100
  45. package/src/common/types/disbursement-review.types.ts +0 -110
  46. package/src/common/types/disbursement-transaction.types.ts +0 -72
  47. package/src/common/types/disbursements.types.ts +0 -310
  48. package/src/common/types/domain-filter.types.ts +0 -55
  49. package/src/common/types/email-theme.types.ts +0 -442
  50. package/src/common/types/entity.types.ts +0 -15
  51. package/src/common/types/error-responses.types.ts +0 -135
  52. package/src/common/types/escrow-account.types.ts +0 -104
  53. package/src/common/types/exchange-api-key.types.ts +0 -121
  54. package/src/common/types/exchange-import.types.ts +0 -36
  55. package/src/common/types/exchange-provider.types.ts +0 -329
  56. package/src/common/types/file.types.ts +0 -461
  57. package/src/common/types/health.types.ts +0 -29
  58. package/src/common/types/index.ts +0 -48
  59. package/src/common/types/individuals.types.ts +0 -554
  60. package/src/common/types/investor-account.types.ts +0 -1239
  61. package/src/common/types/investorAccountIdSchema.type.ts +0 -0
  62. package/src/common/types/investors-offering.types.ts +0 -65
  63. package/src/common/types/invite.types.ts +0 -133
  64. package/src/common/types/issuer-bank-account.types.ts +0 -107
  65. package/src/common/types/issuer-offering.types.ts +0 -306
  66. package/src/common/types/issuer-payment-method.types.ts +0 -341
  67. package/src/common/types/issuer.types.ts +0 -312
  68. package/src/common/types/job-item.types.ts +0 -119
  69. package/src/common/types/jobs.types.ts +0 -171
  70. package/src/common/types/kyb.types.ts +0 -53
  71. package/src/common/types/kyc.types.ts +0 -188
  72. package/src/common/types/legal-entity.types.ts +0 -185
  73. package/src/common/types/login-history.types.ts +0 -46
  74. package/src/common/types/mail-template.types.ts +0 -436
  75. package/src/common/types/north-cap-integration.types.ts +0 -190
  76. package/src/common/types/note.types.ts +0 -109
  77. package/src/common/types/notification.types.ts +0 -58
  78. package/src/common/types/notion-api.types.ts +0 -374
  79. package/src/common/types/notion-database.types.ts +0 -125
  80. package/src/common/types/notion-page.types.ts +0 -267
  81. package/src/common/types/offering-reports.types.ts +0 -153
  82. package/src/common/types/offering-submission.types.ts +0 -314
  83. package/src/common/types/offering.types.ts +0 -590
  84. package/src/common/types/page-revision.types.ts +0 -86
  85. package/src/common/types/page.types.ts +0 -436
  86. package/src/common/types/password.type.ts +0 -15
  87. package/src/common/types/payment-methods.types.ts +0 -298
  88. package/src/common/types/phone.type.ts +0 -27
  89. package/src/common/types/portfolio.types.ts +0 -50
  90. package/src/common/types/privacy-policy-and-tos.types.ts +0 -231
  91. package/src/common/types/queue.types.ts +0 -111
  92. package/src/common/types/registered-reps.types.ts +0 -25
  93. package/src/common/types/rejection-reasons.types.ts +0 -56
  94. package/src/common/types/review.types.ts +0 -133
  95. package/src/common/types/role.types.ts +0 -26
  96. package/src/common/types/secondary-customer.types.ts +0 -66
  97. package/src/common/types/secondary-issuer.types.ts +0 -50
  98. package/src/common/types/secondary-order.types.ts +0 -58
  99. package/src/common/types/secondary-security.types.ts +0 -60
  100. package/src/common/types/secondary-trade.entity.ts +0 -16
  101. package/src/common/types/secondary-trade.types.ts +0 -95
  102. package/src/common/types/secure-request.types.ts +0 -68
  103. package/src/common/types/signer.types.ts +0 -651
  104. package/src/common/types/site-link.types.ts +0 -166
  105. package/src/common/types/site-settings.types.ts +0 -726
  106. package/src/common/types/site.types.ts +0 -270
  107. package/src/common/types/sms.types.ts +0 -30
  108. package/src/common/types/state-machine.types.ts +0 -177
  109. package/src/common/types/states.types.ts +0 -163
  110. package/src/common/types/subdoc-preview.types.ts +0 -35
  111. package/src/common/types/task.types.ts +0 -258
  112. package/src/common/types/trade-adjustment.type.ts +0 -33
  113. package/src/common/types/trade-line-item.type.ts +0 -132
  114. package/src/common/types/trade.types.ts +0 -931
  115. package/src/common/types/transaction.types.ts +0 -198
  116. package/src/common/types/trusted-contact.types.ts +0 -122
  117. package/src/common/types/typography.types.ts +0 -75
  118. package/src/common/types/user-manual.types.ts +0 -290
  119. package/src/common/types/user-setting.types.ts +0 -133
  120. package/src/common/types/user.types.ts +0 -320
  121. package/src/common/types/webhook.types.ts +0 -588
  122. package/src/common/types/zip.type.ts +0 -36
  123. package/src/contracts/clients/accounts/index.ts +0 -61
  124. package/src/contracts/clients/aic/index.ts +0 -59
  125. package/src/contracts/clients/api-key-logs/index.ts +0 -53
  126. package/src/contracts/clients/api-keys/index.ts +0 -73
  127. package/src/contracts/clients/assets/index.ts +0 -102
  128. package/src/contracts/clients/auth/index.ts +0 -50
  129. package/src/contracts/clients/files/index.ts +0 -166
  130. package/src/contracts/clients/files-public/index.ts +0 -166
  131. package/src/contracts/clients/index.ts +0 -44
  132. package/src/contracts/clients/individuals/index.ts +0 -93
  133. package/src/contracts/clients/investor-accounts/index.ts +0 -93
  134. package/src/contracts/clients/issuers/index.ts +0 -94
  135. package/src/contracts/clients/legal-entities/index.ts +0 -93
  136. package/src/contracts/clients/offerings/index.ts +0 -117
  137. package/src/contracts/clients/secure-requests/index.ts +0 -34
  138. package/src/contracts/clients/sites/index.ts +0 -56
  139. package/src/contracts/clients/trades/index.ts +0 -122
  140. package/src/contracts/compliance/account-contacts/index.ts +0 -82
  141. package/src/contracts/compliance/account-managers/index.ts +0 -142
  142. package/src/contracts/compliance/accounts/index.ts +0 -187
  143. package/src/contracts/compliance/activities/index.ts +0 -55
  144. package/src/contracts/compliance/aic/index.ts +0 -60
  145. package/src/contracts/compliance/api-keys/index.ts +0 -91
  146. package/src/contracts/compliance/assets/index.ts +0 -122
  147. package/src/contracts/compliance/auth/index.ts +0 -134
  148. package/src/contracts/compliance/batch-jobs/index.ts +0 -62
  149. package/src/contracts/compliance/bonus-tiers/index.ts +0 -55
  150. package/src/contracts/compliance/checklist/index.ts +0 -87
  151. package/src/contracts/compliance/checklist-items/index.ts +0 -86
  152. package/src/contracts/compliance/covered-persons/index.ts +0 -97
  153. package/src/contracts/compliance/dashboard/index.ts +0 -111
  154. package/src/contracts/compliance/data-records/index.ts +0 -116
  155. package/src/contracts/compliance/data-rooms/index.ts +0 -113
  156. package/src/contracts/compliance/default-theme-configs/index.ts +0 -95
  157. package/src/contracts/compliance/disbursement/index.ts +0 -165
  158. package/src/contracts/compliance/disbursement-approval-users/index.ts +0 -84
  159. package/src/contracts/compliance/disbursement-transactions/index.ts +0 -37
  160. package/src/contracts/compliance/domain-filters/index.ts +0 -117
  161. package/src/contracts/compliance/email-themes/index.ts +0 -284
  162. package/src/contracts/compliance/escrow-accounts/index.ts +0 -85
  163. package/src/contracts/compliance/exchange-api-keys/index.ts +0 -129
  164. package/src/contracts/compliance/exchange-imports/index.ts +0 -137
  165. package/src/contracts/compliance/files/index.ts +0 -267
  166. package/src/contracts/compliance/files-public/index.ts +0 -188
  167. package/src/contracts/compliance/health/index.ts +0 -26
  168. package/src/contracts/compliance/index.ts +0 -147
  169. package/src/contracts/compliance/individuals/index.ts +0 -57
  170. package/src/contracts/compliance/investor-accounts/index.ts +0 -141
  171. package/src/contracts/compliance/invites/index.ts +0 -137
  172. package/src/contracts/compliance/issuer-bank-accounts/index.ts +0 -81
  173. package/src/contracts/compliance/issuer-payment-methods/index.ts +0 -81
  174. package/src/contracts/compliance/issuers/index.ts +0 -97
  175. package/src/contracts/compliance/job-items/index.ts +0 -58
  176. package/src/contracts/compliance/jobs/index.ts +0 -59
  177. package/src/contracts/compliance/kyb/index.ts +0 -54
  178. package/src/contracts/compliance/kyc/index.ts +0 -77
  179. package/src/contracts/compliance/legal-entities/index.ts +0 -57
  180. package/src/contracts/compliance/login-histories/index.ts +0 -37
  181. package/src/contracts/compliance/notes/index.ts +0 -69
  182. package/src/contracts/compliance/notion-databases/index.ts +0 -107
  183. package/src/contracts/compliance/notion-pages/index.ts +0 -105
  184. package/src/contracts/compliance/offering-reports/index.ts +0 -149
  185. package/src/contracts/compliance/offerings/index.ts +0 -233
  186. package/src/contracts/compliance/pages/index.ts +0 -178
  187. package/src/contracts/compliance/payment-methods/index.ts +0 -57
  188. package/src/contracts/compliance/rejection-reasons/index.ts +0 -32
  189. package/src/contracts/compliance/review/index.ts +0 -169
  190. package/src/contracts/compliance/roles/index.ts +0 -34
  191. package/src/contracts/compliance/secondary-customers/index.ts +0 -77
  192. package/src/contracts/compliance/secondary-orders/index.ts +0 -60
  193. package/src/contracts/compliance/secondary-trades/index.ts +0 -100
  194. package/src/contracts/compliance/secure-requests/index.ts +0 -54
  195. package/src/contracts/compliance/signer/index.ts +0 -369
  196. package/src/contracts/compliance/site-links/index.ts +0 -128
  197. package/src/contracts/compliance/site-settings/index.ts +0 -669
  198. package/src/contracts/compliance/sites/index.ts +0 -56
  199. package/src/contracts/compliance/state-machine/index.ts +0 -94
  200. package/src/contracts/compliance/tasks/index.ts +0 -91
  201. package/src/contracts/compliance/third-parties/index.ts +0 -52
  202. package/src/contracts/compliance/trade-line-items/index.ts +0 -59
  203. package/src/contracts/compliance/trades/index.ts +0 -230
  204. package/src/contracts/compliance/transactions/index.ts +0 -161
  205. package/src/contracts/compliance/user-manuals/index.ts +0 -271
  206. package/src/contracts/compliance/user-settings/index.ts +0 -189
  207. package/src/contracts/compliance/users/index.ts +0 -200
  208. package/src/contracts/compliance/webhooks/index.ts +0 -41
  209. package/src/contracts/compliance-apikey/accounts/index.ts +0 -58
  210. package/src/contracts/compliance-apikey/index.ts +0 -14
  211. package/src/contracts/index.ts +0 -6
  212. package/src/contracts/investors/account-contacts/index.ts +0 -58
  213. package/src/contracts/investors/aic/index.ts +0 -59
  214. package/src/contracts/investors/assets/index.ts +0 -61
  215. package/src/contracts/investors/auth/index.ts +0 -116
  216. package/src/contracts/investors/bonus-tiers/index.ts +0 -37
  217. package/src/contracts/investors/cart/index.ts +0 -75
  218. package/src/contracts/investors/contact-us/index.ts +0 -48
  219. package/src/contracts/investors/data-records/index.ts +0 -113
  220. package/src/contracts/investors/data-rooms/index.ts +0 -96
  221. package/src/contracts/investors/files/index.ts +0 -167
  222. package/src/contracts/investors/files-public/index.ts +0 -185
  223. package/src/contracts/investors/index.ts +0 -72
  224. package/src/contracts/investors/individuals/index.ts +0 -99
  225. package/src/contracts/investors/investor-accounts/index.ts +0 -110
  226. package/src/contracts/investors/issuer-payment-methods/index.ts +0 -36
  227. package/src/contracts/investors/issuers/index.ts +0 -30
  228. package/src/contracts/investors/legal-entities/index.ts +0 -93
  229. package/src/contracts/investors/notes/index.ts +0 -69
  230. package/src/contracts/investors/offerings/index.ts +0 -93
  231. package/src/contracts/investors/pages/index.ts +0 -88
  232. package/src/contracts/investors/payment-methods/index.ts +0 -149
  233. package/src/contracts/investors/portfolios/index.ts +0 -53
  234. package/src/contracts/investors/sites/index.ts +0 -96
  235. package/src/contracts/investors/tasks/index.ts +0 -111
  236. package/src/contracts/investors/trade-line-items/index.ts +0 -75
  237. package/src/contracts/investors/trades/index.ts +0 -114
  238. package/src/contracts/investors/transactions/index.ts +0 -37
  239. package/src/contracts/investors/trusted-contacts/index.ts +0 -93
  240. package/src/contracts/investors/user-manuals/index.ts +0 -62
  241. package/src/contracts/investors/user-settings/index.ts +0 -170
  242. package/src/contracts/investors/users/index.ts +0 -45
  243. package/src/contracts/investors/webhooks/index.ts +0 -30
  244. package/src/contracts/issuers/account-contacts/index.ts +0 -76
  245. package/src/contracts/issuers/account-integrations/index.ts +0 -97
  246. package/src/contracts/issuers/accounts/index.ts +0 -97
  247. package/src/contracts/issuers/activities/index.ts +0 -54
  248. package/src/contracts/issuers/aic/index.ts +0 -39
  249. package/src/contracts/issuers/api-key-logs/index.ts +0 -53
  250. package/src/contracts/issuers/api-keys/index.ts +0 -93
  251. package/src/contracts/issuers/assets/index.ts +0 -122
  252. package/src/contracts/issuers/auth/index.ts +0 -152
  253. package/src/contracts/issuers/bonus-tiers/index.ts +0 -55
  254. package/src/contracts/issuers/contact-us/index.ts +0 -48
  255. package/src/contracts/issuers/covered-persons/index.ts +0 -136
  256. package/src/contracts/issuers/dashboard/index.ts +0 -72
  257. package/src/contracts/issuers/data-records/index.ts +0 -257
  258. package/src/contracts/issuers/data-rooms/index.ts +0 -134
  259. package/src/contracts/issuers/disbursement-approval-users/index.ts +0 -82
  260. package/src/contracts/issuers/disbursement-transactions/index.ts +0 -53
  261. package/src/contracts/issuers/disbursements/index.ts +0 -153
  262. package/src/contracts/issuers/email-themes/index.ts +0 -242
  263. package/src/contracts/issuers/escrow-accounts/index.ts +0 -81
  264. package/src/contracts/issuers/exchange-api-keys/index.ts +0 -144
  265. package/src/contracts/issuers/files/index.ts +0 -166
  266. package/src/contracts/issuers/files-public/index.ts +0 -166
  267. package/src/contracts/issuers/health/index.ts +0 -24
  268. package/src/contracts/issuers/index.ts +0 -112
  269. package/src/contracts/issuers/investor-accounts/index.ts +0 -148
  270. package/src/contracts/issuers/invites/index.ts +0 -129
  271. package/src/contracts/issuers/issuer/index.ts +0 -94
  272. package/src/contracts/issuers/issuer-bank-accounts/index.ts +0 -81
  273. package/src/contracts/issuers/issuer-payment-methods/index.ts +0 -136
  274. package/src/contracts/issuers/kyc/index.ts +0 -38
  275. package/src/contracts/issuers/login-histories/index.ts +0 -51
  276. package/src/contracts/issuers/notes/index.ts +0 -69
  277. package/src/contracts/issuers/offerings/index.ts +0 -206
  278. package/src/contracts/issuers/pages/index.ts +0 -138
  279. package/src/contracts/issuers/payment-methods/index.ts +0 -61
  280. package/src/contracts/issuers/portfolios/index.ts +0 -36
  281. package/src/contracts/issuers/rejection-reasons/index.ts +0 -32
  282. package/src/contracts/issuers/review/index.ts +0 -63
  283. package/src/contracts/issuers/secondary-customers/index.ts +0 -55
  284. package/src/contracts/issuers/secondary-orders/index.ts +0 -57
  285. package/src/contracts/issuers/secondary-trades/index.ts +0 -57
  286. package/src/contracts/issuers/secure-requests/index.ts +0 -34
  287. package/src/contracts/issuers/site-links/index.ts +0 -116
  288. package/src/contracts/issuers/site-settings/index.ts +0 -585
  289. package/src/contracts/issuers/sites/index.ts +0 -32
  290. package/src/contracts/issuers/tasks/index.ts +0 -111
  291. package/src/contracts/issuers/trades/index.ts +0 -132
  292. package/src/contracts/issuers/transactions/index.ts +0 -158
  293. package/src/contracts/issuers/user-manuals/index.ts +0 -62
  294. package/src/contracts/issuers/user-settings/index.ts +0 -170
  295. package/src/contracts/issuers/users/index.ts +0 -126
  296. package/src/contracts/secondaries/accounts/index.ts +0 -58
  297. package/src/contracts/secondaries/index.ts +0 -23
  298. package/src/contracts/secondaries/secondary-customers/index.ts +0 -55
  299. package/src/contracts/secondaries/secondary-issuers/index.ts +0 -94
  300. package/src/contracts/secondaries/secondary-orders/index.ts +0 -56
  301. package/src/contracts/secondaries/secondary-securities/index.ts +0 -95
  302. package/src/contracts/secondaries/secondary-trades/index.ts +0 -56
  303. package/types/index.mjs +0 -10320
@@ -1,726 +0,0 @@
1
- import { TypeID } from 'typeid-js';
2
- import { z } from 'zod';
3
- import { fileIdSchema } from './file.types';
4
- import {
5
- AccountZod,
6
- HexCodeColorSchema,
7
- IPaginationMeta,
8
- SubdomainSchema,
9
- ThemeScope,
10
- UrlSchema,
11
- } from './common.types';
12
- import { accountIdSchema } from './account.types';
13
- import { typographySchema } from './typography.types';
14
- import { PasswordSchema } from './password.type';
15
- import { emailThemeIdSchema } from './email-theme.types';
16
- import { pageIdSchema } from './page.types';
17
- import { defaultThemeConfigIdSchema } from './default-theme-config.types';
18
-
19
- export const themeIdSchema = z.string().refine(
20
- (value) => {
21
- try {
22
- const tid = TypeID.fromString(value);
23
- return tid.getType() === 'theme';
24
- } catch {
25
- return false;
26
- }
27
- },
28
- {
29
- message: `Invalid theme ID format. Must be a valid TypeID with "theme" prefix. Example: theme_01j5y5ghx5fg68d663j1fvy2x7`,
30
- },
31
- );
32
-
33
- export const themeSettingIdSchema = z.string().refine(
34
- (value) => {
35
- try {
36
- const tid = TypeID.fromString(value);
37
- return tid.getType() === 'theme_setting';
38
- } catch {
39
- return false;
40
- }
41
- },
42
- {
43
- message: `Invalid theme_setting ID format. Must be a valid TypeID with "theme_setting" prefix. Example: theme_setting_01j5y5ghx5fg68d663j1fvy2x7`,
44
- },
45
- );
46
-
47
- export const ThemeFiltersZod = z.object({
48
- accountId: accountIdSchema.optional(),
49
- });
50
- export type ThemeFiltersZod = z.infer<typeof ThemeFiltersZod>;
51
-
52
- export const GetPasswordProtectionSettingsZod = z.object({
53
- enabled: z.boolean().optional(),
54
- message: z.string().nullable(),
55
- });
56
- export type GetPasswordProtectionSettingsZod = z.infer<
57
- typeof GetPasswordProtectionSettingsZod
58
- >;
59
-
60
- export const PatchPasswordProtectionSettingsZod = z
61
- .object({
62
- enabled: z.boolean().optional().openapi({ example: true }),
63
- message: z.string().nullable().openapi({
64
- example:
65
- 'This site is password protected. Please enter the password to access the site.',
66
- }),
67
- password: PasswordSchema.nullable()
68
- .optional()
69
- .openapi({ example: '#SecretPassword123' }),
70
- })
71
- .refine(
72
- (data) => {
73
- // If enabled is true, password must be set
74
- if (data.enabled === true) {
75
- return data.password !== null && data.password !== undefined;
76
- }
77
- return true;
78
- },
79
- {
80
- message: 'Password must be set when protection is enabled',
81
- path: ['password'],
82
- },
83
- );
84
-
85
- export type PatchPasswordProtectionSettingsZod = z.infer<
86
- typeof PatchPasswordProtectionSettingsZod
87
- >;
88
-
89
- export const GetSiteDomainZod = z.object({
90
- domain: z.string().nullable(),
91
- customDomain: z.string().nullable(),
92
- });
93
- export type GetSiteDomainZod = z.infer<typeof GetSiteDomainZod>;
94
-
95
- export const PatchSiteDomainZod = z.object({
96
- customDomain: UrlSchema.optional().nullable(),
97
- domain: SubdomainSchema.optional(),
98
- });
99
- export type PatchSiteDomainZod = z.infer<typeof PatchSiteDomainZod>;
100
- export const PatchSiteDomainResponse = z.object({
101
- message: z.string(),
102
- });
103
- export type PatchSiteDomainResponse = z.infer<typeof PatchSiteDomainResponse>;
104
-
105
- export const GetSeoSettingsZod = z.object({
106
- title: z.string().nullable(),
107
- description: z.string().nullable(),
108
- keywords: z.string().nullable(),
109
- });
110
- export type GetSeoSettingsZod = z.infer<typeof GetSeoSettingsZod>;
111
-
112
- export const PatchSeoSettingsZod = GetSeoSettingsZod.extend({
113
- title: z.string().min(2).max(50).optional().openapi({ example: 'example' }),
114
- description: z
115
- .string()
116
- .min(2)
117
- .max(200)
118
- .nullable()
119
- .optional()
120
- .openapi({ example: 'example' }),
121
- keywords: z
122
- .string()
123
- .min(2)
124
- .max(200)
125
- .nullable()
126
- .optional()
127
- .openapi({ example: 'example' }),
128
- });
129
-
130
- export type PatchSeoSettingsZod = z.infer<typeof PatchSeoSettingsZod>;
131
-
132
- export const GetBrandingSettingsZod = z.object({
133
- logo: z.string().nullable(),
134
- favicon: z.string().nullable(),
135
- backgroundImage: z.string().nullable(),
136
- typography: typographySchema.nullable(),
137
- themeId: themeIdSchema.nullable(),
138
- tagline: z.string().nullable(),
139
- });
140
-
141
- export type GetBrandingSettingsZod = z.infer<typeof GetBrandingSettingsZod>;
142
-
143
- export const PatchBrandingSettingsZod = GetBrandingSettingsZod.extend({
144
- logo: z
145
- .lazy(() => fileIdSchema)
146
- .nullable()
147
- .optional()
148
- .openapi({ example: 'file_01j5y5ghx8fvc83dmx3pznq7hv' }),
149
- favicon: z
150
- .lazy(() => fileIdSchema)
151
- .nullable()
152
- .optional()
153
- .openapi({ example: 'file_01j5y5ghx8fvc83dmx3pznq7hv' }),
154
- backgroundImage: z
155
- .lazy(() => fileIdSchema)
156
- .nullable()
157
- .optional()
158
- .openapi({ example: 'file_01j5y5ghx8fvc83dmx3pznq7hv' }),
159
- typography: typographySchema,
160
- themeId: themeIdSchema.nullable().optional(),
161
- tagline: z.string().nullable().optional(),
162
- });
163
-
164
- export type PatchBrandingSettingsZod = z.infer<typeof PatchBrandingSettingsZod>;
165
-
166
- export const GetThemeZod = z.object({
167
- id: themeIdSchema,
168
- name: z.string().nullable(),
169
- accountId: z.lazy(() => accountIdSchema).nullable(),
170
- });
171
- export type GetThemeZod = z.infer<typeof GetThemeZod>;
172
-
173
- export const ThemesList = z.object({
174
- items: z.array(GetThemeZod),
175
- });
176
- export type ThemesList = z.infer<typeof ThemesList>;
177
-
178
- export const ThemeSettingsZod = z.object({
179
- id: themeSettingIdSchema,
180
- name: z.string().nullable(),
181
- category: z.string().nullable(),
182
- darkMode: z.string().nullable(),
183
- lightMode: z.string().nullable(),
184
- });
185
-
186
- export const ITheme = z.object({
187
- id: themeIdSchema,
188
- name: z.string().nullable(),
189
- accountId: z.lazy(() => accountIdSchema).nullable(),
190
- account: z
191
- .lazy(() => AccountZod)
192
- .optional()
193
- .nullable(),
194
- });
195
-
196
- export type ITheme = z.infer<typeof ITheme>;
197
-
198
- export const IThemeSetting = z.object({
199
- id: themeSettingIdSchema,
200
- name: z.string().nullable(),
201
- category: z.string().nullable(),
202
- darkMode: z.string().nullable(),
203
- lightMode: z.string().nullable(),
204
- themeId: themeIdSchema.nullable(),
205
- theme: z
206
- .lazy(() => ITheme)
207
- .optional()
208
- .nullable(),
209
- });
210
- export type IThemeSetting = z.infer<typeof IThemeSetting>;
211
-
212
- export const IThemeSettings = z.array(IThemeSetting);
213
- export type IThemeSettings = z.infer<typeof IThemeSettings>;
214
-
215
- const themesInclude = z.enum(['site', 'themeSettings']);
216
- /**
217
- * @description Query parameters for including related entities
218
- * @xample in contract us as -> query: z.object({}).merge(ThemesIncludeQuery),
219
- */
220
- export const ThemesIncludeQuery = z.object({
221
- include: z
222
- .string()
223
- .optional()
224
- .transform((str) => (str ? str.split(',') : []))
225
- .refine(
226
- (includes) =>
227
- includes.every((include) =>
228
- themesInclude.options.includes(include as any),
229
- ),
230
- {
231
- message: `Invalid include option provided. Valid options are: ${themesInclude.options.join(',')}`,
232
- },
233
- )
234
- .openapi({
235
- example: `${themesInclude.options.join(',')}`,
236
- }),
237
- });
238
-
239
- export const IPaginatedTheme = z.object({
240
- items: z.array(ITheme),
241
- meta: IPaginationMeta,
242
- });
243
- export type IPaginatedTheme = z.infer<typeof IPaginatedTheme>;
244
-
245
- export const PostThemeZod = z.object({
246
- name: z.string().min(2).max(50).openapi({ example: 'theme_name' }),
247
- themeId: themeIdSchema.openapi({
248
- example: 'theme_01j5y5ghx5fg68d663j1fvy2x7',
249
- }),
250
- });
251
- export type PostThemeZod = z.infer<typeof PostThemeZod>;
252
-
253
- export const CompliancePostThemeZod = PostThemeZod.extend({
254
- themeId: themeIdSchema.nullable().optional(),
255
- scope: z.nativeEnum(ThemeScope).default(ThemeScope.ACCOUNT),
256
- accountId: accountIdSchema.optional(),
257
- }).superRefine((data, ctx) => {
258
- if (data.scope === ThemeScope.ACCOUNT) {
259
- if (!data.accountId) {
260
- ctx.addIssue({
261
- code: z.ZodIssueCode.custom,
262
- message: 'Account Id is required when scope is ACCOUNT',
263
- });
264
- }
265
- if (!data.themeId) {
266
- ctx.addIssue({
267
- code: z.ZodIssueCode.custom,
268
- message: 'Theme Id is required when scope is ACCOUNT',
269
- });
270
- }
271
- }
272
- });
273
- export type CompliancePostThemeZod = z.infer<typeof CompliancePostThemeZod>;
274
-
275
- export const PatchThemeSetting = z.object({
276
- darkMode: HexCodeColorSchema.optional(),
277
- lightMode: HexCodeColorSchema.optional(),
278
- });
279
-
280
- export type PatchThemeSetting = z.infer<typeof PatchThemeSetting>;
281
-
282
- export const CompliancePatchThemeSetting = PatchThemeSetting.extend({
283
- accountId: accountIdSchema.optional(),
284
- });
285
- export type CompliancePatchThemeSetting = z.infer<
286
- typeof CompliancePatchThemeSetting
287
- >;
288
-
289
- export const PatchThemeSettings = z
290
- .array(
291
- PatchThemeSetting.extend({
292
- id: themeSettingIdSchema.openapi({
293
- example: 'theme_setting_01j5y5ghx5fg68d663j1fvy2x7',
294
- }),
295
- }),
296
- )
297
- .min(1);
298
- export type PatchThemeSettings = z.infer<typeof PatchThemeSettings>;
299
- export const CompliancePatchThemeSettings = z.object({
300
- accountId: accountIdSchema.nullable().default(null),
301
- themeSettings: PatchThemeSettings,
302
- });
303
-
304
- export type CompliancePatchThemeSettings = z.infer<
305
- typeof CompliancePatchThemeSettings
306
- >;
307
-
308
- export const ThemeExportZod = z.object({
309
- name: z.string().nullable(),
310
- category: z.string().nullable(),
311
- lightMode: HexCodeColorSchema.nullable(),
312
- darkMode: HexCodeColorSchema.nullable(),
313
- });
314
- export type ThemeExportZod = z.infer<typeof ThemeExportZod>;
315
-
316
- export const PatchThemeSettingWithName = z.object({
317
- name: z.string(),
318
- category: z.string(),
319
- darkMode: HexCodeColorSchema.optional(),
320
- lightMode: HexCodeColorSchema.optional(),
321
- });
322
-
323
- export type PatchThemeSettingWithName = z.infer<
324
- typeof PatchThemeSettingWithName
325
- >;
326
-
327
- export const ImportThemeSettingsZod = z.array(PatchThemeSettingWithName);
328
- export type ImportThemeSettingsZod = z.infer<typeof ImportThemeSettingsZod>;
329
-
330
- export const ExportThemeSettingsZod = z.array(ThemeExportZod);
331
- export type ExportThemeSettingsZod = z.infer<typeof ExportThemeSettingsZod>;
332
-
333
- export const PatchThemeNameZod = z.object({
334
- name: z.string().min(2).max(50).openapi({ example: 'green' }),
335
- });
336
- export type PatchThemeNameZod = z.infer<typeof PatchThemeNameZod>;
337
-
338
- export const CompliancePatchThemeNameZod = PatchThemeNameZod.extend({
339
- accountId: accountIdSchema.nullable().optional().openapi({
340
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
341
- }),
342
- });
343
- export type CompliancePatchThemeNameZod = z.infer<
344
- typeof CompliancePatchThemeNameZod
345
- >;
346
-
347
- export const UpdateWithPersonaThemeIdZod = z.object({
348
- withPersonaThemeId: z
349
- .string()
350
- .min(6)
351
- .max(48)
352
- .openapi({ example: '123e4567-e89b-12d3-a456-426614174000' }),
353
- });
354
- export type UpdateWithPersonaThemeIdZod = z.infer<
355
- typeof UpdateWithPersonaThemeIdZod
356
- >;
357
-
358
- export const GetEmailSettingsZod = z.object({
359
- senderName: z.string().nullable(),
360
- emailThemeId: emailThemeIdSchema.nullable(),
361
- emailLogo: fileIdSchema.nullable(),
362
- });
363
-
364
- export type GetEmailSettingsZod = z.infer<typeof GetEmailSettingsZod>;
365
-
366
- export const PatchEmailSettingsZod = GetEmailSettingsZod.extend({
367
- senderName: z
368
- .string()
369
- .min(2)
370
- .max(50)
371
- .optional()
372
- .openapi({ example: 'example' }),
373
- emailThemeId: emailThemeIdSchema.nullable().optional(),
374
- emailLogo: fileIdSchema.nullable().optional(),
375
- });
376
-
377
- export type PatchEmailSettingsZod = z.infer<typeof PatchEmailSettingsZod>;
378
-
379
- export const CompliancePatchEmailSettingsZod = z
380
- .object({
381
- accountId: accountIdSchema.openapi({
382
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
383
- }),
384
- })
385
- .merge(PatchEmailSettingsZod);
386
- export type CompliancePatchEmailSettingsZod = z.infer<
387
- typeof CompliancePatchEmailSettingsZod
388
- >;
389
-
390
- export const UpdateGaIdZod = z.object({
391
- gaIds: z
392
- .array(
393
- z
394
- .string()
395
- .min(6)
396
- .max(48)
397
- .openapi({ example: '123e4567-e89b-12d3-a456-426614174000' }),
398
- )
399
- .nullable(),
400
- });
401
- export type UpdateGaIdZod = z.infer<typeof UpdateGaIdZod>;
402
-
403
- export const ComplianceUpdateGaIdZod = z
404
- .object({
405
- accountId: accountIdSchema.openapi({
406
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
407
- }),
408
- })
409
- .merge(UpdateGaIdZod);
410
- export type ComplianceUpdateGaIdZod = z.infer<typeof ComplianceUpdateGaIdZod>;
411
-
412
- export const GetSynchronizeThemeBlobsZod = z.object({
413
- shouldCheckForExistingBlobs: z.coerce.boolean().default(true).optional(),
414
- });
415
- export type GetSynchronizeThemeBlobsZod = z.infer<
416
- typeof GetSynchronizeThemeBlobsZod
417
- >;
418
-
419
- export const GetInvestorAccountTypeSettingsZod = z.object({
420
- individual: z.boolean(),
421
- joint: z.boolean(),
422
- entity: z.boolean(),
423
- retirement: z.boolean(),
424
- });
425
- export type GetInvestorAccountTypeSettingsZod = z.infer<
426
- typeof GetInvestorAccountTypeSettingsZod
427
- >;
428
-
429
- export const PatchInvestorAccountTypeSettingsZod = z.object({
430
- individual: z.boolean().openapi({ example: true }),
431
- joint: z.boolean().openapi({ example: true }),
432
- entity: z.boolean().openapi({ example: true }),
433
- retirement: z.boolean().openapi({ example: false }),
434
- });
435
- export type PatchInvestorAccountTypeSettingsZod = z.infer<
436
- typeof PatchInvestorAccountTypeSettingsZod
437
- >;
438
-
439
- export const CompliancePatchInvestorAccountTypeSettingsZod =
440
- PatchInvestorAccountTypeSettingsZod.extend({
441
- accountId: accountIdSchema.openapi({
442
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
443
- }),
444
- });
445
- export type CompliancePatchInvestorAccountTypeSettingsZod = z.infer<
446
- typeof CompliancePatchInvestorAccountTypeSettingsZod
447
- >;
448
-
449
- export const InvestorAccountTypeSettingsZod = z.object({
450
- individual: z.boolean(),
451
- joint: z.boolean(),
452
- entity: z.boolean(),
453
- retirement: z.boolean(),
454
- });
455
- export type InvestorAccountTypeSettingsZod = z.infer<
456
- typeof InvestorAccountTypeSettingsZod
457
- >;
458
-
459
- export const GetSenderEmailZod = z.object({
460
- senderEmail: z.string(),
461
- });
462
- export type GetSenderEmailZod = z.infer<typeof GetSenderEmailZod>;
463
-
464
- export const PatchSenderEmailZod = z.object({
465
- senderEmail: z.string().email().openapi({ example: 'example@example.com' }),
466
- });
467
- export type PatchSenderEmailZod = z.infer<typeof PatchSenderEmailZod>;
468
-
469
- export const CompliancePatchSenderEmailZod = z
470
- .object({
471
- accountId: accountIdSchema.openapi({
472
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
473
- }),
474
- })
475
- .merge(PatchSenderEmailZod);
476
- export type CompliancePatchSenderEmailZod = z.infer<
477
- typeof CompliancePatchSenderEmailZod
478
- >;
479
-
480
- export const GetCurrentLandingPageZod = z.object({
481
- landingPageId: pageIdSchema
482
- .openapi({
483
- example: 'page_01j5y5ghx5fg68d663j1fvy2x7',
484
- })
485
- .nullable(),
486
- });
487
-
488
- export type GetCurrentLandingPageZod = z.infer<typeof GetCurrentLandingPageZod>;
489
-
490
- export const PatchCurrentLandingPageZod = z.object({
491
- landingPageId: pageIdSchema
492
- .openapi({
493
- example: 'page_01j5y5ghx5fg68d663j1fvy2x7',
494
- })
495
- .nullable(),
496
- });
497
- export type PatchCurrentLandingPageZod = z.infer<
498
- typeof PatchCurrentLandingPageZod
499
- >;
500
-
501
- export const CompliancePatchCurrentLandingPageZod =
502
- PatchCurrentLandingPageZod.extend({
503
- accountId: accountIdSchema.openapi({
504
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
505
- }),
506
- });
507
- export type CompliancePatchCurrentLandingPageZod = z.infer<
508
- typeof CompliancePatchCurrentLandingPageZod
509
- >;
510
-
511
- export const GetPixelCodeZod = z.object({
512
- trackingPixelCode: z.string().nullable(),
513
- conversionPixelCode: z.string().nullable(),
514
- });
515
- export type GetPixelCodeZod = z.infer<typeof GetPixelCodeZod>;
516
-
517
- export const PatchPixelCodeZod = z.object({
518
- trackingPixelCode: z.string().min(1).max(10000).nullable().optional(),
519
- conversionPixelCode: z.string().min(1).max(10000).nullable().optional(),
520
- });
521
- export type PatchPixelCodeZod = z.infer<typeof PatchPixelCodeZod>;
522
-
523
- export const CompliancePatchPixelCodeZod = PatchPixelCodeZod.extend({
524
- accountId: accountIdSchema.openapi({
525
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
526
- }),
527
- });
528
- export type CompliancePatchPixelCodeZod = z.infer<
529
- typeof CompliancePatchPixelCodeZod
530
- >;
531
-
532
- export const GetDemoCredentialsZod = z.object({
533
- email: z.string().email().nullable(),
534
- password: z.string().nullable(),
535
- });
536
- export type GetDemoCredentialsZod = z.infer<typeof GetDemoCredentialsZod>;
537
-
538
- export const UpdateDemoPassword = z.object({
539
- password: PasswordSchema.openapi({ example: 'Secretpassword6#' }),
540
- });
541
- export type UpdateDemoPassword = z.infer<typeof UpdateDemoPassword>;
542
-
543
- export const ComplianceUpdateDemoPassword = UpdateDemoPassword.extend({
544
- accountId: accountIdSchema.openapi({
545
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
546
- }),
547
- });
548
- export type ComplianceUpdateDemoPassword = z.infer<
549
- typeof ComplianceUpdateDemoPassword
550
- >;
551
-
552
- export const GetPublicDataTypesZod = z.object({
553
- publicOfferings: z.boolean().default(false),
554
- publicPages: z.boolean().default(false),
555
- publicDataRooms: z.boolean().default(false),
556
- });
557
- export type GetPublicDataTypesZod = z.infer<typeof GetPublicDataTypesZod>;
558
-
559
- export const PatchPublicDataTypesZod = z.object({
560
- publicOfferings: z.boolean().optional(),
561
- publicPages: z.boolean().optional(),
562
- publicDataRooms: z.boolean().optional(),
563
- });
564
- export type PatchPublicDataTypesZod = z.infer<typeof PatchPublicDataTypesZod>;
565
-
566
- export const CompliancePatchPublicDataTypesZod = PatchPublicDataTypesZod.extend(
567
- {
568
- accountId: accountIdSchema.openapi({
569
- example: 'account_01j5y5ghx5fg68d663j1fvy2x7',
570
- }),
571
- },
572
- );
573
- export type CompliancePatchPublicDataTypesZod = z.infer<
574
- typeof CompliancePatchPublicDataTypesZod
575
- >;
576
-
577
- export const DefaultEmailThemeConfigZod = z.object({
578
- id: emailThemeIdSchema,
579
- name: z.string().nullable(),
580
- colors: z.object({
581
- primaryBackground: z.string().nullable(),
582
- primaryText: z.string().nullable(),
583
- secondaryBackground: z.string().nullable(),
584
- secondaryText: z.string().nullable(),
585
- }),
586
- });
587
- export type DefaultEmailThemeConfigZod = z.infer<
588
- typeof DefaultEmailThemeConfigZod
589
- >;
590
-
591
- export const DefaultEmailThemeConfigsZod = z.array(DefaultEmailThemeConfigZod);
592
- export type DefaultEmailThemeConfigsZod = z.infer<
593
- typeof DefaultEmailThemeConfigsZod
594
- >;
595
-
596
- export const GetDefaultThemeConfigZod = z
597
- .object({
598
- id: defaultThemeConfigIdSchema,
599
- name: z.string().nullable(),
600
- themeName: z.string().nullable(),
601
- colors: z.object({
602
- primaryBackground: z.string().nullable(),
603
- primaryText: z.string().nullable(),
604
- secondaryBackground: z.string().nullable(),
605
- secondaryText: z.string().nullable(),
606
- }),
607
- })
608
- .nullable();
609
- export type GetDefaultThemeConfigZod = z.infer<typeof GetDefaultThemeConfigZod>;
610
-
611
- export const ThemeColorsZod = z.object({
612
- primaryBackground: HexCodeColorSchema,
613
- primaryText: HexCodeColorSchema,
614
- secondaryBackground: HexCodeColorSchema,
615
- secondaryText: HexCodeColorSchema,
616
- });
617
-
618
- export type ThemeColorsZod = z.infer<typeof ThemeColorsZod>;
619
-
620
- export type ThemeIds = {
621
- themeId: string;
622
- emailThemeId: string;
623
- };
624
-
625
- export const THEME_COLOR_MAPPINGS = {
626
- REGULAR_THEME: {
627
- entity: 'ThemeSetting',
628
- themeIdField: 'themeId',
629
- primaryBackground: { category: 'background-color', name: 'dark' },
630
- secondaryBackground: { category: 'background-color', name: 'main' },
631
- primaryText: { category: 'text', name: 'dark' },
632
- secondaryText: { category: 'text', name: 'main' },
633
- },
634
- EMAIL_THEME: {
635
- entity: 'EmailThemeSetting',
636
- themeIdField: 'emailThemeId',
637
- primaryBackground: {
638
- category: 'content',
639
- name: 'primary-background-color',
640
- },
641
- secondaryBackground: {
642
- category: 'content',
643
- name: 'secondary-background-color',
644
- },
645
- primaryText: { category: 'content', name: 'text-primary-color' },
646
- secondaryText: { category: 'content', name: 'text-secondary-color' },
647
- },
648
- } as const;
649
-
650
- export const PostDefaultThemeSetupZod = z.object({
651
- defaultThemeConfigId: defaultThemeConfigIdSchema,
652
- colors: ThemeColorsZod,
653
- themeName: z.string().min(2).max(50).nullable().optional(),
654
- });
655
-
656
- export type PostDefaultThemeSetupZod = z.infer<typeof PostDefaultThemeSetupZod>;
657
-
658
- export enum DefaultThemeConfigCase {
659
- NO_THEMES = 'NO_THEMES',
660
- SAME_CONFIG_WITH_THEMES = 'SAME_CONFIG_WITH_THEMES',
661
- SAME_CONFIG_WITHOUT_THEMES = 'SAME_CONFIG_WITHOUT_THEMES',
662
- DIFFERENT_CONFIG_WITH_THEMES = 'DIFFERENT_CONFIG_WITH_THEMES',
663
- DIFFERENT_CONFIG_WITHOUT_THEMES = 'DIFFERENT_CONFIG_WITHOUT_THEMES',
664
- }
665
-
666
- export enum ThemeType {
667
- REGULAR_THEME = 'REGULAR_THEME',
668
- EMAIL_THEME = 'EMAIL_THEME',
669
- }
670
-
671
- export const GetThemesAdminQuery = z.object({
672
- accountId: accountIdSchema.optional(),
673
- search: z.string().max(100).optional(),
674
- });
675
- export type GetThemesAdminQuery = z.infer<typeof GetThemesAdminQuery>;
676
-
677
- export const CreateDefaultThemeSettingsZod = z.object({
678
- name: z.string(),
679
- category: z.string(),
680
- darkMode: z.string(),
681
- lightMode: z.string(),
682
- themeId: themeIdSchema,
683
- });
684
- export type CreateDefaultThemeSettingsZod = z.infer<
685
- typeof CreateDefaultThemeSettingsZod
686
- >;
687
-
688
- export const THEME_SETTINGS_CATEGORIES = {
689
- 'background-color': ['main', 'dark'],
690
- text: ['main', 'light', 'dark'],
691
- link: ['main'],
692
- 'border-input': ['main'],
693
- 'button-text': ['primary'],
694
- 'background-button': ['primary'],
695
- };
696
-
697
- export const DefaultThemesZod = z.object({
698
- themes: z.array(
699
- z.object({
700
- name: z.string(),
701
- themeSettings: z.array(
702
- z.object({
703
- category: z.string(),
704
- name: z.string(),
705
- lightMode: HexCodeColorSchema,
706
- }),
707
- ),
708
- }),
709
- ),
710
- });
711
- export type DefaultThemesZod = z.infer<typeof DefaultThemesZod>;
712
-
713
- export const GetDefaultThemeZod = z.object({
714
- id: themeIdSchema,
715
- name: z.string().nullable(),
716
- colors: z.object({
717
- primaryBackground: HexCodeColorSchema.nullable(),
718
- primaryText: HexCodeColorSchema.nullable(),
719
- secondaryBackground: HexCodeColorSchema.nullable(),
720
- secondaryText: HexCodeColorSchema.nullable(),
721
- }),
722
- });
723
- export type GetDefaultThemeZod = z.infer<typeof GetDefaultThemeZod>;
724
-
725
- export const GetDefaultThemesZod = z.array(GetDefaultThemeZod);
726
- export type GetDefaultThemesZod = z.infer<typeof GetDefaultThemesZod>;