ia-common 1.0.1-beta.98 → 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 -13
- 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 -15
- 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,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingCycleModel = exports.PricingPlanEntityModel = void 0;
|
|
4
|
+
const _model_1 = require("../@model");
|
|
5
|
+
class PricingPlanEntityModel {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
Object.assign(this, data);
|
|
8
|
+
}
|
|
9
|
+
toObject() {
|
|
10
|
+
const responseObj = {
|
|
11
|
+
id: this.id,
|
|
12
|
+
effectiveFromDate: 0,
|
|
13
|
+
effectiveToDate: 0,
|
|
14
|
+
basePrice: 0,
|
|
15
|
+
billingCycle: {},
|
|
16
|
+
};
|
|
17
|
+
const billingCycle = this.billingCycle.split(",");
|
|
18
|
+
billingCycle.forEach((billing, index) => {
|
|
19
|
+
const billingArray = billing.split("_");
|
|
20
|
+
responseObj.billingCycle[index] = {
|
|
21
|
+
noOfMonths: Number(billingArray[0]),
|
|
22
|
+
discount: billingArray[1],
|
|
23
|
+
value: parseFloat(billingArray[2]),
|
|
24
|
+
name: billingArray.slice(3).join("_"),
|
|
25
|
+
key: billingArray.slice(3).join("-").toLowerCase().replace(/ /g, "-"),
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
responseObj.effectiveFromDate = this.effectiveFrom;
|
|
29
|
+
responseObj.effectiveToDate = this.effectiveTo;
|
|
30
|
+
responseObj.basePrice = this.basePrice;
|
|
31
|
+
return responseObj;
|
|
32
|
+
}
|
|
33
|
+
static getBillingCycleString(billingCycle) {
|
|
34
|
+
const billingCycles = [];
|
|
35
|
+
Object.values(billingCycle).forEach((billing) => {
|
|
36
|
+
billingCycles.push(`${billing.noOfMonths}_${billing.discount}_${billing.value}_${billing.name}`);
|
|
37
|
+
});
|
|
38
|
+
return billingCycles.join(",");
|
|
39
|
+
}
|
|
40
|
+
static validateNoOfMonthsByBillingCycle(billingCycle) {
|
|
41
|
+
const billingCycleKeys = Object.keys(billingCycle);
|
|
42
|
+
let previousMonthCount = 0;
|
|
43
|
+
for (const key of billingCycleKeys) {
|
|
44
|
+
const billingCycleObj = billingCycle[key];
|
|
45
|
+
const currentMonthCount = billingCycleObj.noOfMonths;
|
|
46
|
+
if (previousMonthCount >= currentMonthCount && key != "0") {
|
|
47
|
+
throw new _model_1.AppBadRequestException({
|
|
48
|
+
key: `noOfMonths.${key}`,
|
|
49
|
+
message: [
|
|
50
|
+
`No of months at index ${key} should be greater than ${previousMonthCount}`,
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
previousMonthCount = currentMonthCount;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
static validateBillingCycleIndexByBillingCycle(billingCycle) {
|
|
58
|
+
const billingCycleKeys = Object.keys(billingCycle);
|
|
59
|
+
for (let i = 0; i < billingCycleKeys.length; i++) {
|
|
60
|
+
const billingCycleIndex = Number(billingCycleKeys[i]);
|
|
61
|
+
if (billingCycleIndex !== 0) {
|
|
62
|
+
const recentBillingCycleIndex = Number(billingCycleKeys[i - 1]);
|
|
63
|
+
if (recentBillingCycleIndex !== billingCycleIndex - 1) {
|
|
64
|
+
throw new _model_1.AppBadRequestException({
|
|
65
|
+
key: `billingCycleIndex.${billingCycleIndex}`,
|
|
66
|
+
message: [
|
|
67
|
+
`billingCycleIndex should be ${recentBillingCycleIndex + 1} at index ${billingCycleIndex}`,
|
|
68
|
+
],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.PricingPlanEntityModel = PricingPlanEntityModel;
|
|
76
|
+
class BillingCycleModel {
|
|
77
|
+
constructor(code) {
|
|
78
|
+
this.code = code;
|
|
79
|
+
this.parse();
|
|
80
|
+
}
|
|
81
|
+
parse() {
|
|
82
|
+
const billingCycleComponents = this.code.split("_");
|
|
83
|
+
this.noOfMonths = Number(billingCycleComponents[0]);
|
|
84
|
+
this.discount = billingCycleComponents[1];
|
|
85
|
+
this.name = billingCycleComponents[2];
|
|
86
|
+
this.key = this.getKey();
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
getDiscount() {
|
|
90
|
+
if (this.discount.indexOf("P") > -1) {
|
|
91
|
+
return parseFloat(this.discount.replace("P", ""));
|
|
92
|
+
}
|
|
93
|
+
return 0;
|
|
94
|
+
}
|
|
95
|
+
getKey() {
|
|
96
|
+
return this.name.toLowerCase().replace(" ", "-");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.BillingCycleModel = BillingCycleModel;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PricingPlanModel = void 0;
|
|
4
|
+
const _utils_1 = require("../@utils");
|
|
5
|
+
const app_badrequest_exception_1 = require("../exception/app-badrequest.exception");
|
|
6
|
+
class PricingPlanModel {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
Object.assign(this, data);
|
|
9
|
+
}
|
|
10
|
+
getBillingCycleKeys() {
|
|
11
|
+
return Object.values(this.billingCycle).map((billingCycleObj) => billingCycleObj.key);
|
|
12
|
+
}
|
|
13
|
+
validateBillingCycleKey(key) {
|
|
14
|
+
if (!this.getBillingCycleKeys().includes(key)) {
|
|
15
|
+
throw new app_badrequest_exception_1.AppBadRequestException({
|
|
16
|
+
key: "type",
|
|
17
|
+
message: [
|
|
18
|
+
`subscription with type:'${key}' is wrong,type should be one of the ${this.getBillingCycleKeys()}`,
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
getNoOfSubscriptionDays(type) {
|
|
24
|
+
this.validateBillingCycleKey(type);
|
|
25
|
+
const billingCycleModel = this.getBillCycleByKey(type);
|
|
26
|
+
return billingCycleModel.noOfMonths * 30 - 1;
|
|
27
|
+
}
|
|
28
|
+
getBillCycleByKey(type) {
|
|
29
|
+
this.validateBillingCycleKey(type);
|
|
30
|
+
return Object.values(this.billingCycle).filter((billingCycleObj) => billingCycleObj.key === type)[0];
|
|
31
|
+
}
|
|
32
|
+
getToDateCode(fromDateCode, billingCycleKey) {
|
|
33
|
+
this.validateBillingCycleKey(billingCycleKey);
|
|
34
|
+
const copyFromDateCode = fromDateCode;
|
|
35
|
+
const newSubscriptionToDate = new Date(_utils_1.dateUtil.convertStringToDate(String(copyFromDateCode)));
|
|
36
|
+
newSubscriptionToDate.setDate(newSubscriptionToDate.getDate() +
|
|
37
|
+
this.getNoOfSubscriptionDays(billingCycleKey));
|
|
38
|
+
return Number(_utils_1.dateUtil.getDateCode(newSubscriptionToDate));
|
|
39
|
+
}
|
|
40
|
+
validateGetToDateCode(fromDateCode, toDateCode, billingCycleKey) {
|
|
41
|
+
const calculatedToDateCode = this.getToDateCode(fromDateCode, billingCycleKey);
|
|
42
|
+
if (calculatedToDateCode != Number(toDateCode)) {
|
|
43
|
+
throw new app_badrequest_exception_1.AppBadRequestException({
|
|
44
|
+
key: "to",
|
|
45
|
+
message: [
|
|
46
|
+
`calculated to Date:'${calculatedToDateCode}' is not matches with to date you entered`,
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return calculatedToDateCode;
|
|
51
|
+
}
|
|
52
|
+
getFromToDateCode(billingCycleKey, offset = 0) {
|
|
53
|
+
const fromDateCode = Number(_utils_1.dateUtil.addNDaysToDateCode(_utils_1.dateUtil.getTodayCode(), offset));
|
|
54
|
+
const toDateCode = this.getToDateCode(fromDateCode, billingCycleKey);
|
|
55
|
+
return {
|
|
56
|
+
fromDateCode,
|
|
57
|
+
toDateCode,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.PricingPlanModel = PricingPlanModel;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscribedPricingPlanModel = void 0;
|
|
4
|
+
const _model_1 = require("../@model");
|
|
5
|
+
const _utils_1 = require("../@utils");
|
|
6
|
+
class SubscribedPricingPlanModel {
|
|
7
|
+
constructor(data, billingCycleKey) {
|
|
8
|
+
this.basePrice = data.basePrice;
|
|
9
|
+
this.billingCycleKey = billingCycleKey;
|
|
10
|
+
this.selectedBillingCycle = data.getBillCycleByKey(billingCycleKey);
|
|
11
|
+
this.pricingPlanModel = data;
|
|
12
|
+
}
|
|
13
|
+
getGrossAmount(config = { roundDown: false }) {
|
|
14
|
+
const { roundDown } = config;
|
|
15
|
+
if (roundDown) {
|
|
16
|
+
return Math.floor(this.basePrice * this.selectedBillingCycle.noOfMonths);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return Math.round(this.basePrice * this.selectedBillingCycle.noOfMonths);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
getNextBillingCycleDateRange() {
|
|
23
|
+
const subscriptionDays = this.pricingPlanModel.getNoOfSubscriptionDays(this.billingCycleKey);
|
|
24
|
+
const date = _utils_1.dateUtil.addNDaysToDateCode(_utils_1.dateUtil.getDateCode(new Date()), subscriptionDays);
|
|
25
|
+
return { subscriptionDays, date };
|
|
26
|
+
}
|
|
27
|
+
getNetAmount(config = { roundDown: false }) {
|
|
28
|
+
const { roundDown } = config;
|
|
29
|
+
if (roundDown) {
|
|
30
|
+
return Math.floor(this.selectedBillingCycle.value * this.selectedBillingCycle.noOfMonths);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return Math.round(this.selectedBillingCycle.value * this.selectedBillingCycle.noOfMonths);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
getBillingDiscount() {
|
|
37
|
+
if (this.selectedBillingCycle.discount.indexOf("P") > -1) {
|
|
38
|
+
return parseFloat(this.selectedBillingCycle.discount.replace("P", ""));
|
|
39
|
+
}
|
|
40
|
+
return 0;
|
|
41
|
+
}
|
|
42
|
+
validateGrossAmount(grossAmount, config) {
|
|
43
|
+
const calculatedGrossAmount = this.getGrossAmount(config);
|
|
44
|
+
if (Math.abs(calculatedGrossAmount - grossAmount) > 1) {
|
|
45
|
+
throw new _model_1.AppBadRequestException({
|
|
46
|
+
key: `grossAmount`,
|
|
47
|
+
message: [
|
|
48
|
+
`calculated gross amount:'${calculatedGrossAmount}' is not matches with grossAmount you entered`,
|
|
49
|
+
],
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return calculatedGrossAmount;
|
|
53
|
+
}
|
|
54
|
+
validateNetAmount(netAmount, config) {
|
|
55
|
+
const calculatedNetAmount = this.getNetAmount(config);
|
|
56
|
+
if (calculatedNetAmount !== netAmount) {
|
|
57
|
+
throw new _model_1.AppBadRequestException({
|
|
58
|
+
key: `netAmount`,
|
|
59
|
+
message: [
|
|
60
|
+
`calculated net amount:'${calculatedNetAmount}' is not matches with netAmount ${netAmount} you entered`,
|
|
61
|
+
],
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return calculatedNetAmount;
|
|
65
|
+
}
|
|
66
|
+
validateGetBillingCycleDiscount(discount) {
|
|
67
|
+
if (Number(discount.replace("P", "")) !== this.getBillingDiscount()) {
|
|
68
|
+
throw new _model_1.AppBadRequestException({
|
|
69
|
+
key: "discount",
|
|
70
|
+
message: [
|
|
71
|
+
`calculated discount:'${this.getBillingDiscount()}' is not matches with discount you entered`,
|
|
72
|
+
],
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return this.getBillingDiscount();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.SubscribedPricingPlanModel = SubscribedPricingPlanModel;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SubscriptionEntityModel = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const _model_1 = require("../@model");
|
|
5
|
+
class SubscriptionEntityModel {
|
|
6
|
+
constructor(subscriptionEntity) {
|
|
7
7
|
Object.assign(this, subscriptionEntity);
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
static getEntityInstanceByICreateSubscriptionRequestUserEntity(body, userEntity, status, pricingPlanId) {
|
|
10
10
|
var _a;
|
|
11
|
-
|
|
11
|
+
const subscriptionEntity = {};
|
|
12
12
|
subscriptionEntity.organizationId = userEntity.organizationId;
|
|
13
13
|
subscriptionEntity.fromDateCode = body.from;
|
|
14
14
|
subscriptionEntity.toDateCode = body.to;
|
|
@@ -26,15 +26,14 @@ var SubscriptionEntityModel = /** @class */ (function () {
|
|
|
26
26
|
subscriptionEntity.pricingPlanId = pricingPlanId;
|
|
27
27
|
subscriptionEntity.registrationId = userEntity.registrationId;
|
|
28
28
|
return subscriptionEntity;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (isAmountPaidValidation === void 0) { isAmountPaidValidation = false; }
|
|
29
|
+
}
|
|
30
|
+
validateAdvanceAmount(isAmountPaidValidation = false) {
|
|
32
31
|
if (this.amountPaid > this.netAmount) {
|
|
33
32
|
if (isAmountPaidValidation) {
|
|
34
33
|
throw new _model_1.AppBadRequestException({
|
|
35
34
|
key: "amountPaid",
|
|
36
35
|
message: [
|
|
37
|
-
|
|
36
|
+
`amount paid ${this.amountPaid} is not equal to net amount ${this.netAmount}`,
|
|
38
37
|
],
|
|
39
38
|
});
|
|
40
39
|
}
|
|
@@ -42,12 +41,14 @@ var SubscriptionEntityModel = /** @class */ (function () {
|
|
|
42
41
|
throw new _model_1.AppBadRequestException({
|
|
43
42
|
key: "advanceAmount",
|
|
44
43
|
message: [
|
|
45
|
-
|
|
44
|
+
`advance should not greater than net amount:'${this.netAmount}'`,
|
|
46
45
|
],
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
}
|
|
50
|
+
static filterByOrganizationId(subScriptionEntities, organizationId) {
|
|
51
|
+
return subScriptionEntities.filter((subScriptionEntity) => subScriptionEntity.organizationId === organizationId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
53
54
|
exports.SubscriptionEntityModel = SubscriptionEntityModel;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserEntityModel = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const _enum_1 = require("../@enum");
|
|
5
|
+
class UserEntityModel {
|
|
6
|
+
constructor(userEntity) {
|
|
7
7
|
Object.assign(this, userEntity);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
static getEntityInstanceByRegistrationEntityOrganizationId(registrationEntity, hashPassword, organizationId) {
|
|
10
|
+
const userEntity = {};
|
|
11
11
|
userEntity.firstname = registrationEntity.name;
|
|
12
12
|
userEntity.email = registrationEntity.email;
|
|
13
13
|
userEntity.phone = registrationEntity.contact;
|
|
@@ -25,12 +25,11 @@ var UserEntityModel = /** @class */ (function () {
|
|
|
25
25
|
userEntity.registrationId = registrationEntity.id;
|
|
26
26
|
userEntity.organizationId = organizationId;
|
|
27
27
|
return userEntity;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return userEntities.filter(
|
|
28
|
+
}
|
|
29
|
+
static filterByOrganizationId(userEntities, organizationId) {
|
|
30
|
+
return userEntities.filter((userEntity) => {
|
|
31
31
|
return userEntity.organizationId === organizationId;
|
|
32
32
|
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
}());
|
|
33
|
+
}
|
|
34
|
+
}
|
|
36
35
|
exports.UserEntityModel = UserEntityModel;
|
|
File without changes
|