ia-common 1.1.1-beta.1 → 1.1.1-beta.11
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/src/@enum.d.ts +10 -7
- package/build/src/@enum.js +10 -7
- package/build/src/enum/error.key.enum.d.ts +3 -0
- package/build/src/enum/error.key.enum.js +7 -0
- package/build/src/enum/permission-actions.enum.d.ts +7 -0
- package/build/src/enum/permission-actions.enum.js +11 -0
- package/build/src/enum/relation-type.enum.d.ts +4 -0
- package/build/src/enum/relation-type.enum.js +8 -0
- package/build/src/enum/user/user-role.enum.d.ts +7 -0
- package/build/src/enum/user/user-role.enum.js +15 -0
- package/build/src/interface/api/advior-user-interface.d.ts +4 -0
- package/build/src/interface/api/{create-bank-details.interface.d.ts → bank-details-create-dto..interface.d.ts} +5 -2
- package/build/src/interface/api/bank-details-update.dto.interface.d.ts +23 -0
- package/build/src/interface/api/configuration-update-dto.interface.d.ts +13 -0
- package/build/src/interface/api/configurations-create-dto.interface.d.ts +3 -0
- package/build/src/interface/api/corporate-actions-create.dto.d.ts +7 -0
- package/build/src/interface/api/corporate-actions-update.dto.d.ts +19 -0
- package/build/src/interface/api/create-bulk-advice-using-csv.interface.d.ts +3 -3
- package/build/src/interface/api/create-corporate-action-advice.interface.d.ts +1 -1
- package/build/src/interface/api/create-user-dto.interface.d.ts +16 -0
- package/build/src/interface/api/create-user-dto.interface.js +8 -0
- package/build/src/interface/api/delete-bank-details-by-id.interface.d.ts +1 -5
- package/build/src/interface/api/{create-advice.interface.d.ts → equity-advice-create-dto.interface.d.ts} +4 -4
- package/build/src/interface/api/{update-advice.interface.d.ts → equity-advice-update-dto..d.ts} +3 -3
- package/build/src/interface/api/get-advice-by-id.interface.d.ts +2 -2
- package/build/src/interface/api/get-advice-by-ids-status.inteface.d.ts +2 -2
- package/build/src/interface/api/get-organization-by-id.interface.d.ts +2 -3
- package/build/src/interface/api/get-registration-by-id.interface.d.ts +5 -5
- package/build/src/interface/api/get-registration-with-organization-owners.interface.d.ts +3 -3
- package/build/src/interface/api/get-user-entities-by-advisor-id-type.interface.d.ts +1 -2
- package/build/src/interface/api/get-user-entities-by-filter.interface.d.ts +3 -0
- package/build/src/interface/api/index.d.ts +46 -55
- package/build/src/interface/api/index.js +46 -55
- package/build/src/interface/api/login.interface.d.ts +0 -1
- package/build/src/interface/api/mutual-fund-advice-create-dto.interface.d.ts +13 -0
- package/build/src/interface/api/mutual-fund-advice-update-dto.interface.d.ts +11 -0
- package/build/src/interface/api/mutual-funds-create-dto.interface.d.ts +8 -0
- package/build/src/interface/api/nfo-advice-create-dto.interface.d.ts +13 -0
- package/build/src/interface/api/nfo-advice-update-dto.interface.d.ts +10 -0
- package/build/src/interface/api/nfo-create-dto.interface.d.ts +3 -0
- package/build/src/interface/api/organization-create-dto.interface.d.ts +5 -0
- package/build/src/interface/api/organization-update-dto.interface.d.ts +31 -0
- package/build/src/interface/api/permission.create.dto.interface.d.ts +6 -0
- package/build/src/interface/api/permission.update.dto.interface.d.ts +3 -0
- package/build/src/interface/api/pricing-plan-create.dto.interface.d.ts +27 -0
- package/build/src/interface/api/pricing-plan-update-dto.interface.d.ts +22 -0
- package/build/src/interface/api/registration-create-dto.interface.d.ts +7 -0
- package/build/src/interface/api/registration-update-dto.interface.d.ts +9 -0
- package/build/src/interface/api/role-create-dto.interface.d.ts +3 -0
- package/build/src/interface/api/role-update-dto.interface.d.ts +3 -0
- package/build/src/interface/api/role-user-mapping-create-dto.interface.d.ts +7 -0
- package/build/src/interface/api/role.permission.mapping.create.dto.interface.d.ts +5 -0
- package/build/src/interface/api/role.permission.mapping.delete.dto.interface.d.ts +3 -0
- package/build/src/interface/api/role.permission.mapping.response.d.ts +5 -0
- package/build/src/interface/api/role.permission.mapping.update.dto.interface.d.ts +3 -0
- package/build/src/interface/api/subscription-create.dto.interface.d.ts +10 -0
- package/build/src/interface/api/subscription-update.dto.interface.d.ts +13 -0
- package/build/src/interface/api/update-corporate-action-advice.interface.d.ts +1 -1
- package/build/src/interface/api/update-pricing-plan-by-id.interface.d.ts +2 -2
- package/build/src/interface/api/update-user-dto.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/buy-back-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/create-bonus-stock.interface.d.ts +4 -0
- package/build/src/interface/corporate-actions/delisting-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/dividend-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/fpo-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/index.d.ts +12 -0
- package/build/src/interface/corporate-actions/index.js +12 -0
- package/build/src/interface/corporate-actions/ipo-corporate-action.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/ofs-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/open-offer-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/right-issues-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/split-bonus-corporate-action.interface.d.ts +7 -2
- package/build/src/interface/corporate-actions/split-stock-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/update-bonus-stock.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-buy-back.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-delisting.interface.d.ts +5 -0
- package/build/src/interface/corporate-actions/update-dividend.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-fpo.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-ipo.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-ofs.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-open-offer.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-right-issue.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-right-issue.interface.js +2 -0
- package/build/src/interface/corporate-actions/update-split-bonus.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-split-bonus.interface.js +2 -0
- package/build/src/interface/corporate-actions/update-split-stock.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-split-stock.interface.js +2 -0
- package/build/src/interface/entity/advice-entity.interface.d.ts +2 -5
- package/build/src/interface/entity/advisor-user-mapping-entity.interface.d.ts +3 -1
- package/build/src/interface/entity/bank-details-entity.interface.d.ts +6 -3
- package/build/src/interface/entity/configurations-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/corporate-action-advice-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/corporate-actions-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/cron-job-entity.interface.d.ts +2 -1
- package/build/src/interface/entity/entity-utils.interface.d.ts +57 -8
- package/build/src/interface/entity/entity-utils.interface.js +20 -16
- package/build/src/interface/entity/index.d.ts +6 -1
- package/build/src/interface/entity/index.js +6 -1
- package/build/src/interface/entity/mutual-fund-advice-entity.interface.d.ts +5 -5
- package/build/src/interface/entity/mutual-funds-entity.interface.d.ts +11 -11
- package/build/src/interface/entity/{nfp-advice-entity.interface.d.ts → nfo-advice-entity.interface.d.ts} +3 -3
- package/build/src/interface/entity/nfo-advice-entity.interface.js +2 -0
- package/build/src/interface/entity/nfo-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/organization-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/permission.entity.interface.d.ts +11 -0
- package/build/src/interface/entity/permission.entity.interface.js +2 -0
- package/build/src/interface/entity/pricing-plan-entity.interface.d.ts +3 -3
- package/build/src/interface/entity/registration-entity.d.ts +2 -2
- package/build/src/interface/entity/relation-config.interface.d.ts +16 -0
- package/build/src/interface/entity/relation-config.interface.js +2 -0
- package/build/src/interface/entity/role-user-mapping-entity.interface.d.ts +8 -0
- package/build/src/interface/entity/role-user-mapping-entity.interface.js +2 -0
- package/build/src/interface/entity/role.entity.interface.d.ts +8 -0
- package/build/src/interface/entity/role.entity.interface.js +2 -0
- package/build/src/interface/entity/role.permission.mapping.entity.interface.d.ts +8 -0
- package/build/src/interface/entity/role.permission.mapping.entity.interface.js +2 -0
- package/build/src/interface/entity/subscription-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/user-entity.interface.d.ts +3 -4
- package/build/src/interface/update-user-info.interface.d.ts +4 -0
- package/build/src/model/advisor-user-mapping-entity-model.d.ts +16 -0
- package/build/src/model/advisor-user-mapping-entity-model.js +28 -0
- package/build/src/model/bank-details-entity-model.d.ts +8 -5
- package/build/src/model/bank-details-entity-model.js +51 -3
- package/build/src/model/base.entity.model.d.ts +7 -10
- package/build/src/model/base.entity.model.js +13 -16
- package/build/src/model/configurations-entity-model.d.ts +9 -6
- package/build/src/model/configurations-entity-model.js +49 -5
- package/build/src/model/corporate-actions/bonus-corporate-action-model.d.ts +2 -2
- package/build/src/model/corporate-actions/buy-back-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/corporate-action-model.d.ts +12 -6
- package/build/src/model/corporate-actions/corporate-action-model.js +78 -5
- package/build/src/model/corporate-actions/corporate-actions-advice-model.d.ts +25 -0
- package/build/src/model/corporate-actions/corporate-actions-advice-model.js +37 -0
- package/build/src/model/corporate-actions/delisting-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/dividend-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/fpo-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/ipo-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/ofs-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/open-offer-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/right-issue-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/split-bonus-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/split-corporate-action-model.d.ts +4 -4
- package/build/src/model/cron-jobs-entity-model.d.ts +23 -0
- package/build/src/model/cron-jobs-entity-model.js +34 -0
- package/build/src/model/equity-advice-entity-model.d.ts +3 -3
- package/build/src/model/equity-advice-entity-model.js +46 -46
- package/build/src/model/index.d.ts +20 -10
- package/build/src/model/index.js +20 -10
- package/build/src/model/interface/entity.model.interface.d.ts +35 -11
- package/build/src/model/interface/entity.model.interface.js +190 -14
- package/build/src/model/interface/pricing-plan-model.interface.d.ts +2 -2
- package/build/src/model/mutual-fund-advice-entity.model.d.ts +27 -0
- package/build/src/model/mutual-fund-advice-entity.model.js +39 -0
- package/build/src/model/mutual-funds-entity.model.d.ts +28 -0
- package/build/src/model/mutual-funds-entity.model.js +40 -0
- package/build/src/model/nfo-advice-entity.model.d.ts +22 -0
- package/build/src/model/nfo-advice-entity.model.js +34 -0
- package/build/src/model/nfo-entity.model.d.ts +21 -0
- package/build/src/model/nfo-entity.model.js +33 -0
- package/build/src/model/organization-entity-model.d.ts +33 -8
- package/build/src/model/organization-entity-model.js +222 -28
- package/build/src/model/permission-entity-model.d.ts +20 -0
- package/build/src/model/permission-entity-model.js +32 -0
- package/build/src/model/pricing-plan-entity-model.d.ts +8 -5
- package/build/src/model/pricing-plan-entity-model.js +16 -5
- package/build/src/model/pricing-plan-model.d.ts +8 -5
- package/build/src/model/pricing-plan-model.js +113 -9
- package/build/src/model/registration-entity-model.d.ts +23 -0
- package/build/src/model/registration-entity-model.js +55 -0
- package/build/src/model/role-entity-model.d.ts +14 -0
- package/build/src/model/role-entity-model.js +26 -0
- package/build/src/model/role-permission-entity-model.d.ts +15 -0
- package/build/src/model/role-permission-entity-model.js +26 -0
- package/build/src/model/role-user-mapping-entity-model.d.ts +15 -0
- package/build/src/model/role-user-mapping-entity-model.js +26 -0
- package/build/src/model/subscription-entity-model.d.ts +15 -7
- package/build/src/model/subscription-entity-model.js +119 -11
- package/build/src/model/user-entity-model.d.ts +13 -9
- package/build/src/model/user-entity-model.js +98 -12
- package/build/src/red-black-tree/js-cols.d.ts +2 -0
- package/build/src/red-black-tree/js-cols.js +12 -0
- package/build/src/utils/helper.fn.utils.d.ts +101 -1
- package/build/src/utils/helper.fn.utils.js +187 -1
- package/package.json +1 -1
- package/build/src/enum/user/user-type.enum.d.ts +0 -9
- package/build/src/enum/user/user-type.enum.js +0 -13
- package/build/src/interface/api/add-mutual-funds.interface.d.ts +0 -8
- package/build/src/interface/api/create-bonus-stock.interface.d.ts +0 -6
- package/build/src/interface/api/create-buy-back-interface.d.ts +0 -6
- package/build/src/interface/api/create-client.interface.d.ts +0 -12
- package/build/src/interface/api/create-delisting.interface.d.ts +0 -6
- package/build/src/interface/api/create-dividend-interface.d.ts +0 -6
- package/build/src/interface/api/create-fpo.interface.d.ts +0 -6
- package/build/src/interface/api/create-ipo.interface.d.ts +0 -6
- package/build/src/interface/api/create-mutual-fund-advice.interface.d.ts +0 -17
- package/build/src/interface/api/create-nfo-advice.interface.d.ts +0 -13
- package/build/src/interface/api/create-nfo.interface.d.ts +0 -12
- package/build/src/interface/api/create-ofs.interface.d.ts +0 -6
- package/build/src/interface/api/create-open-offer.interface.d.ts +0 -6
- package/build/src/interface/api/create-pricing-plan.interface.d.ts +0 -21
- package/build/src/interface/api/create-registration.interface.d.ts +0 -9
- package/build/src/interface/api/create-right-issue.interface.d.ts +0 -6
- package/build/src/interface/api/create-split-bonus-stock.interface.d.ts +0 -6
- package/build/src/interface/api/create-split-stock.interface.d.ts +0 -6
- package/build/src/interface/api/create-staff-dto.d.ts +0 -9
- package/build/src/interface/api/create-subscription.interface.d.ts +0 -18
- package/build/src/interface/api/update-bank-details.interface.d.ts +0 -18
- package/build/src/interface/api/update-bonus-stock.interface.d.ts +0 -6
- package/build/src/interface/api/update-buy-back.interface.d.ts +0 -6
- package/build/src/interface/api/update-configuration.interface.d.ts +0 -10
- package/build/src/interface/api/update-delisting.interface.d.ts +0 -5
- package/build/src/interface/api/update-dividend.interface.d.ts +0 -6
- package/build/src/interface/api/update-fpo.interface.d.ts +0 -6
- package/build/src/interface/api/update-ipo.interface.d.ts +0 -6
- package/build/src/interface/api/update-nfo-advice.interface.d.ts +0 -14
- package/build/src/interface/api/update-ofs.interface.d.ts +0 -6
- package/build/src/interface/api/update-open-offer.interface.d.ts +0 -6
- package/build/src/interface/api/update-organization.interface.d.ts +0 -23
- package/build/src/interface/api/update-pricing-plan.interface.d.ts +0 -13
- package/build/src/interface/api/update-registration.interface.d.ts +0 -8
- package/build/src/interface/api/update-right-issue.interface.d.ts +0 -6
- package/build/src/interface/api/update-split-bonus.interface.d.ts +0 -6
- package/build/src/interface/api/update-split-stock.interface.d.ts +0 -6
- package/build/src/interface/api/update-staff.dto.d.ts +0 -9
- package/build/src/interface/api/update-subscription.interface.d.ts +0 -11
- /package/build/src/interface/api/{add-mutual-funds.interface.js → advior-user-interface.js} +0 -0
- /package/build/src/interface/api/{create-advice.interface.js → bank-details-create-dto..interface.js} +0 -0
- /package/build/src/interface/api/{create-bank-details.interface.js → bank-details-update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-bonus-stock.interface.js → configuration-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-buy-back-interface.js → configurations-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-client.interface.js → corporate-actions-create.dto.js} +0 -0
- /package/build/src/interface/api/{create-delisting.interface.js → corporate-actions-update.dto.js} +0 -0
- /package/build/src/interface/api/{create-dividend-interface.js → equity-advice-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-fpo.interface.js → equity-advice-update-dto..js} +0 -0
- /package/build/src/interface/api/{create-ipo.interface.js → get-user-entities-by-filter.interface.js} +0 -0
- /package/build/src/interface/api/{create-mutual-fund-advice.interface.js → mutual-fund-advice-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-nfo-advice.interface.js → mutual-fund-advice-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-nfo.interface.js → mutual-funds-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-ofs.interface.js → nfo-advice-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-open-offer.interface.js → nfo-advice-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-pricing-plan.interface.js → nfo-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-registration.interface.js → organization-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-right-issue.interface.js → organization-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-split-bonus-stock.interface.js → permission.create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-split-stock.interface.js → permission.update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-staff-dto.js → pricing-plan-create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-subscription.interface.js → pricing-plan-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-advice.interface.js → registration-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-bank-details.interface.js → registration-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-bonus-stock.interface.js → role-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-buy-back.interface.js → role-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-configuration.interface.js → role-user-mapping-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-delisting.interface.js → role.permission.mapping.create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-dividend.interface.js → role.permission.mapping.delete.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-fpo.interface.js → role.permission.mapping.response.js} +0 -0
- /package/build/src/interface/api/{update-ipo.interface.js → role.permission.mapping.update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-nfo-advice.interface.js → subscription-create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-ofs.interface.js → subscription-update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-open-offer.interface.js → update-user-dto.interface.js} +0 -0
- /package/build/src/interface/{api/update-organization.interface.js → corporate-actions/create-bonus-stock.interface.js} +0 -0
- /package/build/src/interface/{api/update-pricing-plan.interface.js → corporate-actions/update-bonus-stock.interface.js} +0 -0
- /package/build/src/interface/{api/update-registration.interface.js → corporate-actions/update-buy-back.interface.js} +0 -0
- /package/build/src/interface/{api/update-right-issue.interface.js → corporate-actions/update-delisting.interface.js} +0 -0
- /package/build/src/interface/{api/update-split-bonus.interface.js → corporate-actions/update-dividend.interface.js} +0 -0
- /package/build/src/interface/{api/update-split-stock.interface.js → corporate-actions/update-fpo.interface.js} +0 -0
- /package/build/src/interface/{api/update-staff.dto.js → corporate-actions/update-ipo.interface.js} +0 -0
- /package/build/src/interface/{api/update-subscription.interface.js → corporate-actions/update-ofs.interface.js} +0 -0
- /package/build/src/interface/{entity/nfp-advice-entity.interface.js → corporate-actions/update-open-offer.interface.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CorporateActionsStatus, CorporateActionsType, OrderOfSplitAndBonusStock } from "../../@enum";
|
|
2
|
-
import { IBonusStockData, ICorporateActionsEntity, ICorporateEntityOmitData,
|
|
3
|
-
export declare class SplitBonusCorporateActionModel implements
|
|
2
|
+
import { IBonusStockData, ICorporateActionsEntity, ICorporateEntityOmitData, ISplitBonusCorporateActionCreateDtoData, ISplitStockData } from "../../@type";
|
|
3
|
+
export declare class SplitBonusCorporateActionModel implements ISplitBonusCorporateActionCreateDtoData, ICorporateEntityOmitData {
|
|
4
4
|
splitStock: ISplitStockData;
|
|
5
5
|
bonusStock: IBonusStockData;
|
|
6
6
|
order: OrderOfSplitAndBonusStock;
|
|
@@ -9,8 +9,8 @@ export declare class SplitBonusCorporateActionModel implements ISplitBonusCorpor
|
|
|
9
9
|
type: CorporateActionsType;
|
|
10
10
|
status: CorporateActionsStatus;
|
|
11
11
|
id: number;
|
|
12
|
-
createdOn:
|
|
13
|
-
updatedOn:
|
|
12
|
+
createdOn: number;
|
|
13
|
+
updatedOn: number;
|
|
14
14
|
createdBy: number;
|
|
15
15
|
updatedBy: number;
|
|
16
16
|
constructor(entity: ICorporateActionsEntity);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CorporateActionsStatus, CorporateActionsType } from "../../@enum";
|
|
2
|
-
import { ICorporateActionsEntity, ICorporateEntityOmitData,
|
|
3
|
-
export declare class SplitCorporateActionModel implements
|
|
2
|
+
import { ICorporateActionsEntity, ICorporateEntityOmitData, ISplitCorporateActionCreateDtoData } from "../../@type";
|
|
3
|
+
export declare class SplitCorporateActionModel implements ISplitCorporateActionCreateDtoData, ICorporateEntityOmitData {
|
|
4
4
|
currentFV: number;
|
|
5
5
|
newFV: number;
|
|
6
6
|
companyName: string;
|
|
@@ -8,8 +8,8 @@ export declare class SplitCorporateActionModel implements ISplitCorporateAction,
|
|
|
8
8
|
type: CorporateActionsType;
|
|
9
9
|
status: CorporateActionsStatus;
|
|
10
10
|
id: number;
|
|
11
|
-
createdOn:
|
|
12
|
-
updatedOn:
|
|
11
|
+
createdOn: number;
|
|
12
|
+
updatedOn: number;
|
|
13
13
|
createdBy: number;
|
|
14
14
|
updatedBy: number;
|
|
15
15
|
constructor(entity: ICorporateActionsEntity);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EntityEnum, ICronJobsEntity } from "../@type";
|
|
2
|
+
import { CronJobsNames, CronJobsStatus } from "../@enum";
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
+
export declare class CronJobsEntityModel extends BaseEntityModel<EntityEnum.CRON_JOBS> implements ICronJobsEntity {
|
|
5
|
+
id: number;
|
|
6
|
+
job: CronJobsNames;
|
|
7
|
+
startTime: Date;
|
|
8
|
+
endTime: Date | null;
|
|
9
|
+
message: string;
|
|
10
|
+
error: string;
|
|
11
|
+
data: string;
|
|
12
|
+
status: CronJobsStatus;
|
|
13
|
+
createdOn: number;
|
|
14
|
+
updatedOn: number;
|
|
15
|
+
createdBy: number;
|
|
16
|
+
updatedBy: number;
|
|
17
|
+
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Factory method to create a model from an entity instance
|
|
20
|
+
*/
|
|
21
|
+
static fromEntity(entity: ICronJobsEntity): CronJobsEntityModel;
|
|
22
|
+
getRelationConfigs(): any[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CronJobsEntityModel = void 0;
|
|
4
|
+
const _type_1 = require("../@type");
|
|
5
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
6
|
+
class CronJobsEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(_type_1.EntityEnum.CRON_JOBS);
|
|
9
|
+
this.id = 0;
|
|
10
|
+
this.job = "";
|
|
11
|
+
this.startTime = new Date();
|
|
12
|
+
this.endTime = null;
|
|
13
|
+
this.message = "";
|
|
14
|
+
this.error = "";
|
|
15
|
+
this.data = "";
|
|
16
|
+
this.status = "";
|
|
17
|
+
this.createdOn = 0;
|
|
18
|
+
this.updatedOn = 0;
|
|
19
|
+
this.createdBy = 0;
|
|
20
|
+
this.updatedBy = 0;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Factory method to create a model from an entity instance
|
|
24
|
+
*/
|
|
25
|
+
static fromEntity(entity) {
|
|
26
|
+
const result = new CronJobsEntityModel();
|
|
27
|
+
Object.assign(result, entity);
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
getRelationConfigs() {
|
|
31
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.CronJobsEntityModel = CronJobsEntityModel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AdviceType, InvestDurationType, AdviceTransactionType, AdviceStatus } from "../@enum";
|
|
2
|
-
import { EntityEnum,
|
|
2
|
+
import { EntityEnum, IEquityAdviceEntity } from "../@type";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
-
export declare class EquityAdviceEntityModel extends BaseEntityModel<EntityEnum.EQUITY_ADVICE> implements
|
|
4
|
+
export declare class EquityAdviceEntityModel extends BaseEntityModel<EntityEnum.EQUITY_ADVICE> implements IEquityAdviceEntity {
|
|
5
5
|
id: number;
|
|
6
6
|
type: AdviceType;
|
|
7
7
|
advisorOrgId: number;
|
|
@@ -26,7 +26,7 @@ export declare class EquityAdviceEntityModel extends BaseEntityModel<EntityEnum.
|
|
|
26
26
|
createdBy: number;
|
|
27
27
|
updatedBy: number;
|
|
28
28
|
getRelationConfigs(): any;
|
|
29
|
-
static fromEntity(entity:
|
|
29
|
+
static fromEntity(entity: IEquityAdviceEntity): EquityAdviceEntityModel;
|
|
30
30
|
getRandomHigh(): number;
|
|
31
31
|
getGainLoss(randomHigh?: number): number;
|
|
32
32
|
}
|
|
@@ -5,52 +5,6 @@ const _enum_1 = require("../@enum");
|
|
|
5
5
|
const _type_1 = require("../@type");
|
|
6
6
|
const _utils_1 = require("../@utils");
|
|
7
7
|
const base_entity_model_1 = require("./base.entity.model");
|
|
8
|
-
// export class EquityAdviceEntityModel implements IAdviceEntity {
|
|
9
|
-
// id: number;
|
|
10
|
-
// type: AdviceType;
|
|
11
|
-
// advisorOrgId: number;
|
|
12
|
-
// stockName: string;
|
|
13
|
-
// cmp: number;
|
|
14
|
-
// targetPrice: number;
|
|
15
|
-
// stopLoss: number;
|
|
16
|
-
// investmentDurationType: InvestDurationType;
|
|
17
|
-
// transactionType: AdviceTransactionType;
|
|
18
|
-
// fromDate: number;
|
|
19
|
-
// toDate: number;
|
|
20
|
-
// noteDocumentUrl: string | null;
|
|
21
|
-
// videoUrl: string | null;
|
|
22
|
-
// voiceUrl: string | null;
|
|
23
|
-
// status: AdviceStatus;
|
|
24
|
-
// rationale: string | null;
|
|
25
|
-
// targetHitOn: Date | null;
|
|
26
|
-
// targetHitCMP: number | null;
|
|
27
|
-
// gainLoss: number | null;
|
|
28
|
-
// createdOn: number;
|
|
29
|
-
// updatedOn: number;
|
|
30
|
-
// createdBy: number;
|
|
31
|
-
// updatedBy: number;
|
|
32
|
-
// constructor(data: IAdviceEntity) {
|
|
33
|
-
// Object.assign(this, data);
|
|
34
|
-
// }
|
|
35
|
-
// getRandomHigh() {
|
|
36
|
-
// let randomHigh = 0;
|
|
37
|
-
// if (this.transactionType !== AdviceTransactionType.SELL) {
|
|
38
|
-
// randomHigh = mathUtils.randomNumber(this.stopLoss, this.targetPrice);
|
|
39
|
-
// } else {
|
|
40
|
-
// randomHigh = mathUtils.randomNumber(this.targetPrice, this.stopLoss);
|
|
41
|
-
// }
|
|
42
|
-
// return randomHigh;
|
|
43
|
-
// }
|
|
44
|
-
// getGainLoss(randomHigh?: number) {
|
|
45
|
-
// return parseFloat(
|
|
46
|
-
// (
|
|
47
|
-
// ((randomHigh ?? this.getRandomHigh() - this.cmp) /
|
|
48
|
-
// (this.targetPrice - this.cmp)) *
|
|
49
|
-
// 100
|
|
50
|
-
// ).toFixed(2)
|
|
51
|
-
// );
|
|
52
|
-
// }
|
|
53
|
-
// }
|
|
54
8
|
class EquityAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
55
9
|
constructor() {
|
|
56
10
|
super(...arguments);
|
|
@@ -103,3 +57,49 @@ class EquityAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
103
57
|
}
|
|
104
58
|
}
|
|
105
59
|
exports.EquityAdviceEntityModel = EquityAdviceEntityModel;
|
|
60
|
+
// export class EquityAdviceEntityModel implements IAdviceEntity {
|
|
61
|
+
// id: number;
|
|
62
|
+
// type: AdviceType;
|
|
63
|
+
// advisorOrgId: number;
|
|
64
|
+
// stockName: string;
|
|
65
|
+
// cmp: number;
|
|
66
|
+
// targetPrice: number;
|
|
67
|
+
// stopLoss: number;
|
|
68
|
+
// investmentDurationType: InvestDurationType;
|
|
69
|
+
// transactionType: AdviceTransactionType;
|
|
70
|
+
// fromDate: number;
|
|
71
|
+
// toDate: number;
|
|
72
|
+
// noteDocumentUrl: string | null;
|
|
73
|
+
// videoUrl: string | null;
|
|
74
|
+
// voiceUrl: string | null;
|
|
75
|
+
// status: AdviceStatus;
|
|
76
|
+
// rationale: string | null;
|
|
77
|
+
// targetHitOn: Date | null;
|
|
78
|
+
// targetHitCMP: number | null;
|
|
79
|
+
// gainLoss: number | null;
|
|
80
|
+
// createdOn: number;
|
|
81
|
+
// updatedOn: number;
|
|
82
|
+
// createdBy: number;
|
|
83
|
+
// updatedBy: number;
|
|
84
|
+
// constructor(data: IAdviceEntity) {
|
|
85
|
+
// Object.assign(this, data);
|
|
86
|
+
// }
|
|
87
|
+
// getRandomHigh() {
|
|
88
|
+
// let randomHigh = 0;
|
|
89
|
+
// if (this.transactionType !== AdviceTransactionType.SELL) {
|
|
90
|
+
// randomHigh = mathUtils.randomNumber(this.stopLoss, this.targetPrice);
|
|
91
|
+
// } else {
|
|
92
|
+
// randomHigh = mathUtils.randomNumber(this.targetPrice, this.stopLoss);
|
|
93
|
+
// }
|
|
94
|
+
// return randomHigh;
|
|
95
|
+
// }
|
|
96
|
+
// getGainLoss(randomHigh?: number) {
|
|
97
|
+
// return parseFloat(
|
|
98
|
+
// (
|
|
99
|
+
// ((randomHigh ?? this.getRandomHigh() - this.cmp) /
|
|
100
|
+
// (this.targetPrice - this.cmp)) *
|
|
101
|
+
// 100
|
|
102
|
+
// ).toFixed(2)
|
|
103
|
+
// );
|
|
104
|
+
// }
|
|
105
|
+
// }
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
export * from "./base.entity.model";
|
|
1
2
|
export * from "./pricing-plan-entity-model";
|
|
2
3
|
export * from "./subscribed-pricing-plan-model";
|
|
3
4
|
export * from "../exception/app-badrequest.exception";
|
|
4
5
|
export * from "./organization-entity-model";
|
|
5
6
|
export * from "./user-entity-model";
|
|
6
|
-
export * from "./subscription-entity-model";
|
|
7
7
|
export * from "./bank-details-entity-model";
|
|
8
|
+
export * from "./subscription-entity-model";
|
|
8
9
|
export * from "./corporate-actions/bonus-corporate-action-model";
|
|
9
|
-
export * from "./corporate-actions/fpo-corporate-action-model";
|
|
10
10
|
export * from "./corporate-actions/dividend-corporate-action-model";
|
|
11
|
-
export * from "./corporate-actions/
|
|
11
|
+
export * from "./corporate-actions/fpo-corporate-action-model";
|
|
12
|
+
export * from "./corporate-actions/buy-back-corporate-action-model";
|
|
12
13
|
export * from "./corporate-actions/delisting-corporate-action-model";
|
|
13
14
|
export * from "./corporate-actions/open-offer-corporate-action-model";
|
|
14
|
-
export * from "./corporate-actions/
|
|
15
|
-
export * from "./corporate-actions/split-corporate-action-model";
|
|
16
|
-
export * from "./corporate-actions/ipo-corporate-action-model";
|
|
15
|
+
export * from "./corporate-actions/right-issue-corporate-action-model";
|
|
17
16
|
export * from "./corporate-actions/corporate-action-model";
|
|
18
|
-
export * from "./corporate-actions/
|
|
19
|
-
export * from "./corporate-actions/
|
|
17
|
+
export * from "./corporate-actions/ipo-corporate-action-model";
|
|
18
|
+
export * from "./corporate-actions/split-corporate-action-model";
|
|
20
19
|
export * from "./configurations-entity-model";
|
|
20
|
+
export * from "./corporate-actions/ofs-corporate-action-model";
|
|
21
|
+
export * from "./corporate-actions/split-bonus-corporate-action-model";
|
|
21
22
|
export * from "./equity-advice-entity-model";
|
|
22
|
-
export * from "./pricing-plan-model";
|
|
23
|
-
export * from "./base.entity.model";
|
|
24
23
|
export * from "./interface/entity.model.interface";
|
|
24
|
+
export * from "./pricing-plan-model";
|
|
25
|
+
export * from "./registration-entity-model";
|
|
26
|
+
export * from "./mutual-fund-advice-entity.model";
|
|
27
|
+
export * from "./mutual-funds-entity.model";
|
|
28
|
+
export * from "./nfo-advice-entity.model";
|
|
29
|
+
export * from "./nfo-entity.model";
|
|
30
|
+
export * from "./configurations-entity-model";
|
|
31
|
+
export * from "./permission-entity-model";
|
|
32
|
+
export * from "./role-entity-model";
|
|
33
|
+
export * from "./role-permission-entity-model";
|
|
34
|
+
export * from "./role-user-mapping-entity-model";
|
package/build/src/model/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base.entity.model"), exports);
|
|
17
18
|
__exportStar(require("./pricing-plan-entity-model"), exports);
|
|
18
19
|
// export * from "./model/subscribed-pricing-plan-model";
|
|
19
20
|
__exportStar(require("./subscribed-pricing-plan-model"), exports);
|
|
@@ -23,22 +24,31 @@ __exportStar(require("../exception/app-badrequest.exception"), exports);
|
|
|
23
24
|
__exportStar(require("./organization-entity-model"), exports);
|
|
24
25
|
// export * from "./model/user-entity-model";
|
|
25
26
|
__exportStar(require("./user-entity-model"), exports);
|
|
26
|
-
__exportStar(require("./subscription-entity-model"), exports);
|
|
27
27
|
__exportStar(require("./bank-details-entity-model"), exports);
|
|
28
|
+
__exportStar(require("./subscription-entity-model"), exports);
|
|
28
29
|
__exportStar(require("./corporate-actions/bonus-corporate-action-model"), exports);
|
|
29
|
-
__exportStar(require("./corporate-actions/fpo-corporate-action-model"), exports);
|
|
30
30
|
__exportStar(require("./corporate-actions/dividend-corporate-action-model"), exports);
|
|
31
|
-
__exportStar(require("./corporate-actions/
|
|
31
|
+
__exportStar(require("./corporate-actions/fpo-corporate-action-model"), exports);
|
|
32
|
+
__exportStar(require("./corporate-actions/buy-back-corporate-action-model"), exports);
|
|
32
33
|
__exportStar(require("./corporate-actions/delisting-corporate-action-model"), exports);
|
|
33
34
|
__exportStar(require("./corporate-actions/open-offer-corporate-action-model"), exports);
|
|
34
|
-
__exportStar(require("./corporate-actions/
|
|
35
|
-
__exportStar(require("./corporate-actions/split-corporate-action-model"), exports);
|
|
36
|
-
__exportStar(require("./corporate-actions/ipo-corporate-action-model"), exports);
|
|
35
|
+
__exportStar(require("./corporate-actions/right-issue-corporate-action-model"), exports);
|
|
37
36
|
__exportStar(require("./corporate-actions/corporate-action-model"), exports);
|
|
38
|
-
__exportStar(require("./corporate-actions/
|
|
39
|
-
__exportStar(require("./corporate-actions/
|
|
37
|
+
__exportStar(require("./corporate-actions/ipo-corporate-action-model"), exports);
|
|
38
|
+
__exportStar(require("./corporate-actions/split-corporate-action-model"), exports);
|
|
40
39
|
__exportStar(require("./configurations-entity-model"), exports);
|
|
40
|
+
__exportStar(require("./corporate-actions/ofs-corporate-action-model"), exports);
|
|
41
|
+
__exportStar(require("./corporate-actions/split-bonus-corporate-action-model"), exports);
|
|
41
42
|
__exportStar(require("./equity-advice-entity-model"), exports);
|
|
42
|
-
__exportStar(require("./pricing-plan-model"), exports);
|
|
43
|
-
__exportStar(require("./base.entity.model"), exports);
|
|
44
43
|
__exportStar(require("./interface/entity.model.interface"), exports);
|
|
44
|
+
__exportStar(require("./pricing-plan-model"), exports);
|
|
45
|
+
__exportStar(require("./registration-entity-model"), exports);
|
|
46
|
+
__exportStar(require("./mutual-fund-advice-entity.model"), exports);
|
|
47
|
+
__exportStar(require("./mutual-funds-entity.model"), exports);
|
|
48
|
+
__exportStar(require("./nfo-advice-entity.model"), exports);
|
|
49
|
+
__exportStar(require("./nfo-entity.model"), exports);
|
|
50
|
+
__exportStar(require("./configurations-entity-model"), exports);
|
|
51
|
+
__exportStar(require("./permission-entity-model"), exports);
|
|
52
|
+
__exportStar(require("./role-entity-model"), exports);
|
|
53
|
+
__exportStar(require("./role-permission-entity-model"), exports);
|
|
54
|
+
__exportStar(require("./role-user-mapping-entity-model"), exports);
|
|
@@ -1,19 +1,43 @@
|
|
|
1
|
-
import { EntityEnum,
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
1
|
+
import { EntityEnum, EntityMap, EntityModelIndexMap, EntityModelMap, EnumEntityType, EnumToModel, IBaseEntityApiResponse } from "../../@type";
|
|
2
|
+
import { BaseEntityModel } from "../base.entity.model";
|
|
3
|
+
export declare function mapToIndex(entityMap: EntityModelMap): EntityModelIndexMap;
|
|
4
|
+
export declare function getEntityModelIndexMap(data: EntityMap, reusedConfig?: {
|
|
5
|
+
existingEntityIndexMap: EntityModelIndexMap;
|
|
5
6
|
enumEntities: EntityEnum[];
|
|
6
|
-
}):
|
|
7
|
-
export declare function populateRelationsFor(
|
|
8
|
-
export declare function parseEntities<T extends EnumEntityType<EntityEnum>>(json: IBaseEntityApiResponse<T>, baseEntity: EntityEnum,
|
|
7
|
+
}): EntityModelIndexMap;
|
|
8
|
+
export declare function populateRelationsFor(entityModelIndexMap: EntityModelIndexMap, enumEntities: EntityEnum[]): void;
|
|
9
|
+
export declare function parseEntities<T extends EnumEntityType<EntityEnum>>(json: IBaseEntityApiResponse<T>, baseEntity: EntityEnum, entityModelMap: EntityModelMap): EntityModelMap;
|
|
9
10
|
export declare const entityEnumToEntityModel: {
|
|
10
11
|
[E in EntityEnum]?: (json: EnumEntityType<E> & {
|
|
11
12
|
createdOn: number;
|
|
12
13
|
updatedOn: number;
|
|
13
14
|
}) => EnumToModel<E>;
|
|
14
15
|
};
|
|
15
|
-
export declare function parseEntitiesWithoutModels
|
|
16
|
+
export declare function parseEntitiesWithoutModels(json: EntityMap, baseEntity: EntityEnum, entityMap?: {
|
|
16
17
|
[E in EntityEnum]?: EnumEntityType<E>[];
|
|
17
|
-
}):
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
}): EntityMap;
|
|
19
|
+
export declare function entityMapToEntityModelMap(entityMap: EntityMap): EntityModelMap;
|
|
20
|
+
export declare function entityModelMapToEntityModelIndexMap(entityModelMap: EntityModelMap, entityRelationsFor: EntityEnum[]): EntityModelIndexMap;
|
|
21
|
+
export declare function removeEntityById(entityModelIndexMap: EntityModelIndexMap, entity: EntityEnum, id: number): void;
|
|
22
|
+
export declare class EntityModelRelationHelper {
|
|
23
|
+
entityMap: EntityMap;
|
|
24
|
+
entityModelMap: EntityModelMap;
|
|
25
|
+
entityModelIndexMap: EntityModelIndexMap;
|
|
26
|
+
constructor(entityMap: EntityMap);
|
|
27
|
+
private init;
|
|
28
|
+
private toEntityModelMap;
|
|
29
|
+
fromEntityToEntityModel<T extends EntityEnum>(entity: EnumEntityType<T>, entityEnum: T): BaseEntityModel<T>;
|
|
30
|
+
private toEntityModelIndexMap;
|
|
31
|
+
populateRelationsByEntityEnums(entityEnums: EntityEnum[]): EntityModelRelationHelper;
|
|
32
|
+
populateRelationsByEntityEnum(entityEnum: EntityEnum): void;
|
|
33
|
+
populateRelationsByEntityModel(entityModel: BaseEntityModel<EntityEnum>): void;
|
|
34
|
+
addEntityModel<T extends EntityEnum>(entityModel: BaseEntityModel<T>, config?: {
|
|
35
|
+
populateRelations?: boolean;
|
|
36
|
+
}): void;
|
|
37
|
+
addEntity<T extends EntityEnum>(entity: EnumEntityType<T>, entityEnum: T, config?: {
|
|
38
|
+
populateRelations?: boolean;
|
|
39
|
+
}): void;
|
|
40
|
+
updateEntityModel<T extends EntityEnum>(entityModel: BaseEntityModel<T>, config?: {
|
|
41
|
+
populateRelations?: boolean;
|
|
42
|
+
}): void;
|
|
43
|
+
}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseEntitiesWithoutModels = exports.entityEnumToEntityModel = exports.parseEntities = exports.populateRelationsFor = exports.
|
|
3
|
+
exports.EntityModelRelationHelper = exports.removeEntityById = exports.entityModelMapToEntityModelIndexMap = exports.entityMapToEntityModelMap = exports.parseEntitiesWithoutModels = exports.entityEnumToEntityModel = exports.parseEntities = exports.populateRelationsFor = exports.getEntityModelIndexMap = exports.mapToIndex = void 0;
|
|
4
4
|
const _type_1 = require("../../@type");
|
|
5
|
+
const advisor_user_mapping_entity_model_1 = require("../advisor-user-mapping-entity-model");
|
|
6
|
+
const bank_details_entity_model_1 = require("../bank-details-entity-model");
|
|
5
7
|
const base_entity_model_1 = require("../base.entity.model");
|
|
8
|
+
const configurations_entity_model_1 = require("../configurations-entity-model");
|
|
9
|
+
const corporate_action_model_1 = require("../corporate-actions/corporate-action-model");
|
|
10
|
+
const corporate_actions_advice_model_1 = require("../corporate-actions/corporate-actions-advice-model");
|
|
11
|
+
const cron_jobs_entity_model_1 = require("../cron-jobs-entity-model");
|
|
6
12
|
const equity_advice_entity_model_1 = require("../equity-advice-entity-model");
|
|
13
|
+
const mutual_fund_advice_entity_model_1 = require("../mutual-fund-advice-entity.model");
|
|
14
|
+
const mutual_funds_entity_model_1 = require("../mutual-funds-entity.model");
|
|
15
|
+
const nfo_advice_entity_model_1 = require("../nfo-advice-entity.model");
|
|
16
|
+
const nfo_entity_model_1 = require("../nfo-entity.model");
|
|
17
|
+
const organization_entity_model_1 = require("../organization-entity-model");
|
|
18
|
+
const permission_entity_model_1 = require("../permission-entity-model");
|
|
19
|
+
const pricing_plan_entity_model_1 = require("../pricing-plan-entity-model");
|
|
20
|
+
const registration_entity_model_1 = require("../registration-entity-model");
|
|
21
|
+
const role_entity_model_1 = require("../role-entity-model");
|
|
22
|
+
const role_permission_entity_model_1 = require("../role-permission-entity-model");
|
|
23
|
+
const role_user_mapping_entity_model_1 = require("../role-user-mapping-entity-model");
|
|
24
|
+
const subscription_entity_model_1 = require("../subscription-entity-model");
|
|
25
|
+
const user_entity_model_1 = require("../user-entity-model");
|
|
7
26
|
function mapToIndex(entityMap) {
|
|
8
27
|
return Object.keys(entityMap).reduce((acc, key) => {
|
|
9
28
|
// @ts-ignore
|
|
@@ -15,9 +34,11 @@ function mapToIndex(entityMap) {
|
|
|
15
34
|
}, {});
|
|
16
35
|
}
|
|
17
36
|
exports.mapToIndex = mapToIndex;
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
37
|
+
function getEntityModelIndexMap(data,
|
|
38
|
+
// baseEntity: T,
|
|
39
|
+
reusedConfig) {
|
|
40
|
+
const entityMap = data;
|
|
41
|
+
// parseEntities(data, baseEntity, entityMap);
|
|
21
42
|
const entityIndexMap = mapToIndex(entityMap);
|
|
22
43
|
if (reusedConfig) {
|
|
23
44
|
for (const entity of reusedConfig.enumEntities) {
|
|
@@ -27,22 +48,41 @@ function getEntityIndexMap(data, baseEntity, reusedConfig) {
|
|
|
27
48
|
}
|
|
28
49
|
return entityIndexMap;
|
|
29
50
|
}
|
|
30
|
-
exports.
|
|
31
|
-
function populateRelationsFor(
|
|
51
|
+
exports.getEntityModelIndexMap = getEntityModelIndexMap;
|
|
52
|
+
function populateRelationsFor(entityModelIndexMap, enumEntities) {
|
|
32
53
|
enumEntities.forEach((entity) => {
|
|
33
|
-
base_entity_model_1.BaseEntityModel.populateRelationsForEntities(
|
|
54
|
+
base_entity_model_1.BaseEntityModel.populateRelationsForEntities(entityModelIndexMap, entity);
|
|
34
55
|
});
|
|
35
56
|
}
|
|
36
57
|
exports.populateRelationsFor = populateRelationsFor;
|
|
37
|
-
function parseEntities(json, baseEntity,
|
|
58
|
+
function parseEntities(json, baseEntity, entityModelMap) {
|
|
38
59
|
var _a;
|
|
39
60
|
const entityFromJsonMappings = {
|
|
40
61
|
[_type_1.EntityEnum.EQUITY_ADVICE]: equity_advice_entity_model_1.EquityAdviceEntityModel.fromEntity,
|
|
62
|
+
[_type_1.EntityEnum.BANK_DETAIL]: bank_details_entity_model_1.BankDetailsEntityModel.fromEntity,
|
|
63
|
+
[_type_1.EntityEnum.PRICING_PLAN]: pricing_plan_entity_model_1.PricingPlanEntityModel.fromEntity,
|
|
64
|
+
[_type_1.EntityEnum.SUBSCRIPTION]: subscription_entity_model_1.SubscriptionEntityModel.fromEntity,
|
|
65
|
+
[_type_1.EntityEnum.ORGANIZATION]: organization_entity_model_1.OrganizationEntityModel.fromEntity,
|
|
66
|
+
[_type_1.EntityEnum.REGISTRATION]: registration_entity_model_1.RegistrationEntityModel.fromEntity,
|
|
67
|
+
[_type_1.EntityEnum.USER]: user_entity_model_1.UserEntityModel.fromEntity,
|
|
68
|
+
[_type_1.EntityEnum.ADVISOR_USER_MAPPING]: advisor_user_mapping_entity_model_1.AdvisorUserMappingEntityModel.fromEntity,
|
|
69
|
+
[_type_1.EntityEnum.MUTUAL_FUNDS]: mutual_funds_entity_model_1.MutualFundEntityModel.fromEntity,
|
|
70
|
+
[_type_1.EntityEnum.MUTUAL_FUND_ADVICE]: mutual_fund_advice_entity_model_1.MutualFundAdviceEntityModel.fromEntity,
|
|
71
|
+
[_type_1.EntityEnum.NFO]: nfo_entity_model_1.NFOEntityModel.fromEntity,
|
|
72
|
+
[_type_1.EntityEnum.NFO_ADVICE]: nfo_advice_entity_model_1.NFOAdviceEntityModel.fromEntity,
|
|
73
|
+
[_type_1.EntityEnum.CORPORATE_ACTIONS]: corporate_action_model_1.CorporateActionsEntityModel.fromEntity,
|
|
74
|
+
[_type_1.EntityEnum.CORPORATE_ACTIONS_ADVICE]: corporate_actions_advice_model_1.CorporateActionsAdviceEntityModel.fromEntity,
|
|
75
|
+
[_type_1.EntityEnum.CONFIGURATION]: configurations_entity_model_1.ConfigurationsEntityModel.fromEntity,
|
|
76
|
+
[_type_1.EntityEnum.CRON_JOBS]: cron_jobs_entity_model_1.CronJobsEntityModel.fromEntity,
|
|
77
|
+
[_type_1.EntityEnum.ROLE]: role_entity_model_1.RoleEntityModel.fromEntity,
|
|
78
|
+
[_type_1.EntityEnum.PERMISSION]: permission_entity_model_1.PermissionEntityModel.fromEntity,
|
|
79
|
+
[_type_1.EntityEnum.ROLE_PERMISSION_MAPPING]: role_permission_entity_model_1.RolePermissionMappingEntityModel.fromEntity,
|
|
80
|
+
[_type_1.EntityEnum.ROLE_USER_MAPPING]: role_user_mapping_entity_model_1.RoleUserMappingEntityModel.fromEntity,
|
|
41
81
|
};
|
|
42
82
|
if (!(baseEntity in entityFromJsonMappings)) {
|
|
43
83
|
throw new Error(`Unknown entity: ${baseEntity}`);
|
|
44
84
|
}
|
|
45
|
-
|
|
85
|
+
entityModelMap[baseEntity] = ((_a = json["baseEntities"]) !== null && _a !== void 0 ? _a : []).map(
|
|
46
86
|
// REVIEW: Needs to be fixed after audit column type conversion
|
|
47
87
|
(e) => entityFromJsonMappings[baseEntity](e));
|
|
48
88
|
if (json["relatedEntities"]) {
|
|
@@ -50,14 +90,33 @@ function parseEntities(json, baseEntity, entityMap) {
|
|
|
50
90
|
for (const entityName in relatedEntities) {
|
|
51
91
|
parseEntities(
|
|
52
92
|
// @ts-ignore
|
|
53
|
-
relatedEntities[entityName], entityName,
|
|
93
|
+
relatedEntities[entityName], entityName, entityModelMap);
|
|
54
94
|
}
|
|
55
95
|
}
|
|
56
|
-
return
|
|
96
|
+
return entityModelMap;
|
|
57
97
|
}
|
|
58
98
|
exports.parseEntities = parseEntities;
|
|
59
99
|
exports.entityEnumToEntityModel = {
|
|
60
100
|
[_type_1.EntityEnum.EQUITY_ADVICE]: equity_advice_entity_model_1.EquityAdviceEntityModel.fromEntity,
|
|
101
|
+
[_type_1.EntityEnum.BANK_DETAIL]: bank_details_entity_model_1.BankDetailsEntityModel.fromEntity,
|
|
102
|
+
[_type_1.EntityEnum.PRICING_PLAN]: pricing_plan_entity_model_1.PricingPlanEntityModel.fromEntity,
|
|
103
|
+
[_type_1.EntityEnum.SUBSCRIPTION]: subscription_entity_model_1.SubscriptionEntityModel.fromEntity,
|
|
104
|
+
[_type_1.EntityEnum.ORGANIZATION]: organization_entity_model_1.OrganizationEntityModel.fromEntity,
|
|
105
|
+
[_type_1.EntityEnum.REGISTRATION]: registration_entity_model_1.RegistrationEntityModel.fromEntity,
|
|
106
|
+
[_type_1.EntityEnum.USER]: user_entity_model_1.UserEntityModel.fromEntity,
|
|
107
|
+
[_type_1.EntityEnum.ADVISOR_USER_MAPPING]: advisor_user_mapping_entity_model_1.AdvisorUserMappingEntityModel.fromEntity,
|
|
108
|
+
[_type_1.EntityEnum.MUTUAL_FUNDS]: mutual_funds_entity_model_1.MutualFundEntityModel.fromEntity,
|
|
109
|
+
[_type_1.EntityEnum.MUTUAL_FUND_ADVICE]: mutual_fund_advice_entity_model_1.MutualFundAdviceEntityModel.fromEntity,
|
|
110
|
+
[_type_1.EntityEnum.NFO]: nfo_entity_model_1.NFOEntityModel.fromEntity,
|
|
111
|
+
[_type_1.EntityEnum.NFO_ADVICE]: nfo_advice_entity_model_1.NFOAdviceEntityModel.fromEntity,
|
|
112
|
+
[_type_1.EntityEnum.CORPORATE_ACTIONS]: corporate_action_model_1.CorporateActionsEntityModel.fromEntity,
|
|
113
|
+
[_type_1.EntityEnum.CORPORATE_ACTIONS_ADVICE]: corporate_actions_advice_model_1.CorporateActionsAdviceEntityModel.fromEntity,
|
|
114
|
+
[_type_1.EntityEnum.CONFIGURATION]: configurations_entity_model_1.ConfigurationsEntityModel.fromEntity,
|
|
115
|
+
[_type_1.EntityEnum.CRON_JOBS]: cron_jobs_entity_model_1.CronJobsEntityModel.fromEntity,
|
|
116
|
+
[_type_1.EntityEnum.ROLE]: role_entity_model_1.RoleEntityModel.fromEntity,
|
|
117
|
+
[_type_1.EntityEnum.PERMISSION]: permission_entity_model_1.PermissionEntityModel.fromEntity,
|
|
118
|
+
[_type_1.EntityEnum.ROLE_PERMISSION_MAPPING]: role_permission_entity_model_1.RolePermissionMappingEntityModel.fromEntity,
|
|
119
|
+
[_type_1.EntityEnum.ROLE_USER_MAPPING]: role_user_mapping_entity_model_1.RoleUserMappingEntityModel.fromEntity,
|
|
61
120
|
};
|
|
62
121
|
function parseEntitiesWithoutModels(json, baseEntity, entityMap = {}) {
|
|
63
122
|
var _a;
|
|
@@ -68,11 +127,128 @@ function parseEntitiesWithoutModels(json, baseEntity, entityMap = {}) {
|
|
|
68
127
|
if (json["relatedEntities"]) {
|
|
69
128
|
const relatedEntities = json["relatedEntities"];
|
|
70
129
|
for (const entityName in relatedEntities) {
|
|
71
|
-
parseEntitiesWithoutModels(
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
relatedEntities[entityName], entityName, entityMap);
|
|
130
|
+
parseEntitiesWithoutModels(relatedEntities[entityName], entityName, entityMap);
|
|
74
131
|
}
|
|
75
132
|
}
|
|
76
133
|
return entityMap;
|
|
77
134
|
}
|
|
78
135
|
exports.parseEntitiesWithoutModels = parseEntitiesWithoutModels;
|
|
136
|
+
function entityMapToEntityModelMap(entityMap) {
|
|
137
|
+
var _a;
|
|
138
|
+
const entityModelMap = {};
|
|
139
|
+
for (const entityName in entityMap) {
|
|
140
|
+
if (!(entityName in exports.entityEnumToEntityModel)) {
|
|
141
|
+
throw new Error(`Unknown entity: ${entityName}`);
|
|
142
|
+
}
|
|
143
|
+
const entities = (_a = entityMap[entityName]) !== null && _a !== void 0 ? _a : [];
|
|
144
|
+
entityModelMap[entityName] = entities.map((entity) => exports.entityEnumToEntityModel[entityName](entity));
|
|
145
|
+
// entityMap[entityName as EntityEnum] = entityMap[
|
|
146
|
+
// entityName as EntityEnum
|
|
147
|
+
// ]?.map(
|
|
148
|
+
// (entity: any) =>
|
|
149
|
+
// // @ts-ignore
|
|
150
|
+
// entityEnumToEntityModel[entityName as EntityEnum]!(entity) as any
|
|
151
|
+
// );
|
|
152
|
+
}
|
|
153
|
+
return entityModelMap;
|
|
154
|
+
}
|
|
155
|
+
exports.entityMapToEntityModelMap = entityMapToEntityModelMap;
|
|
156
|
+
function entityModelMapToEntityModelIndexMap(entityModelMap, entityRelationsFor) {
|
|
157
|
+
const entityModelMapFromEntityMap = entityMapToEntityModelMap(entityModelMap);
|
|
158
|
+
const entityModelIndexMap = mapToIndex(entityModelMapFromEntityMap);
|
|
159
|
+
populateRelationsFor(entityModelIndexMap, entityRelationsFor);
|
|
160
|
+
return entityModelIndexMap;
|
|
161
|
+
}
|
|
162
|
+
exports.entityModelMapToEntityModelIndexMap = entityModelMapToEntityModelIndexMap;
|
|
163
|
+
function removeEntityById(entityModelIndexMap, entity, id) {
|
|
164
|
+
if (entityModelIndexMap[entity]) {
|
|
165
|
+
delete entityModelIndexMap[entity][id];
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.removeEntityById = removeEntityById;
|
|
169
|
+
class EntityModelRelationHelper {
|
|
170
|
+
constructor(entityMap) {
|
|
171
|
+
this.entityMap = entityMap;
|
|
172
|
+
this.entityModelMap = {};
|
|
173
|
+
this.entityModelIndexMap = {};
|
|
174
|
+
this.init();
|
|
175
|
+
}
|
|
176
|
+
init() {
|
|
177
|
+
this.toEntityModelMap();
|
|
178
|
+
this.toEntityModelIndexMap();
|
|
179
|
+
}
|
|
180
|
+
toEntityModelMap() {
|
|
181
|
+
for (const entityName in this.entityMap) {
|
|
182
|
+
if (!(entityName in exports.entityEnumToEntityModel)) {
|
|
183
|
+
throw new Error(`Unknown entity: ${entityName}`);
|
|
184
|
+
}
|
|
185
|
+
// @ts-ignore
|
|
186
|
+
this.entityModelMap[entityName] = this.entityMap[entityName].map((entity) => exports.entityEnumToEntityModel[entityName](entity));
|
|
187
|
+
}
|
|
188
|
+
return this;
|
|
189
|
+
}
|
|
190
|
+
fromEntityToEntityModel(entity, entityEnum) {
|
|
191
|
+
if (!(entityEnum in exports.entityEnumToEntityModel)) {
|
|
192
|
+
throw new Error(`Unknown entity: ${entityEnum}`);
|
|
193
|
+
}
|
|
194
|
+
return exports.entityEnumToEntityModel[entityEnum](entity);
|
|
195
|
+
}
|
|
196
|
+
toEntityModelIndexMap() {
|
|
197
|
+
this.entityModelIndexMap = Object.keys(this.entityModelMap).reduce((acc, key) => {
|
|
198
|
+
// @ts-ignore
|
|
199
|
+
acc[key] = this.entityModelMap[key].reduce((innerAcc, entity) => {
|
|
200
|
+
innerAcc[entity.id] = entity;
|
|
201
|
+
return innerAcc;
|
|
202
|
+
}, {});
|
|
203
|
+
return acc;
|
|
204
|
+
}, {});
|
|
205
|
+
return this;
|
|
206
|
+
}
|
|
207
|
+
populateRelationsByEntityEnums(entityEnums) {
|
|
208
|
+
entityEnums.forEach((entityEnum) => {
|
|
209
|
+
this.populateRelationsByEntityEnum(entityEnum);
|
|
210
|
+
});
|
|
211
|
+
return this;
|
|
212
|
+
}
|
|
213
|
+
populateRelationsByEntityEnum(entityEnum) {
|
|
214
|
+
for (const key of Object.keys(this.entityModelIndexMap[entityEnum] || {})) {
|
|
215
|
+
const entityModel = this
|
|
216
|
+
.entityModelIndexMap[entityEnum][key];
|
|
217
|
+
entityModel.populateRelationsByIndex(this.entityModelIndexMap);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
populateRelationsByEntityModel(entityModel) {
|
|
221
|
+
entityModel.populateRelationsByIndex(this.entityModelIndexMap);
|
|
222
|
+
}
|
|
223
|
+
addEntityModel(entityModel, config = { populateRelations: false }) {
|
|
224
|
+
const entityEnum = entityModel.entityName;
|
|
225
|
+
this.entityModelIndexMap[entityEnum] =
|
|
226
|
+
this.entityModelIndexMap[entityEnum] || {};
|
|
227
|
+
// @ts-ignore
|
|
228
|
+
this.entityModelIndexMap[entityEnum][entityModel.id] =
|
|
229
|
+
// @ts-ignore
|
|
230
|
+
entityModel;
|
|
231
|
+
if (config.populateRelations) {
|
|
232
|
+
this.populateRelationsByEntityModel(entityModel);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
addEntity(entity, entityEnum, config = { populateRelations: false }) {
|
|
236
|
+
if (!(entityEnum in exports.entityEnumToEntityModel)) {
|
|
237
|
+
throw new Error(`Unknown entity: ${entityEnum}`);
|
|
238
|
+
}
|
|
239
|
+
this.addEntityModel(this.fromEntityToEntityModel(entity, entityEnum), config);
|
|
240
|
+
}
|
|
241
|
+
updateEntityModel(entityModel, config = { populateRelations: false }) {
|
|
242
|
+
const entityEnum = entityModel.entityName;
|
|
243
|
+
this.entityModelIndexMap[entityEnum] =
|
|
244
|
+
this.entityModelIndexMap[entityEnum] || {};
|
|
245
|
+
// @ts-ignore
|
|
246
|
+
this.entityModelIndexMap[entityEnum][entityModel.id] =
|
|
247
|
+
// @ts-ignore
|
|
248
|
+
entityModel;
|
|
249
|
+
if (config.populateRelations) {
|
|
250
|
+
this.populateRelationsByEntityModel(entityModel);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
exports.EntityModelRelationHelper = EntityModelRelationHelper;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IBillingCycleObj } from "../../interface/selected-billing-cycle.interface";
|
|
2
2
|
export interface IPricingPlanModel {
|
|
3
3
|
id: number;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
effectiveFrom: number;
|
|
5
|
+
effectiveTo: number;
|
|
6
6
|
basePrice: number;
|
|
7
7
|
billingCycle: {
|
|
8
8
|
[key: string]: IBillingCycleObj;
|