@dalmore/api-contracts 0.0.0-dev.5e42638 → 0.0.0-dev.64aba85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/helpers/index.d.ts +50 -0
- package/common/helpers/index.js +136 -0
- package/common/helpers/index.js.map +1 -0
- package/common/types/account-contact.types.d.ts +485 -0
- package/common/types/account-contact.types.js +75 -0
- package/common/types/account-contact.types.js.map +1 -0
- package/common/types/account-detail.types.d.ts +304 -0
- package/common/types/account-detail.types.js +20 -0
- package/common/types/account-detail.types.js.map +1 -0
- package/common/types/account-integration.types.d.ts +242 -0
- package/common/types/account-integration.types.js +121 -0
- package/common/types/account-integration.types.js.map +1 -0
- package/common/types/account-manager.types.d.ts +917 -0
- package/common/types/account-manager.types.js +89 -0
- package/common/types/account-manager.types.js.map +1 -0
- package/common/types/account-setting.types.d.ts +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 +581 -0
- package/common/types/activity.types.js +247 -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 +1186 -0
- package/common/types/asset.types.js +429 -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 +1021 -0
- package/common/types/bonus-tier.types.js +167 -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 +1512 -0
- package/common/types/common.types.js +1442 -0
- package/common/types/common.types.js.map +1 -0
- package/common/types/comply-advantage-api.types.d.ts +3626 -0
- package/common/types/comply-advantage-api.types.js +291 -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 +3090 -0
- package/common/types/disbursements.types.js +345 -0
- package/common/types/disbursements.types.js.map +1 -0
- package/common/types/domain-filter.types.d.ts +135 -0
- package/common/types/domain-filter.types.js +40 -0
- package/common/types/domain-filter.types.js.map +1 -0
- package/common/types/email-theme.types.d.ts +1359 -0
- package/common/types/email-theme.types.js +318 -0
- package/common/types/email-theme.types.js.map +1 -0
- package/common/types/entity.types.d.ts +21 -0
- package/common/types/entity.types.js +14 -0
- package/common/types/entity.types.js.map +1 -0
- package/common/types/error-responses.types.d.ts +144 -0
- package/common/types/error-responses.types.js +125 -0
- package/common/types/error-responses.types.js.map +1 -0
- package/common/types/escrow-account.types.d.ts +398 -0
- package/common/types/escrow-account.types.js +75 -0
- package/common/types/escrow-account.types.js.map +1 -0
- package/common/types/exchange-api-key.types.d.ts +1010 -0
- package/common/types/exchange-api-key.types.js +90 -0
- package/common/types/exchange-api-key.types.js.map +1 -0
- package/common/types/exchange-import.types.d.ts +23 -0
- package/common/types/exchange-import.types.js +23 -0
- package/common/types/exchange-import.types.js.map +1 -0
- package/common/types/exchange-provider.types.d.ts +1308 -0
- package/common/types/exchange-provider.types.js +268 -0
- package/common/types/exchange-provider.types.js.map +1 -0
- package/common/types/file.types.d.ts +401 -0
- package/common/types/file.types.js +378 -0
- package/common/types/file.types.js.map +1 -0
- package/common/types/health.types.d.ts +112 -0
- package/common/types/health.types.js +22 -0
- package/common/types/health.types.js.map +1 -0
- package/common/types/i-will-do-it-later.types.d.ts +51 -0
- package/common/types/i-will-do-it-later.types.js +30 -0
- package/common/types/i-will-do-it-later.types.js.map +1 -0
- package/common/types/{index.ts → index.d.ts} +3 -3
- package/common/types/index.js +52 -0
- package/common/types/index.js.map +1 -0
- package/common/types/individuals.types.d.ts +1899 -0
- package/common/types/individuals.types.js +500 -0
- package/common/types/individuals.types.js.map +1 -0
- package/common/types/investor-account.types.d.ts +2996 -0
- package/common/types/investor-account.types.js +930 -0
- package/common/types/investor-account.types.js.map +1 -0
- package/common/types/investorAccountIdSchema.type.js +1 -0
- package/common/types/investorAccountIdSchema.type.js.map +1 -0
- package/common/types/investors-offering.types.d.ts +391 -0
- package/common/types/investors-offering.types.js +49 -0
- package/common/types/investors-offering.types.js.map +1 -0
- package/common/types/invite.types.d.ts +641 -0
- package/common/types/invite.types.js +113 -0
- package/common/types/invite.types.js.map +1 -0
- package/common/types/issuer-bank-account.types.d.ts +385 -0
- package/common/types/issuer-bank-account.types.js +81 -0
- package/common/types/issuer-bank-account.types.js.map +1 -0
- package/common/types/issuer-offering.types.d.ts +1509 -0
- package/common/types/issuer-offering.types.js +413 -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 +2555 -0
- package/common/types/offering.types.js +574 -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 +1496 -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 +454 -0
- package/common/types/transaction.types.js +174 -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 +1116 -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 +12786 -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 +983 -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 +15 -15
- package/common/helpers/index.ts +0 -59
- package/common/types/account-contact.types.ts +0 -99
- package/common/types/account-detail.types.ts +0 -27
- package/common/types/account-integration.types.ts +0 -143
- package/common/types/account-manager.types.ts +0 -120
- package/common/types/account-setting.types.ts +0 -65
- package/common/types/account.types.ts +0 -297
- package/common/types/activity.types.ts +0 -274
- package/common/types/address.types.ts +0 -41
- package/common/types/aic.types.ts +0 -246
- package/common/types/aml.types.ts +0 -18
- package/common/types/api-key-logs.types.ts +0 -66
- package/common/types/api-keys.types.ts +0 -69
- package/common/types/asset.types.ts +0 -338
- package/common/types/auth.types.ts +0 -359
- package/common/types/batch-jobs.types.ts +0 -151
- package/common/types/bonus-tier.types.ts +0 -180
- package/common/types/cart.types.ts +0 -21
- package/common/types/checklist-items.types.ts +0 -70
- package/common/types/checklist.types.ts +0 -97
- package/common/types/common.types.ts +0 -1552
- package/common/types/comply-advantage-api.types.ts +0 -316
- package/common/types/comply-advantage.types.ts +0 -25
- package/common/types/contact-us.types.ts +0 -111
- package/common/types/countries.types.ts +0 -375
- package/common/types/covered-person.types.ts +0 -275
- package/common/types/dashboard.types.ts +0 -792
- package/common/types/data-record.types.ts +0 -325
- package/common/types/data-room.types.ts +0 -242
- package/common/types/default-theme-config.types.ts +0 -87
- package/common/types/disbursement-adjustment.types.ts +0 -32
- package/common/types/disbursement-approval-user.types.ts +0 -100
- package/common/types/disbursement-review.types.ts +0 -110
- package/common/types/disbursement-transaction.types.ts +0 -72
- package/common/types/disbursements.types.ts +0 -426
- package/common/types/domain-filter.types.ts +0 -55
- package/common/types/email-theme.types.ts +0 -442
- package/common/types/entity.types.ts +0 -15
- package/common/types/error-responses.types.ts +0 -135
- package/common/types/escrow-account.types.ts +0 -104
- package/common/types/exchange-api-key.types.ts +0 -121
- package/common/types/exchange-import.types.ts +0 -36
- package/common/types/exchange-provider.types.ts +0 -329
- package/common/types/file.types.ts +0 -477
- package/common/types/health.types.ts +0 -29
- package/common/types/i-will-do-it-later.types.ts +0 -68
- package/common/types/individuals.types.ts +0 -542
- package/common/types/investor-account.types.ts +0 -1240
- package/common/types/investors-offering.types.ts +0 -65
- package/common/types/invite.types.ts +0 -159
- package/common/types/issuer-bank-account.types.ts +0 -107
- package/common/types/issuer-offering.types.ts +0 -389
- package/common/types/issuer-payment-method.types.ts +0 -382
- package/common/types/issuer.types.ts +0 -321
- package/common/types/job-item.types.ts +0 -119
- package/common/types/jobs.types.ts +0 -171
- package/common/types/kyb.types.ts +0 -53
- package/common/types/kyc.types.ts +0 -188
- package/common/types/legal-entity.types.ts +0 -186
- package/common/types/login-history.types.ts +0 -46
- package/common/types/mail-template.types.ts +0 -470
- package/common/types/north-cap-integration.types.ts +0 -190
- package/common/types/note.types.ts +0 -109
- package/common/types/notification.types.ts +0 -554
- package/common/types/notion-api.types.ts +0 -374
- package/common/types/notion-database.types.ts +0 -125
- package/common/types/notion-page.types.ts +0 -267
- package/common/types/offering-reports.types.ts +0 -153
- package/common/types/offering-submission.types.ts +0 -314
- package/common/types/offering.types.ts +0 -676
- package/common/types/page-revision.types.ts +0 -86
- package/common/types/page.types.ts +0 -436
- package/common/types/password.type.ts +0 -15
- package/common/types/payment-methods.types.ts +0 -298
- package/common/types/phone.type.ts +0 -27
- package/common/types/portfolio.types.ts +0 -50
- package/common/types/queue.types.ts +0 -112
- package/common/types/registered-reps.types.ts +0 -25
- package/common/types/rejection-reasons.types.ts +0 -56
- package/common/types/reminder-config.types.ts +0 -40
- package/common/types/review.types.ts +0 -133
- package/common/types/role.types.ts +0 -26
- package/common/types/secondary-customer.types.ts +0 -66
- package/common/types/secondary-issuer.types.ts +0 -50
- package/common/types/secondary-order.types.ts +0 -58
- package/common/types/secondary-security.types.ts +0 -60
- package/common/types/secondary-trade.entity.ts +0 -16
- package/common/types/secondary-trade.types.ts +0 -95
- package/common/types/secure-request.types.ts +0 -68
- package/common/types/signer.types.ts +0 -651
- package/common/types/site-link.types.ts +0 -166
- package/common/types/site-settings.types.ts +0 -727
- package/common/types/site.types.ts +0 -263
- package/common/types/sms.types.ts +0 -30
- package/common/types/state-machine.types.ts +0 -177
- package/common/types/states.types.ts +0 -163
- package/common/types/subdoc-preview.types.ts +0 -35
- package/common/types/task.types.ts +0 -258
- package/common/types/trade-adjustment.type.ts +0 -33
- package/common/types/trade-line-item.types.ts +0 -125
- package/common/types/trade.types.ts +0 -1045
- package/common/types/transaction.types.ts +0 -209
- package/common/types/trusted-contact.types.ts +0 -122
- package/common/types/typography.types.ts +0 -75
- package/common/types/user-manual.types.ts +0 -290
- package/common/types/user-setting.types.ts +0 -133
- package/common/types/user.types.ts +0 -304
- package/common/types/webhook.types.ts +0 -730
- package/common/types/zip.type.ts +0 -36
- package/contracts/clients/accounts/index.ts +0 -61
- package/contracts/clients/aic/index.ts +0 -59
- package/contracts/clients/api-key-logs/index.ts +0 -53
- package/contracts/clients/api-keys/index.ts +0 -73
- package/contracts/clients/assets/index.ts +0 -102
- package/contracts/clients/auth/index.ts +0 -50
- package/contracts/clients/cart/index.ts +0 -80
- package/contracts/clients/files/index.ts +0 -166
- package/contracts/clients/files-public/index.ts +0 -166
- package/contracts/clients/index.ts +0 -54
- package/contracts/clients/individuals/index.ts +0 -93
- package/contracts/clients/investor-accounts/index.ts +0 -93
- package/contracts/clients/issuer-payment-methods/index.ts +0 -39
- package/contracts/clients/issuers/index.ts +0 -94
- package/contracts/clients/legal-entities/index.ts +0 -93
- package/contracts/clients/offerings/index.ts +0 -117
- package/contracts/clients/payment-methods/index.ts +0 -85
- package/contracts/clients/secure-requests/index.ts +0 -34
- package/contracts/clients/sites/index.ts +0 -56
- package/contracts/clients/trade-line-items/index.ts +0 -66
- package/contracts/clients/trades/index.ts +0 -186
- package/contracts/clients/transactions/index.ts +0 -37
- package/index.ts +0 -10
- /package/common/types/{investorAccountIdSchema.type.ts → investorAccountIdSchema.type.d.ts} +0 -0
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IBaseEntity } from './entity.types.js';
|
|
3
|
+
import { AccountZod, AicStatus, AMLStatus, BaseStatus, dateSchema, InvestorAccountType, IPaginationMeta, KYBStatus, KYCDocumentType, KYCStatus, numberFromStringOrNumber, RetirementAccountType, SetupStatusType, TradeType, TradeStatus, EmploymentStatus, dateSchemaWithNormalization, UserType, PaginationOptionsZod, SourceOfIncome, SortBy, SortOrder, AMLProvider, EmailSchema, } from './common.types.js';
|
|
4
|
+
import { accountIdSchema } from './account.types.js';
|
|
5
|
+
import { SaStatus, tradeIdSchema, TradeZod } from './trade.types.js';
|
|
6
|
+
import { legalEntityIdSchema, LegalEntityZod } from './legal-entity.types.js';
|
|
7
|
+
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
8
|
+
import { offeringIdSchema } from './offering.types.js';
|
|
9
|
+
import { userIdSchema, UserZod } from './user.types.js';
|
|
10
|
+
import { IIndividualZod, individualIdSchema } from './individuals.types.js';
|
|
11
|
+
import { TypeID } from 'typeid-js';
|
|
12
|
+
import { ErrorResponseZod } from './common.types.js';
|
|
13
|
+
import { PhoneZodSchema } from './phone.type.js';
|
|
14
|
+
import { RequiredAddressSchema } from './address.types.js';
|
|
15
|
+
import { PaymentMethodType } from './payment-methods.types.js';
|
|
16
|
+
import { TransactionStatus } from './transaction.types.js';
|
|
17
|
+
import { CanadaProvinceCode, StateCode } from './states.types.js';
|
|
18
|
+
import { refineAddressZip } from './zip.type.js';
|
|
19
|
+
import { CountryCode } from './countries.types.js';
|
|
20
|
+
extendZodWithOpenApi(z);
|
|
21
|
+
export const investorAccountIdSchema = z.string().refine((value) => {
|
|
22
|
+
try {
|
|
23
|
+
const tid = TypeID.fromString(value);
|
|
24
|
+
return tid.getType() === 'investor_account';
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
message: 'Invalid investor_account ID format. Must be a valid TypeID with "investor_account" prefix.',
|
|
31
|
+
});
|
|
32
|
+
export var AccreditationVerificationRequestStatus;
|
|
33
|
+
(function (AccreditationVerificationRequestStatus) {
|
|
34
|
+
AccreditationVerificationRequestStatus["PENDING"] = "PENDING";
|
|
35
|
+
AccreditationVerificationRequestStatus["APPROVED"] = "APPROVED";
|
|
36
|
+
AccreditationVerificationRequestStatus["DECLINED"] = "DECLINED";
|
|
37
|
+
})(AccreditationVerificationRequestStatus || (AccreditationVerificationRequestStatus = {}));
|
|
38
|
+
export const IInvestorAccount = IBaseEntity.extend({
|
|
39
|
+
tid: z.string().nullable(),
|
|
40
|
+
investorAccountType: z.nativeEnum(InvestorAccountType),
|
|
41
|
+
user: z.lazy(() => UserZod.nullish()),
|
|
42
|
+
userId: z.string().optional().nullable(),
|
|
43
|
+
email: z.string().email().optional().nullable(),
|
|
44
|
+
name: z.string().optional().nullable(),
|
|
45
|
+
regAQualified: z.boolean(),
|
|
46
|
+
regCfQualified: z.boolean(),
|
|
47
|
+
regDQualified: z.boolean(),
|
|
48
|
+
accountId: z.string(),
|
|
49
|
+
account: z.lazy(() => AccountZod).optional(),
|
|
50
|
+
trades: z.array(z.lazy(() => TradeZod)).optional(),
|
|
51
|
+
individuals: z.array(z.lazy(() => IIndividualZod)).optional(), // circular dependency requires lazy
|
|
52
|
+
legalEntities: z.array(z.lazy(() => LegalEntityZod)).optional(),
|
|
53
|
+
setupStatus: z.nativeEnum(SetupStatusType),
|
|
54
|
+
systemReviewLog: z.string().nullable(),
|
|
55
|
+
totalAmount: z.number().optional(),
|
|
56
|
+
statusCheck: z.lazy(() => InvestorStatusCheckZod).optional(),
|
|
57
|
+
});
|
|
58
|
+
export const IInvestorAccountSummary = z.object({
|
|
59
|
+
liquidNetWorth: z.number(),
|
|
60
|
+
householdNetWorth: z.number(),
|
|
61
|
+
currentAnnualIncome: z.number(),
|
|
62
|
+
currentHouseholdIncome: z.number(),
|
|
63
|
+
totalInvestments: z.number(),
|
|
64
|
+
totalPending: z.number(),
|
|
65
|
+
concentrationLiquidNetWorth: z.number(),
|
|
66
|
+
concentrationTotalNetWorth: z.number(),
|
|
67
|
+
postTradeConcentration: z.number().optional(),
|
|
68
|
+
});
|
|
69
|
+
export const InvestorUpdatePathParamsSchema = z.object({
|
|
70
|
+
id: z.lazy(() => investorAccountIdSchema),
|
|
71
|
+
});
|
|
72
|
+
export const PostInvestorAccountBodySchema = z.object({
|
|
73
|
+
investorAccountType: z.nativeEnum(InvestorAccountType),
|
|
74
|
+
name: z.string().optional(),
|
|
75
|
+
});
|
|
76
|
+
export const PostClientInvestorAccountBodySchema = z.object({
|
|
77
|
+
investorAccountType: z.nativeEnum(InvestorAccountType),
|
|
78
|
+
email: z.string().email().optional(),
|
|
79
|
+
name: z.string().min(1).max(100).optional(),
|
|
80
|
+
tid: z.string().optional(),
|
|
81
|
+
userId: z.lazy(() => {
|
|
82
|
+
return userIdSchema;
|
|
83
|
+
}),
|
|
84
|
+
});
|
|
85
|
+
export const UpdateInvestorAccountBodySchema = z.object({
|
|
86
|
+
name: z.string().optional(),
|
|
87
|
+
email: EmailSchema.optional(),
|
|
88
|
+
});
|
|
89
|
+
export const IPaginatedInvestorAccounts = z.object({
|
|
90
|
+
items: z.array(IInvestorAccount),
|
|
91
|
+
meta: IPaginationMeta,
|
|
92
|
+
});
|
|
93
|
+
const investorAccountsInclude = z.enum([
|
|
94
|
+
'account',
|
|
95
|
+
'trades',
|
|
96
|
+
'individuals',
|
|
97
|
+
'legalEntities',
|
|
98
|
+
'trustedContacts',
|
|
99
|
+
]);
|
|
100
|
+
export const InvestorAccountsFiltersZod = z.object({
|
|
101
|
+
investorAccountType: z.nativeEnum(InvestorAccountType).optional(),
|
|
102
|
+
kycStatus: z.nativeEnum(KYCStatus).optional(),
|
|
103
|
+
kybStatus: z.nativeEnum(KYBStatus).optional(),
|
|
104
|
+
amlStatus: z.nativeEnum(AMLStatus).optional(),
|
|
105
|
+
aicStatus: z.nativeEnum(AicStatus).optional(),
|
|
106
|
+
offeringId: z.lazy(() => offeringIdSchema).optional(),
|
|
107
|
+
regAQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
108
|
+
? true
|
|
109
|
+
: val === 'false' || val === '0'
|
|
110
|
+
? false
|
|
111
|
+
: val, z.boolean().optional()),
|
|
112
|
+
regCfQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
113
|
+
? true
|
|
114
|
+
: val === 'false' || val === '0'
|
|
115
|
+
? false
|
|
116
|
+
: val, z.boolean().optional()),
|
|
117
|
+
regDQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
118
|
+
? true
|
|
119
|
+
: val === 'false' || val === '0'
|
|
120
|
+
? false
|
|
121
|
+
: val, z.boolean().optional()),
|
|
122
|
+
email: z.string().optional(),
|
|
123
|
+
accountId: accountIdSchema.optional(),
|
|
124
|
+
userType: z.nativeEnum(UserType).optional(),
|
|
125
|
+
startDate: dateSchema.optional(),
|
|
126
|
+
endDate: dateSchema.optional(),
|
|
127
|
+
userId: z.string().optional(),
|
|
128
|
+
});
|
|
129
|
+
export const InvestorAccountsSortZod = z.object({
|
|
130
|
+
sort: z.enum([SortBy.NAME, SortBy.CREATED_AT, SortBy.UPDATED_AT]).optional(),
|
|
131
|
+
dir: z.nativeEnum(SortOrder).optional(),
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* @description Query parameters for including related entities
|
|
135
|
+
* @xample in contract us as -> query: z.object({}).merge(UsersIncludeQuery),
|
|
136
|
+
*/
|
|
137
|
+
export const InvestorAccountsIncludeQuery = z.object({
|
|
138
|
+
include: z
|
|
139
|
+
.string()
|
|
140
|
+
.optional()
|
|
141
|
+
.transform((str) => (str ? str.split(',') : []))
|
|
142
|
+
.refine((includes) => includes.every((include) => investorAccountsInclude.options.includes(include)), {
|
|
143
|
+
message: `Invalid include option provided. Valid options are: ${investorAccountsInclude.options.join(',')}`,
|
|
144
|
+
})
|
|
145
|
+
.openapi({
|
|
146
|
+
example: `${investorAccountsInclude.options.join(',')}`,
|
|
147
|
+
}),
|
|
148
|
+
});
|
|
149
|
+
export const IssuerInvestorAccountsFiltersZod = z.object({
|
|
150
|
+
userType: z.nativeEnum(UserType).optional(),
|
|
151
|
+
investorAccountType: z.nativeEnum(InvestorAccountType).optional(),
|
|
152
|
+
kycStatus: z.nativeEnum(KYCStatus).optional(),
|
|
153
|
+
kybStatus: z.nativeEnum(KYBStatus).optional(),
|
|
154
|
+
amlStatus: z.nativeEnum(AMLStatus).optional(),
|
|
155
|
+
aicStatus: z.nativeEnum(AicStatus).optional(),
|
|
156
|
+
offeringId: z.lazy(() => offeringIdSchema).optional(),
|
|
157
|
+
regAQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
158
|
+
? true
|
|
159
|
+
: val === 'false' || val === '0'
|
|
160
|
+
? false
|
|
161
|
+
: val, z.boolean().optional()),
|
|
162
|
+
regCfQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
163
|
+
? true
|
|
164
|
+
: val === 'false' || val === '0'
|
|
165
|
+
? false
|
|
166
|
+
: val, z.boolean().optional()),
|
|
167
|
+
regDQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
168
|
+
? true
|
|
169
|
+
: val === 'false' || val === '0'
|
|
170
|
+
? false
|
|
171
|
+
: val, z.boolean().optional()),
|
|
172
|
+
email: z.string().optional(),
|
|
173
|
+
startDate: dateSchema.optional(),
|
|
174
|
+
endDate: dateSchema.optional(),
|
|
175
|
+
userId: z.string().optional(),
|
|
176
|
+
});
|
|
177
|
+
export const InvestorAccountsFilters = z.object({
|
|
178
|
+
investorAccountType: z.nativeEnum(InvestorAccountType).optional(),
|
|
179
|
+
regAQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
180
|
+
? true
|
|
181
|
+
: val === 'false' || val === '0'
|
|
182
|
+
? false
|
|
183
|
+
: val, z.boolean().optional()),
|
|
184
|
+
regCfQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
185
|
+
? true
|
|
186
|
+
: val === 'false' || val === '0'
|
|
187
|
+
? false
|
|
188
|
+
: val, z.boolean().optional()),
|
|
189
|
+
regDQualified: z.preprocess((val) => val === 'true' || val === '1'
|
|
190
|
+
? true
|
|
191
|
+
: val === 'false' || val === '0'
|
|
192
|
+
? false
|
|
193
|
+
: val, z.boolean().optional()),
|
|
194
|
+
withPortfolio: z.preprocess((val) => val === 'true' || val === '1'
|
|
195
|
+
? true
|
|
196
|
+
: val === 'false' || val === '0'
|
|
197
|
+
? false
|
|
198
|
+
: val, z.boolean().optional()),
|
|
199
|
+
});
|
|
200
|
+
export const InvestorAccountExportFilters = IssuerInvestorAccountsFiltersZod.extend({
|
|
201
|
+
startDate: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
202
|
+
endDate: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
203
|
+
});
|
|
204
|
+
export const ComplianceInvestorAccountExportFilters = InvestorAccountsFiltersZod.extend({
|
|
205
|
+
startDate: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
206
|
+
endDate: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
207
|
+
}).merge(InvestorAccountsSortZod);
|
|
208
|
+
export const AmlReviewDetailsZod = z.object({
|
|
209
|
+
firstName: z.string(),
|
|
210
|
+
lastName: z.string().nullable(),
|
|
211
|
+
tid: z.string().nullable(),
|
|
212
|
+
provider: z.nativeEnum(AMLProvider).nullable(),
|
|
213
|
+
dashboardLink: z.string().nullable(),
|
|
214
|
+
reportLink: z.string().nullable(),
|
|
215
|
+
reviewedBy: z.lazy(() => UserZod.nullable()),
|
|
216
|
+
reviewedStatus: z.nativeEnum(AMLStatus),
|
|
217
|
+
reviewedAt: z.date().nullable(),
|
|
218
|
+
});
|
|
219
|
+
export const KycReviewDetailsZod = z.object({
|
|
220
|
+
firstName: z.string().nullable(),
|
|
221
|
+
lastName: z.string().nullable(),
|
|
222
|
+
documentType: z.string(),
|
|
223
|
+
documentIssuer: z.string().nullable(),
|
|
224
|
+
documentNumber: z.string().nullable(),
|
|
225
|
+
issuedDate: z.string().nullable(),
|
|
226
|
+
expiredDate: z.string().nullable(),
|
|
227
|
+
reviewedBy: z.lazy(() => UserZod.nullable()),
|
|
228
|
+
reviewedStatus: z.nativeEnum(KYCStatus),
|
|
229
|
+
});
|
|
230
|
+
export const AicReviewDetailsZod = z.object({
|
|
231
|
+
accreditationType: z.string(),
|
|
232
|
+
expirationDate: z.date().nullable(),
|
|
233
|
+
});
|
|
234
|
+
export var InvestorAccountDetailsType;
|
|
235
|
+
(function (InvestorAccountDetailsType) {
|
|
236
|
+
InvestorAccountDetailsType["AML"] = "AML";
|
|
237
|
+
InvestorAccountDetailsType["KYC"] = "KYC";
|
|
238
|
+
InvestorAccountDetailsType["AIC"] = "AIC";
|
|
239
|
+
})(InvestorAccountDetailsType || (InvestorAccountDetailsType = {}));
|
|
240
|
+
export const GetInvestorAccountDetailsQuery = z.object({
|
|
241
|
+
type: z.nativeEnum(InvestorAccountDetailsType),
|
|
242
|
+
individualId: z.lazy(() => individualIdSchema),
|
|
243
|
+
});
|
|
244
|
+
export const RegisteredInvestorUserZod = z.object({
|
|
245
|
+
id: z.string(),
|
|
246
|
+
email: z.string().email(),
|
|
247
|
+
name: z.string(),
|
|
248
|
+
userType: z.nativeEnum(UserType).nullable(),
|
|
249
|
+
numberOfTrades: z.number().default(0),
|
|
250
|
+
invested: z.number().default(0),
|
|
251
|
+
createdAt: z.date(),
|
|
252
|
+
});
|
|
253
|
+
export const IPaginatedRegisteredInvestorUserZod = z.object({
|
|
254
|
+
items: z.array(RegisteredInvestorUserZod),
|
|
255
|
+
meta: IPaginationMeta,
|
|
256
|
+
});
|
|
257
|
+
/**
|
|
258
|
+
* Schema for raw query result from queryRegisteredInvestorUsers
|
|
259
|
+
* Matches the structure returned by getRawMany() with JSON aggregations.
|
|
260
|
+
* PostgreSQL/TypeORM automatically parses JSON fields, so they come as arrays.
|
|
261
|
+
*/
|
|
262
|
+
const IndividualAggregationZod = z.object({
|
|
263
|
+
id: z.lazy(() => individualIdSchema),
|
|
264
|
+
phone: z.lazy(() => PhoneZodSchema),
|
|
265
|
+
firstName: z.string().nullable(),
|
|
266
|
+
lastName: z.string().nullable(),
|
|
267
|
+
});
|
|
268
|
+
const LegalEntityAggregationZod = z.object({
|
|
269
|
+
id: z.lazy(() => legalEntityIdSchema),
|
|
270
|
+
phone: z.lazy(() => PhoneZodSchema),
|
|
271
|
+
name: z.string().nullable(),
|
|
272
|
+
});
|
|
273
|
+
export const RegisteredInvestorUserRawZod = z.object({
|
|
274
|
+
id: z.lazy(() => userIdSchema),
|
|
275
|
+
name: z.string(),
|
|
276
|
+
email: z.string().email(),
|
|
277
|
+
investorAccountType: z.nativeEnum(InvestorAccountType).nullable(),
|
|
278
|
+
numberOfTrades: z.coerce.number().default(0),
|
|
279
|
+
invested: z.coerce.number().default(0),
|
|
280
|
+
createdAt: z.coerce.date(),
|
|
281
|
+
type: z.nativeEnum(UserType).nullable(),
|
|
282
|
+
investorAccountId: z.string().nullable(),
|
|
283
|
+
individuals: z.array(IndividualAggregationZod),
|
|
284
|
+
legalEntities: z.array(LegalEntityAggregationZod),
|
|
285
|
+
});
|
|
286
|
+
export const RegisteredInvestorUserFiltersZod = z.object({
|
|
287
|
+
search: z.string().optional().openapi({ example: 'John Doe' }),
|
|
288
|
+
startDate: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
289
|
+
endDate: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
290
|
+
userType: z
|
|
291
|
+
.nativeEnum(UserType)
|
|
292
|
+
.optional()
|
|
293
|
+
.openapi({ example: UserType.INVESTOR }),
|
|
294
|
+
});
|
|
295
|
+
export const ExportInvestorAccountsResponse = z.object({
|
|
296
|
+
message: z.string(),
|
|
297
|
+
});
|
|
298
|
+
export const IndividualsValidationResponseZod = z.object({
|
|
299
|
+
errors: ErrorResponseZod,
|
|
300
|
+
regDFieldStatus: z.boolean(),
|
|
301
|
+
});
|
|
302
|
+
export const BaseIndividualValidationSchemaZod = z
|
|
303
|
+
.object({
|
|
304
|
+
lastName: z.string({ message: 'Last Name is required' }),
|
|
305
|
+
firstName: z.string({ message: 'First Name is required' }),
|
|
306
|
+
dob: z.coerce.date({ required_error: 'Date of Birth is required' }),
|
|
307
|
+
phone: PhoneZodSchema,
|
|
308
|
+
email: z.string().email('Email is required'),
|
|
309
|
+
ownership: numberFromStringOrNumber('Ownership').pipe(z.number().min(0, { message: 'Ownership is required' })),
|
|
310
|
+
liquidNetWorth: numberFromStringOrNumber('Liquid Net Worth').pipe(z.number().min(0, { message: 'Liquid Net Worth is required' })),
|
|
311
|
+
currentAnnualIncome: numberFromStringOrNumber('Current Annual Income').pipe(z.number().min(0, { message: 'Current Annual Income is required' })),
|
|
312
|
+
employerName: z.string().nullable().optional(),
|
|
313
|
+
sourceOfIncome: z.nativeEnum(SourceOfIncome, {
|
|
314
|
+
message: 'Source of Income is required',
|
|
315
|
+
}),
|
|
316
|
+
kycDocumentType: z.nativeEnum(KYCDocumentType, {
|
|
317
|
+
required_error: 'KYC Document Type is required',
|
|
318
|
+
}),
|
|
319
|
+
kycDocumentIssuer: z.string({ message: 'KYC Document Issuer is required' }),
|
|
320
|
+
kycExpirationDate: z.coerce.date({
|
|
321
|
+
required_error: 'KYC Expiration Date is required',
|
|
322
|
+
}),
|
|
323
|
+
kycIssuerDate: z.coerce.date({
|
|
324
|
+
required_error: 'KYC Issuer Date is required',
|
|
325
|
+
}),
|
|
326
|
+
kycDocumentNumber: z.string({ message: 'KYC Document Number is required' }),
|
|
327
|
+
kycStatus: z.nativeEnum(KYCStatus, {
|
|
328
|
+
required_error: 'KYC Status is required',
|
|
329
|
+
}),
|
|
330
|
+
kycProvider: z.string({ message: 'KYC Provider is required' }),
|
|
331
|
+
kycTid: z.string({ message: 'KYC TID is required' }),
|
|
332
|
+
})
|
|
333
|
+
.and(RequiredAddressSchema)
|
|
334
|
+
.superRefine((data, ctx) => {
|
|
335
|
+
if (data.sourceOfIncome === SourceOfIncome.EMPLOYED) {
|
|
336
|
+
if (!data.employerName || (typeof data.employerName === 'string' && data.employerName.trim() === '')) {
|
|
337
|
+
ctx.addIssue({
|
|
338
|
+
code: z.ZodIssueCode.custom,
|
|
339
|
+
message: 'Employer Name is required when Source of Income is Employed',
|
|
340
|
+
path: ['employerName'],
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
// Schema for US citizens or green card holders
|
|
346
|
+
export const UsCitizenSchemaZod = z.object({
|
|
347
|
+
ssn: z
|
|
348
|
+
.string()
|
|
349
|
+
.min(1, 'SSN is required for US citizens or green card holders')
|
|
350
|
+
.regex(/^(\d{3}-\d{2}-\d{4}|\d{9})$/, 'SSN must be 9 digits'),
|
|
351
|
+
});
|
|
352
|
+
// Schema for custodian managed retirement accounts
|
|
353
|
+
export const CustodianManagedRetirementSchemaZod = z.object({
|
|
354
|
+
retirementAccountType: z.nativeEnum(RetirementAccountType, {
|
|
355
|
+
required_error: 'Retirement Account Type is required',
|
|
356
|
+
}),
|
|
357
|
+
custodianName: z.string().min(1, 'Custodian Name is required'),
|
|
358
|
+
custodianAccountNumber: z
|
|
359
|
+
.string()
|
|
360
|
+
.min(1, 'Custodian Account Number is required'),
|
|
361
|
+
custodianRepresentativeName: z
|
|
362
|
+
.string()
|
|
363
|
+
.min(1, 'Custodian Representative Name is required'),
|
|
364
|
+
custodianEmail: z.string().email('Custodian Email is required'),
|
|
365
|
+
});
|
|
366
|
+
export const SystemReviewLogZod = z.object({
|
|
367
|
+
regA: ErrorResponseZod,
|
|
368
|
+
regCf: ErrorResponseZod,
|
|
369
|
+
regD: ErrorResponseZod,
|
|
370
|
+
});
|
|
371
|
+
export var SeedType;
|
|
372
|
+
(function (SeedType) {
|
|
373
|
+
SeedType["SYSTEM"] = "SYSTEM";
|
|
374
|
+
SeedType["EXTERNAL"] = "EXTERNAL";
|
|
375
|
+
})(SeedType || (SeedType = {}));
|
|
376
|
+
export const SeedInvestorAccountsForDemoUsersZod = z.object({
|
|
377
|
+
accountId: z.lazy(() => accountIdSchema),
|
|
378
|
+
seedType: z.nativeEnum(SeedType),
|
|
379
|
+
});
|
|
380
|
+
export const SeedTradeCsvRowZod = z.object({
|
|
381
|
+
id: z.lazy(() => tradeIdSchema),
|
|
382
|
+
tradeType: z.nativeEnum(TradeType).openapi({ example: TradeType.PURCHASE }),
|
|
383
|
+
issuer: z.string(),
|
|
384
|
+
offering: z.string(),
|
|
385
|
+
asset: z.string(),
|
|
386
|
+
numberOfShares: numberFromStringOrNumber('Number of Shares').pipe(z.number().int().min(1, { message: 'Number of Shares is required' })),
|
|
387
|
+
pricePerShare: numberFromStringOrNumber('Price Per Share').pipe(z.number().min(0, { message: 'Price Per Share is required' })),
|
|
388
|
+
totalAmount: numberFromStringOrNumber('Total Amount').pipe(z.number().min(0, { message: 'Total Amount is required' })),
|
|
389
|
+
tradeStatus: z.nativeEnum(TradeStatus).openapi({ example: TradeStatus.CART }),
|
|
390
|
+
placedAt: z.coerce.date(),
|
|
391
|
+
ip: z.string().ip(),
|
|
392
|
+
subAgreementStatus: z.nativeEnum(SaStatus),
|
|
393
|
+
subAgreementFile: z.string().url(),
|
|
394
|
+
tradeLog: z.string().nullable().optional(),
|
|
395
|
+
});
|
|
396
|
+
export const SeedTransactionCsvRowZod = z.object({
|
|
397
|
+
txnId: z.string().nullable().optional(),
|
|
398
|
+
txnResponse: z.string().nullable().optional(),
|
|
399
|
+
txnPaymentMethod: z.nativeEnum(PaymentMethodType),
|
|
400
|
+
txnCurrencyCode: z.string().nullable().optional(),
|
|
401
|
+
txnChargedAmount: numberFromStringOrNumber('Transaction Charged Amount').pipe(z.number().min(0, { message: 'Transaction Charged Amount is required' })),
|
|
402
|
+
txnDate: z
|
|
403
|
+
.string()
|
|
404
|
+
.transform((val) => (val === '' ? null : val))
|
|
405
|
+
.pipe(z.coerce.date())
|
|
406
|
+
.nullable()
|
|
407
|
+
.optional(),
|
|
408
|
+
txnSettledDate: z
|
|
409
|
+
.string()
|
|
410
|
+
.transform((val) => (val === '' ? null : val))
|
|
411
|
+
.pipe(z.coerce.date())
|
|
412
|
+
.nullable()
|
|
413
|
+
.optional(),
|
|
414
|
+
txnStatus: z.nativeEnum(TransactionStatus),
|
|
415
|
+
txnLog: z.string().nullable().optional(),
|
|
416
|
+
});
|
|
417
|
+
export const AdministrativeFieldsCsvRowZod = z.object({
|
|
418
|
+
closedAt: z.coerce.date().nullable().optional(),
|
|
419
|
+
cancellationPeriod: z.string().nullable().optional(),
|
|
420
|
+
cancelledAt: z.coerce.date().nullable().optional(),
|
|
421
|
+
cancelledReason: z.string().nullable().optional(),
|
|
422
|
+
rejectionReason: z.string().nullable().optional(),
|
|
423
|
+
registeredRep: z.string().nullable().optional(),
|
|
424
|
+
});
|
|
425
|
+
export const InvestorAccountCsvRowZod = z.object({
|
|
426
|
+
investorAccountId: z.lazy(() => investorAccountIdSchema),
|
|
427
|
+
email: z.string().email(),
|
|
428
|
+
name: z.string(),
|
|
429
|
+
investorAccountType: z.nativeEnum(InvestorAccountType),
|
|
430
|
+
});
|
|
431
|
+
export const PrimaryIndividualCsvRowZod = z
|
|
432
|
+
.object({
|
|
433
|
+
primary_id: z.string(),
|
|
434
|
+
primary_kycFirstName: z.string(),
|
|
435
|
+
primary_kycLastName: z.string(),
|
|
436
|
+
primary_kycDocumentType: z.nativeEnum(KYCDocumentType),
|
|
437
|
+
primary_kycProviderId: z.string(),
|
|
438
|
+
primary_kycDocumentNumber: z.string(),
|
|
439
|
+
primary_kycDocumentIssuer: z.string(),
|
|
440
|
+
primary_kycIssuerDate: dateSchemaWithNormalization,
|
|
441
|
+
primary_kycExpirationDate: dateSchemaWithNormalization,
|
|
442
|
+
primary_kycCheckedAt: z.coerce.date(),
|
|
443
|
+
primary_kycStatus: z.nativeEnum(KYCStatus),
|
|
444
|
+
primary_kycLog: z.string(),
|
|
445
|
+
primary_kycProvider: z.string(),
|
|
446
|
+
primary_firstName: z.string(),
|
|
447
|
+
primary_lastName: z.string(),
|
|
448
|
+
primary_dob: dateSchemaWithNormalization,
|
|
449
|
+
primary_ssn: z.string().regex(/^\d{9}$/, 'SSN must be 9 digits'),
|
|
450
|
+
primary_address: z.string().min(2, 'Address must be at least 2 characters'),
|
|
451
|
+
primary_address2: z
|
|
452
|
+
.string()
|
|
453
|
+
.max(100, 'Address2 cannot exceed 100 characters')
|
|
454
|
+
.nullable()
|
|
455
|
+
.optional(),
|
|
456
|
+
primary_city: z
|
|
457
|
+
.string()
|
|
458
|
+
.min(2, 'City must be at least 2 characters')
|
|
459
|
+
.max(50, 'City cannot exceed 50 characters'),
|
|
460
|
+
primary_state: z.string().min(2, 'State must be at least 2 characters'),
|
|
461
|
+
primary_zip: z.string().min(5, 'Zip must be at least 5 characters'),
|
|
462
|
+
primary_country: z.string().min(2, 'Country must be at least 2 characters'),
|
|
463
|
+
primary_email: z.string().email(),
|
|
464
|
+
primary_phone: PhoneZodSchema,
|
|
465
|
+
primary_citizenship: z
|
|
466
|
+
.string()
|
|
467
|
+
.min(2, 'Citizenship must be at least 2 characters'),
|
|
468
|
+
primary_currentAnnualIncome: numberFromStringOrNumber('Primary Current Annual Income').pipe(z
|
|
469
|
+
.number()
|
|
470
|
+
.min(0, { message: 'Primary Current Annual Income is required' })),
|
|
471
|
+
primary_currentHouseholdIncome: numberFromStringOrNumber('Primary Current Household Income').pipe(z
|
|
472
|
+
.number()
|
|
473
|
+
.min(0, { message: 'Primary Current Household Income is required' })),
|
|
474
|
+
primary_householdNetWorth: numberFromStringOrNumber('Primary Household Net Worth').pipe(z.number().min(0, { message: 'Primary Household Net Worth is required' })),
|
|
475
|
+
primary_liquidNetWorth: numberFromStringOrNumber('Primary Liquid Net Worth').pipe(z.number().min(0, { message: 'Primary Liquid Net Worth is required' })),
|
|
476
|
+
primary_investedInCrowdfunding: numberFromStringOrNumber('Primary Invested In Crowdfunding').pipe(z
|
|
477
|
+
.number()
|
|
478
|
+
.min(0, { message: 'Primary Invested In Crowdfunding is required' })),
|
|
479
|
+
primary_occupation: z.string().nullable().optional(),
|
|
480
|
+
primary_employmentStatus: z.nativeEnum(EmploymentStatus),
|
|
481
|
+
primary_employerName: z.string(),
|
|
482
|
+
primary_sourceOfIncome: z.nativeEnum(SourceOfIncome),
|
|
483
|
+
primary_isUsCitizenOrGreenCardHolder: z.coerce.boolean(),
|
|
484
|
+
primary_accredited: z.coerce.boolean(),
|
|
485
|
+
})
|
|
486
|
+
.refine(({ primary_state, primary_country }) => {
|
|
487
|
+
if (primary_country === CountryCode['US']) {
|
|
488
|
+
return z.nativeEnum(StateCode).safeParse(primary_state).success;
|
|
489
|
+
}
|
|
490
|
+
if (primary_country === CountryCode['CA']) {
|
|
491
|
+
return z.nativeEnum(CanadaProvinceCode).safeParse(primary_state)
|
|
492
|
+
.success;
|
|
493
|
+
}
|
|
494
|
+
return z.string().min(2).max(35).safeParse(primary_state).success;
|
|
495
|
+
}, {
|
|
496
|
+
message: `state value is not valid. It should be 2 uppercase letters representing the valid state for the country.`,
|
|
497
|
+
})
|
|
498
|
+
.refine(({ primary_zip, primary_country }) => refineAddressZip(primary_country, primary_zip), {
|
|
499
|
+
message: 'zip value is not valid, it shall follow the US(12345 or 12345-6789), CANADA(A1A 1A1) format! it shall be a string for other states',
|
|
500
|
+
});
|
|
501
|
+
export const JointIndividualCsvRowZod = z
|
|
502
|
+
.object({
|
|
503
|
+
joint_id: z.string(),
|
|
504
|
+
joint_kycFirstName: z.string(),
|
|
505
|
+
joint_kycLastName: z.string(),
|
|
506
|
+
joint_kycDocumentType: z.nativeEnum(KYCDocumentType),
|
|
507
|
+
joint_kycDocumentIssuer: z.string(),
|
|
508
|
+
joint_kycDocumentNumber: z.string(),
|
|
509
|
+
joint_kycIssuerDate: dateSchemaWithNormalization,
|
|
510
|
+
joint_kycExpirationDate: dateSchemaWithNormalization,
|
|
511
|
+
joint_kycCheckedAt: z.string(),
|
|
512
|
+
joint_kycStatus: z.nativeEnum(KYCStatus),
|
|
513
|
+
joint_kycLog: z.string(),
|
|
514
|
+
joint_kycProviderId: z.string(),
|
|
515
|
+
joint_kycProvider: z.string(),
|
|
516
|
+
joint_firstName: z.string(),
|
|
517
|
+
joint_lastName: z.string(),
|
|
518
|
+
joint_dob: dateSchemaWithNormalization,
|
|
519
|
+
joint_ssn: z.string().regex(/^\d{9}$/, 'SSN must be 9 digits'),
|
|
520
|
+
joint_address: z.string().min(2, 'Address must be at least 2 characters'),
|
|
521
|
+
joint_address2: z
|
|
522
|
+
.string()
|
|
523
|
+
.max(100, 'Address2 cannot exceed 100 characters')
|
|
524
|
+
.nullable()
|
|
525
|
+
.optional(),
|
|
526
|
+
joint_city: z
|
|
527
|
+
.string()
|
|
528
|
+
.min(2, 'City must be at least 2 characters')
|
|
529
|
+
.max(50, 'City cannot exceed 50 characters'),
|
|
530
|
+
joint_state: z.string().min(2, 'State must be at least 2 characters'),
|
|
531
|
+
joint_zip: z.string().min(5, 'Zip must be at least 5 characters'),
|
|
532
|
+
joint_country: z.string().min(2, 'Country must be at least 2 characters'),
|
|
533
|
+
joint_email: z.string().email(),
|
|
534
|
+
joint_phone: PhoneZodSchema,
|
|
535
|
+
joint_citizenship: z
|
|
536
|
+
.string()
|
|
537
|
+
.min(2, 'Citizenship must be at least 2 characters'),
|
|
538
|
+
joint_currentAnnualIncome: numberFromStringOrNumber('Joint Current Annual Income').pipe(z.number().min(0, { message: 'Joint Current Annual Income is required' })),
|
|
539
|
+
joint_currentHouseholdIncome: numberFromStringOrNumber('Joint Current Household Income').pipe(z
|
|
540
|
+
.number()
|
|
541
|
+
.min(0, { message: 'Joint Current Household Income is required' })),
|
|
542
|
+
joint_householdNetWorth: numberFromStringOrNumber('Joint Household Net Worth').pipe(z.number().min(0, { message: 'Joint Household Net Worth is required' })),
|
|
543
|
+
joint_liquidNetWorth: numberFromStringOrNumber('Joint Liquid Net Worth').pipe(z.number().min(0, { message: 'Joint Liquid Net Worth is required' })),
|
|
544
|
+
joint_investedInCrowdfunding: numberFromStringOrNumber('Joint Invested In Crowdfunding').pipe(z
|
|
545
|
+
.number()
|
|
546
|
+
.min(0, { message: 'Joint Invested In Crowdfunding is required' })),
|
|
547
|
+
joint_occupation: z.string().nullable().optional(),
|
|
548
|
+
joint_employmentStatus: z.nativeEnum(EmploymentStatus),
|
|
549
|
+
joint_employerName: z.string(),
|
|
550
|
+
joint_sourceOfIncome: z.nativeEnum(SourceOfIncome),
|
|
551
|
+
joint_isUsCitizenOrGreenCardHolder: z.coerce.boolean(),
|
|
552
|
+
joint_accredited: z.coerce.boolean(),
|
|
553
|
+
})
|
|
554
|
+
.refine(({ joint_state, joint_country }) => {
|
|
555
|
+
if (joint_country === CountryCode['US']) {
|
|
556
|
+
return z.nativeEnum(StateCode).safeParse(joint_state).success;
|
|
557
|
+
}
|
|
558
|
+
if (joint_country === CountryCode['CA']) {
|
|
559
|
+
return z.nativeEnum(CanadaProvinceCode).safeParse(joint_state).success;
|
|
560
|
+
}
|
|
561
|
+
return z.string().min(2).max(35).safeParse(joint_state).success;
|
|
562
|
+
}, {
|
|
563
|
+
message: `state value is not valid. It should be 2 uppercase letters representing the valid state for the country.`,
|
|
564
|
+
})
|
|
565
|
+
.refine(({ joint_zip, joint_country }) => refineAddressZip(joint_country, joint_zip), {
|
|
566
|
+
message: 'zip value is not valid, it shall follow the US(12345 or 12345-6789), CANADA(A1A 1A1) format! it shall be a string for other states',
|
|
567
|
+
});
|
|
568
|
+
export const LegalEntityCsvRowZod = z
|
|
569
|
+
.object({
|
|
570
|
+
entity_id: z.string(),
|
|
571
|
+
entity_name: z.string(),
|
|
572
|
+
entity_ein: z.string(),
|
|
573
|
+
entity_entityType: z.string(),
|
|
574
|
+
entity_address: z.string().min(2, 'Address must be at least 2 characters'),
|
|
575
|
+
entity_address2: z
|
|
576
|
+
.string()
|
|
577
|
+
.max(100, 'Address2 cannot exceed 100 characters')
|
|
578
|
+
.nullable()
|
|
579
|
+
.optional(),
|
|
580
|
+
entity_city: z
|
|
581
|
+
.string()
|
|
582
|
+
.min(2, 'City must be at least 2 characters')
|
|
583
|
+
.max(50, 'City cannot exceed 50 characters'),
|
|
584
|
+
entity_state: z.string().min(2, 'State must be at least 2 characters'),
|
|
585
|
+
entity_zip: z.string().min(5, 'Zip must be at least 5 characters'),
|
|
586
|
+
entity_country: z.string().min(2, 'Country must be at least 2 characters'),
|
|
587
|
+
entity_dateOfIncorporation: dateSchemaWithNormalization,
|
|
588
|
+
entity_stateOfIncorporation: z
|
|
589
|
+
.string()
|
|
590
|
+
.min(2, 'State must be at least 2 characters'),
|
|
591
|
+
entity_phone: PhoneZodSchema,
|
|
592
|
+
})
|
|
593
|
+
.refine(({ entity_state, entity_country }) => {
|
|
594
|
+
if (entity_country === CountryCode['US']) {
|
|
595
|
+
return z.nativeEnum(StateCode).safeParse(entity_state).success;
|
|
596
|
+
}
|
|
597
|
+
if (entity_country === CountryCode['CA']) {
|
|
598
|
+
return z.nativeEnum(CanadaProvinceCode).safeParse(entity_state).success;
|
|
599
|
+
}
|
|
600
|
+
return z.string().min(2).max(35).safeParse(entity_state).success;
|
|
601
|
+
}, {
|
|
602
|
+
message: `state value is not valid. It should be 2 uppercase letters representing the valid state for the country.`,
|
|
603
|
+
})
|
|
604
|
+
.refine(({ entity_zip, entity_country }) => refineAddressZip(entity_country, entity_zip), {
|
|
605
|
+
message: 'zip value is not valid, it shall follow the US(12345 or 12345-6789), CANADA(A1A 1A1) format! it shall be a string for other states',
|
|
606
|
+
});
|
|
607
|
+
export const RetirementAccountTypeCsvRowZod = z.object({
|
|
608
|
+
retirement_accountType: z.nativeEnum(RetirementAccountType),
|
|
609
|
+
retirement_custodianName: z.string(),
|
|
610
|
+
retirement_custodianAccountNumber: z.string(),
|
|
611
|
+
retirement_custodianRepresentativeName: z.string(),
|
|
612
|
+
retirement_custodianEmail: z.string().email(),
|
|
613
|
+
});
|
|
614
|
+
export const IParsedSeedDataZod = z.object({
|
|
615
|
+
...SeedTradeCsvRowZod.shape,
|
|
616
|
+
...SeedTransactionCsvRowZod.shape,
|
|
617
|
+
...AdministrativeFieldsCsvRowZod.shape,
|
|
618
|
+
...InvestorAccountCsvRowZod.shape,
|
|
619
|
+
primary_id: z.string(),
|
|
620
|
+
primary_kycFirstName: z.string(),
|
|
621
|
+
primary_kycLastName: z.string(),
|
|
622
|
+
primary_kycDocumentType: z.nativeEnum(KYCDocumentType),
|
|
623
|
+
primary_kycProviderId: z.string(),
|
|
624
|
+
primary_kycDocumentNumber: z.string(),
|
|
625
|
+
primary_kycDocumentIssuer: z.string(),
|
|
626
|
+
primary_kycIssuerDate: z.string(),
|
|
627
|
+
primary_kycExpirationDate: z.string(),
|
|
628
|
+
primary_kycCheckedAt: z.coerce.date(),
|
|
629
|
+
primary_kycStatus: z.nativeEnum(KYCStatus),
|
|
630
|
+
primary_kycLog: z.string(),
|
|
631
|
+
primary_kycProvider: z.string(),
|
|
632
|
+
primary_firstName: z.string(),
|
|
633
|
+
primary_lastName: z.string(),
|
|
634
|
+
primary_dob: z.string(),
|
|
635
|
+
primary_ssn: z.string().regex(/^\d{9}$/, 'SSN must be 9 digits'),
|
|
636
|
+
primary_address: z.string().min(2, 'Address must be at least 2 characters'),
|
|
637
|
+
primary_address2: z
|
|
638
|
+
.string()
|
|
639
|
+
.max(100, 'Address2 cannot exceed 100 characters')
|
|
640
|
+
.nullable()
|
|
641
|
+
.optional(),
|
|
642
|
+
primary_city: z
|
|
643
|
+
.string()
|
|
644
|
+
.min(2, 'City must be at least 2 characters')
|
|
645
|
+
.max(50, 'City cannot exceed 50 characters'),
|
|
646
|
+
primary_state: z.string().min(2, 'State must be at least 2 characters'),
|
|
647
|
+
primary_zip: z.string().min(5, 'Zip must be at least 5 characters'),
|
|
648
|
+
primary_country: z.string().min(2, 'Country must be at least 2 characters'),
|
|
649
|
+
primary_email: z.string().email(),
|
|
650
|
+
primary_phone: PhoneZodSchema,
|
|
651
|
+
primary_citizenship: z
|
|
652
|
+
.string()
|
|
653
|
+
.min(2, 'Citizenship must be at least 2 characters'),
|
|
654
|
+
primary_currentAnnualIncome: numberFromStringOrNumber('Primary Current Annual Income').pipe(z.number().min(0, { message: 'Primary Current Annual Income is required' })),
|
|
655
|
+
primary_currentHouseholdIncome: numberFromStringOrNumber('Primary Current Household Income').pipe(z
|
|
656
|
+
.number()
|
|
657
|
+
.min(0, { message: 'Primary Current Household Income is required' })),
|
|
658
|
+
primary_householdNetWorth: numberFromStringOrNumber('Primary Household Net Worth').pipe(z.number().min(0, { message: 'Primary Household Net Worth is required' })),
|
|
659
|
+
primary_liquidNetWorth: numberFromStringOrNumber('Primary Liquid Net Worth').pipe(z.number().min(0, { message: 'Primary Liquid Net Worth is required' })),
|
|
660
|
+
primary_investedInCrowdfunding: numberFromStringOrNumber('Primary Invested In Crowdfunding').pipe(z
|
|
661
|
+
.number()
|
|
662
|
+
.min(0, { message: 'Primary Invested In Crowdfunding is required' })),
|
|
663
|
+
primary_occupation: z.string().nullable().optional(),
|
|
664
|
+
primary_employmentStatus: z.nativeEnum(EmploymentStatus),
|
|
665
|
+
primary_employerName: z.string(),
|
|
666
|
+
primary_sourceOfIncome: z.nativeEnum(SourceOfIncome),
|
|
667
|
+
primary_isUsCitizenOrGreenCardHolder: z.coerce.boolean(),
|
|
668
|
+
primary_accredited: z.coerce.boolean(),
|
|
669
|
+
joint_id: z.string().nullable().optional(),
|
|
670
|
+
joint_kycFirstName: z.string().nullable().optional(),
|
|
671
|
+
joint_kycLastName: z.string().nullable().optional(),
|
|
672
|
+
joint_kycDocumentType: z.nativeEnum(KYCDocumentType).nullable().optional(),
|
|
673
|
+
joint_kycDocumentIssuer: z.string().nullable().optional(),
|
|
674
|
+
joint_kycDocumentNumber: z.string().nullable().optional(),
|
|
675
|
+
joint_kycIssuerDate: dateSchemaWithNormalization.nullable().optional(),
|
|
676
|
+
joint_kycExpirationDate: dateSchemaWithNormalization.nullable().optional(),
|
|
677
|
+
joint_kycCheckedAt: z.string().nullable().optional(),
|
|
678
|
+
joint_kycStatus: z.nativeEnum(KYCStatus).nullable().optional(),
|
|
679
|
+
joint_kycLog: z.string().nullable().optional(),
|
|
680
|
+
joint_kycProviderId: z.string().nullable().optional(),
|
|
681
|
+
joint_kycProvider: z.string().nullable().optional(),
|
|
682
|
+
joint_firstName: z.string().nullable().optional(),
|
|
683
|
+
joint_lastName: z.string().nullable().optional(),
|
|
684
|
+
joint_dob: dateSchemaWithNormalization.nullable().optional(),
|
|
685
|
+
joint_ssn: z
|
|
686
|
+
.string()
|
|
687
|
+
.regex(/^\d{9}$/, 'SSN must be 9 digits')
|
|
688
|
+
.nullable()
|
|
689
|
+
.optional(),
|
|
690
|
+
joint_address: z
|
|
691
|
+
.string()
|
|
692
|
+
.min(2, 'Address must be at least 2 characters')
|
|
693
|
+
.nullable()
|
|
694
|
+
.optional(),
|
|
695
|
+
joint_address2: z
|
|
696
|
+
.string()
|
|
697
|
+
.max(100, 'Address2 cannot exceed 100 characters')
|
|
698
|
+
.nullable()
|
|
699
|
+
.optional(),
|
|
700
|
+
joint_city: z
|
|
701
|
+
.string()
|
|
702
|
+
.min(2, 'City must be at least 2 characters')
|
|
703
|
+
.max(50, 'City cannot exceed 50 characters')
|
|
704
|
+
.nullable()
|
|
705
|
+
.optional(),
|
|
706
|
+
joint_state: z
|
|
707
|
+
.string()
|
|
708
|
+
.min(2, 'State must be at least 2 characters')
|
|
709
|
+
.nullable()
|
|
710
|
+
.optional(),
|
|
711
|
+
joint_zip: z
|
|
712
|
+
.string()
|
|
713
|
+
.min(5, 'Zip must be at least 5 characters')
|
|
714
|
+
.nullable()
|
|
715
|
+
.optional(),
|
|
716
|
+
joint_country: z
|
|
717
|
+
.string()
|
|
718
|
+
.min(2, 'Country must be at least 2 characters')
|
|
719
|
+
.nullable()
|
|
720
|
+
.optional(),
|
|
721
|
+
joint_email: z.string().email().nullable().optional(),
|
|
722
|
+
joint_phone: PhoneZodSchema.nullable().optional(),
|
|
723
|
+
joint_citizenship: z
|
|
724
|
+
.string()
|
|
725
|
+
.min(2, 'Citizenship must be at least 2 characters')
|
|
726
|
+
.nullable()
|
|
727
|
+
.optional(),
|
|
728
|
+
joint_currentAnnualIncome: numberFromStringOrNumber('Joint Current Annual Income')
|
|
729
|
+
.pipe(z.number().min(0, { message: 'Joint Current Annual Income is required' }))
|
|
730
|
+
.nullable()
|
|
731
|
+
.optional(),
|
|
732
|
+
joint_currentHouseholdIncome: numberFromStringOrNumber('Joint Current Household Income')
|
|
733
|
+
.pipe(z
|
|
734
|
+
.number()
|
|
735
|
+
.min(0, { message: 'Joint Current Household Income is required' }))
|
|
736
|
+
.nullable()
|
|
737
|
+
.optional(),
|
|
738
|
+
joint_householdNetWorth: numberFromStringOrNumber('Joint Household Net Worth')
|
|
739
|
+
.pipe(z.number().min(0, { message: 'Joint Household Net Worth is required' }))
|
|
740
|
+
.nullable()
|
|
741
|
+
.optional(),
|
|
742
|
+
joint_liquidNetWorth: numberFromStringOrNumber('Joint Liquid Net Worth')
|
|
743
|
+
.pipe(z.number().min(0, { message: 'Joint Liquid Net Worth is required' }))
|
|
744
|
+
.nullable()
|
|
745
|
+
.optional(),
|
|
746
|
+
joint_investedInCrowdfunding: numberFromStringOrNumber('Joint Invested In Crowdfunding')
|
|
747
|
+
.pipe(z
|
|
748
|
+
.number()
|
|
749
|
+
.min(0, { message: 'Joint Invested In Crowdfunding is required' }))
|
|
750
|
+
.nullable()
|
|
751
|
+
.optional(),
|
|
752
|
+
joint_occupation: z.string().nullable().optional(),
|
|
753
|
+
joint_employmentStatus: z.nativeEnum(EmploymentStatus).nullable().optional(),
|
|
754
|
+
joint_employerName: z.string().nullable().optional(),
|
|
755
|
+
joint_sourceOfIncome: z.nativeEnum(SourceOfIncome).nullable().optional(),
|
|
756
|
+
joint_isUsCitizenOrGreenCardHolder: z.coerce.boolean().nullable().optional(),
|
|
757
|
+
joint_accredited: z.coerce.boolean().nullable().optional(),
|
|
758
|
+
entity_id: z.string().nullable().optional(),
|
|
759
|
+
entity_name: z.string().nullable().optional(),
|
|
760
|
+
entity_ein: z.string().nullable().optional(),
|
|
761
|
+
entity_entityType: z.string().nullable().optional(),
|
|
762
|
+
entity_address: z
|
|
763
|
+
.string()
|
|
764
|
+
.min(2, 'Address must be at least 2 characters')
|
|
765
|
+
.nullable()
|
|
766
|
+
.optional(),
|
|
767
|
+
entity_address2: z
|
|
768
|
+
.string()
|
|
769
|
+
.max(100, 'Address2 cannot exceed 100 characters')
|
|
770
|
+
.nullable()
|
|
771
|
+
.optional(),
|
|
772
|
+
entity_city: z
|
|
773
|
+
.string()
|
|
774
|
+
.min(2, 'City must be at least 2 characters')
|
|
775
|
+
.max(50, 'City cannot exceed 50 characters')
|
|
776
|
+
.nullable()
|
|
777
|
+
.optional(),
|
|
778
|
+
entity_state: z
|
|
779
|
+
.string()
|
|
780
|
+
.min(2, 'State must be at least 2 characters')
|
|
781
|
+
.nullable()
|
|
782
|
+
.optional(),
|
|
783
|
+
entity_zip: z
|
|
784
|
+
.string()
|
|
785
|
+
.min(5, 'Zip must be at least 5 characters')
|
|
786
|
+
.nullable()
|
|
787
|
+
.optional(),
|
|
788
|
+
entity_country: z
|
|
789
|
+
.string()
|
|
790
|
+
.min(2, 'Country must be at least 2 characters')
|
|
791
|
+
.nullable()
|
|
792
|
+
.optional(),
|
|
793
|
+
entity_dateOfIncorporation: dateSchemaWithNormalization.nullable().optional(),
|
|
794
|
+
entity_stateOfIncorporation: z
|
|
795
|
+
.string()
|
|
796
|
+
.min(2, 'State must be at least 2 characters')
|
|
797
|
+
.nullable()
|
|
798
|
+
.optional(),
|
|
799
|
+
entity_phone: PhoneZodSchema.nullable().optional(),
|
|
800
|
+
retirement_accountType: z
|
|
801
|
+
.nativeEnum(RetirementAccountType)
|
|
802
|
+
.nullable()
|
|
803
|
+
.optional(),
|
|
804
|
+
retirement_custodianName: z.string().nullable().optional(),
|
|
805
|
+
retirement_custodianAccountNumber: z.string().nullable().optional(),
|
|
806
|
+
retirement_custodianRepresentativeName: z.string().nullable().optional(),
|
|
807
|
+
retirement_custodianEmail: z.string().email().nullable().optional(),
|
|
808
|
+
});
|
|
809
|
+
export const GetInvestorAccountsFilters = PaginationOptionsZod.merge(InvestorAccountsIncludeQuery).merge(InvestorAccountsFilters);
|
|
810
|
+
export const InvestorStatusCheckZod = z.object({
|
|
811
|
+
entity: z
|
|
812
|
+
.object({
|
|
813
|
+
information: z.boolean().default(true),
|
|
814
|
+
address: z.boolean().default(true),
|
|
815
|
+
})
|
|
816
|
+
.optional(),
|
|
817
|
+
primary: z
|
|
818
|
+
.object({
|
|
819
|
+
account: z.boolean().default(true),
|
|
820
|
+
personal: z.boolean().default(true),
|
|
821
|
+
residential: z.boolean().default(true),
|
|
822
|
+
identity: z.boolean().default(true),
|
|
823
|
+
financial: z.boolean().default(true),
|
|
824
|
+
investorQuestionnaire: z.boolean().default(true),
|
|
825
|
+
accreditation: z.boolean().default(true),
|
|
826
|
+
trustedContact: z.boolean().default(true),
|
|
827
|
+
retirement: z.boolean().optional(),
|
|
828
|
+
})
|
|
829
|
+
.optional(),
|
|
830
|
+
secondary: z
|
|
831
|
+
.object({
|
|
832
|
+
personal: z.boolean().default(true),
|
|
833
|
+
residential: z.boolean().default(true),
|
|
834
|
+
identity: z.boolean().default(true),
|
|
835
|
+
financial: z.boolean().default(true),
|
|
836
|
+
})
|
|
837
|
+
.optional(),
|
|
838
|
+
});
|
|
839
|
+
export const INVESTOR_ACCOUNT_FIELDS_MAP = {
|
|
840
|
+
entity: {
|
|
841
|
+
information: [
|
|
842
|
+
'companyType',
|
|
843
|
+
'name',
|
|
844
|
+
'ein',
|
|
845
|
+
'dateOfIncorporation',
|
|
846
|
+
'stateOfIncorporation',
|
|
847
|
+
],
|
|
848
|
+
address: ['address', 'address2', 'city', 'zip', 'state', 'country'],
|
|
849
|
+
},
|
|
850
|
+
primary: {
|
|
851
|
+
account: ['investorAccountType', 'name', 'email'],
|
|
852
|
+
personal: [
|
|
853
|
+
'firstName',
|
|
854
|
+
'lastName',
|
|
855
|
+
'email',
|
|
856
|
+
'phoneNumber',
|
|
857
|
+
'dob',
|
|
858
|
+
'citizenship',
|
|
859
|
+
'ssn',
|
|
860
|
+
],
|
|
861
|
+
residential: [
|
|
862
|
+
'address',
|
|
863
|
+
'address2',
|
|
864
|
+
'city',
|
|
865
|
+
'postalCode',
|
|
866
|
+
'state',
|
|
867
|
+
'country',
|
|
868
|
+
],
|
|
869
|
+
identity: [
|
|
870
|
+
'kycDocumentType',
|
|
871
|
+
'kycDocumentIssuer',
|
|
872
|
+
'kycDocumentNumber',
|
|
873
|
+
'kycIssuerDate',
|
|
874
|
+
'kycExpirationDate',
|
|
875
|
+
'kycStatus',
|
|
876
|
+
'kycProvider',
|
|
877
|
+
'kycTid',
|
|
878
|
+
],
|
|
879
|
+
financial: [
|
|
880
|
+
'liquidNetWorth',
|
|
881
|
+
'currentAnnualIncome',
|
|
882
|
+
'sourceOfIncome',
|
|
883
|
+
'employerName',
|
|
884
|
+
],
|
|
885
|
+
investorQuestionnaire: ['aicQuestionnaire'],
|
|
886
|
+
accreditation: ['accreditationFile'],
|
|
887
|
+
retirement: [
|
|
888
|
+
'retirementAccountType',
|
|
889
|
+
'retirementCustodianName',
|
|
890
|
+
'retirementCustodianAccountNumber',
|
|
891
|
+
'retirementCustodianRepresentativeName',
|
|
892
|
+
'retirementCustodianEmail',
|
|
893
|
+
],
|
|
894
|
+
},
|
|
895
|
+
secondary: {
|
|
896
|
+
personal: [
|
|
897
|
+
'firstName',
|
|
898
|
+
'lastName',
|
|
899
|
+
'email',
|
|
900
|
+
'phoneNumber',
|
|
901
|
+
'dob',
|
|
902
|
+
'citizenship',
|
|
903
|
+
'ssn',
|
|
904
|
+
],
|
|
905
|
+
residential: ['address', 'address2', 'city', 'zip', 'state', 'country'],
|
|
906
|
+
identity: [
|
|
907
|
+
'kycDocumentType',
|
|
908
|
+
'kycDocumentIssuer',
|
|
909
|
+
'kycDocumentNumber',
|
|
910
|
+
'kycIssuerDate',
|
|
911
|
+
'kycExpirationDate',
|
|
912
|
+
'kycStatus',
|
|
913
|
+
'kycProvider',
|
|
914
|
+
'kycTid',
|
|
915
|
+
],
|
|
916
|
+
financial: [
|
|
917
|
+
'liquidNetWorth',
|
|
918
|
+
'currentAnnualIncome',
|
|
919
|
+
'sourceOfIncome',
|
|
920
|
+
'employerName',
|
|
921
|
+
],
|
|
922
|
+
},
|
|
923
|
+
};
|
|
924
|
+
export const ExportRegisteredInvestorUsersFiltersZod = z.object({
|
|
925
|
+
search: z.string().optional(),
|
|
926
|
+
startDate: dateSchema.optional(),
|
|
927
|
+
endDate: dateSchema.optional(),
|
|
928
|
+
userType: z.nativeEnum(UserType).optional(),
|
|
929
|
+
});
|
|
930
|
+
//# sourceMappingURL=investor-account.types.js.map
|