@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.
- package/README.md +34 -60
- package/index.d.mts +17 -0
- package/index.d.ts +17 -0
- package/index.mjs +1001 -18638
- package/package.json +7 -54
- package/clients/index.mjs +0 -10970
- package/compliance/index.mjs +0 -20016
- package/compliance-apikey/index.mjs +0 -9795
- package/helpers/index.mjs +0 -146
- package/investors/index.mjs +0 -12844
- package/issuers/index.mjs +0 -16168
- package/secondaries/index.mjs +0 -10282
- package/src/common/helpers/index.ts +0 -205
- 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.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 -150
- 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.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/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.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.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.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 -111
- package/src/common/types/registered-reps.types.ts +0 -25
- package/src/common/types/rejection-reasons.types.ts +0 -56
- 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.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 -931
- 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
- package/src/contracts/compliance/account-contacts/index.ts +0 -82
- package/src/contracts/compliance/account-managers/index.ts +0 -142
- package/src/contracts/compliance/accounts/index.ts +0 -187
- package/src/contracts/compliance/activities/index.ts +0 -55
- package/src/contracts/compliance/aic/index.ts +0 -60
- package/src/contracts/compliance/api-keys/index.ts +0 -91
- package/src/contracts/compliance/assets/index.ts +0 -122
- package/src/contracts/compliance/auth/index.ts +0 -134
- package/src/contracts/compliance/batch-jobs/index.ts +0 -62
- package/src/contracts/compliance/bonus-tiers/index.ts +0 -55
- package/src/contracts/compliance/checklist/index.ts +0 -87
- package/src/contracts/compliance/checklist-items/index.ts +0 -86
- package/src/contracts/compliance/covered-persons/index.ts +0 -97
- package/src/contracts/compliance/dashboard/index.ts +0 -111
- package/src/contracts/compliance/data-records/index.ts +0 -116
- package/src/contracts/compliance/data-rooms/index.ts +0 -113
- package/src/contracts/compliance/default-theme-configs/index.ts +0 -95
- package/src/contracts/compliance/disbursement/index.ts +0 -165
- package/src/contracts/compliance/disbursement-approval-users/index.ts +0 -84
- package/src/contracts/compliance/disbursement-transactions/index.ts +0 -37
- package/src/contracts/compliance/domain-filters/index.ts +0 -117
- package/src/contracts/compliance/email-themes/index.ts +0 -284
- package/src/contracts/compliance/escrow-accounts/index.ts +0 -85
- package/src/contracts/compliance/exchange-api-keys/index.ts +0 -129
- package/src/contracts/compliance/exchange-imports/index.ts +0 -137
- package/src/contracts/compliance/files/index.ts +0 -267
- package/src/contracts/compliance/files-public/index.ts +0 -188
- package/src/contracts/compliance/health/index.ts +0 -26
- package/src/contracts/compliance/index.ts +0 -147
- package/src/contracts/compliance/individuals/index.ts +0 -57
- package/src/contracts/compliance/investor-accounts/index.ts +0 -141
- package/src/contracts/compliance/invites/index.ts +0 -137
- package/src/contracts/compliance/issuer-bank-accounts/index.ts +0 -81
- package/src/contracts/compliance/issuer-payment-methods/index.ts +0 -81
- package/src/contracts/compliance/issuers/index.ts +0 -97
- package/src/contracts/compliance/job-items/index.ts +0 -58
- package/src/contracts/compliance/jobs/index.ts +0 -59
- package/src/contracts/compliance/kyb/index.ts +0 -54
- package/src/contracts/compliance/kyc/index.ts +0 -77
- package/src/contracts/compliance/legal-entities/index.ts +0 -57
- package/src/contracts/compliance/login-histories/index.ts +0 -37
- package/src/contracts/compliance/notes/index.ts +0 -69
- package/src/contracts/compliance/notion-databases/index.ts +0 -107
- package/src/contracts/compliance/notion-pages/index.ts +0 -105
- package/src/contracts/compliance/offering-reports/index.ts +0 -149
- package/src/contracts/compliance/offerings/index.ts +0 -233
- package/src/contracts/compliance/pages/index.ts +0 -178
- package/src/contracts/compliance/payment-methods/index.ts +0 -57
- package/src/contracts/compliance/rejection-reasons/index.ts +0 -32
- package/src/contracts/compliance/review/index.ts +0 -169
- package/src/contracts/compliance/roles/index.ts +0 -34
- package/src/contracts/compliance/secondary-customers/index.ts +0 -77
- package/src/contracts/compliance/secondary-orders/index.ts +0 -60
- package/src/contracts/compliance/secondary-trades/index.ts +0 -100
- package/src/contracts/compliance/secure-requests/index.ts +0 -54
- package/src/contracts/compliance/signer/index.ts +0 -369
- package/src/contracts/compliance/site-links/index.ts +0 -128
- package/src/contracts/compliance/site-settings/index.ts +0 -669
- package/src/contracts/compliance/sites/index.ts +0 -56
- package/src/contracts/compliance/state-machine/index.ts +0 -94
- package/src/contracts/compliance/tasks/index.ts +0 -91
- package/src/contracts/compliance/third-parties/index.ts +0 -52
- package/src/contracts/compliance/trade-line-items/index.ts +0 -59
- package/src/contracts/compliance/trades/index.ts +0 -230
- package/src/contracts/compliance/transactions/index.ts +0 -161
- package/src/contracts/compliance/user-manuals/index.ts +0 -271
- package/src/contracts/compliance/user-settings/index.ts +0 -189
- package/src/contracts/compliance/users/index.ts +0 -200
- package/src/contracts/compliance/webhooks/index.ts +0 -41
- package/src/contracts/compliance-apikey/accounts/index.ts +0 -58
- package/src/contracts/compliance-apikey/index.ts +0 -14
- package/src/contracts/index.ts +0 -6
- package/src/contracts/investors/account-contacts/index.ts +0 -58
- package/src/contracts/investors/aic/index.ts +0 -59
- package/src/contracts/investors/assets/index.ts +0 -61
- package/src/contracts/investors/auth/index.ts +0 -116
- package/src/contracts/investors/bonus-tiers/index.ts +0 -37
- package/src/contracts/investors/cart/index.ts +0 -75
- package/src/contracts/investors/contact-us/index.ts +0 -48
- package/src/contracts/investors/data-records/index.ts +0 -113
- package/src/contracts/investors/data-rooms/index.ts +0 -96
- package/src/contracts/investors/files/index.ts +0 -167
- package/src/contracts/investors/files-public/index.ts +0 -185
- package/src/contracts/investors/index.ts +0 -72
- package/src/contracts/investors/individuals/index.ts +0 -99
- package/src/contracts/investors/investor-accounts/index.ts +0 -110
- package/src/contracts/investors/issuer-payment-methods/index.ts +0 -36
- package/src/contracts/investors/issuers/index.ts +0 -30
- package/src/contracts/investors/legal-entities/index.ts +0 -93
- package/src/contracts/investors/notes/index.ts +0 -69
- package/src/contracts/investors/offerings/index.ts +0 -93
- package/src/contracts/investors/pages/index.ts +0 -88
- package/src/contracts/investors/payment-methods/index.ts +0 -149
- package/src/contracts/investors/portfolios/index.ts +0 -53
- package/src/contracts/investors/sites/index.ts +0 -96
- package/src/contracts/investors/tasks/index.ts +0 -111
- package/src/contracts/investors/trade-line-items/index.ts +0 -75
- package/src/contracts/investors/trades/index.ts +0 -114
- package/src/contracts/investors/transactions/index.ts +0 -37
- package/src/contracts/investors/trusted-contacts/index.ts +0 -93
- package/src/contracts/investors/user-manuals/index.ts +0 -62
- package/src/contracts/investors/user-settings/index.ts +0 -170
- package/src/contracts/investors/users/index.ts +0 -45
- package/src/contracts/investors/webhooks/index.ts +0 -30
- package/src/contracts/issuers/account-contacts/index.ts +0 -76
- package/src/contracts/issuers/account-integrations/index.ts +0 -97
- package/src/contracts/issuers/accounts/index.ts +0 -97
- package/src/contracts/issuers/activities/index.ts +0 -54
- package/src/contracts/issuers/aic/index.ts +0 -39
- package/src/contracts/issuers/api-key-logs/index.ts +0 -53
- package/src/contracts/issuers/api-keys/index.ts +0 -93
- package/src/contracts/issuers/assets/index.ts +0 -122
- package/src/contracts/issuers/auth/index.ts +0 -152
- package/src/contracts/issuers/bonus-tiers/index.ts +0 -55
- package/src/contracts/issuers/contact-us/index.ts +0 -48
- package/src/contracts/issuers/covered-persons/index.ts +0 -136
- package/src/contracts/issuers/dashboard/index.ts +0 -72
- package/src/contracts/issuers/data-records/index.ts +0 -257
- package/src/contracts/issuers/data-rooms/index.ts +0 -134
- package/src/contracts/issuers/disbursement-approval-users/index.ts +0 -82
- package/src/contracts/issuers/disbursement-transactions/index.ts +0 -53
- package/src/contracts/issuers/disbursements/index.ts +0 -153
- package/src/contracts/issuers/email-themes/index.ts +0 -242
- package/src/contracts/issuers/escrow-accounts/index.ts +0 -81
- package/src/contracts/issuers/exchange-api-keys/index.ts +0 -144
- package/src/contracts/issuers/files/index.ts +0 -166
- package/src/contracts/issuers/files-public/index.ts +0 -166
- package/src/contracts/issuers/health/index.ts +0 -24
- package/src/contracts/issuers/index.ts +0 -112
- package/src/contracts/issuers/investor-accounts/index.ts +0 -148
- package/src/contracts/issuers/invites/index.ts +0 -129
- package/src/contracts/issuers/issuer/index.ts +0 -94
- package/src/contracts/issuers/issuer-bank-accounts/index.ts +0 -81
- package/src/contracts/issuers/issuer-payment-methods/index.ts +0 -136
- package/src/contracts/issuers/kyc/index.ts +0 -38
- package/src/contracts/issuers/login-histories/index.ts +0 -51
- package/src/contracts/issuers/notes/index.ts +0 -69
- package/src/contracts/issuers/offerings/index.ts +0 -206
- package/src/contracts/issuers/pages/index.ts +0 -138
- package/src/contracts/issuers/payment-methods/index.ts +0 -61
- package/src/contracts/issuers/portfolios/index.ts +0 -36
- package/src/contracts/issuers/rejection-reasons/index.ts +0 -32
- package/src/contracts/issuers/review/index.ts +0 -63
- package/src/contracts/issuers/secondary-customers/index.ts +0 -55
- package/src/contracts/issuers/secondary-orders/index.ts +0 -57
- package/src/contracts/issuers/secondary-trades/index.ts +0 -57
- package/src/contracts/issuers/secure-requests/index.ts +0 -34
- package/src/contracts/issuers/site-links/index.ts +0 -116
- package/src/contracts/issuers/site-settings/index.ts +0 -585
- package/src/contracts/issuers/sites/index.ts +0 -32
- package/src/contracts/issuers/tasks/index.ts +0 -111
- package/src/contracts/issuers/trades/index.ts +0 -132
- package/src/contracts/issuers/transactions/index.ts +0 -158
- package/src/contracts/issuers/user-manuals/index.ts +0 -62
- package/src/contracts/issuers/user-settings/index.ts +0 -170
- package/src/contracts/issuers/users/index.ts +0 -126
- package/src/contracts/secondaries/accounts/index.ts +0 -58
- package/src/contracts/secondaries/index.ts +0 -23
- package/src/contracts/secondaries/secondary-customers/index.ts +0 -55
- package/src/contracts/secondaries/secondary-issuers/index.ts +0 -94
- package/src/contracts/secondaries/secondary-orders/index.ts +0 -56
- package/src/contracts/secondaries/secondary-securities/index.ts +0 -95
- package/src/contracts/secondaries/secondary-trades/index.ts +0 -56
- package/types/index.mjs +0 -10320
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract helpers - minimal subset for API contracts package
|
|
3
|
-
* This file is copied directly to @dalmore/api-contracts
|
|
4
|
-
*/
|
|
5
|
-
import { HttpStatus } from '@nestjs/common';
|
|
6
|
-
import parsePhoneNumberFromString, {
|
|
7
|
-
CountryCode,
|
|
8
|
-
PhoneNumber,
|
|
9
|
-
} from 'libphonenumber-js';
|
|
10
|
-
import { err, ok, Result } from 'neverthrow';
|
|
11
|
-
import { ErrorResult } from '../types/common.types';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Validates a US zip code format (12345 or 12345-6789)
|
|
15
|
-
*/
|
|
16
|
-
export const validateUSZipCode = (zipCode: string): boolean => {
|
|
17
|
-
const regex = /^[0-9]{5}(?:-[0-9]{4})?$/;
|
|
18
|
-
return regex.test(zipCode);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Validates a Canadian postal code format (A1A 1A1)
|
|
23
|
-
*/
|
|
24
|
-
export const validateCanadaZipCode = (zipCode: string): boolean => {
|
|
25
|
-
const regex = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
|
|
26
|
-
return regex.test(zipCode);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Normalizes a short date string (M/D/YY or M/D/YYYY) to MM/DD/YYYY format
|
|
31
|
-
*/
|
|
32
|
-
export function normalizeShortDate(input: string): string {
|
|
33
|
-
const [month, day, year] = input.split('/');
|
|
34
|
-
|
|
35
|
-
if (!month || !day || !year) {
|
|
36
|
-
throw new Error('Invalid date format');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const paddedMonth = month.padStart(2, '0');
|
|
40
|
-
const paddedDay = day.padStart(2, '0');
|
|
41
|
-
const fullYear = year.length === 2 ? `20${year}` : year;
|
|
42
|
-
|
|
43
|
-
return `${paddedMonth}/${paddedDay}/${fullYear}`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Converts a string into a URL-safe slug
|
|
48
|
-
*/
|
|
49
|
-
export function slugify(input: string, exclude: boolean = false): string {
|
|
50
|
-
if (exclude) {
|
|
51
|
-
const excludeWords = ['llc', 'inc', 'corp', 'co'];
|
|
52
|
-
const negativeWordsList = [
|
|
53
|
-
'www',
|
|
54
|
-
'api',
|
|
55
|
-
'admin',
|
|
56
|
-
'dashboard',
|
|
57
|
-
'auth',
|
|
58
|
-
'cdn',
|
|
59
|
-
'static',
|
|
60
|
-
'blog',
|
|
61
|
-
'support',
|
|
62
|
-
'status',
|
|
63
|
-
'mail',
|
|
64
|
-
'smtp',
|
|
65
|
-
'ftp',
|
|
66
|
-
'ssh',
|
|
67
|
-
'login',
|
|
68
|
-
'register',
|
|
69
|
-
'signup',
|
|
70
|
-
'account',
|
|
71
|
-
'accounts',
|
|
72
|
-
'user',
|
|
73
|
-
'users',
|
|
74
|
-
'profile',
|
|
75
|
-
'settings',
|
|
76
|
-
'help',
|
|
77
|
-
'docs',
|
|
78
|
-
'documentation',
|
|
79
|
-
'developer',
|
|
80
|
-
'developers',
|
|
81
|
-
'app',
|
|
82
|
-
'apps',
|
|
83
|
-
'test',
|
|
84
|
-
'demo',
|
|
85
|
-
'staging',
|
|
86
|
-
'dev',
|
|
87
|
-
'prod',
|
|
88
|
-
'production',
|
|
89
|
-
'beta',
|
|
90
|
-
'alpha',
|
|
91
|
-
'portal',
|
|
92
|
-
'portals',
|
|
93
|
-
'client',
|
|
94
|
-
'clients',
|
|
95
|
-
'investor',
|
|
96
|
-
'investors',
|
|
97
|
-
'issuer',
|
|
98
|
-
'issuers',
|
|
99
|
-
'compliance',
|
|
100
|
-
'offering',
|
|
101
|
-
'offerings',
|
|
102
|
-
'trade',
|
|
103
|
-
'trades',
|
|
104
|
-
];
|
|
105
|
-
|
|
106
|
-
let slug = input
|
|
107
|
-
.toLowerCase()
|
|
108
|
-
.replace(/[^\w\s-]/g, '')
|
|
109
|
-
.replace(/[\s_-]+/g, '-')
|
|
110
|
-
.replace(/^-+|-+$/g, '');
|
|
111
|
-
|
|
112
|
-
excludeWords.forEach((word) => {
|
|
113
|
-
slug = slug.replace(new RegExp(`-${word}$`, 'i'), '');
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
if (negativeWordsList.includes(slug)) {
|
|
117
|
-
return 'new-account';
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return slug;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return input
|
|
124
|
-
.toLowerCase()
|
|
125
|
-
.replace(/[^\w\s-]/g, '')
|
|
126
|
-
.replace(/[\s_-]+/g, '-')
|
|
127
|
-
.replace(/^-+|-+$/g, '');
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
type CurlOptions = {
|
|
131
|
-
query?: Record<string, string>;
|
|
132
|
-
headers?: Record<string, string>;
|
|
133
|
-
body?: Record<string, unknown>;
|
|
134
|
-
formData?: Record<string, string>;
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
export const authHeader: CurlOptions['headers'] = {
|
|
138
|
-
Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
const generateCurlExample = (
|
|
142
|
-
method: string,
|
|
143
|
-
path: string,
|
|
144
|
-
options: CurlOptions,
|
|
145
|
-
) => {
|
|
146
|
-
const baseUrl = 'https://dalmore-client-portal-api-prod.onrender.com/api/v1';
|
|
147
|
-
let curl = `curl -X ${method.toUpperCase()} '${baseUrl}${path}`;
|
|
148
|
-
if (options.query) {
|
|
149
|
-
const queryString = new URLSearchParams(options.query).toString();
|
|
150
|
-
curl += `?${queryString}`;
|
|
151
|
-
}
|
|
152
|
-
curl += "'";
|
|
153
|
-
if (options.headers) {
|
|
154
|
-
Object.entries(options.headers).forEach(([key, value]) => {
|
|
155
|
-
curl += ` \\\n --header '${key}: ${value}'`;
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
if (options.body) {
|
|
159
|
-
curl += ` \\\n --header 'Content-Type: application/json'`;
|
|
160
|
-
curl += ` \\\n --data '${JSON.stringify(options.body)}'`;
|
|
161
|
-
}
|
|
162
|
-
if (options.formData) {
|
|
163
|
-
Object.entries(options.formData).forEach(([key, value]) => {
|
|
164
|
-
curl += ` \\\n --form '${key}=${value}'`;
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
return curl;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
export const generateApiDescription = (
|
|
171
|
-
summary: string,
|
|
172
|
-
method: string,
|
|
173
|
-
path: string,
|
|
174
|
-
options: CurlOptions,
|
|
175
|
-
) => {
|
|
176
|
-
const curlExample = generateCurlExample(method, path, options);
|
|
177
|
-
return `${summary}
|
|
178
|
-
|
|
179
|
-
### Example curl request
|
|
180
|
-
|
|
181
|
-
\`\`\`bash
|
|
182
|
-
${curlExample}
|
|
183
|
-
\`\`\``;
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Normalizes a phone number to E.164 format
|
|
188
|
-
*/
|
|
189
|
-
export function normalizePhoneNumber(
|
|
190
|
-
phoneNumber: string,
|
|
191
|
-
countryCode: CountryCode,
|
|
192
|
-
): Result<PhoneNumber, ErrorResult> {
|
|
193
|
-
const parsedPhoneNumber = parsePhoneNumberFromString(
|
|
194
|
-
phoneNumber,
|
|
195
|
-
countryCode,
|
|
196
|
-
);
|
|
197
|
-
|
|
198
|
-
if (!parsedPhoneNumber || !parsedPhoneNumber.isValid()) {
|
|
199
|
-
return err({
|
|
200
|
-
status: HttpStatus.BAD_REQUEST,
|
|
201
|
-
message: 'Invalid phone number. Only numbers',
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
return ok(parsedPhoneNumber);
|
|
205
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
-
import { TypeID } from 'typeid-js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { accountIdSchema } from './account.types';
|
|
5
|
-
import { PhoneZodSchema } from './phone.type';
|
|
6
|
-
import {
|
|
7
|
-
AccountContactType,
|
|
8
|
-
AccountZod,
|
|
9
|
-
IPaginationMeta,
|
|
10
|
-
} from './common.types';
|
|
11
|
-
import { IBaseEntity } from './entity.types';
|
|
12
|
-
import { PhoneNumberData } from './sms.types';
|
|
13
|
-
|
|
14
|
-
extendZodWithOpenApi(z);
|
|
15
|
-
|
|
16
|
-
export const accountContactIdSchema = z.string().refine(
|
|
17
|
-
(value) => {
|
|
18
|
-
try {
|
|
19
|
-
const tid = TypeID.fromString(value);
|
|
20
|
-
return tid.getType() === 'account_contact';
|
|
21
|
-
} catch {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
message:
|
|
27
|
-
'Invalid account contact ID format. Must be a valid TypeID with "account_contact" prefix.',
|
|
28
|
-
},
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
export const IAccountContact = IBaseEntity.extend({
|
|
32
|
-
id: accountContactIdSchema,
|
|
33
|
-
title: z.string().nullable().openapi({ example: 'Mr' }),
|
|
34
|
-
firstName: z.string().nullable().openapi({ example: 'John' }),
|
|
35
|
-
lastName: z.string().nullable().openapi({ example: 'Doe' }),
|
|
36
|
-
email: z
|
|
37
|
-
.string()
|
|
38
|
-
.email()
|
|
39
|
-
.nullable()
|
|
40
|
-
.openapi({ example: 'john.doe@example.com' }),
|
|
41
|
-
phone: PhoneNumberData.nullable().optional().openapi({ example: null }),
|
|
42
|
-
type: z
|
|
43
|
-
.nativeEnum(AccountContactType)
|
|
44
|
-
.openapi({ example: AccountContactType.GENERAL }),
|
|
45
|
-
accountId: accountIdSchema.openapi({
|
|
46
|
-
example: 'account_01je6ht4b8fbmttkzh2hs82xqp',
|
|
47
|
-
}),
|
|
48
|
-
account: AccountZod.optional().nullable(),
|
|
49
|
-
referenceLink: z.string().nullable().optional(),
|
|
50
|
-
});
|
|
51
|
-
export type IAccountContact = z.infer<typeof IAccountContact>;
|
|
52
|
-
|
|
53
|
-
export const PatchAccountContactZod = z.object({
|
|
54
|
-
title: z
|
|
55
|
-
.string()
|
|
56
|
-
.min(1)
|
|
57
|
-
.max(50)
|
|
58
|
-
.nullable()
|
|
59
|
-
.optional()
|
|
60
|
-
.openapi({ example: 'Mr' }),
|
|
61
|
-
firstName: z.string().min(1).max(150).openapi({ example: 'John' }),
|
|
62
|
-
lastName: z.string().min(1).max(150).openapi({ example: 'Doe' }),
|
|
63
|
-
email: z.string().email().openapi({ example: 'john.doe@example.com' }),
|
|
64
|
-
phone: PhoneZodSchema.nullable()
|
|
65
|
-
.optional()
|
|
66
|
-
.openapi({ example: '+12124567890' }),
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export type PatchAccountContactZod = z.infer<typeof PatchAccountContactZod>;
|
|
70
|
-
|
|
71
|
-
export const CompliancePatchAccountContactZod = PatchAccountContactZod.extend({
|
|
72
|
-
accountId: accountIdSchema.openapi({
|
|
73
|
-
example: 'account_01je6ht4b8fbmttkzh2hs82xqp',
|
|
74
|
-
}),
|
|
75
|
-
referenceLink: z
|
|
76
|
-
.string()
|
|
77
|
-
.url()
|
|
78
|
-
.max(2048)
|
|
79
|
-
.nullable()
|
|
80
|
-
.optional()
|
|
81
|
-
.openapi({ example: 'https://www.google.com' }),
|
|
82
|
-
});
|
|
83
|
-
export type CompliancePatchAccountContactZod = z.infer<
|
|
84
|
-
typeof CompliancePatchAccountContactZod
|
|
85
|
-
>;
|
|
86
|
-
|
|
87
|
-
export const IPaginatedAccountContact = z.object({
|
|
88
|
-
items: z.array(IAccountContact),
|
|
89
|
-
meta: IPaginationMeta,
|
|
90
|
-
});
|
|
91
|
-
export type IPaginatedAccountContact = z.infer<typeof IPaginatedAccountContact>;
|
|
92
|
-
|
|
93
|
-
export const AccountContactDeleteResponse = z.object({
|
|
94
|
-
status: z.enum(['pass', 'fail']),
|
|
95
|
-
});
|
|
96
|
-
export type AccountContactDeleteResponse = z.infer<
|
|
97
|
-
typeof AccountContactDeleteResponse
|
|
98
|
-
>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { IAsset } from './asset.types';
|
|
3
|
-
import { IIssuer } from './issuer.types';
|
|
4
|
-
import { IOffering } from './offering.types';
|
|
5
|
-
import { IIssuerPaymentMethod } from './issuer-payment-method.types';
|
|
6
|
-
import { SiteZod } from './site.types';
|
|
7
|
-
import { IPage } from './page.types';
|
|
8
|
-
|
|
9
|
-
export const AccountDetailSummaryZod = z.object({
|
|
10
|
-
id: z.string(),
|
|
11
|
-
name: z.string(),
|
|
12
|
-
issuers: z.array(
|
|
13
|
-
IIssuer.extend({
|
|
14
|
-
offerings: z.lazy(() =>
|
|
15
|
-
z.array(
|
|
16
|
-
IOffering.extend({
|
|
17
|
-
assets: z.lazy(() => z.array(IAsset)),
|
|
18
|
-
}),
|
|
19
|
-
),
|
|
20
|
-
),
|
|
21
|
-
paymentMethods: z.lazy(() => z.array(IIssuerPaymentMethod)),
|
|
22
|
-
}),
|
|
23
|
-
),
|
|
24
|
-
sites: z.lazy(() => z.array(SiteZod)),
|
|
25
|
-
pages: z.lazy(() => z.array(IPage)),
|
|
26
|
-
});
|
|
27
|
-
export type AccountDetailSummaryZod = z.infer<typeof AccountDetailSummaryZod>;
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
-
import { TypeID } from 'typeid-js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { IBaseEntity } from './entity.types';
|
|
5
|
-
import { accountIdSchema } from './account.types';
|
|
6
|
-
import { IPaginationMeta } from './common.types';
|
|
7
|
-
|
|
8
|
-
extendZodWithOpenApi(z);
|
|
9
|
-
|
|
10
|
-
export enum IntegrationType {
|
|
11
|
-
RAISI = 'RAISI',
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const accountIntegrationIdSchema = z.string().refine(
|
|
15
|
-
(value) => {
|
|
16
|
-
try {
|
|
17
|
-
const tid = TypeID.fromString(value);
|
|
18
|
-
return tid.getType() === 'account_integration';
|
|
19
|
-
} catch {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
message:
|
|
25
|
-
'Invalid account integration ID format. Must be a valid TypeID with "account_integration" prefix.',
|
|
26
|
-
},
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
export const AccountIntegrationZod = IBaseEntity.extend({
|
|
30
|
-
id: accountIntegrationIdSchema,
|
|
31
|
-
name: z.string(),
|
|
32
|
-
integration: z.nativeEnum(IntegrationType),
|
|
33
|
-
description: z.string().nullable(),
|
|
34
|
-
partnerId: z.string().nullable(),
|
|
35
|
-
url: z.string().nullable(),
|
|
36
|
-
webhook: z.string().nullable(),
|
|
37
|
-
active: z.boolean(),
|
|
38
|
-
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
39
|
-
accountId: z.lazy(() => accountIdSchema),
|
|
40
|
-
});
|
|
41
|
-
export type AccountIntegrationZod = z.infer<typeof AccountIntegrationZod>;
|
|
42
|
-
|
|
43
|
-
export const IPaginatedAccountIntegration = z.object({
|
|
44
|
-
items: z.array(AccountIntegrationZod),
|
|
45
|
-
meta: IPaginationMeta,
|
|
46
|
-
});
|
|
47
|
-
export type IPaginatedAccountIntegration = z.infer<
|
|
48
|
-
typeof IPaginatedAccountIntegration
|
|
49
|
-
>;
|
|
50
|
-
|
|
51
|
-
export const PostAccountIntegrationZod = z.object({
|
|
52
|
-
name: z.string().min(1).max(100).openapi({ example: 'Raisi' }),
|
|
53
|
-
integration: z
|
|
54
|
-
.nativeEnum(IntegrationType)
|
|
55
|
-
.openapi({ example: IntegrationType.RAISI }),
|
|
56
|
-
description: z
|
|
57
|
-
.string()
|
|
58
|
-
.min(1)
|
|
59
|
-
.max(1000)
|
|
60
|
-
.nullable()
|
|
61
|
-
.optional()
|
|
62
|
-
.openapi({ example: 'Raisi integration' }),
|
|
63
|
-
partnerId: z
|
|
64
|
-
.string()
|
|
65
|
-
.min(1)
|
|
66
|
-
.max(100)
|
|
67
|
-
.nullable()
|
|
68
|
-
.optional()
|
|
69
|
-
.openapi({ example: '1234567890' }),
|
|
70
|
-
url: z
|
|
71
|
-
.string()
|
|
72
|
-
.url()
|
|
73
|
-
.nullable()
|
|
74
|
-
.optional()
|
|
75
|
-
.openapi({ example: 'https://www.raisi.com' }),
|
|
76
|
-
webhook: z
|
|
77
|
-
.string()
|
|
78
|
-
.url()
|
|
79
|
-
.nullable()
|
|
80
|
-
.optional()
|
|
81
|
-
.openapi({ example: 'https://www.raisi.com/webhook' }),
|
|
82
|
-
active: z.boolean().default(true).openapi({ example: true }),
|
|
83
|
-
metadata: z
|
|
84
|
-
.record(z.string(), z.unknown())
|
|
85
|
-
.nullable()
|
|
86
|
-
.optional()
|
|
87
|
-
.openapi({ example: { key: 'value' } }),
|
|
88
|
-
});
|
|
89
|
-
export type PostAccountIntegrationZod = z.infer<
|
|
90
|
-
typeof PostAccountIntegrationZod
|
|
91
|
-
>;
|
|
92
|
-
|
|
93
|
-
export const PatchAccountIntegrationZod = z.object({
|
|
94
|
-
name: z
|
|
95
|
-
.string()
|
|
96
|
-
.min(1)
|
|
97
|
-
.max(100)
|
|
98
|
-
.nullable()
|
|
99
|
-
.optional()
|
|
100
|
-
.openapi({ example: 'Raisi' }),
|
|
101
|
-
integration: z
|
|
102
|
-
.nativeEnum(IntegrationType)
|
|
103
|
-
.optional()
|
|
104
|
-
.openapi({ example: IntegrationType.RAISI }),
|
|
105
|
-
description: z
|
|
106
|
-
.string()
|
|
107
|
-
.min(1)
|
|
108
|
-
.max(1000)
|
|
109
|
-
.nullable()
|
|
110
|
-
.optional()
|
|
111
|
-
.openapi({ example: 'Raisi integration' }),
|
|
112
|
-
partnerId: z.string().min(1).max(100).nullable().optional(),
|
|
113
|
-
url: z
|
|
114
|
-
.string()
|
|
115
|
-
.url()
|
|
116
|
-
.nullable()
|
|
117
|
-
.optional()
|
|
118
|
-
.openapi({ example: 'https://www.raisi.com' }),
|
|
119
|
-
webhook: z
|
|
120
|
-
.string()
|
|
121
|
-
.url()
|
|
122
|
-
.nullable()
|
|
123
|
-
.optional()
|
|
124
|
-
.openapi({ example: 'https://www.raisi.com/webhook' }),
|
|
125
|
-
active: z.boolean().nullable().optional(),
|
|
126
|
-
metadata: z
|
|
127
|
-
.record(z.string(), z.unknown())
|
|
128
|
-
.nullable()
|
|
129
|
-
.optional()
|
|
130
|
-
.openapi({ example: { key: 'value' } }),
|
|
131
|
-
});
|
|
132
|
-
export type PatchAccountIntegrationZod = z.infer<
|
|
133
|
-
typeof PatchAccountIntegrationZod
|
|
134
|
-
>;
|
|
135
|
-
|
|
136
|
-
export const AccountIntegrationFiltersZod = z.object({
|
|
137
|
-
search: z.string().max(50).optional(),
|
|
138
|
-
integration: z.nativeEnum(IntegrationType).optional(),
|
|
139
|
-
active: z.boolean().optional(),
|
|
140
|
-
});
|
|
141
|
-
export type AccountIntegrationFiltersZod = z.infer<
|
|
142
|
-
typeof AccountIntegrationFiltersZod
|
|
143
|
-
>;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { TypeID } from 'typeid-js';
|
|
4
|
-
import { IBaseEntity } from './entity.types';
|
|
5
|
-
import { PhoneNumberData } from './sms.types';
|
|
6
|
-
import { userIdSchema, UserZod } from './user.types';
|
|
7
|
-
import { IPaginationMeta } from './common.types';
|
|
8
|
-
import { PhoneZodSchema } from './phone.type';
|
|
9
|
-
|
|
10
|
-
extendZodWithOpenApi(z);
|
|
11
|
-
export const accountManagerIdSchema = z.string().refine(
|
|
12
|
-
(value) => {
|
|
13
|
-
try {
|
|
14
|
-
const tid = TypeID.fromString(value);
|
|
15
|
-
return tid.getType() === 'account_manager';
|
|
16
|
-
} catch {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
message: `Invalid account manager ID format. Must be a valid TypeID with "account_manager" prefix. Example: account_manager_01j5y5ghx5fg68d663j1fvy2x7`,
|
|
22
|
-
},
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export const accountManagersInclude = z.enum(['accounts', 'user']);
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @description Query parameters for including related entities
|
|
29
|
-
* @xample in contract us as -> query: z.object({}).merge(AccountManagersIncludeQuery),
|
|
30
|
-
*/
|
|
31
|
-
export const AccountManagersIncludeQuery = z.object({
|
|
32
|
-
include: z
|
|
33
|
-
.string()
|
|
34
|
-
.optional()
|
|
35
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
36
|
-
.refine(
|
|
37
|
-
(includes) =>
|
|
38
|
-
includes.every((include) =>
|
|
39
|
-
accountManagersInclude.options.includes(include as any),
|
|
40
|
-
),
|
|
41
|
-
{
|
|
42
|
-
message: `Invalid include option provided. Valid options are: ${accountManagersInclude.options.join(',')}`,
|
|
43
|
-
},
|
|
44
|
-
)
|
|
45
|
-
.openapi({
|
|
46
|
-
example: `${accountManagersInclude.options.join(',')}`,
|
|
47
|
-
}),
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export const IAccountManagerZod = IBaseEntity.extend({
|
|
51
|
-
firstName: z.string().openapi({ example: 'John' }),
|
|
52
|
-
lastName: z.string().openapi({ example: 'Doe' }),
|
|
53
|
-
email: z.string().email().openapi({ example: 'john.doe@example.com' }),
|
|
54
|
-
phone: PhoneNumberData.nullable().openapi({ example: '+12124567890' }),
|
|
55
|
-
isDefault: z.boolean().openapi({ example: false }),
|
|
56
|
-
userId: z
|
|
57
|
-
.lazy(() => userIdSchema)
|
|
58
|
-
.nullable()
|
|
59
|
-
.openapi({ example: 'user_01je6ht4b8fbmttkzh2hs82xqp' }),
|
|
60
|
-
user: z
|
|
61
|
-
.lazy(() => UserZod)
|
|
62
|
-
.optional()
|
|
63
|
-
.nullable(),
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
export type IAccountManagerZod = z.infer<typeof IAccountManagerZod>;
|
|
67
|
-
|
|
68
|
-
export const PostAccountManagerZod = z.object({
|
|
69
|
-
firstName: z.string().min(1).max(255).openapi({ example: 'John' }),
|
|
70
|
-
lastName: z.string().min(1).max(255).openapi({ example: 'Doe' }),
|
|
71
|
-
email: z.string().email().openapi({ example: 'john.doe@example.com' }),
|
|
72
|
-
phone: PhoneZodSchema.nullable()
|
|
73
|
-
.optional()
|
|
74
|
-
.openapi({ example: '+12124567890' }),
|
|
75
|
-
isDefault: z.boolean().openapi({ example: false }),
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
export type PostAccountManagerZod = z.infer<typeof PostAccountManagerZod>;
|
|
79
|
-
|
|
80
|
-
export const PatchAccountManagerZod = z.object({
|
|
81
|
-
firstName: z.string().min(1).max(255).optional().openapi({ example: 'John' }),
|
|
82
|
-
lastName: z.string().min(1).max(255).optional().openapi({ example: 'Doe' }),
|
|
83
|
-
email: z
|
|
84
|
-
.string()
|
|
85
|
-
.email()
|
|
86
|
-
.optional()
|
|
87
|
-
.openapi({ example: 'john.doe@example.com' }),
|
|
88
|
-
phone: PhoneZodSchema.nullable()
|
|
89
|
-
.optional()
|
|
90
|
-
.openapi({ example: '+12124567890' }),
|
|
91
|
-
isDefault: z.boolean().optional().openapi({ example: false }),
|
|
92
|
-
});
|
|
93
|
-
export type PatchAccountManagerZod = z.infer<typeof PatchAccountManagerZod>;
|
|
94
|
-
|
|
95
|
-
export const IPaginatedAccountManager = z.object({
|
|
96
|
-
items: z.array(IAccountManagerZod),
|
|
97
|
-
meta: IPaginationMeta,
|
|
98
|
-
});
|
|
99
|
-
export type IPaginatedAccountManager = z.infer<typeof IPaginatedAccountManager>;
|
|
100
|
-
|
|
101
|
-
export const AccountManagerDeleteResponse = z.object({
|
|
102
|
-
status: z.boolean().openapi({ example: true }),
|
|
103
|
-
});
|
|
104
|
-
export type AccountManagerDeleteResponse = z.infer<
|
|
105
|
-
typeof AccountManagerDeleteResponse
|
|
106
|
-
>;
|
|
107
|
-
export const SetDefaultAccountManagerForAllAccountsResponse = z.object({
|
|
108
|
-
message: z
|
|
109
|
-
.string()
|
|
110
|
-
.openapi({ example: 'Default account manager set for all accounts' }),
|
|
111
|
-
});
|
|
112
|
-
export type SetDefaultAccountManagerForAllAccountsResponse = z.infer<
|
|
113
|
-
typeof SetDefaultAccountManagerForAllAccountsResponse
|
|
114
|
-
>;
|
|
115
|
-
|
|
116
|
-
export const AccountManagerDeleteQuery = z.object({
|
|
117
|
-
reassignTo: accountManagerIdSchema
|
|
118
|
-
.nullable()
|
|
119
|
-
.optional()
|
|
120
|
-
.openapi({ example: 'account_manager_01j5y5ghx5fg68d663j1fvy2x7' }),
|
|
121
|
-
});
|
|
122
|
-
export type AccountManagerDeleteQuery = z.infer<
|
|
123
|
-
typeof AccountManagerDeleteQuery
|
|
124
|
-
>;
|