ia-common 1.1.1-beta.3 → 1.1.1-beta.4
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 -2
- package/build/src/@enum.js +1 -2
- package/build/src/enum/user/{user-role.enum.d.ts → user-type.enum.d.ts} +1 -1
- package/build/src/enum/user/user-type.enum.js +13 -0
- package/build/src/interface/api/create-user-dto.interface.d.ts +2 -2
- package/build/src/interface/api/index.d.ts +2 -10
- package/build/src/interface/api/index.js +2 -10
- package/build/src/interface/entity/entity-utils.interface.d.ts +5 -13
- package/build/src/interface/entity/entity-utils.interface.js +1 -4
- package/build/src/interface/entity/index.d.ts +0 -3
- package/build/src/interface/entity/index.js +0 -3
- package/build/src/interface/entity/user-entity.interface.d.ts +2 -3
- package/build/src/model/equity-advice-entity-model.js +46 -46
- package/build/src/model/index.d.ts +10 -13
- package/build/src/model/index.js +10 -13
- package/build/src/model/interface/entity.model.interface.js +0 -9
- package/build/src/model/organization-entity-model.js +1 -1
- package/build/src/model/user-entity-model.d.ts +3 -4
- package/build/src/model/user-entity-model.js +4 -4
- package/build/src/utils/helper.fn.utils.d.ts +0 -1
- package/build/src/utils/helper.fn.utils.js +1 -10
- package/package.json +1 -1
- package/build/src/enum/error.key.enum.d.ts +0 -3
- package/build/src/enum/error.key.enum.js +0 -7
- package/build/src/enum/user/user-role.enum.js +0 -13
- package/build/src/interface/api/permission.create.dto.interface.d.ts +0 -3
- package/build/src/interface/api/permission.create.dto.interface.js +0 -2
- package/build/src/interface/api/permission.update.dto.interface.d.ts +0 -3
- package/build/src/interface/api/permission.update.dto.interface.js +0 -2
- package/build/src/interface/api/role-create-dto.interface.d.ts +0 -3
- package/build/src/interface/api/role-create-dto.interface.js +0 -2
- package/build/src/interface/api/role-update-dto.interface.d.ts +0 -3
- package/build/src/interface/api/role-update-dto.interface.js +0 -2
- package/build/src/interface/api/role.permission.mapping.create.dto.interface.d.ts +0 -5
- package/build/src/interface/api/role.permission.mapping.create.dto.interface.js +0 -2
- package/build/src/interface/api/role.permission.mapping.delete.dto.interface.d.ts +0 -3
- package/build/src/interface/api/role.permission.mapping.delete.dto.interface.js +0 -2
- package/build/src/interface/api/role.permission.mapping.response.d.ts +0 -5
- package/build/src/interface/api/role.permission.mapping.response.js +0 -2
- package/build/src/interface/api/role.permission.mapping.update.dto.interface.d.ts +0 -3
- package/build/src/interface/api/role.permission.mapping.update.dto.interface.js +0 -2
- package/build/src/interface/entity/permission.entity.interface.d.ts +0 -9
- package/build/src/interface/entity/permission.entity.interface.js +0 -2
- package/build/src/interface/entity/role.entity.interface.d.ts +0 -9
- package/build/src/interface/entity/role.entity.interface.js +0 -2
- package/build/src/interface/entity/role.permission.mapping.entity.interface.d.ts +0 -8
- package/build/src/interface/entity/role.permission.mapping.entity.interface.js +0 -2
- package/build/src/model/permission-entity-model.d.ts +0 -18
- package/build/src/model/permission-entity-model.js +0 -30
- package/build/src/model/role-entity-model.d.ts +0 -15
- package/build/src/model/role-entity-model.js +0 -27
- package/build/src/model/role-permission-entity-model.d.ts +0 -15
- package/build/src/model/role-permission-entity-model.js +0 -26
package/build/src/@enum.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./enum/organization/organization-status.enum";
|
|
2
2
|
export * from "./enum/organization/organization-type.enum";
|
|
3
3
|
export * from "./enum/user/user-status.enum";
|
|
4
|
-
export * from "./enum/user/user-
|
|
4
|
+
export * from "./enum/user/user-type.enum";
|
|
5
5
|
export * from "./enum/user/registration-status.enum";
|
|
6
6
|
export * from "./enum/organization/pricing-plan-status.enum";
|
|
7
7
|
export * from "./enum/organization/subscription-status.enum";
|
|
@@ -30,4 +30,3 @@ export * from "./enum/configuration.enum";
|
|
|
30
30
|
export * from "./enum/cron-job.enum";
|
|
31
31
|
export * from "./enum/time-zone.enum";
|
|
32
32
|
export * from "./enum/relation-type.enum";
|
|
33
|
-
export * from "./enum/error.key.enum";
|
package/build/src/@enum.js
CHANGED
|
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./enum/organization/organization-status.enum"), exports);
|
|
18
18
|
__exportStar(require("./enum/organization/organization-type.enum"), exports);
|
|
19
19
|
__exportStar(require("./enum/user/user-status.enum"), exports);
|
|
20
|
-
__exportStar(require("./enum/user/user-
|
|
20
|
+
__exportStar(require("./enum/user/user-type.enum"), exports);
|
|
21
21
|
__exportStar(require("./enum/user/registration-status.enum"), exports);
|
|
22
22
|
__exportStar(require("./enum/organization/pricing-plan-status.enum"), exports);
|
|
23
23
|
__exportStar(require("./enum/organization/subscription-status.enum"), exports);
|
|
@@ -46,4 +46,3 @@ __exportStar(require("./enum/configuration.enum"), exports);
|
|
|
46
46
|
__exportStar(require("./enum/cron-job.enum"), exports);
|
|
47
47
|
__exportStar(require("./enum/time-zone.enum"), exports);
|
|
48
48
|
__exportStar(require("./enum/relation-type.enum"), exports);
|
|
49
|
-
__exportStar(require("./enum/error.key.enum"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserType = void 0;
|
|
4
|
+
var UserType;
|
|
5
|
+
(function (UserType) {
|
|
6
|
+
UserType["USER"] = "user";
|
|
7
|
+
UserType["ADVISOR"] = "advisor";
|
|
8
|
+
UserType["SUPERADMIN"] = "superadmin";
|
|
9
|
+
UserType["BOT_USER"] = "bot_user";
|
|
10
|
+
UserType["PUBLIC_USER"] = "public_user";
|
|
11
|
+
UserType["ADVISOR_CLIENT"] = "advisor_client";
|
|
12
|
+
UserType["STAFF"] = "staff";
|
|
13
|
+
})(UserType || (exports.UserType = UserType = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserStatus,
|
|
1
|
+
import { UserStatus, UserType } 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>> {
|
|
@@ -7,7 +7,7 @@ export interface IUserCreateDto extends IEntityCreateDto<Omit<IUserEntity, IUser
|
|
|
7
7
|
isMobileVerified?: boolean;
|
|
8
8
|
isAccountVerified?: boolean;
|
|
9
9
|
requireNewPassword?: boolean;
|
|
10
|
-
|
|
10
|
+
type: UserType;
|
|
11
11
|
registrationId?: number;
|
|
12
12
|
organizationId?: number;
|
|
13
13
|
panNo?: string;
|
|
@@ -27,8 +27,8 @@ export * from "./mutual-fund-advice-create-dto.interface";
|
|
|
27
27
|
export * from "../entity/advisor-user-mapping-entity.interface";
|
|
28
28
|
export * from "../corporate-actions/base-corporate-actions.interface";
|
|
29
29
|
export * from "./get-corporate-actions.interface";
|
|
30
|
-
export * from "../corporate-actions/create-bonus-stock.interface";
|
|
31
30
|
export * from "./advior-user-interface";
|
|
31
|
+
export * from "../corporate-actions/create-bonus-stock.interface";
|
|
32
32
|
export * from "./create-bulk-advice-using-csv.interface";
|
|
33
33
|
export * from "./create-corporate-action-advice.interface";
|
|
34
34
|
export * from "./get-configuration.interface";
|
|
@@ -50,15 +50,7 @@ export * from "./update-corporate-action.interface";
|
|
|
50
50
|
export * from "./create-user-dto.interface";
|
|
51
51
|
export * from "./update-user-dto.interface";
|
|
52
52
|
export * from "./mutual-fund-advice-update-dto.interface";
|
|
53
|
-
export * from "./configurations-create-dto.interface";
|
|
54
53
|
export * from "./corporate-actions-create.dto";
|
|
55
54
|
export * from "./corporate-actions-update.dto";
|
|
55
|
+
export * from "./configurations-create-dto.interface";
|
|
56
56
|
export * from "./configuration-update-dto.interface";
|
|
57
|
-
export * from "./permission.create.dto.interface";
|
|
58
|
-
export * from "./permission.update.dto.interface";
|
|
59
|
-
export * from "./role-create-dto.interface";
|
|
60
|
-
export * from "./role-update-dto.interface";
|
|
61
|
-
export * from "./role.permission.mapping.create.dto.interface";
|
|
62
|
-
export * from "./role.permission.mapping.delete.dto.interface";
|
|
63
|
-
export * from "./role.permission.mapping.response";
|
|
64
|
-
export * from "./role.permission.mapping.update.dto.interface";
|
|
@@ -43,8 +43,8 @@ __exportStar(require("./mutual-fund-advice-create-dto.interface"), exports);
|
|
|
43
43
|
__exportStar(require("../entity/advisor-user-mapping-entity.interface"), exports);
|
|
44
44
|
__exportStar(require("../corporate-actions/base-corporate-actions.interface"), exports);
|
|
45
45
|
__exportStar(require("./get-corporate-actions.interface"), exports);
|
|
46
|
-
__exportStar(require("../corporate-actions/create-bonus-stock.interface"), exports);
|
|
47
46
|
__exportStar(require("./advior-user-interface"), exports);
|
|
47
|
+
__exportStar(require("../corporate-actions/create-bonus-stock.interface"), exports);
|
|
48
48
|
__exportStar(require("./create-bulk-advice-using-csv.interface"), exports);
|
|
49
49
|
__exportStar(require("./create-corporate-action-advice.interface"), exports);
|
|
50
50
|
__exportStar(require("./get-configuration.interface"), exports);
|
|
@@ -66,15 +66,7 @@ __exportStar(require("./update-corporate-action.interface"), exports);
|
|
|
66
66
|
__exportStar(require("./create-user-dto.interface"), exports);
|
|
67
67
|
__exportStar(require("./update-user-dto.interface"), exports);
|
|
68
68
|
__exportStar(require("./mutual-fund-advice-update-dto.interface"), exports);
|
|
69
|
-
__exportStar(require("./configurations-create-dto.interface"), exports);
|
|
70
69
|
__exportStar(require("./corporate-actions-create.dto"), exports);
|
|
71
70
|
__exportStar(require("./corporate-actions-update.dto"), exports);
|
|
71
|
+
__exportStar(require("./configurations-create-dto.interface"), exports);
|
|
72
72
|
__exportStar(require("./configuration-update-dto.interface"), exports);
|
|
73
|
-
__exportStar(require("./permission.create.dto.interface"), exports);
|
|
74
|
-
__exportStar(require("./permission.update.dto.interface"), exports);
|
|
75
|
-
__exportStar(require("./role-create-dto.interface"), exports);
|
|
76
|
-
__exportStar(require("./role-update-dto.interface"), exports);
|
|
77
|
-
__exportStar(require("./role.permission.mapping.create.dto.interface"), exports);
|
|
78
|
-
__exportStar(require("./role.permission.mapping.delete.dto.interface"), exports);
|
|
79
|
-
__exportStar(require("./role.permission.mapping.response"), exports);
|
|
80
|
-
__exportStar(require("./role.permission.mapping.update.dto.interface"), exports);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { BankDetailsEntityModel, ConfigurationsEntityModel, CorporateActionsEntityModel, EquityAdviceEntityModel, MutualFundAdviceEntityModel, NFOAdviceEntityModel, NFOEntityModel, OrganizationEntityModel, PricingPlanEntityModel,
|
|
1
|
+
import { BankDetailsEntityModel, ConfigurationsEntityModel, CorporateActionsEntityModel, EquityAdviceEntityModel, MutualFundAdviceEntityModel, NFOAdviceEntityModel, NFOEntityModel, OrganizationEntityModel, PricingPlanEntityModel, SubscriptionEntityModel, UserEntityModel } from "../../model";
|
|
2
2
|
import { AdvisorUserMappingEntityModel } from "../../model/advisor-user-mapping-entity-model";
|
|
3
3
|
import { CorporateActionsAdviceEntityModel } from "../../model/corporate-actions/corporate-actions-advice-model";
|
|
4
4
|
import { CronJobsEntityModel } from "../../model/cron-jobs-entity-model";
|
|
5
5
|
import { MutualFundEntityModel } from "../../model/mutual-funds-entity.model";
|
|
6
|
-
import { PermissionEntityModel } from "../../model/permission-entity-model";
|
|
7
6
|
import { RegistrationEntityModel } from "../../model/registration-entity-model";
|
|
8
|
-
import { RoleEntityModel } from "../../model/role-entity-model";
|
|
9
7
|
import { IEquityAdviceEntity } from "./advice-entity.interface";
|
|
10
8
|
import { IAdvisorUserMappingEntity } from "./advisor-user-mapping-entity.interface";
|
|
11
9
|
import { IBankDetailEntity } from "./bank-details-entity.interface";
|
|
@@ -19,11 +17,8 @@ import { IMutualFundsEntity } from "./mutual-funds-entity.interface";
|
|
|
19
17
|
import { INFOAdviceEntity } from "./nfo-advice-entity.interface";
|
|
20
18
|
import { INFOEntity } from "./nfo-entity.interface";
|
|
21
19
|
import { IOrganizationEntity } from "./organization-entity.interface";
|
|
22
|
-
import { IPermissionEntity } from "./permission.entity.interface";
|
|
23
20
|
import { IPricingPlanEntity } from "./pricing-plan-entity.interface";
|
|
24
21
|
import { IRegistrationEntity } from "./registration-entity";
|
|
25
|
-
import { IRoleEntity } from "./role.entity.interface";
|
|
26
|
-
import { IRolePermissionMappingEntity } from "./role.permission.mapping.entity.interface";
|
|
27
22
|
import { ISubscriptionEntity } from "./subscription-entity.interface";
|
|
28
23
|
import { IUserEntity } from "./user-entity.interface";
|
|
29
24
|
/**
|
|
@@ -82,7 +77,7 @@ export declare function arrayIntersection<T>(source: T[], target: T[]): T[];
|
|
|
82
77
|
* @example
|
|
83
78
|
* const existing = [1, 2, 3];
|
|
84
79
|
* const incoming = [2, 3, 4];
|
|
85
|
-
* const result =
|
|
80
|
+
* const result = newRemoved(existing, incoming);
|
|
86
81
|
* console.log(result); // Output: { added: [4], deleted: [1], present: [2, 3, 4] }
|
|
87
82
|
*/
|
|
88
83
|
export declare function getArrayChangeSet<T>(existing: T[], incoming: T[]): {
|
|
@@ -132,10 +127,7 @@ export declare enum EntityEnum {
|
|
|
132
127
|
CORPORATE_ACTIONS = "corporate_actions",
|
|
133
128
|
CORPORATE_ACTIONS_ADVICE = "corporate_actions_advice",
|
|
134
129
|
CONFIGURATION = "configuration",
|
|
135
|
-
CRON_JOBS = "cron_jobs"
|
|
136
|
-
ROLE = "role",
|
|
137
|
-
PERMISSION = "permissions",
|
|
138
|
-
ROLE_PERMISSION_MAPPING = "role_permission_mapping"
|
|
130
|
+
CRON_JOBS = "cron_jobs"
|
|
139
131
|
}
|
|
140
132
|
/**
|
|
141
133
|
* EnumEntityType<T>
|
|
@@ -143,7 +135,7 @@ export declare enum EntityEnum {
|
|
|
143
135
|
* Maps each EntityEnum to its corresponding Interface.
|
|
144
136
|
* Ensures strict typing in services, repositories & generic functions.
|
|
145
137
|
*/
|
|
146
|
-
export type EnumEntityType<T extends EntityEnum> = (T extends EntityEnum.EQUITY_ADVICE ? IEquityAdviceEntity : T extends EntityEnum.BANK_DETAIL ? IBankDetailEntity : T extends EntityEnum.PRICING_PLAN ? IPricingPlanEntity : T extends EntityEnum.SUBSCRIPTION ? ISubscriptionEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.REGISTRATION ? IRegistrationEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.ADVISOR_USER_MAPPING ? IAdvisorUserMappingEntity : T extends EntityEnum.MUTUAL_FUNDS ? IMutualFundsEntity : T extends EntityEnum.MUTUAL_FUND_ADVICE ? IMutualFundAdviceEntity : T extends EntityEnum.NFO ? INFOEntity : T extends EntityEnum.NFO_ADVICE ? INFOAdviceEntity : T extends EntityEnum.CORPORATE_ACTIONS ? ICorporateActionsEntity : T extends EntityEnum.CORPORATE_ACTIONS_ADVICE ? ICorporateActionsAdviceEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationsEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity :
|
|
138
|
+
export type EnumEntityType<T extends EntityEnum> = (T extends EntityEnum.EQUITY_ADVICE ? IEquityAdviceEntity : T extends EntityEnum.BANK_DETAIL ? IBankDetailEntity : T extends EntityEnum.PRICING_PLAN ? IPricingPlanEntity : T extends EntityEnum.SUBSCRIPTION ? ISubscriptionEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.REGISTRATION ? IRegistrationEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.ADVISOR_USER_MAPPING ? IAdvisorUserMappingEntity : T extends EntityEnum.MUTUAL_FUNDS ? IMutualFundsEntity : T extends EntityEnum.MUTUAL_FUND_ADVICE ? IMutualFundAdviceEntity : T extends EntityEnum.NFO ? INFOEntity : T extends EntityEnum.NFO_ADVICE ? INFOAdviceEntity : T extends EntityEnum.CORPORATE_ACTIONS ? ICorporateActionsEntity : T extends EntityEnum.CORPORATE_ACTIONS_ADVICE ? ICorporateActionsAdviceEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationsEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : never) & {
|
|
147
139
|
id: number;
|
|
148
140
|
};
|
|
149
141
|
export type EntityRelations = {
|
|
@@ -209,7 +201,7 @@ export type EntityModelIndexMap = {
|
|
|
209
201
|
export type EntityMap = {
|
|
210
202
|
[E in EntityEnum]?: EnumEntityType<E>[];
|
|
211
203
|
};
|
|
212
|
-
export type EnumToModel<T extends EntityEnum> = T extends EntityEnum.EQUITY_ADVICE ? EquityAdviceEntityModel : T extends EntityEnum.BANK_DETAIL ? BankDetailsEntityModel : T extends EntityEnum.PRICING_PLAN ? PricingPlanEntityModel : T extends EntityEnum.SUBSCRIPTION ? SubscriptionEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.REGISTRATION ? RegistrationEntityModel : T extends EntityEnum.USER ? UserEntityModel : T extends EntityEnum.ADVISOR_USER_MAPPING ? AdvisorUserMappingEntityModel : T extends EntityEnum.MUTUAL_FUNDS ? MutualFundEntityModel : T extends EntityEnum.MUTUAL_FUND_ADVICE ? MutualFundAdviceEntityModel : T extends EntityEnum.NFO ? NFOEntityModel : T extends EntityEnum.NFO_ADVICE ? NFOAdviceEntityModel : T extends EntityEnum.CORPORATE_ACTIONS ? CorporateActionsEntityModel : T extends EntityEnum.CORPORATE_ACTIONS_ADVICE ? CorporateActionsAdviceEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationsEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel :
|
|
204
|
+
export type EnumToModel<T extends EntityEnum> = T extends EntityEnum.EQUITY_ADVICE ? EquityAdviceEntityModel : T extends EntityEnum.BANK_DETAIL ? BankDetailsEntityModel : T extends EntityEnum.PRICING_PLAN ? PricingPlanEntityModel : T extends EntityEnum.SUBSCRIPTION ? SubscriptionEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.REGISTRATION ? RegistrationEntityModel : T extends EntityEnum.USER ? UserEntityModel : T extends EntityEnum.ADVISOR_USER_MAPPING ? AdvisorUserMappingEntityModel : T extends EntityEnum.MUTUAL_FUNDS ? MutualFundEntityModel : T extends EntityEnum.MUTUAL_FUND_ADVICE ? MutualFundAdviceEntityModel : T extends EntityEnum.NFO ? NFOEntityModel : T extends EntityEnum.NFO_ADVICE ? NFOAdviceEntityModel : T extends EntityEnum.CORPORATE_ACTIONS ? CorporateActionsEntityModel : T extends EntityEnum.CORPORATE_ACTIONS_ADVICE ? CorporateActionsAdviceEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationsEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : never;
|
|
213
205
|
export type IBaseEntityApiResponse<T> = {
|
|
214
206
|
baseEntities: T[];
|
|
215
207
|
relatedEntities?: {
|
|
@@ -66,7 +66,7 @@ exports.arrayIntersection = arrayIntersection;
|
|
|
66
66
|
* @example
|
|
67
67
|
* const existing = [1, 2, 3];
|
|
68
68
|
* const incoming = [2, 3, 4];
|
|
69
|
-
* const result =
|
|
69
|
+
* const result = newRemoved(existing, incoming);
|
|
70
70
|
* console.log(result); // Output: { added: [4], deleted: [1], present: [2, 3, 4] }
|
|
71
71
|
*/
|
|
72
72
|
function getArrayChangeSet(existing, incoming) {
|
|
@@ -123,8 +123,5 @@ var EntityEnum;
|
|
|
123
123
|
EntityEnum["CORPORATE_ACTIONS_ADVICE"] = "corporate_actions_advice";
|
|
124
124
|
EntityEnum["CONFIGURATION"] = "configuration";
|
|
125
125
|
EntityEnum["CRON_JOBS"] = "cron_jobs";
|
|
126
|
-
EntityEnum["ROLE"] = "role";
|
|
127
|
-
EntityEnum["PERMISSION"] = "permissions";
|
|
128
|
-
EntityEnum["ROLE_PERMISSION_MAPPING"] = "role_permission_mapping";
|
|
129
126
|
// EQUITY_ADVICE_IN_PROCESS = "equity_advice_in_process",
|
|
130
127
|
})(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
|
|
@@ -19,6 +19,3 @@ export * from "./cron-job-entity.interface";
|
|
|
19
19
|
export * from "./entity-utils.interface";
|
|
20
20
|
export * from "./audit-column-entity.interface";
|
|
21
21
|
export * from "./relation-config.interface";
|
|
22
|
-
export * from "./role.entity.interface";
|
|
23
|
-
export * from "./permission.entity.interface";
|
|
24
|
-
export * from "./role.permission.mapping.entity.interface";
|
|
@@ -35,6 +35,3 @@ __exportStar(require("./cron-job-entity.interface"), exports);
|
|
|
35
35
|
__exportStar(require("./entity-utils.interface"), exports);
|
|
36
36
|
__exportStar(require("./audit-column-entity.interface"), exports);
|
|
37
37
|
__exportStar(require("./relation-config.interface"), exports);
|
|
38
|
-
__exportStar(require("./role.entity.interface"), exports);
|
|
39
|
-
__exportStar(require("./permission.entity.interface"), exports);
|
|
40
|
-
__exportStar(require("./role.permission.mapping.entity.interface"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UserRoleEnum } from "../../@enum";
|
|
2
1
|
import { UserStatus } from "../../enum/user/user-status.enum";
|
|
2
|
+
import { UserType } from "../../enum/user/user-type.enum";
|
|
3
3
|
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
4
4
|
export interface IUserEntity extends IAuditColumnEntity {
|
|
5
5
|
id: number;
|
|
@@ -12,10 +12,9 @@ export interface IUserEntity extends IAuditColumnEntity {
|
|
|
12
12
|
isMobileVerified: boolean;
|
|
13
13
|
isAccountVerified: boolean;
|
|
14
14
|
requireNewPassword: boolean;
|
|
15
|
-
|
|
15
|
+
type: UserType;
|
|
16
16
|
registrationId: number;
|
|
17
17
|
organizationId: number;
|
|
18
18
|
imageUrl: string | null;
|
|
19
19
|
documentUrls: string | null;
|
|
20
|
-
permissions?: string[];
|
|
21
20
|
}
|
|
@@ -5,6 +5,52 @@ 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
|
+
// }
|
|
8
54
|
class EquityAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
9
55
|
constructor() {
|
|
10
56
|
super(...arguments);
|
|
@@ -57,49 +103,3 @@ class EquityAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
57
103
|
}
|
|
58
104
|
}
|
|
59
105
|
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
|
-
// }
|
|
@@ -4,30 +4,27 @@ export * from "./subscribed-pricing-plan-model";
|
|
|
4
4
|
export * from "../exception/app-badrequest.exception";
|
|
5
5
|
export * from "./organization-entity-model";
|
|
6
6
|
export * from "./user-entity-model";
|
|
7
|
-
export * from "./bank-details-entity-model";
|
|
8
7
|
export * from "./subscription-entity-model";
|
|
8
|
+
export * from "./bank-details-entity-model";
|
|
9
9
|
export * from "./corporate-actions/bonus-corporate-action-model";
|
|
10
|
-
export * from "./corporate-actions/dividend-corporate-action-model";
|
|
11
10
|
export * from "./corporate-actions/fpo-corporate-action-model";
|
|
12
|
-
export * from "./corporate-actions/
|
|
11
|
+
export * from "./corporate-actions/dividend-corporate-action-model";
|
|
12
|
+
export * from "./corporate-actions/right-issue-corporate-action-model";
|
|
13
13
|
export * from "./corporate-actions/delisting-corporate-action-model";
|
|
14
14
|
export * from "./corporate-actions/open-offer-corporate-action-model";
|
|
15
|
-
export * from "./corporate-actions/
|
|
16
|
-
export * from "./corporate-actions/corporate-action-model";
|
|
17
|
-
export * from "./corporate-actions/ipo-corporate-action-model";
|
|
15
|
+
export * from "./corporate-actions/buy-back-corporate-action-model";
|
|
18
16
|
export * from "./corporate-actions/split-corporate-action-model";
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./corporate-actions/
|
|
17
|
+
export * from "./corporate-actions/ipo-corporate-action-model";
|
|
18
|
+
export * from "./corporate-actions/corporate-action-model";
|
|
21
19
|
export * from "./corporate-actions/split-bonus-corporate-action-model";
|
|
20
|
+
export * from "./corporate-actions/ofs-corporate-action-model";
|
|
21
|
+
export * from "./configurations-entity-model";
|
|
22
22
|
export * from "./equity-advice-entity-model";
|
|
23
23
|
export * from "./interface/entity.model.interface";
|
|
24
24
|
export * from "./pricing-plan-model";
|
|
25
25
|
export * from "./registration-entity-model";
|
|
26
|
-
export * from "./mutual-fund-advice-entity.model";
|
|
27
26
|
export * from "./mutual-funds-entity.model";
|
|
28
|
-
export * from "./
|
|
27
|
+
export * from "./mutual-fund-advice-entity.model";
|
|
29
28
|
export * from "./nfo-entity.model";
|
|
29
|
+
export * from "./nfo-advice-entity.model";
|
|
30
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";
|
package/build/src/model/index.js
CHANGED
|
@@ -24,30 +24,27 @@ __exportStar(require("../exception/app-badrequest.exception"), exports);
|
|
|
24
24
|
__exportStar(require("./organization-entity-model"), exports);
|
|
25
25
|
// export * from "./model/user-entity-model";
|
|
26
26
|
__exportStar(require("./user-entity-model"), exports);
|
|
27
|
-
__exportStar(require("./bank-details-entity-model"), exports);
|
|
28
27
|
__exportStar(require("./subscription-entity-model"), exports);
|
|
28
|
+
__exportStar(require("./bank-details-entity-model"), exports);
|
|
29
29
|
__exportStar(require("./corporate-actions/bonus-corporate-action-model"), exports);
|
|
30
|
-
__exportStar(require("./corporate-actions/dividend-corporate-action-model"), exports);
|
|
31
30
|
__exportStar(require("./corporate-actions/fpo-corporate-action-model"), exports);
|
|
32
|
-
__exportStar(require("./corporate-actions/
|
|
31
|
+
__exportStar(require("./corporate-actions/dividend-corporate-action-model"), exports);
|
|
32
|
+
__exportStar(require("./corporate-actions/right-issue-corporate-action-model"), exports);
|
|
33
33
|
__exportStar(require("./corporate-actions/delisting-corporate-action-model"), exports);
|
|
34
34
|
__exportStar(require("./corporate-actions/open-offer-corporate-action-model"), exports);
|
|
35
|
-
__exportStar(require("./corporate-actions/
|
|
36
|
-
__exportStar(require("./corporate-actions/corporate-action-model"), exports);
|
|
37
|
-
__exportStar(require("./corporate-actions/ipo-corporate-action-model"), exports);
|
|
35
|
+
__exportStar(require("./corporate-actions/buy-back-corporate-action-model"), exports);
|
|
38
36
|
__exportStar(require("./corporate-actions/split-corporate-action-model"), exports);
|
|
39
|
-
__exportStar(require("./
|
|
40
|
-
__exportStar(require("./corporate-actions/
|
|
37
|
+
__exportStar(require("./corporate-actions/ipo-corporate-action-model"), exports);
|
|
38
|
+
__exportStar(require("./corporate-actions/corporate-action-model"), exports);
|
|
41
39
|
__exportStar(require("./corporate-actions/split-bonus-corporate-action-model"), exports);
|
|
40
|
+
__exportStar(require("./corporate-actions/ofs-corporate-action-model"), exports);
|
|
41
|
+
__exportStar(require("./configurations-entity-model"), exports);
|
|
42
42
|
__exportStar(require("./equity-advice-entity-model"), exports);
|
|
43
43
|
__exportStar(require("./interface/entity.model.interface"), exports);
|
|
44
44
|
__exportStar(require("./pricing-plan-model"), exports);
|
|
45
45
|
__exportStar(require("./registration-entity-model"), exports);
|
|
46
|
-
__exportStar(require("./mutual-fund-advice-entity.model"), exports);
|
|
47
46
|
__exportStar(require("./mutual-funds-entity.model"), exports);
|
|
48
|
-
__exportStar(require("./
|
|
47
|
+
__exportStar(require("./mutual-fund-advice-entity.model"), exports);
|
|
49
48
|
__exportStar(require("./nfo-entity.model"), exports);
|
|
49
|
+
__exportStar(require("./nfo-advice-entity.model"), exports);
|
|
50
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);
|
|
@@ -15,11 +15,8 @@ const mutual_funds_entity_model_1 = require("../mutual-funds-entity.model");
|
|
|
15
15
|
const nfo_advice_entity_model_1 = require("../nfo-advice-entity.model");
|
|
16
16
|
const nfo_entity_model_1 = require("../nfo-entity.model");
|
|
17
17
|
const organization_entity_model_1 = require("../organization-entity-model");
|
|
18
|
-
const permission_entity_model_1 = require("../permission-entity-model");
|
|
19
18
|
const pricing_plan_entity_model_1 = require("../pricing-plan-entity-model");
|
|
20
19
|
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
20
|
const subscription_entity_model_1 = require("../subscription-entity-model");
|
|
24
21
|
const user_entity_model_1 = require("../user-entity-model");
|
|
25
22
|
function mapToIndex(entityMap) {
|
|
@@ -73,9 +70,6 @@ function parseEntities(json, baseEntity, entityModelMap) {
|
|
|
73
70
|
[_type_1.EntityEnum.CORPORATE_ACTIONS_ADVICE]: corporate_actions_advice_model_1.CorporateActionsAdviceEntityModel.fromEntity,
|
|
74
71
|
[_type_1.EntityEnum.CONFIGURATION]: configurations_entity_model_1.ConfigurationsEntityModel.fromEntity,
|
|
75
72
|
[_type_1.EntityEnum.CRON_JOBS]: cron_jobs_entity_model_1.CronJobsEntityModel.fromEntity,
|
|
76
|
-
[_type_1.EntityEnum.ROLE]: role_entity_model_1.RoleEntityModel.fromEntity,
|
|
77
|
-
[_type_1.EntityEnum.PERMISSION]: permission_entity_model_1.PermissionEntityModel.fromEntity,
|
|
78
|
-
[_type_1.EntityEnum.ROLE_PERMISSION_MAPPING]: role_permission_entity_model_1.RolePermissionMappingEntityModel.fromEntity,
|
|
79
73
|
};
|
|
80
74
|
if (!(baseEntity in entityFromJsonMappings)) {
|
|
81
75
|
throw new Error(`Unknown entity: ${baseEntity}`);
|
|
@@ -111,9 +105,6 @@ exports.entityEnumToEntityModel = {
|
|
|
111
105
|
[_type_1.EntityEnum.CORPORATE_ACTIONS_ADVICE]: corporate_actions_advice_model_1.CorporateActionsAdviceEntityModel.fromEntity,
|
|
112
106
|
[_type_1.EntityEnum.CONFIGURATION]: configurations_entity_model_1.ConfigurationsEntityModel.fromEntity,
|
|
113
107
|
[_type_1.EntityEnum.CRON_JOBS]: cron_jobs_entity_model_1.CronJobsEntityModel.fromEntity,
|
|
114
|
-
[_type_1.EntityEnum.ROLE]: role_entity_model_1.RoleEntityModel.fromEntity,
|
|
115
|
-
[_type_1.EntityEnum.PERMISSION]: permission_entity_model_1.PermissionEntityModel.fromEntity,
|
|
116
|
-
[_type_1.EntityEnum.ROLE_PERMISSION_MAPPING]: role_permission_entity_model_1.RolePermissionMappingEntityModel.fromEntity,
|
|
117
108
|
};
|
|
118
109
|
function parseEntitiesWithoutModels(json, baseEntity, entityMap = {}) {
|
|
119
110
|
var _a;
|
|
@@ -146,7 +146,7 @@ class OrganizationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
146
146
|
// }
|
|
147
147
|
validateOwnersCountByOrganizationType() {
|
|
148
148
|
var _a;
|
|
149
|
-
const noOfOwners = (_a = this.users) === null || _a === void 0 ? void 0 : _a.filter((user) => user.
|
|
149
|
+
const noOfOwners = (_a = this.users) === null || _a === void 0 ? void 0 : _a.filter((user) => user.type === _enum_1.UserType.ADVISOR).length;
|
|
150
150
|
if (this.type === _enum_1.OrganizationType.PARTNERSHIP && noOfOwners <= 1) {
|
|
151
151
|
throw new _model_1.AppBadRequestException({
|
|
152
152
|
key: "organizationType",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserStatus, UserType } from "../@enum";
|
|
2
2
|
import { EntityEnum, IOrganizationEntity, IRegistrationEntity, IUserEntity } from "../@type";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
4
|
export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> implements IUserEntity {
|
|
@@ -12,12 +12,11 @@ export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> im
|
|
|
12
12
|
isMobileVerified: boolean;
|
|
13
13
|
isAccountVerified: boolean;
|
|
14
14
|
requireNewPassword: boolean;
|
|
15
|
-
|
|
15
|
+
type: UserType;
|
|
16
16
|
registrationId: number;
|
|
17
17
|
organizationId: number;
|
|
18
18
|
imageUrl: string | null;
|
|
19
19
|
documentUrls: string | null;
|
|
20
|
-
permissions?: string[];
|
|
21
20
|
createdOn: number;
|
|
22
21
|
updatedOn: number;
|
|
23
22
|
createdBy: number;
|
|
@@ -28,5 +27,5 @@ export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> im
|
|
|
28
27
|
static filterByOrganizationId(userEntities: IUserEntity[], organizationId: number): IUserEntity[];
|
|
29
28
|
static getUserEntityInstanceFromRegistrationEntityOrganizationEntity(registrationEntity: IRegistrationEntity, organizationEntity: IOrganizationEntity, hashedPassword: string): IUserEntity;
|
|
30
29
|
getRelationConfigs(): any;
|
|
31
|
-
|
|
30
|
+
validateUserTypeSuperAdmin(): void;
|
|
32
31
|
}
|
|
@@ -18,7 +18,7 @@ class UserEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
18
18
|
this.isMobileVerified = false;
|
|
19
19
|
this.isAccountVerified = false;
|
|
20
20
|
this.requireNewPassword = false;
|
|
21
|
-
this.
|
|
21
|
+
this.type = _enum_1.UserType.ADVISOR;
|
|
22
22
|
this.registrationId = 0;
|
|
23
23
|
this.organizationId = 0;
|
|
24
24
|
this.imageUrl = null;
|
|
@@ -44,7 +44,7 @@ class UserEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
44
44
|
userEntity.isEmailVerified = false;
|
|
45
45
|
userEntity.isMobileVerified = false;
|
|
46
46
|
userEntity.status = _enum_1.UserStatus.REGISTRATION_APPROVED;
|
|
47
|
-
userEntity.
|
|
47
|
+
userEntity.type = _enum_1.UserType.ADVISOR;
|
|
48
48
|
userEntity.createdBy = registrationEntity.createdBy;
|
|
49
49
|
userEntity.updatedBy = registrationEntity.createdBy;
|
|
50
50
|
userEntity.updatedOn = Date.now();
|
|
@@ -62,8 +62,8 @@ class UserEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
62
62
|
getRelationConfigs() {
|
|
63
63
|
return this.constructor.prototype.constructor.relationConfigs;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
if (this.
|
|
65
|
+
validateUserTypeSuperAdmin() {
|
|
66
|
+
if (this.type !== _enum_1.UserType.SUPERADMIN) {
|
|
67
67
|
throw new _model_1.AppBadRequestException({
|
|
68
68
|
key: "status",
|
|
69
69
|
message: [
|
|
@@ -82,4 +82,3 @@ export declare function toDateFromEpoch(epoch: number): Date;
|
|
|
82
82
|
* `{...old, ...new}` which only performs shallow merge.
|
|
83
83
|
*/
|
|
84
84
|
export declare function deepMerge(existing: any, incoming: any): any;
|
|
85
|
-
export declare function groupByOneToOneFunction<T, K>(list: T[], keyGetter: (input: T) => K): Map<K, T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.deepMerge = exports.toDateFromEpoch = exports.groupByFunction = exports.transformDate = exports.getStringValues = exports.getTodayISTEpoch = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Returns epoch time (ms) for today's date at the given local time (IST).
|
|
6
6
|
*/
|
|
@@ -124,12 +124,3 @@ function deepMerge(existing, incoming) {
|
|
|
124
124
|
return existing;
|
|
125
125
|
}
|
|
126
126
|
exports.deepMerge = deepMerge;
|
|
127
|
-
function groupByOneToOneFunction(list, keyGetter) {
|
|
128
|
-
const map = new Map();
|
|
129
|
-
list.forEach((item) => {
|
|
130
|
-
const key = keyGetter(item);
|
|
131
|
-
map.set(key, item);
|
|
132
|
-
});
|
|
133
|
-
return map;
|
|
134
|
-
}
|
|
135
|
-
exports.groupByOneToOneFunction = groupByOneToOneFunction;
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ErrorKeyEnum = void 0;
|
|
4
|
-
var ErrorKeyEnum;
|
|
5
|
-
(function (ErrorKeyEnum) {
|
|
6
|
-
ErrorKeyEnum["USER_ROLE"] = "USER_ROLE";
|
|
7
|
-
})(ErrorKeyEnum || (exports.ErrorKeyEnum = ErrorKeyEnum = {}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserRoleEnum = void 0;
|
|
4
|
-
var UserRoleEnum;
|
|
5
|
-
(function (UserRoleEnum) {
|
|
6
|
-
UserRoleEnum["USER"] = "user";
|
|
7
|
-
UserRoleEnum["ADVISOR"] = "advisor";
|
|
8
|
-
UserRoleEnum["SUPERADMIN"] = "superadmin";
|
|
9
|
-
UserRoleEnum["BOT_USER"] = "bot_user";
|
|
10
|
-
UserRoleEnum["PUBLIC_USER"] = "public_user";
|
|
11
|
-
UserRoleEnum["ADVISOR_CLIENT"] = "advisor_client";
|
|
12
|
-
UserRoleEnum["STAFF"] = "staff";
|
|
13
|
-
})(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
2
|
-
import { EntityEnum, IEntitySearch } from "./entity-utils.interface";
|
|
3
|
-
export interface IPermissionEntity extends IAuditColumnEntity {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
organizationId: number;
|
|
8
|
-
}
|
|
9
|
-
export type IPermissionEntityFilterData = IEntitySearch<EntityEnum.PERMISSION>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
2
|
-
import { EntityEnum, IEntitySearch } from "./entity-utils.interface";
|
|
3
|
-
export interface IRoleEntity extends IAuditColumnEntity {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
organizationId: number;
|
|
8
|
-
}
|
|
9
|
-
export type IRoleEntityFilterData = IEntitySearch<EntityEnum.ROLE>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
2
|
-
import { EntityEnum, IEntitySearch } from "./entity-utils.interface";
|
|
3
|
-
export interface IRolePermissionMappingEntity extends IAuditColumnEntity {
|
|
4
|
-
id: number;
|
|
5
|
-
roleId: number;
|
|
6
|
-
permissionId: number;
|
|
7
|
-
}
|
|
8
|
-
export type IRolePermissionMappingEntityFilterData = IEntitySearch<EntityEnum.ROLE_PERMISSION_MAPPING>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { EntityEnum, IPermissionEntity } from "../@type";
|
|
2
|
-
import { BaseEntityModel } from "./base.entity.model";
|
|
3
|
-
export declare class PermissionEntityModel extends BaseEntityModel<EntityEnum.PERMISSION> implements IPermissionEntity {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
organizationId: number;
|
|
8
|
-
createdOn: number;
|
|
9
|
-
updatedOn: number;
|
|
10
|
-
createdBy: number;
|
|
11
|
-
updatedBy: number;
|
|
12
|
-
constructor();
|
|
13
|
-
static fromEntity(entity: IPermissionEntity): PermissionEntityModel;
|
|
14
|
-
/**
|
|
15
|
-
* Return relation configs (if any)
|
|
16
|
-
*/
|
|
17
|
-
getRelationConfigs(): any;
|
|
18
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PermissionEntityModel = void 0;
|
|
4
|
-
const _type_1 = require("../@type");
|
|
5
|
-
const base_entity_model_1 = require("./base.entity.model");
|
|
6
|
-
class PermissionEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(_type_1.EntityEnum.PERMISSION);
|
|
9
|
-
this.id = 0;
|
|
10
|
-
this.name = "";
|
|
11
|
-
this.description = "";
|
|
12
|
-
this.organizationId = 0;
|
|
13
|
-
this.createdOn = 0;
|
|
14
|
-
this.updatedOn = 0;
|
|
15
|
-
this.createdBy = 0;
|
|
16
|
-
this.updatedBy = 0;
|
|
17
|
-
}
|
|
18
|
-
static fromEntity(entity) {
|
|
19
|
-
const result = new PermissionEntityModel();
|
|
20
|
-
Object.assign(result, entity);
|
|
21
|
-
return result;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Return relation configs (if any)
|
|
25
|
-
*/
|
|
26
|
-
getRelationConfigs() {
|
|
27
|
-
return this.constructor.prototype.constructor.relationConfigs;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.PermissionEntityModel = PermissionEntityModel;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EntityEnum } from "../@type";
|
|
2
|
-
import { IRoleEntity } from "../interface/entity/role.entity.interface";
|
|
3
|
-
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
-
export declare class RoleEntityModel extends BaseEntityModel<EntityEnum.ROLE> implements IRoleEntity {
|
|
5
|
-
id: number;
|
|
6
|
-
name: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
organizationId: number;
|
|
9
|
-
createdOn: number;
|
|
10
|
-
updatedOn: number;
|
|
11
|
-
createdBy: number;
|
|
12
|
-
updatedBy: number;
|
|
13
|
-
getRelationConfigs(): any;
|
|
14
|
-
static fromEntity(entity: IRoleEntity): RoleEntityModel;
|
|
15
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RoleEntityModel = void 0;
|
|
4
|
-
const _type_1 = require("../@type");
|
|
5
|
-
const base_entity_model_1 = require("./base.entity.model");
|
|
6
|
-
class RoleEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.id = 0;
|
|
10
|
-
this.name = "";
|
|
11
|
-
this.description = "";
|
|
12
|
-
this.organizationId = 0;
|
|
13
|
-
this.createdOn = 0;
|
|
14
|
-
this.updatedOn = 0;
|
|
15
|
-
this.createdBy = 0;
|
|
16
|
-
this.updatedBy = 0;
|
|
17
|
-
}
|
|
18
|
-
getRelationConfigs() {
|
|
19
|
-
return this.constructor.prototype.constructor.relationConfigs;
|
|
20
|
-
}
|
|
21
|
-
static fromEntity(entity) {
|
|
22
|
-
const result = new RoleEntityModel(_type_1.EntityEnum.ROLE);
|
|
23
|
-
Object.assign(result, entity);
|
|
24
|
-
return result;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.RoleEntityModel = RoleEntityModel;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EntityEnum } from "../@type";
|
|
2
|
-
import { IRolePermissionMappingEntity } from "../interface/entity/role.permission.mapping.entity.interface";
|
|
3
|
-
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
-
export declare class RolePermissionMappingEntityModel extends BaseEntityModel<EntityEnum.ROLE_PERMISSION_MAPPING> implements IRolePermissionMappingEntity {
|
|
5
|
-
id: number;
|
|
6
|
-
roleId: number;
|
|
7
|
-
permissionId: number;
|
|
8
|
-
createdOn: number;
|
|
9
|
-
updatedOn: number;
|
|
10
|
-
createdBy: number;
|
|
11
|
-
updatedBy: number;
|
|
12
|
-
constructor();
|
|
13
|
-
static fromEntity(entity: IRolePermissionMappingEntity): RolePermissionMappingEntityModel;
|
|
14
|
-
getRelationConfigs(): any;
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RolePermissionMappingEntityModel = void 0;
|
|
4
|
-
const _type_1 = require("../@type");
|
|
5
|
-
const base_entity_model_1 = require("./base.entity.model");
|
|
6
|
-
class RolePermissionMappingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(_type_1.EntityEnum.ROLE_PERMISSION_MAPPING);
|
|
9
|
-
this.id = 0;
|
|
10
|
-
this.roleId = 0;
|
|
11
|
-
this.permissionId = 0;
|
|
12
|
-
this.createdOn = 0;
|
|
13
|
-
this.updatedOn = 0;
|
|
14
|
-
this.createdBy = 0;
|
|
15
|
-
this.updatedBy = 0;
|
|
16
|
-
}
|
|
17
|
-
static fromEntity(entity) {
|
|
18
|
-
const result = new RolePermissionMappingEntityModel();
|
|
19
|
-
Object.assign(result, entity);
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
getRelationConfigs() {
|
|
23
|
-
return this.constructor.prototype.constructor.relationConfigs;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.RolePermissionMappingEntityModel = RolePermissionMappingEntityModel;
|