@dalmore/api-contracts 0.0.0-dev.801385 → 0.0.0-dev.9c066a6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -19
- package/common/helpers/index.d.ts +50 -0
- package/common/helpers/index.js +136 -0
- package/common/helpers/index.js.map +1 -0
- package/common/types/account-contact.types.d.ts +485 -0
- package/common/types/account-contact.types.js +75 -0
- package/common/types/account-contact.types.js.map +1 -0
- package/common/types/account-detail.types.d.ts +304 -0
- package/common/types/account-detail.types.js +20 -0
- package/common/types/account-detail.types.js.map +1 -0
- package/common/types/account-integration.types.d.ts +242 -0
- package/common/types/account-integration.types.js +121 -0
- package/common/types/account-integration.types.js.map +1 -0
- package/common/types/account-manager.types.d.ts +917 -0
- package/common/types/account-manager.types.js +89 -0
- package/common/types/account-manager.types.js.map +1 -0
- package/common/types/account-setting.types.d.ts +184 -0
- package/common/types/account-setting.types.js +52 -0
- package/common/types/account-setting.types.js.map +1 -0
- package/common/types/account.types.d.ts +631 -0
- package/common/types/account.types.js +217 -0
- package/common/types/account.types.js.map +1 -0
- package/common/types/activity.types.d.ts +580 -0
- package/common/types/activity.types.js +245 -0
- package/common/types/activity.types.js.map +1 -0
- package/common/types/address.types.d.ts +89 -0
- package/common/types/address.types.js +36 -0
- package/common/types/address.types.js.map +1 -0
- package/common/types/aic.types.d.ts +434 -0
- package/common/types/aic.types.js +170 -0
- package/common/types/aic.types.js.map +1 -0
- package/common/types/aml.types.d.ts +41 -0
- package/common/types/aml.types.js +16 -0
- package/common/types/aml.types.js.map +1 -0
- package/common/types/api-key-logs.types.d.ts +204 -0
- package/common/types/api-key-logs.types.js +52 -0
- package/common/types/api-key-logs.types.js.map +1 -0
- package/common/types/api-keys.types.d.ts +192 -0
- package/common/types/api-keys.types.js +57 -0
- package/common/types/api-keys.types.js.map +1 -0
- package/common/types/asset.types.d.ts +888 -0
- package/common/types/asset.types.js +280 -0
- package/common/types/asset.types.js.map +1 -0
- package/common/types/auth.types.d.ts +487 -0
- package/common/types/auth.types.js +279 -0
- package/common/types/auth.types.js.map +1 -0
- package/common/types/batch-jobs.types.d.ts +321 -0
- package/common/types/batch-jobs.types.js +111 -0
- package/common/types/batch-jobs.types.js.map +1 -0
- package/common/types/bonus-tier.types.d.ts +980 -0
- package/common/types/bonus-tier.types.js +159 -0
- package/common/types/bonus-tier.types.js.map +1 -0
- package/common/types/cap-table.types.d.ts +1124 -0
- package/common/types/cap-table.types.js +406 -0
- package/common/types/cap-table.types.js.map +1 -0
- package/common/types/cart.types.d.ts +28 -0
- package/common/types/cart.types.js +19 -0
- package/common/types/cart.types.js.map +1 -0
- package/common/types/checklist-items.types.d.ts +195 -0
- package/common/types/checklist-items.types.js +54 -0
- package/common/types/checklist-items.types.js.map +1 -0
- package/common/types/checklist.types.d.ts +140 -0
- package/common/types/checklist.types.js +71 -0
- package/common/types/checklist.types.js.map +1 -0
- package/common/types/common.types.d.ts +1498 -0
- package/common/types/common.types.js +1431 -0
- package/common/types/common.types.js.map +1 -0
- package/common/types/comply-advantage-api.types.d.ts +3959 -0
- package/common/types/comply-advantage-api.types.js +270 -0
- package/common/types/comply-advantage-api.types.js.map +1 -0
- package/common/types/comply-advantage.types.d.ts +48 -0
- package/common/types/comply-advantage.types.js +21 -0
- package/common/types/comply-advantage.types.js.map +1 -0
- package/common/types/contact-us.types.d.ts +126 -0
- package/common/types/contact-us.types.js +91 -0
- package/common/types/contact-us.types.js.map +1 -0
- package/common/types/countries.types.d.ts +77 -0
- package/common/types/countries.types.js +349 -0
- package/common/types/countries.types.js.map +1 -0
- package/common/types/covered-person.types.d.ts +204 -0
- package/common/types/covered-person.types.js +234 -0
- package/common/types/covered-person.types.js.map +1 -0
- package/common/types/dashboard.types.d.ts +2086 -0
- package/common/types/dashboard.types.js +690 -0
- package/common/types/dashboard.types.js.map +1 -0
- package/common/types/data-record.types.d.ts +347 -0
- package/common/types/data-record.types.js +261 -0
- package/common/types/data-record.types.js.map +1 -0
- package/common/types/data-room.types.d.ts +1277 -0
- package/common/types/data-room.types.js +167 -0
- package/common/types/data-room.types.js.map +1 -0
- package/common/types/default-theme-config.types.d.ts +445 -0
- package/common/types/default-theme-config.types.js +63 -0
- package/common/types/default-theme-config.types.js.map +1 -0
- package/common/types/disbursement-adjustment.types.d.ts +21 -0
- package/common/types/disbursement-adjustment.types.js +25 -0
- package/common/types/disbursement-adjustment.types.js.map +1 -0
- package/common/types/disbursement-approval-user.types.d.ts +935 -0
- package/common/types/disbursement-approval-user.types.js +68 -0
- package/common/types/disbursement-approval-user.types.js.map +1 -0
- package/common/types/disbursement-review.types.d.ts +923 -0
- package/common/types/disbursement-review.types.js +76 -0
- package/common/types/disbursement-review.types.js.map +1 -0
- package/common/types/disbursement-transaction.types.d.ts +621 -0
- package/common/types/disbursement-transaction.types.js +51 -0
- package/common/types/disbursement-transaction.types.js.map +1 -0
- package/common/types/disbursements.types.d.ts +3084 -0
- package/common/types/disbursements.types.js +342 -0
- package/common/types/disbursements.types.js.map +1 -0
- package/common/types/domain-filter.types.d.ts +135 -0
- package/common/types/domain-filter.types.js +40 -0
- package/common/types/domain-filter.types.js.map +1 -0
- package/common/types/email-theme.types.d.ts +1359 -0
- package/common/types/email-theme.types.js +318 -0
- package/common/types/email-theme.types.js.map +1 -0
- package/common/types/entity.types.d.ts +21 -0
- package/common/types/entity.types.js +14 -0
- package/common/types/entity.types.js.map +1 -0
- package/common/types/error-responses.types.d.ts +144 -0
- package/common/types/error-responses.types.js +125 -0
- package/common/types/error-responses.types.js.map +1 -0
- package/common/types/escrow-account.types.d.ts +398 -0
- package/common/types/escrow-account.types.js +75 -0
- package/common/types/escrow-account.types.js.map +1 -0
- package/common/types/exchange-api-key.types.d.ts +1010 -0
- package/common/types/exchange-api-key.types.js +90 -0
- package/common/types/exchange-api-key.types.js.map +1 -0
- package/common/types/exchange-import.types.d.ts +23 -0
- package/common/types/exchange-import.types.js +23 -0
- package/common/types/exchange-import.types.js.map +1 -0
- package/common/types/exchange-provider.types.d.ts +1308 -0
- package/common/types/exchange-provider.types.js +268 -0
- package/common/types/exchange-provider.types.js.map +1 -0
- package/common/types/file.types.d.ts +401 -0
- package/common/types/file.types.js +378 -0
- package/common/types/file.types.js.map +1 -0
- package/common/types/health.types.d.ts +112 -0
- package/common/types/health.types.js +22 -0
- package/common/types/health.types.js.map +1 -0
- package/common/types/i-will-do-it-later.types.d.ts +51 -0
- package/common/types/i-will-do-it-later.types.js +30 -0
- package/common/types/i-will-do-it-later.types.js.map +1 -0
- package/common/types/{index.ts → index.d.ts} +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 +3406 -0
- package/common/types/signer.types.js +532 -0
- package/common/types/signer.types.js.map +1 -0
- package/common/types/site-link.types.d.ts +875 -0
- package/common/types/site-link.types.js +126 -0
- package/common/types/site-link.types.js.map +1 -0
- package/common/types/site-settings.types.d.ts +1673 -0
- package/common/types/site-settings.types.js +500 -0
- package/common/types/site-settings.types.js.map +1 -0
- package/common/types/site.types.d.ts +1476 -0
- package/common/types/site.types.js +213 -0
- package/common/types/site.types.js.map +1 -0
- package/common/types/sms.types.d.ts +40 -0
- package/common/types/sms.types.js +27 -0
- package/common/types/sms.types.js.map +1 -0
- package/common/types/state-machine.types.d.ts +591 -0
- package/common/types/state-machine.types.js +144 -0
- package/common/types/state-machine.types.js.map +1 -0
- package/common/types/states.types.d.ts +77 -0
- package/common/types/states.types.js +137 -0
- package/common/types/states.types.js.map +1 -0
- package/common/types/subdoc-preview.types.d.ts +379 -0
- package/common/types/subdoc-preview.types.js +24 -0
- package/common/types/subdoc-preview.types.js.map +1 -0
- package/common/types/task.types.d.ts +537 -0
- package/common/types/task.types.js +211 -0
- package/common/types/task.types.js.map +1 -0
- package/common/types/trade-adjustment.type.d.ts +40 -0
- package/common/types/trade-adjustment.type.js +26 -0
- package/common/types/trade-adjustment.type.js.map +1 -0
- package/common/types/trade-line-item.types.d.ts +329 -0
- package/common/types/trade-line-item.types.js +100 -0
- package/common/types/trade-line-item.types.js.map +1 -0
- package/common/types/trade.types.d.ts +2004 -0
- package/common/types/trade.types.js +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 +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 -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 -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 -1045
- package/common/types/transaction.types.ts +0 -209
- package/common/types/trusted-contact.types.ts +0 -122
- package/common/types/typography.types.ts +0 -75
- package/common/types/user-manual.types.ts +0 -290
- package/common/types/user-setting.types.ts +0 -133
- package/common/types/user.types.ts +0 -304
- package/common/types/webhook.types.ts +0 -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 -249
- 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,382 +0,0 @@
|
|
|
1
|
-
import { TypeID } from 'typeid-js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
PaymentMethodProvider,
|
|
5
|
-
PaymentMethodType,
|
|
6
|
-
} from './payment-methods.types';
|
|
7
|
-
import { issuerIdSchema, IIssuer } from './issuer.types';
|
|
8
|
-
import { IBaseEntity } from './entity.types';
|
|
9
|
-
import { IPaginationMeta, REDACTED } from './common.types';
|
|
10
|
-
import { StateCode } from './states.types';
|
|
11
|
-
import { CountryCode } from './countries.types';
|
|
12
|
-
import { accountIdSchema } from './account.types';
|
|
13
|
-
import { fileIdSchema } from './file.types';
|
|
14
|
-
|
|
15
|
-
export const issuerPaymentMethodIdSchema = z.string().refine(
|
|
16
|
-
(value) => {
|
|
17
|
-
try {
|
|
18
|
-
const tid = TypeID.fromString(value);
|
|
19
|
-
return tid.getType() === 'issuer_payment_method';
|
|
20
|
-
} catch {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
message: `Invalid issuer_payment_method ID format. Must be a valid TypeID with "issuer_payment_method" prefix. Example: issuer_payment_method_01j5y5ghx5fg68d663j1fvy2x7`,
|
|
26
|
-
},
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
export const issuerPaymentMethodIntegrationIdSchema = z.string().refine(
|
|
30
|
-
(value) => {
|
|
31
|
-
try {
|
|
32
|
-
const tid = TypeID.fromString(value);
|
|
33
|
-
return tid.getType() === 'issuer_payment_method_integration';
|
|
34
|
-
} catch {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
message: `Invalid issuer_payment_method_integration ID format. Must be a valid TypeID with "issuer_payment_method_integration" prefix. Example: issuer_payment_method_integration_01j5y5ghx5fg68d663j1fvy2x7`,
|
|
40
|
-
},
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
export enum IssuerPaymentMethodIntegrationStatus {
|
|
44
|
-
PENDING = 'PENDING',
|
|
45
|
-
CONNECTED = 'CONNECTED',
|
|
46
|
-
DISCONNECTED = 'DISCONNECTED',
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const IssuerPaymentMethodIntegration = IBaseEntity.extend({
|
|
50
|
-
id: issuerPaymentMethodIntegrationIdSchema,
|
|
51
|
-
integrationStatus: z
|
|
52
|
-
.nativeEnum(IssuerPaymentMethodIntegrationStatus)
|
|
53
|
-
.openapi({
|
|
54
|
-
example: IssuerPaymentMethodIntegrationStatus.PENDING,
|
|
55
|
-
}),
|
|
56
|
-
issuerPaymentMethodId: issuerPaymentMethodIdSchema,
|
|
57
|
-
integrationAccountId: z.string().nullable(),
|
|
58
|
-
integrationAccountEmail: z.string().nullable(),
|
|
59
|
-
integrationAccountLink: z.string().nullable(),
|
|
60
|
-
integrationAccountLinkExpiresAt: z
|
|
61
|
-
.union([z.number(), z.string().transform((val) => parseInt(val, 10))])
|
|
62
|
-
.nullable(), // the reason we need to do this is Unix timestamps stored as BIGINT in PostgreSQL. The value 1759727425634 is likely a Unix timestamp in milliseconds, which exceeds JavaScript's safe integer range, so TypeORM returns it as a string to prevent precision loss.
|
|
63
|
-
});
|
|
64
|
-
export type IssuerPaymentMethodIntegration = z.infer<
|
|
65
|
-
typeof IssuerPaymentMethodIntegration
|
|
66
|
-
>;
|
|
67
|
-
|
|
68
|
-
export const IPaginatedIssuerPaymentMethodIntegrations = z.object({
|
|
69
|
-
items: z.array(IssuerPaymentMethodIntegration),
|
|
70
|
-
meta: IPaginationMeta,
|
|
71
|
-
});
|
|
72
|
-
export type IPaginatedIssuerPaymentMethodIntegrations = z.infer<
|
|
73
|
-
typeof IPaginatedIssuerPaymentMethodIntegrations
|
|
74
|
-
>;
|
|
75
|
-
|
|
76
|
-
export const IIssuerPaymentMethod = IBaseEntity.extend({
|
|
77
|
-
paymentMethodType: z
|
|
78
|
-
.nativeEnum(PaymentMethodType)
|
|
79
|
-
.openapi({ example: PaymentMethodType.CREDIT_CARD }),
|
|
80
|
-
paymentMethodProvider: z.nativeEnum(PaymentMethodProvider).openapi({
|
|
81
|
-
example: PaymentMethodProvider.STRIPE,
|
|
82
|
-
}),
|
|
83
|
-
enabled: z.boolean().openapi({ example: true }),
|
|
84
|
-
issuerId: issuerIdSchema.openapi({
|
|
85
|
-
example: 'issuer_01jdq2crwke8xskjd840cj79pw',
|
|
86
|
-
}),
|
|
87
|
-
config: z
|
|
88
|
-
.any()
|
|
89
|
-
.transform((config) => {
|
|
90
|
-
if (!config) return null;
|
|
91
|
-
const configData =
|
|
92
|
-
typeof config === 'string' ? JSON.parse(config) : config;
|
|
93
|
-
|
|
94
|
-
if (configData.stripeSecretKey) {
|
|
95
|
-
configData.stripeSecretKey = REDACTED;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return configData;
|
|
99
|
-
})
|
|
100
|
-
.nullable()
|
|
101
|
-
.optional(),
|
|
102
|
-
issuer: IIssuer.optional().nullable(),
|
|
103
|
-
integration: IssuerPaymentMethodIntegration.nullable().optional(),
|
|
104
|
-
});
|
|
105
|
-
export type IIssuerPaymentMethod = z.infer<typeof IIssuerPaymentMethod>;
|
|
106
|
-
|
|
107
|
-
export const stripeConfigSchema = z.object({
|
|
108
|
-
stripeAccountId: z.string().nullable(),
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
export const wireConfigSchema = z.object({
|
|
112
|
-
usAccountHolderName: z.string().nullable(),
|
|
113
|
-
usBankName: z.string().nullable(),
|
|
114
|
-
usRoutingNumber: z
|
|
115
|
-
.string()
|
|
116
|
-
.length(9, { message: 'Routing number must be 9 digits' })
|
|
117
|
-
.regex(/^\d{9}$/, { message: 'Routing number must be numeric digits' })
|
|
118
|
-
.nullable(),
|
|
119
|
-
usAccountNumber: z
|
|
120
|
-
.string()
|
|
121
|
-
.min(8, { message: 'Account number must be at least 8 digits' })
|
|
122
|
-
.max(17, { message: 'Account number must be at most 17 digits' })
|
|
123
|
-
.regex(/^\d+$/, { message: 'Account number must be numeric digits' })
|
|
124
|
-
.nullable(),
|
|
125
|
-
reference: z
|
|
126
|
-
.string()
|
|
127
|
-
.min(1, { message: 'Reference must be at least 1 character' })
|
|
128
|
-
.max(255, { message: 'Reference must be at most 255 characters' })
|
|
129
|
-
.nullable()
|
|
130
|
-
.optional(),
|
|
131
|
-
swiftId: z
|
|
132
|
-
.string()
|
|
133
|
-
.min(8, { message: 'Swift ID must be at least 8 characters' })
|
|
134
|
-
.max(11, { message: 'Swift ID must be at most 11 characters' })
|
|
135
|
-
.nullable()
|
|
136
|
-
.optional(),
|
|
137
|
-
});
|
|
138
|
-
export type WireConfig = z.infer<typeof wireConfigSchema>;
|
|
139
|
-
|
|
140
|
-
export const checkConfigSchema = z.object({
|
|
141
|
-
companyName: z.string().nullable(),
|
|
142
|
-
address: z.string().nullable(),
|
|
143
|
-
address2: z.string().optional().nullable(),
|
|
144
|
-
city: z.string().nullable(),
|
|
145
|
-
state: z.nativeEnum(StateCode).nullable().openapi({ example: 'CA' }),
|
|
146
|
-
zip: z
|
|
147
|
-
.string()
|
|
148
|
-
.regex(/^\d{5}$/, {
|
|
149
|
-
message: 'Invalid ZIP code. It must be a 5-digit number.',
|
|
150
|
-
})
|
|
151
|
-
.nullable()
|
|
152
|
-
.openapi({ example: '90015' }),
|
|
153
|
-
country: z.nativeEnum(CountryCode).nullable().openapi({ example: 'US' }),
|
|
154
|
-
reference: z
|
|
155
|
-
.string()
|
|
156
|
-
.min(1, { message: 'Reference must be at least 1 character' })
|
|
157
|
-
.max(255, { message: 'Reference must be at most 255 characters' })
|
|
158
|
-
.nullable()
|
|
159
|
-
.optional(),
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
export type CheckConfig = z.infer<typeof checkConfigSchema>;
|
|
163
|
-
|
|
164
|
-
export const retirementConfigSchema = z.object({
|
|
165
|
-
custodianInstruction: z.string().min(1).max(1000).nullable().openapi({
|
|
166
|
-
example: 'This is a test custodian instruction',
|
|
167
|
-
}),
|
|
168
|
-
custodianDocument: z
|
|
169
|
-
.lazy(() => fileIdSchema)
|
|
170
|
-
.optional()
|
|
171
|
-
.nullable(),
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
export const PatchIssuerPaymentMethodZod = z.discriminatedUnion(
|
|
175
|
-
'paymentMethodType',
|
|
176
|
-
[
|
|
177
|
-
z.object({
|
|
178
|
-
paymentMethodType: z.literal(PaymentMethodType.CREDIT_CARD),
|
|
179
|
-
config: stripeConfigSchema,
|
|
180
|
-
}),
|
|
181
|
-
z.object({
|
|
182
|
-
paymentMethodType: z.literal(PaymentMethodType.ACH),
|
|
183
|
-
config: stripeConfigSchema,
|
|
184
|
-
}),
|
|
185
|
-
z.object({
|
|
186
|
-
paymentMethodType: z.literal(PaymentMethodType.BANK_ACCOUNT),
|
|
187
|
-
config: stripeConfigSchema,
|
|
188
|
-
}),
|
|
189
|
-
z.object({
|
|
190
|
-
paymentMethodType: z.literal(PaymentMethodType.WIRE),
|
|
191
|
-
config: wireConfigSchema,
|
|
192
|
-
}),
|
|
193
|
-
z.object({
|
|
194
|
-
paymentMethodType: z.literal(PaymentMethodType.CHECK),
|
|
195
|
-
config: checkConfigSchema,
|
|
196
|
-
}),
|
|
197
|
-
z.object({
|
|
198
|
-
paymentMethodType: z.literal(PaymentMethodType.RETIREMENT),
|
|
199
|
-
config: retirementConfigSchema,
|
|
200
|
-
}),
|
|
201
|
-
],
|
|
202
|
-
);
|
|
203
|
-
|
|
204
|
-
export type PatchIssuerPaymentMethodZod = z.infer<
|
|
205
|
-
typeof PatchIssuerPaymentMethodZod
|
|
206
|
-
>;
|
|
207
|
-
export const CompliancePatchIssuerPaymentMethodZod = z
|
|
208
|
-
.object({
|
|
209
|
-
accountId: accountIdSchema,
|
|
210
|
-
})
|
|
211
|
-
.and(PatchIssuerPaymentMethodZod);
|
|
212
|
-
|
|
213
|
-
export type CompliancePatchIssuerPaymentMethodZod = z.infer<
|
|
214
|
-
typeof CompliancePatchIssuerPaymentMethodZod
|
|
215
|
-
>;
|
|
216
|
-
|
|
217
|
-
export const IPaginatedIssuerPaymentMethod = z.object({
|
|
218
|
-
items: z.array(IIssuerPaymentMethod),
|
|
219
|
-
meta: IPaginationMeta,
|
|
220
|
-
});
|
|
221
|
-
export type IPaginatedIssuerPaymentMethod = z.infer<
|
|
222
|
-
typeof IPaginatedIssuerPaymentMethod
|
|
223
|
-
>;
|
|
224
|
-
|
|
225
|
-
const issuerPaymentMethodsInclude = z.enum(['issuer', 'integration']);
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* @description Query parameters for including related entities
|
|
229
|
-
* @example in contract use as -> query: PaginationOptionsZod.merge(GetIssuerPaymentMethodZod).merge(IssuerPaymentMethodsIncludeQuery)
|
|
230
|
-
*/
|
|
231
|
-
export const IssuerPaymentMethodsIncludeQuery = z.object({
|
|
232
|
-
include: z
|
|
233
|
-
.string()
|
|
234
|
-
.optional()
|
|
235
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
236
|
-
.refine(
|
|
237
|
-
(includes) =>
|
|
238
|
-
includes.every((include) =>
|
|
239
|
-
issuerPaymentMethodsInclude.options.includes(include as any),
|
|
240
|
-
),
|
|
241
|
-
{
|
|
242
|
-
message: `Invalid include option provided. Valid options are: ${issuerPaymentMethodsInclude.options.join(',')}`,
|
|
243
|
-
},
|
|
244
|
-
)
|
|
245
|
-
.openapi({
|
|
246
|
-
example: `${issuerPaymentMethodsInclude.options.join(',')}`,
|
|
247
|
-
}),
|
|
248
|
-
});
|
|
249
|
-
export type IssuerPaymentMethodsIncludeQuery = z.infer<
|
|
250
|
-
typeof IssuerPaymentMethodsIncludeQuery
|
|
251
|
-
>;
|
|
252
|
-
|
|
253
|
-
export const GetIssuerPaymentMethodZod = z.object({
|
|
254
|
-
issuerId: issuerIdSchema.openapi({
|
|
255
|
-
example: 'issuer_01jdq2crwke8xskjd840cj79pw',
|
|
256
|
-
}),
|
|
257
|
-
enabled: z
|
|
258
|
-
.string()
|
|
259
|
-
.optional()
|
|
260
|
-
.refine((v) => !v || v === 'true' || v === 'false', {
|
|
261
|
-
message: 'enabled must be a boolean string',
|
|
262
|
-
})
|
|
263
|
-
.transform((v) => {
|
|
264
|
-
if (!v) return undefined;
|
|
265
|
-
return v === 'true';
|
|
266
|
-
})
|
|
267
|
-
.openapi({
|
|
268
|
-
example: 'true',
|
|
269
|
-
}),
|
|
270
|
-
});
|
|
271
|
-
export type GetIssuerPaymentMethodZod = z.infer<
|
|
272
|
-
typeof GetIssuerPaymentMethodZod
|
|
273
|
-
>;
|
|
274
|
-
|
|
275
|
-
export const ComplianceGetIssuerPaymentMethodZod =
|
|
276
|
-
GetIssuerPaymentMethodZod.extend({
|
|
277
|
-
accountId: accountIdSchema,
|
|
278
|
-
});
|
|
279
|
-
export type ComplianceGetIssuerPaymentMethodZod = z.infer<
|
|
280
|
-
typeof ComplianceGetIssuerPaymentMethodZod
|
|
281
|
-
>;
|
|
282
|
-
|
|
283
|
-
export const PaymentMethodConfig = z.discriminatedUnion('paymentMethodType', [
|
|
284
|
-
z.object({
|
|
285
|
-
paymentMethodType: z.literal(PaymentMethodType.CREDIT_CARD),
|
|
286
|
-
config: stripeConfigSchema,
|
|
287
|
-
}),
|
|
288
|
-
z.object({
|
|
289
|
-
paymentMethodType: z.literal(PaymentMethodType.ACH),
|
|
290
|
-
config: stripeConfigSchema,
|
|
291
|
-
}),
|
|
292
|
-
z.object({
|
|
293
|
-
paymentMethodType: z.literal(PaymentMethodType.WIRE),
|
|
294
|
-
config: wireConfigSchema,
|
|
295
|
-
}),
|
|
296
|
-
z.object({
|
|
297
|
-
paymentMethodType: z.literal(PaymentMethodType.CHECK),
|
|
298
|
-
config: checkConfigSchema,
|
|
299
|
-
}),
|
|
300
|
-
z.object({
|
|
301
|
-
paymentMethodType: z.literal(PaymentMethodType.RETIREMENT),
|
|
302
|
-
config: retirementConfigSchema,
|
|
303
|
-
}),
|
|
304
|
-
]);
|
|
305
|
-
|
|
306
|
-
export type PaymentMethodConfig = z.infer<typeof PaymentMethodConfig>;
|
|
307
|
-
|
|
308
|
-
export const createDefaultIssuerPaymentMethods = (issuerId: string) => {
|
|
309
|
-
const paymentMethods = [
|
|
310
|
-
{
|
|
311
|
-
paymentMethod: PaymentMethodType.CREDIT_CARD,
|
|
312
|
-
paymentMethodProvider: PaymentMethodProvider.STRIPE,
|
|
313
|
-
config: stripeConfigSchema.parse({
|
|
314
|
-
stripeAccountId: null,
|
|
315
|
-
}),
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
paymentMethod: PaymentMethodType.ACH,
|
|
319
|
-
paymentMethodProvider: PaymentMethodProvider.STRIPE,
|
|
320
|
-
config: stripeConfigSchema.parse({
|
|
321
|
-
stripeAccountId: null,
|
|
322
|
-
}),
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
paymentMethod: PaymentMethodType.BANK_ACCOUNT,
|
|
326
|
-
paymentMethodProvider: PaymentMethodProvider.STRIPE,
|
|
327
|
-
config: stripeConfigSchema.parse({
|
|
328
|
-
stripeAccountId: null,
|
|
329
|
-
}),
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
paymentMethod: PaymentMethodType.WIRE,
|
|
333
|
-
paymentMethodProvider: PaymentMethodProvider.OTHER,
|
|
334
|
-
config: wireConfigSchema.parse({
|
|
335
|
-
usAccountHolderName: null,
|
|
336
|
-
usBankName: null,
|
|
337
|
-
usRoutingNumber: null,
|
|
338
|
-
usAccountNumber: null,
|
|
339
|
-
reference: null,
|
|
340
|
-
swiftId: null,
|
|
341
|
-
}),
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
paymentMethod: PaymentMethodType.CHECK,
|
|
345
|
-
paymentMethodProvider: PaymentMethodProvider.OTHER,
|
|
346
|
-
config: checkConfigSchema.parse({
|
|
347
|
-
companyName: null,
|
|
348
|
-
address: null,
|
|
349
|
-
address2: null,
|
|
350
|
-
city: null,
|
|
351
|
-
state: null,
|
|
352
|
-
zip: null,
|
|
353
|
-
country: null,
|
|
354
|
-
reference: null,
|
|
355
|
-
}),
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
paymentMethod: PaymentMethodType.RETIREMENT,
|
|
359
|
-
paymentMethodProvider: PaymentMethodProvider.OTHER,
|
|
360
|
-
config: retirementConfigSchema.parse({
|
|
361
|
-
custodianInstruction: null,
|
|
362
|
-
custodianDocument: null,
|
|
363
|
-
}),
|
|
364
|
-
},
|
|
365
|
-
];
|
|
366
|
-
|
|
367
|
-
return paymentMethods.map((paymentMethod) => ({
|
|
368
|
-
issuerId,
|
|
369
|
-
paymentMethodType: paymentMethod.paymentMethod,
|
|
370
|
-
paymentMethodProvider: paymentMethod.paymentMethodProvider,
|
|
371
|
-
enabled: false,
|
|
372
|
-
config: JSON.stringify(paymentMethod.config),
|
|
373
|
-
}));
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
export const ConnectIssuerPaymentMethodZod = z.object({
|
|
377
|
-
email: z.string().email(),
|
|
378
|
-
paymentMethodProvider: z.enum([PaymentMethodProvider.STRIPE]), // Only Stripe is supported for now
|
|
379
|
-
});
|
|
380
|
-
export type ConnectIssuerPaymentMethodZod = z.infer<
|
|
381
|
-
typeof ConnectIssuerPaymentMethodZod
|
|
382
|
-
>;
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
|
-
import { TypeID } from 'typeid-js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { accountIdSchema } from './account.types';
|
|
5
|
-
import {
|
|
6
|
-
AccountZod,
|
|
7
|
-
dateSchema,
|
|
8
|
-
IPaginationMeta,
|
|
9
|
-
IssuerStatus,
|
|
10
|
-
SortBy,
|
|
11
|
-
SortOrder,
|
|
12
|
-
} from './common.types';
|
|
13
|
-
import { IBaseEntity } from './entity.types';
|
|
14
|
-
import { fileIdSchema, FileZod } from './file.types';
|
|
15
|
-
import { AddressSchema } from './address.types';
|
|
16
|
-
|
|
17
|
-
extendZodWithOpenApi(z);
|
|
18
|
-
export enum IssuerTypes {
|
|
19
|
-
LLC = 'LLC',
|
|
20
|
-
S_CORP = 'S_CORP',
|
|
21
|
-
C_CORP = 'C_CORP',
|
|
22
|
-
}
|
|
23
|
-
export const issuerIdSchema = z.string().refine(
|
|
24
|
-
(value) => {
|
|
25
|
-
try {
|
|
26
|
-
const tid = TypeID.fromString(value);
|
|
27
|
-
return tid.getType() === 'issuer';
|
|
28
|
-
} catch {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
message:
|
|
34
|
-
'Invalid issuer ID format. Must be a valid TypeID with "issuer" prefix.',
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
const issuersInclude = z.enum(['account', 'offerings', 'coveredPersons']);
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description Query parameters for including related entities
|
|
42
|
-
* @xample in contract us as -> query: z.object({}).merge(IssuerIncludeQuery),
|
|
43
|
-
*/
|
|
44
|
-
export const IssuersIncludeQuery = z.object({
|
|
45
|
-
include: z
|
|
46
|
-
.string()
|
|
47
|
-
.optional()
|
|
48
|
-
.transform((str) => (str ? str.split(',') : []))
|
|
49
|
-
.refine(
|
|
50
|
-
(includes) =>
|
|
51
|
-
includes.every((include) =>
|
|
52
|
-
issuersInclude.options.includes(include as any),
|
|
53
|
-
),
|
|
54
|
-
{
|
|
55
|
-
message: `Invalid include option provided. Valid options are: ${issuersInclude.options.join(',')}`,
|
|
56
|
-
},
|
|
57
|
-
)
|
|
58
|
-
.openapi({
|
|
59
|
-
example: `${issuersInclude.options.join(',')}`,
|
|
60
|
-
}),
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export const PostIssuerZod = z
|
|
64
|
-
.object({
|
|
65
|
-
title: z
|
|
66
|
-
.string()
|
|
67
|
-
.min(1)
|
|
68
|
-
.max(150)
|
|
69
|
-
.nullable()
|
|
70
|
-
.optional()
|
|
71
|
-
.openapi({ example: 'Issuer Title' }),
|
|
72
|
-
description: z
|
|
73
|
-
.string()
|
|
74
|
-
.min(1)
|
|
75
|
-
.max(1000)
|
|
76
|
-
.nullable()
|
|
77
|
-
.optional()
|
|
78
|
-
.openapi({ example: 'Fund Consulting Services' }),
|
|
79
|
-
legalName: z.string().min(1).max(100).openapi({ example: 'Fund.co LLC' }),
|
|
80
|
-
dba: z
|
|
81
|
-
.string()
|
|
82
|
-
.min(1)
|
|
83
|
-
.max(100)
|
|
84
|
-
.nullable()
|
|
85
|
-
.optional()
|
|
86
|
-
.openapi({ example: 'Fund Consulting Services' }),
|
|
87
|
-
doi: dateSchema.nullable().optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
88
|
-
ein: z
|
|
89
|
-
.string()
|
|
90
|
-
.regex(/^\d{9}$/, {
|
|
91
|
-
message: 'Invalid EIN format. Must be exactly 9 digits',
|
|
92
|
-
})
|
|
93
|
-
.nullable()
|
|
94
|
-
.optional()
|
|
95
|
-
.openapi({ example: '123456789' }),
|
|
96
|
-
type: z.nativeEnum(IssuerTypes).openapi({ example: 'LLC' }),
|
|
97
|
-
})
|
|
98
|
-
.and(AddressSchema);
|
|
99
|
-
|
|
100
|
-
export type PostIssuerZod = z.infer<typeof PostIssuerZod>;
|
|
101
|
-
|
|
102
|
-
export const CompliancePostIssuerZod = z
|
|
103
|
-
.object({
|
|
104
|
-
accountId: accountIdSchema.openapi({
|
|
105
|
-
accountId: 'account_00041061050r3gg28a1c60t3gf',
|
|
106
|
-
}),
|
|
107
|
-
})
|
|
108
|
-
.and(PostIssuerZod);
|
|
109
|
-
|
|
110
|
-
export type CompliancePostIssuerZod = z.infer<typeof CompliancePostIssuerZod>;
|
|
111
|
-
|
|
112
|
-
export const PutIssuerZod = z
|
|
113
|
-
.object({
|
|
114
|
-
title: z
|
|
115
|
-
.string()
|
|
116
|
-
.min(1)
|
|
117
|
-
.max(150)
|
|
118
|
-
.nullable()
|
|
119
|
-
.optional()
|
|
120
|
-
.openapi({ example: 'Issuer Title' }),
|
|
121
|
-
description: z
|
|
122
|
-
.string()
|
|
123
|
-
.min(1)
|
|
124
|
-
.max(1000)
|
|
125
|
-
.nullable()
|
|
126
|
-
.optional()
|
|
127
|
-
.openapi({ example: 'Fund Consulting Services' }),
|
|
128
|
-
legalName: z
|
|
129
|
-
.string()
|
|
130
|
-
.min(1)
|
|
131
|
-
.max(100)
|
|
132
|
-
.optional()
|
|
133
|
-
.openapi({ example: 'Fund.co LLC' }),
|
|
134
|
-
dba: z
|
|
135
|
-
.string()
|
|
136
|
-
.min(1)
|
|
137
|
-
.max(100)
|
|
138
|
-
.nullable()
|
|
139
|
-
.optional()
|
|
140
|
-
.openapi({ example: 'Fund Consulting Services' }),
|
|
141
|
-
doi: dateSchema.nullable().optional().openapi({ example: 'MM/DD/YYYY' }),
|
|
142
|
-
ein: z
|
|
143
|
-
.string()
|
|
144
|
-
.regex(/^\d{9}$/, {
|
|
145
|
-
message: 'Invalid EIN format. Must be exactly 9 digits',
|
|
146
|
-
})
|
|
147
|
-
.optional()
|
|
148
|
-
.nullable()
|
|
149
|
-
.openapi({ example: '123456789' }),
|
|
150
|
-
type: z.nativeEnum(IssuerTypes).optional().openapi({ example: 'LLC' }),
|
|
151
|
-
ss4LetterFileId: z
|
|
152
|
-
.lazy(() => fileIdSchema)
|
|
153
|
-
.optional()
|
|
154
|
-
.nullable(),
|
|
155
|
-
formationDocumentFileId: z
|
|
156
|
-
.lazy(() => fileIdSchema)
|
|
157
|
-
.optional()
|
|
158
|
-
.nullable(),
|
|
159
|
-
coverArtId: z
|
|
160
|
-
.lazy(() => fileIdSchema)
|
|
161
|
-
.optional()
|
|
162
|
-
.nullable(),
|
|
163
|
-
})
|
|
164
|
-
.and(AddressSchema);
|
|
165
|
-
|
|
166
|
-
export type PutIssuerZod = z.infer<typeof PutIssuerZod>;
|
|
167
|
-
|
|
168
|
-
export const IIssuer = IBaseEntity.extend({
|
|
169
|
-
id: issuerIdSchema,
|
|
170
|
-
legalName: z.string().nullable().openapi({ example: 'Fund.co LLC' }),
|
|
171
|
-
dba: z.string().nullable().openapi({ example: 'Fund Consulting Services' }),
|
|
172
|
-
title: z.string().nullable().openapi({ example: 'Issuer Title' }),
|
|
173
|
-
description: z
|
|
174
|
-
.string()
|
|
175
|
-
.nullable()
|
|
176
|
-
.openapi({ example: 'Fund Consulting Services' }),
|
|
177
|
-
ein: z
|
|
178
|
-
.string()
|
|
179
|
-
.regex(/^\d{9}$/, {
|
|
180
|
-
message: 'Invalid EIN format. Must be exactly 9 digits',
|
|
181
|
-
})
|
|
182
|
-
.transform((val) => val.replace(/(\d{2})(\d{7})/, '$1-$2'))
|
|
183
|
-
.nullable()
|
|
184
|
-
.openapi({ example: '123456789' }),
|
|
185
|
-
type: z.nativeEnum(IssuerTypes).openapi({ example: 'LLC' }),
|
|
186
|
-
address: z.string().nullable().openapi({ example: '1234 Main St, Apt 101' }),
|
|
187
|
-
address2: z.string().nullable().openapi({ example: 'Apt 202' }),
|
|
188
|
-
city: z.string().nullable().openapi({ example: 'Los Angeles' }),
|
|
189
|
-
state: z.string().nullable().openapi({ example: 'CA' }),
|
|
190
|
-
zip: z.string().nullable().openapi({ example: '90015' }),
|
|
191
|
-
country: z.string().nullable().openapi({ example: 'United States' }),
|
|
192
|
-
accountId: z.string(),
|
|
193
|
-
account: AccountZod.optional().nullable(),
|
|
194
|
-
ss4LetterFileId: z.string().nullable(),
|
|
195
|
-
formationDocumentFileId: z.string().nullable(),
|
|
196
|
-
formationDocument: z
|
|
197
|
-
.lazy(() => FileZod)
|
|
198
|
-
.nullable()
|
|
199
|
-
.optional(),
|
|
200
|
-
status: z
|
|
201
|
-
.nativeEnum(IssuerStatus)
|
|
202
|
-
.openapi({ example: IssuerStatus.SUBMITTED }),
|
|
203
|
-
coverArtId: z.string().nullable(),
|
|
204
|
-
coverArt: z
|
|
205
|
-
.lazy(() => FileZod)
|
|
206
|
-
.nullable()
|
|
207
|
-
.optional(),
|
|
208
|
-
doi: z.date().nullable(),
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
export type IIssuer = z.infer<typeof IIssuer>;
|
|
212
|
-
|
|
213
|
-
export const IPaginatedIssuer = z.object({
|
|
214
|
-
items: z.array(IIssuer),
|
|
215
|
-
meta: IPaginationMeta,
|
|
216
|
-
});
|
|
217
|
-
export type IPaginatedIssuer = z.infer<typeof IPaginatedIssuer>;
|
|
218
|
-
|
|
219
|
-
export const GetIssuersZod = z.object({
|
|
220
|
-
accountId: accountIdSchema.optional(),
|
|
221
|
-
ein: z
|
|
222
|
-
.string()
|
|
223
|
-
.regex(/^\d{9}$/, {
|
|
224
|
-
message: 'Invalid EIN format. Must be exactly 9 digits',
|
|
225
|
-
})
|
|
226
|
-
.optional()
|
|
227
|
-
.openapi({ example: '123456789' }),
|
|
228
|
-
legalName: z.string().optional().openapi({ example: 'Fund.co LLC' }),
|
|
229
|
-
type: z
|
|
230
|
-
.nativeEnum(IssuerTypes)
|
|
231
|
-
.optional()
|
|
232
|
-
.openapi({ example: IssuerTypes.C_CORP }),
|
|
233
|
-
status: z
|
|
234
|
-
.nativeEnum(IssuerStatus)
|
|
235
|
-
.optional()
|
|
236
|
-
.openapi({ example: IssuerStatus.SUBMITTED }),
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
export type GetIssuersZod = z.infer<typeof GetIssuersZod>;
|
|
240
|
-
|
|
241
|
-
export enum CatalogMode {
|
|
242
|
-
CATALOG = 'CATALOG',
|
|
243
|
-
CATEGORY = 'CATEGORY',
|
|
244
|
-
PRODUCT = 'PRODUCT',
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
const CatalogModeSchema = z.object({
|
|
248
|
-
mode: z.nativeEnum(CatalogMode).optional(),
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
export const IPaginatedCatalog = z.object({
|
|
252
|
-
items: z.array(IIssuer),
|
|
253
|
-
meta: IPaginationMeta.merge(CatalogModeSchema),
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
export const GetIssuersSummaryZod = z.object({
|
|
257
|
-
accountId: accountIdSchema.optional(),
|
|
258
|
-
issuerId: issuerIdSchema.optional(),
|
|
259
|
-
coveredPersons: z.number(),
|
|
260
|
-
offerings: z.number(),
|
|
261
|
-
assets: z.number(),
|
|
262
|
-
});
|
|
263
|
-
export type GetIssuersSummaryZod = z.infer<typeof GetIssuersSummaryZod>;
|
|
264
|
-
|
|
265
|
-
export const IPaginatedIssersSummary = z.object({
|
|
266
|
-
items: z.array(GetIssuersSummaryZod),
|
|
267
|
-
meta: IPaginationMeta,
|
|
268
|
-
});
|
|
269
|
-
export type IPaginatedIssersSummary = z.infer<typeof IPaginatedIssersSummary>;
|
|
270
|
-
|
|
271
|
-
export const IssuersSummaryFilterZod = z.object({
|
|
272
|
-
accountId: accountIdSchema.optional(),
|
|
273
|
-
issuerId: issuerIdSchema.optional(),
|
|
274
|
-
search: z.string().optional(),
|
|
275
|
-
});
|
|
276
|
-
export type IssuersSummaryFilterZod = z.infer<typeof IssuersSummaryFilterZod>;
|
|
277
|
-
|
|
278
|
-
export const IssuersSortZod = z.object({
|
|
279
|
-
sort: z
|
|
280
|
-
.enum([SortBy.LEGAL_NAME, SortBy.CREATED_AT, SortBy.UPDATED_AT])
|
|
281
|
-
.optional(),
|
|
282
|
-
dir: z.nativeEnum(SortOrder).optional(),
|
|
283
|
-
});
|
|
284
|
-
export type IssuersSortZod = z.infer<typeof IssuersSortZod>;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Schema for transforming EIN (Employer Identification Number) formats.
|
|
288
|
-
*
|
|
289
|
-
* This schema validates and transforms a 9-digit EIN by inserting a hyphen after
|
|
290
|
-
* the first two digits (XX-XXXXXXX format). If the input doesn't match the expected
|
|
291
|
-
* 9-digit pattern, the original value is returned unchanged.
|
|
292
|
-
*
|
|
293
|
-
* The schema uses passthrough to allow additional fields in the object without validation,
|
|
294
|
-
* making it flexible for use with various data structures that include an EIN.
|
|
295
|
-
*
|
|
296
|
-
* @example
|
|
297
|
-
* // Transforms: { ein: '123456789' } -> { ein: '12-3456789' }
|
|
298
|
-
* // Keeps as-is: { ein: '12-3456789' } -> { ein: '12-3456789' }
|
|
299
|
-
*/
|
|
300
|
-
export const EinTransformerSchema = z
|
|
301
|
-
.object({
|
|
302
|
-
ein: z
|
|
303
|
-
.string()
|
|
304
|
-
.nullable()
|
|
305
|
-
.optional()
|
|
306
|
-
.transform((val) => {
|
|
307
|
-
// Only apply transformation if it matches the regex pattern
|
|
308
|
-
if (val && /^\d{9}$/.test(val)) {
|
|
309
|
-
return val.replace(/(\d{2})(\d{7})/, '$1-$2');
|
|
310
|
-
}
|
|
311
|
-
// Otherwise return the original value
|
|
312
|
-
return val;
|
|
313
|
-
})
|
|
314
|
-
.openapi({ example: '123456789' }),
|
|
315
|
-
})
|
|
316
|
-
.passthrough(); // Allow additional fields without validation
|
|
317
|
-
|
|
318
|
-
export const PaginatedEinTransformerSchema = z.object({
|
|
319
|
-
items: z.array(EinTransformerSchema),
|
|
320
|
-
meta: IPaginationMeta,
|
|
321
|
-
});
|