@dalmore/api-contracts 0.0.0-dev.9d42e16 → 0.0.0-dev.a0bb940
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 +580 -0
- package/common/types/activity.types.js +245 -0
- package/common/types/activity.types.js.map +1 -0
- package/common/types/address.types.d.ts +89 -0
- package/common/types/address.types.js +36 -0
- package/common/types/address.types.js.map +1 -0
- package/common/types/aic.types.d.ts +434 -0
- package/common/types/aic.types.js +170 -0
- package/common/types/aic.types.js.map +1 -0
- package/common/types/aml.types.d.ts +41 -0
- package/common/types/aml.types.js +16 -0
- package/common/types/aml.types.js.map +1 -0
- package/common/types/api-key-logs.types.d.ts +204 -0
- package/common/types/api-key-logs.types.js +52 -0
- package/common/types/api-key-logs.types.js.map +1 -0
- package/common/types/api-keys.types.d.ts +192 -0
- package/common/types/api-keys.types.js +57 -0
- package/common/types/api-keys.types.js.map +1 -0
- package/common/types/asset.types.d.ts +888 -0
- package/common/types/asset.types.js +280 -0
- package/common/types/asset.types.js.map +1 -0
- package/common/types/auth.types.d.ts +487 -0
- package/common/types/auth.types.js +279 -0
- package/common/types/auth.types.js.map +1 -0
- package/common/types/batch-jobs.types.d.ts +321 -0
- package/common/types/batch-jobs.types.js +111 -0
- package/common/types/batch-jobs.types.js.map +1 -0
- package/common/types/bonus-tier.types.d.ts +980 -0
- package/common/types/bonus-tier.types.js +159 -0
- package/common/types/bonus-tier.types.js.map +1 -0
- package/common/types/cap-table.types.d.ts +1124 -0
- package/common/types/cap-table.types.js +406 -0
- package/common/types/cap-table.types.js.map +1 -0
- package/common/types/cart.types.d.ts +28 -0
- package/common/types/cart.types.js +19 -0
- package/common/types/cart.types.js.map +1 -0
- package/common/types/checklist-items.types.d.ts +195 -0
- package/common/types/checklist-items.types.js +54 -0
- package/common/types/checklist-items.types.js.map +1 -0
- package/common/types/checklist.types.d.ts +140 -0
- package/common/types/checklist.types.js +71 -0
- package/common/types/checklist.types.js.map +1 -0
- package/common/types/common.types.d.ts +1498 -0
- package/common/types/common.types.js +1431 -0
- package/common/types/common.types.js.map +1 -0
- package/common/types/comply-advantage-api.types.d.ts +3959 -0
- package/common/types/comply-advantage-api.types.js +270 -0
- package/common/types/comply-advantage-api.types.js.map +1 -0
- package/common/types/comply-advantage.types.d.ts +48 -0
- package/common/types/comply-advantage.types.js +21 -0
- package/common/types/comply-advantage.types.js.map +1 -0
- package/common/types/contact-us.types.d.ts +126 -0
- package/common/types/contact-us.types.js +91 -0
- package/common/types/contact-us.types.js.map +1 -0
- package/common/types/countries.types.d.ts +77 -0
- package/common/types/countries.types.js +349 -0
- package/common/types/countries.types.js.map +1 -0
- package/common/types/covered-person.types.d.ts +204 -0
- package/common/types/covered-person.types.js +234 -0
- package/common/types/covered-person.types.js.map +1 -0
- package/common/types/dashboard.types.d.ts +2086 -0
- package/common/types/dashboard.types.js +690 -0
- package/common/types/dashboard.types.js.map +1 -0
- package/common/types/data-record.types.d.ts +347 -0
- package/common/types/data-record.types.js +261 -0
- package/common/types/data-record.types.js.map +1 -0
- package/common/types/data-room.types.d.ts +1277 -0
- package/common/types/data-room.types.js +167 -0
- package/common/types/data-room.types.js.map +1 -0
- package/common/types/default-theme-config.types.d.ts +445 -0
- package/common/types/default-theme-config.types.js +63 -0
- package/common/types/default-theme-config.types.js.map +1 -0
- package/common/types/disbursement-adjustment.types.d.ts +21 -0
- package/common/types/disbursement-adjustment.types.js +25 -0
- package/common/types/disbursement-adjustment.types.js.map +1 -0
- package/common/types/disbursement-approval-user.types.d.ts +935 -0
- package/common/types/disbursement-approval-user.types.js +68 -0
- package/common/types/disbursement-approval-user.types.js.map +1 -0
- package/common/types/disbursement-review.types.d.ts +923 -0
- package/common/types/disbursement-review.types.js +76 -0
- package/common/types/disbursement-review.types.js.map +1 -0
- package/common/types/disbursement-transaction.types.d.ts +621 -0
- package/common/types/disbursement-transaction.types.js +51 -0
- package/common/types/disbursement-transaction.types.js.map +1 -0
- package/common/types/disbursements.types.d.ts +2343 -0
- package/common/types/disbursements.types.js +308 -0
- package/common/types/disbursements.types.js.map +1 -0
- package/common/types/domain-filter.types.d.ts +135 -0
- package/common/types/domain-filter.types.js +40 -0
- package/common/types/domain-filter.types.js.map +1 -0
- package/common/types/email-theme.types.d.ts +1359 -0
- package/common/types/email-theme.types.js +318 -0
- package/common/types/email-theme.types.js.map +1 -0
- package/common/types/entity.types.d.ts +21 -0
- package/common/types/entity.types.js +14 -0
- package/common/types/entity.types.js.map +1 -0
- package/common/types/error-responses.types.d.ts +144 -0
- package/common/types/error-responses.types.js +125 -0
- package/common/types/error-responses.types.js.map +1 -0
- package/common/types/escrow-account.types.d.ts +398 -0
- package/common/types/escrow-account.types.js +75 -0
- package/common/types/escrow-account.types.js.map +1 -0
- package/common/types/exchange-api-key.types.d.ts +1010 -0
- package/common/types/exchange-api-key.types.js +90 -0
- package/common/types/exchange-api-key.types.js.map +1 -0
- package/common/types/exchange-import.types.d.ts +23 -0
- package/common/types/exchange-import.types.js +23 -0
- package/common/types/exchange-import.types.js.map +1 -0
- package/common/types/exchange-provider.types.d.ts +1308 -0
- package/common/types/exchange-provider.types.js +268 -0
- package/common/types/exchange-provider.types.js.map +1 -0
- package/common/types/file.types.d.ts +401 -0
- package/common/types/file.types.js +378 -0
- package/common/types/file.types.js.map +1 -0
- package/common/types/health.types.d.ts +112 -0
- package/common/types/health.types.js +22 -0
- package/common/types/health.types.js.map +1 -0
- package/common/types/i-will-do-it-later.types.d.ts +51 -0
- package/common/types/i-will-do-it-later.types.js +30 -0
- package/common/types/i-will-do-it-later.types.js.map +1 -0
- package/common/types/{index.ts → index.d.ts} +3 -3
- package/common/types/index.js +52 -0
- package/common/types/index.js.map +1 -0
- package/common/types/individuals.types.d.ts +1899 -0
- package/common/types/individuals.types.js +500 -0
- package/common/types/individuals.types.js.map +1 -0
- package/common/types/investor-account.types.d.ts +2996 -0
- package/common/types/investor-account.types.js +930 -0
- package/common/types/investor-account.types.js.map +1 -0
- package/common/types/investorAccountIdSchema.type.js +1 -0
- package/common/types/investorAccountIdSchema.type.js.map +1 -0
- package/common/types/investors-offering.types.d.ts +391 -0
- package/common/types/investors-offering.types.js +49 -0
- package/common/types/investors-offering.types.js.map +1 -0
- package/common/types/invite.types.d.ts +641 -0
- package/common/types/invite.types.js +113 -0
- package/common/types/invite.types.js.map +1 -0
- package/common/types/issuer-bank-account.types.d.ts +385 -0
- package/common/types/issuer-bank-account.types.js +81 -0
- package/common/types/issuer-bank-account.types.js.map +1 -0
- package/common/types/issuer-offering.types.d.ts +1245 -0
- package/common/types/issuer-offering.types.js +344 -0
- package/common/types/issuer-offering.types.js.map +1 -0
- package/common/types/issuer-payment-method.types.d.ts +1100 -0
- package/common/types/issuer-payment-method.types.js +311 -0
- package/common/types/issuer-payment-method.types.js.map +1 -0
- package/common/types/issuer.types.d.ts +539 -0
- package/common/types/issuer.types.js +275 -0
- package/common/types/issuer.types.js.map +1 -0
- package/common/types/job-item.types.d.ts +230 -0
- package/common/types/job-item.types.js +89 -0
- package/common/types/job-item.types.js.map +1 -0
- package/common/types/jobs.types.d.ts +296 -0
- package/common/types/jobs.types.js +150 -0
- package/common/types/jobs.types.js.map +1 -0
- package/common/types/kyb.types.d.ts +167 -0
- package/common/types/kyb.types.js +45 -0
- package/common/types/kyb.types.js.map +1 -0
- package/common/types/kyc.types.d.ts +2197 -0
- package/common/types/kyc.types.js +301 -0
- package/common/types/kyc.types.js.map +1 -0
- package/common/types/legal-entity.types.d.ts +638 -0
- package/common/types/legal-entity.types.js +148 -0
- package/common/types/legal-entity.types.js.map +1 -0
- package/common/types/login-history.types.d.ts +160 -0
- package/common/types/login-history.types.js +39 -0
- package/common/types/login-history.types.js.map +1 -0
- package/common/types/mail-template.types.d.ts +595 -0
- package/common/types/mail-template.types.js +401 -0
- package/common/types/mail-template.types.js.map +1 -0
- package/common/types/north-cap-integration.types.d.ts +1303 -0
- package/common/types/north-cap-integration.types.js +145 -0
- package/common/types/north-cap-integration.types.js.map +1 -0
- package/common/types/note.types.d.ts +216 -0
- package/common/types/note.types.js +82 -0
- package/common/types/note.types.js.map +1 -0
- package/common/types/notification.types.d.ts +2689 -0
- package/common/types/notification.types.js +408 -0
- package/common/types/notification.types.js.map +1 -0
- package/common/types/notion-api.types.d.ts +3626 -0
- package/common/types/notion-api.types.js +271 -0
- package/common/types/notion-api.types.js.map +1 -0
- package/common/types/notion-database.types.d.ts +191 -0
- package/common/types/notion-database.types.js +95 -0
- package/common/types/notion-database.types.js.map +1 -0
- package/common/types/notion-page.types.d.ts +3482 -0
- package/common/types/notion-page.types.js +208 -0
- package/common/types/notion-page.types.js.map +1 -0
- package/common/types/offering-reports.types.d.ts +525 -0
- package/common/types/offering-reports.types.js +111 -0
- package/common/types/offering-reports.types.js.map +1 -0
- package/common/types/offering-submission.types.d.ts +587 -0
- package/common/types/offering-submission.types.js +278 -0
- package/common/types/offering-submission.types.js.map +1 -0
- package/common/types/offering.types.d.ts +2335 -0
- package/common/types/offering.types.js +505 -0
- package/common/types/offering.types.js.map +1 -0
- package/common/types/page-revision.types.d.ts +74 -0
- package/common/types/page-revision.types.js +68 -0
- package/common/types/page-revision.types.js.map +1 -0
- package/common/types/page.types.d.ts +540 -0
- package/common/types/page.types.js +361 -0
- package/common/types/page.types.js.map +1 -0
- package/common/types/password.type.d.ts +2 -0
- package/common/types/password.type.js +14 -0
- package/common/types/password.type.js.map +1 -0
- package/common/types/payment-methods.types.d.ts +800 -0
- package/common/types/payment-methods.types.js +260 -0
- package/common/types/payment-methods.types.js.map +1 -0
- package/common/types/phone.type.d.ts +12 -0
- package/common/types/phone.type.js +29 -0
- package/common/types/phone.type.js.map +1 -0
- package/common/types/portfolio.types.d.ts +185 -0
- package/common/types/portfolio.types.js +36 -0
- package/common/types/portfolio.types.js.map +1 -0
- package/common/types/privacy-policy-and-tos.types.d.ts +2 -0
- package/common/types/{privacy-policy-and-tos.types.ts → privacy-policy-and-tos.types.js} +1 -1
- package/common/types/privacy-policy-and-tos.types.js.map +1 -0
- package/common/types/queue.types.d.ts +22 -0
- package/common/types/queue.types.js +73 -0
- package/common/types/queue.types.js.map +1 -0
- package/common/types/registered-reps.types.d.ts +6 -0
- package/common/types/registered-reps.types.js +21 -0
- package/common/types/registered-reps.types.js.map +1 -0
- package/common/types/rejection-reasons.types.d.ts +35 -0
- package/common/types/rejection-reasons.types.js +49 -0
- package/common/types/rejection-reasons.types.js.map +1 -0
- package/common/types/review.types.d.ts +419 -0
- package/common/types/review.types.js +101 -0
- package/common/types/review.types.js.map +1 -0
- package/common/types/role.types.d.ts +30 -0
- package/common/types/role.types.js +21 -0
- package/common/types/role.types.js.map +1 -0
- package/common/types/secondary-customer.types.d.ts +586 -0
- package/common/types/secondary-customer.types.js +39 -0
- package/common/types/secondary-customer.types.js.map +1 -0
- package/common/types/secondary-issuer.types.d.ts +283 -0
- package/common/types/secondary-issuer.types.js +37 -0
- package/common/types/secondary-issuer.types.js.map +1 -0
- package/common/types/secondary-order.types.d.ts +508 -0
- package/common/types/secondary-order.types.js +40 -0
- package/common/types/secondary-order.types.js.map +1 -0
- package/common/types/secondary-security.types.d.ts +175 -0
- package/common/types/secondary-security.types.js +45 -0
- package/common/types/secondary-security.types.js.map +1 -0
- package/common/types/secondary-trade.entity.d.ts +16 -0
- package/common/types/secondary-trade.entity.js +12 -0
- package/common/types/secondary-trade.entity.js.map +1 -0
- package/common/types/secondary-trade.types.d.ts +465 -0
- package/common/types/secondary-trade.types.js +61 -0
- package/common/types/secondary-trade.types.js.map +1 -0
- package/common/types/secure-request.types.d.ts +171 -0
- package/common/types/secure-request.types.js +51 -0
- package/common/types/secure-request.types.js.map +1 -0
- package/common/types/signer.types.d.ts +3394 -0
- package/common/types/signer.types.js +517 -0
- package/common/types/signer.types.js.map +1 -0
- package/common/types/site-link.types.d.ts +875 -0
- package/common/types/site-link.types.js +126 -0
- package/common/types/site-link.types.js.map +1 -0
- package/common/types/site-settings.types.d.ts +1673 -0
- package/common/types/site-settings.types.js +500 -0
- package/common/types/site-settings.types.js.map +1 -0
- package/common/types/site.types.d.ts +1476 -0
- package/common/types/site.types.js +213 -0
- package/common/types/site.types.js.map +1 -0
- package/common/types/sms.types.d.ts +40 -0
- package/common/types/sms.types.js +27 -0
- package/common/types/sms.types.js.map +1 -0
- package/common/types/state-machine.types.d.ts +591 -0
- package/common/types/state-machine.types.js +144 -0
- package/common/types/state-machine.types.js.map +1 -0
- package/common/types/states.types.d.ts +77 -0
- package/common/types/states.types.js +137 -0
- package/common/types/states.types.js.map +1 -0
- package/common/types/subdoc-preview.types.d.ts +379 -0
- package/common/types/subdoc-preview.types.js +24 -0
- package/common/types/subdoc-preview.types.js.map +1 -0
- package/common/types/task.types.d.ts +537 -0
- package/common/types/task.types.js +211 -0
- package/common/types/task.types.js.map +1 -0
- package/common/types/trade-adjustment.type.d.ts +40 -0
- package/common/types/trade-adjustment.type.js +26 -0
- package/common/types/trade-adjustment.type.js.map +1 -0
- package/common/types/trade-line-item.types.d.ts +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 +783 -0
- package/common/types/trade.types.js.map +1 -0
- package/common/types/transaction.types.d.ts +375 -0
- package/common/types/transaction.types.js +154 -0
- package/common/types/transaction.types.js.map +1 -0
- package/common/types/trusted-contact.types.d.ts +440 -0
- package/common/types/trusted-contact.types.js +95 -0
- package/common/types/trusted-contact.types.js.map +1 -0
- package/common/types/typography.types.d.ts +52 -0
- package/common/types/typography.types.js +67 -0
- package/common/types/typography.types.js.map +1 -0
- package/common/types/user-manual.types.d.ts +287 -0
- package/common/types/user-manual.types.js +192 -0
- package/common/types/user-manual.types.js.map +1 -0
- package/common/types/user-setting.types.d.ts +273 -0
- package/common/types/user-setting.types.js +85 -0
- package/common/types/user-setting.types.js.map +1 -0
- package/common/types/user.types.d.ts +1951 -0
- package/common/types/user.types.js +238 -0
- package/common/types/user.types.js.map +1 -0
- package/common/types/webhook.types.d.ts +10829 -0
- package/common/types/webhook.types.js +658 -0
- package/common/types/webhook.types.js.map +1 -0
- package/common/types/zip.type.d.ts +35 -0
- package/common/types/zip.type.js +28 -0
- package/common/types/zip.type.js.map +1 -0
- package/contracts/clients/accounts/index.d.ts +308 -0
- package/contracts/clients/accounts/index.js +43 -0
- package/contracts/clients/accounts/index.js.map +1 -0
- package/contracts/clients/aic/index.d.ts +280 -0
- package/contracts/clients/aic/index.js +47 -0
- package/contracts/clients/aic/index.js.map +1 -0
- package/contracts/clients/api-key-logs/index.d.ts +287 -0
- package/contracts/clients/api-key-logs/index.js +37 -0
- package/contracts/clients/api-key-logs/index.js.map +1 -0
- package/contracts/clients/api-keys/index.d.ts +374 -0
- package/contracts/clients/api-keys/index.js +59 -0
- package/contracts/clients/api-keys/index.js.map +1 -0
- package/contracts/clients/assets/index.d.ts +1028 -0
- package/contracts/clients/assets/index.js +80 -0
- package/contracts/clients/assets/index.js.map +1 -0
- package/contracts/clients/auth/index.d.ts +236 -0
- package/contracts/clients/auth/index.js +38 -0
- package/contracts/clients/auth/index.js.map +1 -0
- package/contracts/clients/cart/index.d.ts +229 -0
- package/contracts/clients/cart/index.js +63 -0
- package/contracts/clients/cart/index.js.map +1 -0
- package/contracts/clients/files/index.d.ts +552 -0
- package/contracts/clients/files/index.js +142 -0
- package/contracts/clients/files/index.js.map +1 -0
- package/contracts/clients/files-public/index.d.ts +552 -0
- package/contracts/clients/files-public/index.js +142 -0
- package/contracts/clients/files-public/index.js.map +1 -0
- package/contracts/clients/index.d.ts +12482 -0
- package/contracts/clients/index.js +52 -0
- package/contracts/clients/index.js.map +1 -0
- package/contracts/clients/individuals/index.d.ts +3199 -0
- package/contracts/clients/individuals/index.js +74 -0
- package/contracts/clients/individuals/index.js.map +1 -0
- package/contracts/clients/investor-accounts/index.d.ts +339 -0
- package/contracts/clients/investor-accounts/index.js +73 -0
- package/contracts/clients/investor-accounts/index.js.map +1 -0
- package/contracts/clients/issuer-payment-methods/index.d.ts +276 -0
- package/contracts/clients/issuer-payment-methods/index.js +24 -0
- package/contracts/clients/issuer-payment-methods/index.js.map +1 -0
- package/contracts/clients/issuers/index.d.ts +449 -0
- package/contracts/clients/issuers/index.js +75 -0
- package/contracts/clients/issuers/index.js.map +1 -0
- package/contracts/clients/kyc/index.d.ts +345 -0
- package/contracts/clients/kyc/index.js +49 -0
- package/contracts/clients/kyc/index.js.map +1 -0
- package/contracts/clients/legal-entities/index.d.ts +887 -0
- package/contracts/clients/legal-entities/index.js +74 -0
- package/contracts/clients/legal-entities/index.js.map +1 -0
- package/contracts/clients/offerings/index.d.ts +767 -0
- package/contracts/clients/offerings/index.js +95 -0
- package/contracts/clients/offerings/index.js.map +1 -0
- package/contracts/clients/payment-methods/index.d.ts +456 -0
- package/contracts/clients/payment-methods/index.js +68 -0
- package/contracts/clients/payment-methods/index.js.map +1 -0
- package/contracts/clients/secure-requests/index.d.ts +100 -0
- package/contracts/clients/secure-requests/index.js +22 -0
- package/contracts/clients/secure-requests/index.js.map +1 -0
- package/contracts/clients/sites/index.d.ts +657 -0
- package/contracts/clients/sites/index.js +40 -0
- package/contracts/clients/sites/index.js.map +1 -0
- package/contracts/clients/trade-line-items/index.d.ts +216 -0
- package/contracts/clients/trade-line-items/index.js +47 -0
- package/contracts/clients/trade-line-items/index.js.map +1 -0
- package/contracts/clients/trades/index.d.ts +871 -0
- package/contracts/clients/trades/index.js +156 -0
- package/contracts/clients/trades/index.js.map +1 -0
- package/contracts/clients/transactions/index.d.ts +88 -0
- package/contracts/clients/transactions/index.js +25 -0
- package/contracts/clients/transactions/index.js.map +1 -0
- package/package.json +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 -298
- 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 -1047
- 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
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
3
|
-
import { accountIdSchema } from './account.types';
|
|
4
|
-
import { PasswordSchema } from './password.type';
|
|
5
|
-
import { inviteIdSchema } from './invite.types';
|
|
6
|
-
import {
|
|
7
|
-
PortalType,
|
|
8
|
-
ManagedByType,
|
|
9
|
-
UserRole,
|
|
10
|
-
createUrlSchema,
|
|
11
|
-
EmailSchema,
|
|
12
|
-
} from './common.types';
|
|
13
|
-
import { TypeID } from 'typeid-js';
|
|
14
|
-
import { TwoFactorMethod } from './sms.types';
|
|
15
|
-
import { PhoneZodSchema } from './phone.type';
|
|
16
|
-
|
|
17
|
-
extendZodWithOpenApi(z);
|
|
18
|
-
|
|
19
|
-
export const userLoginIdSchema = z.string().refine(
|
|
20
|
-
(value) => {
|
|
21
|
-
try {
|
|
22
|
-
const tid = TypeID.fromString(value);
|
|
23
|
-
return tid.getType() === 'user_login';
|
|
24
|
-
} catch {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
message:
|
|
30
|
-
'Invalid user ID format. Must be a valid TypeID with "user_login" prefix.',
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
export enum AuthProvider {
|
|
35
|
-
EMAIL = 'email',
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const isBase64 = (v: string) => {
|
|
39
|
-
if (v.length % 4 !== 0) {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
try {
|
|
43
|
-
return btoa(atob(v)) === v;
|
|
44
|
-
} catch (err) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const BaseAuthBody = z.object({
|
|
50
|
-
firstName: z
|
|
51
|
-
.string()
|
|
52
|
-
.min(2, 'firstName is less than 2 characters')
|
|
53
|
-
.max(20, 'firstName is more than 20 characters')
|
|
54
|
-
.openapi({
|
|
55
|
-
example: 'Neil',
|
|
56
|
-
}),
|
|
57
|
-
lastName: z
|
|
58
|
-
.string()
|
|
59
|
-
.min(2, 'lastName is less than 2 characters')
|
|
60
|
-
.max(20, 'lastName is more than 20 characters')
|
|
61
|
-
.openapi({
|
|
62
|
-
example: 'Armstrong',
|
|
63
|
-
}),
|
|
64
|
-
email: EmailSchema,
|
|
65
|
-
password: PasswordSchema,
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export const IRegisterBodyZod = BaseAuthBody.extend({
|
|
69
|
-
code: z
|
|
70
|
-
.string()
|
|
71
|
-
.refine(isBase64, {
|
|
72
|
-
message: 'Must be a valid base64 encoded string',
|
|
73
|
-
})
|
|
74
|
-
.openapi({
|
|
75
|
-
example: 'eyJpdiI6InhhTFIyVG9ETnhnUzQ1QzUyNzRJenc9PSIsI',
|
|
76
|
-
}),
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
export const IChangePasswordBodyZod = z
|
|
80
|
-
.object({
|
|
81
|
-
currentPassword: z.string().min(6).openapi({
|
|
82
|
-
example: 'Secretpassword6#',
|
|
83
|
-
}),
|
|
84
|
-
newPassword: PasswordSchema,
|
|
85
|
-
newPasswordConfirm: PasswordSchema,
|
|
86
|
-
})
|
|
87
|
-
.refine((data) => data.currentPassword !== data.newPassword, {
|
|
88
|
-
message: 'New password must be different from current password',
|
|
89
|
-
path: ['newPassword'],
|
|
90
|
-
})
|
|
91
|
-
.refine((data) => data.newPassword === data.newPasswordConfirm, {
|
|
92
|
-
message: 'Password confirmation does not match new password',
|
|
93
|
-
path: ['newPasswordConfirm'],
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
export const LoginBody = z.object({
|
|
97
|
-
email: EmailSchema,
|
|
98
|
-
password: z.string().openapi({
|
|
99
|
-
example: 'Secretpassword6#',
|
|
100
|
-
}),
|
|
101
|
-
rememberMe: z.boolean().optional().default(false).openapi({
|
|
102
|
-
example: true,
|
|
103
|
-
}),
|
|
104
|
-
twoFactorMethod: z.nativeEnum(TwoFactorMethod).optional().openapi({
|
|
105
|
-
example: 'SMS',
|
|
106
|
-
}),
|
|
107
|
-
});
|
|
108
|
-
export type LoginBody = z.infer<typeof LoginBody>;
|
|
109
|
-
|
|
110
|
-
export const LoginBody2FA = z.object({
|
|
111
|
-
token: z.string().min(6).max(14).openapi({
|
|
112
|
-
example: 'neil@dalmoregroup.com',
|
|
113
|
-
}),
|
|
114
|
-
temporaryToken: z.string().min(1).openapi({
|
|
115
|
-
example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
|
|
116
|
-
}),
|
|
117
|
-
rememberMe: z.boolean().optional().default(false).openapi({
|
|
118
|
-
example: true,
|
|
119
|
-
}),
|
|
120
|
-
});
|
|
121
|
-
export type LoginBody2FA = z.infer<typeof LoginBody>;
|
|
122
|
-
|
|
123
|
-
export const LoginBodyInvestors = LoginBody.extend({
|
|
124
|
-
site: z.string().openapi({ site: 'example.com' }),
|
|
125
|
-
});
|
|
126
|
-
export type LoginBodyInvestors = z.infer<typeof LoginBodyInvestors>;
|
|
127
|
-
|
|
128
|
-
export const LoginBodyIssuers = LoginBody.extend({
|
|
129
|
-
accountId: accountIdSchema.openapi({
|
|
130
|
-
accountId: 'account_00041061050r3gg28a1c60t3gf',
|
|
131
|
-
}),
|
|
132
|
-
});
|
|
133
|
-
export type LoginBodyIssuers = z.infer<typeof LoginBodyIssuers>;
|
|
134
|
-
|
|
135
|
-
export const SelectAccountIssuers = LoginBody;
|
|
136
|
-
export type SelectAccountIssuers = z.infer<typeof SelectAccountIssuers>;
|
|
137
|
-
|
|
138
|
-
export const SelectAccountIssuersResponse = z.object({
|
|
139
|
-
invites: z.array(
|
|
140
|
-
z.object({
|
|
141
|
-
id: inviteIdSchema.openapi({
|
|
142
|
-
example: 'invite_00041061050r3gg28a1c60t3gf',
|
|
143
|
-
}),
|
|
144
|
-
name: z.string().openapi({ example: 'Example Account' }),
|
|
145
|
-
accountId: accountIdSchema.nullable().openapi({
|
|
146
|
-
example: 'account_00041061050r3gg28a1c60t3gf',
|
|
147
|
-
}),
|
|
148
|
-
role: z
|
|
149
|
-
.nativeEnum(UserRole)
|
|
150
|
-
.nullable()
|
|
151
|
-
.openapi({ example: UserRole.MARKETER }),
|
|
152
|
-
}),
|
|
153
|
-
),
|
|
154
|
-
accounts: z.array(
|
|
155
|
-
z.object({
|
|
156
|
-
id: accountIdSchema.openapi({
|
|
157
|
-
example: 'account_00041061050r3gg28a1c60t3gf',
|
|
158
|
-
}),
|
|
159
|
-
name: z.string().openapi({ example: 'Example Account' }),
|
|
160
|
-
firstName: z.string().openapi({ example: 'John' }),
|
|
161
|
-
lastName: z.string().openapi({ example: 'Doe' }),
|
|
162
|
-
}),
|
|
163
|
-
),
|
|
164
|
-
});
|
|
165
|
-
export type SelectAccountIssuersResponse = z.infer<
|
|
166
|
-
typeof SelectAccountIssuersResponse
|
|
167
|
-
>;
|
|
168
|
-
|
|
169
|
-
export const SwitchAccountIssuersBody = z.object({
|
|
170
|
-
accountId: accountIdSchema,
|
|
171
|
-
});
|
|
172
|
-
export type SwitchAccountIssuersBody = z.infer<typeof SwitchAccountIssuersBody>;
|
|
173
|
-
|
|
174
|
-
export const AccessTokenResponse = z.object({
|
|
175
|
-
accessToken: z.string().optional().openapi({
|
|
176
|
-
example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
|
|
177
|
-
}),
|
|
178
|
-
requiresTwoFactor: z.boolean().optional().openapi({
|
|
179
|
-
example: true,
|
|
180
|
-
}),
|
|
181
|
-
temporaryToken: z.string().optional().openapi({
|
|
182
|
-
example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
|
|
183
|
-
}),
|
|
184
|
-
requiresTwoFactorSetup: z.boolean().optional().openapi({
|
|
185
|
-
example: true,
|
|
186
|
-
}),
|
|
187
|
-
twoFactorMethod: z.nativeEnum(TwoFactorMethod).optional().openapi({
|
|
188
|
-
example: 'SMS',
|
|
189
|
-
}),
|
|
190
|
-
});
|
|
191
|
-
export type AccessTokenResponse = z.infer<typeof AccessTokenResponse>;
|
|
192
|
-
|
|
193
|
-
// Base schema for issuer registration (shared fields without refinements)
|
|
194
|
-
const BaseRegisterIssuerFields = BaseAuthBody.extend({
|
|
195
|
-
confirmPassword: PasswordSchema,
|
|
196
|
-
accountName: z
|
|
197
|
-
.string()
|
|
198
|
-
.min(1)
|
|
199
|
-
.max(150)
|
|
200
|
-
.openapi({
|
|
201
|
-
example: 'Example Account',
|
|
202
|
-
})
|
|
203
|
-
.nullable()
|
|
204
|
-
.optional(),
|
|
205
|
-
accountType: z
|
|
206
|
-
.nativeEnum(ManagedByType)
|
|
207
|
-
.optional()
|
|
208
|
-
.default(ManagedByType.DALMORE)
|
|
209
|
-
.openapi({
|
|
210
|
-
example: ManagedByType.DALMORE,
|
|
211
|
-
}),
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
// Full issuer registration schema with code (for invite-based registration)
|
|
215
|
-
export const IRegisterIssuerBodyZod = BaseRegisterIssuerFields.extend({
|
|
216
|
-
code: z
|
|
217
|
-
.string()
|
|
218
|
-
.refine(isBase64, {
|
|
219
|
-
message: 'Must be a valid base64 encoded string',
|
|
220
|
-
})
|
|
221
|
-
.optional()
|
|
222
|
-
.openapi({
|
|
223
|
-
example: 'eyJpdiI6InhhTFIyVG9ETnhnUzQ1QzUyNzRJenc9PSIsI',
|
|
224
|
-
}),
|
|
225
|
-
})
|
|
226
|
-
.refine((data) => data.password === data.confirmPassword, {
|
|
227
|
-
message: 'Passwords do not match',
|
|
228
|
-
path: ['confirmPassword'],
|
|
229
|
-
})
|
|
230
|
-
.refine(
|
|
231
|
-
(data) => {
|
|
232
|
-
// If code is not provided, accountName must be present and not empty/null
|
|
233
|
-
if (!data.code || data.code.length === 0) {
|
|
234
|
-
return (
|
|
235
|
-
data.accountName !== null &&
|
|
236
|
-
data.accountName !== undefined &&
|
|
237
|
-
data.accountName !== ''
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
// If code is provided, accountName is not required
|
|
241
|
-
return true;
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
message: 'Account name is required if code is not provided',
|
|
245
|
-
path: ['accountName'],
|
|
246
|
-
},
|
|
247
|
-
);
|
|
248
|
-
|
|
249
|
-
// Client issuer registration schema without code (for API key registration)
|
|
250
|
-
export const IRegisterClientIssuerBodyZod = BaseRegisterIssuerFields.refine(
|
|
251
|
-
(data) => data.password === data.confirmPassword,
|
|
252
|
-
{
|
|
253
|
-
message: 'Passwords do not match',
|
|
254
|
-
path: ['confirmPassword'],
|
|
255
|
-
},
|
|
256
|
-
).refine(
|
|
257
|
-
(data) => {
|
|
258
|
-
// For client registration, accountName is always required
|
|
259
|
-
return (
|
|
260
|
-
data.accountName !== null &&
|
|
261
|
-
data.accountName !== undefined &&
|
|
262
|
-
data.accountName !== ''
|
|
263
|
-
);
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
message: 'Account name is required',
|
|
267
|
-
path: ['accountName'],
|
|
268
|
-
},
|
|
269
|
-
);
|
|
270
|
-
|
|
271
|
-
// Investors are a special case in which they require phone number at the time of registration
|
|
272
|
-
// The phone number provided here is NOT validated and will still need to go thru the regular 2FA setup process
|
|
273
|
-
export const RegisterBodyInvestors = BaseAuthBody.extend({
|
|
274
|
-
confirmPassword: PasswordSchema,
|
|
275
|
-
phoneNumber: PhoneZodSchema.openapi({ example: '+12124567890' }).optional(),
|
|
276
|
-
site: z
|
|
277
|
-
.string()
|
|
278
|
-
.min(2, 'site is less than 2 characters')
|
|
279
|
-
.max(253, 'site is more than 253 characters')
|
|
280
|
-
.openapi({
|
|
281
|
-
example: 'func.co',
|
|
282
|
-
}),
|
|
283
|
-
}).refine((data) => data.password === data.confirmPassword, {
|
|
284
|
-
message: 'Passwords do not match',
|
|
285
|
-
path: ['confirmPassword'],
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
export const ResetPasswordVerifyBody = z.object({
|
|
289
|
-
email: EmailSchema,
|
|
290
|
-
code: z.string().length(6, 'code is not 6 characters').openapi({
|
|
291
|
-
example: '123456',
|
|
292
|
-
}),
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
export type ResetPasswordVerifyBodyType = z.infer<
|
|
296
|
-
typeof ResetPasswordVerifyBody
|
|
297
|
-
>;
|
|
298
|
-
export const ResetPasswordVerifyResponse = z.object({
|
|
299
|
-
valid: z.boolean(),
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
export type ResetPasswordVerifyResponseType = z.infer<
|
|
303
|
-
typeof ResetPasswordVerifyResponse
|
|
304
|
-
>;
|
|
305
|
-
|
|
306
|
-
export const ResetPasswordBody = z.object({
|
|
307
|
-
email: EmailSchema,
|
|
308
|
-
code: z.string().length(6, 'code is not 6 characters').openapi({
|
|
309
|
-
example: '123456',
|
|
310
|
-
}),
|
|
311
|
-
password: PasswordSchema,
|
|
312
|
-
});
|
|
313
|
-
export type ResetPasswordBodyType = z.infer<typeof ResetPasswordBody>;
|
|
314
|
-
|
|
315
|
-
export const AuthSuccessResponse = z.object({
|
|
316
|
-
success: z.boolean(),
|
|
317
|
-
});
|
|
318
|
-
export type AuthSuccessResponseType = z.infer<typeof AuthSuccessResponse>;
|
|
319
|
-
|
|
320
|
-
export const ClientAuthSuccessResponse = z.object({
|
|
321
|
-
userId: z.string().openapi({ example: 'user_01je6ht4b8fbmttkzh2hs82xqp' }),
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
export type ClientAuthSuccessResponse = z.infer<
|
|
325
|
-
typeof ClientAuthSuccessResponse
|
|
326
|
-
>;
|
|
327
|
-
|
|
328
|
-
export const AdminForgotPasswordRequestZod = z.object({
|
|
329
|
-
email: EmailSchema,
|
|
330
|
-
portal: z.nativeEnum(PortalType),
|
|
331
|
-
});
|
|
332
|
-
export type AdminForgotPasswordRequestZod = z.infer<
|
|
333
|
-
typeof AdminForgotPasswordRequestZod
|
|
334
|
-
>;
|
|
335
|
-
|
|
336
|
-
export const InvestorForgotPasswordRequestZod = z.object({
|
|
337
|
-
email: EmailSchema,
|
|
338
|
-
url: createUrlSchema({ strict: true }),
|
|
339
|
-
});
|
|
340
|
-
export type InvestorForgotPasswordRequestZod = z.infer<
|
|
341
|
-
typeof InvestorForgotPasswordRequestZod
|
|
342
|
-
>;
|
|
343
|
-
|
|
344
|
-
// Define paths that should be accessible EVEN with twoFactorPending
|
|
345
|
-
export const twoFactorPendingAllowedPaths = [
|
|
346
|
-
'/auth/login',
|
|
347
|
-
'/auth/register',
|
|
348
|
-
'/user-settings/valid-phone-number',
|
|
349
|
-
'/user-settings/setup-phone-number',
|
|
350
|
-
'/user-settings/verify-phone-number',
|
|
351
|
-
'/user-settings/send-verification-code',
|
|
352
|
-
'/user-settings/setup-authenticator',
|
|
353
|
-
'/user-settings/verify-authenticator',
|
|
354
|
-
];
|
|
355
|
-
|
|
356
|
-
export const lockedUserAllowedPathsAndMethods = [
|
|
357
|
-
{ path: '/users/me', method: 'GET' },
|
|
358
|
-
{ path: '/auth/login', method: 'POST' },
|
|
359
|
-
];
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
-
import { TypeID } from 'typeid-js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { dateSchema, IPaginationMeta, UserRole } from './common.types';
|
|
5
|
-
import { userIdSchema } from './user.types';
|
|
6
|
-
import { accountIdSchema } from './account.types';
|
|
7
|
-
import { IBaseEntity } from './entity.types';
|
|
8
|
-
import { JobsOptions } from 'bullmq';
|
|
9
|
-
|
|
10
|
-
extendZodWithOpenApi(z);
|
|
11
|
-
|
|
12
|
-
export enum JobTaskType {
|
|
13
|
-
BULK_TRADE_APPROVAL = 'BULK_TRADE_APPROVAL',
|
|
14
|
-
SINGLE_TRADE_APPROVAL = 'SINGLE_TRADE_APPROVAL',
|
|
15
|
-
BULK_TRADE_REJECTION = 'BULK_TRADE_REJECTION',
|
|
16
|
-
SINGLE_TRADE_REJECTION = 'SINGLE_TRADE_REJECTION',
|
|
17
|
-
BULK_COMPLIANCE_REVIEW = 'BULK_COMPLIANCE_REVIEW',
|
|
18
|
-
BULK_EXCHANGE_IMPORT = 'BULK_EXCHANGE_IMPORT',
|
|
19
|
-
VALIDATE_PLACED_TRADES = 'VALIDATE_PLACED_TRADES',
|
|
20
|
-
IMPORT_FUNDING_CHECK = 'IMPORT_FUNDING_CHECK',
|
|
21
|
-
REG_D_TRADE_PROCESSING = 'REG_D_TRADE_PROCESSING',
|
|
22
|
-
BULK_FILE_REPROCESSING = 'BULK_FILE_REPROCESSING',
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export enum BatchJobStatus {
|
|
26
|
-
PENDING = 'PENDING',
|
|
27
|
-
IN_PROGRESS = 'IN_PROGRESS',
|
|
28
|
-
COMPLETED = 'COMPLETED',
|
|
29
|
-
FAILED = 'FAILED',
|
|
30
|
-
CANCELLED = 'CANCELLED',
|
|
31
|
-
KILLED = 'KILLED',
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const batchJobIdSchema = z.string().refine(
|
|
35
|
-
(value) => {
|
|
36
|
-
try {
|
|
37
|
-
const tid = TypeID.fromString(value);
|
|
38
|
-
return tid.getType() === 'batch_job';
|
|
39
|
-
} catch {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
message:
|
|
45
|
-
'Invalid batch job ID format. Must be a valid TypeID with "batch_job" prefix.',
|
|
46
|
-
},
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
export const CreateBatchJobZod = z.object({
|
|
50
|
-
jobTaskType: z.nativeEnum(JobTaskType),
|
|
51
|
-
totalTasks: z.number().int(),
|
|
52
|
-
bullFlowId: z.string(),
|
|
53
|
-
userId: userIdSchema,
|
|
54
|
-
accountId: accountIdSchema,
|
|
55
|
-
});
|
|
56
|
-
export type CreateBatchJobZod = z.infer<typeof CreateBatchJobZod>;
|
|
57
|
-
|
|
58
|
-
export const BatchJobZod = IBaseEntity.extend({
|
|
59
|
-
id: batchJobIdSchema,
|
|
60
|
-
jobTaskType: z.nativeEnum(JobTaskType),
|
|
61
|
-
totalTasks: z.number().int(),
|
|
62
|
-
bullFlowId: z.string(),
|
|
63
|
-
userId: userIdSchema,
|
|
64
|
-
accountId: accountIdSchema,
|
|
65
|
-
status: z.nativeEnum(BatchJobStatus),
|
|
66
|
-
tasksPending: z.number().int(),
|
|
67
|
-
tasksProcessing: z.number().int(),
|
|
68
|
-
tasksCompleted: z.number().int(),
|
|
69
|
-
tasksFailed: z.number().int(),
|
|
70
|
-
});
|
|
71
|
-
export type BatchJobZod = z.infer<typeof BatchJobZod>;
|
|
72
|
-
export const IPaginatedBatchJob = z.object({
|
|
73
|
-
items: z.array(BatchJobZod),
|
|
74
|
-
meta: IPaginationMeta,
|
|
75
|
-
});
|
|
76
|
-
export type IPaginatedBatchJob = z.infer<typeof IPaginatedBatchJob>;
|
|
77
|
-
|
|
78
|
-
export const BatchJobFiltersZod = z.object({
|
|
79
|
-
search: z.string().optional(),
|
|
80
|
-
jobTaskType: z.nativeEnum(JobTaskType).optional(),
|
|
81
|
-
status: z.nativeEnum(BatchJobStatus).optional(),
|
|
82
|
-
accountId: accountIdSchema.optional(),
|
|
83
|
-
userId: userIdSchema.optional(),
|
|
84
|
-
from: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
85
|
-
to: dateSchema.optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
86
|
-
});
|
|
87
|
-
export type BatchJobFiltersZod = z.infer<typeof BatchJobFiltersZod>;
|
|
88
|
-
const batchJobsInclude = z.enum(['user', 'account', 'jobItems']);
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @description Query parameters for including related entities
|
|
92
|
-
* @xample in contract us as -> query: z.object({}).merge(AccountsIncludeQuery),
|
|
93
|
-
*/
|
|
94
|
-
export const BatchJobsIncludeQuery = z.object({
|
|
95
|
-
include: z
|
|
96
|
-
.string()
|
|
97
|
-
.optional()
|
|
98
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
99
|
-
.refine(
|
|
100
|
-
(includes) =>
|
|
101
|
-
includes.every((include) =>
|
|
102
|
-
batchJobsInclude.options.includes(include as any),
|
|
103
|
-
),
|
|
104
|
-
{
|
|
105
|
-
message: `Invalid include option provided. Valid options are: ${batchJobsInclude.options.join(',')}`,
|
|
106
|
-
},
|
|
107
|
-
)
|
|
108
|
-
.openapi({
|
|
109
|
-
example: `${batchJobsInclude.options.join(',')}`,
|
|
110
|
-
}),
|
|
111
|
-
});
|
|
112
|
-
export interface BatchJobsIncludeQuery
|
|
113
|
-
extends z.infer<typeof BatchJobsIncludeQuery> {}
|
|
114
|
-
|
|
115
|
-
export interface ChildJobConfig {
|
|
116
|
-
name: string;
|
|
117
|
-
queueName: string;
|
|
118
|
-
data: ChildJobData;
|
|
119
|
-
opts: JobsOptions;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export const ChildJobData = z.object({
|
|
123
|
-
batchJobId: z.string(),
|
|
124
|
-
targetId: z.string(),
|
|
125
|
-
userId: z.string(),
|
|
126
|
-
userAccountId: z.string(),
|
|
127
|
-
userFirstName: z.string().optional(),
|
|
128
|
-
userLastName: z.string().optional(),
|
|
129
|
-
userRoleId: z.string().optional(),
|
|
130
|
-
userRole: z.nativeEnum(UserRole).optional(),
|
|
131
|
-
});
|
|
132
|
-
export type ChildJobData = z.infer<typeof ChildJobData>;
|
|
133
|
-
|
|
134
|
-
export const BatchJobData = z.object({
|
|
135
|
-
taskType: z.nativeEnum(JobTaskType),
|
|
136
|
-
props: z.record(z.string(), z.any()),
|
|
137
|
-
});
|
|
138
|
-
export type BatchJobData = z.infer<typeof BatchJobData>;
|
|
139
|
-
|
|
140
|
-
export const BatchJobResult = z.object({
|
|
141
|
-
success: z.boolean(),
|
|
142
|
-
message: z.string(),
|
|
143
|
-
jobId: z.string().nullable().optional(),
|
|
144
|
-
});
|
|
145
|
-
export type BatchJobResult = z.infer<typeof BatchJobResult>;
|
|
146
|
-
|
|
147
|
-
export interface BatchJobConfig {
|
|
148
|
-
data: BatchJobData;
|
|
149
|
-
childConfigs: (childData: ChildJobData) => ChildJobConfig[];
|
|
150
|
-
opts: JobsOptions;
|
|
151
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
-
import { TypeID } from 'typeid-js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { IBaseEntity } from './entity.types';
|
|
5
|
-
import { assetIdSchema, IAsset } from './asset.types';
|
|
6
|
-
import { AccountZod } from './common.types';
|
|
7
|
-
import { accountIdSchema } from './account.types';
|
|
8
|
-
|
|
9
|
-
extendZodWithOpenApi(z);
|
|
10
|
-
|
|
11
|
-
export const bonusTierIdSchema = z.string().refine(
|
|
12
|
-
(value) => {
|
|
13
|
-
try {
|
|
14
|
-
const tid = TypeID.fromString(value);
|
|
15
|
-
return tid.getType() === 'bonus_tier';
|
|
16
|
-
} catch {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
message: `Invalid bonus tier ID format. Must be a valid TypeID with "bonus_tier" prefix. Example: bonus_tier_01j5y5ghx5fg68d663j1fvy2x7`,
|
|
22
|
-
},
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export enum BonusType {
|
|
26
|
-
PERCENTAGE = 'PERCENTAGE',
|
|
27
|
-
FIXED = 'FIXED',
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const bonusTiersInclude = z.enum(['account', 'asset']);
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @description Query parameters for including related entities
|
|
34
|
-
* @xample in contract us as -> query: z.object({}).merge(BonusTiersIncludeQuery),
|
|
35
|
-
*/
|
|
36
|
-
export const BonusTiersIncludeQuery = z.object({
|
|
37
|
-
include: z
|
|
38
|
-
.string()
|
|
39
|
-
.optional()
|
|
40
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
41
|
-
.refine(
|
|
42
|
-
(includes) =>
|
|
43
|
-
includes.every((include) =>
|
|
44
|
-
bonusTiersInclude.options.includes(include as any),
|
|
45
|
-
),
|
|
46
|
-
{
|
|
47
|
-
message: `Invalid include option provided. Valid options are: ${bonusTiersInclude.options.join(',')}`,
|
|
48
|
-
},
|
|
49
|
-
)
|
|
50
|
-
.openapi({
|
|
51
|
-
example: `${bonusTiersInclude.options.join(',')}`,
|
|
52
|
-
}),
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export const IBonusTier = IBaseEntity.extend({
|
|
56
|
-
assetId: z.lazy(() => assetIdSchema),
|
|
57
|
-
asset: z.lazy(() => IAsset),
|
|
58
|
-
accountId: z.lazy(() => accountIdSchema),
|
|
59
|
-
account: z.lazy(() => AccountZod),
|
|
60
|
-
order: z.number(),
|
|
61
|
-
type: z.nativeEnum(BonusType),
|
|
62
|
-
value: z.number(),
|
|
63
|
-
startValue: z.number().nullable(),
|
|
64
|
-
endValue: z.number().nullable(),
|
|
65
|
-
startAmount: z.number().nullable(),
|
|
66
|
-
endAmount: z.number().nullable(),
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export const IBonusTierList = z.array(IBonusTier);
|
|
70
|
-
export type IBonusTierList = z.infer<typeof IBonusTierList>;
|
|
71
|
-
|
|
72
|
-
export const EstimateBonusTierCalculationZod = z
|
|
73
|
-
.object({
|
|
74
|
-
assetId: assetIdSchema
|
|
75
|
-
.optional()
|
|
76
|
-
.openapi({ example: 'asset_00041061050r3gg28a1c60t3gf' }),
|
|
77
|
-
bonusTierId: bonusTierIdSchema.optional().openapi({
|
|
78
|
-
example: 'bonus_tier_01j5y5ghx5fg68d663j1fvy2x7',
|
|
79
|
-
}),
|
|
80
|
-
type: z.nativeEnum(BonusType).openapi({ example: BonusType.PERCENTAGE }),
|
|
81
|
-
value: z.number().positive().int().openapi({ example: 50 }),
|
|
82
|
-
startAmount: z.number().positive().openapi({ example: 100 }),
|
|
83
|
-
endAmount: z.number().positive().openapi({ example: 200 }),
|
|
84
|
-
pricePerShare: z.number().positive().openapi({ example: 100 }),
|
|
85
|
-
})
|
|
86
|
-
.refine(
|
|
87
|
-
(data) => {
|
|
88
|
-
if (data.type === BonusType.PERCENTAGE) {
|
|
89
|
-
return data.value <= 100;
|
|
90
|
-
}
|
|
91
|
-
return true;
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
message: 'Value must be less than or equal to 100 for percentage type',
|
|
95
|
-
},
|
|
96
|
-
);
|
|
97
|
-
export type EstimateBonusTierCalculationZod = z.infer<
|
|
98
|
-
typeof EstimateBonusTierCalculationZod
|
|
99
|
-
>;
|
|
100
|
-
|
|
101
|
-
export const ComplianceEstimateBonusTierCalculationZod =
|
|
102
|
-
EstimateBonusTierCalculationZod.and(
|
|
103
|
-
z.object({
|
|
104
|
-
accountId: accountIdSchema,
|
|
105
|
-
}),
|
|
106
|
-
);
|
|
107
|
-
export type ComplianceEstimateBonusTierCalculationZod = z.infer<
|
|
108
|
-
typeof ComplianceEstimateBonusTierCalculationZod
|
|
109
|
-
>;
|
|
110
|
-
export const EstimateBonusTierCalculationResponseZod = z.object({
|
|
111
|
-
bonusTierId: bonusTierIdSchema
|
|
112
|
-
.nullable()
|
|
113
|
-
.openapi({ example: 'bonus_tier_01j5y5ghx5fg68d663j1fvy2x7' }),
|
|
114
|
-
assetId: assetIdSchema
|
|
115
|
-
.nullable()
|
|
116
|
-
.openapi({ example: 'asset_00041061050r3gg28a1c60t3gf' }),
|
|
117
|
-
type: z
|
|
118
|
-
.nativeEnum(BonusType)
|
|
119
|
-
.nullable()
|
|
120
|
-
.openapi({ example: BonusType.PERCENTAGE }),
|
|
121
|
-
startValue: z.number().openapi({ example: 100 }),
|
|
122
|
-
endValue: z.number().openapi({ example: 200 }),
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
export type EstimateBonusTierCalculationResponseZod = z.infer<
|
|
126
|
-
typeof EstimateBonusTierCalculationResponseZod
|
|
127
|
-
>;
|
|
128
|
-
export type IBonusTier = z.infer<typeof IBonusTier>;
|
|
129
|
-
export const BonusTierListZod = z
|
|
130
|
-
.array(
|
|
131
|
-
z.object({
|
|
132
|
-
type: z.nativeEnum(BonusType).openapi({ example: BonusType.PERCENTAGE }),
|
|
133
|
-
value: z.number().positive().int().max(1000000).openapi({ example: 50 }),
|
|
134
|
-
startAmount: z.number().max(999999999).openapi({ example: 100 }),
|
|
135
|
-
endAmount: z.number().max(999999999).openapi({ example: 200 }),
|
|
136
|
-
}),
|
|
137
|
-
)
|
|
138
|
-
.min(1, { message: 'At least one bonus tier is required' });
|
|
139
|
-
export type BonusTierListZod = z.infer<typeof BonusTierListZod>;
|
|
140
|
-
|
|
141
|
-
export const PostBonusTierZod = z.object({
|
|
142
|
-
assetId: assetIdSchema.openapi({
|
|
143
|
-
example: 'asset_00041061050r3gg28a1c60t3gf',
|
|
144
|
-
}),
|
|
145
|
-
bonusTiers: BonusTierListZod,
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
export type PostBonusTierZod = z.infer<typeof PostBonusTierZod>;
|
|
149
|
-
|
|
150
|
-
export const CompliancePostBonusTierZod = PostBonusTierZod.extend({
|
|
151
|
-
accountId: accountIdSchema,
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
export type CompliancePostBonusTierZod = z.infer<
|
|
155
|
-
typeof CompliancePostBonusTierZod
|
|
156
|
-
>;
|
|
157
|
-
export const PurchaseCalculationZod = z.object({
|
|
158
|
-
assetId: assetIdSchema,
|
|
159
|
-
totalAmount: z.number().positive().openapi({ example: 1000 }),
|
|
160
|
-
purchasedShares: z.number().positive().int().openapi({ example: 100 }),
|
|
161
|
-
});
|
|
162
|
-
export type PurchaseCalculationZod = z.infer<typeof PurchaseCalculationZod>;
|
|
163
|
-
|
|
164
|
-
export const PurchaseCalculationResponseZod = z.object({
|
|
165
|
-
bonusTierId: bonusTierIdSchema
|
|
166
|
-
.nullable()
|
|
167
|
-
.openapi({ example: 'bonus_tier_01j5y5ghx5fg68d663j1fvy2x7' }),
|
|
168
|
-
assetId: assetIdSchema.openapi({
|
|
169
|
-
example: 'asset_00041061050r3gg28a1c60t3gf',
|
|
170
|
-
}),
|
|
171
|
-
type: z
|
|
172
|
-
.nativeEnum(BonusType)
|
|
173
|
-
.nullable()
|
|
174
|
-
.openapi({ example: BonusType.PERCENTAGE }),
|
|
175
|
-
bonusShares: z.number().int().openapi({ example: 100 }),
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
export type PurchaseCalculationResponseZod = z.infer<
|
|
179
|
-
typeof PurchaseCalculationResponseZod
|
|
180
|
-
>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
3
|
-
import { TradeStatus } from './common.types';
|
|
4
|
-
import { investorAccountIdSchema } from './investor-account.types';
|
|
5
|
-
import { paymentMethodIdSchema } from './payment-methods.types';
|
|
6
|
-
import { userIdSchema } from './user.types';
|
|
7
|
-
|
|
8
|
-
extendZodWithOpenApi(z);
|
|
9
|
-
|
|
10
|
-
export const PlaceTradeResponse = z.object({
|
|
11
|
-
tradeStatus: z.nativeEnum(TradeStatus).optional(),
|
|
12
|
-
});
|
|
13
|
-
export const PlaceTradeBody = z.object({});
|
|
14
|
-
export const ClientPlacetradeBody = z.object({
|
|
15
|
-
userId: userIdSchema,
|
|
16
|
-
});
|
|
17
|
-
export const PatchCartBody = z.object({
|
|
18
|
-
investorAccountId: investorAccountIdSchema.optional(),
|
|
19
|
-
paymentMethodId: paymentMethodIdSchema.optional(),
|
|
20
|
-
});
|
|
21
|
-
export type PatchCartBody = z.infer<typeof PatchCartBody>;
|