@dalmore/api-contracts 0.0.0-dev.5e42638 → 0.0.0-dev.685c0b3
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/common/helpers/index.d.ts +50 -0
- package/common/helpers/index.js +136 -0
- package/common/helpers/index.js.map +1 -0
- package/common/types/account-contact.types.d.ts +485 -0
- package/common/types/account-contact.types.js +75 -0
- package/common/types/account-contact.types.js.map +1 -0
- package/common/types/account-detail.types.d.ts +304 -0
- package/common/types/account-detail.types.js +20 -0
- package/common/types/account-detail.types.js.map +1 -0
- package/common/types/account-integration.types.d.ts +242 -0
- package/common/types/account-integration.types.js +121 -0
- package/common/types/account-integration.types.js.map +1 -0
- package/common/types/account-manager.types.d.ts +917 -0
- package/common/types/account-manager.types.js +89 -0
- package/common/types/account-manager.types.js.map +1 -0
- package/common/types/account-setting.types.d.ts +120 -0
- package/common/types/account-setting.types.js +44 -0
- package/common/types/account-setting.types.js.map +1 -0
- package/common/types/account.types.d.ts +595 -0
- package/common/types/account.types.js +214 -0
- package/common/types/account.types.js.map +1 -0
- package/common/types/activity.types.d.ts +580 -0
- package/common/types/activity.types.js +245 -0
- package/common/types/activity.types.js.map +1 -0
- package/common/types/address.types.d.ts +89 -0
- package/common/types/address.types.js +36 -0
- package/common/types/address.types.js.map +1 -0
- package/common/types/aic.types.d.ts +434 -0
- package/common/types/aic.types.js +170 -0
- package/common/types/aic.types.js.map +1 -0
- package/common/types/aml.types.d.ts +41 -0
- package/common/types/aml.types.js +16 -0
- package/common/types/aml.types.js.map +1 -0
- package/common/types/api-key-logs.types.d.ts +204 -0
- package/common/types/api-key-logs.types.js +52 -0
- package/common/types/api-key-logs.types.js.map +1 -0
- package/common/types/api-keys.types.d.ts +192 -0
- package/common/types/api-keys.types.js +57 -0
- package/common/types/api-keys.types.js.map +1 -0
- package/common/types/asset.types.d.ts +888 -0
- package/common/types/asset.types.js +280 -0
- package/common/types/asset.types.js.map +1 -0
- package/common/types/auth.types.d.ts +487 -0
- package/common/types/auth.types.js +279 -0
- package/common/types/auth.types.js.map +1 -0
- package/common/types/batch-jobs.types.d.ts +321 -0
- package/common/types/batch-jobs.types.js +111 -0
- package/common/types/batch-jobs.types.js.map +1 -0
- package/common/types/bonus-tier.types.d.ts +980 -0
- package/common/types/bonus-tier.types.js +159 -0
- package/common/types/bonus-tier.types.js.map +1 -0
- package/common/types/cap-table.types.d.ts +1124 -0
- package/common/types/cap-table.types.js +406 -0
- package/common/types/cap-table.types.js.map +1 -0
- package/common/types/cart.types.d.ts +28 -0
- package/common/types/cart.types.js +19 -0
- package/common/types/cart.types.js.map +1 -0
- package/common/types/checklist-items.types.d.ts +195 -0
- package/common/types/checklist-items.types.js +54 -0
- package/common/types/checklist-items.types.js.map +1 -0
- package/common/types/checklist.types.d.ts +140 -0
- package/common/types/checklist.types.js +71 -0
- package/common/types/checklist.types.js.map +1 -0
- package/common/types/common.types.d.ts +1495 -0
- package/common/types/common.types.js +1430 -0
- package/common/types/common.types.js.map +1 -0
- package/common/types/comply-advantage-api.types.d.ts +3959 -0
- package/common/types/comply-advantage-api.types.js +270 -0
- package/common/types/comply-advantage-api.types.js.map +1 -0
- package/common/types/comply-advantage.types.d.ts +48 -0
- package/common/types/comply-advantage.types.js +21 -0
- package/common/types/comply-advantage.types.js.map +1 -0
- package/common/types/contact-us.types.d.ts +126 -0
- package/common/types/contact-us.types.js +91 -0
- package/common/types/contact-us.types.js.map +1 -0
- package/common/types/countries.types.d.ts +77 -0
- package/common/types/countries.types.js +349 -0
- package/common/types/countries.types.js.map +1 -0
- package/common/types/covered-person.types.d.ts +204 -0
- package/common/types/covered-person.types.js +234 -0
- package/common/types/covered-person.types.js.map +1 -0
- package/common/types/dashboard.types.d.ts +2086 -0
- package/common/types/dashboard.types.js +690 -0
- package/common/types/dashboard.types.js.map +1 -0
- package/common/types/data-record.types.d.ts +347 -0
- package/common/types/data-record.types.js +261 -0
- package/common/types/data-record.types.js.map +1 -0
- package/common/types/data-room.types.d.ts +1277 -0
- package/common/types/data-room.types.js +167 -0
- package/common/types/data-room.types.js.map +1 -0
- package/common/types/default-theme-config.types.d.ts +445 -0
- package/common/types/default-theme-config.types.js +63 -0
- package/common/types/default-theme-config.types.js.map +1 -0
- package/common/types/disbursement-adjustment.types.d.ts +21 -0
- package/common/types/disbursement-adjustment.types.js +25 -0
- package/common/types/disbursement-adjustment.types.js.map +1 -0
- package/common/types/disbursement-approval-user.types.d.ts +935 -0
- package/common/types/disbursement-approval-user.types.js +68 -0
- package/common/types/disbursement-approval-user.types.js.map +1 -0
- package/common/types/disbursement-review.types.d.ts +923 -0
- package/common/types/disbursement-review.types.js +76 -0
- package/common/types/disbursement-review.types.js.map +1 -0
- package/common/types/disbursement-transaction.types.d.ts +621 -0
- package/common/types/disbursement-transaction.types.js +51 -0
- package/common/types/disbursement-transaction.types.js.map +1 -0
- package/common/types/disbursements.types.d.ts +2343 -0
- package/common/types/disbursements.types.js +308 -0
- package/common/types/disbursements.types.js.map +1 -0
- package/common/types/domain-filter.types.d.ts +135 -0
- package/common/types/domain-filter.types.js +40 -0
- package/common/types/domain-filter.types.js.map +1 -0
- package/common/types/email-theme.types.d.ts +1359 -0
- package/common/types/email-theme.types.js +318 -0
- package/common/types/email-theme.types.js.map +1 -0
- package/common/types/entity.types.d.ts +21 -0
- package/common/types/entity.types.js +14 -0
- package/common/types/entity.types.js.map +1 -0
- package/common/types/error-responses.types.d.ts +144 -0
- package/common/types/error-responses.types.js +125 -0
- package/common/types/error-responses.types.js.map +1 -0
- package/common/types/escrow-account.types.d.ts +398 -0
- package/common/types/escrow-account.types.js +75 -0
- package/common/types/escrow-account.types.js.map +1 -0
- package/common/types/exchange-api-key.types.d.ts +1010 -0
- package/common/types/exchange-api-key.types.js +90 -0
- package/common/types/exchange-api-key.types.js.map +1 -0
- package/common/types/exchange-import.types.d.ts +23 -0
- package/common/types/exchange-import.types.js +23 -0
- package/common/types/exchange-import.types.js.map +1 -0
- package/common/types/exchange-provider.types.d.ts +1308 -0
- package/common/types/exchange-provider.types.js +268 -0
- package/common/types/exchange-provider.types.js.map +1 -0
- package/common/types/file.types.d.ts +401 -0
- package/common/types/file.types.js +378 -0
- package/common/types/file.types.js.map +1 -0
- package/common/types/health.types.d.ts +112 -0
- package/common/types/health.types.js +22 -0
- package/common/types/health.types.js.map +1 -0
- package/common/types/i-will-do-it-later.types.d.ts +51 -0
- package/common/types/i-will-do-it-later.types.js +30 -0
- package/common/types/i-will-do-it-later.types.js.map +1 -0
- package/common/types/{index.ts → index.d.ts} +3 -3
- package/common/types/index.js +52 -0
- package/common/types/index.js.map +1 -0
- package/common/types/individuals.types.d.ts +1899 -0
- package/common/types/individuals.types.js +500 -0
- package/common/types/individuals.types.js.map +1 -0
- package/common/types/investor-account.types.d.ts +2996 -0
- package/common/types/investor-account.types.js +930 -0
- package/common/types/investor-account.types.js.map +1 -0
- package/common/types/investorAccountIdSchema.type.js +1 -0
- package/common/types/investorAccountIdSchema.type.js.map +1 -0
- package/common/types/investors-offering.types.d.ts +391 -0
- package/common/types/investors-offering.types.js +49 -0
- package/common/types/investors-offering.types.js.map +1 -0
- package/common/types/invite.types.d.ts +641 -0
- package/common/types/invite.types.js +113 -0
- package/common/types/invite.types.js.map +1 -0
- package/common/types/issuer-bank-account.types.d.ts +385 -0
- package/common/types/issuer-bank-account.types.js +81 -0
- package/common/types/issuer-bank-account.types.js.map +1 -0
- package/common/types/issuer-offering.types.d.ts +1245 -0
- package/common/types/issuer-offering.types.js +344 -0
- package/common/types/issuer-offering.types.js.map +1 -0
- package/common/types/issuer-payment-method.types.d.ts +1100 -0
- package/common/types/issuer-payment-method.types.js +311 -0
- package/common/types/issuer-payment-method.types.js.map +1 -0
- package/common/types/issuer.types.d.ts +539 -0
- package/common/types/issuer.types.js +275 -0
- package/common/types/issuer.types.js.map +1 -0
- package/common/types/job-item.types.d.ts +230 -0
- package/common/types/job-item.types.js +89 -0
- package/common/types/job-item.types.js.map +1 -0
- package/common/types/jobs.types.d.ts +296 -0
- package/common/types/jobs.types.js +150 -0
- package/common/types/jobs.types.js.map +1 -0
- package/common/types/kyb.types.d.ts +167 -0
- package/common/types/kyb.types.js +45 -0
- package/common/types/kyb.types.js.map +1 -0
- package/common/types/kyc.types.d.ts +2197 -0
- package/common/types/kyc.types.js +301 -0
- package/common/types/kyc.types.js.map +1 -0
- package/common/types/legal-entity.types.d.ts +638 -0
- package/common/types/legal-entity.types.js +148 -0
- package/common/types/legal-entity.types.js.map +1 -0
- package/common/types/login-history.types.d.ts +160 -0
- package/common/types/login-history.types.js +39 -0
- package/common/types/login-history.types.js.map +1 -0
- package/common/types/mail-template.types.d.ts +595 -0
- package/common/types/mail-template.types.js +401 -0
- package/common/types/mail-template.types.js.map +1 -0
- package/common/types/north-cap-integration.types.d.ts +1303 -0
- package/common/types/north-cap-integration.types.js +145 -0
- package/common/types/north-cap-integration.types.js.map +1 -0
- package/common/types/note.types.d.ts +216 -0
- package/common/types/note.types.js +82 -0
- package/common/types/note.types.js.map +1 -0
- package/common/types/notification.types.d.ts +2689 -0
- package/common/types/notification.types.js +408 -0
- package/common/types/notification.types.js.map +1 -0
- package/common/types/notion-api.types.d.ts +3626 -0
- package/common/types/notion-api.types.js +271 -0
- package/common/types/notion-api.types.js.map +1 -0
- package/common/types/notion-database.types.d.ts +191 -0
- package/common/types/notion-database.types.js +95 -0
- package/common/types/notion-database.types.js.map +1 -0
- package/common/types/notion-page.types.d.ts +3482 -0
- package/common/types/notion-page.types.js +208 -0
- package/common/types/notion-page.types.js.map +1 -0
- package/common/types/offering-reports.types.d.ts +525 -0
- package/common/types/offering-reports.types.js +111 -0
- package/common/types/offering-reports.types.js.map +1 -0
- package/common/types/offering-submission.types.d.ts +587 -0
- package/common/types/offering-submission.types.js +278 -0
- package/common/types/offering-submission.types.js.map +1 -0
- package/common/types/offering.types.d.ts +2335 -0
- package/common/types/offering.types.js +505 -0
- package/common/types/offering.types.js.map +1 -0
- package/common/types/page-revision.types.d.ts +74 -0
- package/common/types/page-revision.types.js +68 -0
- package/common/types/page-revision.types.js.map +1 -0
- package/common/types/page.types.d.ts +540 -0
- package/common/types/page.types.js +361 -0
- package/common/types/page.types.js.map +1 -0
- package/common/types/password.type.d.ts +2 -0
- package/common/types/password.type.js +14 -0
- package/common/types/password.type.js.map +1 -0
- package/common/types/payment-methods.types.d.ts +800 -0
- package/common/types/payment-methods.types.js +260 -0
- package/common/types/payment-methods.types.js.map +1 -0
- package/common/types/phone.type.d.ts +12 -0
- package/common/types/phone.type.js +29 -0
- package/common/types/phone.type.js.map +1 -0
- package/common/types/portfolio.types.d.ts +185 -0
- package/common/types/portfolio.types.js +36 -0
- package/common/types/portfolio.types.js.map +1 -0
- package/common/types/privacy-policy-and-tos.types.d.ts +2 -0
- package/common/types/{privacy-policy-and-tos.types.ts → privacy-policy-and-tos.types.js} +1 -1
- package/common/types/privacy-policy-and-tos.types.js.map +1 -0
- package/common/types/queue.types.d.ts +22 -0
- package/common/types/queue.types.js +73 -0
- package/common/types/queue.types.js.map +1 -0
- package/common/types/registered-reps.types.d.ts +6 -0
- package/common/types/registered-reps.types.js +21 -0
- package/common/types/registered-reps.types.js.map +1 -0
- package/common/types/rejection-reasons.types.d.ts +35 -0
- package/common/types/rejection-reasons.types.js +49 -0
- package/common/types/rejection-reasons.types.js.map +1 -0
- package/common/types/review.types.d.ts +419 -0
- package/common/types/review.types.js +101 -0
- package/common/types/review.types.js.map +1 -0
- package/common/types/role.types.d.ts +30 -0
- package/common/types/role.types.js +21 -0
- package/common/types/role.types.js.map +1 -0
- package/common/types/secondary-customer.types.d.ts +586 -0
- package/common/types/secondary-customer.types.js +39 -0
- package/common/types/secondary-customer.types.js.map +1 -0
- package/common/types/secondary-issuer.types.d.ts +283 -0
- package/common/types/secondary-issuer.types.js +37 -0
- package/common/types/secondary-issuer.types.js.map +1 -0
- package/common/types/secondary-order.types.d.ts +508 -0
- package/common/types/secondary-order.types.js +40 -0
- package/common/types/secondary-order.types.js.map +1 -0
- package/common/types/secondary-security.types.d.ts +175 -0
- package/common/types/secondary-security.types.js +45 -0
- package/common/types/secondary-security.types.js.map +1 -0
- package/common/types/secondary-trade.entity.d.ts +16 -0
- package/common/types/secondary-trade.entity.js +12 -0
- package/common/types/secondary-trade.entity.js.map +1 -0
- package/common/types/secondary-trade.types.d.ts +465 -0
- package/common/types/secondary-trade.types.js +61 -0
- package/common/types/secondary-trade.types.js.map +1 -0
- package/common/types/secure-request.types.d.ts +171 -0
- package/common/types/secure-request.types.js +51 -0
- package/common/types/secure-request.types.js.map +1 -0
- package/common/types/signer.types.d.ts +3394 -0
- package/common/types/signer.types.js +517 -0
- package/common/types/signer.types.js.map +1 -0
- package/common/types/site-link.types.d.ts +875 -0
- package/common/types/site-link.types.js +126 -0
- package/common/types/site-link.types.js.map +1 -0
- package/common/types/site-settings.types.d.ts +1673 -0
- package/common/types/site-settings.types.js +500 -0
- package/common/types/site-settings.types.js.map +1 -0
- package/common/types/site.types.d.ts +1476 -0
- package/common/types/site.types.js +213 -0
- package/common/types/site.types.js.map +1 -0
- package/common/types/sms.types.d.ts +40 -0
- package/common/types/sms.types.js +27 -0
- package/common/types/sms.types.js.map +1 -0
- package/common/types/state-machine.types.d.ts +591 -0
- package/common/types/state-machine.types.js +144 -0
- package/common/types/state-machine.types.js.map +1 -0
- package/common/types/states.types.d.ts +77 -0
- package/common/types/states.types.js +137 -0
- package/common/types/states.types.js.map +1 -0
- package/common/types/subdoc-preview.types.d.ts +379 -0
- package/common/types/subdoc-preview.types.js +24 -0
- package/common/types/subdoc-preview.types.js.map +1 -0
- package/common/types/task.types.d.ts +537 -0
- package/common/types/task.types.js +211 -0
- package/common/types/task.types.js.map +1 -0
- package/common/types/trade-adjustment.type.d.ts +40 -0
- package/common/types/trade-adjustment.type.js +26 -0
- package/common/types/trade-adjustment.type.js.map +1 -0
- package/common/types/trade-line-item.types.d.ts +312 -0
- package/common/types/trade-line-item.types.js +89 -0
- package/common/types/trade-line-item.types.js.map +1 -0
- package/common/types/trade.types.d.ts +1987 -0
- package/common/types/trade.types.js +780 -0
- package/common/types/trade.types.js.map +1 -0
- package/common/types/transaction.types.d.ts +375 -0
- package/common/types/transaction.types.js +154 -0
- package/common/types/transaction.types.js.map +1 -0
- package/common/types/trusted-contact.types.d.ts +440 -0
- package/common/types/trusted-contact.types.js +95 -0
- package/common/types/trusted-contact.types.js.map +1 -0
- package/common/types/typography.types.d.ts +52 -0
- package/common/types/typography.types.js +67 -0
- package/common/types/typography.types.js.map +1 -0
- package/common/types/user-manual.types.d.ts +287 -0
- package/common/types/user-manual.types.js +192 -0
- package/common/types/user-manual.types.js.map +1 -0
- package/common/types/user-setting.types.d.ts +273 -0
- package/common/types/user-setting.types.js +85 -0
- package/common/types/user-setting.types.js.map +1 -0
- package/common/types/user.types.d.ts +1946 -0
- package/common/types/user.types.js +237 -0
- package/common/types/user.types.js.map +1 -0
- package/common/types/webhook.types.d.ts +10829 -0
- package/common/types/webhook.types.js +658 -0
- package/common/types/webhook.types.js.map +1 -0
- package/common/types/zip.type.d.ts +35 -0
- package/common/types/zip.type.js +28 -0
- package/common/types/zip.type.js.map +1 -0
- package/contracts/clients/accounts/index.d.ts +308 -0
- package/contracts/clients/accounts/index.js +43 -0
- package/contracts/clients/accounts/index.js.map +1 -0
- package/contracts/clients/aic/index.d.ts +280 -0
- package/contracts/clients/aic/index.js +47 -0
- package/contracts/clients/aic/index.js.map +1 -0
- package/contracts/clients/api-key-logs/index.d.ts +287 -0
- package/contracts/clients/api-key-logs/index.js +37 -0
- package/contracts/clients/api-key-logs/index.js.map +1 -0
- package/contracts/clients/api-keys/index.d.ts +374 -0
- package/contracts/clients/api-keys/index.js +59 -0
- package/contracts/clients/api-keys/index.js.map +1 -0
- package/contracts/clients/assets/index.d.ts +1028 -0
- package/contracts/clients/assets/index.js +80 -0
- package/contracts/clients/assets/index.js.map +1 -0
- package/contracts/clients/auth/index.d.ts +236 -0
- package/contracts/clients/auth/index.js +38 -0
- package/contracts/clients/auth/index.js.map +1 -0
- package/contracts/clients/cart/index.d.ts +229 -0
- package/contracts/clients/cart/index.js +63 -0
- package/contracts/clients/cart/index.js.map +1 -0
- package/contracts/clients/files/index.d.ts +552 -0
- package/contracts/clients/files/index.js +142 -0
- package/contracts/clients/files/index.js.map +1 -0
- package/contracts/clients/files-public/index.d.ts +552 -0
- package/contracts/clients/files-public/index.js +142 -0
- package/contracts/clients/files-public/index.js.map +1 -0
- package/contracts/clients/index.d.ts +12476 -0
- package/contracts/clients/index.js +52 -0
- package/contracts/clients/index.js.map +1 -0
- package/contracts/clients/individuals/index.d.ts +3199 -0
- package/contracts/clients/individuals/index.js +74 -0
- package/contracts/clients/individuals/index.js.map +1 -0
- package/contracts/clients/investor-accounts/index.d.ts +339 -0
- package/contracts/clients/investor-accounts/index.js +73 -0
- package/contracts/clients/investor-accounts/index.js.map +1 -0
- package/contracts/clients/issuer-payment-methods/index.d.ts +276 -0
- package/contracts/clients/issuer-payment-methods/index.js +24 -0
- package/contracts/clients/issuer-payment-methods/index.js.map +1 -0
- package/contracts/clients/issuers/index.d.ts +449 -0
- package/contracts/clients/issuers/index.js +75 -0
- package/contracts/clients/issuers/index.js.map +1 -0
- package/contracts/clients/kyc/index.d.ts +345 -0
- package/contracts/clients/kyc/index.js +49 -0
- package/contracts/clients/kyc/index.js.map +1 -0
- package/contracts/clients/legal-entities/index.d.ts +887 -0
- package/contracts/clients/legal-entities/index.js +74 -0
- package/contracts/clients/legal-entities/index.js.map +1 -0
- package/contracts/clients/offerings/index.d.ts +767 -0
- package/contracts/clients/offerings/index.js +95 -0
- package/contracts/clients/offerings/index.js.map +1 -0
- package/contracts/clients/payment-methods/index.d.ts +456 -0
- package/contracts/clients/payment-methods/index.js +68 -0
- package/contracts/clients/payment-methods/index.js.map +1 -0
- package/contracts/clients/secure-requests/index.d.ts +100 -0
- package/contracts/clients/secure-requests/index.js +22 -0
- package/contracts/clients/secure-requests/index.js.map +1 -0
- package/contracts/clients/sites/index.d.ts +657 -0
- package/contracts/clients/sites/index.js +40 -0
- package/contracts/clients/sites/index.js.map +1 -0
- package/contracts/clients/trade-line-items/index.d.ts +216 -0
- package/contracts/clients/trade-line-items/index.js +47 -0
- package/contracts/clients/trade-line-items/index.js.map +1 -0
- package/contracts/clients/trades/index.d.ts +865 -0
- package/contracts/clients/trades/index.js +156 -0
- package/contracts/clients/trades/index.js.map +1 -0
- package/contracts/clients/transactions/index.d.ts +88 -0
- package/contracts/clients/transactions/index.js +25 -0
- package/contracts/clients/transactions/index.js.map +1 -0
- package/package.json +15 -15
- package/common/helpers/index.ts +0 -59
- package/common/types/account-contact.types.ts +0 -99
- package/common/types/account-detail.types.ts +0 -27
- package/common/types/account-integration.types.ts +0 -143
- package/common/types/account-manager.types.ts +0 -120
- package/common/types/account-setting.types.ts +0 -65
- package/common/types/account.types.ts +0 -297
- package/common/types/activity.types.ts +0 -274
- package/common/types/address.types.ts +0 -41
- package/common/types/aic.types.ts +0 -246
- package/common/types/aml.types.ts +0 -18
- package/common/types/api-key-logs.types.ts +0 -66
- package/common/types/api-keys.types.ts +0 -69
- package/common/types/asset.types.ts +0 -338
- package/common/types/auth.types.ts +0 -359
- package/common/types/batch-jobs.types.ts +0 -151
- package/common/types/bonus-tier.types.ts +0 -180
- package/common/types/cart.types.ts +0 -21
- package/common/types/checklist-items.types.ts +0 -70
- package/common/types/checklist.types.ts +0 -97
- package/common/types/common.types.ts +0 -1552
- package/common/types/comply-advantage-api.types.ts +0 -316
- package/common/types/comply-advantage.types.ts +0 -25
- package/common/types/contact-us.types.ts +0 -111
- package/common/types/countries.types.ts +0 -375
- package/common/types/covered-person.types.ts +0 -275
- package/common/types/dashboard.types.ts +0 -792
- package/common/types/data-record.types.ts +0 -325
- package/common/types/data-room.types.ts +0 -242
- package/common/types/default-theme-config.types.ts +0 -87
- package/common/types/disbursement-adjustment.types.ts +0 -32
- package/common/types/disbursement-approval-user.types.ts +0 -100
- package/common/types/disbursement-review.types.ts +0 -110
- package/common/types/disbursement-transaction.types.ts +0 -72
- package/common/types/disbursements.types.ts +0 -426
- package/common/types/domain-filter.types.ts +0 -55
- package/common/types/email-theme.types.ts +0 -442
- package/common/types/entity.types.ts +0 -15
- package/common/types/error-responses.types.ts +0 -135
- package/common/types/escrow-account.types.ts +0 -104
- package/common/types/exchange-api-key.types.ts +0 -121
- package/common/types/exchange-import.types.ts +0 -36
- package/common/types/exchange-provider.types.ts +0 -329
- package/common/types/file.types.ts +0 -477
- package/common/types/health.types.ts +0 -29
- package/common/types/i-will-do-it-later.types.ts +0 -68
- package/common/types/individuals.types.ts +0 -542
- package/common/types/investor-account.types.ts +0 -1240
- package/common/types/investors-offering.types.ts +0 -65
- package/common/types/invite.types.ts +0 -159
- package/common/types/issuer-bank-account.types.ts +0 -107
- package/common/types/issuer-offering.types.ts +0 -389
- package/common/types/issuer-payment-method.types.ts +0 -382
- package/common/types/issuer.types.ts +0 -321
- package/common/types/job-item.types.ts +0 -119
- package/common/types/jobs.types.ts +0 -171
- package/common/types/kyb.types.ts +0 -53
- package/common/types/kyc.types.ts +0 -188
- package/common/types/legal-entity.types.ts +0 -186
- package/common/types/login-history.types.ts +0 -46
- package/common/types/mail-template.types.ts +0 -470
- package/common/types/north-cap-integration.types.ts +0 -190
- package/common/types/note.types.ts +0 -109
- package/common/types/notification.types.ts +0 -554
- package/common/types/notion-api.types.ts +0 -374
- package/common/types/notion-database.types.ts +0 -125
- package/common/types/notion-page.types.ts +0 -267
- package/common/types/offering-reports.types.ts +0 -153
- package/common/types/offering-submission.types.ts +0 -314
- package/common/types/offering.types.ts +0 -676
- package/common/types/page-revision.types.ts +0 -86
- package/common/types/page.types.ts +0 -436
- package/common/types/password.type.ts +0 -15
- package/common/types/payment-methods.types.ts +0 -298
- package/common/types/phone.type.ts +0 -27
- package/common/types/portfolio.types.ts +0 -50
- package/common/types/queue.types.ts +0 -112
- package/common/types/registered-reps.types.ts +0 -25
- package/common/types/rejection-reasons.types.ts +0 -56
- package/common/types/reminder-config.types.ts +0 -40
- package/common/types/review.types.ts +0 -133
- package/common/types/role.types.ts +0 -26
- package/common/types/secondary-customer.types.ts +0 -66
- package/common/types/secondary-issuer.types.ts +0 -50
- package/common/types/secondary-order.types.ts +0 -58
- package/common/types/secondary-security.types.ts +0 -60
- package/common/types/secondary-trade.entity.ts +0 -16
- package/common/types/secondary-trade.types.ts +0 -95
- package/common/types/secure-request.types.ts +0 -68
- package/common/types/signer.types.ts +0 -651
- package/common/types/site-link.types.ts +0 -166
- package/common/types/site-settings.types.ts +0 -727
- package/common/types/site.types.ts +0 -263
- package/common/types/sms.types.ts +0 -30
- package/common/types/state-machine.types.ts +0 -177
- package/common/types/states.types.ts +0 -163
- package/common/types/subdoc-preview.types.ts +0 -35
- package/common/types/task.types.ts +0 -258
- package/common/types/trade-adjustment.type.ts +0 -33
- package/common/types/trade-line-item.types.ts +0 -125
- package/common/types/trade.types.ts +0 -1045
- package/common/types/transaction.types.ts +0 -209
- package/common/types/trusted-contact.types.ts +0 -122
- package/common/types/typography.types.ts +0 -75
- package/common/types/user-manual.types.ts +0 -290
- package/common/types/user-setting.types.ts +0 -133
- package/common/types/user.types.ts +0 -304
- package/common/types/webhook.types.ts +0 -730
- package/common/types/zip.type.ts +0 -36
- package/contracts/clients/accounts/index.ts +0 -61
- package/contracts/clients/aic/index.ts +0 -59
- package/contracts/clients/api-key-logs/index.ts +0 -53
- package/contracts/clients/api-keys/index.ts +0 -73
- package/contracts/clients/assets/index.ts +0 -102
- package/contracts/clients/auth/index.ts +0 -50
- package/contracts/clients/cart/index.ts +0 -80
- package/contracts/clients/files/index.ts +0 -166
- package/contracts/clients/files-public/index.ts +0 -166
- package/contracts/clients/index.ts +0 -54
- package/contracts/clients/individuals/index.ts +0 -93
- package/contracts/clients/investor-accounts/index.ts +0 -93
- package/contracts/clients/issuer-payment-methods/index.ts +0 -39
- package/contracts/clients/issuers/index.ts +0 -94
- package/contracts/clients/legal-entities/index.ts +0 -93
- package/contracts/clients/offerings/index.ts +0 -117
- package/contracts/clients/payment-methods/index.ts +0 -85
- package/contracts/clients/secure-requests/index.ts +0 -34
- package/contracts/clients/sites/index.ts +0 -56
- package/contracts/clients/trade-line-items/index.ts +0 -66
- package/contracts/clients/trades/index.ts +0 -186
- package/contracts/clients/transactions/index.ts +0 -37
- package/index.ts +0 -10
- /package/common/types/{investorAccountIdSchema.type.ts → investorAccountIdSchema.type.d.ts} +0 -0
|
@@ -0,0 +1,1430 @@
|
|
|
1
|
+
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
+
import { IBaseEntity } from './entity.types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { TypeID } from 'typeid-js';
|
|
5
|
+
import { TwoFactorMethod } from './sms.types.js';
|
|
6
|
+
import { normalizeShortDate } from '../helpers/index.js';
|
|
7
|
+
import { HttpStatus } from '@nestjs/common';
|
|
8
|
+
extendZodWithOpenApi(z);
|
|
9
|
+
// All possible statuses for the system
|
|
10
|
+
export var BaseStatus;
|
|
11
|
+
(function (BaseStatus) {
|
|
12
|
+
BaseStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
13
|
+
BaseStatus["PENDING"] = "PENDING";
|
|
14
|
+
BaseStatus["APPROVED"] = "APPROVED";
|
|
15
|
+
BaseStatus["REJECTED"] = "REJECTED";
|
|
16
|
+
BaseStatus["IN_REVIEW"] = "IN_REVIEW";
|
|
17
|
+
BaseStatus["ADDITIONAL_INFO"] = "ADDITIONAL_INFO";
|
|
18
|
+
BaseStatus["SUBMITTED"] = "SUBMITTED";
|
|
19
|
+
BaseStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
20
|
+
BaseStatus["CANCELLED"] = "CANCELLED";
|
|
21
|
+
BaseStatus["SETTLED"] = "SETTLED";
|
|
22
|
+
BaseStatus["REFUNDED"] = "REFUNDED";
|
|
23
|
+
BaseStatus["RESUBMIT"] = "RESUBMIT";
|
|
24
|
+
BaseStatus["FUNDED"] = "FUNDED";
|
|
25
|
+
BaseStatus["COMPLETED"] = "COMPLETED";
|
|
26
|
+
BaseStatus["SIGNED"] = "SIGNED";
|
|
27
|
+
BaseStatus["DECLINED"] = "DECLINED";
|
|
28
|
+
BaseStatus["CART"] = "CART";
|
|
29
|
+
BaseStatus["PLACED"] = "PLACED";
|
|
30
|
+
BaseStatus["NEEDS_INFO"] = "NEEDS_INFO";
|
|
31
|
+
BaseStatus["NEEDS_PAYMENT_INFO"] = "NEEDS_PAYMENT_INFO";
|
|
32
|
+
BaseStatus["FUNDING"] = "FUNDING";
|
|
33
|
+
BaseStatus["CHARGED"] = "CHARGED";
|
|
34
|
+
BaseStatus["NEW"] = "NEW";
|
|
35
|
+
BaseStatus["IMPORT_ERROR"] = "IMPORT_ERROR";
|
|
36
|
+
BaseStatus["ERROR"] = "ERROR";
|
|
37
|
+
BaseStatus["UPDATE_PAYMENT_METHOD"] = "UPDATE_PAYMENT_METHOD";
|
|
38
|
+
BaseStatus["RE_SIGN"] = "RE_SIGN";
|
|
39
|
+
BaseStatus["RESET_2FA"] = "RESET_2FA";
|
|
40
|
+
BaseStatus["FORGOT_PASSWORD"] = "FORGOT_PASSWORD";
|
|
41
|
+
BaseStatus["RESET_PASSWORD"] = "RESET_PASSWORD";
|
|
42
|
+
BaseStatus["TWO_FACTOR_LOGIN"] = "TWO_FACTOR_LOGIN";
|
|
43
|
+
BaseStatus["LOGIN"] = "LOGIN";
|
|
44
|
+
BaseStatus["FAILED"] = "FAILED";
|
|
45
|
+
BaseStatus["AUTHORIZING"] = "AUTHORIZING";
|
|
46
|
+
BaseStatus["VALID"] = "VALID";
|
|
47
|
+
BaseStatus["DELETED"] = "DELETED";
|
|
48
|
+
BaseStatus["REVOKED"] = "REVOKED";
|
|
49
|
+
BaseStatus["WARNING"] = "WARNING";
|
|
50
|
+
BaseStatus["READY_TO_APPROVE"] = "READY_TO_APPROVE";
|
|
51
|
+
BaseStatus["INCOMPLETE"] = "INCOMPLETE";
|
|
52
|
+
BaseStatus["RE_PROCESS"] = "RE_PROCESS";
|
|
53
|
+
BaseStatus["INVALID"] = "INVALID";
|
|
54
|
+
BaseStatus["NOT_PROCESSED"] = "NOT_PROCESSED";
|
|
55
|
+
BaseStatus["PROCESSING"] = "PROCESSING";
|
|
56
|
+
BaseStatus["PROCESSING_ERROR"] = "PROCESSING_ERROR";
|
|
57
|
+
BaseStatus["REVIEW_ERROR"] = "REVIEW_ERROR";
|
|
58
|
+
BaseStatus["PROCESSED"] = "PROCESSED";
|
|
59
|
+
BaseStatus["SAVE"] = "SAVE";
|
|
60
|
+
BaseStatus["ACCEPTED"] = "ACCEPTED";
|
|
61
|
+
BaseStatus["ONBOARDING"] = "ONBOARDING";
|
|
62
|
+
BaseStatus["LIVE"] = "LIVE";
|
|
63
|
+
BaseStatus["OVERDUE"] = "OVERDUE";
|
|
64
|
+
BaseStatus["SUSPENDED"] = "SUSPENDED";
|
|
65
|
+
BaseStatus["INACTIVE"] = "INACTIVE";
|
|
66
|
+
BaseStatus["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
|
|
67
|
+
BaseStatus["VOIDED"] = "VOIDED";
|
|
68
|
+
BaseStatus["JOIN"] = "JOIN";
|
|
69
|
+
BaseStatus["RESTORE"] = "RESTORE";
|
|
70
|
+
BaseStatus["ACTIVE"] = "ACTIVE";
|
|
71
|
+
BaseStatus["LOCKED"] = "LOCKED";
|
|
72
|
+
BaseStatus["ENABLED"] = "ENABLED";
|
|
73
|
+
BaseStatus["DISABLED"] = "DISABLED";
|
|
74
|
+
})(BaseStatus || (BaseStatus = {}));
|
|
75
|
+
export const UserWithoutPasswordAccountZod = IBaseEntity.extend({
|
|
76
|
+
firstName: z.string().openapi({ example: 'Daniel' }),
|
|
77
|
+
lastName: z.string().openapi({ example: 'Ice' }),
|
|
78
|
+
email: z.string().email().openapi({ example: 'test@test.com' }),
|
|
79
|
+
provider: z.string().openapi({ example: 'email' }),
|
|
80
|
+
active: z.boolean().openapi({ example: true }),
|
|
81
|
+
lastLoginAt: z.date().nullable().openapi({ example: new Date() }),
|
|
82
|
+
loginCount: z.number().openapi({ example: 1 }),
|
|
83
|
+
inviteId: z
|
|
84
|
+
.string()
|
|
85
|
+
.nullable()
|
|
86
|
+
.openapi({ example: 'invite_01j1xgme5mfrasd02hmfwsy13a' }),
|
|
87
|
+
accountId: z
|
|
88
|
+
.string()
|
|
89
|
+
.nullable()
|
|
90
|
+
.openapi({ example: 'account_01j1xgme5mfrasd02hmfwsy13a' }),
|
|
91
|
+
});
|
|
92
|
+
export var ManagedByType;
|
|
93
|
+
(function (ManagedByType) {
|
|
94
|
+
ManagedByType["DALMORE"] = "DALMORE";
|
|
95
|
+
ManagedByType["ISSUER"] = "ISSUER";
|
|
96
|
+
})(ManagedByType || (ManagedByType = {}));
|
|
97
|
+
export var Platform;
|
|
98
|
+
(function (Platform) {
|
|
99
|
+
Platform["DALMORE"] = "DALMORE";
|
|
100
|
+
Platform["INTEGRATION"] = "INTEGRATION";
|
|
101
|
+
})(Platform || (Platform = {}));
|
|
102
|
+
export var HttpMethod;
|
|
103
|
+
(function (HttpMethod) {
|
|
104
|
+
HttpMethod["GET"] = "GET";
|
|
105
|
+
HttpMethod["POST"] = "POST";
|
|
106
|
+
HttpMethod["PUT"] = "PUT";
|
|
107
|
+
HttpMethod["PATCH"] = "PATCH";
|
|
108
|
+
HttpMethod["DELETE"] = "DELETE";
|
|
109
|
+
HttpMethod["HEAD"] = "HEAD";
|
|
110
|
+
HttpMethod["OPTIONS"] = "OPTIONS";
|
|
111
|
+
})(HttpMethod || (HttpMethod = {}));
|
|
112
|
+
export var UserStatus;
|
|
113
|
+
(function (UserStatus) {
|
|
114
|
+
UserStatus["ACTIVE"] = "ACTIVE";
|
|
115
|
+
UserStatus["LOCKED"] = "LOCKED";
|
|
116
|
+
})(UserStatus || (UserStatus = {}));
|
|
117
|
+
export const SENSITIVE_PATTERNS = [
|
|
118
|
+
/password/i,
|
|
119
|
+
/credit.*card/i,
|
|
120
|
+
/ssn/i,
|
|
121
|
+
/social.*security/i,
|
|
122
|
+
/token/i,
|
|
123
|
+
/access.*token/i,
|
|
124
|
+
/code/i,
|
|
125
|
+
/apiKey/i,
|
|
126
|
+
/key/i,
|
|
127
|
+
/stripeSecretKey/i,
|
|
128
|
+
/usAccountNumber/i,
|
|
129
|
+
/recoveryCodes/i,
|
|
130
|
+
/totpSecret/i,
|
|
131
|
+
/totpTemporarySecret/i,
|
|
132
|
+
/smsVerificationCode/i,
|
|
133
|
+
];
|
|
134
|
+
export var AccountStatus;
|
|
135
|
+
(function (AccountStatus) {
|
|
136
|
+
AccountStatus["ONBOARDING"] = "ONBOARDING";
|
|
137
|
+
AccountStatus["LIVE"] = "LIVE";
|
|
138
|
+
AccountStatus["OVERDUE"] = "OVERDUE";
|
|
139
|
+
AccountStatus["SUSPENDED"] = "SUSPENDED";
|
|
140
|
+
AccountStatus["INACTIVE"] = "INACTIVE";
|
|
141
|
+
})(AccountStatus || (AccountStatus = {}));
|
|
142
|
+
// CHANGES TO THIS WILL REQUIRE:
|
|
143
|
+
// - Migrations to update the database
|
|
144
|
+
// - Update to createDefaultIssuerPaymentMethods
|
|
145
|
+
// - Update to existing issuers payment methods, see UpdateIssuerPaymentMethod1755035846643
|
|
146
|
+
// - Updates to TradeFundingTransitionWorker
|
|
147
|
+
export var PaymentMethodType;
|
|
148
|
+
(function (PaymentMethodType) {
|
|
149
|
+
PaymentMethodType["CREDIT_CARD"] = "CREDIT_CARD";
|
|
150
|
+
PaymentMethodType["WIRE"] = "WIRE";
|
|
151
|
+
PaymentMethodType["ACH"] = "ACH";
|
|
152
|
+
PaymentMethodType["BANK_ACCOUNT"] = "BANK_ACCOUNT";
|
|
153
|
+
PaymentMethodType["CHECK"] = "CHECK";
|
|
154
|
+
PaymentMethodType["RETIREMENT"] = "RETIREMENT";
|
|
155
|
+
})(PaymentMethodType || (PaymentMethodType = {}));
|
|
156
|
+
export const AccountZod = IBaseEntity.extend({
|
|
157
|
+
name: z.string().openapi({ example: 'Dalmore' }),
|
|
158
|
+
status: z.nativeEnum(AccountStatus).openapi({ example: AccountStatus.LIVE }),
|
|
159
|
+
managedBy: z
|
|
160
|
+
.nativeEnum(ManagedByType)
|
|
161
|
+
.nullable()
|
|
162
|
+
.openapi({ example: ManagedByType.DALMORE }),
|
|
163
|
+
platform: z.nativeEnum(Platform).openapi({ example: Platform.INTEGRATION }),
|
|
164
|
+
onboardingReviewerId: z
|
|
165
|
+
.string()
|
|
166
|
+
.nullable()
|
|
167
|
+
.openapi({ example: 'user_01j1xgme5mfrasd02hmfwsy13a' }),
|
|
168
|
+
onboardingReviewAt: z.date().nullable(),
|
|
169
|
+
allowPendingComplianceReview: z.boolean().openapi({ example: false }),
|
|
170
|
+
});
|
|
171
|
+
export const AccountWithoutUsersZod = IBaseEntity.extend({
|
|
172
|
+
name: z.string().openapi({ example: 'Dalmore' }),
|
|
173
|
+
status: z.nativeEnum(AccountStatus).openapi({ example: AccountStatus.LIVE }),
|
|
174
|
+
managedBy: z
|
|
175
|
+
.nativeEnum(ManagedByType)
|
|
176
|
+
.nullable()
|
|
177
|
+
.openapi({ example: ManagedByType.DALMORE }),
|
|
178
|
+
platform: z.nativeEnum(Platform).openapi({ example: Platform.INTEGRATION }),
|
|
179
|
+
onboardingReviewerId: z
|
|
180
|
+
.string()
|
|
181
|
+
.nullable()
|
|
182
|
+
.openapi({ example: 'user_01j1xgme5mfrasd02hmfwsy13a' }),
|
|
183
|
+
onboardingReviewAt: z.date().nullable(),
|
|
184
|
+
allowPendingComplianceReview: z.boolean().openapi({ example: false }),
|
|
185
|
+
});
|
|
186
|
+
export var PortalType;
|
|
187
|
+
(function (PortalType) {
|
|
188
|
+
PortalType["COMPLIANCE"] = "COMPLIANCE";
|
|
189
|
+
PortalType["ISSUER"] = "ISSUER";
|
|
190
|
+
PortalType["INVESTOR"] = "INVESTOR";
|
|
191
|
+
PortalType["CLIENT"] = "CLIENT";
|
|
192
|
+
PortalType["SECONDARIES"] = "SECONDARIES";
|
|
193
|
+
PortalType["COMPLIANCE_APIKEY"] = "COMPLIANCE_APIKEY";
|
|
194
|
+
})(PortalType || (PortalType = {}));
|
|
195
|
+
export var UserType;
|
|
196
|
+
(function (UserType) {
|
|
197
|
+
UserType["USER"] = "USER";
|
|
198
|
+
UserType["LEAD"] = "LEAD";
|
|
199
|
+
UserType["INVESTOR"] = "INVESTOR";
|
|
200
|
+
UserType["DEMO"] = "DEMO";
|
|
201
|
+
})(UserType || (UserType = {}));
|
|
202
|
+
export var UserRole;
|
|
203
|
+
(function (UserRole) {
|
|
204
|
+
UserRole["API_KEY"] = "API_KEY";
|
|
205
|
+
UserRole["IMPORT"] = "IMPORT";
|
|
206
|
+
UserRole["VIEWER"] = "VIEWER";
|
|
207
|
+
UserRole["SUPPORT"] = "SUPPORT";
|
|
208
|
+
UserRole["COMPLIANCE"] = "COMPLIANCE";
|
|
209
|
+
UserRole["ADMIN"] = "ADMIN";
|
|
210
|
+
UserRole["MARKETER"] = "MARKETER";
|
|
211
|
+
UserRole["OWNER"] = "OWNER";
|
|
212
|
+
UserRole["LEGAL"] = "LEGAL";
|
|
213
|
+
UserRole["COMMUNITY_MANAGER"] = "COMMUNITY_MANAGER";
|
|
214
|
+
UserRole["ESCROW_AGENT"] = "ESCROW_AGENT";
|
|
215
|
+
UserRole["AGENT"] = "AGENT";
|
|
216
|
+
UserRole["ONBOARDING"] = "ONBOARDING";
|
|
217
|
+
})(UserRole || (UserRole = {}));
|
|
218
|
+
export var IssuerRole;
|
|
219
|
+
(function (IssuerRole) {
|
|
220
|
+
IssuerRole["VIEWER"] = "VIEWER";
|
|
221
|
+
IssuerRole["OWNER"] = "OWNER";
|
|
222
|
+
IssuerRole["MARKETER"] = "MARKETER";
|
|
223
|
+
IssuerRole["LEGAL"] = "LEGAL";
|
|
224
|
+
IssuerRole["COMMUNITY_MANAGER"] = "COMMUNITY_MANAGER";
|
|
225
|
+
IssuerRole["COMPLIANCE"] = "COMPLIANCE";
|
|
226
|
+
IssuerRole["ADMIN"] = "ADMIN";
|
|
227
|
+
IssuerRole["SUPPORT"] = "SUPPORT";
|
|
228
|
+
})(IssuerRole || (IssuerRole = {}));
|
|
229
|
+
export var FileContainerType;
|
|
230
|
+
(function (FileContainerType) {
|
|
231
|
+
FileContainerType["SITE"] = "SITE";
|
|
232
|
+
FileContainerType["PRIVATE"] = "PRIVATE";
|
|
233
|
+
FileContainerType["PUBLIC"] = "PUBLIC";
|
|
234
|
+
FileContainerType["ASSET"] = "ASSET";
|
|
235
|
+
})(FileContainerType || (FileContainerType = {}));
|
|
236
|
+
export var UserDataType;
|
|
237
|
+
(function (UserDataType) {
|
|
238
|
+
UserDataType["LIVE"] = "LIVE";
|
|
239
|
+
UserDataType["TEST"] = "TEST";
|
|
240
|
+
})(UserDataType || (UserDataType = {}));
|
|
241
|
+
export var AccountContactType;
|
|
242
|
+
(function (AccountContactType) {
|
|
243
|
+
AccountContactType["GENERAL"] = "GENERAL";
|
|
244
|
+
AccountContactType["INVESTOR"] = "INVESTOR";
|
|
245
|
+
AccountContactType["ISSUER"] = "ISSUER";
|
|
246
|
+
})(AccountContactType || (AccountContactType = {}));
|
|
247
|
+
// Configuration for portals and their roles - in order of hierarchy
|
|
248
|
+
export const PortalConfig = {
|
|
249
|
+
// JWT AUTH
|
|
250
|
+
[PortalType.COMPLIANCE]: {
|
|
251
|
+
type: PortalType.COMPLIANCE,
|
|
252
|
+
roles: [
|
|
253
|
+
UserRole.IMPORT,
|
|
254
|
+
UserRole.VIEWER,
|
|
255
|
+
UserRole.SUPPORT,
|
|
256
|
+
UserRole.COMPLIANCE,
|
|
257
|
+
UserRole.ADMIN,
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
[PortalType.ISSUER]: {
|
|
261
|
+
type: PortalType.ISSUER,
|
|
262
|
+
roles: [UserRole.MARKETER, UserRole.OWNER],
|
|
263
|
+
},
|
|
264
|
+
[PortalType.INVESTOR]: {
|
|
265
|
+
type: PortalType.INVESTOR,
|
|
266
|
+
roles: [UserRole.VIEWER, UserRole.OWNER],
|
|
267
|
+
},
|
|
268
|
+
// API KEY AUTH
|
|
269
|
+
[PortalType.CLIENT]: {
|
|
270
|
+
type: PortalType.CLIENT,
|
|
271
|
+
roles: [UserRole.API_KEY],
|
|
272
|
+
},
|
|
273
|
+
[PortalType.SECONDARIES]: {
|
|
274
|
+
type: PortalType.SECONDARIES,
|
|
275
|
+
roles: [UserRole.API_KEY],
|
|
276
|
+
},
|
|
277
|
+
[PortalType.COMPLIANCE_APIKEY]: {
|
|
278
|
+
type: PortalType.COMPLIANCE_APIKEY,
|
|
279
|
+
roles: [UserRole.API_KEY],
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
export const BaseAuthReq = z.object({
|
|
283
|
+
id: z.string(),
|
|
284
|
+
accountId: z.string(),
|
|
285
|
+
isInactiveAccount: z.boolean(),
|
|
286
|
+
active: z.boolean(),
|
|
287
|
+
role: z.nativeEnum(UserRole),
|
|
288
|
+
type: z.nativeEnum(PortalType),
|
|
289
|
+
roleId: z.string(),
|
|
290
|
+
});
|
|
291
|
+
// Regular user type extending base
|
|
292
|
+
export const AuthUserReq = BaseAuthReq.extend({
|
|
293
|
+
userLoginId: z.string(),
|
|
294
|
+
firstName: z.string(),
|
|
295
|
+
lastName: z.string(),
|
|
296
|
+
email: z.string().email(),
|
|
297
|
+
provider: z.string(),
|
|
298
|
+
locked: z.boolean(),
|
|
299
|
+
lastLoginAt: z.date().nullable(),
|
|
300
|
+
loginCount: z.number(),
|
|
301
|
+
requiresTwoFactorSetup: z.boolean().optional(),
|
|
302
|
+
twoFactorEnabled: z.boolean().optional(),
|
|
303
|
+
twoFactorMethod: z.nativeEnum(TwoFactorMethod).optional(),
|
|
304
|
+
managedBy: z.nativeEnum(ManagedByType).optional(),
|
|
305
|
+
userType: z.nativeEnum(UserType).optional(),
|
|
306
|
+
});
|
|
307
|
+
// API key type extending base
|
|
308
|
+
export const AuthApiKeyReq = BaseAuthReq.extend({
|
|
309
|
+
name: z.string(),
|
|
310
|
+
description: z.string().nullable(),
|
|
311
|
+
lastUsedAt: z.date().nullable(),
|
|
312
|
+
});
|
|
313
|
+
export const UserWithoutPasswordZod = IBaseEntity.extend({
|
|
314
|
+
firstName: z.string().openapi({ example: 'Daniel' }),
|
|
315
|
+
lastName: z.string().openapi({ example: 'Ice' }),
|
|
316
|
+
email: z.string().email().openapi({ example: 'test@test.com' }),
|
|
317
|
+
provider: z.string().openapi({ example: 'email' }),
|
|
318
|
+
active: z.boolean().openapi({ example: true }),
|
|
319
|
+
lastLoginAt: z.date().nullable().openapi({ example: new Date() }),
|
|
320
|
+
loginCount: z.number().openapi({ example: 1 }),
|
|
321
|
+
inviteId: z
|
|
322
|
+
.string()
|
|
323
|
+
.nullable()
|
|
324
|
+
.openapi({ example: 'invite_01j1xgme5mfrasd02hmfwsy13a' }),
|
|
325
|
+
accountId: z
|
|
326
|
+
.string()
|
|
327
|
+
.nullable()
|
|
328
|
+
.openapi({ example: 'account_01j1xgme5mfrasd02hmfwsy13a' }),
|
|
329
|
+
account: AccountWithoutUsersZod.optional(),
|
|
330
|
+
});
|
|
331
|
+
export const IPaginationMeta = z.object({
|
|
332
|
+
itemCount: z.number().openapi({ example: 1 }),
|
|
333
|
+
totalItems: z.number().optional().openapi({ example: 10 }),
|
|
334
|
+
itemsPerPage: z.number().openapi({ example: 1 }),
|
|
335
|
+
totalPages: z.number().optional().openapi({ example: 10 }),
|
|
336
|
+
currentPage: z.number().openapi({ example: 1 }),
|
|
337
|
+
});
|
|
338
|
+
export const PaginationOptionsZod = z.object({
|
|
339
|
+
page: z.coerce
|
|
340
|
+
.number()
|
|
341
|
+
.transform((val) => (val === 0 ? 1 : val))
|
|
342
|
+
.optional()
|
|
343
|
+
.default(1),
|
|
344
|
+
limit: z.coerce
|
|
345
|
+
.number()
|
|
346
|
+
.transform((val) => (val === 0 ? 10 : val))
|
|
347
|
+
.optional()
|
|
348
|
+
.default(10),
|
|
349
|
+
});
|
|
350
|
+
// The base action types for the system
|
|
351
|
+
export var BaseAction;
|
|
352
|
+
(function (BaseAction) {
|
|
353
|
+
BaseAction["CREATE"] = "CREATE";
|
|
354
|
+
BaseAction["READ"] = "READ";
|
|
355
|
+
BaseAction["UPDATE"] = "UPDATE";
|
|
356
|
+
BaseAction["DELETE"] = "DELETE";
|
|
357
|
+
BaseAction["IMPORT"] = "IMPORT";
|
|
358
|
+
})(BaseAction || (BaseAction = {}));
|
|
359
|
+
export var KYCStatus;
|
|
360
|
+
(function (KYCStatus) {
|
|
361
|
+
KYCStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
362
|
+
KYCStatus["PENDING"] = "PENDING";
|
|
363
|
+
KYCStatus["APPROVED"] = "APPROVED";
|
|
364
|
+
KYCStatus["REJECTED"] = "REJECTED";
|
|
365
|
+
KYCStatus["CANCELLED"] = "CANCELLED";
|
|
366
|
+
KYCStatus["RESUBMIT"] = "RESUBMIT";
|
|
367
|
+
KYCStatus["ERROR"] = "ERROR";
|
|
368
|
+
})(KYCStatus || (KYCStatus = {}));
|
|
369
|
+
export var AMLStatus;
|
|
370
|
+
(function (AMLStatus) {
|
|
371
|
+
AMLStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
372
|
+
AMLStatus["PENDING"] = "PENDING";
|
|
373
|
+
AMLStatus["APPROVED"] = "APPROVED";
|
|
374
|
+
AMLStatus["REJECTED"] = "REJECTED";
|
|
375
|
+
AMLStatus["ERROR"] = "ERROR";
|
|
376
|
+
})(AMLStatus || (AMLStatus = {}));
|
|
377
|
+
export var AicStatus;
|
|
378
|
+
(function (AicStatus) {
|
|
379
|
+
AicStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
380
|
+
AicStatus["PENDING"] = "PENDING";
|
|
381
|
+
AicStatus["APPROVED"] = "APPROVED";
|
|
382
|
+
AicStatus["REJECTED"] = "REJECTED";
|
|
383
|
+
AicStatus["PROCESSED"] = "PROCESSED";
|
|
384
|
+
})(AicStatus || (AicStatus = {}));
|
|
385
|
+
export var IssuerStatus;
|
|
386
|
+
(function (IssuerStatus) {
|
|
387
|
+
IssuerStatus["REJECTED"] = "REJECTED";
|
|
388
|
+
IssuerStatus["IN_REVIEW"] = "IN_REVIEW";
|
|
389
|
+
IssuerStatus["ADDITIONAL_INFO"] = "ADDITIONAL_INFO";
|
|
390
|
+
IssuerStatus["SUBMITTED"] = "SUBMITTED";
|
|
391
|
+
IssuerStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
392
|
+
IssuerStatus["APPROVED"] = "APPROVED";
|
|
393
|
+
})(IssuerStatus || (IssuerStatus = {}));
|
|
394
|
+
export var KYBStatus;
|
|
395
|
+
(function (KYBStatus) {
|
|
396
|
+
KYBStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
397
|
+
KYBStatus["PENDING"] = "PENDING";
|
|
398
|
+
KYBStatus["APPROVED"] = "APPROVED";
|
|
399
|
+
KYBStatus["REJECTED"] = "REJECTED";
|
|
400
|
+
})(KYBStatus || (KYBStatus = {}));
|
|
401
|
+
export var SanctionsStatus;
|
|
402
|
+
(function (SanctionsStatus) {
|
|
403
|
+
SanctionsStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
404
|
+
SanctionsStatus["PENDING"] = "PENDING";
|
|
405
|
+
SanctionsStatus["APPROVED"] = "APPROVED";
|
|
406
|
+
SanctionsStatus["REJECTED"] = "REJECTED";
|
|
407
|
+
})(SanctionsStatus || (SanctionsStatus = {}));
|
|
408
|
+
export var FundingStatus;
|
|
409
|
+
(function (FundingStatus) {
|
|
410
|
+
FundingStatus["PENDING"] = "PENDING";
|
|
411
|
+
FundingStatus["CANCELLED"] = "CANCELLED";
|
|
412
|
+
FundingStatus["SETTLED"] = "SETTLED";
|
|
413
|
+
FundingStatus["REFUNDED"] = "REFUNDED";
|
|
414
|
+
FundingStatus["DECLINED"] = "DECLINED";
|
|
415
|
+
FundingStatus["FUNDING"] = "FUNDING";
|
|
416
|
+
FundingStatus["AUTHORIZING"] = "AUTHORIZING";
|
|
417
|
+
FundingStatus["FAILED"] = "FAILED";
|
|
418
|
+
})(FundingStatus || (FundingStatus = {}));
|
|
419
|
+
export var TxnCheck;
|
|
420
|
+
(function (TxnCheck) {
|
|
421
|
+
TxnCheck["PENDING"] = "PENDING";
|
|
422
|
+
TxnCheck["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
423
|
+
TxnCheck["APPROVED"] = "APPROVED";
|
|
424
|
+
TxnCheck["REJECTED"] = "REJECTED";
|
|
425
|
+
})(TxnCheck || (TxnCheck = {}));
|
|
426
|
+
export var ApprovalStatus;
|
|
427
|
+
(function (ApprovalStatus) {
|
|
428
|
+
ApprovalStatus["PENDING"] = "PENDING";
|
|
429
|
+
ApprovalStatus["FUNDED"] = "FUNDED";
|
|
430
|
+
ApprovalStatus["APPROVED"] = "APPROVED";
|
|
431
|
+
ApprovalStatus["REJECTED"] = "REJECTED";
|
|
432
|
+
ApprovalStatus["REFUNDED"] = "REFUNDED";
|
|
433
|
+
})(ApprovalStatus || (ApprovalStatus = {}));
|
|
434
|
+
export var IraCheck;
|
|
435
|
+
(function (IraCheck) {
|
|
436
|
+
IraCheck["PENDING"] = "PENDING";
|
|
437
|
+
IraCheck["APPROVED"] = "APPROVED";
|
|
438
|
+
IraCheck["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
439
|
+
IraCheck["REJECTED"] = "REJECTED";
|
|
440
|
+
})(IraCheck || (IraCheck = {}));
|
|
441
|
+
export var CoveredPersonsStatus;
|
|
442
|
+
(function (CoveredPersonsStatus) {
|
|
443
|
+
CoveredPersonsStatus["REJECTED"] = "REJECTED";
|
|
444
|
+
CoveredPersonsStatus["IN_REVIEW"] = "IN_REVIEW";
|
|
445
|
+
CoveredPersonsStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
446
|
+
CoveredPersonsStatus["COMPLETED"] = "COMPLETED";
|
|
447
|
+
})(CoveredPersonsStatus || (CoveredPersonsStatus = {}));
|
|
448
|
+
export var ComplianceReview;
|
|
449
|
+
(function (ComplianceReview) {
|
|
450
|
+
ComplianceReview["PENDING"] = "PENDING";
|
|
451
|
+
ComplianceReview["APPROVED"] = "APPROVED";
|
|
452
|
+
ComplianceReview["REJECTED"] = "REJECTED";
|
|
453
|
+
ComplianceReview["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
454
|
+
ComplianceReview["CANCELLED"] = "CANCELLED";
|
|
455
|
+
ComplianceReview["READY_TO_APPROVE"] = "READY_TO_APPROVE";
|
|
456
|
+
})(ComplianceReview || (ComplianceReview = {}));
|
|
457
|
+
export var KYCDocumentType;
|
|
458
|
+
(function (KYCDocumentType) {
|
|
459
|
+
KYCDocumentType["PASSPORT"] = "PASSPORT";
|
|
460
|
+
KYCDocumentType["DRIVER_LICENSE"] = "DRIVER_LICENSE";
|
|
461
|
+
KYCDocumentType["STATE_ID"] = "STATE_ID";
|
|
462
|
+
})(KYCDocumentType || (KYCDocumentType = {}));
|
|
463
|
+
export var InvestmentType;
|
|
464
|
+
(function (InvestmentType) {
|
|
465
|
+
InvestmentType["INDIVIDUAL"] = "INDIVIDUAL";
|
|
466
|
+
InvestmentType["JOINT"] = "JOINT";
|
|
467
|
+
InvestmentType["ENTITY"] = "ENTITY";
|
|
468
|
+
})(InvestmentType || (InvestmentType = {}));
|
|
469
|
+
export var AicAccreditationType;
|
|
470
|
+
(function (AicAccreditationType) {
|
|
471
|
+
AicAccreditationType["PENDING"] = "PENDING";
|
|
472
|
+
AicAccreditationType["INCOME"] = "INCOME";
|
|
473
|
+
AicAccreditationType["NET_WORTH"] = "NET_WORTH";
|
|
474
|
+
AicAccreditationType["PROFESSIONAL_CERTIFICATION"] = "PROFESSIONAL_CERTIFICATION";
|
|
475
|
+
AicAccreditationType["KNOWLEDGEABLE_EMPLOYEE"] = "KNOWLEDGEABLE_EMPLOYEE";
|
|
476
|
+
})(AicAccreditationType || (AicAccreditationType = {}));
|
|
477
|
+
export var InvestorAccountType;
|
|
478
|
+
(function (InvestorAccountType) {
|
|
479
|
+
InvestorAccountType["INDIVIDUAL"] = "INDIVIDUAL";
|
|
480
|
+
InvestorAccountType["JOINT"] = "JOINT";
|
|
481
|
+
InvestorAccountType["RETIREMENT"] = "RETIREMENT";
|
|
482
|
+
InvestorAccountType["LEGAL_ENTITY"] = "LEGAL_ENTITY";
|
|
483
|
+
})(InvestorAccountType || (InvestorAccountType = {}));
|
|
484
|
+
export var SetupStatusType;
|
|
485
|
+
(function (SetupStatusType) {
|
|
486
|
+
SetupStatusType["IN_PROGRESS"] = "IN_PROGRESS";
|
|
487
|
+
SetupStatusType["COMPLETE"] = "COMPLETE";
|
|
488
|
+
})(SetupStatusType || (SetupStatusType = {}));
|
|
489
|
+
export var SetupStepType;
|
|
490
|
+
(function (SetupStepType) {
|
|
491
|
+
SetupStepType["NEW"] = "NEW";
|
|
492
|
+
SetupStepType["PERSONAL_INFO"] = "PERSONAL_INFO";
|
|
493
|
+
SetupStepType["ADDRESS"] = "ADDRESS";
|
|
494
|
+
SetupStepType["KYC"] = "KYC";
|
|
495
|
+
SetupStepType["INCOME"] = "INCOME";
|
|
496
|
+
SetupStepType["AIC_QUESTIONS"] = "AIC_QUESTIONS";
|
|
497
|
+
SetupStepType["AIC_FILES"] = "AIC_FILES";
|
|
498
|
+
})(SetupStepType || (SetupStepType = {}));
|
|
499
|
+
export var OfferingType;
|
|
500
|
+
(function (OfferingType) {
|
|
501
|
+
OfferingType["REG_A"] = "REG_A";
|
|
502
|
+
OfferingType["REG_CF"] = "REG_CF";
|
|
503
|
+
OfferingType["REG_D"] = "REG_D";
|
|
504
|
+
OfferingType["S1"] = "S1";
|
|
505
|
+
OfferingType["EXCHANGE_NOTE"] = "EXCHANGE_NOTE";
|
|
506
|
+
})(OfferingType || (OfferingType = {}));
|
|
507
|
+
export var AssetType;
|
|
508
|
+
(function (AssetType) {
|
|
509
|
+
AssetType["BOND"] = "BOND";
|
|
510
|
+
AssetType["STOCK"] = "STOCK";
|
|
511
|
+
})(AssetType || (AssetType = {}));
|
|
512
|
+
export var AdjustmentType;
|
|
513
|
+
(function (AdjustmentType) {
|
|
514
|
+
AdjustmentType["CREDIT_CARD_FEES"] = "CREDIT_CARD_FEES";
|
|
515
|
+
AdjustmentType["SERVICE_CHARGES"] = "SERVICE_CHARGES";
|
|
516
|
+
AdjustmentType["SUBSCRIPTION_DISCOUNT"] = "SUBSCRIPTION_DISCOUNT";
|
|
517
|
+
})(AdjustmentType || (AdjustmentType = {}));
|
|
518
|
+
export var SignatureStatus;
|
|
519
|
+
(function (SignatureStatus) {
|
|
520
|
+
SignatureStatus["PENDING"] = "PENDING";
|
|
521
|
+
SignatureStatus["SIGNED"] = "SIGNED";
|
|
522
|
+
SignatureStatus["DECLINED"] = "DECLINED";
|
|
523
|
+
SignatureStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
524
|
+
SignatureStatus["RE_SIGN"] = "RE_SIGN";
|
|
525
|
+
})(SignatureStatus || (SignatureStatus = {}));
|
|
526
|
+
export var TemplateType;
|
|
527
|
+
(function (TemplateType) {
|
|
528
|
+
TemplateType["INDIVIDUAL"] = "INDIVIDUAL";
|
|
529
|
+
TemplateType["JOINT"] = "JOINT";
|
|
530
|
+
TemplateType["ENTITY"] = "ENTITY";
|
|
531
|
+
TemplateType["RETIREMENT"] = "RETIREMENT";
|
|
532
|
+
TemplateType["GENERAL"] = "GENERAL";
|
|
533
|
+
})(TemplateType || (TemplateType = {}));
|
|
534
|
+
export var TemplateStatus;
|
|
535
|
+
(function (TemplateStatus) {
|
|
536
|
+
TemplateStatus["PENDING"] = "PENDING";
|
|
537
|
+
TemplateStatus["VALID"] = "VALID";
|
|
538
|
+
TemplateStatus["ERROR"] = "ERROR";
|
|
539
|
+
})(TemplateStatus || (TemplateStatus = {}));
|
|
540
|
+
export var SenderIdentityStatus;
|
|
541
|
+
(function (SenderIdentityStatus) {
|
|
542
|
+
SenderIdentityStatus["PENDING"] = "PENDING";
|
|
543
|
+
SenderIdentityStatus["APPROVED"] = "APPROVED";
|
|
544
|
+
SenderIdentityStatus["REJECTED"] = "DECLINED";
|
|
545
|
+
SenderIdentityStatus["DELETED"] = "DELETED";
|
|
546
|
+
SenderIdentityStatus["REVOKED"] = "REVOKED";
|
|
547
|
+
})(SenderIdentityStatus || (SenderIdentityStatus = {}));
|
|
548
|
+
export var DurationType;
|
|
549
|
+
(function (DurationType) {
|
|
550
|
+
DurationType["DAY"] = "DAYS";
|
|
551
|
+
DurationType["WEEK"] = "WEEKS";
|
|
552
|
+
DurationType["MONTH"] = "MONTHS";
|
|
553
|
+
DurationType["YEAR"] = "YEARS";
|
|
554
|
+
})(DurationType || (DurationType = {}));
|
|
555
|
+
export var CoveredPersonsRoleType;
|
|
556
|
+
(function (CoveredPersonsRoleType) {
|
|
557
|
+
CoveredPersonsRoleType["ENTITY"] = "ENTITY";
|
|
558
|
+
CoveredPersonsRoleType["BOARD_MEMBER"] = "BOARD_MEMBER";
|
|
559
|
+
CoveredPersonsRoleType["ADVISOR"] = "ADVISOR";
|
|
560
|
+
CoveredPersonsRoleType["CEO"] = "CEO";
|
|
561
|
+
CoveredPersonsRoleType["CFO"] = "CFO";
|
|
562
|
+
CoveredPersonsRoleType["ACCOUNTING"] = "ACCOUNTING";
|
|
563
|
+
CoveredPersonsRoleType["CPA"] = "CPA";
|
|
564
|
+
CoveredPersonsRoleType["LEGAL"] = "LEGAL";
|
|
565
|
+
CoveredPersonsRoleType["EXECUTIVE"] = "EXECUTIVE";
|
|
566
|
+
CoveredPersonsRoleType["EMPLOYEE"] = "EMPLOYEE";
|
|
567
|
+
CoveredPersonsRoleType["INVESTOR"] = "INVESTOR";
|
|
568
|
+
CoveredPersonsRoleType["PROMOTER"] = "PROMOTER";
|
|
569
|
+
CoveredPersonsRoleType["OWNER"] = "OWNER";
|
|
570
|
+
CoveredPersonsRoleType["AFFILIATED"] = "AFFILIATED";
|
|
571
|
+
})(CoveredPersonsRoleType || (CoveredPersonsRoleType = {}));
|
|
572
|
+
export var IDType;
|
|
573
|
+
(function (IDType) {
|
|
574
|
+
IDType["PASSPORT"] = "PASSPORT";
|
|
575
|
+
IDType["DRIVERS_LICENSE"] = "DRIVERS_LICENSE";
|
|
576
|
+
})(IDType || (IDType = {}));
|
|
577
|
+
export var CoveredPersonType;
|
|
578
|
+
(function (CoveredPersonType) {
|
|
579
|
+
CoveredPersonType["CHILD"] = "CHILD";
|
|
580
|
+
CoveredPersonType["PARENT"] = "PARENT";
|
|
581
|
+
})(CoveredPersonType || (CoveredPersonType = {}));
|
|
582
|
+
export var CoveredPersonFileLabels;
|
|
583
|
+
(function (CoveredPersonFileLabels) {
|
|
584
|
+
CoveredPersonFileLabels["IDENTITY_FRONT"] = "IDENTITY_FRONT";
|
|
585
|
+
CoveredPersonFileLabels["IDENTITY_BACK"] = "IDENTITY_BACK";
|
|
586
|
+
CoveredPersonFileLabels["BAD_ACTOR_REPORT_FILE"] = "BAD_ACTOR_REPORT_FILE";
|
|
587
|
+
})(CoveredPersonFileLabels || (CoveredPersonFileLabels = {}));
|
|
588
|
+
export var IdentityFileLabels;
|
|
589
|
+
(function (IdentityFileLabels) {
|
|
590
|
+
IdentityFileLabels["IDENTITY_FRONT"] = "IDENTITY_FRONT";
|
|
591
|
+
IdentityFileLabels["IDENTITY_BACK"] = "IDENTITY_BACK";
|
|
592
|
+
IdentityFileLabels["PASSPORT"] = "PASSPORT";
|
|
593
|
+
})(IdentityFileLabels || (IdentityFileLabels = {}));
|
|
594
|
+
export var IssuerFileLabels;
|
|
595
|
+
(function (IssuerFileLabels) {
|
|
596
|
+
IssuerFileLabels["SS4_LETTER"] = "SS4_LETTER";
|
|
597
|
+
IssuerFileLabels["FORMATION_DOCUMENT"] = "FORMATION_DOCUMENT";
|
|
598
|
+
IssuerFileLabels["COVER_ART"] = "COVER_ART";
|
|
599
|
+
})(IssuerFileLabels || (IssuerFileLabels = {}));
|
|
600
|
+
export var OfferingFileLabels;
|
|
601
|
+
(function (OfferingFileLabels) {
|
|
602
|
+
OfferingFileLabels["MEMORANDUM"] = "MEMORANDUM";
|
|
603
|
+
OfferingFileLabels["SUBSCRIPTION_AGREEMENT"] = "SUBSCRIPTION_AGREEMENT";
|
|
604
|
+
OfferingFileLabels["COVER_ART"] = "COVER_ART";
|
|
605
|
+
})(OfferingFileLabels || (OfferingFileLabels = {}));
|
|
606
|
+
export var SiteBrandingFileLabels;
|
|
607
|
+
(function (SiteBrandingFileLabels) {
|
|
608
|
+
SiteBrandingFileLabels["LOGO"] = "LOGO";
|
|
609
|
+
SiteBrandingFileLabels["FAVICON"] = "FAVICON";
|
|
610
|
+
SiteBrandingFileLabels["BACKGROUND_IMAGE"] = "BACKGROUND_IMAGE";
|
|
611
|
+
})(SiteBrandingFileLabels || (SiteBrandingFileLabels = {}));
|
|
612
|
+
export var TradeFileLables;
|
|
613
|
+
(function (TradeFileLables) {
|
|
614
|
+
TradeFileLables["TRADE_DOCUMENT"] = "TRADE_DOCUMENT";
|
|
615
|
+
})(TradeFileLables || (TradeFileLables = {}));
|
|
616
|
+
export var RetirementFileLabels;
|
|
617
|
+
(function (RetirementFileLabels) {
|
|
618
|
+
RetirementFileLabels["CUSTODIAN_INSTRUCTION_DOCUMENT"] = "CUSTODIAN_INSTRUCTION_DOCUMENT";
|
|
619
|
+
})(RetirementFileLabels || (RetirementFileLabels = {}));
|
|
620
|
+
export var AccreditationFileLabels;
|
|
621
|
+
(function (AccreditationFileLabels) {
|
|
622
|
+
AccreditationFileLabels["PROOF_OF_INCOME"] = "PROOF_OF_INCOME";
|
|
623
|
+
AccreditationFileLabels["PROOF_OF_NET_WORTH"] = "PROOF_OF_NET_WORTH";
|
|
624
|
+
AccreditationFileLabels["EMPLOYEE"] = "EMPLOYEE";
|
|
625
|
+
AccreditationFileLabels["TAX_RETURNS"] = "TAX_RETURNS";
|
|
626
|
+
AccreditationFileLabels["ACCOUNT_STATEMENT"] = "ACCOUNT_STATEMENT";
|
|
627
|
+
AccreditationFileLabels["ACCREDITATION_LETTER"] = "ACCREDITATION_LETTER";
|
|
628
|
+
AccreditationFileLabels["LICENSE"] = "LICENSE";
|
|
629
|
+
})(AccreditationFileLabels || (AccreditationFileLabels = {}));
|
|
630
|
+
export var OtherFileLabels;
|
|
631
|
+
(function (OtherFileLabels) {
|
|
632
|
+
OtherFileLabels["OTHER"] = "OTHER";
|
|
633
|
+
OtherFileLabels["COMPLIANCE_REQUEST"] = "COMPLIANCE_REQUEST";
|
|
634
|
+
OtherFileLabels["SUB_DOC"] = "SUB_DOC";
|
|
635
|
+
})(OtherFileLabels || (OtherFileLabels = {}));
|
|
636
|
+
export const FileLabels = {
|
|
637
|
+
...AccreditationFileLabels,
|
|
638
|
+
...CoveredPersonFileLabels,
|
|
639
|
+
...OtherFileLabels,
|
|
640
|
+
...RetirementFileLabels,
|
|
641
|
+
...SiteBrandingFileLabels,
|
|
642
|
+
...OfferingFileLabels,
|
|
643
|
+
...IssuerFileLabels,
|
|
644
|
+
...IdentityFileLabels,
|
|
645
|
+
...TradeFileLables,
|
|
646
|
+
};
|
|
647
|
+
export const FileLabelsEnum = z.enum(Object.values(FileLabels));
|
|
648
|
+
export var TradeType;
|
|
649
|
+
(function (TradeType) {
|
|
650
|
+
TradeType["PURCHASE"] = "PURCHASE";
|
|
651
|
+
TradeType["CONVERSION"] = "CONVERSION";
|
|
652
|
+
TradeType["TRANSFER"] = "TRANSFER";
|
|
653
|
+
})(TradeType || (TradeType = {}));
|
|
654
|
+
export var TradeStatus;
|
|
655
|
+
(function (TradeStatus) {
|
|
656
|
+
TradeStatus["CART"] = "CART";
|
|
657
|
+
TradeStatus["PLACED"] = "PLACED";
|
|
658
|
+
TradeStatus["IN_REVIEW"] = "IN_REVIEW";
|
|
659
|
+
TradeStatus["NEEDS_INFO"] = "NEEDS_INFO";
|
|
660
|
+
TradeStatus["NEEDS_PAYMENT_INFO"] = "NEEDS_PAYMENT_INFO";
|
|
661
|
+
TradeStatus["FUNDING"] = "FUNDING";
|
|
662
|
+
TradeStatus["CANCELLED"] = "CANCELLED";
|
|
663
|
+
TradeStatus["SETTLED"] = "SETTLED";
|
|
664
|
+
TradeStatus["IMPORT_ERROR"] = "IMPORT_ERROR";
|
|
665
|
+
TradeStatus["ERROR"] = "ERROR";
|
|
666
|
+
TradeStatus["UPDATE_PAYMENT_METHOD"] = "UPDATE_PAYMENT_METHOD";
|
|
667
|
+
})(TradeStatus || (TradeStatus = {}));
|
|
668
|
+
export var SavedQuery;
|
|
669
|
+
(function (SavedQuery) {
|
|
670
|
+
SavedQuery["ERROR_REPORT"] = "ERROR_REPORT";
|
|
671
|
+
SavedQuery["STUCK_TRADES"] = "STUCK_TRADES";
|
|
672
|
+
})(SavedQuery || (SavedQuery = {}));
|
|
673
|
+
export var SystemReviewLogTrigger;
|
|
674
|
+
(function (SystemReviewLogTrigger) {
|
|
675
|
+
SystemReviewLogTrigger["AML_STATUS_UPDATE"] = "AML_STATUS_UPDATE";
|
|
676
|
+
SystemReviewLogTrigger["AIC_STATUS_UPDATE"] = "AIC_STATUS_UPDATE";
|
|
677
|
+
SystemReviewLogTrigger["INDIVIDUAL_UPDATE"] = "INDIVIDUAL_UPDATE";
|
|
678
|
+
SystemReviewLogTrigger["TRADE_STATUS_UPDATE"] = "TRADE_STATUS_UPDATE";
|
|
679
|
+
SystemReviewLogTrigger["KYC_STATUS_UPDATE"] = "KYC_STATUS_UPDATE";
|
|
680
|
+
SystemReviewLogTrigger["SUBDOC_STATUS_UPDATE"] = "SUBDOC_STATUS_UPDATE";
|
|
681
|
+
SystemReviewLogTrigger["VALIDATE_PLACED_TRADES_WORKER"] = "VALIDATE_PLACED_TRADES_WORKER";
|
|
682
|
+
})(SystemReviewLogTrigger || (SystemReviewLogTrigger = {}));
|
|
683
|
+
export var OfferingOnboardingStatus;
|
|
684
|
+
(function (OfferingOnboardingStatus) {
|
|
685
|
+
OfferingOnboardingStatus["IN_REVIEW"] = "IN_REVIEW";
|
|
686
|
+
OfferingOnboardingStatus["COMPLETE"] = "COMPLETED";
|
|
687
|
+
})(OfferingOnboardingStatus || (OfferingOnboardingStatus = {}));
|
|
688
|
+
export var ExchangeProvider;
|
|
689
|
+
(function (ExchangeProvider) {
|
|
690
|
+
ExchangeProvider["PPEX"] = "PPEX";
|
|
691
|
+
ExchangeProvider["PHOENIX"] = "PHOENIX";
|
|
692
|
+
ExchangeProvider["NORTHCAP"] = "NORTHCAP";
|
|
693
|
+
})(ExchangeProvider || (ExchangeProvider = {}));
|
|
694
|
+
export var RunnerType;
|
|
695
|
+
(function (RunnerType) {
|
|
696
|
+
RunnerType["WORKER"] = "WORKER";
|
|
697
|
+
RunnerType["PIPELINE"] = "PIPELINE";
|
|
698
|
+
})(RunnerType || (RunnerType = {}));
|
|
699
|
+
export var PublicDataType;
|
|
700
|
+
(function (PublicDataType) {
|
|
701
|
+
PublicDataType["DATA_ROOM"] = "DATA_ROOM";
|
|
702
|
+
PublicDataType["PAGE"] = "PAGE";
|
|
703
|
+
PublicDataType["OFFERING"] = "OFFERING";
|
|
704
|
+
})(PublicDataType || (PublicDataType = {}));
|
|
705
|
+
export var TrustedContactRelationship;
|
|
706
|
+
(function (TrustedContactRelationship) {
|
|
707
|
+
TrustedContactRelationship["SIBLING"] = "SIBLING";
|
|
708
|
+
TrustedContactRelationship["GUARDIAN"] = "GUARDIAN";
|
|
709
|
+
TrustedContactRelationship["CHILD"] = "CHILD";
|
|
710
|
+
TrustedContactRelationship["FRIEND"] = "FRIEND";
|
|
711
|
+
TrustedContactRelationship["OTHER"] = "OTHER";
|
|
712
|
+
})(TrustedContactRelationship || (TrustedContactRelationship = {}));
|
|
713
|
+
export var FileStatus;
|
|
714
|
+
(function (FileStatus) {
|
|
715
|
+
FileStatus["PENDING"] = "PENDING";
|
|
716
|
+
FileStatus["ERROR"] = "ERROR";
|
|
717
|
+
FileStatus["VALID"] = "VALID";
|
|
718
|
+
FileStatus["INVALID"] = "INVALID";
|
|
719
|
+
FileStatus["NOT_PROCESSED"] = "NOT_PROCESSED";
|
|
720
|
+
FileStatus["PROCESSING"] = "PROCESSING";
|
|
721
|
+
FileStatus["PROCESSING_ERROR"] = "PROCESSING_ERROR";
|
|
722
|
+
FileStatus["REVIEW_ERROR"] = "REVIEW_ERROR";
|
|
723
|
+
FileStatus["PROCESSED"] = "PROCESSED";
|
|
724
|
+
})(FileStatus || (FileStatus = {}));
|
|
725
|
+
export var SystemReviewStatus;
|
|
726
|
+
(function (SystemReviewStatus) {
|
|
727
|
+
SystemReviewStatus["PENDING"] = "PENDING";
|
|
728
|
+
SystemReviewStatus["NEEDS_INFO"] = "NEEDS_INFO";
|
|
729
|
+
SystemReviewStatus["READY_TO_APPROVE"] = "READY_TO_APPROVE";
|
|
730
|
+
SystemReviewStatus["NEEDS_REVIEW"] = "NEEDS_REVIEW";
|
|
731
|
+
SystemReviewStatus["APPROVED"] = "APPROVED";
|
|
732
|
+
SystemReviewStatus["REJECTED"] = "REJECTED";
|
|
733
|
+
})(SystemReviewStatus || (SystemReviewStatus = {}));
|
|
734
|
+
export var FilingStatus;
|
|
735
|
+
(function (FilingStatus) {
|
|
736
|
+
FilingStatus["SINGLE"] = "SINGLE";
|
|
737
|
+
FilingStatus["JOINT"] = "JOINT";
|
|
738
|
+
})(FilingStatus || (FilingStatus = {}));
|
|
739
|
+
export var AccountType;
|
|
740
|
+
(function (AccountType) {
|
|
741
|
+
AccountType["CHECKING"] = "CHECKING";
|
|
742
|
+
AccountType["SAVINGS"] = "SAVINGS";
|
|
743
|
+
AccountType["BROKERAGE"] = "BROKERAGE";
|
|
744
|
+
AccountType["REAL_ESTATE"] = "REAL_ESTATE";
|
|
745
|
+
AccountType["OTHER"] = "OTHER";
|
|
746
|
+
})(AccountType || (AccountType = {}));
|
|
747
|
+
export var SourceOfIncome;
|
|
748
|
+
(function (SourceOfIncome) {
|
|
749
|
+
SourceOfIncome["EMPLOYED"] = "EMPLOYED";
|
|
750
|
+
SourceOfIncome["SELF_EMPLOYED"] = "SELF_EMPLOYED";
|
|
751
|
+
SourceOfIncome["UNEMPLOYED"] = "UNEMPLOYED";
|
|
752
|
+
SourceOfIncome["RETIREMENT"] = "RETIREMENT";
|
|
753
|
+
SourceOfIncome["STUDENT"] = "STUDENT";
|
|
754
|
+
})(SourceOfIncome || (SourceOfIncome = {}));
|
|
755
|
+
export var DateField;
|
|
756
|
+
(function (DateField) {
|
|
757
|
+
DateField["RAW_ORDER_CREATED_DATE"] = "rawOrder.createdDate";
|
|
758
|
+
DateField["RAW_TRADE_CREATED_DATE"] = "rawTrade.createdDate";
|
|
759
|
+
DateField["CREATED_AT"] = "createdAt";
|
|
760
|
+
})(DateField || (DateField = {}));
|
|
761
|
+
export const DateFieldMap = {
|
|
762
|
+
[DateField.RAW_ORDER_CREATED_DATE]: "raw_order_data->>'createdDate'",
|
|
763
|
+
[DateField.RAW_TRADE_CREATED_DATE]: "raw_trade_data->>'createdDate'",
|
|
764
|
+
[DateField.CREATED_AT]: 'entity.createdAt',
|
|
765
|
+
};
|
|
766
|
+
/**
|
|
767
|
+
* Event fields represent database entity columns that can be changed using status.changed events.
|
|
768
|
+
* These enum values correspond to actual column names in various database entities
|
|
769
|
+
* and are used to track field-level changes in the system's activity logging.
|
|
770
|
+
*/
|
|
771
|
+
export var EventField;
|
|
772
|
+
(function (EventField) {
|
|
773
|
+
EventField["STATUS"] = "status";
|
|
774
|
+
EventField["TRADE_STATUS"] = "tradeStatus";
|
|
775
|
+
EventField["FUNDING_STATUS"] = "fundingStatus";
|
|
776
|
+
EventField["COMPLIANCE_REVIEW"] = "complianceReview";
|
|
777
|
+
EventField["SYSTEM_REVIEW_CHECK"] = "systemReviewCheck";
|
|
778
|
+
EventField["SYSTEM_REVIEW"] = "systemReview";
|
|
779
|
+
EventField["KYC_STATUS"] = "kycStatus";
|
|
780
|
+
EventField["AML_STATUS"] = "amlStatus";
|
|
781
|
+
EventField["AIC_STATUS"] = "aicStatus";
|
|
782
|
+
EventField["SA_STATUS"] = "saStatus";
|
|
783
|
+
EventField["ONBOARDING_STATUS"] = "onboardingStatus";
|
|
784
|
+
EventField["TRANSACTION_STATUS"] = "transactionStatus";
|
|
785
|
+
EventField["ACTIVE"] = "active";
|
|
786
|
+
EventField["LOCKED"] = "locked";
|
|
787
|
+
})(EventField || (EventField = {}));
|
|
788
|
+
export var EventName;
|
|
789
|
+
(function (EventName) {
|
|
790
|
+
EventName["STATUS_CHANGED"] = "status.changed";
|
|
791
|
+
EventName["UPDATE_FIELD"] = "update.field";
|
|
792
|
+
EventName["ACTION_PERFORMED"] = "action.performed";
|
|
793
|
+
EventName["PENDING_OVERDUE_TRADES_ALERT"] = "pending_overdue.trades.alert";
|
|
794
|
+
EventName["IN_REVIEW_TRADES_ALERT"] = "trade.inreview.alert";
|
|
795
|
+
EventName["INDIVIDUAL_AML_STATUS_CHANGED"] = "individual.aml_status.changed";
|
|
796
|
+
})(EventName || (EventName = {}));
|
|
797
|
+
// pending charged settled refunded cancelled
|
|
798
|
+
export var TransactionStatus;
|
|
799
|
+
(function (TransactionStatus) {
|
|
800
|
+
TransactionStatus["PENDING"] = "PENDING";
|
|
801
|
+
TransactionStatus["CHARGED"] = "CHARGED";
|
|
802
|
+
TransactionStatus["APPROVED"] = "APPROVED";
|
|
803
|
+
TransactionStatus["SETTLED"] = "SETTLED";
|
|
804
|
+
TransactionStatus["REFUNDED"] = "REFUNDED";
|
|
805
|
+
TransactionStatus["CANCELLED"] = "CANCELLED";
|
|
806
|
+
TransactionStatus["DECLINED"] = "DECLINED";
|
|
807
|
+
TransactionStatus["FAILED"] = "FAILED";
|
|
808
|
+
TransactionStatus["AUTHORIZING"] = "AUTHORIZING";
|
|
809
|
+
TransactionStatus["FUNDING"] = "FUNDING";
|
|
810
|
+
TransactionStatus["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
|
|
811
|
+
TransactionStatus["VOIDED"] = "VOIDED";
|
|
812
|
+
})(TransactionStatus || (TransactionStatus = {}));
|
|
813
|
+
//charge, refund, adjustment
|
|
814
|
+
export var TransactionType;
|
|
815
|
+
(function (TransactionType) {
|
|
816
|
+
TransactionType["CHARGE"] = "CHARGE";
|
|
817
|
+
TransactionType["REFUND"] = "REFUND";
|
|
818
|
+
TransactionType["ADJUSTMENT"] = "ADJUSTMENT";
|
|
819
|
+
})(TransactionType || (TransactionType = {}));
|
|
820
|
+
const parseDate = (str) => {
|
|
821
|
+
if (!str)
|
|
822
|
+
return null;
|
|
823
|
+
const [monthStr, dayStr, yearStr] = str.split('/');
|
|
824
|
+
const month = Number(monthStr);
|
|
825
|
+
const day = Number(dayStr);
|
|
826
|
+
const year = Number(yearStr);
|
|
827
|
+
if (isNaN(month) || isNaN(day) || isNaN(year)) {
|
|
828
|
+
return null;
|
|
829
|
+
}
|
|
830
|
+
return new Date(year, month - 1, day);
|
|
831
|
+
};
|
|
832
|
+
export const dateSchema = z
|
|
833
|
+
.string()
|
|
834
|
+
.nullable()
|
|
835
|
+
.refine((val) => {
|
|
836
|
+
if (!val)
|
|
837
|
+
return true;
|
|
838
|
+
const regex = /^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/\d{4}$/;
|
|
839
|
+
return regex.test(val);
|
|
840
|
+
}, { message: 'Date must be in MM/DD/YYYY format' })
|
|
841
|
+
.transform((val) => (val ? parseDate(val) : null));
|
|
842
|
+
/**
|
|
843
|
+
* Creates a Zod schema for parsing and transforming date strings in MM/DD/YYYY format.
|
|
844
|
+
* The schema accepts a parameter to determine if the date should be formatted as the start or end of the day.
|
|
845
|
+
* - If param is 'START', the time is set to 00:00:00.000 (local, no timezone effect).
|
|
846
|
+
* - If param is 'END', the time is set to 23:59:59.999 (local, no timezone effect).
|
|
847
|
+
* - Otherwise, the time is set to 00:00:00.000.
|
|
848
|
+
* The returned value is a Date object or null.
|
|
849
|
+
*/
|
|
850
|
+
export const createDateSchema = (param) => z
|
|
851
|
+
.string()
|
|
852
|
+
.nullable()
|
|
853
|
+
.refine((val) => {
|
|
854
|
+
if (!val)
|
|
855
|
+
return true;
|
|
856
|
+
const regex = /^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/\d{4}$/;
|
|
857
|
+
return regex.test(val);
|
|
858
|
+
}, { message: 'Date must be in MM/DD/YYYY format' })
|
|
859
|
+
.transform((val) => {
|
|
860
|
+
if (!val)
|
|
861
|
+
return null;
|
|
862
|
+
const [monthStr, dayStr, yearStr] = val.split('/');
|
|
863
|
+
const month = Number(monthStr);
|
|
864
|
+
const day = Number(dayStr);
|
|
865
|
+
const year = Number(yearStr);
|
|
866
|
+
if (isNaN(month) || isNaN(day) || isNaN(year)) {
|
|
867
|
+
return null;
|
|
868
|
+
}
|
|
869
|
+
let date;
|
|
870
|
+
if (param === 'END') {
|
|
871
|
+
// Set to 23:59:59.999 local, then force to end of day in UTC
|
|
872
|
+
date = new Date(Date.UTC(year, month - 1, day, 23, 59, 59, 999));
|
|
873
|
+
}
|
|
874
|
+
else {
|
|
875
|
+
// Default to START or normal, set to 00:00:00.000 UTC
|
|
876
|
+
date = new Date(Date.UTC(year, month - 1, day, 0, 0, 0, 0));
|
|
877
|
+
}
|
|
878
|
+
return date;
|
|
879
|
+
});
|
|
880
|
+
/**
|
|
881
|
+
* Default dateSchema (no param) for backward compatibility.
|
|
882
|
+
*/
|
|
883
|
+
export const dateSchemaWithParam = createDateSchema();
|
|
884
|
+
export var IssuerOnboardingSetupType;
|
|
885
|
+
(function (IssuerOnboardingSetupType) {
|
|
886
|
+
IssuerOnboardingSetupType["OFFERING"] = "OFFERING";
|
|
887
|
+
IssuerOnboardingSetupType["INVESTOR_PORTAL"] = "INVESTOR_PORTAL";
|
|
888
|
+
IssuerOnboardingSetupType["PAYMENT_METHOD"] = "PAYMENT_METHOD";
|
|
889
|
+
IssuerOnboardingSetupType["ACCOUNT_CONTACTS"] = "ACCOUNT_CONTACTS";
|
|
890
|
+
})(IssuerOnboardingSetupType || (IssuerOnboardingSetupType = {}));
|
|
891
|
+
export var ThemeScope;
|
|
892
|
+
(function (ThemeScope) {
|
|
893
|
+
ThemeScope["ACCOUNT"] = "ACCOUNT";
|
|
894
|
+
ThemeScope["SYSTEM"] = "SYSTEM";
|
|
895
|
+
})(ThemeScope || (ThemeScope = {}));
|
|
896
|
+
/**
|
|
897
|
+
* The configuration for the target tables. Used in Notes, Files, and Activities
|
|
898
|
+
* All tables that need to be targeted should be added here.
|
|
899
|
+
* to determine the target table from the target ID.
|
|
900
|
+
* TODO: UPDATE WITH MORE TABLES
|
|
901
|
+
* CHANGES HERE WILL REQUIRE A MIGRATION
|
|
902
|
+
*/
|
|
903
|
+
export const TargetTableConfig = {
|
|
904
|
+
KYCS: { table: 'kycs', idPrefix: 'kyc' },
|
|
905
|
+
AMLS: { table: 'amls', idPrefix: 'aml' },
|
|
906
|
+
AICS: { table: 'aics', idPrefix: 'aic' },
|
|
907
|
+
KYBS: { table: 'kybs', idPrefix: 'kyb' },
|
|
908
|
+
INDIVIDUALS: { table: 'individuals', idPrefix: 'individual' },
|
|
909
|
+
LEGAL_ENTITIES: { table: 'legal_entities', idPrefix: 'legal_entity' },
|
|
910
|
+
INVESTOR_ACCOUNTS: {
|
|
911
|
+
table: 'investor_accounts',
|
|
912
|
+
idPrefix: 'investor_account',
|
|
913
|
+
},
|
|
914
|
+
TRADES: { table: 'trades', idPrefix: 'trade' },
|
|
915
|
+
OFFERINGS: { table: 'offerings', idPrefix: 'offering' },
|
|
916
|
+
ISSUERS: { table: 'issuers', idPrefix: 'issuer' },
|
|
917
|
+
COVERED_PERSONS: { table: 'covered_persons', idPrefix: 'covered_person' },
|
|
918
|
+
PAYMENT_METHODS: { table: 'payment_methods', idPrefix: 'payment_method' },
|
|
919
|
+
NOTES: { table: 'notes', idPrefix: 'note' },
|
|
920
|
+
USERS: { table: 'users', idPrefix: 'user' },
|
|
921
|
+
ACCOUNTS: { table: 'accounts', idPrefix: 'account' },
|
|
922
|
+
PAGES: { table: 'pages', idPrefix: 'page' },
|
|
923
|
+
TASKS: { table: 'tasks', idPrefix: 'task' },
|
|
924
|
+
FILES: { table: 'files', idPrefix: 'file' },
|
|
925
|
+
DATA_RECORD_FILES: {
|
|
926
|
+
table: 'data_record_files',
|
|
927
|
+
idPrefix: 'data_record_file',
|
|
928
|
+
},
|
|
929
|
+
ASSETS: { table: 'assets', idPrefix: 'asset' },
|
|
930
|
+
SITES: { table: 'sites', idPrefix: 'site' },
|
|
931
|
+
PAGE_REVISIONS: { table: 'page_revisions', idPrefix: 'page_revision' },
|
|
932
|
+
TRADE_LINE_ITEMS: { table: 'trade_line_items', idPrefix: 'trade_line_item' },
|
|
933
|
+
TRANSACTIONS: { table: 'transactions', idPrefix: 'transaction' },
|
|
934
|
+
DISBURSEMENTS: { table: 'disbursements', idPrefix: 'disbursement' },
|
|
935
|
+
DISBURSEMENT_REVIEWS: {
|
|
936
|
+
table: 'disbursement_reviews',
|
|
937
|
+
idPrefix: 'disbursement_review',
|
|
938
|
+
},
|
|
939
|
+
ISSUER_PAYMENT_METHODS: {
|
|
940
|
+
table: 'issuer_payment_methods',
|
|
941
|
+
idPrefix: 'issuer_payment_method',
|
|
942
|
+
},
|
|
943
|
+
SIGNER_BRANDS: { table: 'signer_brands', idPrefix: 'signer_brand' },
|
|
944
|
+
THEMES: { table: 'themes', idPrefix: 'theme' },
|
|
945
|
+
THEME_SETTINGS: { table: 'theme_settings', idPrefix: 'theme_setting' },
|
|
946
|
+
};
|
|
947
|
+
export const TargetTableEnum = Object.keys(TargetTableConfig);
|
|
948
|
+
/**
|
|
949
|
+
* Get the target table name from a target ID.
|
|
950
|
+
* @param targetId - The target ID to get the table name for.
|
|
951
|
+
* @returns The target table name or null if the target ID is invalid.
|
|
952
|
+
*/
|
|
953
|
+
export function getTargetTableFromId(targetId) {
|
|
954
|
+
try {
|
|
955
|
+
const tid = TypeID.fromString(targetId);
|
|
956
|
+
const prefix = tid.getType();
|
|
957
|
+
for (const config of Object.values(TargetTableConfig)) {
|
|
958
|
+
if (config.idPrefix === prefix) {
|
|
959
|
+
return config.table;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
catch {
|
|
964
|
+
return null;
|
|
965
|
+
}
|
|
966
|
+
return null;
|
|
967
|
+
}
|
|
968
|
+
export var UrlClassification;
|
|
969
|
+
(function (UrlClassification) {
|
|
970
|
+
UrlClassification["BASE64"] = "BASE64";
|
|
971
|
+
UrlClassification["REGULAR"] = "REGULAR";
|
|
972
|
+
UrlClassification["INVALID"] = "INVALID";
|
|
973
|
+
})(UrlClassification || (UrlClassification = {}));
|
|
974
|
+
export var OfferingVersioningType;
|
|
975
|
+
(function (OfferingVersioningType) {
|
|
976
|
+
OfferingVersioningType["PUBLISHED"] = "PUBLISHED";
|
|
977
|
+
OfferingVersioningType["DRAFT"] = "DRAFT";
|
|
978
|
+
})(OfferingVersioningType || (OfferingVersioningType = {}));
|
|
979
|
+
/**
|
|
980
|
+
* Get the target table type from a target ID.
|
|
981
|
+
* @param targetId - The target ID to get the table type for.
|
|
982
|
+
* @returns The target table type or null if the target ID is invalid.
|
|
983
|
+
*/
|
|
984
|
+
export function getTargetTableTypeFromId(targetId) {
|
|
985
|
+
try {
|
|
986
|
+
const tid = TypeID.fromString(targetId);
|
|
987
|
+
const prefix = tid.getType();
|
|
988
|
+
for (const [tableType, config] of Object.entries(TargetTableConfig)) {
|
|
989
|
+
if (config.idPrefix === prefix) {
|
|
990
|
+
return tableType;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
catch {
|
|
995
|
+
return null;
|
|
996
|
+
}
|
|
997
|
+
return null;
|
|
998
|
+
}
|
|
999
|
+
export const REDACTED = '[REDACTED]';
|
|
1000
|
+
/**
|
|
1001
|
+
* Zod schema for validating and normalizing URLs.
|
|
1002
|
+
*
|
|
1003
|
+
* This schema ensures that the URL is valid and normalizes it by removing the protocol (http/https)
|
|
1004
|
+
* and any path after the main domain.
|
|
1005
|
+
*
|
|
1006
|
+
* @example
|
|
1007
|
+
* UrlSchema.parse('https://www.example.com'); // Valid URL, normalized to 'www.example.com'
|
|
1008
|
+
* UrlSchema.parse('abc.example.org'); // Valid URL, normalized to 'abc.example.org'
|
|
1009
|
+
* UrlSchema.parse('https://subdomain.example.co.uk/path'); // Valid URL, normalized to 'subdomain.example.co.uk'
|
|
1010
|
+
* UrlSchema.parse('ftp://example.com'); // Throws validation error
|
|
1011
|
+
* UrlSchema.parse('invalid-url'); // Throws validation error
|
|
1012
|
+
*/
|
|
1013
|
+
export const createUrlSchema = (options) => {
|
|
1014
|
+
return z
|
|
1015
|
+
.string()
|
|
1016
|
+
.refine((value) => {
|
|
1017
|
+
try {
|
|
1018
|
+
// If strict mode is enabled, require abc.def.com format (at least one subdomain)
|
|
1019
|
+
const urlPattern = options?.strict
|
|
1020
|
+
? /^(https?:\/\/)?([a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.[a-zA-Z]{2,})(\/.*)?$/
|
|
1021
|
+
: /^(https?:\/\/)?(www\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/;
|
|
1022
|
+
return urlPattern.test(value);
|
|
1023
|
+
}
|
|
1024
|
+
catch {
|
|
1025
|
+
return false;
|
|
1026
|
+
}
|
|
1027
|
+
}, {
|
|
1028
|
+
message: options?.strict
|
|
1029
|
+
? 'Invalid URL. Must be in format abc.def.com'
|
|
1030
|
+
: 'Invalid URL',
|
|
1031
|
+
})
|
|
1032
|
+
.transform((value) => {
|
|
1033
|
+
try {
|
|
1034
|
+
const url = new URL(value.startsWith('http') || value.startsWith('https')
|
|
1035
|
+
? value
|
|
1036
|
+
: `http://${value}`);
|
|
1037
|
+
return url.hostname.toLowerCase();
|
|
1038
|
+
}
|
|
1039
|
+
catch {
|
|
1040
|
+
return value.toLowerCase();
|
|
1041
|
+
}
|
|
1042
|
+
})
|
|
1043
|
+
.openapi({
|
|
1044
|
+
example: options?.strict ? 'subdomain.example.com' : 'www.example.com',
|
|
1045
|
+
});
|
|
1046
|
+
};
|
|
1047
|
+
export const UrlSchema = createUrlSchema();
|
|
1048
|
+
/**
|
|
1049
|
+
* Zod schema for validating subdomains.
|
|
1050
|
+
*
|
|
1051
|
+
* This schema ensures that the subdomain contains only alphanumeric characters and hyphens,
|
|
1052
|
+
* does not start or end with a hyphen, and follows standard subdomain naming conventions.
|
|
1053
|
+
*
|
|
1054
|
+
* @example
|
|
1055
|
+
* SubdomainSchema.parse('my-site'); // Valid subdomain
|
|
1056
|
+
* SubdomainSchema.parse('123test'); // Valid subdomain
|
|
1057
|
+
* SubdomainSchema.parse('my_site'); // Throws validation error (underscore not allowed)
|
|
1058
|
+
* SubdomainSchema.parse('-mysite'); // Throws validation error (cannot start with hyphen)
|
|
1059
|
+
* SubdomainSchema.parse('mysite-'); // Throws validation error (cannot end with hyphen)
|
|
1060
|
+
*/
|
|
1061
|
+
export const SubdomainSchema = z
|
|
1062
|
+
.string()
|
|
1063
|
+
.min(1, { message: 'Subdomain cannot be empty' })
|
|
1064
|
+
.max(63, { message: 'Subdomain cannot exceed 63 characters' })
|
|
1065
|
+
.refine((value) => {
|
|
1066
|
+
// Subdomain can only contain alphanumeric characters and hyphens
|
|
1067
|
+
// Cannot start or end with a hyphen
|
|
1068
|
+
const subdomainPattern = /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/;
|
|
1069
|
+
return subdomainPattern.test(value);
|
|
1070
|
+
}, {
|
|
1071
|
+
message: 'Subdomain can only contain letters, numbers, and hyphens, and cannot start or end with a hyphen',
|
|
1072
|
+
})
|
|
1073
|
+
.transform((value) => value.toLowerCase())
|
|
1074
|
+
.openapi({ example: 'my-site' });
|
|
1075
|
+
/**
|
|
1076
|
+
* Zod schema for validating domain names without subdomains.
|
|
1077
|
+
*
|
|
1078
|
+
* This schema ensures the domain is in a valid format (example.com) without subdomains.
|
|
1079
|
+
*
|
|
1080
|
+
* @example
|
|
1081
|
+
* DomainSchema.parse('example.com'); // Valid domain
|
|
1082
|
+
* DomainSchema.parse('subdomain.example.com'); // Throws validation error
|
|
1083
|
+
*/
|
|
1084
|
+
export const DomainSchema = z
|
|
1085
|
+
.string()
|
|
1086
|
+
.refine((value) => {
|
|
1087
|
+
// Only allow a single dot to prevent subdomains
|
|
1088
|
+
const parts = value.split('.');
|
|
1089
|
+
if (parts.length !== 2)
|
|
1090
|
+
return false;
|
|
1091
|
+
// Basic domain format validation
|
|
1092
|
+
const domainPattern = /^[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/;
|
|
1093
|
+
return domainPattern.test(value);
|
|
1094
|
+
}, {
|
|
1095
|
+
message: 'Invalid domain format. Must be a domain without subdomains (e.g., example.com)',
|
|
1096
|
+
})
|
|
1097
|
+
.openapi({ example: 'example.com' });
|
|
1098
|
+
/**
|
|
1099
|
+
* Zod schema for validating hex color codes (with optional alpha/transparency).
|
|
1100
|
+
*
|
|
1101
|
+
* This schema allows hex codes with or without a leading '#', and accepts 3, 4, 6, 7, or 8 hex digits (e.g., #RRGGBB, #RRGGBBA, #RRGGBBAA, #RGB, #RGBA, #XXXXXXX).
|
|
1102
|
+
* The 7-digit form (e.g., #RRGGBBA) is supported to allow for transparency/alpha values at the end.
|
|
1103
|
+
* It also trims whitespace and lowercases the value.
|
|
1104
|
+
*
|
|
1105
|
+
* @example
|
|
1106
|
+
* HexCodeColorSchema.parse('#FF0000'); // Valid hex code
|
|
1107
|
+
* HexCodeColorSchema.parse('FF0000'); // Valid hex code
|
|
1108
|
+
* HexCodeColorSchema.parse('#F00'); // Valid hex code
|
|
1109
|
+
* HexCodeColorSchema.parse('F00'); // Valid hex code
|
|
1110
|
+
* HexCodeColorSchema.parse('#FF000080'); // Valid hex code (with alpha)
|
|
1111
|
+
* HexCodeColorSchema.parse('#D9D9D14'); // Valid hex code (7 digits, with transparency)
|
|
1112
|
+
* HexCodeColorSchema.parse(' #abc '); // Valid hex code, returns '#abc'
|
|
1113
|
+
* HexCodeColorSchema.parse('#XYZ'); // Throws validation error
|
|
1114
|
+
*/
|
|
1115
|
+
export const HexCodeColorSchema = z
|
|
1116
|
+
.string()
|
|
1117
|
+
.trim()
|
|
1118
|
+
.transform((val) => (val.startsWith('#') ? val : `#${val}`))
|
|
1119
|
+
.refine((val) => /^#[A-Fa-f0-9]{3}$/.test(val) || // #RGB
|
|
1120
|
+
/^#[A-Fa-f0-9]{4}$/.test(val) || // #RGBA
|
|
1121
|
+
/^#[A-Fa-f0-9]{6}$/.test(val) || // #RRGGBB
|
|
1122
|
+
/^#[A-Fa-f0-9]{7}$/.test(val) || // #RRGGBBA (7 digits, e.g., with transparency)
|
|
1123
|
+
/^#[A-Fa-f0-9]{8}$/.test(val), // #RRGGBBAA
|
|
1124
|
+
{
|
|
1125
|
+
message: 'Invalid color hex code. It should be 3, 4, 6, 7, or 8 hex digits, with or without a leading "#".',
|
|
1126
|
+
})
|
|
1127
|
+
.openapi({ example: '#FFA500' });
|
|
1128
|
+
export const WithCoverArtUrl = z.object({
|
|
1129
|
+
coverArtUrl: z.string().nullable().optional(),
|
|
1130
|
+
});
|
|
1131
|
+
export const UNKNOWN = 'unknown';
|
|
1132
|
+
export var UserManualType;
|
|
1133
|
+
(function (UserManualType) {
|
|
1134
|
+
UserManualType["FAQ"] = "FAQ";
|
|
1135
|
+
UserManualType["USER_MANUAL"] = "USER_MANUAL";
|
|
1136
|
+
})(UserManualType || (UserManualType = {}));
|
|
1137
|
+
export var BulkExportType;
|
|
1138
|
+
(function (BulkExportType) {
|
|
1139
|
+
BulkExportType["INVESTOR_ACCOUNTS"] = "INVESTOR_ACCOUNTS";
|
|
1140
|
+
BulkExportType["TRADES"] = "TRADES";
|
|
1141
|
+
BulkExportType["COMPLIANCE_TRADES"] = "COMPLIANCE_TRADES";
|
|
1142
|
+
BulkExportType["SECONDARY_CUSTOMERS"] = "SECONDARY_CUSTOMERS";
|
|
1143
|
+
BulkExportType["SECONDARY_TRADES"] = "SECONDARY_TRADES";
|
|
1144
|
+
})(BulkExportType || (BulkExportType = {}));
|
|
1145
|
+
export const SubmitIssuerOfferingError = z.object({
|
|
1146
|
+
field: z.string(),
|
|
1147
|
+
message: z.string(),
|
|
1148
|
+
id: z.string().optional(),
|
|
1149
|
+
});
|
|
1150
|
+
export const ErrorResponseZod = z.object({
|
|
1151
|
+
valid: z.boolean(),
|
|
1152
|
+
errors: z.array(SubmitIssuerOfferingError),
|
|
1153
|
+
});
|
|
1154
|
+
/**
|
|
1155
|
+
* A Zod schema that preprocesses a value to convert it to a number if it is a string.
|
|
1156
|
+
* If the value is a string, it attempts to parse it as a float. If parsing fails, it returns `undefined`.
|
|
1157
|
+
* If the value is already a number, it is returned as is.
|
|
1158
|
+
*
|
|
1159
|
+
* @example
|
|
1160
|
+
* numberFromStringOrNumber.parse("123.45"); // returns 123.45
|
|
1161
|
+
* numberFromStringOrNumber.parse(123.45); // returns 123.45
|
|
1162
|
+
* numberFromStringOrNumber.parse("abc"); // throws a ZodError
|
|
1163
|
+
*
|
|
1164
|
+
* @type {ZodSchema<number>}
|
|
1165
|
+
*/
|
|
1166
|
+
export const numberFromStringOrNumber = (fieldName) => z.preprocess((val) => {
|
|
1167
|
+
if (typeof val === 'string') {
|
|
1168
|
+
const parsed = parseFloat(val);
|
|
1169
|
+
return isNaN(parsed) ? undefined : parsed;
|
|
1170
|
+
}
|
|
1171
|
+
return val;
|
|
1172
|
+
}, z.number({
|
|
1173
|
+
required_error: `${fieldName} field is required.`,
|
|
1174
|
+
invalid_type_error: `${fieldName} field is required.`,
|
|
1175
|
+
}));
|
|
1176
|
+
/**
|
|
1177
|
+
* Creates a Zod schema for transforming number values to a specified decimal precision.
|
|
1178
|
+
* Transforms the number to exactly the specified decimal places without validation.
|
|
1179
|
+
* Accepts a base number schema with constraints (e.g., .positive(), .max()) and applies precision transformation.
|
|
1180
|
+
*
|
|
1181
|
+
* @param precision - The number of decimal places to enforce. Defaults to 2.
|
|
1182
|
+
* @param baseSchema - Optional base number schema with constraints. Defaults to z.number().
|
|
1183
|
+
* @returns A Zod schema that transforms numbers to the specified decimal precision.
|
|
1184
|
+
*
|
|
1185
|
+
* @example
|
|
1186
|
+
* numberPrecisionSchema(2).parse(123.456); // returns 123.46 (transformed)
|
|
1187
|
+
* numberPrecisionSchema(2).parse(123.45); // returns 123.45
|
|
1188
|
+
* numberPrecisionSchema(2).parse(123.4); // returns 123.40 (transformed)
|
|
1189
|
+
* numberPrecisionSchema(3, z.number().positive().max(1000)).parse(500.9999); // returns 501.000 (transformed)
|
|
1190
|
+
* numberPrecisionSchema(2, z.number().positive().max(1000)).parse(500.99); // returns 500.99
|
|
1191
|
+
*/
|
|
1192
|
+
export const numberPrecisionSchema = (precision = 2, baseSchema = z.number()) => baseSchema.transform((value) => {
|
|
1193
|
+
if (!isFinite(value)) {
|
|
1194
|
+
return value; // Return Infinity or -Infinity as-is
|
|
1195
|
+
}
|
|
1196
|
+
if (precision === 0) {
|
|
1197
|
+
return Math.round(value);
|
|
1198
|
+
}
|
|
1199
|
+
// Round in two steps to reduce floating-point drift:
|
|
1200
|
+
// 1) trim the value with extra precision
|
|
1201
|
+
// 2) round the trimmed value at the target precision
|
|
1202
|
+
const factor = Math.pow(10, precision);
|
|
1203
|
+
// Trim with extra precision (precision + 5) to keep enough significant digits
|
|
1204
|
+
const trimmed = parseFloat(value.toFixed(Math.min(precision + 5, 20)));
|
|
1205
|
+
// Round at target precision
|
|
1206
|
+
const rounded = Math.round(trimmed * factor) / factor;
|
|
1207
|
+
// Ensure the returned number has exact decimal places
|
|
1208
|
+
return parseFloat(rounded.toFixed(precision));
|
|
1209
|
+
});
|
|
1210
|
+
/**
|
|
1211
|
+
* Convenience function for 2 decimal precision (backward compatibility).
|
|
1212
|
+
* @deprecated Use numberPrecisionSchema(2) instead.
|
|
1213
|
+
*/
|
|
1214
|
+
export const amountPrecision2Schema = (baseSchema = z.number()) => numberPrecisionSchema(2, baseSchema);
|
|
1215
|
+
export var RetirementAccountType;
|
|
1216
|
+
(function (RetirementAccountType) {
|
|
1217
|
+
RetirementAccountType["SELF_DIRECTED"] = "SELF_DIRECTED";
|
|
1218
|
+
RetirementAccountType["CUSTODIAN_MANAGED"] = "CUSTODIAN_MANAGED";
|
|
1219
|
+
})(RetirementAccountType || (RetirementAccountType = {}));
|
|
1220
|
+
export var EmploymentStatus;
|
|
1221
|
+
(function (EmploymentStatus) {
|
|
1222
|
+
EmploymentStatus["EMPLOYED"] = "EMPLOYED";
|
|
1223
|
+
EmploymentStatus["UNEMPLOYED"] = "UNEMPLOYED";
|
|
1224
|
+
EmploymentStatus["SELF_EMPLOYED"] = "SELF_EMPLOYED";
|
|
1225
|
+
EmploymentStatus["RETIRED"] = "RETIRED";
|
|
1226
|
+
EmploymentStatus["STUDENT"] = "STUDENT";
|
|
1227
|
+
EmploymentStatus["OTHER"] = "OTHER";
|
|
1228
|
+
})(EmploymentStatus || (EmploymentStatus = {}));
|
|
1229
|
+
export const dateSchemaWithNormalization = z
|
|
1230
|
+
.string()
|
|
1231
|
+
.nullable()
|
|
1232
|
+
.transform((val) => (val ? normalizeShortDate(val) : null))
|
|
1233
|
+
.refine((val) => {
|
|
1234
|
+
if (!val)
|
|
1235
|
+
return true;
|
|
1236
|
+
const regex = /^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/\d{4}$/;
|
|
1237
|
+
return regex.test(val);
|
|
1238
|
+
}, { message: 'Date must be in MM/DD/YYYY format' })
|
|
1239
|
+
.transform((val) => (val ? parseDate(val) : null));
|
|
1240
|
+
export const DateRangeFiltersZod = z.object({
|
|
1241
|
+
from: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
1242
|
+
to: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
1243
|
+
});
|
|
1244
|
+
export const metadataSchema = z
|
|
1245
|
+
.string()
|
|
1246
|
+
.min(2)
|
|
1247
|
+
.max(600000)
|
|
1248
|
+
.refine((data) => {
|
|
1249
|
+
try {
|
|
1250
|
+
if (!data)
|
|
1251
|
+
return true;
|
|
1252
|
+
const parsedData = JSON.parse(data);
|
|
1253
|
+
if (typeof parsedData !== 'object' || parsedData === null)
|
|
1254
|
+
return false;
|
|
1255
|
+
return true;
|
|
1256
|
+
}
|
|
1257
|
+
catch (error) {
|
|
1258
|
+
return false;
|
|
1259
|
+
}
|
|
1260
|
+
}, {
|
|
1261
|
+
message: 'must be a valid JSON object.',
|
|
1262
|
+
path: [],
|
|
1263
|
+
})
|
|
1264
|
+
.transform((data) => data
|
|
1265
|
+
? { user_defined_data: JSON.parse(data), expected: JSON.parse(data) }
|
|
1266
|
+
: null);
|
|
1267
|
+
export const LogContextZod = z.object({
|
|
1268
|
+
queueName: z.string(),
|
|
1269
|
+
jobId: z.string(),
|
|
1270
|
+
jobName: z.string(),
|
|
1271
|
+
shouldAlert: z.boolean().optional(),
|
|
1272
|
+
});
|
|
1273
|
+
/**
|
|
1274
|
+
* Maps all documented Cloudflare Turnstile error codes to their corresponding HTTP status and user-friendly message.
|
|
1275
|
+
*
|
|
1276
|
+
* @see {@link https://developers.cloudflare.com/turnstile/get-started/server-side-validation/ Cloudflare Turnstile Server-side Validation}
|
|
1277
|
+
*/
|
|
1278
|
+
export const errorMap = {
|
|
1279
|
+
'missing-input-secret': {
|
|
1280
|
+
status: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
1281
|
+
message: 'Captcha server configuration is missing the secret key. Please ensure the secret key is included.',
|
|
1282
|
+
},
|
|
1283
|
+
'invalid-input-secret': {
|
|
1284
|
+
status: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
1285
|
+
message: 'Captcha server secret key is invalid or expired. Please check your secret key in the Cloudflare dashboard.',
|
|
1286
|
+
},
|
|
1287
|
+
'missing-input-response': {
|
|
1288
|
+
status: HttpStatus.BAD_REQUEST,
|
|
1289
|
+
message: 'Captcha response is missing. Please ensure the token is included and try again.',
|
|
1290
|
+
},
|
|
1291
|
+
'invalid-input-response': {
|
|
1292
|
+
status: HttpStatus.BAD_REQUEST,
|
|
1293
|
+
message: 'Captcha response is invalid, malformed, or expired. Please retry the challenge.',
|
|
1294
|
+
},
|
|
1295
|
+
'bad-request': {
|
|
1296
|
+
status: HttpStatus.BAD_REQUEST,
|
|
1297
|
+
message: 'The captcha verification request was malformed. Please check the request format and parameters.',
|
|
1298
|
+
},
|
|
1299
|
+
'timeout-or-duplicate': {
|
|
1300
|
+
status: HttpStatus.CONFLICT,
|
|
1301
|
+
message: 'Captcha token has already been validated or expired. Each token can only be used once. Please refresh and try again.',
|
|
1302
|
+
},
|
|
1303
|
+
'internal-error': {
|
|
1304
|
+
status: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
1305
|
+
message: 'An internal error occurred during captcha verification. Please retry the request.',
|
|
1306
|
+
},
|
|
1307
|
+
};
|
|
1308
|
+
export var BaseContactUsOptions;
|
|
1309
|
+
(function (BaseContactUsOptions) {
|
|
1310
|
+
BaseContactUsOptions["ISSUER"] = "ISSUER";
|
|
1311
|
+
BaseContactUsOptions["TECHNICAL_SUPPORT"] = "TECHNICAL_SUPPORT";
|
|
1312
|
+
BaseContactUsOptions["SALES"] = "SALES";
|
|
1313
|
+
BaseContactUsOptions["ACCOUNT_MANAGER"] = "ACCOUNT_MANAGER";
|
|
1314
|
+
})(BaseContactUsOptions || (BaseContactUsOptions = {}));
|
|
1315
|
+
export var SortOrder;
|
|
1316
|
+
(function (SortOrder) {
|
|
1317
|
+
SortOrder["ASC"] = "ASC";
|
|
1318
|
+
SortOrder["DESC"] = "DESC";
|
|
1319
|
+
})(SortOrder || (SortOrder = {}));
|
|
1320
|
+
export var SortBy;
|
|
1321
|
+
(function (SortBy) {
|
|
1322
|
+
SortBy["CREATED_AT"] = "created_at";
|
|
1323
|
+
SortBy["UPDATED_AT"] = "updated_at";
|
|
1324
|
+
SortBy["PLACEDAT"] = "placedAt";
|
|
1325
|
+
SortBy["NAME"] = "name";
|
|
1326
|
+
SortBy["TITLE"] = "title";
|
|
1327
|
+
SortBy["LEGAL_NAME"] = "legal_name";
|
|
1328
|
+
})(SortBy || (SortBy = {}));
|
|
1329
|
+
export var PersonaStatus;
|
|
1330
|
+
(function (PersonaStatus) {
|
|
1331
|
+
PersonaStatus["APPROVED"] = "approved";
|
|
1332
|
+
PersonaStatus["ACTIVE"] = "active";
|
|
1333
|
+
PersonaStatus["CREATED"] = "created";
|
|
1334
|
+
PersonaStatus["COMPLETED"] = "completed";
|
|
1335
|
+
PersonaStatus["DRAFT"] = "draft";
|
|
1336
|
+
PersonaStatus["DECLINED"] = "declined";
|
|
1337
|
+
PersonaStatus["EXPIRED"] = "expired";
|
|
1338
|
+
PersonaStatus["FAILED"] = "failed";
|
|
1339
|
+
PersonaStatus["NEEDS_REVIEW"] = "needs_review";
|
|
1340
|
+
PersonaStatus["PUBLISHED"] = "published";
|
|
1341
|
+
PersonaStatus["PENDING"] = "pending";
|
|
1342
|
+
PersonaStatus["REDACTED"] = "redacted";
|
|
1343
|
+
})(PersonaStatus || (PersonaStatus = {}));
|
|
1344
|
+
export var AMLProvider;
|
|
1345
|
+
(function (AMLProvider) {
|
|
1346
|
+
AMLProvider["COMPLY_ADVANTAGE"] = "ComplyAdvantage";
|
|
1347
|
+
})(AMLProvider || (AMLProvider = {}));
|
|
1348
|
+
export var ThemeFileType;
|
|
1349
|
+
(function (ThemeFileType) {
|
|
1350
|
+
ThemeFileType["LIGHT"] = "light";
|
|
1351
|
+
ThemeFileType["DARK"] = "dark";
|
|
1352
|
+
})(ThemeFileType || (ThemeFileType = {}));
|
|
1353
|
+
/**
|
|
1354
|
+
* Common timezone identifiers using IANA timezone database format.
|
|
1355
|
+
* These are the most commonly used timezones in business applications.
|
|
1356
|
+
*/
|
|
1357
|
+
export var TimeZone;
|
|
1358
|
+
(function (TimeZone) {
|
|
1359
|
+
// UTC
|
|
1360
|
+
TimeZone["UTC"] = "UTC";
|
|
1361
|
+
// North America
|
|
1362
|
+
TimeZone["PACIFIC"] = "America/Los_Angeles";
|
|
1363
|
+
TimeZone["MOUNTAIN"] = "America/Denver";
|
|
1364
|
+
TimeZone["CENTRAL"] = "America/Chicago";
|
|
1365
|
+
TimeZone["EASTERN"] = "America/New_York";
|
|
1366
|
+
// Europe
|
|
1367
|
+
TimeZone["LONDON"] = "Europe/London";
|
|
1368
|
+
TimeZone["PARIS"] = "Europe/Paris";
|
|
1369
|
+
TimeZone["BERLIN"] = "Europe/Berlin";
|
|
1370
|
+
TimeZone["ROME"] = "Europe/Rome";
|
|
1371
|
+
TimeZone["MADRID"] = "Europe/Madrid";
|
|
1372
|
+
TimeZone["AMSTERDAM"] = "Europe/Amsterdam";
|
|
1373
|
+
TimeZone["ZURICH"] = "Europe/Zurich";
|
|
1374
|
+
// Asia
|
|
1375
|
+
TimeZone["TOKYO"] = "Asia/Tokyo";
|
|
1376
|
+
TimeZone["SHANGHAI"] = "Asia/Shanghai";
|
|
1377
|
+
TimeZone["HONG_KONG"] = "Asia/Hong_Kong";
|
|
1378
|
+
TimeZone["SINGAPORE"] = "Asia/Singapore";
|
|
1379
|
+
TimeZone["MUMBAI"] = "Asia/Kolkata";
|
|
1380
|
+
TimeZone["DUBAI"] = "Asia/Dubai";
|
|
1381
|
+
// Australia
|
|
1382
|
+
TimeZone["SYDNEY"] = "Australia/Sydney";
|
|
1383
|
+
TimeZone["MELBOURNE"] = "Australia/Melbourne";
|
|
1384
|
+
// Other major business centers
|
|
1385
|
+
TimeZone["SAO_PAULO"] = "America/Sao_Paulo";
|
|
1386
|
+
TimeZone["TORONTO"] = "America/Toronto";
|
|
1387
|
+
TimeZone["VANCOUVER"] = "America/Vancouver";
|
|
1388
|
+
})(TimeZone || (TimeZone = {}));
|
|
1389
|
+
export const SenderDataZod = z.object({
|
|
1390
|
+
senderName: z.string().nullable(),
|
|
1391
|
+
senderEmail: z.string().nullable(),
|
|
1392
|
+
});
|
|
1393
|
+
export var JobState;
|
|
1394
|
+
(function (JobState) {
|
|
1395
|
+
JobState["COMPLETED"] = "completed";
|
|
1396
|
+
JobState["FAILED"] = "failed";
|
|
1397
|
+
JobState["WAITING"] = "waiting";
|
|
1398
|
+
JobState["ACTIVE"] = "active";
|
|
1399
|
+
JobState["DELAYED"] = "delayed";
|
|
1400
|
+
JobState["PRIORITIZED"] = "prioritized";
|
|
1401
|
+
JobState["WAITING_CHILDREN"] = "waiting-children";
|
|
1402
|
+
})(JobState || (JobState = {}));
|
|
1403
|
+
export const SUBJECT_TYPE_MAP = {
|
|
1404
|
+
[BulkExportType.INVESTOR_ACCOUNTS]: 'Investor Accounts',
|
|
1405
|
+
[BulkExportType.TRADES]: 'Trades',
|
|
1406
|
+
[BulkExportType.COMPLIANCE_TRADES]: 'Compliance Trades',
|
|
1407
|
+
[BulkExportType.SECONDARY_CUSTOMERS]: 'Secondary Customers',
|
|
1408
|
+
[BulkExportType.SECONDARY_TRADES]: 'Secondary Trades',
|
|
1409
|
+
};
|
|
1410
|
+
export const StringToBooleanSchema = z.preprocess((val) => val === 'true' || val === '1'
|
|
1411
|
+
? true
|
|
1412
|
+
: val === 'false' || val === '0'
|
|
1413
|
+
? false
|
|
1414
|
+
: val, z.boolean());
|
|
1415
|
+
/**
|
|
1416
|
+
* Reusable email schema that validates email format, transforms to lowercase,
|
|
1417
|
+
* and includes OpenAPI metadata.
|
|
1418
|
+
*
|
|
1419
|
+
* @example
|
|
1420
|
+
* EmailSchema.parse('John.Doe@EXAMPLE.COM'); // returns 'john.doe@example.com'
|
|
1421
|
+
* EmailSchema.optional().parse(undefined); // returns undefined
|
|
1422
|
+
*/
|
|
1423
|
+
export const EmailSchema = z
|
|
1424
|
+
.string()
|
|
1425
|
+
.email()
|
|
1426
|
+
.transform((val) => val.toLowerCase())
|
|
1427
|
+
.openapi({
|
|
1428
|
+
example: 'neil@dalmoregroup.com',
|
|
1429
|
+
});
|
|
1430
|
+
//# sourceMappingURL=common.types.js.map
|