ia-common 1.0.1-beta.99 → 1.0.1
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/build/@enum.d.ts +1 -18
- package/build/@enum.js +1 -18
- package/build/@exception.d.ts +1 -0
- package/build/@exception.js +18 -0
- package/build/@misc.d.ts +1 -0
- package/build/@misc.js +17 -0
- package/build/@model.d.ts +1 -7
- package/build/@model.js +1 -7
- package/build/@type.d.ts +1 -13
- package/build/@type.js +1 -13
- package/build/@utils.d.ts +1 -3
- package/build/@utils.js +1 -3
- package/build/src/@enum.d.ts +31 -0
- package/build/src/@enum.js +47 -0
- package/build/src/@misc.d.ts +1 -0
- package/build/src/@misc.js +17 -0
- package/build/src/@model.d.ts +1 -0
- package/build/src/@model.js +17 -0
- package/build/src/@type.d.ts +19 -0
- package/build/src/@type.js +35 -0
- package/build/src/@utils.d.ts +6 -0
- package/build/src/@utils.js +23 -0
- package/build/src/enum/configuration.enum.d.ts +25 -0
- package/build/src/enum/configuration.enum.js +69 -0
- package/build/src/enum/corporate-actions/buy-back-type.enum.d.ts +4 -0
- package/build/src/enum/corporate-actions/buy-back-type.enum.js +8 -0
- package/build/src/enum/corporate-actions/corporate-action-advice-status.enum.d.ts +6 -0
- package/build/src/enum/corporate-actions/corporate-action-advice-status.enum.js +10 -0
- package/build/src/enum/corporate-actions/corporate-actions-advice-transaction-type.enum.d.ts +5 -0
- package/build/src/enum/corporate-actions/corporate-actions-advice-transaction-type.enum.js +9 -0
- package/build/src/enum/corporate-actions/corporate-actions-status.enum.d.ts +5 -0
- package/build/src/enum/corporate-actions/corporate-actions-status.enum.js +9 -0
- package/build/src/enum/corporate-actions/corporate-actions-type.enum.d.ts +14 -0
- package/build/src/enum/corporate-actions/corporate-actions-type.enum.js +36 -0
- package/build/src/enum/corporate-actions/ipo-listing-exchange.enum.d.ts +6 -0
- package/build/src/enum/corporate-actions/ipo-listing-exchange.enum.js +10 -0
- package/build/src/enum/corporate-actions/split-and-bonus-stock-order.enum.d.ts +4 -0
- package/build/src/enum/corporate-actions/split-and-bonus-stock-order.enum.js +8 -0
- package/build/src/enum/cron-job.enum.d.ts +9 -0
- package/build/src/enum/cron-job.enum.js +15 -0
- package/build/{enum → src/enum/equity}/advice-status.enum.d.ts +3 -1
- package/build/{enum → src/enum/equity}/advice-status.enum.js +2 -0
- package/build/src/enum/equity/advisor-user-mapping-type.enum.d.ts +4 -0
- package/build/src/enum/equity/advisor-user-mapping-type.enum.js +8 -0
- package/build/src/enum/kafka-topics.enum.d.ts +6 -0
- package/build/src/enum/kafka-topics.enum.js +10 -0
- package/build/src/enum/mutual-fund/mutual-fund-status.enum.d.ts +6 -0
- package/build/src/enum/mutual-fund/mutual-fund-status.enum.js +10 -0
- package/build/src/enum/mutual-fund/nfo-advice-status.enum.d.ts +6 -0
- package/build/src/enum/mutual-fund/nfo-advice-status.enum.js +10 -0
- package/build/src/enum/mutual-fund/nfo-advice-transaction-type.enum.d.ts +4 -0
- package/build/src/enum/mutual-fund/nfo-advice-transaction-type.enum.js +8 -0
- package/build/src/enum/time-zone.enum.d.ts +3 -0
- package/build/src/enum/time-zone.enum.js +7 -0
- package/build/{enum → src/enum/user}/user-type.enum.d.ts +2 -1
- package/build/{enum → src/enum/user}/user-type.enum.js +1 -0
- package/build/src/exception/app-badrequest.exception.js +10 -0
- package/build/src/interface/advice-expire-topic-value.interface.d.ts +5 -0
- package/build/src/interface/advice-file-documents.interface.d.ts +8 -0
- package/build/{interface → src/interface}/api/create-advice.interface.d.ts +2 -4
- package/build/src/interface/api/create-bonus-stock.interface.d.ts +6 -0
- package/build/src/interface/api/create-bulk-advice-using-csv.interface.d.ts +7 -0
- package/build/src/interface/api/create-buy-back-interface.d.ts +6 -0
- package/build/src/interface/api/create-corporate-action-advice.interface.d.ts +8 -0
- package/build/src/interface/api/create-delisting.interface.d.ts +6 -0
- package/build/src/interface/api/create-dividend-interface.d.ts +6 -0
- package/build/src/interface/api/create-fpo.interface.d.ts +6 -0
- package/build/src/interface/api/create-ipo.interface.d.ts +6 -0
- package/build/{interface → src/interface}/api/create-mutual-fund-advice.interface.d.ts +1 -1
- package/build/src/interface/api/create-nfo-advice.interface.d.ts +13 -0
- package/build/src/interface/api/create-nfo.interface.d.ts +12 -0
- package/build/src/interface/api/create-ofs.interface.d.ts +6 -0
- package/build/src/interface/api/create-open-offer.interface.d.ts +6 -0
- package/build/src/interface/api/create-right-issue.interface.d.ts +6 -0
- package/build/src/interface/api/create-split-bonus-stock.interface.d.ts +6 -0
- package/build/src/interface/api/create-split-stock.interface.d.ts +6 -0
- package/build/src/interface/api/create-staff-dto.d.ts +9 -0
- package/build/{interface → src/interface}/api/get-advice-by-id.interface.d.ts +1 -2
- package/build/{interface → src/interface}/api/get-advice-by-ids-status.inteface.d.ts +1 -2
- package/build/src/interface/api/get-configuration.interface.d.ts +4 -0
- package/build/src/interface/api/get-corporate-action-advice.interface.d.ts +4 -0
- package/build/src/interface/api/get-corporate-actions.interface.d.ts +22 -0
- package/build/src/interface/api/get-corporate-actions.interface.js +3 -0
- package/build/src/interface/api/get-cron-job-by-date-range.interface.d.ts +13 -0
- package/build/src/interface/api/get-nfo-advice.interface.d.ts +4 -0
- package/build/src/interface/api/get-nfo.interface.d.ts +4 -0
- package/build/src/interface/api/get-organization-entities.interface.d.ts +9 -0
- package/build/{interface → src/interface}/api/get-pricing-plan-by-date.interface.d.ts +1 -1
- package/build/src/interface/api/get-staff-members.interface.d.ts +10 -0
- package/build/src/interface/api/index.d.ts +74 -0
- package/build/src/interface/api/index.js +90 -0
- package/build/src/interface/api/manual-trigger-cron-job.interface.d.ts +5 -0
- package/build/src/interface/api/remove-staff-member.interface.d.ts +3 -0
- package/build/{interface → src/interface}/api/update-advice.interface.d.ts +1 -2
- package/build/src/interface/api/update-bonus-stock.interface.d.ts +6 -0
- package/build/src/interface/api/update-buy-back.interface.d.ts +6 -0
- package/build/src/interface/api/update-configuration.interface.d.ts +10 -0
- package/build/src/interface/api/update-corporate-action-advice.interface.d.ts +9 -0
- package/build/src/interface/api/update-corporate-action.interface.d.ts +8 -0
- package/build/src/interface/api/update-delisting.interface.d.ts +5 -0
- package/build/src/interface/api/update-dividend.interface.d.ts +6 -0
- package/build/src/interface/api/update-fpo.interface.d.ts +6 -0
- package/build/src/interface/api/update-ipo.interface.d.ts +6 -0
- package/build/src/interface/api/update-nfo-advice.interface.d.ts +14 -0
- package/build/src/interface/api/update-nfo-advice.interface.js +2 -0
- package/build/src/interface/api/update-ofs.interface.d.ts +6 -0
- package/build/src/interface/api/update-ofs.interface.js +2 -0
- package/build/src/interface/api/update-open-offer.interface.d.ts +6 -0
- package/build/src/interface/api/update-open-offer.interface.js +2 -0
- package/build/{interface → src/interface}/api/update-organization.interface.d.ts +1 -0
- package/build/src/interface/api/update-organization.interface.js +2 -0
- package/build/src/interface/api/update-pricing-plan-by-id.interface.js +2 -0
- package/build/src/interface/api/update-pricing-plan.interface.js +2 -0
- package/build/src/interface/api/update-registration.interface.js +2 -0
- package/build/src/interface/api/update-right-issue.interface.d.ts +6 -0
- package/build/src/interface/api/update-right-issue.interface.js +2 -0
- package/build/src/interface/api/update-split-bonus.interface.d.ts +6 -0
- package/build/src/interface/api/update-split-bonus.interface.js +2 -0
- package/build/src/interface/api/update-split-stock.interface.d.ts +6 -0
- package/build/src/interface/api/update-split-stock.interface.js +2 -0
- package/build/src/interface/api/update-staff.dto.d.ts +9 -0
- package/build/src/interface/api/update-staff.dto.js +2 -0
- package/build/src/interface/api/update-subscription.interface.js +2 -0
- package/build/src/interface/app-badrequest-exception.type.js +2 -0
- package/build/src/interface/controller.interface.js +2 -0
- package/build/src/interface/corporate-actions/base-corporate-actions.interface.d.ts +7 -0
- package/build/src/interface/corporate-actions/base-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/bonus-corporate-actions.interface.d.ts +5 -0
- package/build/src/interface/corporate-actions/bonus-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/bonus-stock-data.interface.d.ts +4 -0
- package/build/src/interface/corporate-actions/bonus-stock-data.interface.js +2 -0
- package/build/src/interface/corporate-actions/buy-back-corporate-actions.interface.d.ts +8 -0
- package/build/src/interface/corporate-actions/buy-back-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/corporate-entity-omit-data.interface.d.ts +2 -0
- package/build/src/interface/corporate-actions/corporate-entity-omit-data.interface.js +2 -0
- package/build/src/interface/corporate-actions/delisting-corporate-actions.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/delisting-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/dividend-corporate-actions.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/dividend-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/fpo-corporate-actions.interface.d.ts +7 -0
- package/build/src/interface/corporate-actions/fpo-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/index.d.ts +14 -0
- package/build/src/interface/corporate-actions/index.js +30 -0
- package/build/src/interface/corporate-actions/ipo-corporate-action.interface.d.ts +9 -0
- package/build/src/interface/corporate-actions/ipo-corporate-action.interface.js +2 -0
- package/build/src/interface/corporate-actions/ofs-corporate-actions.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/ofs-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/open-offer-corporate-actions.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/open-offer-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/right-issues-corporate-actions.interface.d.ts +8 -0
- package/build/src/interface/corporate-actions/right-issues-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/split-bonus-corporate-action.interface.d.ts +7 -0
- package/build/src/interface/corporate-actions/split-bonus-corporate-action.interface.js +2 -0
- package/build/src/interface/corporate-actions/split-stock-corporate-actions.interface.d.ts +5 -0
- package/build/src/interface/corporate-actions/split-stock-corporate-actions.interface.js +2 -0
- package/build/src/interface/corporate-actions/split-stock-data.interface.d.ts +4 -0
- package/build/src/interface/corporate-actions/split-stock-data.interface.js +2 -0
- package/build/{interface → src/interface}/entity/advice-entity.interface.d.ts +12 -3
- package/build/src/interface/entity/advice-entity.interface.js +2 -0
- package/build/src/interface/entity/advisor-user-mapping-entity.interface.d.ts +6 -0
- package/build/src/interface/entity/advisor-user-mapping-entity.interface.js +2 -0
- package/build/src/interface/entity/audit-column-entity.interface.d.ts +6 -0
- package/build/src/interface/entity/audit-column-entity.interface.js +2 -0
- package/build/src/interface/entity/bank-details-entity.interface.js +2 -0
- package/build/src/interface/entity/configurations-entity.interface.d.ts +9 -0
- package/build/src/interface/entity/configurations-entity.interface.js +2 -0
- package/build/src/interface/entity/corporate-action-advice-entity.interface.d.ts +14 -0
- package/build/src/interface/entity/corporate-action-advice-entity.interface.js +2 -0
- package/build/src/interface/entity/corporate-actions-entity.interface.d.ts +5 -0
- package/build/src/interface/entity/corporate-actions-entity.interface.js +2 -0
- package/build/src/interface/entity/cron-job-entity.interface.d.ts +11 -0
- package/build/src/interface/entity/cron-job-entity.interface.js +2 -0
- package/build/src/interface/entity/entity-utils.interface.d.ts +172 -0
- package/build/src/interface/entity/entity-utils.interface.js +127 -0
- package/build/src/interface/entity/equity-advice-in-process-entity.interface.d.ts +15 -0
- package/build/src/interface/entity/equity-advice-in-process-entity.interface.js +2 -0
- package/build/src/interface/entity/index.d.ts +20 -0
- package/build/{interface → src/interface}/entity/index.js +10 -3
- package/build/{interface → src/interface}/entity/mutual-fund-advice-entity.interface.d.ts +3 -2
- package/build/src/interface/entity/mutual-fund-advice-entity.interface.js +2 -0
- package/build/src/interface/entity/mutual-funds-entity.interface.js +2 -0
- package/build/src/interface/entity/nfo-entity.interface.d.ts +10 -0
- package/build/src/interface/entity/nfo-entity.interface.js +2 -0
- package/build/src/interface/entity/nfp-advice-entity.interface.d.ts +14 -0
- package/build/src/interface/entity/nfp-advice-entity.interface.js +2 -0
- package/build/{interface → src/interface}/entity/organization-entity.interface.d.ts +3 -2
- package/build/src/interface/entity/organization-entity.interface.js +2 -0
- package/build/src/interface/entity/pricing-plan-entity.interface.js +2 -0
- package/build/{interface → src/interface}/entity/registration-entity.d.ts +1 -1
- package/build/src/interface/entity/registration-entity.js +2 -0
- package/build/src/interface/entity/subscription-entity.interface.js +2 -0
- package/build/{interface → src/interface}/entity/user-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/user-entity.interface.js +2 -0
- package/build/src/interface/key-value.interface.js +2 -0
- package/build/src/interface/last-trade.interface.d.ts +4 -0
- package/build/src/interface/last-trade.interface.js +2 -0
- package/build/src/interface/modify-entity.interface.js +2 -0
- package/build/src/interface/modify.interface.js +2 -0
- package/build/src/interface/ng-date-struct.interface.js +2 -0
- package/build/src/interface/selected-billing-cycle.interface.js +2 -0
- package/build/src/interface/stock-advice.interface.d.ts +8 -0
- package/build/src/interface/stock-advice.interface.js +2 -0
- package/build/src/interface/subscription-data.inteface.js +2 -0
- package/build/src/interface/tree-value.interface.d.ts +5 -0
- package/build/src/interface/tree-value.interface.js +2 -0
- package/build/src/interface/update-user-info.interface.js +2 -0
- package/build/src/interface/upload-multer-file.interface.js +2 -0
- package/build/src/interface/user-entity-without-password.interface.js +2 -0
- package/build/src/interface/without-token-registration-entity.interface.js +2 -0
- package/build/src/misc/index.d.ts +2 -0
- package/build/src/misc/index.js +18 -0
- package/build/src/misc/model/dto-validation-type.d.ts +13 -0
- package/build/src/misc/model/dto-validation-type.js +38 -0
- package/build/src/misc/type/arrayed.type.d.ts +3 -0
- package/build/src/misc/type/arrayed.type.js +2 -0
- package/build/{model → src/model}/bank-details-entity-model.js +7 -8
- package/build/src/model/base.entity.model.d.ts +14 -0
- package/build/src/model/base.entity.model.js +88 -0
- package/build/src/model/configurations-entity-model.d.ts +16 -0
- package/build/src/model/configurations-entity-model.js +16 -0
- package/build/src/model/corporate-actions/bonus-corporate-action-model.d.ts +17 -0
- package/build/src/model/corporate-actions/bonus-corporate-action-model.js +19 -0
- package/build/src/model/corporate-actions/buy-back-corporate-action-model.d.ts +19 -0
- package/build/src/model/corporate-actions/buy-back-corporate-action-model.js +32 -0
- package/build/src/model/corporate-actions/corporate-action-model.d.ts +37 -0
- package/build/src/model/corporate-actions/corporate-action-model.js +53 -0
- package/build/src/model/corporate-actions/delisting-corporate-action-model.d.ts +18 -0
- package/build/src/model/corporate-actions/delisting-corporate-action-model.js +20 -0
- package/build/src/model/corporate-actions/dividend-corporate-action-model.d.ts +18 -0
- package/build/src/model/corporate-actions/dividend-corporate-action-model.js +31 -0
- package/build/src/model/corporate-actions/fpo-corporate-action-model.d.ts +21 -0
- package/build/src/model/corporate-actions/fpo-corporate-action-model.js +21 -0
- package/build/src/model/corporate-actions/ipo-corporate-action-model.d.ts +20 -0
- package/build/src/model/corporate-actions/ipo-corporate-action-model.js +22 -0
- package/build/src/model/corporate-actions/ofs-corporate-action-model.d.ts +18 -0
- package/build/src/model/corporate-actions/ofs-corporate-action-model.js +20 -0
- package/build/src/model/corporate-actions/open-offer-corporate-action-model.d.ts +18 -0
- package/build/src/model/corporate-actions/open-offer-corporate-action-model.js +20 -0
- package/build/src/model/corporate-actions/right-issue-corporate-action-model.d.ts +20 -0
- package/build/src/model/corporate-actions/right-issue-corporate-action-model.js +22 -0
- package/build/src/model/corporate-actions/split-bonus-corporate-action-model.d.ts +18 -0
- package/build/src/model/corporate-actions/split-bonus-corporate-action-model.js +23 -0
- package/build/src/model/corporate-actions/split-corporate-action-model.d.ts +17 -0
- package/build/src/model/corporate-actions/split-corporate-action-model.js +19 -0
- package/build/src/model/equity-advice-entity-model.d.ts +32 -0
- package/build/src/model/equity-advice-entity-model.js +105 -0
- package/build/src/model/index.d.ts +24 -0
- package/build/src/model/index.js +44 -0
- package/build/src/model/interface/entity.model.interface.d.ts +19 -0
- package/build/src/model/interface/entity.model.interface.js +78 -0
- package/build/{interface/model → src/model/interface}/organization-entity-model.interface.d.ts +1 -1
- package/build/src/model/interface/organization-entity-model.interface.js +2 -0
- package/build/{interface → src/model/interface}/pricing-plan-model.interface.d.ts +1 -1
- package/build/src/model/interface/pricing-plan-model.interface.js +2 -0
- package/build/{model → src/model}/organization-entity-model.d.ts +1 -0
- package/build/{model → src/model}/organization-entity-model.js +26 -29
- package/build/src/model/pricing-plan-entity-model.js +99 -0
- package/build/src/model/pricing-plan-model.js +61 -0
- package/build/src/model/subscribed-pricing-plan-model.js +78 -0
- package/build/{model/subscription-model.js → src/model/subscription-entity-model.js} +14 -13
- package/build/{model → src/model}/user-entity-model.js +10 -11
- package/build/src/red-black-tree/js-cols.d.ts +0 -0
- package/build/src/red-black-tree/js-cols.js +6259 -0
- package/build/src/red-black-tree/red-black-tree.d.ts +11 -0
- package/build/src/red-black-tree/red-black-tree.js +55 -0
- package/build/{utils → src/utils}/date-util.d.ts +9 -0
- package/build/src/utils/date-util.js +94 -0
- package/build/src/utils/helper.fn.utils.d.ts +15 -0
- package/build/src/utils/helper.fn.utils.js +38 -0
- package/build/src/utils/math-utils.d.ts +4 -0
- package/build/src/utils/math-utils.js +10 -0
- package/build/{utils → src/utils}/string-to-date-conversion-methods.d.ts +14 -0
- package/build/src/utils/string-to-date-conversion-methods.js +50 -0
- package/build/{utils → src/utils}/string-utils.d.ts +1 -0
- package/build/src/utils/string-utils.js +52 -0
- package/build/src/utils/validate-utils.d.ts +4 -0
- package/build/src/utils/validate-utils.js +17 -0
- package/package.json +38 -37
- package/build/enum/ipo-advice-transaction-type.enum.d.ts +0 -4
- package/build/enum/ipo-advice-transaction-type.enum.js +0 -8
- package/build/enum/ipo-listing-platform.enum.d.ts +0 -5
- package/build/enum/ipo-listing-platform.enum.js +0 -9
- package/build/exception/app-badrequest.exception.js +0 -28
- package/build/interface/api/add-ipo.interface.d.ts +0 -13
- package/build/interface/api/advisor-user-mapping-entity.interface.d.ts +0 -4
- package/build/interface/api/create-ipo-advice.interface.d.ts +0 -14
- package/build/interface/api/get-ipo-by-issue-end-date.interface.d.ts +0 -4
- package/build/interface/api/index.d.ts +0 -32
- package/build/interface/api/index.js +0 -48
- package/build/interface/api/remove-bank-details-by-id.interface.d.ts +0 -7
- package/build/interface/api/remove-pricing-plan-by-id.interface.d.ts +0 -6
- package/build/interface/entity/index.d.ts +0 -13
- package/build/interface/entity/ipo-advice-entity.interface.d.ts +0 -16
- package/build/interface/entity/ipo-entity.interface.d.ts +0 -11
- package/build/model/pricing-plan-entity-model.js +0 -102
- package/build/model/pricing-plan-model.js +0 -63
- package/build/model/subscribed-pricing-plan-model.js +0 -81
- package/build/model/subscription-entity-model.js +0 -58
- package/build/model/subscription-model.d.ts +0 -24
- package/build/utils/date-util.js +0 -74
- package/build/utils/string-to-date-conversion-methods.js +0 -48
- package/build/utils/string-utils.js +0 -49
- /package/build/{enum → src/enum/equity}/advice-type.enum.d.ts +0 -0
- /package/build/{enum → src/enum/equity}/advice-type.enum.js +0 -0
- /package/build/{enum → src/enum/equity}/investment-duration-type.enum.d.ts +0 -0
- /package/build/{enum → src/enum/equity}/investment-duration-type.enum.js +0 -0
- /package/build/{enum → src/enum/equity}/transaction-type.enum.d.ts +0 -0
- /package/build/{enum → src/enum/equity}/transaction-type.enum.js +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-fund-advice-duration.enum.d.ts +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-fund-advice-duration.enum.js +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-fund-advice-type.enum.d.ts +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-fund-advice-type.enum.js +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-funds-risk.enum.d.ts +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-funds-risk.enum.js +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-funds-type.enum.d.ts +0 -0
- /package/build/{enum → src/enum/mutual-fund}/mutual-funds-type.enum.js +0 -0
- /package/build/{enum → src/enum/organization}/organization-status.enum.d.ts +0 -0
- /package/build/{enum → src/enum/organization}/organization-status.enum.js +0 -0
- /package/build/{enum → src/enum/organization}/organization-type.enum.d.ts +0 -0
- /package/build/{enum → src/enum/organization}/organization-type.enum.js +0 -0
- /package/build/{enum → src/enum/organization}/pricing-plan-status.enum.d.ts +0 -0
- /package/build/{enum → src/enum/organization}/pricing-plan-status.enum.js +0 -0
- /package/build/{enum → src/enum/organization}/subscription-status.enum.d.ts +0 -0
- /package/build/{enum → src/enum/organization}/subscription-status.enum.js +0 -0
- /package/build/{enum → src/enum/user}/owner-operation-type.enum.d.ts +0 -0
- /package/build/{enum → src/enum/user}/owner-operation-type.enum.js +0 -0
- /package/build/{enum → src/enum/user}/registration-status.enum.d.ts +0 -0
- /package/build/{enum → src/enum/user}/registration-status.enum.js +0 -0
- /package/build/{enum → src/enum/user}/user-status.enum.d.ts +0 -0
- /package/build/{enum → src/enum/user}/user-status.enum.js +0 -0
- /package/build/{exception → src/exception}/app-badrequest.exception.d.ts +0 -0
- /package/build/{interface/api/add-ipo.interface.js → src/interface/advice-expire-topic-value.interface.js} +0 -0
- /package/build/{interface/api/add-mutual-funds.interface.js → src/interface/advice-file-documents.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/add-mutual-funds.interface.d.ts +0 -0
- /package/build/{interface/api/advisor-user-mapping-entity.interface.js → src/interface/api/add-mutual-funds.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/create-advice.interface.js +0 -0
- /package/build/{interface → src/interface}/api/create-bank-details.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/api/create-bank-details.interface.js +0 -0
- /package/build/{interface/api/create-client.interface.js → src/interface/api/create-bonus-stock.interface.js} +0 -0
- /package/build/{interface/api/create-ipo-advice.interface.js → src/interface/api/create-bulk-advice-using-csv.interface.js} +0 -0
- /package/build/{interface/api/create-mutual-fund-advice.interface.js → src/interface/api/create-buy-back-interface.js} +0 -0
- /package/build/{interface → src/interface}/api/create-client.interface.d.ts +0 -0
- /package/build/{interface/api/create-pricing-plan.interface.js → src/interface/api/create-client.interface.js} +0 -0
- /package/build/{interface/api/create-registration.interface.js → src/interface/api/create-corporate-action-advice.interface.js} +0 -0
- /package/build/{interface/api/create-subscription.interface.js → src/interface/api/create-delisting.interface.js} +0 -0
- /package/build/{interface/api/delete-bank-details-by-id.interface.js → src/interface/api/create-dividend-interface.js} +0 -0
- /package/build/{interface/api/delete-pricing-plan-by-id.interface.js → src/interface/api/create-fpo.interface.js} +0 -0
- /package/build/{interface/api/get-advice-by-id.interface.js → src/interface/api/create-ipo.interface.js} +0 -0
- /package/build/{interface/api/get-advice-by-ids-status.inteface.js → src/interface/api/create-mutual-fund-advice.interface.js} +0 -0
- /package/build/{interface/api/get-bank-details.interface.js → src/interface/api/create-nfo-advice.interface.js} +0 -0
- /package/build/{interface/api/get-ipo-by-issue-end-date.interface.js → src/interface/api/create-nfo.interface.js} +0 -0
- /package/build/{interface/api/get-mutual-funds-by-type.interface.js → src/interface/api/create-ofs.interface.js} +0 -0
- /package/build/{interface/api/get-organization-by-id.interface.js → src/interface/api/create-open-offer.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/create-pricing-plan.interface.d.ts +0 -0
- /package/build/{interface/api/get-pricing-plan-by-date.interface.js → src/interface/api/create-pricing-plan.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/create-registration.interface.d.ts +0 -0
- /package/build/{interface/api/get-registration-by-id.interface.js → src/interface/api/create-registration.interface.js} +0 -0
- /package/build/{interface/api/get-registration-with-organization-owners.interface.js → src/interface/api/create-right-issue.interface.js} +0 -0
- /package/build/{interface/api/get-user-entities-by-advisor-id-type.interface.js → src/interface/api/create-split-bonus-stock.interface.js} +0 -0
- /package/build/{interface/api/login.interface.js → src/interface/api/create-split-stock.interface.js} +0 -0
- /package/build/{interface/api/remove-bank-details-by-id.interface.js → src/interface/api/create-staff-dto.js} +0 -0
- /package/build/{interface → src/interface}/api/create-subscription.interface.d.ts +0 -0
- /package/build/{interface/api/remove-pricing-plan-by-id.interface.js → src/interface/api/create-subscription.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/delete-bank-details-by-id.interface.d.ts +0 -0
- /package/build/{interface/api/update-advice.interface.js → src/interface/api/delete-bank-details-by-id.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/delete-pricing-plan-by-id.interface.d.ts +0 -0
- /package/build/{interface/api/update-bank-details.interface.js → src/interface/api/delete-pricing-plan-by-id.interface.js} +0 -0
- /package/build/{interface/api/update-organization.interface.js → src/interface/api/get-advice-by-id.interface.js} +0 -0
- /package/build/{interface/api/update-pricing-plan-by-id.interface.js → src/interface/api/get-advice-by-ids-status.inteface.js} +0 -0
- /package/build/{interface → src/interface}/api/get-bank-details.interface.d.ts +0 -0
- /package/build/{interface/api/update-pricing-plan.interface.js → src/interface/api/get-bank-details.interface.js} +0 -0
- /package/build/{interface/api/update-registration.interface.js → src/interface/api/get-configuration.interface.js} +0 -0
- /package/build/{interface/api/update-subscription.interface.js → src/interface/api/get-corporate-action-advice.interface.js} +0 -0
- /package/build/{interface/app-badrequest-exception.type.js → src/interface/api/get-cron-job-by-date-range.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/get-mutual-funds-by-type.interface.d.ts +0 -0
- /package/build/{interface/controller.interface.js → src/interface/api/get-mutual-funds-by-type.interface.js} +0 -0
- /package/build/{interface/entity/advice-entity.interface.js → src/interface/api/get-nfo-advice.interface.js} +0 -0
- /package/build/{interface/entity/bank-details-entity.interface.js → src/interface/api/get-nfo.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/get-organization-by-id.interface.d.ts +0 -0
- /package/build/{interface/entity/ipo-advice-entity.interface.js → src/interface/api/get-organization-by-id.interface.js} +0 -0
- /package/build/{interface/entity/ipo-entity.interface.js → src/interface/api/get-organization-entities.interface.js} +0 -0
- /package/build/{interface/entity/mutual-fund-advice-entity.interface.js → src/interface/api/get-pricing-plan-by-date.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/get-registration-by-id.interface.d.ts +0 -0
- /package/build/{interface/entity/mutual-funds-entity.interface.js → src/interface/api/get-registration-by-id.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/get-registration-with-organization-owners.interface.d.ts +0 -0
- /package/build/{interface/entity/organization-entity.interface.js → src/interface/api/get-registration-with-organization-owners.interface.js} +0 -0
- /package/build/{interface/entity/pricing-plan-entity.interface.js → src/interface/api/get-staff-members.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/get-user-entities-by-advisor-id-type.interface.d.ts +0 -0
- /package/build/{interface/entity/registration-entity.js → src/interface/api/get-user-entities-by-advisor-id-type.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/login.interface.d.ts +0 -0
- /package/build/{interface/entity/subscription-entity.interface.js → src/interface/api/login.interface.js} +0 -0
- /package/build/{interface/entity/user-entity.interface.js → src/interface/api/manual-trigger-cron-job.interface.js} +0 -0
- /package/build/{interface/key-value.interface.js → src/interface/api/remove-staff-member.interface.js} +0 -0
- /package/build/{interface/model/organization-entity-model.interface.js → src/interface/api/update-advice.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/update-bank-details.interface.d.ts +0 -0
- /package/build/{interface/modify-entity.interface.js → src/interface/api/update-bank-details.interface.js} +0 -0
- /package/build/{interface/modify.interface.js → src/interface/api/update-bonus-stock.interface.js} +0 -0
- /package/build/{interface/ng-date-struct.interface.js → src/interface/api/update-buy-back.interface.js} +0 -0
- /package/build/{interface/pricing-plan-model.interface.js → src/interface/api/update-configuration.interface.js} +0 -0
- /package/build/{interface/selected-billing-cycle.interface.js → src/interface/api/update-corporate-action-advice.interface.js} +0 -0
- /package/build/{interface/subscription-data.inteface.js → src/interface/api/update-corporate-action.interface.js} +0 -0
- /package/build/{interface/update-user-info.interface.js → src/interface/api/update-delisting.interface.js} +0 -0
- /package/build/{interface/upload-multer-file.interface.js → src/interface/api/update-dividend.interface.js} +0 -0
- /package/build/{interface/user-entity-without-password.interface.js → src/interface/api/update-fpo.interface.js} +0 -0
- /package/build/{interface/without-token-registration-entity.interface.js → src/interface/api/update-ipo.interface.js} +0 -0
- /package/build/{interface → src/interface}/api/update-pricing-plan-by-id.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/api/update-pricing-plan.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/api/update-registration.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/api/update-subscription.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/app-badrequest-exception.type.d.ts +0 -0
- /package/build/{interface → src/interface}/controller.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/entity/bank-details-entity.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/entity/entity-audit-column.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/entity/entity-audit-column.interface.js +0 -0
- /package/build/{interface → src/interface}/entity/mutual-funds-entity.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/entity/pricing-plan-entity.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/entity/subscription-entity.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/key-value.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/modify-entity.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/modify.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/ng-date-struct.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/selected-billing-cycle.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/subscription-data.inteface.d.ts +0 -0
- /package/build/{interface → src/interface}/update-user-info.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/upload-multer-file.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/user-entity-without-password.interface.d.ts +0 -0
- /package/build/{interface → src/interface}/without-token-registration-entity.interface.d.ts +0 -0
- /package/build/{model → src/model}/bank-details-entity-model.d.ts +0 -0
- /package/build/{model → src/model}/pricing-plan-entity-model.d.ts +0 -0
- /package/build/{model → src/model}/pricing-plan-model.d.ts +0 -0
- /package/build/{model → src/model}/subscribed-pricing-plan-model.d.ts +0 -0
- /package/build/{model → src/model}/subscription-entity-model.d.ts +0 -0
- /package/build/{model → src/model}/user-entity-model.d.ts +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class RedBlackTree<T, V> {
|
|
2
|
+
js_col: RedBlackTree<T, V>;
|
|
3
|
+
constructor(compare: any);
|
|
4
|
+
insert<T, V>(key: T, value: V): T;
|
|
5
|
+
remove(key: string): V;
|
|
6
|
+
getMin(): V;
|
|
7
|
+
isEmpty(): boolean;
|
|
8
|
+
getValues(): V[];
|
|
9
|
+
static getMinTree<T, V>(): RedBlackTree<T, V>;
|
|
10
|
+
static getMaxTree<T, V>(): RedBlackTree<T, V>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RedBlackTree = void 0;
|
|
4
|
+
const _utils_1 = require("../@utils");
|
|
5
|
+
const js_cols = require("./js-cols");
|
|
6
|
+
class RedBlackTree {
|
|
7
|
+
constructor(compare) {
|
|
8
|
+
this.js_col = new js_cols.RedBlackMap(compare);
|
|
9
|
+
}
|
|
10
|
+
insert(key, value) {
|
|
11
|
+
this.js_col.insert(key, value);
|
|
12
|
+
return key;
|
|
13
|
+
}
|
|
14
|
+
remove(key) {
|
|
15
|
+
return this.js_col.remove(key);
|
|
16
|
+
}
|
|
17
|
+
getMin() {
|
|
18
|
+
return this.js_col.getMin();
|
|
19
|
+
}
|
|
20
|
+
isEmpty() {
|
|
21
|
+
return this.js_col.isEmpty();
|
|
22
|
+
}
|
|
23
|
+
getValues() {
|
|
24
|
+
return this.js_col.getValues();
|
|
25
|
+
}
|
|
26
|
+
static getMinTree() {
|
|
27
|
+
const compare = (a, b) => {
|
|
28
|
+
const [aInteger, aDecimal] = a.split("#");
|
|
29
|
+
const [bInteger, bDecimal] = b.split("#");
|
|
30
|
+
const aFormatted = `${_utils_1.StringUtil.PadStartToIntegerPart(Number(aInteger))}#${Number(aDecimal)}`;
|
|
31
|
+
const bFormatted = `${_utils_1.StringUtil.PadStartToIntegerPart(Number(bInteger))}#${Number(bDecimal)}`;
|
|
32
|
+
if (aFormatted < bFormatted)
|
|
33
|
+
return -1;
|
|
34
|
+
if (aFormatted > bFormatted)
|
|
35
|
+
return 1;
|
|
36
|
+
return 0;
|
|
37
|
+
};
|
|
38
|
+
return new RedBlackTree(compare);
|
|
39
|
+
}
|
|
40
|
+
static getMaxTree() {
|
|
41
|
+
const compare = (a, b) => {
|
|
42
|
+
const [aInteger, aDecimal] = a.split("#");
|
|
43
|
+
const [bInteger, bDecimal] = b.split("#");
|
|
44
|
+
const aFormatted = `${_utils_1.StringUtil.PadStartToIntegerPart(Number(aInteger))}#${Number(aDecimal)}`;
|
|
45
|
+
const bFormatted = `${_utils_1.StringUtil.PadStartToIntegerPart(Number(bInteger))}#${Number(bDecimal)}`;
|
|
46
|
+
if (aFormatted < bFormatted)
|
|
47
|
+
return 1;
|
|
48
|
+
if (aFormatted > bFormatted)
|
|
49
|
+
return -1;
|
|
50
|
+
return 0;
|
|
51
|
+
};
|
|
52
|
+
return new RedBlackTree(compare);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.RedBlackTree = RedBlackTree;
|
|
@@ -10,5 +10,14 @@ export declare class DateUtil {
|
|
|
10
10
|
convertNumberToNgbDateStruct: (numericDate: string) => INgbDateStruct | null;
|
|
11
11
|
formatDateCode(dateCode: string): string;
|
|
12
12
|
addYearsToDateCode(dateCode: string, noOfYear: number): string;
|
|
13
|
+
getDateTimeCode(date: Date): string;
|
|
14
|
+
formatCreatedOrUpdateOn(data: string): string;
|
|
15
|
+
convertToNgbDate(input: string): {
|
|
16
|
+
year: number;
|
|
17
|
+
month: number;
|
|
18
|
+
day: number;
|
|
19
|
+
};
|
|
20
|
+
dateCodeFormatter(dateCode: string, formatter: string): string;
|
|
21
|
+
epochToDate(timestamp: number): Date;
|
|
13
22
|
}
|
|
14
23
|
export declare const dateUtil: DateUtil;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dateUtil = exports.DateUtil = void 0;
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
5
|
+
class DateUtil {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.convertMonthsToNumber = (months) => {
|
|
8
|
+
const year = months.year.toString().slice(2, 4);
|
|
9
|
+
const month = months.month.toString().padStart(2, "0");
|
|
10
|
+
const day = months.day.toString().padStart(2, "0");
|
|
11
|
+
const dates = year.concat(month).concat(day);
|
|
12
|
+
return `${dates}`;
|
|
13
|
+
};
|
|
14
|
+
this.convertNumberToNgbDateStruct = (numericDate) => {
|
|
15
|
+
if (typeof numericDate === "string" && numericDate.length === 6) {
|
|
16
|
+
const year = parseInt(numericDate.slice(0, 2), 10);
|
|
17
|
+
const month = parseInt(numericDate.slice(2, 4), 10);
|
|
18
|
+
const day = parseInt(numericDate.slice(4, 6), 10);
|
|
19
|
+
if (!isNaN(year) && !isNaN(month) && !isNaN(day)) {
|
|
20
|
+
return { year: 2000 + year, month, day };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static isValidDate(dateCode) {
|
|
27
|
+
if (dateCode.length !== 6)
|
|
28
|
+
return false;
|
|
29
|
+
// Date format: YYMMDD
|
|
30
|
+
function isDate(dateString) {
|
|
31
|
+
const separators = ["\\.", "\\-", "\\/"];
|
|
32
|
+
const stringBits = dateString.split(new RegExp(separators.join("|"), "g"));
|
|
33
|
+
const intBits = stringBits.map((bit) => parseInt(bit));
|
|
34
|
+
const parsedDate = new Date(intBits[0], intBits[1] - 1, intBits[2]);
|
|
35
|
+
return (parsedDate.getFullYear() === intBits[0] &&
|
|
36
|
+
parsedDate.getMonth() + 1 === intBits[1] &&
|
|
37
|
+
parsedDate.getDate() === intBits[2]);
|
|
38
|
+
}
|
|
39
|
+
return isDate(`20${dateCode.slice(0, 2)}.${dateCode.slice(2, 4)}.${dateCode.slice(4, 6)}`);
|
|
40
|
+
}
|
|
41
|
+
getDateCode(date) {
|
|
42
|
+
return (0, date_fns_1.format)(date, "yyMMdd");
|
|
43
|
+
}
|
|
44
|
+
getTodayCode() {
|
|
45
|
+
return (0, date_fns_1.format)(new Date(), "yyMMdd");
|
|
46
|
+
}
|
|
47
|
+
convertStringToDate(dateString, format = "yyMMdd") {
|
|
48
|
+
const parsedDate = (0, date_fns_1.parse)(dateString, format, new Date());
|
|
49
|
+
// IST has a fixed offset of UTC+5:30
|
|
50
|
+
const indianDate = new Date(parsedDate.getTime() + 330 * 60 * 1000);
|
|
51
|
+
return indianDate;
|
|
52
|
+
}
|
|
53
|
+
addNDaysToDate(date, n) {
|
|
54
|
+
return (0, date_fns_1.add)(date, { days: n });
|
|
55
|
+
}
|
|
56
|
+
addNDaysToDateCode(dateCode, n) {
|
|
57
|
+
return this.getDateCode(this.addNDaysToDate(this.convertStringToDate(dateCode, "yyMMdd"), n));
|
|
58
|
+
}
|
|
59
|
+
formatDateCode(dateCode) {
|
|
60
|
+
const date = (0, date_fns_1.parse)(dateCode, "yyMMdd", new Date());
|
|
61
|
+
const d = (0, date_fns_1.format)(date, "dd-MMM (EE)");
|
|
62
|
+
return d.slice(0, d.length - 2) + d.slice(d.length - 1);
|
|
63
|
+
}
|
|
64
|
+
addYearsToDateCode(dateCode, noOfYear) {
|
|
65
|
+
let date = this.convertStringToDate(dateCode);
|
|
66
|
+
let nextYear = new Date(date);
|
|
67
|
+
nextYear.setFullYear(date.getFullYear() + 1);
|
|
68
|
+
return this.getDateCode(nextYear);
|
|
69
|
+
}
|
|
70
|
+
getDateTimeCode(date) {
|
|
71
|
+
return (0, date_fns_1.format)(date, "yyMMddHHmm");
|
|
72
|
+
}
|
|
73
|
+
formatCreatedOrUpdateOn(data) {
|
|
74
|
+
const datePart = data.slice(8, 10);
|
|
75
|
+
const monthPart = data.slice(5, 7);
|
|
76
|
+
const yearPart = data.slice(2, 4);
|
|
77
|
+
return `${yearPart}${monthPart}${datePart}`;
|
|
78
|
+
}
|
|
79
|
+
convertToNgbDate(input) {
|
|
80
|
+
const year = 2000 + parseInt(input.substring(0, 2), 10);
|
|
81
|
+
const month = parseInt(input.substring(2, 4), 10);
|
|
82
|
+
const day = parseInt(input.substring(4, 6), 10);
|
|
83
|
+
return { year, month, day };
|
|
84
|
+
}
|
|
85
|
+
dateCodeFormatter(dateCode, formatter) {
|
|
86
|
+
const date = (0, date_fns_1.parse)(dateCode, "yyMMdd", new Date());
|
|
87
|
+
return (0, date_fns_1.format)(date, formatter);
|
|
88
|
+
}
|
|
89
|
+
epochToDate(timestamp) {
|
|
90
|
+
return new Date(timestamp);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.DateUtil = DateUtil;
|
|
94
|
+
exports.dateUtil = new DateUtil();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Modify } from "../@type";
|
|
2
|
+
/**
|
|
3
|
+
* Returns epoch time (ms) for today's date at the given local time (IST).
|
|
4
|
+
*/
|
|
5
|
+
export declare function getTodayISTEpoch(hour: number, minute: number): number;
|
|
6
|
+
/**
|
|
7
|
+
* Extract all string values from an object, ignoring undefined or null
|
|
8
|
+
*/
|
|
9
|
+
export declare function getStringValues<T extends Record<string, any>>(obj: T): string[];
|
|
10
|
+
export declare function transformDate<T extends {
|
|
11
|
+
date: Date;
|
|
12
|
+
}>(obj: T): Modify<T, {
|
|
13
|
+
date: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function groupByFunction<T, K>(list: T[], keyGetter: (input: T) => K): Map<K, T[]>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.groupByFunction = exports.transformDate = exports.getStringValues = exports.getTodayISTEpoch = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returns epoch time (ms) for today's date at the given local time (IST).
|
|
6
|
+
*/
|
|
7
|
+
function getTodayISTEpoch(hour, minute) {
|
|
8
|
+
const now = new Date();
|
|
9
|
+
const marketClose = new Date(now.getFullYear(), now.getMonth(), now.getDate(), hour, minute, 0, 0);
|
|
10
|
+
return marketClose.getTime();
|
|
11
|
+
}
|
|
12
|
+
exports.getTodayISTEpoch = getTodayISTEpoch;
|
|
13
|
+
/**
|
|
14
|
+
* Extract all string values from an object, ignoring undefined or null
|
|
15
|
+
*/
|
|
16
|
+
function getStringValues(obj) {
|
|
17
|
+
return Object.values(obj).filter((value) => typeof value === "string" && value !== "");
|
|
18
|
+
}
|
|
19
|
+
exports.getStringValues = getStringValues;
|
|
20
|
+
function transformDate(obj) {
|
|
21
|
+
return Object.assign(Object.assign({}, obj), { date: obj.date.toISOString() });
|
|
22
|
+
}
|
|
23
|
+
exports.transformDate = transformDate;
|
|
24
|
+
function groupByFunction(list, keyGetter) {
|
|
25
|
+
const map = new Map();
|
|
26
|
+
list.forEach((item) => {
|
|
27
|
+
const key = keyGetter(item);
|
|
28
|
+
const collection = map.get(key);
|
|
29
|
+
if (!collection) {
|
|
30
|
+
map.set(key, [item]);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
collection.push(item);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return map;
|
|
37
|
+
}
|
|
38
|
+
exports.groupByFunction = groupByFunction;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mathUtils = exports.MathUtils = void 0;
|
|
4
|
+
class MathUtils {
|
|
5
|
+
randomNumber(min, max) {
|
|
6
|
+
return parseFloat((Math.random() * (max - min) + min).toFixed(2));
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.MathUtils = MathUtils;
|
|
10
|
+
exports.mathUtils = new MathUtils();
|
|
@@ -17,3 +17,17 @@ export declare function ConvertToCommonEntity<T extends {
|
|
|
17
17
|
createdOn: string;
|
|
18
18
|
updatedOn: string;
|
|
19
19
|
}>>(obj: T): R;
|
|
20
|
+
export declare function ConvertToCronJobEntities<T extends {
|
|
21
|
+
startTime: Date;
|
|
22
|
+
endTime: Date | null;
|
|
23
|
+
}>(inputObject: T[]): Modify<T, {
|
|
24
|
+
startTime: string;
|
|
25
|
+
endTime: string | null;
|
|
26
|
+
}>[];
|
|
27
|
+
export declare function ConvertToCommonCronJobEntity<T extends {
|
|
28
|
+
startTime: Date;
|
|
29
|
+
endTime: Date | null;
|
|
30
|
+
}, R extends Modify<T, {
|
|
31
|
+
startTime: string;
|
|
32
|
+
endTime: string | null;
|
|
33
|
+
}>>(obj: T): R;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ConvertToCommonCronJobEntity = exports.ConvertToCronJobEntities = exports.ConvertToCommonEntity = exports.ConvertToCommonEntities = exports.ConvertCommonEntries = void 0;
|
|
15
|
+
//key - value converter
|
|
16
|
+
function ConvertCommonEntries(inputObject) {
|
|
17
|
+
return Object.entries(inputObject).reduce((acc, [key, value]) => {
|
|
18
|
+
acc[key] = ConvertToCommonEntity(value);
|
|
19
|
+
return acc;
|
|
20
|
+
}, {});
|
|
21
|
+
}
|
|
22
|
+
exports.ConvertCommonEntries = ConvertCommonEntries;
|
|
23
|
+
function ConvertToCommonEntities(inputObject) {
|
|
24
|
+
return inputObject.reduce((acc, value) => {
|
|
25
|
+
const modifiedEntity = ConvertToCommonEntity(value);
|
|
26
|
+
acc.push(modifiedEntity);
|
|
27
|
+
return acc;
|
|
28
|
+
}, []);
|
|
29
|
+
}
|
|
30
|
+
exports.ConvertToCommonEntities = ConvertToCommonEntities;
|
|
31
|
+
function ConvertToCommonEntity(obj) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
const { createdOn: _, updatedOn: __ } = obj, objectToAssign = __rest(obj, ["createdOn", "updatedOn"]);
|
|
34
|
+
return Object.assign({ createdOn: (_a = obj.createdOn) === null || _a === void 0 ? void 0 : _a.toISOString(), updatedOn: (_b = obj.updatedOn) === null || _b === void 0 ? void 0 : _b.toISOString() }, objectToAssign);
|
|
35
|
+
}
|
|
36
|
+
exports.ConvertToCommonEntity = ConvertToCommonEntity;
|
|
37
|
+
function ConvertToCronJobEntities(inputObject) {
|
|
38
|
+
return inputObject.reduce((acc, value) => {
|
|
39
|
+
const modifiedEntity = ConvertToCommonCronJobEntity(value);
|
|
40
|
+
acc.push(modifiedEntity);
|
|
41
|
+
return acc;
|
|
42
|
+
}, []);
|
|
43
|
+
}
|
|
44
|
+
exports.ConvertToCronJobEntities = ConvertToCronJobEntities;
|
|
45
|
+
function ConvertToCommonCronJobEntity(obj) {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
const { startTime: _, endTime: __ } = obj, objectToAssign = __rest(obj, ["startTime", "endTime"]);
|
|
48
|
+
return Object.assign({ startTime: (_a = obj.startTime) === null || _a === void 0 ? void 0 : _a.toISOString(), endTime: ((_b = obj.endTime) === null || _b === void 0 ? void 0 : _b.toISOString()) || null }, objectToAssign);
|
|
49
|
+
}
|
|
50
|
+
exports.ConvertToCommonCronJobEntity = ConvertToCommonCronJobEntity;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stringUtil = exports.StringUtil = void 0;
|
|
4
|
+
class StringUtil {
|
|
5
|
+
generateRandomPassword() {
|
|
6
|
+
const alphabets = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
7
|
+
const numbers = "0123456789";
|
|
8
|
+
const specialChars = "!@#$%^&*?+";
|
|
9
|
+
function getRandomCharacter(characters) {
|
|
10
|
+
return characters[Math.floor(Math.random() * characters.length)];
|
|
11
|
+
}
|
|
12
|
+
const randomAlphabet = getRandomCharacter(alphabets);
|
|
13
|
+
const randomNumber = getRandomCharacter(numbers);
|
|
14
|
+
const randomSpecialChar = getRandomCharacter(specialChars);
|
|
15
|
+
const remainingCharacters = alphabets + alphabets.toLowerCase();
|
|
16
|
+
const randomRemainingChars = Array.from({ length: 3 }, () => getRandomCharacter(remainingCharacters)).join("");
|
|
17
|
+
const passwordArray = [
|
|
18
|
+
randomAlphabet,
|
|
19
|
+
randomNumber,
|
|
20
|
+
randomSpecialChar,
|
|
21
|
+
randomRemainingChars,
|
|
22
|
+
];
|
|
23
|
+
// Shuffle the password array
|
|
24
|
+
for (let i = passwordArray.length - 1; i > 0; i--) {
|
|
25
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
26
|
+
[passwordArray[i], passwordArray[j]] = [
|
|
27
|
+
passwordArray[j],
|
|
28
|
+
passwordArray[i],
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
return passwordArray.join("");
|
|
32
|
+
}
|
|
33
|
+
static convertToIdObjectResponse(entities) {
|
|
34
|
+
const response = {};
|
|
35
|
+
entities.forEach((entity) => {
|
|
36
|
+
if (!response[entity.id])
|
|
37
|
+
response[entity.id] = entity;
|
|
38
|
+
});
|
|
39
|
+
return response;
|
|
40
|
+
}
|
|
41
|
+
static PadStartToIntegerPart(number, length = 7) {
|
|
42
|
+
const numString = number.toString();
|
|
43
|
+
const [integerPart, decimalPart] = numString.split(".");
|
|
44
|
+
const paddedIntegerPart = integerPart.padStart(length, "0");
|
|
45
|
+
const formattedNum = decimalPart
|
|
46
|
+
? `${paddedIntegerPart}.${decimalPart}`
|
|
47
|
+
: paddedIntegerPart;
|
|
48
|
+
return formattedNum;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.StringUtil = StringUtil;
|
|
52
|
+
exports.stringUtil = new StringUtil();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidateUtils = void 0;
|
|
4
|
+
const _model_1 = require("../@model");
|
|
5
|
+
class ValidateUtils {
|
|
6
|
+
static validateCorporateActionType(corporateActionType, expectedType) {
|
|
7
|
+
if (corporateActionType !== expectedType) {
|
|
8
|
+
throw new _model_1.AppBadRequestException({
|
|
9
|
+
key: expectedType,
|
|
10
|
+
message: [
|
|
11
|
+
`Corporate action entity with type does not belongs to ${expectedType}`,
|
|
12
|
+
],
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ValidateUtils = ValidateUtils;
|
package/package.json
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ia-common",
|
|
3
|
-
"version": "1.0.1
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "./build/index.js",
|
|
6
|
-
"types": "./build/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"build/**/*"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"clean": "
|
|
12
|
-
"build": "npm run clean && tsc",
|
|
13
|
-
"version:deploy:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
|
|
14
|
-
"version:deploy:patch": "npm version patch && git push && npm run build && npm publish",
|
|
15
|
-
"version:deploy:minor": "npm version minor && git push && npm run build && npm publish",
|
|
16
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
17
|
-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" 2>&1| tee eslint.log",
|
|
18
|
-
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
"@
|
|
29
|
-
"@typescript-eslint/
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ia-common",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./build/index.js",
|
|
6
|
+
"types": "./build/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"build/**/*"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"clean": "rm -rf build",
|
|
12
|
+
"build": "npm run clean && tsc",
|
|
13
|
+
"version:deploy:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
|
|
14
|
+
"version:deploy:patch": "npm version patch && git push && npm run build && npm publish",
|
|
15
|
+
"version:deploy:minor": "npm version minor && git push && npm run build && npm publish",
|
|
16
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
17
|
+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" 2>&1| tee eslint.log",
|
|
18
|
+
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
19
|
+
"link": "npm run build && npm link"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "github__bellex-dev__ia-common:bellex-dev/ia-common.git"
|
|
24
|
+
},
|
|
25
|
+
"author": "",
|
|
26
|
+
"license": "ISC",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^20.11.5",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
30
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
31
|
+
"del-cli": "^5.1.0",
|
|
32
|
+
"eslint": "^8.56.0",
|
|
33
|
+
"typescript": "^5.3.3"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"date-fns": "^3.3.1"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IpoAdviceTransactionType = void 0;
|
|
4
|
-
var IpoAdviceTransactionType;
|
|
5
|
-
(function (IpoAdviceTransactionType) {
|
|
6
|
-
IpoAdviceTransactionType["SUBSCRIBE"] = "subscribe";
|
|
7
|
-
IpoAdviceTransactionType["AVOID"] = "avoid";
|
|
8
|
-
})(IpoAdviceTransactionType || (exports.IpoAdviceTransactionType = IpoAdviceTransactionType = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IPOListingPlatform = void 0;
|
|
4
|
-
var IPOListingPlatform;
|
|
5
|
-
(function (IPOListingPlatform) {
|
|
6
|
-
IPOListingPlatform["NSE"] = "nse";
|
|
7
|
-
IPOListingPlatform["BSE"] = "bse";
|
|
8
|
-
IPOListingPlatform["SME"] = "sme";
|
|
9
|
-
})(IPOListingPlatform || (exports.IPOListingPlatform = IPOListingPlatform = {}));
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AppBadRequestException = void 0;
|
|
19
|
-
var AppBadRequestException = /** @class */ (function (_super) {
|
|
20
|
-
__extends(AppBadRequestException, _super);
|
|
21
|
-
function AppBadRequestException(appBadRequestException) {
|
|
22
|
-
var _this = _super.call(this) || this;
|
|
23
|
-
_this.message = appBadRequestException.message.join(",");
|
|
24
|
-
return _this;
|
|
25
|
-
}
|
|
26
|
-
return AppBadRequestException;
|
|
27
|
-
}(Error));
|
|
28
|
-
exports.AppBadRequestException = AppBadRequestException;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IPOListingPlatform } from "../../@enum";
|
|
2
|
-
import { IIpoEntity } from "../entity/ipo-entity.interface";
|
|
3
|
-
import { IModifyEntity } from "../modify-entity.interface";
|
|
4
|
-
export interface IAddIPOResponse extends IModifyEntity<IIpoEntity> {
|
|
5
|
-
}
|
|
6
|
-
export interface IAddIPORequest {
|
|
7
|
-
companyName: string;
|
|
8
|
-
issueStartDate: number;
|
|
9
|
-
issueEndDate: number;
|
|
10
|
-
priceBand: string;
|
|
11
|
-
listingAt: IPOListingPlatform;
|
|
12
|
-
lotSize: number;
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IpoAdviceTransactionType } from "../../@enum";
|
|
2
|
-
import { IIpoAdviceEntity } from "../entity/ipo-advice-entity.interface";
|
|
3
|
-
import { IModifyEntity } from "../modify-entity.interface";
|
|
4
|
-
import { IFiles } from "./create-bank-details.interface";
|
|
5
|
-
export interface ICreateIpoAdviceRequest {
|
|
6
|
-
transactionType: IpoAdviceTransactionType;
|
|
7
|
-
noteDocument?: string;
|
|
8
|
-
videoDocument?: string;
|
|
9
|
-
voiceDocument?: string;
|
|
10
|
-
rationale?: string;
|
|
11
|
-
files: IFiles[];
|
|
12
|
-
}
|
|
13
|
-
export interface ICreateIpoAdviceResponse extends IModifyEntity<IIpoAdviceEntity> {
|
|
14
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export * from "./update-organization.interface";
|
|
2
|
-
export * from "./create-registration.interface";
|
|
3
|
-
export * from "./update-organization.interface";
|
|
4
|
-
export * from "./create-bank-details.interface";
|
|
5
|
-
export * from "./create-pricing-plan.interface";
|
|
6
|
-
export * from "./create-subscription.interface";
|
|
7
|
-
export * from "./delete-pricing-plan-by-id.interface";
|
|
8
|
-
export * from "./update-bank-details.interface";
|
|
9
|
-
export * from "./update-pricing-plan.interface";
|
|
10
|
-
export * from "./update-subscription.interface";
|
|
11
|
-
export * from "./get-pricing-plan-by-date.interface";
|
|
12
|
-
export * from "./get-bank-details.interface";
|
|
13
|
-
export * from "./get-registration-by-id.interface";
|
|
14
|
-
export * from "./get-registration-with-organization-owners.interface";
|
|
15
|
-
export * from "./delete-bank-details-by-id.interface";
|
|
16
|
-
export * from "./update-pricing-plan-by-id.interface";
|
|
17
|
-
export * from "./login.interface";
|
|
18
|
-
export * from "./update-registration.interface";
|
|
19
|
-
export * from "./get-organization-by-id.interface";
|
|
20
|
-
export * from "./get-advice-by-id.interface";
|
|
21
|
-
export * from "./get-advice-by-ids-status.inteface";
|
|
22
|
-
export * from "./create-advice.interface";
|
|
23
|
-
export * from "./update-advice.interface";
|
|
24
|
-
export * from "./add-mutual-funds.interface";
|
|
25
|
-
export * from "./get-mutual-funds-by-type.interface";
|
|
26
|
-
export * from "./create-client.interface";
|
|
27
|
-
export * from "./get-user-entities-by-advisor-id-type.interface";
|
|
28
|
-
export * from "./create-mutual-fund-advice.interface";
|
|
29
|
-
export * from "./advisor-user-mapping-entity.interface";
|
|
30
|
-
export * from "./add-ipo.interface";
|
|
31
|
-
export * from "./get-ipo-by-issue-end-date.interface";
|
|
32
|
-
export * from "./create-ipo-advice.interface";
|