@dalmore/api-contracts 1.0.6 → 1.0.7
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.
- package/dist/contracts/clients/index.d.ts +19 -0
- package/index.mjs +4 -1
- package/package.json +4 -4
- package/src/common/types/account-contact.types.ts +0 -98
- package/src/common/types/account-detail.types.ts +0 -27
- package/src/common/types/account-integration.types.ts +0 -143
- package/src/common/types/account-manager.types.ts +0 -124
- package/src/common/types/account.types.ts +0 -296
- package/src/common/types/activity.types.ts +0 -274
- package/src/common/types/address.spec.ts +0 -203
- package/src/common/types/address.types.ts +0 -41
- package/src/common/types/aic.types.ts +0 -246
- package/src/common/types/aml.types.ts +0 -18
- package/src/common/types/api-key-logs.types.ts +0 -66
- package/src/common/types/api-keys.types.ts +0 -69
- package/src/common/types/asset.types.ts +0 -338
- package/src/common/types/auth.types.ts +0 -370
- package/src/common/types/batch-jobs.types.ts +0 -151
- package/src/common/types/bonus-tier.types.ts +0 -147
- package/src/common/types/cart.types.ts +0 -18
- package/src/common/types/checklist-items.types.ts +0 -70
- package/src/common/types/checklist.types.ts +0 -97
- package/src/common/types/common.types.spec.ts +0 -336
- package/src/common/types/common.types.ts +0 -1520
- package/src/common/types/comply-advantage-api.types.ts +0 -316
- package/src/common/types/comply-advantage.types.ts +0 -25
- package/src/common/types/contact-us.types.ts +0 -107
- package/src/common/types/contract-helpers.ts +0 -205
- package/src/common/types/countries.types.ts +0 -375
- package/src/common/types/covered-person.types.ts +0 -274
- package/src/common/types/dashboard.types.ts +0 -799
- package/src/common/types/data-record.types.ts +0 -325
- package/src/common/types/data-room.types.ts +0 -242
- package/src/common/types/default-theme-config.types.ts +0 -87
- package/src/common/types/disbursement-adjustment.types.ts +0 -32
- package/src/common/types/disbursement-approval-user.types.ts +0 -100
- package/src/common/types/disbursement-review.types.ts +0 -110
- package/src/common/types/disbursement-transaction.types.ts +0 -72
- package/src/common/types/disbursements.types.ts +0 -310
- package/src/common/types/domain-filter.types.ts +0 -55
- package/src/common/types/email-theme.types.ts +0 -442
- package/src/common/types/entity.types.ts +0 -15
- package/src/common/types/error-responses.types.ts +0 -135
- package/src/common/types/escrow-account.types.ts +0 -104
- package/src/common/types/exchange-api-key.types.ts +0 -121
- package/src/common/types/exchange-import.types.ts +0 -36
- package/src/common/types/exchange-provider.types.ts +0 -329
- package/src/common/types/file.types.ts +0 -461
- package/src/common/types/files.types.spec.ts +0 -154
- package/src/common/types/health.types.ts +0 -29
- package/src/common/types/index.ts +0 -48
- package/src/common/types/individuals.types.ts +0 -554
- package/src/common/types/investor-account.types.ts +0 -1239
- package/src/common/types/investorAccountIdSchema.type.ts +0 -0
- package/src/common/types/investors-offering.types.ts +0 -65
- package/src/common/types/invite.types.ts +0 -133
- package/src/common/types/issuer-bank-account.types.ts +0 -107
- package/src/common/types/issuer-offering.types.ts +0 -306
- package/src/common/types/issuer-payment-method.types.spec.ts +0 -612
- package/src/common/types/issuer-payment-method.types.ts +0 -341
- package/src/common/types/issuer.types.ts +0 -312
- package/src/common/types/job-item.types.ts +0 -119
- package/src/common/types/jobs.types.ts +0 -171
- package/src/common/types/kyb.types.ts +0 -53
- package/src/common/types/kyc.types.ts +0 -188
- package/src/common/types/legal-entity.types.ts +0 -185
- package/src/common/types/login-history.types.ts +0 -46
- package/src/common/types/mail-template.types.ts +0 -436
- package/src/common/types/north-cap-integration.types.ts +0 -190
- package/src/common/types/note.types.ts +0 -109
- package/src/common/types/notification.types.ts +0 -58
- package/src/common/types/notion-api.types.ts +0 -374
- package/src/common/types/notion-database.types.ts +0 -125
- package/src/common/types/notion-page.types.ts +0 -267
- package/src/common/types/offering-reports.types.ts +0 -153
- package/src/common/types/offering-submission.types.ts +0 -314
- package/src/common/types/offering.types.spec.ts +0 -91
- package/src/common/types/offering.types.ts +0 -590
- package/src/common/types/page-revision.types.ts +0 -86
- package/src/common/types/page.types.ts +0 -436
- package/src/common/types/password.type.ts +0 -15
- package/src/common/types/payment-methods.types.ts +0 -298
- package/src/common/types/phone.spec.ts +0 -76
- package/src/common/types/phone.type.ts +0 -27
- package/src/common/types/portfolio.types.ts +0 -50
- package/src/common/types/privacy-policy-and-tos.types.ts +0 -231
- package/src/common/types/queue.types.ts +0 -112
- package/src/common/types/registered-reps.types.ts +0 -25
- package/src/common/types/rejection-reasons.types.ts +0 -56
- package/src/common/types/reminder-config.types.ts +0 -40
- package/src/common/types/review.types.ts +0 -133
- package/src/common/types/role.types.ts +0 -26
- package/src/common/types/secondary-customer.types.ts +0 -66
- package/src/common/types/secondary-issuer.types.ts +0 -50
- package/src/common/types/secondary-order.types.ts +0 -58
- package/src/common/types/secondary-security.types.ts +0 -60
- package/src/common/types/secondary-trade.entity.ts +0 -16
- package/src/common/types/secondary-trade.types.ts +0 -95
- package/src/common/types/secure-request.types.ts +0 -68
- package/src/common/types/signer.types.ts +0 -651
- package/src/common/types/site-link.types.spec.ts +0 -134
- package/src/common/types/site-link.types.ts +0 -166
- package/src/common/types/site-settings.types.ts +0 -726
- package/src/common/types/site.types.ts +0 -270
- package/src/common/types/sms.types.ts +0 -30
- package/src/common/types/state-machine.types.ts +0 -177
- package/src/common/types/states.types.ts +0 -163
- package/src/common/types/subdoc-preview.types.ts +0 -35
- package/src/common/types/task.types.ts +0 -258
- package/src/common/types/trade-adjustment.type.ts +0 -33
- package/src/common/types/trade-line-item.type.ts +0 -132
- package/src/common/types/trade.types.ts +0 -929
- package/src/common/types/transaction.types.ts +0 -198
- package/src/common/types/trusted-contact.types.ts +0 -122
- package/src/common/types/typography.types.ts +0 -75
- package/src/common/types/user-manual.types.ts +0 -290
- package/src/common/types/user-setting.types.ts +0 -133
- package/src/common/types/user.types.ts +0 -320
- package/src/common/types/webhook.types.ts +0 -588
- package/src/common/types/zip.type.ts +0 -36
- package/src/contracts/clients/accounts/index.ts +0 -61
- package/src/contracts/clients/aic/index.ts +0 -59
- package/src/contracts/clients/api-key-logs/index.ts +0 -53
- package/src/contracts/clients/api-keys/index.ts +0 -73
- package/src/contracts/clients/assets/index.ts +0 -102
- package/src/contracts/clients/auth/index.ts +0 -50
- package/src/contracts/clients/files/index.ts +0 -166
- package/src/contracts/clients/files-public/index.ts +0 -166
- package/src/contracts/clients/index.ts +0 -44
- package/src/contracts/clients/individuals/index.ts +0 -93
- package/src/contracts/clients/investor-accounts/index.ts +0 -93
- package/src/contracts/clients/issuers/index.ts +0 -94
- package/src/contracts/clients/legal-entities/index.ts +0 -93
- package/src/contracts/clients/offerings/index.ts +0 -117
- package/src/contracts/clients/secure-requests/index.ts +0 -34
- package/src/contracts/clients/sites/index.ts +0 -56
- package/src/contracts/clients/trades/index.ts +0 -122
|
@@ -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>;
|