ia-common 1.1.1-beta.22 → 1.1.1-beta.24
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 +1 -34
- package/build/src/@enum.js +1 -34
- package/build/src/enum/error.key.enum.d.ts +2 -1
- package/build/src/enum/error.key.enum.js +1 -0
- package/build/src/enum/index.d.ts +34 -0
- package/build/src/enum/index.js +50 -0
- package/build/src/interface/api/configuration-update-dto.interface.d.ts +1 -1
- 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 +1 -1
- package/build/src/interface/api/equity-advice-create-dto.interface.d.ts +1 -1
- package/build/src/interface/api/equity-advice-update-dto..d.ts +1 -1
- package/build/src/interface/api/get-cron-job-by-date-range.interface.d.ts +1 -1
- package/build/src/interface/api/get-staff-members.interface.d.ts +1 -1
- package/build/src/interface/api/manual-trigger-cron-job.interface.d.ts +1 -1
- package/build/src/interface/api/mutual-funds-create-dto.interface.d.ts +1 -1
- package/build/src/interface/api/nfo-advice-update-dto.interface.d.ts +1 -1
- package/build/src/interface/api/organization-update-dto.interface.d.ts +1 -1
- package/build/src/interface/api/update-corporate-action-advice.interface.d.ts +1 -1
- package/build/src/interface/api/update-corporate-action.interface.d.ts +1 -1
- package/build/src/interface/corporate-actions/buy-back-corporate-actions.interface.d.ts +1 -1
- package/build/src/interface/corporate-actions/ipo-corporate-action.interface.d.ts +1 -1
- package/build/src/interface/corporate-actions/split-bonus-corporate-action.interface.d.ts +1 -1
- package/build/src/interface/entity/advice-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/advisor-user-mapping-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/configurations-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/corporate-action-advice-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/cron-job-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/equity-advice-in-process-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/mutual-fund-advice-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/mutual-funds-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/nfo-advice-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/nfo-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/permission.entity.interface.d.ts +1 -2
- package/build/src/interface/entity/pricing-plan-entity.interface.d.ts +1 -1
- package/build/src/interface/entity/relation-config.interface.d.ts +1 -1
- package/build/src/interface/entity/subscription-entity.interface.d.ts +1 -1
- package/build/src/model/corporate-actions/buy-back-corporate-action-model.d.ts +2 -2
- package/build/src/model/corporate-actions/buy-back-corporate-action-model.js +1 -1
- package/build/src/model/corporate-actions/corporate-actions-advice-model.d.ts +1 -1
- package/build/src/model/corporate-actions/corporate-actions-advice-model.js +3 -3
- package/build/src/model/corporate-actions/ipo-corporate-action-model.d.ts +1 -1
- package/build/src/model/mutual-funds-entity.model.d.ts +1 -1
- package/build/src/model/mutual-funds-entity.model.js +2 -2
- package/build/src/model/nfo-advice-entity.model.d.ts +1 -1
- package/build/src/model/nfo-advice-entity.model.js +3 -3
- package/build/src/model/nfo-entity.model.d.ts +1 -1
- package/build/src/model/nfo-entity.model.js +2 -2
- package/build/src/utils/helper.fn.utils.d.ts +16 -0
- package/build/src/utils/helper.fn.utils.js +59 -1
- package/package.json +3 -2
package/build/src/@enum.d.ts
CHANGED
|
@@ -1,34 +1 @@
|
|
|
1
|
-
export * from "./enum
|
|
2
|
-
export * from "./enum/organization/organization-type.enum";
|
|
3
|
-
export * from "./enum/user/registration-status.enum";
|
|
4
|
-
export * from "./enum/user/user-role.enum";
|
|
5
|
-
export * from "./enum/user/user-status.enum";
|
|
6
|
-
export * from "./enum/organization/pricing-plan-status.enum";
|
|
7
|
-
export * from "./enum/organization/subscription-status.enum";
|
|
8
|
-
export * from "./enum/equity/advice-status.enum";
|
|
9
|
-
export * from "./enum/equity/advice-type.enum";
|
|
10
|
-
export * from "./enum/equity/investment-duration-type.enum";
|
|
11
|
-
export * from "./enum/equity/transaction-type.enum";
|
|
12
|
-
export * from "./enum/mutual-fund/mutual-funds-risk.enum";
|
|
13
|
-
export * from "./enum/mutual-fund/mutual-funds-type.enum";
|
|
14
|
-
export * from "./enum/user/owner-operation-type.enum";
|
|
15
|
-
export * from "./enum/mutual-fund/mutual-fund-advice-duration.enum";
|
|
16
|
-
export * from "./enum/mutual-fund/mutual-fund-advice-type.enum";
|
|
17
|
-
export * from "./enum/corporate-actions/corporate-actions-advice-transaction-type.enum";
|
|
18
|
-
export * from "./enum/corporate-actions/ipo-listing-exchange.enum";
|
|
19
|
-
export * from "./enum/corporate-actions/split-and-bonus-stock-order.enum";
|
|
20
|
-
export * from "./enum/corporate-actions/corporate-actions-status.enum";
|
|
21
|
-
export * from "./enum/kafka-topics.enum";
|
|
22
|
-
export * from "./enum/corporate-actions/buy-back-type.enum";
|
|
23
|
-
export * from "./enum/equity/advisor-user-mapping-type.enum";
|
|
24
|
-
export * from "./enum/mutual-fund/mutual-fund-status.enum";
|
|
25
|
-
export * from "./enum/mutual-fund/nfo-advice-transaction-type.enum";
|
|
26
|
-
export * from "./enum/configuration.enum";
|
|
27
|
-
export * from "./enum/corporate-actions/corporate-action-advice-status.enum";
|
|
28
|
-
export * from "./enum/cron-job.enum";
|
|
29
|
-
export * from "./enum/mutual-fund/nfo-advice-status.enum";
|
|
30
|
-
export * from "./enum/time-zone.enum";
|
|
31
|
-
export * from "./enum/relation-type.enum";
|
|
32
|
-
export * from "./enum/error.key.enum";
|
|
33
|
-
export * from "./enum/permission-actions.enum";
|
|
34
|
-
export * from "./enum/corporate-actions/corporate-actions-type.enum";
|
|
1
|
+
export * from "./enum";
|
package/build/src/@enum.js
CHANGED
|
@@ -14,37 +14,4 @@ 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("./enum
|
|
18
|
-
__exportStar(require("./enum/organization/organization-type.enum"), exports);
|
|
19
|
-
__exportStar(require("./enum/user/registration-status.enum"), exports);
|
|
20
|
-
__exportStar(require("./enum/user/user-role.enum"), exports);
|
|
21
|
-
__exportStar(require("./enum/user/user-status.enum"), exports);
|
|
22
|
-
__exportStar(require("./enum/organization/pricing-plan-status.enum"), exports);
|
|
23
|
-
__exportStar(require("./enum/organization/subscription-status.enum"), exports);
|
|
24
|
-
__exportStar(require("./enum/equity/advice-status.enum"), exports);
|
|
25
|
-
__exportStar(require("./enum/equity/advice-type.enum"), exports);
|
|
26
|
-
__exportStar(require("./enum/equity/investment-duration-type.enum"), exports);
|
|
27
|
-
__exportStar(require("./enum/equity/transaction-type.enum"), exports);
|
|
28
|
-
__exportStar(require("./enum/mutual-fund/mutual-funds-risk.enum"), exports);
|
|
29
|
-
__exportStar(require("./enum/mutual-fund/mutual-funds-type.enum"), exports);
|
|
30
|
-
__exportStar(require("./enum/user/owner-operation-type.enum"), exports);
|
|
31
|
-
__exportStar(require("./enum/mutual-fund/mutual-fund-advice-duration.enum"), exports);
|
|
32
|
-
__exportStar(require("./enum/mutual-fund/mutual-fund-advice-type.enum"), exports);
|
|
33
|
-
__exportStar(require("./enum/corporate-actions/corporate-actions-advice-transaction-type.enum"), exports);
|
|
34
|
-
__exportStar(require("./enum/corporate-actions/ipo-listing-exchange.enum"), exports);
|
|
35
|
-
__exportStar(require("./enum/corporate-actions/split-and-bonus-stock-order.enum"), exports);
|
|
36
|
-
__exportStar(require("./enum/corporate-actions/corporate-actions-status.enum"), exports);
|
|
37
|
-
__exportStar(require("./enum/kafka-topics.enum"), exports);
|
|
38
|
-
__exportStar(require("./enum/corporate-actions/buy-back-type.enum"), exports);
|
|
39
|
-
__exportStar(require("./enum/equity/advisor-user-mapping-type.enum"), exports);
|
|
40
|
-
__exportStar(require("./enum/mutual-fund/mutual-fund-status.enum"), exports);
|
|
41
|
-
__exportStar(require("./enum/mutual-fund/nfo-advice-transaction-type.enum"), exports);
|
|
42
|
-
__exportStar(require("./enum/configuration.enum"), exports);
|
|
43
|
-
__exportStar(require("./enum/corporate-actions/corporate-action-advice-status.enum"), exports);
|
|
44
|
-
__exportStar(require("./enum/cron-job.enum"), exports);
|
|
45
|
-
__exportStar(require("./enum/mutual-fund/nfo-advice-status.enum"), exports);
|
|
46
|
-
__exportStar(require("./enum/time-zone.enum"), exports);
|
|
47
|
-
__exportStar(require("./enum/relation-type.enum"), exports);
|
|
48
|
-
__exportStar(require("./enum/error.key.enum"), exports);
|
|
49
|
-
__exportStar(require("./enum/permission-actions.enum"), exports);
|
|
50
|
-
__exportStar(require("./enum/corporate-actions/corporate-actions-type.enum"), exports);
|
|
17
|
+
__exportStar(require("./enum"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export * from "./organization/organization-status.enum";
|
|
2
|
+
export * from "./organization/organization-type.enum";
|
|
3
|
+
export * from "./user/user-role.enum";
|
|
4
|
+
export * from "./user/user-status.enum";
|
|
5
|
+
export * from "./organization/pricing-plan-status.enum";
|
|
6
|
+
export * from "./organization/subscription-status.enum";
|
|
7
|
+
export * from "./equity/advice-status.enum";
|
|
8
|
+
export * from "./equity/advice-type.enum";
|
|
9
|
+
export * from "./equity/investment-duration-type.enum";
|
|
10
|
+
export * from "./equity/transaction-type.enum";
|
|
11
|
+
export * from "./mutual-fund/mutual-funds-risk.enum";
|
|
12
|
+
export * from "./mutual-fund/mutual-funds-type.enum";
|
|
13
|
+
export * from "./user/owner-operation-type.enum";
|
|
14
|
+
export * from "./mutual-fund/mutual-fund-advice-duration.enum";
|
|
15
|
+
export * from "./mutual-fund/mutual-fund-advice-type.enum";
|
|
16
|
+
export * from "./corporate-actions/corporate-actions-advice-transaction-type.enum";
|
|
17
|
+
export * from "./corporate-actions/ipo-listing-exchange.enum";
|
|
18
|
+
export * from "./corporate-actions/split-and-bonus-stock-order.enum";
|
|
19
|
+
export * from "./corporate-actions/corporate-actions-status.enum";
|
|
20
|
+
export * from "./kafka-topics.enum";
|
|
21
|
+
export * from "./corporate-actions/buy-back-type.enum";
|
|
22
|
+
export * from "./equity/advisor-user-mapping-type.enum";
|
|
23
|
+
export * from "./mutual-fund/mutual-fund-status.enum";
|
|
24
|
+
export * from "./mutual-fund/nfo-advice-transaction-type.enum";
|
|
25
|
+
export * from "./configuration.enum";
|
|
26
|
+
export * from "./corporate-actions/corporate-action-advice-status.enum";
|
|
27
|
+
export * from "./cron-job.enum";
|
|
28
|
+
export * from "./mutual-fund/nfo-advice-status.enum";
|
|
29
|
+
export * from "./time-zone.enum";
|
|
30
|
+
export * from "./relation-type.enum";
|
|
31
|
+
export * from "./error.key.enum";
|
|
32
|
+
export * from "./permission-actions.enum";
|
|
33
|
+
export * from "./corporate-actions/corporate-actions-type.enum";
|
|
34
|
+
export * from "./user/registration-status.enum";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./organization/organization-status.enum"), exports);
|
|
18
|
+
__exportStar(require("./organization/organization-type.enum"), exports);
|
|
19
|
+
__exportStar(require("./user/user-role.enum"), exports);
|
|
20
|
+
__exportStar(require("./user/user-status.enum"), exports);
|
|
21
|
+
__exportStar(require("./organization/pricing-plan-status.enum"), exports);
|
|
22
|
+
__exportStar(require("./organization/subscription-status.enum"), exports);
|
|
23
|
+
__exportStar(require("./equity/advice-status.enum"), exports);
|
|
24
|
+
__exportStar(require("./equity/advice-type.enum"), exports);
|
|
25
|
+
__exportStar(require("./equity/investment-duration-type.enum"), exports);
|
|
26
|
+
__exportStar(require("./equity/transaction-type.enum"), exports);
|
|
27
|
+
__exportStar(require("./mutual-fund/mutual-funds-risk.enum"), exports);
|
|
28
|
+
__exportStar(require("./mutual-fund/mutual-funds-type.enum"), exports);
|
|
29
|
+
__exportStar(require("./user/owner-operation-type.enum"), exports);
|
|
30
|
+
__exportStar(require("./mutual-fund/mutual-fund-advice-duration.enum"), exports);
|
|
31
|
+
__exportStar(require("./mutual-fund/mutual-fund-advice-type.enum"), exports);
|
|
32
|
+
__exportStar(require("./corporate-actions/corporate-actions-advice-transaction-type.enum"), exports);
|
|
33
|
+
__exportStar(require("./corporate-actions/ipo-listing-exchange.enum"), exports);
|
|
34
|
+
__exportStar(require("./corporate-actions/split-and-bonus-stock-order.enum"), exports);
|
|
35
|
+
__exportStar(require("./corporate-actions/corporate-actions-status.enum"), exports);
|
|
36
|
+
__exportStar(require("./kafka-topics.enum"), exports);
|
|
37
|
+
__exportStar(require("./corporate-actions/buy-back-type.enum"), exports);
|
|
38
|
+
__exportStar(require("./equity/advisor-user-mapping-type.enum"), exports);
|
|
39
|
+
__exportStar(require("./mutual-fund/mutual-fund-status.enum"), exports);
|
|
40
|
+
__exportStar(require("./mutual-fund/nfo-advice-transaction-type.enum"), exports);
|
|
41
|
+
__exportStar(require("./configuration.enum"), exports);
|
|
42
|
+
__exportStar(require("./corporate-actions/corporate-action-advice-status.enum"), exports);
|
|
43
|
+
__exportStar(require("./cron-job.enum"), exports);
|
|
44
|
+
__exportStar(require("./mutual-fund/nfo-advice-status.enum"), exports);
|
|
45
|
+
__exportStar(require("./time-zone.enum"), exports);
|
|
46
|
+
__exportStar(require("./relation-type.enum"), exports);
|
|
47
|
+
__exportStar(require("./error.key.enum"), exports);
|
|
48
|
+
__exportStar(require("./permission-actions.enum"), exports);
|
|
49
|
+
__exportStar(require("./corporate-actions/corporate-actions-type.enum"), exports);
|
|
50
|
+
__exportStar(require("./user/registration-status.enum"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CorporateActionsTransactionType } from "
|
|
1
|
+
import { CorporateActionsTransactionType } from "../../enum";
|
|
2
2
|
import { IAdviceFileDocuments } from "../advice-file-documents.interface";
|
|
3
3
|
import { ICorporateActionsAdviceEntity } from "../entity";
|
|
4
4
|
export interface ICreateCorporateActionAdviceResponse extends ICorporateActionsAdviceEntity {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserStatus } from "
|
|
1
|
+
import { UserStatus } from "../../enum";
|
|
2
2
|
import { IEntityCreateDto, IUserEntity } from "../entity";
|
|
3
3
|
export type IUserCreateDtoExclude = "status" | "isEmailVerified" | "isMobileVerified" | "isAccountVerified" | "requireNewPassword" | "type" | "registrationId" | "organizationId" | "imageUrl" | "documentUrls" | "password" | "panNo";
|
|
4
4
|
export interface IUserCreateDto extends IEntityCreateDto<Omit<IUserEntity, IUserCreateDtoExclude>> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdviceTransactionType, InvestDurationType } from "
|
|
1
|
+
import { AdviceTransactionType, InvestDurationType } from "../../enum";
|
|
2
2
|
import { IEquityAdviceEntity } from "../entity";
|
|
3
3
|
import { IFiles } from "./bank-details-create-dto..interface";
|
|
4
4
|
export interface IEquityAdviceCreateDto {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdviceTransactionType, AdviceType, InvestDurationType } from "
|
|
1
|
+
import { AdviceTransactionType, AdviceType, InvestDurationType } from "../../enum";
|
|
2
2
|
import { IEquityAdviceEntity } from "../entity";
|
|
3
3
|
export interface IEquityAdviceUpdateDto {
|
|
4
4
|
type?: AdviceType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MutualFundsType } from "../../@enum";
|
|
2
1
|
import { EntityEnum, EnumEntityType, IEntityCreateDto, IFiles } from "../../@type";
|
|
2
|
+
import { MutualFundsType } from "../../enum";
|
|
3
3
|
export interface IAddMutualFundsRequest {
|
|
4
4
|
mutualFundsType: MutualFundsType;
|
|
5
5
|
files: IFiles[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NFOAdviceStatus } from "
|
|
1
|
+
import { NFOAdviceStatus } from "../../enum";
|
|
2
2
|
import { EntityEnum, EnumEntityType, IEntityUpdateDto, INFOAdviceEntity } from "../entity";
|
|
3
3
|
import { INFOAdviceDtoExclude, INFOAdviceDtoInclude } from "./nfo-advice-create-dto.interface";
|
|
4
4
|
export type INFOAdviceUpdateDtoExclude = INFOAdviceDtoExclude;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OrganizationStatus } from "../../@enum";
|
|
2
1
|
import { IEntityUpdateDto, IOrganizationDtoExclude, IOrganizationEntity, IUserInfo } from "../../@type";
|
|
2
|
+
import { OrganizationStatus } from "../../enum";
|
|
3
3
|
export interface IUpdateOrganizationResponse extends IOrganizationEntity {
|
|
4
4
|
imageUrl?: string;
|
|
5
5
|
owners?: IUserInfo[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CorporateActionAdviceStatus, CorporateActionsTransactionType } from "
|
|
1
|
+
import { CorporateActionAdviceStatus, CorporateActionsTransactionType } from "../../enum";
|
|
2
2
|
import { IAdviceFileDocuments } from "../advice-file-documents.interface";
|
|
3
3
|
import { ICorporateActionsAdviceEntity } from "../entity";
|
|
4
4
|
export interface ICorporateActionAdviceUpdateDto extends IAdviceFileDocuments {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CorporateActionsStatus } from "
|
|
1
|
+
import { CorporateActionsStatus } from "../../enum";
|
|
2
2
|
import { ICorporateActionsEntity } from "../entity";
|
|
3
3
|
import { IModifyEntity } from "../modify-entity.interface";
|
|
4
4
|
export interface IUpdateCorporateActionsRequest {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OrderOfSplitAndBonusStock } from "../../@enum";
|
|
2
1
|
import { IBonusStockData, ISplitStockData } from "../../@type";
|
|
2
|
+
import { OrderOfSplitAndBonusStock } from "../../enum";
|
|
3
3
|
export interface ISplitBonusCorporateActionCreateDtoData {
|
|
4
4
|
splitStock: ISplitStockData;
|
|
5
5
|
bonusStock: IBonusStockData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdviceStatus, AdviceTransactionType, AdviceType, InvestDurationType } from "
|
|
1
|
+
import { AdviceStatus, AdviceTransactionType, AdviceType, InvestDurationType } from "../../enum";
|
|
2
2
|
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
3
|
export interface IEquityAdviceEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CorporateActionAdviceStatus, CorporateActionsTransactionType } from "../../@enum";
|
|
2
1
|
import { IAuditColumnEntity } from "../../@type";
|
|
2
|
+
import { CorporateActionAdviceStatus, CorporateActionsTransactionType } from "../../enum";
|
|
3
3
|
export interface ICorporateActionsAdviceEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
corporateActionId: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CronJobsNames, CronJobsStatus } from "
|
|
1
|
+
import { CronJobsNames, CronJobsStatus } from "../../enum";
|
|
2
2
|
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
3
|
export interface ICronJobsEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MutualFundAdviceDuration, MutualFundStatus, MutualFundTransactionType } from "
|
|
1
|
+
import { MutualFundAdviceDuration, MutualFundStatus, MutualFundTransactionType } from "../../enum";
|
|
2
2
|
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
3
|
export interface IMutualFundAdviceEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NFOAdviceStatus, NFOAdviceTransactionType } from "
|
|
1
|
+
import { NFOAdviceStatus, NFOAdviceTransactionType } from "../../enum";
|
|
2
2
|
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
3
|
export interface INFOAdviceEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { PermissionActionGroup } from "../../@enum";
|
|
2
1
|
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
2
|
import { EntityEnum, IEntitySearch } from "./entity-utils.interface";
|
|
4
3
|
export interface IPermissionEntity extends IAuditColumnEntity {
|
|
5
4
|
id: number;
|
|
6
5
|
name: string;
|
|
7
6
|
description?: string;
|
|
8
|
-
group:
|
|
7
|
+
group: string;
|
|
9
8
|
priority: number;
|
|
10
9
|
}
|
|
11
10
|
export type IPermissionEntityFilterData = IEntitySearch<EntityEnum.PERMISSION>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RelationType } from "
|
|
1
|
+
import { RelationType } from "../../enum";
|
|
2
2
|
import { EntityEnum, EnumEntityType } from "./entity-utils.interface";
|
|
3
3
|
type SourcePath<T> = (keyof T & string) | `${string}.${string}`;
|
|
4
4
|
export type IRelationConfig<T extends EntityEnum, K extends EnumEntityType<EntityEnum>> = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IBuyBackCorporateActionCreateDtoData, ICorporateActionsEntity, ICorporateEntityOmitData } from "../../@type";
|
|
2
|
+
import { BuyBackType } from "../../enum";
|
|
2
3
|
import { CorporateActionsStatus } from "../../enum/corporate-actions/corporate-actions-status.enum";
|
|
3
4
|
import { CorporateActionsType } from "../../enum/corporate-actions/corporate-actions-type.enum";
|
|
4
|
-
import { IBuyBackCorporateActionCreateDtoData, ICorporateActionsEntity, ICorporateEntityOmitData } from "../../@type";
|
|
5
5
|
export declare class BuyBackCorporateActionModel implements IBuyBackCorporateActionCreateDtoData, ICorporateEntityOmitData {
|
|
6
6
|
priceRange: string;
|
|
7
7
|
startDate: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BuyBackCorporateActionModel = void 0;
|
|
4
|
-
const corporate_actions_type_enum_1 = require("../../enum/corporate-actions/corporate-actions-type.enum");
|
|
5
4
|
const _utils_1 = require("../../@utils");
|
|
5
|
+
const corporate_actions_type_enum_1 = require("../../enum/corporate-actions/corporate-actions-type.enum");
|
|
6
6
|
class BuyBackCorporateActionModel {
|
|
7
7
|
constructor(entity) {
|
|
8
8
|
_utils_1.ValidateUtils.validateCorporateActionType(entity.type, corporate_actions_type_enum_1.CorporateActionsType.BUY_BACK);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CorporateActionAdviceStatus, CorporateActionsTransactionType } from "../../@enum";
|
|
2
1
|
import { EntityEnum, ICorporateActionsAdviceEntity } from "../../@type";
|
|
2
|
+
import { CorporateActionAdviceStatus, CorporateActionsTransactionType } from "../../enum";
|
|
3
3
|
import { BaseEntityModel } from "../base.entity.model";
|
|
4
4
|
export declare class CorporateActionsAdviceEntityModel extends BaseEntityModel<EntityEnum.CORPORATE_ACTIONS_ADVICE> implements ICorporateActionsAdviceEntity {
|
|
5
5
|
id: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CorporateActionsAdviceEntityModel = void 0;
|
|
4
|
-
const _enum_1 = require("../../@enum");
|
|
5
4
|
const _type_1 = require("../../@type");
|
|
5
|
+
const enum_1 = require("../../enum");
|
|
6
6
|
const base_entity_model_1 = require("../base.entity.model");
|
|
7
7
|
class CorporateActionsAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
8
|
constructor() {
|
|
@@ -10,9 +10,9 @@ class CorporateActionsAdviceEntityModel extends base_entity_model_1.BaseEntityMo
|
|
|
10
10
|
this.id = 0;
|
|
11
11
|
this.corporateActionId = 0;
|
|
12
12
|
this.companyName = "";
|
|
13
|
-
this.transactionType =
|
|
13
|
+
this.transactionType = enum_1.CorporateActionsTransactionType.POSITIVE;
|
|
14
14
|
this.advisorOrgId = 0;
|
|
15
|
-
this.status =
|
|
15
|
+
this.status = enum_1.CorporateActionAdviceStatus.ACTIVE;
|
|
16
16
|
this.noteDocumentUrl = null;
|
|
17
17
|
this.videoUrl = null;
|
|
18
18
|
this.voiceUrl = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IPOListingExchange } from "../../@enum";
|
|
2
1
|
import { ICorporateActionsEntity, ICorporateEntityOmitData, IIPOCorporateActionCreateDtoData } from "../../@type";
|
|
2
|
+
import { IPOListingExchange } from "../../enum";
|
|
3
3
|
import { CorporateActionsStatus } from "../../enum/corporate-actions/corporate-actions-status.enum";
|
|
4
4
|
import { CorporateActionsType } from "../../enum/corporate-actions/corporate-actions-type.enum";
|
|
5
5
|
export declare class IPOCorporateActionModel implements IIPOCorporateActionCreateDtoData, ICorporateEntityOmitData {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MutualFundsType } from "../../@enum";
|
|
2
1
|
import { EntityEnum, IMutualFundsEntity } from "../../@type";
|
|
2
|
+
import { MutualFundsType } from "../enum";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
4
|
export declare class MutualFundEntityModel extends BaseEntityModel<EntityEnum.MUTUAL_FUNDS> implements IMutualFundsEntity {
|
|
5
5
|
id: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MutualFundEntityModel = void 0;
|
|
4
|
-
const _enum_1 = require("../../@enum");
|
|
5
4
|
const _type_1 = require("../../@type");
|
|
5
|
+
const enum_1 = require("../enum");
|
|
6
6
|
const base_entity_model_1 = require("./base.entity.model");
|
|
7
7
|
class MutualFundEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
8
|
constructor() {
|
|
@@ -19,7 +19,7 @@ class MutualFundEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
19
19
|
this.fiveYearReturnRegular = 0;
|
|
20
20
|
this.fiveYearReturnDirect = 0;
|
|
21
21
|
this.dailyAUM = 0;
|
|
22
|
-
this.type =
|
|
22
|
+
this.type = enum_1.MutualFundsType.DEBT;
|
|
23
23
|
this.createdOn = 0;
|
|
24
24
|
this.updatedOn = 0;
|
|
25
25
|
this.createdBy = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NFOAdviceStatus, NFOAdviceTransactionType } from "../../@enum";
|
|
2
1
|
import { EntityEnum, INFOAdviceEntity } from "../../@type";
|
|
2
|
+
import { NFOAdviceStatus, NFOAdviceTransactionType } from "../enum";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
4
|
export declare class NFOAdviceEntityModel extends BaseEntityModel<EntityEnum.NFO_ADVICE> implements INFOAdviceEntity {
|
|
5
5
|
id: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NFOAdviceEntityModel = void 0;
|
|
4
|
-
const _enum_1 = require("../../@enum");
|
|
5
4
|
const _type_1 = require("../../@type");
|
|
5
|
+
const enum_1 = require("../enum");
|
|
6
6
|
const base_entity_model_1 = require("./base.entity.model");
|
|
7
7
|
class NFOAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
8
|
constructor() {
|
|
@@ -11,12 +11,12 @@ class NFOAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
11
11
|
this.nfoId = 0;
|
|
12
12
|
this.mutualFundName = "";
|
|
13
13
|
this.advisorOrgId = 0;
|
|
14
|
-
this.transactionType =
|
|
14
|
+
this.transactionType = enum_1.NFOAdviceTransactionType.AVOID;
|
|
15
15
|
this.rationale = "";
|
|
16
16
|
this.noteDocumentUrl = null;
|
|
17
17
|
this.videoUrl = null;
|
|
18
18
|
this.voiceUrl = null;
|
|
19
|
-
this.status =
|
|
19
|
+
this.status = enum_1.NFOAdviceStatus.ACTIVE;
|
|
20
20
|
this.createdOn = 0;
|
|
21
21
|
this.updatedOn = 0;
|
|
22
22
|
this.createdBy = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MutualFundsType } from "../../@enum";
|
|
2
1
|
import { EntityEnum, INFOEntity } from "../../@type";
|
|
2
|
+
import { MutualFundsType } from "../enum";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
4
|
export declare class NFOEntityModel extends BaseEntityModel<EntityEnum.NFO> implements INFOEntity {
|
|
5
5
|
id: number;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NFOEntityModel = void 0;
|
|
4
|
-
const _enum_1 = require("../../@enum");
|
|
5
4
|
const _type_1 = require("../../@type");
|
|
5
|
+
const enum_1 = require("../enum");
|
|
6
6
|
const base_entity_model_1 = require("./base.entity.model");
|
|
7
7
|
class NFOEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(_type_1.EntityEnum.NFO);
|
|
10
10
|
this.id = 0;
|
|
11
11
|
this.mutualFundName = "";
|
|
12
|
-
this.type =
|
|
12
|
+
this.type = enum_1.MutualFundsType.EQUITY;
|
|
13
13
|
this.startDateCode = 0;
|
|
14
14
|
this.endDateCode = 0;
|
|
15
15
|
this.risk = "";
|
|
@@ -114,3 +114,19 @@ export declare function getPropertyFilterByPermissionFn<T extends EntityEnum>(pe
|
|
|
114
114
|
*/
|
|
115
115
|
export declare function getDuplicates<T>(arr: T[]): T[];
|
|
116
116
|
export declare function getConsoleLog<T extends Record<string, any>>(entity: T, propertyName: keyof T): void;
|
|
117
|
+
/**
|
|
118
|
+
* Derives permission group from permission name.
|
|
119
|
+
*
|
|
120
|
+
* Rules:
|
|
121
|
+
* - Entity is resolved using EntityEnum (longest prefix match)
|
|
122
|
+
* - Action is the part immediately after the entity name
|
|
123
|
+
* - Scope (ORG / SELF / BULK / etc.) is ignored
|
|
124
|
+
* - Group format: <entity>_<action> (lowercase)
|
|
125
|
+
*
|
|
126
|
+
* Examples:
|
|
127
|
+
* CORPORATE_ACTIONS_CREATE_ORG → corporate_actions_create
|
|
128
|
+
* CORPORATE_ACTIONS_ADVICE_CREATE_ORG → corporate_actions_advice_create
|
|
129
|
+
* USER_EXPORT_EXCEL → user_export
|
|
130
|
+
* USER_NAV → user_nav
|
|
131
|
+
*/
|
|
132
|
+
export declare function derivePermissionGroup(permissionName: string): string;
|
|
@@ -9,8 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getConsoleLog = exports.getDuplicates = exports.getPropertyFilterByPermissionFn = exports.groupByOneToOneFunction = exports.deepMerge = exports.toDateFromEpoch = exports.groupByFunction = exports.transformDate = exports.getStringValues = exports.getTodayISTEpoch = void 0;
|
|
12
|
+
exports.derivePermissionGroup = exports.getConsoleLog = exports.getDuplicates = exports.getPropertyFilterByPermissionFn = exports.groupByOneToOneFunction = exports.deepMerge = exports.toDateFromEpoch = exports.groupByFunction = exports.transformDate = exports.getStringValues = exports.getTodayISTEpoch = void 0;
|
|
13
|
+
const _enum_1 = require("../@enum");
|
|
13
14
|
const _type_1 = require("../@type");
|
|
15
|
+
const model_1 = require("../model");
|
|
14
16
|
/**
|
|
15
17
|
* Returns epoch time (ms) for today's date at the given local time (IST).
|
|
16
18
|
*/
|
|
@@ -226,3 +228,59 @@ function getConsoleLog(entity, propertyName) {
|
|
|
226
228
|
console.log(propertyName, entity[propertyName]);
|
|
227
229
|
}
|
|
228
230
|
exports.getConsoleLog = getConsoleLog;
|
|
231
|
+
/**
|
|
232
|
+
* Derives permission group from permission name.
|
|
233
|
+
*
|
|
234
|
+
* Rules:
|
|
235
|
+
* - Entity is resolved using EntityEnum (longest prefix match)
|
|
236
|
+
* - Action is the part immediately after the entity name
|
|
237
|
+
* - Scope (ORG / SELF / BULK / etc.) is ignored
|
|
238
|
+
* - Group format: <entity>_<action> (lowercase)
|
|
239
|
+
*
|
|
240
|
+
* Examples:
|
|
241
|
+
* CORPORATE_ACTIONS_CREATE_ORG → corporate_actions_create
|
|
242
|
+
* CORPORATE_ACTIONS_ADVICE_CREATE_ORG → corporate_actions_advice_create
|
|
243
|
+
* USER_EXPORT_EXCEL → user_export
|
|
244
|
+
* USER_NAV → user_nav
|
|
245
|
+
*/
|
|
246
|
+
function derivePermissionGroup(permissionName) {
|
|
247
|
+
const parts = permissionName.split("_");
|
|
248
|
+
// handle NAV permissions first
|
|
249
|
+
if (parts[parts.length - 1] === "NAV") {
|
|
250
|
+
return `${parts.slice(0, -1).join("_").toLowerCase()}_nav`;
|
|
251
|
+
}
|
|
252
|
+
// resolve entity (longest match from EntityEnum)
|
|
253
|
+
let matchedEntityKey = null;
|
|
254
|
+
let matchedLength = 0;
|
|
255
|
+
for (const key of Object.keys(_type_1.EntityEnum)) {
|
|
256
|
+
const entityParts = key.split("_");
|
|
257
|
+
const matches = entityParts.every((part, idx) => parts[idx] === part);
|
|
258
|
+
if (matches && entityParts.length > matchedLength) {
|
|
259
|
+
matchedEntityKey = key;
|
|
260
|
+
matchedLength = entityParts.length;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (!matchedEntityKey) {
|
|
264
|
+
throw new model_1.AppBadRequestException({
|
|
265
|
+
key: _enum_1.ErrorKeyEnum.PERMISSION_NAME,
|
|
266
|
+
message: [
|
|
267
|
+
`Invalid permission name (entity not found): ${permissionName}`,
|
|
268
|
+
],
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
// the action is the first part after the entity
|
|
272
|
+
const remainingParts = parts.slice(matchedLength);
|
|
273
|
+
if (remainingParts.length === 0) {
|
|
274
|
+
throw new model_1.AppBadRequestException({
|
|
275
|
+
key: _enum_1.ErrorKeyEnum.PERMISSION_NAME,
|
|
276
|
+
message: [
|
|
277
|
+
`Invalid permission name (action not found): ${permissionName}`,
|
|
278
|
+
],
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
const action = remainingParts[0];
|
|
282
|
+
// build group
|
|
283
|
+
const entity = _type_1.EntityEnum[matchedEntityKey];
|
|
284
|
+
return `${entity}_${action.toLowerCase()}`;
|
|
285
|
+
}
|
|
286
|
+
exports.derivePermissionGroup = derivePermissionGroup;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ia-common",
|
|
3
|
-
"version": "1.1.1-beta.
|
|
3
|
+
"version": "1.1.1-beta.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
17
17
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" 2>&1| tee eslint.log",
|
|
18
18
|
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
19
|
-
"link": "npm run build && npm link"
|
|
19
|
+
"link": "npm run build && npm link",
|
|
20
|
+
"pull:link": "git pull && npm run link"
|
|
20
21
|
},
|
|
21
22
|
"repository": {
|
|
22
23
|
"type": "git",
|