@dalmore/api-contracts 0.0.0-dev.e6235a7 → 0.0.0-dev.eb75b4c
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/constants.d.ts +43 -0
- package/common/constants.js +77 -0
- package/common/constants.js.map +1 -0
- package/common/helpers/index.d.ts +77 -0
- package/common/helpers/index.js +179 -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 +140 -0
- package/common/types/account-setting.types.js +23 -0
- package/common/types/account-setting.types.js.map +1 -0
- package/common/types/account.types.d.ts +640 -0
- package/common/types/account.types.js +218 -0
- package/common/types/account.types.js.map +1 -0
- package/common/types/activity.types.d.ts +591 -0
- package/common/types/activity.types.js +259 -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 +1100 -0
- package/common/types/asset.types.js +353 -0
- package/common/types/asset.types.js.map +1 -0
- package/common/types/attribution.types.d.ts +582 -0
- package/common/types/attribution.types.js +126 -0
- package/common/types/attribution.types.js.map +1 -0
- package/common/types/auth.types.d.ts +523 -0
- package/common/types/auth.types.js +280 -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 +991 -0
- package/common/types/bonus-tier.types.js +166 -0
- package/common/types/bonus-tier.types.js.map +1 -0
- package/common/types/cap-table.types.d.ts +1319 -0
- package/common/types/cap-table.types.js +458 -0
- package/common/types/cap-table.types.js.map +1 -0
- package/common/types/cart.types.d.ts +31 -0
- package/common/types/cart.types.js +20 -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 +1861 -0
- package/common/types/common.types.js +1511 -0
- package/common/types/common.types.js.map +1 -0
- package/common/types/comply-advantage-api.types.d.ts +3626 -0
- package/common/types/comply-advantage-api.types.js +291 -0
- package/common/types/comply-advantage-api.types.js.map +1 -0
- package/common/types/comply-advantage.types.d.ts +48 -0
- package/common/types/comply-advantage.types.js +21 -0
- package/common/types/comply-advantage.types.js.map +1 -0
- package/common/types/contact-us.types.d.ts +126 -0
- package/common/types/contact-us.types.js +91 -0
- package/common/types/contact-us.types.js.map +1 -0
- package/common/types/countries.types.d.ts +77 -0
- package/common/types/countries.types.js +349 -0
- package/common/types/countries.types.js.map +1 -0
- package/common/types/covered-person.types.d.ts +204 -0
- package/common/types/covered-person.types.js +234 -0
- package/common/types/covered-person.types.js.map +1 -0
- package/common/types/csv.types.d.ts +3612 -0
- package/common/types/csv.types.js +290 -0
- package/common/types/csv.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 +3573 -0
- package/common/types/disbursements.types.js +447 -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 +415 -0
- package/common/types/escrow-account.types.js +78 -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 +428 -0
- package/common/types/file.types.js +392 -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} +8 -5
- package/common/types/index.js +55 -0
- package/common/types/index.js.map +1 -0
- package/common/types/individuals.types.d.ts +2289 -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 +931 -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 +399 -0
- package/common/types/investors-offering.types.js +50 -0
- package/common/types/investors-offering.types.js.map +1 -0
- package/common/types/invite.types.d.ts +644 -0
- package/common/types/invite.types.js +114 -0
- package/common/types/invite.types.js.map +1 -0
- package/common/types/issuer-bank-account.types.d.ts +113 -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 +2236 -0
- package/common/types/issuer-offering.types.js +605 -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 +676 -0
- package/common/types/legal-entity.types.js +151 -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 +676 -0
- package/common/types/mail-template.types.js +531 -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 +2690 -0
- package/common/types/notification.types.js +411 -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 +785 -0
- package/common/types/offering-submission.types.js +291 -0
- package/common/types/offering-submission.types.js.map +1 -0
- package/common/types/offering.types.d.ts +2859 -0
- package/common/types/offering.types.js +832 -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 +1165 -0
- package/common/types/payment-methods.types.js +381 -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/reports.types.d.ts +345 -0
- package/common/types/reports.types.js +69 -0
- package/common/types/reports.types.js.map +1 -0
- package/common/types/review.types.d.ts +419 -0
- package/common/types/review.types.js +101 -0
- package/common/types/review.types.js.map +1 -0
- package/common/types/role.types.d.ts +30 -0
- package/common/types/role.types.js +21 -0
- package/common/types/role.types.js.map +1 -0
- package/common/types/secondary-customer.types.d.ts +586 -0
- package/common/types/secondary-customer.types.js +39 -0
- package/common/types/secondary-customer.types.js.map +1 -0
- package/common/types/secondary-issuer.types.d.ts +283 -0
- package/common/types/secondary-issuer.types.js +37 -0
- package/common/types/secondary-issuer.types.js.map +1 -0
- package/common/types/secondary-order.types.d.ts +508 -0
- package/common/types/secondary-order.types.js +40 -0
- package/common/types/secondary-order.types.js.map +1 -0
- package/common/types/secondary-security.types.d.ts +175 -0
- package/common/types/secondary-security.types.js +45 -0
- package/common/types/secondary-security.types.js.map +1 -0
- package/common/types/secondary-trade.entity.d.ts +16 -0
- package/common/types/secondary-trade.entity.js +12 -0
- package/common/types/secondary-trade.entity.js.map +1 -0
- package/common/types/secondary-trade.types.d.ts +465 -0
- package/common/types/secondary-trade.types.js +61 -0
- package/common/types/secondary-trade.types.js.map +1 -0
- package/common/types/secure-request.types.d.ts +171 -0
- package/common/types/secure-request.types.js +51 -0
- package/common/types/secure-request.types.js.map +1 -0
- package/common/types/signer.types.d.ts +3406 -0
- package/common/types/signer.types.js +532 -0
- package/common/types/signer.types.js.map +1 -0
- package/common/types/site-link.types.d.ts +875 -0
- package/common/types/site-link.types.js +126 -0
- package/common/types/site-link.types.js.map +1 -0
- package/common/types/site-settings.types.d.ts +1673 -0
- package/common/types/site-settings.types.js +500 -0
- package/common/types/site-settings.types.js.map +1 -0
- package/common/types/site.types.d.ts +1481 -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 +545 -0
- package/common/types/task.types.js +214 -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 +353 -0
- package/common/types/trade-line-item.types.js +103 -0
- package/common/types/trade-line-item.types.js.map +1 -0
- package/common/types/trade.types.d.ts +2012 -0
- package/common/types/trade.types.js +800 -0
- package/common/types/trade.types.js.map +1 -0
- package/common/types/transaction.types.d.ts +476 -0
- package/common/types/transaction.types.js +199 -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 +1977 -0
- package/common/types/user.types.js +225 -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/zapier.types.d.ts +126 -0
- package/common/types/zapier.types.js +247 -0
- package/common/types/zapier.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 +1050 -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 +232 -0
- package/contracts/clients/cart/index.js +63 -0
- package/contracts/clients/cart/index.js.map +1 -0
- package/contracts/clients/csv/index.d.ts +1988 -0
- package/contracts/clients/csv/index.js +96 -0
- package/contracts/clients/csv/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 +15681 -0
- package/contracts/clients/index.js +58 -0
- package/contracts/clients/index.js.map +1 -0
- package/contracts/clients/individuals/index.d.ts +3575 -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 +1068 -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/review/index.d.ts +85 -0
- package/contracts/clients/review/index.js +27 -0
- package/contracts/clients/review/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/contracts/clients/webhooks/index.d.ts +506 -0
- package/contracts/clients/webhooks/index.js +118 -0
- package/contracts/clients/webhooks/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 -99
- package/common/types/account-detail.types.ts +0 -27
- package/common/types/account-integration.types.ts +0 -143
- package/common/types/account-manager.types.ts +0 -120
- package/common/types/account-setting.types.ts +0 -65
- package/common/types/account.types.ts +0 -297
- package/common/types/activity.types.ts +0 -274
- package/common/types/address.types.ts +0 -41
- package/common/types/aic.types.ts +0 -246
- package/common/types/aml.types.ts +0 -18
- package/common/types/api-key-logs.types.ts +0 -66
- package/common/types/api-keys.types.ts +0 -69
- package/common/types/asset.types.ts +0 -338
- package/common/types/auth.types.ts +0 -359
- package/common/types/batch-jobs.types.ts +0 -151
- package/common/types/bonus-tier.types.ts +0 -180
- package/common/types/cart.types.ts +0 -21
- package/common/types/checklist-items.types.ts +0 -70
- package/common/types/checklist.types.ts +0 -97
- package/common/types/common.types.ts +0 -1546
- 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 -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 -544
- 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 -999
- 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 -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 -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/contracts/compliance/account-contacts/index.ts +0 -82
- package/contracts/compliance/account-managers/index.ts +0 -142
- package/contracts/compliance/account-settings/index.ts +0 -59
- 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 -135
- package/contracts/compliance/batch-jobs/index.ts +0 -62
- package/contracts/compliance/bonus-tiers/index.ts +0 -74
- 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 -151
- package/contracts/compliance/individuals/index.ts +0 -57
- package/contracts/compliance/investor-accounts/index.ts +0 -141
- package/contracts/compliance/invites/index.ts +0 -129
- 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/notification-channels/index.ts +0 -251
- 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 -221
- 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 -55
- 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 -121
- 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/account-settings/index.ts +0 -36
- 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 -153
- package/contracts/issuers/bonus-tiers/index.ts +0 -73
- 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 -189
- 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 -116
- 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/notification-channels/index.ts +0 -251
- 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,544 +0,0 @@
|
|
|
1
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { TypeID } from 'typeid-js';
|
|
4
|
-
import { IBaseEntity } from './entity.types';
|
|
5
|
-
import { IPaginationMeta, StringToBooleanSchema } from './common.types';
|
|
6
|
-
import {
|
|
7
|
-
ActivityTypeAction,
|
|
8
|
-
ActivityTypeCategory,
|
|
9
|
-
ActivityTypeResource,
|
|
10
|
-
} from './activity.types';
|
|
11
|
-
|
|
12
|
-
extendZodWithOpenApi(z);
|
|
13
|
-
|
|
14
|
-
export enum NotificationChannelType {
|
|
15
|
-
EMAIL = 'EMAIL',
|
|
16
|
-
SLACK = 'SLACK',
|
|
17
|
-
WEBHOOK = 'WEBHOOK',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export enum NotificationRecordStatus {
|
|
21
|
-
PENDING = 'PENDING',
|
|
22
|
-
SENT = 'SENT',
|
|
23
|
-
FAILED = 'FAILED',
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type TriggerExclusion = {
|
|
27
|
-
category?: ActivityTypeCategory;
|
|
28
|
-
resource?: ActivityTypeResource;
|
|
29
|
-
action?: ActivityTypeAction;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// Excluded notifications
|
|
33
|
-
export const EXCLUDED_NOTIFICATION_TRIGGERS: TriggerExclusion[] = [
|
|
34
|
-
// { action: ActivityTypeAction.RE_SIGN },
|
|
35
|
-
// { action: ActivityTypeAction.RESET_2FA },
|
|
36
|
-
// { action: ActivityTypeAction.LOGIN },
|
|
37
|
-
// { action: ActivityTypeAction.RESET_PASSWORD },
|
|
38
|
-
// { action: ActivityTypeAction.TWO_FACTOR_LOGIN },
|
|
39
|
-
// { action: ActivityTypeAction.FORGOT_PASSWORD },
|
|
40
|
-
// { resource: ActivityTypeResource.USERS },
|
|
41
|
-
// { resource: ActivityTypeResource.THEME_SETTINGS },
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
export const ISSUER_ALLOWED_CATEGORIES: ActivityTypeCategory[] = [
|
|
45
|
-
ActivityTypeCategory.ISSUER,
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Checks if an activity type should be excluded from notifications.
|
|
50
|
-
*
|
|
51
|
-
* Each exclusion pattern can specify any combination of category, resource, and action.
|
|
52
|
-
* Omitted fields act as wildcards (match any value).
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* // Excludes ALL activities with action RE_SIGN (any category, any resource)
|
|
56
|
-
* { action: ActivityTypeAction.RE_SIGN }
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* // Excludes ALL USERS activities (any category, any action)
|
|
60
|
-
* { resource: ActivityTypeResource.USERS }
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* // Excludes only COMPLIANCE + TRADES + CREATE (all three must match)
|
|
64
|
-
* { category: ActivityTypeCategory.COMPLIANCE, resource: ActivityTypeResource.TRADES, action: ActivityTypeAction.CREATE }
|
|
65
|
-
*
|
|
66
|
-
* @param category - The activity type category to check
|
|
67
|
-
* @param resource - The activity type resource to check
|
|
68
|
-
* @param action - The activity type action to check
|
|
69
|
-
* @param exclusions - Array of exclusion patterns (defaults to EXCLUDED_NOTIFICATION_TRIGGERS)
|
|
70
|
-
* @returns true if the activity type matches any exclusion pattern
|
|
71
|
-
*/
|
|
72
|
-
export function isTriggerExcluded(
|
|
73
|
-
category: string,
|
|
74
|
-
resource: string,
|
|
75
|
-
action: string,
|
|
76
|
-
exclusions: TriggerExclusion[] = EXCLUDED_NOTIFICATION_TRIGGERS,
|
|
77
|
-
): boolean {
|
|
78
|
-
return exclusions.some((exclusion) => {
|
|
79
|
-
const categoryMatch =
|
|
80
|
-
!exclusion.category || exclusion.category === category;
|
|
81
|
-
const resourceMatch =
|
|
82
|
-
!exclusion.resource || exclusion.resource === resource;
|
|
83
|
-
const actionMatch = !exclusion.action || exclusion.action === action;
|
|
84
|
-
return categoryMatch && resourceMatch && actionMatch;
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Checks if a category is allowed for notification triggers.
|
|
90
|
-
*
|
|
91
|
-
* Used to restrict which activity type categories a user can subscribe to.
|
|
92
|
-
* For example, issuers can only subscribe to ISSUER category triggers.
|
|
93
|
-
*
|
|
94
|
-
* @param category - The activity type category to check
|
|
95
|
-
* @param allowedCategories - Optional array of allowed categories. If empty or undefined, all categories are allowed.
|
|
96
|
-
* @returns true if the category is allowed (or if no restrictions are set)
|
|
97
|
-
*/
|
|
98
|
-
export function isCategoryAllowed(
|
|
99
|
-
category: string,
|
|
100
|
-
allowedCategories?: ActivityTypeCategory[],
|
|
101
|
-
): boolean {
|
|
102
|
-
if (!allowedCategories || allowedCategories.length === 0) {
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
return allowedCategories.includes(category as ActivityTypeCategory);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export const notificationChannelIdSchema = z.string().refine(
|
|
109
|
-
(value) => {
|
|
110
|
-
try {
|
|
111
|
-
const tid = TypeID.fromString(value);
|
|
112
|
-
return tid.getType() === 'notification_channel';
|
|
113
|
-
} catch {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
message:
|
|
119
|
-
'Invalid notification channel ID format. Must be a valid TypeID with "notification_channel" prefix.',
|
|
120
|
-
},
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
export const notificationChannelTriggerIdSchema = z.string().refine(
|
|
124
|
-
(value) => {
|
|
125
|
-
try {
|
|
126
|
-
const tid = TypeID.fromString(value);
|
|
127
|
-
return tid.getType() === 'notification_channel_trigger';
|
|
128
|
-
} catch {
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
message:
|
|
134
|
-
'Invalid notification channel trigger ID format. Must be a valid TypeID with "notification_channel_trigger" prefix.',
|
|
135
|
-
},
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
export const notificationRecordIdSchema = z.string().refine(
|
|
139
|
-
(value) => {
|
|
140
|
-
try {
|
|
141
|
-
const tid = TypeID.fromString(value);
|
|
142
|
-
return tid.getType() === 'notification_record';
|
|
143
|
-
} catch {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
message:
|
|
149
|
-
'Invalid notification record ID format. Must be a valid TypeID with "notification_record" prefix.',
|
|
150
|
-
},
|
|
151
|
-
);
|
|
152
|
-
|
|
153
|
-
export const EmailChannelSettingsSchema = z.object({
|
|
154
|
-
recipients: z
|
|
155
|
-
.array(z.string().email())
|
|
156
|
-
.min(1)
|
|
157
|
-
.max(100, 'At most 100 recipients are allowed'),
|
|
158
|
-
subjectTemplate: z.string().optional(),
|
|
159
|
-
});
|
|
160
|
-
export type EmailChannelSettings = z.infer<typeof EmailChannelSettingsSchema>;
|
|
161
|
-
|
|
162
|
-
export const SlackChannelSettingsSchema = z
|
|
163
|
-
.object({
|
|
164
|
-
webhookUrl: z.string().url().optional(),
|
|
165
|
-
channelEmail: z.string().email().optional(),
|
|
166
|
-
})
|
|
167
|
-
.refine((data) => data.webhookUrl || data.channelEmail, {
|
|
168
|
-
message: 'Either webhookUrl or channelEmail is required',
|
|
169
|
-
});
|
|
170
|
-
export type SlackChannelSettings = z.infer<typeof SlackChannelSettingsSchema>;
|
|
171
|
-
|
|
172
|
-
export const WebhookChannelSettingsSchema = z.object({
|
|
173
|
-
url: z.string().url(),
|
|
174
|
-
method: z.enum(['POST', 'PUT']),
|
|
175
|
-
headers: z.record(z.string()).optional(),
|
|
176
|
-
authType: z.enum(['none', 'bearer', 'basic', 'api_key']).default('none'),
|
|
177
|
-
authValue: z.string().optional(),
|
|
178
|
-
});
|
|
179
|
-
export type WebhookChannelSettings = z.infer<
|
|
180
|
-
typeof WebhookChannelSettingsSchema
|
|
181
|
-
>;
|
|
182
|
-
|
|
183
|
-
export const NotificationChannelSettingsSchema = z.discriminatedUnion('type', [
|
|
184
|
-
z.object({
|
|
185
|
-
type: z.literal(NotificationChannelType.EMAIL),
|
|
186
|
-
config: EmailChannelSettingsSchema,
|
|
187
|
-
}),
|
|
188
|
-
z.object({
|
|
189
|
-
type: z.literal(NotificationChannelType.SLACK),
|
|
190
|
-
config: SlackChannelSettingsSchema,
|
|
191
|
-
}),
|
|
192
|
-
z.object({
|
|
193
|
-
type: z.literal(NotificationChannelType.WEBHOOK),
|
|
194
|
-
config: WebhookChannelSettingsSchema,
|
|
195
|
-
}),
|
|
196
|
-
]);
|
|
197
|
-
export type NotificationChannelSettings = z.infer<
|
|
198
|
-
typeof NotificationChannelSettingsSchema
|
|
199
|
-
>;
|
|
200
|
-
|
|
201
|
-
export const EmailNotificationPayloadSchema = z.object({
|
|
202
|
-
to: z.array(z.string().email()),
|
|
203
|
-
subject: z.string(),
|
|
204
|
-
body: z.string(),
|
|
205
|
-
html: z.string().optional(),
|
|
206
|
-
});
|
|
207
|
-
export type EmailNotificationPayload = z.infer<
|
|
208
|
-
typeof EmailNotificationPayloadSchema
|
|
209
|
-
>;
|
|
210
|
-
|
|
211
|
-
export const SlackNotificationPayloadSchema = z.object({
|
|
212
|
-
webhookUrl: z.string().url().optional(),
|
|
213
|
-
channelEmail: z.string().email().optional(),
|
|
214
|
-
message: z.string(),
|
|
215
|
-
blocks: z.array(z.record(z.unknown())).optional(),
|
|
216
|
-
});
|
|
217
|
-
export type SlackNotificationPayload = z.infer<
|
|
218
|
-
typeof SlackNotificationPayloadSchema
|
|
219
|
-
>;
|
|
220
|
-
|
|
221
|
-
export const WebhookNotificationPayloadSchema = z.object({
|
|
222
|
-
url: z.string().url(),
|
|
223
|
-
method: z.enum(['POST', 'PUT']),
|
|
224
|
-
headers: z.record(z.string()),
|
|
225
|
-
body: z.record(z.unknown()),
|
|
226
|
-
});
|
|
227
|
-
export type WebhookNotificationPayload = z.infer<
|
|
228
|
-
typeof WebhookNotificationPayloadSchema
|
|
229
|
-
>;
|
|
230
|
-
|
|
231
|
-
export const NotificationPayloadSchema = z.discriminatedUnion('type', [
|
|
232
|
-
z.object({
|
|
233
|
-
type: z.literal(NotificationChannelType.EMAIL),
|
|
234
|
-
data: EmailNotificationPayloadSchema,
|
|
235
|
-
}),
|
|
236
|
-
z.object({
|
|
237
|
-
type: z.literal(NotificationChannelType.SLACK),
|
|
238
|
-
data: SlackNotificationPayloadSchema,
|
|
239
|
-
}),
|
|
240
|
-
z.object({
|
|
241
|
-
type: z.literal(NotificationChannelType.WEBHOOK),
|
|
242
|
-
data: WebhookNotificationPayloadSchema,
|
|
243
|
-
}),
|
|
244
|
-
]);
|
|
245
|
-
export type NotificationPayload = z.infer<typeof NotificationPayloadSchema>;
|
|
246
|
-
|
|
247
|
-
export const EmailNotificationResponseSchema = z.object({
|
|
248
|
-
messageId: z.string().optional(),
|
|
249
|
-
accepted: z.array(z.string()).optional(),
|
|
250
|
-
rejected: z.array(z.string()).optional(),
|
|
251
|
-
});
|
|
252
|
-
export type EmailNotificationResponse = z.infer<
|
|
253
|
-
typeof EmailNotificationResponseSchema
|
|
254
|
-
>;
|
|
255
|
-
|
|
256
|
-
export const SlackNotificationResponseSchema = z.object({
|
|
257
|
-
ok: z.boolean().optional(),
|
|
258
|
-
error: z.string().optional(),
|
|
259
|
-
responseBody: z.string().optional(),
|
|
260
|
-
});
|
|
261
|
-
export type SlackNotificationResponse = z.infer<
|
|
262
|
-
typeof SlackNotificationResponseSchema
|
|
263
|
-
>;
|
|
264
|
-
|
|
265
|
-
export const WebhookNotificationResponseSchema = z.object({
|
|
266
|
-
statusCode: z.number(),
|
|
267
|
-
headers: z.record(z.string()).optional(),
|
|
268
|
-
body: z.unknown().optional(),
|
|
269
|
-
});
|
|
270
|
-
export type WebhookNotificationResponse = z.infer<
|
|
271
|
-
typeof WebhookNotificationResponseSchema
|
|
272
|
-
>;
|
|
273
|
-
|
|
274
|
-
export const NotificationResponseSchema = z.discriminatedUnion('type', [
|
|
275
|
-
z.object({
|
|
276
|
-
type: z.literal(NotificationChannelType.EMAIL),
|
|
277
|
-
data: EmailNotificationResponseSchema,
|
|
278
|
-
}),
|
|
279
|
-
z.object({
|
|
280
|
-
type: z.literal(NotificationChannelType.SLACK),
|
|
281
|
-
data: SlackNotificationResponseSchema,
|
|
282
|
-
}),
|
|
283
|
-
z.object({
|
|
284
|
-
type: z.literal(NotificationChannelType.WEBHOOK),
|
|
285
|
-
data: WebhookNotificationResponseSchema,
|
|
286
|
-
}),
|
|
287
|
-
]);
|
|
288
|
-
export type NotificationResponse = z.infer<typeof NotificationResponseSchema>;
|
|
289
|
-
|
|
290
|
-
export const INotificationChannelZod = IBaseEntity.extend({
|
|
291
|
-
id: notificationChannelIdSchema.openapi({
|
|
292
|
-
example: 'notification_channel_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
293
|
-
}),
|
|
294
|
-
accountSettingsId: z.string().openapi({
|
|
295
|
-
example: 'account_setting_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
296
|
-
}),
|
|
297
|
-
channelType: z.nativeEnum(NotificationChannelType).openapi({
|
|
298
|
-
example: NotificationChannelType.SLACK,
|
|
299
|
-
}),
|
|
300
|
-
name: z.string().openapi({
|
|
301
|
-
example: 'Compliance Alerts',
|
|
302
|
-
}),
|
|
303
|
-
enabled: z.boolean().openapi({
|
|
304
|
-
example: true,
|
|
305
|
-
}),
|
|
306
|
-
settings: NotificationChannelSettingsSchema.openapi({
|
|
307
|
-
example: {
|
|
308
|
-
type: NotificationChannelType.SLACK,
|
|
309
|
-
config: {
|
|
310
|
-
webhookUrl: 'https://hooks.slack.com/test',
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
}),
|
|
314
|
-
});
|
|
315
|
-
export type INotificationChannelZod = z.infer<typeof INotificationChannelZod>;
|
|
316
|
-
|
|
317
|
-
export const INotificationChannelTriggerZod = IBaseEntity.extend({
|
|
318
|
-
id: notificationChannelTriggerIdSchema.openapi({
|
|
319
|
-
example: 'notification_channel_trigger_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
320
|
-
}),
|
|
321
|
-
notificationChannelId: notificationChannelIdSchema.openapi({
|
|
322
|
-
example: 'notification_channel_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
323
|
-
}),
|
|
324
|
-
activityTypeId: z.string().openapi({
|
|
325
|
-
example: 'activity_type_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
326
|
-
}),
|
|
327
|
-
enabled: z.boolean().openapi({
|
|
328
|
-
example: true,
|
|
329
|
-
}),
|
|
330
|
-
});
|
|
331
|
-
export type INotificationChannelTriggerZod = z.infer<
|
|
332
|
-
typeof INotificationChannelTriggerZod
|
|
333
|
-
>;
|
|
334
|
-
|
|
335
|
-
export const IAvailableTriggerZod = z.object({
|
|
336
|
-
activityTypeId: z.string().openapi({
|
|
337
|
-
example: 'activity_type_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
338
|
-
}),
|
|
339
|
-
category: z.string().openapi({
|
|
340
|
-
example: 'COMPLIANCE',
|
|
341
|
-
}),
|
|
342
|
-
resource: z.string().openapi({
|
|
343
|
-
example: 'TRADES',
|
|
344
|
-
}),
|
|
345
|
-
action: z.string().openapi({
|
|
346
|
-
example: 'CREATE',
|
|
347
|
-
}),
|
|
348
|
-
enabled: z.boolean().openapi({
|
|
349
|
-
description: 'Whether the trigger is enabled for this activity type',
|
|
350
|
-
example: false,
|
|
351
|
-
}),
|
|
352
|
-
trigger: INotificationChannelTriggerZod.nullable().openapi({
|
|
353
|
-
description: 'The configured trigger, or null if not configured',
|
|
354
|
-
}),
|
|
355
|
-
});
|
|
356
|
-
export type IAvailableTriggerZod = z.infer<typeof IAvailableTriggerZod>;
|
|
357
|
-
|
|
358
|
-
export const IAvailableTriggersResponse = z.object({
|
|
359
|
-
items: z.array(IAvailableTriggerZod),
|
|
360
|
-
});
|
|
361
|
-
export type IAvailableTriggersResponse = z.infer<
|
|
362
|
-
typeof IAvailableTriggersResponse
|
|
363
|
-
>;
|
|
364
|
-
|
|
365
|
-
export const INotificationRecordZod = IBaseEntity.extend({
|
|
366
|
-
id: notificationRecordIdSchema.openapi({
|
|
367
|
-
example: 'notification_record_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
368
|
-
}),
|
|
369
|
-
notificationChannelId: notificationChannelIdSchema.openapi({
|
|
370
|
-
example: 'notification_channel_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
371
|
-
}),
|
|
372
|
-
activityId: z.string().nullable().openapi({
|
|
373
|
-
example: 'activity_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
374
|
-
}),
|
|
375
|
-
targetTable: z.string().openapi({
|
|
376
|
-
example: 'trades',
|
|
377
|
-
}),
|
|
378
|
-
targetId: z.string().openapi({
|
|
379
|
-
example: 'trade_01j5y5ghx8fvc83dmx3pznq7hv',
|
|
380
|
-
}),
|
|
381
|
-
status: z.nativeEnum(NotificationRecordStatus).openapi({
|
|
382
|
-
example: NotificationRecordStatus.SENT,
|
|
383
|
-
}),
|
|
384
|
-
payload: NotificationPayloadSchema,
|
|
385
|
-
response: NotificationResponseSchema.nullable(),
|
|
386
|
-
errorMessage: z.string().nullable().openapi({
|
|
387
|
-
example: null,
|
|
388
|
-
}),
|
|
389
|
-
retryCount: z.number().openapi({
|
|
390
|
-
example: 0,
|
|
391
|
-
}),
|
|
392
|
-
sentAt: z.date().nullable().openapi({
|
|
393
|
-
example: new Date(),
|
|
394
|
-
}),
|
|
395
|
-
});
|
|
396
|
-
export type INotificationRecordZod = z.infer<typeof INotificationRecordZod>;
|
|
397
|
-
|
|
398
|
-
export const CreateChannelInputSchema = z
|
|
399
|
-
.object({
|
|
400
|
-
accountSettingsId: z.string(),
|
|
401
|
-
channelType: z.nativeEnum(NotificationChannelType),
|
|
402
|
-
name: z
|
|
403
|
-
.string()
|
|
404
|
-
.min(1, 'Name is required')
|
|
405
|
-
.max(255, 'Name must be less than 255 characters'),
|
|
406
|
-
enabled: z.boolean().optional(),
|
|
407
|
-
settings: NotificationChannelSettingsSchema,
|
|
408
|
-
})
|
|
409
|
-
.refine((data) => data.channelType === data.settings.type, {
|
|
410
|
-
message: 'Channel type must match settings type',
|
|
411
|
-
path: ['settings', 'type'],
|
|
412
|
-
});
|
|
413
|
-
export type CreateChannelInput = z.infer<typeof CreateChannelInputSchema>;
|
|
414
|
-
|
|
415
|
-
export const IssuerCreateChannelInputSchema = z
|
|
416
|
-
.object({
|
|
417
|
-
channelType: z.nativeEnum(NotificationChannelType),
|
|
418
|
-
name: z
|
|
419
|
-
.string()
|
|
420
|
-
.min(1, 'Name is required')
|
|
421
|
-
.max(255, 'Name must be less than 255 characters'),
|
|
422
|
-
enabled: z.boolean().optional(),
|
|
423
|
-
settings: NotificationChannelSettingsSchema,
|
|
424
|
-
})
|
|
425
|
-
.refine((data) => data.channelType === data.settings.type, {
|
|
426
|
-
message: 'Channel type must match settings type',
|
|
427
|
-
path: ['settings', 'type'],
|
|
428
|
-
});
|
|
429
|
-
export type IssuerCreateChannelInput = z.infer<
|
|
430
|
-
typeof IssuerCreateChannelInputSchema
|
|
431
|
-
>;
|
|
432
|
-
|
|
433
|
-
export const UpdateChannelInputSchema = z.object({
|
|
434
|
-
name: z.string().optional(),
|
|
435
|
-
enabled: z.boolean().optional(),
|
|
436
|
-
settings: NotificationChannelSettingsSchema.optional(),
|
|
437
|
-
});
|
|
438
|
-
export type UpdateChannelInput = z.infer<typeof UpdateChannelInputSchema>;
|
|
439
|
-
|
|
440
|
-
export const CreateTriggerInputSchema = z.object({
|
|
441
|
-
notificationChannelId: notificationChannelIdSchema,
|
|
442
|
-
activityTypeId: z.string(),
|
|
443
|
-
enabled: z.boolean().optional(),
|
|
444
|
-
});
|
|
445
|
-
export type CreateTriggerInput = z.infer<typeof CreateTriggerInputSchema>;
|
|
446
|
-
|
|
447
|
-
export const IPaginatedNotificationChannel = z.object({
|
|
448
|
-
items: z.array(INotificationChannelZod),
|
|
449
|
-
meta: IPaginationMeta,
|
|
450
|
-
});
|
|
451
|
-
export type IPaginatedNotificationChannel = z.infer<
|
|
452
|
-
typeof IPaginatedNotificationChannel
|
|
453
|
-
>;
|
|
454
|
-
|
|
455
|
-
export const IPaginatedNotificationChannelTrigger = z.object({
|
|
456
|
-
items: z.array(INotificationChannelTriggerZod),
|
|
457
|
-
meta: IPaginationMeta,
|
|
458
|
-
});
|
|
459
|
-
export type IPaginatedNotificationChannelTrigger = z.infer<
|
|
460
|
-
typeof IPaginatedNotificationChannelTrigger
|
|
461
|
-
>;
|
|
462
|
-
|
|
463
|
-
export const IPaginatedNotificationRecord = z.object({
|
|
464
|
-
items: z.array(INotificationRecordZod),
|
|
465
|
-
meta: IPaginationMeta,
|
|
466
|
-
});
|
|
467
|
-
export type IPaginatedNotificationRecord = z.infer<
|
|
468
|
-
typeof IPaginatedNotificationRecord
|
|
469
|
-
>;
|
|
470
|
-
|
|
471
|
-
export const NotificationChannelFilters = z.object({
|
|
472
|
-
accountSettingsId: z.string().optional(),
|
|
473
|
-
channelType: z.nativeEnum(NotificationChannelType).optional(),
|
|
474
|
-
enabled: StringToBooleanSchema.optional(),
|
|
475
|
-
});
|
|
476
|
-
export type NotificationChannelFilters = z.infer<
|
|
477
|
-
typeof NotificationChannelFilters
|
|
478
|
-
>;
|
|
479
|
-
|
|
480
|
-
export const NotificationChannelTriggerFilters = z.object({
|
|
481
|
-
notificationChannelId: notificationChannelIdSchema.optional(),
|
|
482
|
-
activityTypeId: z.string().optional(),
|
|
483
|
-
enabled: StringToBooleanSchema.optional(),
|
|
484
|
-
});
|
|
485
|
-
export type NotificationChannelTriggerFilters = z.infer<
|
|
486
|
-
typeof NotificationChannelTriggerFilters
|
|
487
|
-
>;
|
|
488
|
-
|
|
489
|
-
export const NotificationRecordFilters = z.object({
|
|
490
|
-
notificationChannelId: notificationChannelIdSchema.optional(),
|
|
491
|
-
status: z.nativeEnum(NotificationRecordStatus).optional(),
|
|
492
|
-
});
|
|
493
|
-
export type NotificationRecordFilters = z.infer<
|
|
494
|
-
typeof NotificationRecordFilters
|
|
495
|
-
>;
|
|
496
|
-
|
|
497
|
-
export const notificationChannelsInclude = z.enum([
|
|
498
|
-
'triggers',
|
|
499
|
-
'accountSettings',
|
|
500
|
-
'notificationRecords',
|
|
501
|
-
]);
|
|
502
|
-
|
|
503
|
-
export const NotificationChannelsIncludeQuery = z.object({
|
|
504
|
-
include: z
|
|
505
|
-
.string()
|
|
506
|
-
.optional()
|
|
507
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
508
|
-
.refine(
|
|
509
|
-
(includes) =>
|
|
510
|
-
includes.every((include) =>
|
|
511
|
-
notificationChannelsInclude.options.includes(include as any),
|
|
512
|
-
),
|
|
513
|
-
{
|
|
514
|
-
message: `Invalid include value. Valid values are: ${notificationChannelsInclude.options.join(', ')}`,
|
|
515
|
-
},
|
|
516
|
-
),
|
|
517
|
-
});
|
|
518
|
-
export type NotificationChannelsIncludeQuery = z.infer<
|
|
519
|
-
typeof NotificationChannelsIncludeQuery
|
|
520
|
-
>;
|
|
521
|
-
|
|
522
|
-
export const notificationRecordsInclude = z.enum([
|
|
523
|
-
'notificationChannel',
|
|
524
|
-
'activity',
|
|
525
|
-
]);
|
|
526
|
-
|
|
527
|
-
export const NotificationRecordsIncludeQuery = z.object({
|
|
528
|
-
include: z
|
|
529
|
-
.string()
|
|
530
|
-
.optional()
|
|
531
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
532
|
-
.refine(
|
|
533
|
-
(includes) =>
|
|
534
|
-
includes.every((include) =>
|
|
535
|
-
notificationRecordsInclude.options.includes(include as any),
|
|
536
|
-
),
|
|
537
|
-
{
|
|
538
|
-
message: `Invalid include value. Valid values are: ${notificationRecordsInclude.options.join(', ')}`,
|
|
539
|
-
},
|
|
540
|
-
),
|
|
541
|
-
});
|
|
542
|
-
export type NotificationRecordsIncludeQuery = z.infer<
|
|
543
|
-
typeof NotificationRecordsIncludeQuery
|
|
544
|
-
>;
|