@dalmore/api-contracts 0.0.0-dev.d07da18 → 0.0.0-dev.d2fe663
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 +120 -0
- package/common/types/account-setting.types.js +44 -0
- package/common/types/account-setting.types.js.map +1 -0
- package/common/types/account.types.d.ts +595 -0
- package/common/types/account.types.js +214 -0
- package/common/types/account.types.js.map +1 -0
- package/common/types/activity.types.d.ts +580 -0
- package/common/types/activity.types.js +245 -0
- package/common/types/activity.types.js.map +1 -0
- package/common/types/address.types.d.ts +89 -0
- package/common/types/address.types.js +36 -0
- package/common/types/address.types.js.map +1 -0
- package/common/types/aic.types.d.ts +434 -0
- package/common/types/aic.types.js +170 -0
- package/common/types/aic.types.js.map +1 -0
- package/common/types/aml.types.d.ts +41 -0
- package/common/types/aml.types.js +16 -0
- package/common/types/aml.types.js.map +1 -0
- package/common/types/api-key-logs.types.d.ts +204 -0
- package/common/types/api-key-logs.types.js +52 -0
- package/common/types/api-key-logs.types.js.map +1 -0
- package/common/types/api-keys.types.d.ts +192 -0
- package/common/types/api-keys.types.js +57 -0
- package/common/types/api-keys.types.js.map +1 -0
- package/common/types/asset.types.d.ts +888 -0
- package/common/types/asset.types.js +280 -0
- package/common/types/asset.types.js.map +1 -0
- package/common/types/auth.types.d.ts +487 -0
- package/common/types/auth.types.js +279 -0
- package/common/types/auth.types.js.map +1 -0
- package/common/types/batch-jobs.types.d.ts +321 -0
- package/common/types/batch-jobs.types.js +111 -0
- package/common/types/batch-jobs.types.js.map +1 -0
- package/common/types/bonus-tier.types.d.ts +888 -0
- package/common/types/bonus-tier.types.js +130 -0
- package/common/types/bonus-tier.types.js.map +1 -0
- package/common/types/cart.types.d.ts +28 -0
- package/common/types/cart.types.js +19 -0
- package/common/types/cart.types.js.map +1 -0
- package/common/types/checklist-items.types.d.ts +195 -0
- package/common/types/checklist-items.types.js +54 -0
- package/common/types/checklist-items.types.js.map +1 -0
- package/common/types/checklist.types.d.ts +140 -0
- package/common/types/checklist.types.js +71 -0
- package/common/types/checklist.types.js.map +1 -0
- package/common/types/common.types.d.ts +1495 -0
- package/common/types/common.types.js +1430 -0
- package/common/types/common.types.js.map +1 -0
- package/common/types/comply-advantage-api.types.d.ts +3959 -0
- package/common/types/comply-advantage-api.types.js +270 -0
- package/common/types/comply-advantage-api.types.js.map +1 -0
- package/common/types/comply-advantage.types.d.ts +48 -0
- package/common/types/comply-advantage.types.js +21 -0
- package/common/types/comply-advantage.types.js.map +1 -0
- package/common/types/contact-us.types.d.ts +126 -0
- package/common/types/contact-us.types.js +91 -0
- package/common/types/contact-us.types.js.map +1 -0
- package/common/types/countries.types.d.ts +77 -0
- package/common/types/countries.types.js +349 -0
- package/common/types/countries.types.js.map +1 -0
- package/common/types/covered-person.types.d.ts +204 -0
- package/common/types/covered-person.types.js +234 -0
- package/common/types/covered-person.types.js.map +1 -0
- package/common/types/dashboard.types.d.ts +2086 -0
- package/common/types/dashboard.types.js +690 -0
- package/common/types/dashboard.types.js.map +1 -0
- package/common/types/data-record.types.d.ts +347 -0
- package/common/types/data-record.types.js +261 -0
- package/common/types/data-record.types.js.map +1 -0
- package/common/types/data-room.types.d.ts +1277 -0
- package/common/types/data-room.types.js +167 -0
- package/common/types/data-room.types.js.map +1 -0
- package/common/types/default-theme-config.types.d.ts +445 -0
- package/common/types/default-theme-config.types.js +63 -0
- package/common/types/default-theme-config.types.js.map +1 -0
- package/common/types/disbursement-adjustment.types.d.ts +21 -0
- package/common/types/disbursement-adjustment.types.js +25 -0
- package/common/types/disbursement-adjustment.types.js.map +1 -0
- package/common/types/disbursement-approval-user.types.d.ts +935 -0
- package/common/types/disbursement-approval-user.types.js +68 -0
- package/common/types/disbursement-approval-user.types.js.map +1 -0
- package/common/types/disbursement-review.types.d.ts +923 -0
- package/common/types/disbursement-review.types.js +76 -0
- package/common/types/disbursement-review.types.js.map +1 -0
- package/common/types/disbursement-transaction.types.d.ts +621 -0
- package/common/types/disbursement-transaction.types.js +51 -0
- package/common/types/disbursement-transaction.types.js.map +1 -0
- package/common/types/disbursements.types.d.ts +2343 -0
- package/common/types/disbursements.types.js +308 -0
- package/common/types/disbursements.types.js.map +1 -0
- package/common/types/domain-filter.types.d.ts +135 -0
- package/common/types/domain-filter.types.js +40 -0
- package/common/types/domain-filter.types.js.map +1 -0
- package/common/types/email-theme.types.d.ts +1359 -0
- package/common/types/email-theme.types.js +318 -0
- package/common/types/email-theme.types.js.map +1 -0
- package/common/types/entity.types.d.ts +21 -0
- package/common/types/entity.types.js +14 -0
- package/common/types/entity.types.js.map +1 -0
- package/common/types/error-responses.types.d.ts +144 -0
- package/common/types/error-responses.types.js +125 -0
- package/common/types/error-responses.types.js.map +1 -0
- package/common/types/escrow-account.types.d.ts +398 -0
- package/common/types/escrow-account.types.js +75 -0
- package/common/types/escrow-account.types.js.map +1 -0
- package/common/types/exchange-api-key.types.d.ts +1010 -0
- package/common/types/exchange-api-key.types.js +90 -0
- package/common/types/exchange-api-key.types.js.map +1 -0
- package/common/types/exchange-import.types.d.ts +23 -0
- package/common/types/exchange-import.types.js +23 -0
- package/common/types/exchange-import.types.js.map +1 -0
- package/common/types/exchange-provider.types.d.ts +1308 -0
- package/common/types/exchange-provider.types.js +268 -0
- package/common/types/exchange-provider.types.js.map +1 -0
- package/common/types/file.types.d.ts +401 -0
- package/common/types/file.types.js +378 -0
- package/common/types/file.types.js.map +1 -0
- package/common/types/health.types.d.ts +112 -0
- package/common/types/health.types.js +22 -0
- package/common/types/health.types.js.map +1 -0
- package/common/types/i-will-do-it-later.types.d.ts +51 -0
- package/common/types/i-will-do-it-later.types.js +30 -0
- package/common/types/i-will-do-it-later.types.js.map +1 -0
- package/common/types/{index.ts → index.d.ts} +4 -3
- package/common/types/index.js +51 -0
- package/common/types/index.js.map +1 -0
- package/common/types/individuals.types.d.ts +1899 -0
- package/common/types/individuals.types.js +500 -0
- package/common/types/individuals.types.js.map +1 -0
- package/common/types/investor-account.types.d.ts +2996 -0
- package/common/types/investor-account.types.js +930 -0
- package/common/types/investor-account.types.js.map +1 -0
- package/common/types/investorAccountIdSchema.type.js +1 -0
- package/common/types/investorAccountIdSchema.type.js.map +1 -0
- package/common/types/investors-offering.types.d.ts +391 -0
- package/common/types/investors-offering.types.js +49 -0
- package/common/types/investors-offering.types.js.map +1 -0
- package/common/types/invite.types.d.ts +641 -0
- package/common/types/invite.types.js +113 -0
- package/common/types/invite.types.js.map +1 -0
- package/common/types/issuer-bank-account.types.d.ts +385 -0
- package/common/types/issuer-bank-account.types.js +81 -0
- package/common/types/issuer-bank-account.types.js.map +1 -0
- package/common/types/issuer-offering.types.d.ts +1245 -0
- package/common/types/issuer-offering.types.js +344 -0
- package/common/types/issuer-offering.types.js.map +1 -0
- package/common/types/issuer-payment-method.types.d.ts +1100 -0
- package/common/types/issuer-payment-method.types.js +311 -0
- package/common/types/issuer-payment-method.types.js.map +1 -0
- package/common/types/issuer.types.d.ts +539 -0
- package/common/types/issuer.types.js +275 -0
- package/common/types/issuer.types.js.map +1 -0
- package/common/types/job-item.types.d.ts +230 -0
- package/common/types/job-item.types.js +89 -0
- package/common/types/job-item.types.js.map +1 -0
- package/common/types/jobs.types.d.ts +296 -0
- package/common/types/jobs.types.js +150 -0
- package/common/types/jobs.types.js.map +1 -0
- package/common/types/kyb.types.d.ts +167 -0
- package/common/types/kyb.types.js +45 -0
- package/common/types/kyb.types.js.map +1 -0
- package/common/types/kyc.types.d.ts +2197 -0
- package/common/types/kyc.types.js +301 -0
- package/common/types/kyc.types.js.map +1 -0
- package/common/types/legal-entity.types.d.ts +638 -0
- package/common/types/legal-entity.types.js +148 -0
- package/common/types/legal-entity.types.js.map +1 -0
- package/common/types/login-history.types.d.ts +160 -0
- package/common/types/login-history.types.js +39 -0
- package/common/types/login-history.types.js.map +1 -0
- package/common/types/mail-template.types.d.ts +595 -0
- package/common/types/mail-template.types.js +401 -0
- package/common/types/mail-template.types.js.map +1 -0
- package/common/types/north-cap-integration.types.d.ts +1303 -0
- package/common/types/north-cap-integration.types.js +145 -0
- package/common/types/north-cap-integration.types.js.map +1 -0
- package/common/types/note.types.d.ts +216 -0
- package/common/types/note.types.js +82 -0
- package/common/types/note.types.js.map +1 -0
- package/common/types/notification.types.d.ts +2689 -0
- package/common/types/notification.types.js +408 -0
- package/common/types/notification.types.js.map +1 -0
- package/common/types/notion-api.types.d.ts +3626 -0
- package/common/types/notion-api.types.js +271 -0
- package/common/types/notion-api.types.js.map +1 -0
- package/common/types/notion-database.types.d.ts +191 -0
- package/common/types/notion-database.types.js +95 -0
- package/common/types/notion-database.types.js.map +1 -0
- package/common/types/notion-page.types.d.ts +3482 -0
- package/common/types/notion-page.types.js +208 -0
- package/common/types/notion-page.types.js.map +1 -0
- package/common/types/offering-reports.types.d.ts +525 -0
- package/common/types/offering-reports.types.js +111 -0
- package/common/types/offering-reports.types.js.map +1 -0
- package/common/types/offering-submission.types.d.ts +587 -0
- package/common/types/offering-submission.types.js +278 -0
- package/common/types/offering-submission.types.js.map +1 -0
- package/common/types/offering.types.d.ts +2335 -0
- package/common/types/offering.types.js +505 -0
- package/common/types/offering.types.js.map +1 -0
- package/common/types/page-revision.types.d.ts +74 -0
- package/common/types/page-revision.types.js +68 -0
- package/common/types/page-revision.types.js.map +1 -0
- package/common/types/page.types.d.ts +540 -0
- package/common/types/page.types.js +361 -0
- package/common/types/page.types.js.map +1 -0
- package/common/types/password.type.d.ts +2 -0
- package/common/types/password.type.js +14 -0
- package/common/types/password.type.js.map +1 -0
- package/common/types/payment-methods.types.d.ts +800 -0
- package/common/types/payment-methods.types.js +260 -0
- package/common/types/payment-methods.types.js.map +1 -0
- package/common/types/phone.type.d.ts +12 -0
- package/common/types/phone.type.js +29 -0
- package/common/types/phone.type.js.map +1 -0
- package/common/types/portfolio.types.d.ts +185 -0
- package/common/types/portfolio.types.js +36 -0
- package/common/types/portfolio.types.js.map +1 -0
- package/common/types/privacy-policy-and-tos.types.d.ts +2 -0
- package/common/types/{privacy-policy-and-tos.types.ts → privacy-policy-and-tos.types.js} +1 -1
- package/common/types/privacy-policy-and-tos.types.js.map +1 -0
- package/common/types/queue.types.d.ts +22 -0
- package/common/types/queue.types.js +73 -0
- package/common/types/queue.types.js.map +1 -0
- package/common/types/registered-reps.types.d.ts +6 -0
- package/common/types/registered-reps.types.js +21 -0
- package/common/types/registered-reps.types.js.map +1 -0
- package/common/types/rejection-reasons.types.d.ts +35 -0
- package/common/types/rejection-reasons.types.js +49 -0
- package/common/types/rejection-reasons.types.js.map +1 -0
- package/common/types/review.types.d.ts +419 -0
- package/common/types/review.types.js +101 -0
- package/common/types/review.types.js.map +1 -0
- package/common/types/role.types.d.ts +30 -0
- package/common/types/role.types.js +21 -0
- package/common/types/role.types.js.map +1 -0
- package/common/types/secondary-customer.types.d.ts +586 -0
- package/common/types/secondary-customer.types.js +39 -0
- package/common/types/secondary-customer.types.js.map +1 -0
- package/common/types/secondary-issuer.types.d.ts +283 -0
- package/common/types/secondary-issuer.types.js +37 -0
- package/common/types/secondary-issuer.types.js.map +1 -0
- package/common/types/secondary-order.types.d.ts +508 -0
- package/common/types/secondary-order.types.js +40 -0
- package/common/types/secondary-order.types.js.map +1 -0
- package/common/types/secondary-security.types.d.ts +175 -0
- package/common/types/secondary-security.types.js +45 -0
- package/common/types/secondary-security.types.js.map +1 -0
- package/common/types/secondary-trade.entity.d.ts +16 -0
- package/common/types/secondary-trade.entity.js +12 -0
- package/common/types/secondary-trade.entity.js.map +1 -0
- package/common/types/secondary-trade.types.d.ts +465 -0
- package/common/types/secondary-trade.types.js +61 -0
- package/common/types/secondary-trade.types.js.map +1 -0
- package/common/types/secure-request.types.d.ts +171 -0
- package/common/types/secure-request.types.js +51 -0
- package/common/types/secure-request.types.js.map +1 -0
- package/common/types/signer.types.d.ts +3394 -0
- package/common/types/signer.types.js +517 -0
- package/common/types/signer.types.js.map +1 -0
- package/common/types/site-link.types.d.ts +875 -0
- package/common/types/site-link.types.js +126 -0
- package/common/types/site-link.types.js.map +1 -0
- package/common/types/site-settings.types.d.ts +1673 -0
- package/common/types/site-settings.types.js +500 -0
- package/common/types/site-settings.types.js.map +1 -0
- package/common/types/site.types.d.ts +1476 -0
- package/common/types/site.types.js +213 -0
- package/common/types/site.types.js.map +1 -0
- package/common/types/sms.types.d.ts +40 -0
- package/common/types/sms.types.js +27 -0
- package/common/types/sms.types.js.map +1 -0
- package/common/types/state-machine.types.d.ts +591 -0
- package/common/types/state-machine.types.js +144 -0
- package/common/types/state-machine.types.js.map +1 -0
- package/common/types/states.types.d.ts +77 -0
- package/common/types/states.types.js +137 -0
- package/common/types/states.types.js.map +1 -0
- package/common/types/subdoc-preview.types.d.ts +379 -0
- package/common/types/subdoc-preview.types.js +24 -0
- package/common/types/subdoc-preview.types.js.map +1 -0
- package/common/types/task.types.d.ts +537 -0
- package/common/types/task.types.js +211 -0
- package/common/types/task.types.js.map +1 -0
- package/common/types/trade-adjustment.type.d.ts +40 -0
- package/common/types/trade-adjustment.type.js +26 -0
- package/common/types/trade-adjustment.type.js.map +1 -0
- package/common/types/trade-line-item.types.d.ts +312 -0
- package/common/types/trade-line-item.types.js +89 -0
- package/common/types/trade-line-item.types.js.map +1 -0
- package/common/types/trade.types.d.ts +1987 -0
- package/common/types/trade.types.js +780 -0
- package/common/types/trade.types.js.map +1 -0
- package/common/types/transaction.types.d.ts +375 -0
- package/common/types/transaction.types.js +154 -0
- package/common/types/transaction.types.js.map +1 -0
- package/common/types/trusted-contact.types.d.ts +440 -0
- package/common/types/trusted-contact.types.js +95 -0
- package/common/types/trusted-contact.types.js.map +1 -0
- package/common/types/typography.types.d.ts +52 -0
- package/common/types/typography.types.js +67 -0
- package/common/types/typography.types.js.map +1 -0
- package/common/types/user-manual.types.d.ts +287 -0
- package/common/types/user-manual.types.js +192 -0
- package/common/types/user-manual.types.js.map +1 -0
- package/common/types/user-setting.types.d.ts +273 -0
- package/common/types/user-setting.types.js +85 -0
- package/common/types/user-setting.types.js.map +1 -0
- package/common/types/user.types.d.ts +1946 -0
- package/common/types/user.types.js +237 -0
- package/common/types/user.types.js.map +1 -0
- package/common/types/webhook.types.d.ts +10829 -0
- package/common/types/webhook.types.js +658 -0
- package/common/types/webhook.types.js.map +1 -0
- package/common/types/zip.type.d.ts +35 -0
- package/common/types/zip.type.js +28 -0
- package/common/types/zip.type.js.map +1 -0
- package/contracts/clients/accounts/index.d.ts +308 -0
- package/contracts/clients/accounts/index.js +43 -0
- package/contracts/clients/accounts/index.js.map +1 -0
- package/contracts/clients/aic/index.d.ts +280 -0
- package/contracts/clients/aic/index.js +47 -0
- package/contracts/clients/aic/index.js.map +1 -0
- package/contracts/clients/api-key-logs/index.d.ts +287 -0
- package/contracts/clients/api-key-logs/index.js +37 -0
- package/contracts/clients/api-key-logs/index.js.map +1 -0
- package/contracts/clients/api-keys/index.d.ts +374 -0
- package/contracts/clients/api-keys/index.js +59 -0
- package/contracts/clients/api-keys/index.js.map +1 -0
- package/contracts/clients/assets/index.d.ts +1028 -0
- package/contracts/clients/assets/index.js +80 -0
- package/contracts/clients/assets/index.js.map +1 -0
- package/contracts/clients/auth/index.d.ts +236 -0
- package/contracts/clients/auth/index.js +38 -0
- package/contracts/clients/auth/index.js.map +1 -0
- package/contracts/clients/cart/index.d.ts +229 -0
- package/contracts/clients/cart/index.js +63 -0
- package/contracts/clients/cart/index.js.map +1 -0
- package/contracts/clients/files/index.d.ts +552 -0
- package/contracts/clients/files/index.js +142 -0
- package/contracts/clients/files/index.js.map +1 -0
- package/contracts/clients/files-public/index.d.ts +552 -0
- package/contracts/clients/files-public/index.js +142 -0
- package/contracts/clients/files-public/index.js.map +1 -0
- package/contracts/clients/index.d.ts +12476 -0
- package/contracts/clients/index.js +52 -0
- package/contracts/clients/index.js.map +1 -0
- package/contracts/clients/individuals/index.d.ts +3199 -0
- package/contracts/clients/individuals/index.js +74 -0
- package/contracts/clients/individuals/index.js.map +1 -0
- package/contracts/clients/investor-accounts/index.d.ts +339 -0
- package/contracts/clients/investor-accounts/index.js +73 -0
- package/contracts/clients/investor-accounts/index.js.map +1 -0
- package/contracts/clients/issuer-payment-methods/index.d.ts +276 -0
- package/contracts/clients/issuer-payment-methods/index.js +24 -0
- package/contracts/clients/issuer-payment-methods/index.js.map +1 -0
- package/contracts/clients/issuers/index.d.ts +449 -0
- package/contracts/clients/issuers/index.js +75 -0
- package/contracts/clients/issuers/index.js.map +1 -0
- package/contracts/clients/kyc/index.d.ts +345 -0
- package/contracts/clients/kyc/index.js +49 -0
- package/contracts/clients/kyc/index.js.map +1 -0
- package/contracts/clients/legal-entities/index.d.ts +887 -0
- package/contracts/clients/legal-entities/index.js +74 -0
- package/contracts/clients/legal-entities/index.js.map +1 -0
- package/contracts/clients/offerings/index.d.ts +767 -0
- package/contracts/clients/offerings/index.js +95 -0
- package/contracts/clients/offerings/index.js.map +1 -0
- package/contracts/clients/payment-methods/index.d.ts +456 -0
- package/contracts/clients/payment-methods/index.js +68 -0
- package/contracts/clients/payment-methods/index.js.map +1 -0
- package/contracts/clients/secure-requests/index.d.ts +100 -0
- package/contracts/clients/secure-requests/index.js +22 -0
- package/contracts/clients/secure-requests/index.js.map +1 -0
- package/contracts/clients/sites/index.d.ts +657 -0
- package/contracts/clients/sites/index.js +40 -0
- package/contracts/clients/sites/index.js.map +1 -0
- package/contracts/clients/trade-line-items/index.d.ts +216 -0
- package/contracts/clients/trade-line-items/index.js +47 -0
- package/contracts/clients/trade-line-items/index.js.map +1 -0
- package/contracts/clients/trades/index.d.ts +865 -0
- package/contracts/clients/trades/index.js +156 -0
- package/contracts/clients/trades/index.js.map +1 -0
- package/contracts/clients/transactions/index.d.ts +88 -0
- package/contracts/clients/transactions/index.js +25 -0
- package/contracts/clients/transactions/index.js.map +1 -0
- package/package.json +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 -60
- package/contracts/clients/files/index.ts +0 -166
- package/contracts/clients/files-public/index.ts +0 -166
- package/contracts/clients/index.ts +0 -48
- 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/trade-line-items/index.ts +0 -66
- 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
|
@@ -1,999 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
InvestmentType,
|
|
4
|
-
IPaginationMeta,
|
|
5
|
-
FundingStatus,
|
|
6
|
-
TxnCheck,
|
|
7
|
-
PaginationOptionsZod,
|
|
8
|
-
dateSchema,
|
|
9
|
-
BaseStatus,
|
|
10
|
-
ComplianceReview,
|
|
11
|
-
OfferingType,
|
|
12
|
-
ManagedByType,
|
|
13
|
-
SignatureStatus,
|
|
14
|
-
TradeType,
|
|
15
|
-
TradeStatus,
|
|
16
|
-
SortOrder,
|
|
17
|
-
SortBy,
|
|
18
|
-
AicStatus,
|
|
19
|
-
AMLStatus,
|
|
20
|
-
KYCStatus,
|
|
21
|
-
createDateSchema,
|
|
22
|
-
AccountStatus,
|
|
23
|
-
SavedQuery,
|
|
24
|
-
} from './common.types';
|
|
25
|
-
import { offeringIdSchema } from './offering.types';
|
|
26
|
-
import { IBaseEntity } from './entity.types';
|
|
27
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
28
|
-
import { TypeID } from 'typeid-js';
|
|
29
|
-
import {
|
|
30
|
-
paymentMethodIdSchema,
|
|
31
|
-
PaymentMethodType,
|
|
32
|
-
} from './payment-methods.types';
|
|
33
|
-
import {
|
|
34
|
-
investorAccountIdSchema,
|
|
35
|
-
InvestorAccountExportFilters,
|
|
36
|
-
ComplianceInvestorAccountExportFilters,
|
|
37
|
-
RegisteredInvestorUserRawZod,
|
|
38
|
-
} from './investor-account.types';
|
|
39
|
-
import {
|
|
40
|
-
tradeLineItemIdSchema,
|
|
41
|
-
TradeLineItemZod,
|
|
42
|
-
} from './trade-line-item.type';
|
|
43
|
-
import { TradeAdjustmentZod } from './trade-adjustment.type';
|
|
44
|
-
import { TransactionZod } from './transaction.types';
|
|
45
|
-
import { accountIdSchema } from './account.types';
|
|
46
|
-
import { userIdSchema } from './user.types';
|
|
47
|
-
import { issuerIdSchema } from './issuer.types';
|
|
48
|
-
import {
|
|
49
|
-
GetSecondaryCustomerFiltersZod,
|
|
50
|
-
SecondaryCustomer,
|
|
51
|
-
} from './secondary-customer.types';
|
|
52
|
-
import {
|
|
53
|
-
SecondaryTrade,
|
|
54
|
-
SecondaryTradeFiltersZod,
|
|
55
|
-
} from './secondary-trade.types';
|
|
56
|
-
import { InvestorAccount } from '../../investor-accounts/entities/investor-account.entity';
|
|
57
|
-
import { Trade } from '../../trades/entities/trade.entity';
|
|
58
|
-
import { fileIdSchema } from './file.types';
|
|
59
|
-
|
|
60
|
-
extendZodWithOpenApi(z);
|
|
61
|
-
|
|
62
|
-
// Zod schemas for attach subdoc endpoints
|
|
63
|
-
export const PostAttachSubdocBody = z.object({
|
|
64
|
-
lineItemId: tradeLineItemIdSchema.openapi({
|
|
65
|
-
example: 'trade_line_item_01kctsycw3fq7sj6hedvy62cja',
|
|
66
|
-
}),
|
|
67
|
-
fileId: z
|
|
68
|
-
.lazy(() => fileIdSchema)
|
|
69
|
-
.openapi({ example: 'file_01je6ht4b8fbmttkzh2hs82xqp' }),
|
|
70
|
-
primarySignatureStatus: z
|
|
71
|
-
.nativeEnum(SignatureStatus)
|
|
72
|
-
.openapi({ example: 'SIGNED' }),
|
|
73
|
-
secondarySignatureStatus: z
|
|
74
|
-
.nativeEnum(SignatureStatus)
|
|
75
|
-
.optional()
|
|
76
|
-
.openapi({ example: 'SIGNED' }),
|
|
77
|
-
});
|
|
78
|
-
export type PostAttachSubdocBody = z.infer<typeof PostAttachSubdocBody>;
|
|
79
|
-
|
|
80
|
-
export const PutAttachSubdocBody = z.object({
|
|
81
|
-
lineItemId: tradeLineItemIdSchema
|
|
82
|
-
.optional()
|
|
83
|
-
.openapi({ example: 'trade_line_item_01kctsycw3fq7sj6hedvy62cja' }),
|
|
84
|
-
fileId: z
|
|
85
|
-
.lazy(() => fileIdSchema)
|
|
86
|
-
.optional()
|
|
87
|
-
.openapi({ example: 'file_01je6ht4b8fbmttkzh2hs82xqp' }),
|
|
88
|
-
primarySignatureStatus: z
|
|
89
|
-
.nativeEnum(SignatureStatus)
|
|
90
|
-
.optional()
|
|
91
|
-
.openapi({ example: 'SIGNED' }),
|
|
92
|
-
secondarySignatureStatus: z
|
|
93
|
-
.nativeEnum(SignatureStatus)
|
|
94
|
-
.optional()
|
|
95
|
-
.openapi({ example: 'SIGNED' }),
|
|
96
|
-
});
|
|
97
|
-
export type PutAttachSubdocBody = z.infer<typeof PutAttachSubdocBody>;
|
|
98
|
-
|
|
99
|
-
export const PatchSubdocSignatureBody = z.object({
|
|
100
|
-
lineItemId: tradeLineItemIdSchema.optional().openapi({
|
|
101
|
-
example: 'trade_line_item_01kctsycw3fq7sj6hedvy62cja',
|
|
102
|
-
description:
|
|
103
|
-
'Optional. If not provided, updates the first line item with an attached subdoc. Required for trades with multiple line items.',
|
|
104
|
-
}),
|
|
105
|
-
primarySignatureStatus: z.nativeEnum(SignatureStatus).optional().openapi({
|
|
106
|
-
example: 'SIGNED',
|
|
107
|
-
description: 'Primary signer signature status',
|
|
108
|
-
}),
|
|
109
|
-
secondarySignatureStatus: z.nativeEnum(SignatureStatus).optional().openapi({
|
|
110
|
-
example: 'SIGNED',
|
|
111
|
-
description:
|
|
112
|
-
'Secondary signer signature status. Only applicable for JOINT investor accounts.',
|
|
113
|
-
}),
|
|
114
|
-
});
|
|
115
|
-
export type PatchSubdocSignatureBody = z.infer<typeof PatchSubdocSignatureBody>;
|
|
116
|
-
|
|
117
|
-
export const AttachSubdocResponse = z.object({
|
|
118
|
-
success: z.boolean(),
|
|
119
|
-
message: z.string(),
|
|
120
|
-
});
|
|
121
|
-
export type AttachSubdocResponse = z.infer<typeof AttachSubdocResponse>;
|
|
122
|
-
|
|
123
|
-
export const CheckResultsSchema = z.object({
|
|
124
|
-
fundingStatus: z.boolean(),
|
|
125
|
-
agreementStatus: z.boolean(),
|
|
126
|
-
subscriptionAgreementCheck: z.boolean(),
|
|
127
|
-
kycStatus: z.boolean(),
|
|
128
|
-
sanctionsStatus: z.boolean(),
|
|
129
|
-
accreditationStatus: z.boolean(),
|
|
130
|
-
kybStatus: z.boolean(),
|
|
131
|
-
});
|
|
132
|
-
export type CheckResults = z.infer<typeof CheckResultsSchema>;
|
|
133
|
-
|
|
134
|
-
export const TradeIdPrefix = 'trade';
|
|
135
|
-
|
|
136
|
-
export const tradeIdSchema = z.string().refine(
|
|
137
|
-
(value) => {
|
|
138
|
-
try {
|
|
139
|
-
const tid = TypeID.fromString(value);
|
|
140
|
-
return tid.getType() === TradeIdPrefix;
|
|
141
|
-
} catch {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
message:
|
|
147
|
-
'Invalid trade ID format. Must be a valid TypeID with "trade" prefix. ex: trade_00041061050r3gg28a1c60t3gf',
|
|
148
|
-
},
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
export const tradeIdOrTidSchema = z.union([
|
|
152
|
-
z.string().refine(
|
|
153
|
-
(value) => {
|
|
154
|
-
try {
|
|
155
|
-
const tid = TypeID.fromString(value);
|
|
156
|
-
return tid.getType() === TradeIdPrefix;
|
|
157
|
-
} catch {
|
|
158
|
-
return false;
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
message:
|
|
163
|
-
'Invalid trade ID format. Must be a valid TypeID with "trade" prefix. ex: trade_00041061050r3gg28a1c60t3gf',
|
|
164
|
-
},
|
|
165
|
-
),
|
|
166
|
-
z
|
|
167
|
-
.string()
|
|
168
|
-
.min(1)
|
|
169
|
-
.max(50)
|
|
170
|
-
.openapi({ example: 'tid_00041061050r3gg28a1c60t3gf' }),
|
|
171
|
-
]);
|
|
172
|
-
|
|
173
|
-
export enum SaStatus {
|
|
174
|
-
PENDING = BaseStatus.PENDING,
|
|
175
|
-
SIGNED = BaseStatus.SIGNED,
|
|
176
|
-
DECLINED = BaseStatus.DECLINED,
|
|
177
|
-
NEEDS_REVIEW = BaseStatus.NEEDS_REVIEW,
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export enum TradeSystemLogType {
|
|
181
|
-
SUB_DOC_CHECK = 'Subscription Agreement Check',
|
|
182
|
-
ADDRESS_CHECK = 'Address Check',
|
|
183
|
-
COUNTRY_CHECK = 'Country Check',
|
|
184
|
-
CONCENTRATION_CHECK = 'Concentration Check',
|
|
185
|
-
KYC_CHECK = 'KYC Check',
|
|
186
|
-
AML_CHECK = 'AML Check',
|
|
187
|
-
AIC_CHECK = 'AIC Check',
|
|
188
|
-
USER_AGE_CHECK = 'User Age Check',
|
|
189
|
-
KYC_NAME_CHECK = 'KYC Name Check',
|
|
190
|
-
AML_NAME_CHECK = 'AML Name Check',
|
|
191
|
-
AIC_NAME_CHECK = 'AIC Name Check',
|
|
192
|
-
KYC_DOB_CHECK = 'KYC DOB Check',
|
|
193
|
-
AIC_SSN_CHECK = 'AIC SSN Check',
|
|
194
|
-
// Data Integrity Checks For Imported Trades
|
|
195
|
-
SHARES_CHECK = 'Shares Check',
|
|
196
|
-
PRICE_PER_UNIT_CHECK = 'Price Per Unit Check',
|
|
197
|
-
ISSUER_CHECK = 'Issuer Check',
|
|
198
|
-
INVESTOR_CHECK = 'Investor Check',
|
|
199
|
-
OFFERING_CHECK = 'Offering Check',
|
|
200
|
-
ASSETS_CHECK = 'Assets Check',
|
|
201
|
-
INDIVIDUALS_CHECK = 'Individuals Check',
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export enum SaCheck {
|
|
205
|
-
PENDING = BaseStatus.PENDING,
|
|
206
|
-
NEEDS_REVIEW = BaseStatus.NEEDS_REVIEW,
|
|
207
|
-
APPROVED = BaseStatus.APPROVED,
|
|
208
|
-
REJECTED = BaseStatus.REJECTED,
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// cart NEEDS_INFO PLACED IN_REVIEW AWAITING_FUNDING CANCELLED SETTLED
|
|
212
|
-
|
|
213
|
-
export enum SystemReviewCheck {
|
|
214
|
-
PENDING = BaseStatus.PENDING,
|
|
215
|
-
APPROVED = BaseStatus.APPROVED,
|
|
216
|
-
REJECTED = BaseStatus.REJECTED,
|
|
217
|
-
NEEDS_REVIEW = BaseStatus.NEEDS_REVIEW,
|
|
218
|
-
WARNING = BaseStatus.WARNING,
|
|
219
|
-
INCOMPLETE = BaseStatus.INCOMPLETE,
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export enum Platforms {
|
|
223
|
-
DALMORE = 'DALMORE',
|
|
224
|
-
IMPORT = 'IMPORT',
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export enum MatchResultStatus {
|
|
228
|
-
MATCHED = 'MATCHED',
|
|
229
|
-
UNMATCHED = 'UNMATCHED',
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export enum TradeSystemReviewLogStatus {
|
|
233
|
-
PASSED = 'PASSED',
|
|
234
|
-
WARNING = 'WARNING',
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export const matchResultSchema = z.object({
|
|
238
|
-
actual: z.string().min(1).max(200),
|
|
239
|
-
status: z.nativeEnum(MatchResultStatus),
|
|
240
|
-
extracted: z.string().min(1).max(200),
|
|
241
|
-
corrected: z.string().min(1).max(200).optional().nullable(),
|
|
242
|
-
});
|
|
243
|
-
export type matchResultSchema = z.infer<typeof matchResultSchema>;
|
|
244
|
-
|
|
245
|
-
const saLogItemSchema = z.object({
|
|
246
|
-
tradeLineItemId: tradeLineItemIdSchema,
|
|
247
|
-
signerName: matchResultSchema.optional(),
|
|
248
|
-
totalAmount: matchResultSchema.optional(),
|
|
249
|
-
investorName: matchResultSchema.optional(),
|
|
250
|
-
numberOfShares: matchResultSchema.optional(),
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
export type saLogItemSchema = z.infer<typeof saLogItemSchema>;
|
|
254
|
-
|
|
255
|
-
export const SaLogSchema = z.object({
|
|
256
|
-
finalStatus: z.nativeEnum(SaStatus),
|
|
257
|
-
matchResults: z.array(saLogItemSchema),
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
export type saLogSchema = z.infer<typeof SaLogSchema>;
|
|
261
|
-
|
|
262
|
-
export const PatchSaLogSchema = z.object({
|
|
263
|
-
matchResults: z.array(saLogItemSchema),
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
export type PatchSaLogSchema = z.infer<typeof PatchSaLogSchema>;
|
|
267
|
-
|
|
268
|
-
export const TradeBalanceResultZod = z.object({
|
|
269
|
-
tradeAdjustments: z.number().multipleOf(0.01),
|
|
270
|
-
chargedAmount: z.number().multipleOf(0.01),
|
|
271
|
-
balance: z.number().multipleOf(0.01),
|
|
272
|
-
});
|
|
273
|
-
export type TradeBalanceResultZod = z.infer<typeof TradeBalanceResultZod>;
|
|
274
|
-
|
|
275
|
-
export const TradeZod = IBaseEntity.extend({
|
|
276
|
-
investorAccountId: z.lazy(() => investorAccountIdSchema.nullable()),
|
|
277
|
-
accountId: accountIdSchema.nullable(),
|
|
278
|
-
offeringId: z.lazy(() => offeringIdSchema.nullable()),
|
|
279
|
-
paymentMethodId: z.lazy(() => paymentMethodIdSchema).nullable(),
|
|
280
|
-
userId: z.lazy(() => userIdSchema.nullable()),
|
|
281
|
-
tradeNumber: z.string(),
|
|
282
|
-
ip: z.string().nullable(),
|
|
283
|
-
tid: z.string().nullable(),
|
|
284
|
-
investmentType: z.nativeEnum(InvestmentType),
|
|
285
|
-
numberOfShares: z.number().int(),
|
|
286
|
-
pricePerShare: z.number().multipleOf(0.01),
|
|
287
|
-
lineItems: z.array(z.lazy(() => TradeLineItemZod)),
|
|
288
|
-
adjustments: z.array(z.lazy(() => TradeAdjustmentZod)),
|
|
289
|
-
transactions: z.array(z.lazy(() => TransactionZod)),
|
|
290
|
-
totalAmount: z.number().multipleOf(0.01).nullable(),
|
|
291
|
-
tradeStatus: z.nativeEnum(TradeStatus),
|
|
292
|
-
tradeStatusUnmapped: z.string().nullable(),
|
|
293
|
-
tradeDate: z.date().nullable(),
|
|
294
|
-
saStatus: z.nativeEnum(SaStatus),
|
|
295
|
-
saStatusUnmapped: z.string().nullable(),
|
|
296
|
-
saUrl: z.string().nullable(),
|
|
297
|
-
saSignedAt: z.date().nullable(),
|
|
298
|
-
saExtractedNumberOfShares: z.string().nullable(),
|
|
299
|
-
saExtractedTotalAmount: z.string().nullable(),
|
|
300
|
-
saExtractedPricePerShare: z.string().nullable(),
|
|
301
|
-
saExtractedInvestorType: z.string().nullable(),
|
|
302
|
-
saExtractedSigner: z.string().nullable(),
|
|
303
|
-
saExtractedSignatureDate: z.date().nullable(),
|
|
304
|
-
saExtractedSigner2: z.string().nullable(),
|
|
305
|
-
saExtractedSignatureDate2: z.date().nullable(),
|
|
306
|
-
saCheck: z.nativeEnum(SaCheck),
|
|
307
|
-
saCheckedAt: z.date().nullable(),
|
|
308
|
-
saLog: SaLogSchema.nullable(),
|
|
309
|
-
txnTid: z.string().nullable(),
|
|
310
|
-
txnResponse: z.string().nullable(),
|
|
311
|
-
txnPaymentMethod: z.nativeEnum(PaymentMethodType).nullable(),
|
|
312
|
-
txnCurrencyCode: z.string().length(3).nullable(),
|
|
313
|
-
txnChargedAmount: z.number().multipleOf(0.01).nullable(),
|
|
314
|
-
txnDate: z.date().nullable(),
|
|
315
|
-
txnSettledDate: z.date().nullable(),
|
|
316
|
-
fundingStatus: z.nativeEnum(FundingStatus).nullable(),
|
|
317
|
-
fundingStatusUnmapped: z.string().nullable(),
|
|
318
|
-
txnCheck: z.nativeEnum(TxnCheck).nullable(),
|
|
319
|
-
txnCheckedAt: z.date().nullable(),
|
|
320
|
-
txnLog: z.string().nullable(),
|
|
321
|
-
systemReviewCheck: z.nativeEnum(SystemReviewCheck).nullable(),
|
|
322
|
-
systemReviewCheckedAt: z.date().nullable(),
|
|
323
|
-
systemReviewLog: z.string().nullable(),
|
|
324
|
-
complianceReview: z.nativeEnum(ComplianceReview).nullable(),
|
|
325
|
-
complianceReviewNotes: z.string().nullable(),
|
|
326
|
-
complianceReviewerId: z.string().nullable(),
|
|
327
|
-
issuerId: z.lazy(() => issuerIdSchema.nullable()),
|
|
328
|
-
complianceReviewName: z.string().nullable(),
|
|
329
|
-
complianceReviewAt: z.date().nullable(),
|
|
330
|
-
tradeType: z.nativeEnum(TradeType).nullable(),
|
|
331
|
-
placedAt: z.date().nullable(),
|
|
332
|
-
platform: z.string(),
|
|
333
|
-
cancelledAt: z.date().nullable(),
|
|
334
|
-
cancelledById: z.string().nullable(),
|
|
335
|
-
cancelledReason: z.string().nullable(),
|
|
336
|
-
cancellationPeriod: z.number().nullable(),
|
|
337
|
-
disbursed: z.boolean().optional(),
|
|
338
|
-
tradeAdjustments: z.number().nullable().optional(),
|
|
339
|
-
chargedAmount: z.number().nullable().optional(),
|
|
340
|
-
balance: z.number().nullable().optional(),
|
|
341
|
-
isUncleared24h: z.boolean(),
|
|
342
|
-
});
|
|
343
|
-
export type TradeZod = z.infer<typeof TradeZod>;
|
|
344
|
-
|
|
345
|
-
export const IPaginatedTrade = z.object({
|
|
346
|
-
items: z.array(TradeZod),
|
|
347
|
-
meta: IPaginationMeta,
|
|
348
|
-
});
|
|
349
|
-
export type IPaginatedTrade = z.infer<typeof IPaginatedTrade>;
|
|
350
|
-
|
|
351
|
-
export const IPaginatedReviewTrade = z.object({
|
|
352
|
-
totalCount: z.number().int(),
|
|
353
|
-
currentPosition: z.number().int(),
|
|
354
|
-
tradeIds: z.array(tradeIdSchema),
|
|
355
|
-
});
|
|
356
|
-
export type IPaginatedReviewTrade = z.infer<typeof IPaginatedReviewTrade>;
|
|
357
|
-
|
|
358
|
-
export const TradeSummaryZod = z.object({
|
|
359
|
-
accountId: accountIdSchema,
|
|
360
|
-
accountName: z.string(),
|
|
361
|
-
regACount: z.number().int(),
|
|
362
|
-
regCfCount: z.number().int(),
|
|
363
|
-
regDCount: z.number().int(),
|
|
364
|
-
totalCount: z.number().int(),
|
|
365
|
-
totalReadyToApproveCount: z.number().int(),
|
|
366
|
-
regAReadyToApproveCount: z.number().int(),
|
|
367
|
-
regCfReadyToApproveCount: z.number().int(),
|
|
368
|
-
regDReadyToApproveCount: z.number().int(),
|
|
369
|
-
});
|
|
370
|
-
export type TradeSummaryZod = z.infer<typeof TradeSummaryZod>;
|
|
371
|
-
|
|
372
|
-
export const IPaginatedTradeSummaryResponse = z.object({
|
|
373
|
-
items: z.array(TradeSummaryZod),
|
|
374
|
-
meta: IPaginationMeta,
|
|
375
|
-
});
|
|
376
|
-
export type IPaginatedTradeSummaryResponse = z.infer<
|
|
377
|
-
typeof IPaginatedTradeSummaryResponse
|
|
378
|
-
>;
|
|
379
|
-
|
|
380
|
-
export const TradeSummaryFilterZod = z.object({
|
|
381
|
-
reviewStatus: z.nativeEnum(ComplianceReview).optional(),
|
|
382
|
-
managedBy: z.nativeEnum(ManagedByType).optional(),
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
const tradeStatusValues = Object.values(TradeStatus) as string[];
|
|
386
|
-
|
|
387
|
-
export const TradeFiltersZod = z.object({
|
|
388
|
-
investmentType: z.nativeEnum(InvestmentType).optional(),
|
|
389
|
-
tradeStatus: z
|
|
390
|
-
.string()
|
|
391
|
-
.optional()
|
|
392
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
393
|
-
.refine(
|
|
394
|
-
(statuses) =>
|
|
395
|
-
statuses.every((status) => tradeStatusValues.includes(status as any)),
|
|
396
|
-
{
|
|
397
|
-
message: `Invalid trade status option provided. Valid options are: ${tradeStatusValues.join(',')}`,
|
|
398
|
-
},
|
|
399
|
-
)
|
|
400
|
-
.openapi({
|
|
401
|
-
example: `${tradeStatusValues.join(',')}`,
|
|
402
|
-
}),
|
|
403
|
-
from: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
404
|
-
to: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
405
|
-
saStatus: z.nativeEnum(SaStatus).optional(),
|
|
406
|
-
saCheck: z.nativeEnum(SaCheck).optional(),
|
|
407
|
-
txnPaymentMethod: z.nativeEnum(PaymentMethodType).optional(),
|
|
408
|
-
fundingStatus: z.nativeEnum(FundingStatus).optional(),
|
|
409
|
-
txnCheck: z.nativeEnum(TxnCheck).optional(),
|
|
410
|
-
systemReviewCheck: z.nativeEnum(SystemReviewCheck).optional(),
|
|
411
|
-
complianceReview: z.nativeEnum(ComplianceReview).optional(),
|
|
412
|
-
beenDisbursed: z.enum(['true', 'false']).optional(),
|
|
413
|
-
search: z.string().max(50).optional(),
|
|
414
|
-
offeringId: z
|
|
415
|
-
.lazy(() => offeringIdSchema)
|
|
416
|
-
.optional()
|
|
417
|
-
.openapi({
|
|
418
|
-
example: 'offering_00041061050r3gg28a1c60t3gf',
|
|
419
|
-
}),
|
|
420
|
-
accountId: accountIdSchema.optional(),
|
|
421
|
-
issuerId: z
|
|
422
|
-
.lazy(() => issuerIdSchema)
|
|
423
|
-
.optional()
|
|
424
|
-
.openapi({
|
|
425
|
-
example: 'issuer_01jfw4q6qef30s6fpqtsxw94ya',
|
|
426
|
-
}),
|
|
427
|
-
offeringType: z.nativeEnum(OfferingType).optional(),
|
|
428
|
-
managedBy: z.nativeEnum(ManagedByType).optional(),
|
|
429
|
-
platform: z.nativeEnum(Platforms).optional(),
|
|
430
|
-
investorAccountId: z.lazy(() => investorAccountIdSchema).optional(),
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
export const ComplianceTradesFiltersZod = z.object({
|
|
434
|
-
kycStatus: z.nativeEnum(KYCStatus).optional(),
|
|
435
|
-
aicStatus: z.nativeEnum(AicStatus).optional(),
|
|
436
|
-
amlStatus: z.nativeEnum(AMLStatus).optional(),
|
|
437
|
-
accountStatus: z.nativeEnum(AccountStatus).optional(),
|
|
438
|
-
savedQuery: z.nativeEnum(SavedQuery).optional(),
|
|
439
|
-
});
|
|
440
|
-
|
|
441
|
-
export type ComplianceTradesFiltersZod = z.infer<
|
|
442
|
-
typeof ComplianceTradesFiltersZod
|
|
443
|
-
>;
|
|
444
|
-
|
|
445
|
-
export const TradeSortZod = z.object({
|
|
446
|
-
sort: z
|
|
447
|
-
.enum([SortBy.PLACEDAT, SortBy.CREATED_AT, SortBy.UPDATED_AT])
|
|
448
|
-
.optional(),
|
|
449
|
-
dir: z.nativeEnum(SortOrder).optional(),
|
|
450
|
-
});
|
|
451
|
-
export type TradeSortZod = z.infer<typeof TradeSortZod>;
|
|
452
|
-
|
|
453
|
-
export const reviewTrades = z.object({
|
|
454
|
-
complianceReview: z.nativeEnum(ComplianceReview),
|
|
455
|
-
force: z.boolean().optional(),
|
|
456
|
-
forceApprovals: z
|
|
457
|
-
.array(z.enum(['kyc', 'aic', 'aml', 'subdoc']))
|
|
458
|
-
.optional()
|
|
459
|
-
.openapi({
|
|
460
|
-
example: ['kyc', 'aml'],
|
|
461
|
-
}), // items we are trying to force approve along with the trade
|
|
462
|
-
trades: z
|
|
463
|
-
.array(tradeIdSchema)
|
|
464
|
-
.min(1, 'At least one trade is required')
|
|
465
|
-
.max(1000, 'Maximum of 1000 trades allowed')
|
|
466
|
-
.openapi({
|
|
467
|
-
example: [
|
|
468
|
-
'trade_00041061050r3gg28a1c60t3gf',
|
|
469
|
-
'trade_00041061050r3gg28a1c60t3g',
|
|
470
|
-
],
|
|
471
|
-
}),
|
|
472
|
-
rejectionReason: z.string().min(1).max(1000).optional().nullable(),
|
|
473
|
-
});
|
|
474
|
-
export type reviewTrades = z.infer<typeof reviewTrades>;
|
|
475
|
-
|
|
476
|
-
export const reviewAllTrades = z.object({
|
|
477
|
-
complianceReview: z.enum([
|
|
478
|
-
ComplianceReview.APPROVED,
|
|
479
|
-
]) /* only approved is supported for now */,
|
|
480
|
-
});
|
|
481
|
-
export type reviewAllTrades = z.infer<typeof reviewAllTrades>;
|
|
482
|
-
|
|
483
|
-
export const PatchTradeStatus = z.object({
|
|
484
|
-
tradeStatus: z.nativeEnum(TradeStatus),
|
|
485
|
-
});
|
|
486
|
-
export type PatchTradeStatus = z.infer<typeof PatchTradeStatus>;
|
|
487
|
-
|
|
488
|
-
export const tradesInclude = z.enum([
|
|
489
|
-
'tradeDisbursements',
|
|
490
|
-
'adjustments',
|
|
491
|
-
'account',
|
|
492
|
-
'issuer',
|
|
493
|
-
'lineItems',
|
|
494
|
-
'transactions',
|
|
495
|
-
'investorAccount',
|
|
496
|
-
'offering',
|
|
497
|
-
'paymentMethod',
|
|
498
|
-
]);
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* @description Query parameters for including related entities
|
|
502
|
-
* @xample in contract us as -> query: z.object({}).merge(UsersIncludeQuery),
|
|
503
|
-
*/
|
|
504
|
-
export const TradesIncludeQuery = z.object({
|
|
505
|
-
include: z
|
|
506
|
-
.string()
|
|
507
|
-
.optional()
|
|
508
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
509
|
-
.refine(
|
|
510
|
-
(includes) =>
|
|
511
|
-
includes.every((include) =>
|
|
512
|
-
tradesInclude.options.includes(include as any),
|
|
513
|
-
),
|
|
514
|
-
{
|
|
515
|
-
message: `Invalid include option provided. Valid options are: ${tradesInclude.options.join(',')}`,
|
|
516
|
-
},
|
|
517
|
-
)
|
|
518
|
-
.openapi({
|
|
519
|
-
example: `${tradesInclude.options.join(',')}`,
|
|
520
|
-
}),
|
|
521
|
-
});
|
|
522
|
-
|
|
523
|
-
export interface TradesIncludeQuery
|
|
524
|
-
extends z.infer<typeof TradesIncludeQuery> {}
|
|
525
|
-
|
|
526
|
-
export enum TradeExportType {
|
|
527
|
-
PAGE = 'PAGE',
|
|
528
|
-
ALL = 'ALL',
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
export const ExportTradesQuery = PaginationOptionsZod.merge(TradeFiltersZod)
|
|
532
|
-
.merge(ComplianceTradesFiltersZod)
|
|
533
|
-
.merge(TradesIncludeQuery)
|
|
534
|
-
.merge(TradeSortZod)
|
|
535
|
-
.extend({
|
|
536
|
-
exportType: z
|
|
537
|
-
.nativeEnum(TradeExportType)
|
|
538
|
-
.optional()
|
|
539
|
-
.default(TradeExportType.PAGE),
|
|
540
|
-
});
|
|
541
|
-
export type ExportTradesQuery = z.infer<typeof ExportTradesQuery>;
|
|
542
|
-
|
|
543
|
-
const tradesColumn = z.enum([
|
|
544
|
-
'id',
|
|
545
|
-
'investorAccountId',
|
|
546
|
-
'investorAccount',
|
|
547
|
-
'accountId',
|
|
548
|
-
'account',
|
|
549
|
-
'offeringId',
|
|
550
|
-
'offering',
|
|
551
|
-
'paymentMethodId',
|
|
552
|
-
'paymentMethod',
|
|
553
|
-
'userId',
|
|
554
|
-
'user',
|
|
555
|
-
'disbursementId',
|
|
556
|
-
'disbursement',
|
|
557
|
-
'tradeNumber',
|
|
558
|
-
'ip',
|
|
559
|
-
'tid',
|
|
560
|
-
'platform',
|
|
561
|
-
'investmentType',
|
|
562
|
-
'numberOfShares',
|
|
563
|
-
'pricePerShare',
|
|
564
|
-
'lineItems',
|
|
565
|
-
'transactions',
|
|
566
|
-
'totalAmount',
|
|
567
|
-
'tradeStatus',
|
|
568
|
-
'tradeStatusUnmapped',
|
|
569
|
-
'tradeDate',
|
|
570
|
-
'saStatus',
|
|
571
|
-
'saStatusUnmapped',
|
|
572
|
-
'saUrl',
|
|
573
|
-
'saSignedAt',
|
|
574
|
-
'saExtractedNumberOfShares',
|
|
575
|
-
'saExtractedTotalAmount',
|
|
576
|
-
'saExtractedPricePerShare',
|
|
577
|
-
'saExtractedInvestorType',
|
|
578
|
-
'saExtractedSigner',
|
|
579
|
-
'saExtractedSignatureDate',
|
|
580
|
-
'saExtractedSigner2',
|
|
581
|
-
'saExtractedSignatureDate2',
|
|
582
|
-
'saCheck',
|
|
583
|
-
'saCheckedAt',
|
|
584
|
-
'saLog',
|
|
585
|
-
'txnTid',
|
|
586
|
-
'txnResponse',
|
|
587
|
-
'txnPaymentMethod',
|
|
588
|
-
'txnCurrencyCode',
|
|
589
|
-
'txnChargedAmount',
|
|
590
|
-
'txnDate',
|
|
591
|
-
'txnSettledDate',
|
|
592
|
-
'fundingStatus',
|
|
593
|
-
'fundingStatusUnmapped',
|
|
594
|
-
'txnCheck',
|
|
595
|
-
'txnCheckedAt',
|
|
596
|
-
'txnLog',
|
|
597
|
-
'systemReviewCheck',
|
|
598
|
-
'systemReviewLog',
|
|
599
|
-
'complianceReview',
|
|
600
|
-
'complianceReviewNotes',
|
|
601
|
-
'complianceReviewerId',
|
|
602
|
-
'managedBy',
|
|
603
|
-
'complianceReviewer',
|
|
604
|
-
'issuer',
|
|
605
|
-
'issuerId',
|
|
606
|
-
'complianceReviewName',
|
|
607
|
-
'complianceReviewAt',
|
|
608
|
-
'tradeType',
|
|
609
|
-
'placedAt',
|
|
610
|
-
'cancelledAt',
|
|
611
|
-
'cancelledById',
|
|
612
|
-
'cancelledReason',
|
|
613
|
-
'cancellationPeriod',
|
|
614
|
-
]);
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* @description Query parameters for including related entities
|
|
618
|
-
* @xample in contract us as -> query: z.object({}).merge(UsersIncludeQuery),
|
|
619
|
-
*/
|
|
620
|
-
export const TradesColumnQuery = z.object({
|
|
621
|
-
column: z
|
|
622
|
-
.string()
|
|
623
|
-
.optional()
|
|
624
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
625
|
-
.refine(
|
|
626
|
-
(columns) =>
|
|
627
|
-
columns.every((col) => tradesColumn.options.includes(col as any)),
|
|
628
|
-
{
|
|
629
|
-
message: `Invalid column option provided. Valid options are: ${tradesColumn.options.join(',')}`,
|
|
630
|
-
},
|
|
631
|
-
)
|
|
632
|
-
.openapi({
|
|
633
|
-
example: `${tradesColumn.options.join(',')}`,
|
|
634
|
-
}),
|
|
635
|
-
});
|
|
636
|
-
|
|
637
|
-
export const InvestorsTradeFiltersZod = z.object({
|
|
638
|
-
investorAccountId: z.lazy(() => investorAccountIdSchema).optional(),
|
|
639
|
-
tradeStatus: z.nativeEnum(TradeStatus).optional(),
|
|
640
|
-
search: z.string().min(1).max(50).optional(),
|
|
641
|
-
});
|
|
642
|
-
|
|
643
|
-
const investorsTradesInclude = z.enum([
|
|
644
|
-
'lineItems',
|
|
645
|
-
'investorAccount',
|
|
646
|
-
'issuer',
|
|
647
|
-
'offering',
|
|
648
|
-
]);
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* @description Query parameters for including related entities
|
|
652
|
-
* @xample in contract us as -> query: z.object({}).merge(UsersIncludeQuery),
|
|
653
|
-
*/
|
|
654
|
-
export const InvestorsTradesIncludeQuery = z.object({
|
|
655
|
-
include: z
|
|
656
|
-
.string()
|
|
657
|
-
.optional()
|
|
658
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
659
|
-
.refine(
|
|
660
|
-
(includes) =>
|
|
661
|
-
includes.every((include) =>
|
|
662
|
-
investorsTradesInclude.options.includes(include as any),
|
|
663
|
-
),
|
|
664
|
-
{
|
|
665
|
-
message: `Invalid include option provided. Valid options are: ${investorsTradesInclude.options.join(',')}`,
|
|
666
|
-
},
|
|
667
|
-
)
|
|
668
|
-
.openapi({
|
|
669
|
-
example: `${investorsTradesInclude.options.join(',')}`,
|
|
670
|
-
}),
|
|
671
|
-
});
|
|
672
|
-
export interface InvestorsTradesIncludeQuery
|
|
673
|
-
extends z.infer<typeof InvestorsTradesIncludeQuery> {}
|
|
674
|
-
|
|
675
|
-
export const InvestorsGetTradesQuery = PaginationOptionsZod.merge(
|
|
676
|
-
InvestorsTradeFiltersZod,
|
|
677
|
-
).merge(InvestorsTradesIncludeQuery);
|
|
678
|
-
|
|
679
|
-
export const UpdateTradeBody = z.object({
|
|
680
|
-
paymentMethodId: z.lazy(() => paymentMethodIdSchema),
|
|
681
|
-
});
|
|
682
|
-
|
|
683
|
-
export type UpdateTradeBodyType = z.infer<typeof UpdateTradeBody>;
|
|
684
|
-
|
|
685
|
-
export const PostTradeBody = z.object({
|
|
686
|
-
investorAccountId: z.lazy(() => investorAccountIdSchema).optional(),
|
|
687
|
-
investmentType: z.nativeEnum(InvestmentType).optional(),
|
|
688
|
-
});
|
|
689
|
-
|
|
690
|
-
export type PostTradeBodyType = z.infer<typeof PostTradeBody>;
|
|
691
|
-
|
|
692
|
-
export const InvestorsTradeResponse = IBaseEntity.extend({
|
|
693
|
-
investorAccountId: z.lazy(() => investorAccountIdSchema).nullable(),
|
|
694
|
-
accountId: z.string(),
|
|
695
|
-
offeringId: z.string().nullable(),
|
|
696
|
-
tid: z.string().nullable(),
|
|
697
|
-
investmentType: z.nativeEnum(InvestmentType),
|
|
698
|
-
numberOfShares: z.number().int(),
|
|
699
|
-
pricePerShare: z.number().multipleOf(0.01),
|
|
700
|
-
totalAmount: z.number().multipleOf(0.01).nullable(),
|
|
701
|
-
tradeStatus: z.nativeEnum(TradeStatus),
|
|
702
|
-
tradeStatusUnmapped: z.string().nullable(),
|
|
703
|
-
tradeDate: z.date().nullable(),
|
|
704
|
-
paymentMethodId: z.lazy(() => paymentMethodIdSchema).nullable(),
|
|
705
|
-
});
|
|
706
|
-
|
|
707
|
-
export const InvestorsPaginatedTrade = z.object({
|
|
708
|
-
items: z.array(InvestorsTradeResponse),
|
|
709
|
-
meta: IPaginationMeta,
|
|
710
|
-
});
|
|
711
|
-
export const IssuersTradeFiltersZod = z.object({
|
|
712
|
-
investmentType: z.nativeEnum(InvestmentType).optional(),
|
|
713
|
-
tradeStatus: z.nativeEnum(TradeStatus).optional(),
|
|
714
|
-
saStatus: z.nativeEnum(SaStatus).optional(),
|
|
715
|
-
saCheck: z.nativeEnum(SaCheck).optional(),
|
|
716
|
-
txnPaymentMethod: z.nativeEnum(PaymentMethodType).optional(),
|
|
717
|
-
fundingStatus: z.nativeEnum(FundingStatus).optional(),
|
|
718
|
-
txnCheck: z.nativeEnum(TxnCheck).optional(),
|
|
719
|
-
systemReviewCheck: z.nativeEnum(SystemReviewCheck).optional(),
|
|
720
|
-
complianceReview: z.nativeEnum(ComplianceReview).optional(),
|
|
721
|
-
beenDisbursed: z.enum(['true', 'false']).optional(),
|
|
722
|
-
search: z.string().optional().openapi({ example: 'Mike' }),
|
|
723
|
-
offeringId: z
|
|
724
|
-
.lazy(() => offeringIdSchema)
|
|
725
|
-
.optional()
|
|
726
|
-
.openapi({
|
|
727
|
-
example: 'offering_00041061050r3gg28a1c60t3gf',
|
|
728
|
-
}),
|
|
729
|
-
from: createDateSchema('START').optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
730
|
-
to: createDateSchema('END').optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
731
|
-
minAmount: z
|
|
732
|
-
.string()
|
|
733
|
-
.transform((num) => Number(num))
|
|
734
|
-
.pipe(z.number().multipleOf(0.01).min(0.01).max(10000000000))
|
|
735
|
-
.optional()
|
|
736
|
-
.openapi({ example: '2500.00' }),
|
|
737
|
-
maxAmount: z
|
|
738
|
-
.string()
|
|
739
|
-
.transform((num) => Number(num))
|
|
740
|
-
.pipe(z.number().multipleOf(0.01).min(0.01).max(10000000000))
|
|
741
|
-
.optional()
|
|
742
|
-
.openapi({ example: '15000000.50' }),
|
|
743
|
-
managedBy: z.nativeEnum(ManagedByType).optional(),
|
|
744
|
-
investorAccountId: z.lazy(() => investorAccountIdSchema).optional(),
|
|
745
|
-
});
|
|
746
|
-
export type IssuersTradeFiltersZod = z.infer<typeof IssuersTradeFiltersZod>;
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* Zod schema representing a union of all possible filter types based on portal type.
|
|
750
|
-
* This schema can be used for runtime validation of filter parameters.
|
|
751
|
-
*/
|
|
752
|
-
export const GetTradeFiltersSchema = z.union([
|
|
753
|
-
TradeFiltersZod,
|
|
754
|
-
IssuersTradeFiltersZod,
|
|
755
|
-
InvestorsTradeFiltersZod,
|
|
756
|
-
]);
|
|
757
|
-
|
|
758
|
-
/**
|
|
759
|
-
* Type representing the filters parameter for getTradeWithCalculatedFields.
|
|
760
|
-
* This is a union of all possible filter types based on portal type:
|
|
761
|
-
* - TradeFiltersZod (Compliance portal)
|
|
762
|
-
* - IssuersTradeFiltersZod (Issuer portal)
|
|
763
|
-
* - InvestorsTradeFiltersZod (Investor portal)
|
|
764
|
-
*/
|
|
765
|
-
export type GetTradeFiltersType = z.infer<typeof GetTradeFiltersSchema>;
|
|
766
|
-
|
|
767
|
-
export const CancelTradeResponse = z.object({
|
|
768
|
-
message: z.string(),
|
|
769
|
-
});
|
|
770
|
-
export type CancelTradeResponse = z.infer<typeof CancelTradeResponse>;
|
|
771
|
-
|
|
772
|
-
export const FailedTradeZod = z.object({
|
|
773
|
-
id: tradeIdSchema,
|
|
774
|
-
tradeNo: z.string(),
|
|
775
|
-
errors: z.string().array(),
|
|
776
|
-
});
|
|
777
|
-
|
|
778
|
-
export type FailedTradeZod = z.infer<typeof FailedTradeZod>;
|
|
779
|
-
|
|
780
|
-
export const ReviewTradeZod = z.object({
|
|
781
|
-
success: z.boolean(),
|
|
782
|
-
message: z.string(),
|
|
783
|
-
failedTrades: z.array(FailedTradeZod),
|
|
784
|
-
});
|
|
785
|
-
|
|
786
|
-
export type ReviewTradeZod = z.infer<typeof ReviewTradeZod>;
|
|
787
|
-
|
|
788
|
-
export const CancelTradeZod = z.object({
|
|
789
|
-
reason: z
|
|
790
|
-
.string()
|
|
791
|
-
.min(2)
|
|
792
|
-
.max(1000)
|
|
793
|
-
.openapi({ example: 'cancellation reason' }),
|
|
794
|
-
});
|
|
795
|
-
|
|
796
|
-
export type CancelTradeZod = z.infer<typeof CancelTradeZod>;
|
|
797
|
-
|
|
798
|
-
export const ComplianceCancelTradeZod = z.object({
|
|
799
|
-
reason: z
|
|
800
|
-
.string()
|
|
801
|
-
.min(2)
|
|
802
|
-
.max(1000)
|
|
803
|
-
.openapi({ example: 'cancellation reason' }),
|
|
804
|
-
accountId: accountIdSchema.openapi({
|
|
805
|
-
example: 'account_00041061050r3gg28a1c60t3gf',
|
|
806
|
-
}),
|
|
807
|
-
});
|
|
808
|
-
export type ComplianceCancelTradeZod = z.infer<typeof ComplianceCancelTradeZod>;
|
|
809
|
-
|
|
810
|
-
export const ProcessPaymentZod = z.object({
|
|
811
|
-
tradeId: tradeIdSchema,
|
|
812
|
-
amount: z.number().min(0.01).max(10000000000),
|
|
813
|
-
});
|
|
814
|
-
|
|
815
|
-
export type ProcessPaymentZod = z.infer<typeof ProcessPaymentZod>;
|
|
816
|
-
|
|
817
|
-
export const ProcessPaymentResponse = z.object({
|
|
818
|
-
success: z.boolean(),
|
|
819
|
-
});
|
|
820
|
-
|
|
821
|
-
export type ProcessPaymentResponse = z.infer<typeof ProcessPaymentResponse>;
|
|
822
|
-
|
|
823
|
-
const TradeLineItemDataZod = z.object({
|
|
824
|
-
signaturePlatform: z.string(),
|
|
825
|
-
signatureDocumentId: z.string(),
|
|
826
|
-
signatureUrl: z.string(),
|
|
827
|
-
signatureStatus: z.nativeEnum(SignatureStatus),
|
|
828
|
-
});
|
|
829
|
-
|
|
830
|
-
export type TradeLineItemDataZod = z.infer<typeof TradeLineItemDataZod>;
|
|
831
|
-
|
|
832
|
-
export const TradeSystemReviewLogZod = z.object({
|
|
833
|
-
type: z.nativeEnum(TradeSystemLogType),
|
|
834
|
-
data: z.record(z.string(), z.any()),
|
|
835
|
-
error: z.string().nullable(),
|
|
836
|
-
message: z.string().nullable(),
|
|
837
|
-
status: z.nativeEnum(TradeSystemReviewLogStatus),
|
|
838
|
-
});
|
|
839
|
-
export type TradeSystemReviewLogZod = z.infer<typeof TradeSystemReviewLogZod>;
|
|
840
|
-
|
|
841
|
-
export enum BoldsignTemplateType {
|
|
842
|
-
INDIVIDUAL = 'INDIVIDUAL',
|
|
843
|
-
JOINT = 'JOINT',
|
|
844
|
-
ENTITY = 'ENTITY',
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
export const GetTemplateVariablesForTradeZod = z.object({
|
|
848
|
-
templateType: z.nativeEnum(BoldsignTemplateType),
|
|
849
|
-
templateId: z.string(),
|
|
850
|
-
mergeVars: z.array(
|
|
851
|
-
z.object({
|
|
852
|
-
field: z.string(),
|
|
853
|
-
value: z.string(),
|
|
854
|
-
}),
|
|
855
|
-
),
|
|
856
|
-
});
|
|
857
|
-
|
|
858
|
-
export type GetTemplateVariablesForTradeZod = z.infer<
|
|
859
|
-
typeof GetTemplateVariablesForTradeZod
|
|
860
|
-
>;
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Zod schema for CSV export data with all formatted fields ready for export
|
|
864
|
-
* All extraction and formatting logic is handled in trades.service.ts
|
|
865
|
-
*/
|
|
866
|
-
export const TradeForCsvExportZod = z.object({
|
|
867
|
-
tradeNumber: z.string(),
|
|
868
|
-
investorName: z.string(),
|
|
869
|
-
signerName: z.string(),
|
|
870
|
-
offeringName: z.string(),
|
|
871
|
-
tradeType: z.string(),
|
|
872
|
-
numberOfShares: z.number(),
|
|
873
|
-
pricePerShare: z.string(), // Formatted with $ prefix
|
|
874
|
-
totalAmount: z.string(), // Formatted with $ prefix
|
|
875
|
-
tradeStatus: z.string(),
|
|
876
|
-
fundingStatus: z.string(),
|
|
877
|
-
kycStatus: z.boolean(),
|
|
878
|
-
amlStatus: z.boolean(),
|
|
879
|
-
aicStatus: z.boolean(),
|
|
880
|
-
saStatus: z.string(),
|
|
881
|
-
placedAt: z.string(), // Formatted date string
|
|
882
|
-
closedAt: z.string(), // Formatted date string
|
|
883
|
-
txnPaymentMethod: z.string(),
|
|
884
|
-
txnChargedAmount: z.string(), // Formatted with $ prefix
|
|
885
|
-
registeredRepId: z.string(),
|
|
886
|
-
managedBy: z.string(),
|
|
887
|
-
platform: z.string(),
|
|
888
|
-
// Entity fields (for LEGAL_ENTITY type)
|
|
889
|
-
entityName: z.string(),
|
|
890
|
-
entityEin: z.string(),
|
|
891
|
-
entityAddress: z.string(),
|
|
892
|
-
entityAddress2: z.string(),
|
|
893
|
-
entityCity: z.string(),
|
|
894
|
-
entityCountry: z.string(),
|
|
895
|
-
entityState: z.string(),
|
|
896
|
-
entityZip: z.string(),
|
|
897
|
-
entityEmail: z.string(),
|
|
898
|
-
entityPhone: z.string(),
|
|
899
|
-
entityCompanyType: z.string(),
|
|
900
|
-
// Primary individual fields
|
|
901
|
-
primaryFirstName: z.string(),
|
|
902
|
-
primaryLastName: z.string(),
|
|
903
|
-
primaryDob: z.string(), // Formatted date string
|
|
904
|
-
primarySsn: z.string(), // Formatted SSN
|
|
905
|
-
primaryAddress: z.string(),
|
|
906
|
-
primaryAddress2: z.string(),
|
|
907
|
-
primaryCity: z.string(),
|
|
908
|
-
primaryCountry: z.string(),
|
|
909
|
-
primaryState: z.string(),
|
|
910
|
-
primaryZip: z.string(),
|
|
911
|
-
primaryEmail: z.string(),
|
|
912
|
-
primaryPhone: z.string(),
|
|
913
|
-
// Secondary individual fields (for JOINT and LEGAL_ENTITY types)
|
|
914
|
-
secondaryFirstName: z.string(),
|
|
915
|
-
secondaryLastName: z.string(),
|
|
916
|
-
secondaryDob: z.string(), // Formatted date string
|
|
917
|
-
secondarySsn: z.string(), // Formatted SSN
|
|
918
|
-
secondaryAddress: z.string(),
|
|
919
|
-
secondaryAddress2: z.string(),
|
|
920
|
-
secondaryCity: z.string(),
|
|
921
|
-
secondaryCountry: z.string(),
|
|
922
|
-
secondaryState: z.string(),
|
|
923
|
-
secondaryZip: z.string(),
|
|
924
|
-
secondaryEmail: z.string(),
|
|
925
|
-
secondaryPhone: z.string(),
|
|
926
|
-
});
|
|
927
|
-
|
|
928
|
-
export type TradeForCsvExport = z.infer<typeof TradeForCsvExportZod>;
|
|
929
|
-
|
|
930
|
-
export const CANCELLABLE_TRADE_STATUSES = [
|
|
931
|
-
TradeStatus.PLACED,
|
|
932
|
-
TradeStatus.IN_REVIEW,
|
|
933
|
-
TradeStatus.NEEDS_INFO,
|
|
934
|
-
TradeStatus.FUNDING,
|
|
935
|
-
];
|
|
936
|
-
|
|
937
|
-
export const NON_CANCELABLE_COMPLIANCE_REVIEW_STATUSES = [
|
|
938
|
-
ComplianceReview.APPROVED,
|
|
939
|
-
ComplianceReview.REJECTED,
|
|
940
|
-
ComplianceReview.CANCELLED,
|
|
941
|
-
];
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* Filter type for Investor Account exports in workers
|
|
945
|
-
* Extends the base InvestorAccountExportFilters with additional optional fields needed for bulk exports
|
|
946
|
-
*/
|
|
947
|
-
export type WorkerInvestorAccountExportFilters = Partial<
|
|
948
|
-
(InvestorAccountExportFilters | ComplianceInvestorAccountExportFilters) & {
|
|
949
|
-
isRegisteredUsersExport: boolean | null;
|
|
950
|
-
search: string | null;
|
|
951
|
-
startDate: Date | null;
|
|
952
|
-
endDate: Date | null;
|
|
953
|
-
userType: string | null;
|
|
954
|
-
accountId: string | null;
|
|
955
|
-
}
|
|
956
|
-
>;
|
|
957
|
-
/**
|
|
958
|
-
* Filter type for Trade exports
|
|
959
|
-
* Extends IssuersTradeFiltersZod with accountId
|
|
960
|
-
*/
|
|
961
|
-
export type TradeExportFilters = Partial<
|
|
962
|
-
IssuersTradeFiltersZod & {
|
|
963
|
-
accountId: string | null;
|
|
964
|
-
}
|
|
965
|
-
>;
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
* Filter type for Compliance Trade exports
|
|
969
|
-
*/
|
|
970
|
-
export type ComplianceTradeExportFilters = Partial<ExportTradesQuery>;
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* Filter type for Secondary Customer exports
|
|
974
|
-
*/
|
|
975
|
-
export type SecondaryCustomerExportFilters =
|
|
976
|
-
Partial<GetSecondaryCustomerFiltersZod>;
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Filter type for Secondary Trade exports
|
|
980
|
-
*/
|
|
981
|
-
export type SecondaryTradeExportFilters = Partial<SecondaryTradeFiltersZod>;
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* Combined filter type for all bulk export types
|
|
985
|
-
* Used in the ExportBulkDataDto
|
|
986
|
-
*/
|
|
987
|
-
export type BulkExportFilters =
|
|
988
|
-
| WorkerInvestorAccountExportFilters
|
|
989
|
-
| TradeExportFilters
|
|
990
|
-
| ComplianceTradeExportFilters
|
|
991
|
-
| SecondaryCustomerExportFilters
|
|
992
|
-
| SecondaryTradeExportFilters;
|
|
993
|
-
|
|
994
|
-
export type BulkExportResponse =
|
|
995
|
-
| InvestorAccount[]
|
|
996
|
-
| RegisteredInvestorUserRawZod[]
|
|
997
|
-
| Trade[]
|
|
998
|
-
| SecondaryCustomer[]
|
|
999
|
-
| SecondaryTrade[];
|