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