easywork-common-lib 1.0.1145 → 1.0.1147

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.
Files changed (25) hide show
  1. package/dist/entities/helpers/sales/agent/index.d.ts +1 -0
  2. package/dist/entities/helpers/sales/agent/index.js +1 -0
  3. package/dist/entities/helpers/sales/agent/index.js.map +1 -1
  4. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.d.ts +3 -0
  5. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.js +27 -0
  6. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.js.map +1 -1
  7. package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.d.ts +9 -0
  8. package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.js +65 -0
  9. package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.js.map +1 -0
  10. package/dist/entities/subscriptions/plan-feature.entity.js +1 -1
  11. package/dist/entities/subscriptions/plan-feature.entity.js.map +1 -1
  12. package/dist/modules/authorization/authorization.module.d.ts +2 -2
  13. package/dist/modules/authorization/usage-example.d.ts +35 -0
  14. package/dist/modules/authorization/usage-example.js +180 -0
  15. package/dist/modules/authorization/usage-example.js.map +1 -0
  16. package/package.json +1 -1
  17. package/dist/entities/subscriptions/feature.d.ts +0 -15
  18. package/dist/entities/subscriptions/feature.js +0 -64
  19. package/dist/entities/subscriptions/feature.js.map +0 -1
  20. package/dist/entities/subscriptions/plan-feature.d.ts +0 -8
  21. package/dist/entities/subscriptions/plan-feature.js +0 -44
  22. package/dist/entities/subscriptions/plan-feature.js.map +0 -1
  23. package/dist/entities/user-group.entity.d.ts +0 -5
  24. package/dist/entities/user-group.entity.js +0 -31
  25. package/dist/entities/user-group.entity.js.map +0 -1
@@ -5,4 +5,5 @@ export * from "./connection/h_agent_connection_stage.entity";
5
5
  export * from "./recruitment/h_agent_recruitment.entity";
6
6
  export * from "./recruitment/h_agent_recruitment_stage.entity";
7
7
  export * from "./recruitment/h_agent_recruitment_other_referrals.entity";
8
+ export * from "./recruitment/training-type.entity";
8
9
  export * from "./h_agent_experiences.entity";
@@ -21,5 +21,6 @@ __exportStar(require("./connection/h_agent_connection_stage.entity"), exports);
21
21
  __exportStar(require("./recruitment/h_agent_recruitment.entity"), exports);
22
22
  __exportStar(require("./recruitment/h_agent_recruitment_stage.entity"), exports);
23
23
  __exportStar(require("./recruitment/h_agent_recruitment_other_referrals.entity"), exports);
24
+ __exportStar(require("./recruitment/training-type.entity"), exports);
24
25
  __exportStar(require("./h_agent_experiences.entity"), exports);
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/agent/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,yDAAuC;AACvC,yEAAuD;AACvD,+EAA6D;AAC7D,2EAAyD;AACzD,iFAA+D;AAC/D,2FAAyE;AACzE,+DAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/agent/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,yDAAuC;AACvC,yEAAuD;AACvD,+EAA6D;AAC7D,2EAAyD;AACzD,iFAA+D;AAC/D,2FAAyE;AACzE,qEAAmD;AACnD,+DAA6C"}
@@ -3,6 +3,7 @@ import { AgentRecruitmentStage } from "./h_agent_recruitment_stage.entity";
3
3
  import { BaseEntitySimple } from "../../../../../common";
4
4
  import { User } from "../../../../user.entity";
5
5
  import { AgentRecruitmentOtherReferrals } from "./h_agent_recruitment_other_referrals.entity";
6
+ import { TrainingType } from "./training-type.entity";
6
7
  export declare class AgentRecruitment extends BaseEntitySimple {
7
8
  agentId: string;
8
9
  agentRecruitmentStageId: string;
@@ -19,4 +20,6 @@ export declare class AgentRecruitment extends BaseEntitySimple {
19
20
  recruitmentStatus?: string;
20
21
  referrerAgent?: Agent;
21
22
  referrerInactive?: AgentRecruitmentOtherReferrals;
23
+ trainingTypeId?: string;
24
+ trainingType?: TrainingType;
22
25
  }
@@ -18,6 +18,7 @@ const h_agent_recruitment_stage_entity_1 = require("./h_agent_recruitment_stage.
18
18
  const common_1 = require("../../../../../common");
19
19
  const user_entity_1 = require("../../../../user.entity");
20
20
  const h_agent_recruitment_other_referrals_entity_1 = require("./h_agent_recruitment_other_referrals.entity");
21
+ const training_type_entity_1 = require("./training-type.entity");
21
22
  let AgentRecruitment = class AgentRecruitment extends common_1.BaseEntitySimple {
22
23
  agentId;
23
24
  agentRecruitmentStageId;
@@ -34,6 +35,8 @@ let AgentRecruitment = class AgentRecruitment extends common_1.BaseEntitySimple
34
35
  recruitmentStatus;
35
36
  referrerAgent;
36
37
  referrerInactive;
38
+ trainingTypeId;
39
+ trainingType;
37
40
  };
38
41
  exports.AgentRecruitment = AgentRecruitment;
39
42
  __decorate([
@@ -186,6 +189,30 @@ __decorate([
186
189
  }),
187
190
  __metadata("design:type", h_agent_recruitment_other_referrals_entity_1.AgentRecruitmentOtherReferrals)
188
191
  ], AgentRecruitment.prototype, "referrerInactive", void 0);
192
+ __decorate([
193
+ (0, swagger_1.ApiProperty)({
194
+ type: String,
195
+ description: "ID of the associated training type",
196
+ format: "uuid",
197
+ required: false,
198
+ }),
199
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
200
+ __metadata("design:type", String)
201
+ ], AgentRecruitment.prototype, "trainingTypeId", void 0);
202
+ __decorate([
203
+ (0, swagger_1.ApiProperty)({
204
+ type: () => training_type_entity_1.TrainingType,
205
+ description: "Training type associated with this recruitment",
206
+ required: false,
207
+ }),
208
+ (0, typeorm_1.ManyToOne)(() => training_type_entity_1.TrainingType, (trainingType) => trainingType.recruitments, {
209
+ nullable: true,
210
+ onDelete: "SET NULL",
211
+ onUpdate: "CASCADE",
212
+ }),
213
+ (0, typeorm_1.JoinColumn)(),
214
+ __metadata("design:type", training_type_entity_1.TrainingType)
215
+ ], AgentRecruitment.prototype, "trainingType", void 0);
189
216
  exports.AgentRecruitment = AgentRecruitment = __decorate([
190
217
  (0, typeorm_1.Entity)()
191
218
  ], AgentRecruitment);
@@ -1 +1 @@
1
- {"version":3,"file":"h_agent_recruitment.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,yDAA4C;AAC5C,6CAA8C;AAC9C,6CAA0C;AAC1C,yFAA2E;AAC3E,kDAAyD;AACzD,yDAA+C;AAC/C,6GAA8F;AAGvF,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,yBAAgB;IAQpD,OAAO,CAAS;IAShB,uBAAuB,CAAS;IAQhC,QAAQ,CAAS;IASjB,SAAS,CAAO;IAShB,OAAO,CAAO;IASd,SAAS,CAAO;IAShB,YAAY,CAAO;IASnB,kBAAkB,CAAO;IASzB,mBAAmB,CAAO;IAS1B,UAAU,CAAO;IAOV,KAAK,CAAQ;IAWb,qBAAqB,CAAwB;IASpD,iBAAiB,CAAU;IAe3B,aAAa,CAAS;IAatB,gBAAgB,CAAkC;CACnD,CAAA;AAhJY,4CAAgB;AAQ3B;IAPC,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,4BAA4B;QACzC,MAAM,EAAE,MAAM;KACf,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACT;AAShB;IAPC,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,4CAA4C;QACzD,MAAM,EAAE,MAAM;KACf,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iEACO;AAQhC;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAA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WAAW,EAAE,uBAAuB;QACpC,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,aAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE;QAC7D,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;8BACxB,aAAK;uDAAC;AAatB;IAXC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,2EAA8B,CAAC;QAC5C,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2EAA8B,EAAE;QAC/C,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACZ,CAAC;8BACiB,2EAA8B;0DAAC;2BA/IvC,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CAgJ5B"}
1
+ {"version":3,"file":"h_agent_recruitment.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,yDAA4C;AAC5C,6CAA8C;AAC9C,6CAA0C;AAC1C,yFAA2E;AAC3E,kDAAyD;AACzD,yDAA+C;AAC/C,6GAA8F;AAC9F,iEAAsD;AAG/C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,yBAAgB;IAQpD,OAAO,CAAS;IAShB,uBAAuB,CAAS;IAQhC,QAAQ,CAAS;IASjB,SAAS,CAAO;IAShB,OAAO,CAAO;IASd,SAAS,CAAO;IAShB,YAAY,CAAO;I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C,GAAG,EAAE,CAAC,2EAA8B,EAAE;QAC/C,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACZ,CAAC;8BACiB,2EAA8B;0DAAC;AASlD;IAPC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,oCAAoC;QACjD,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACjB;AAaxB;IAXC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,mCAAY;QACxB,WAAW,EAAE,gDAAgD;QAC7D,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE;QAC1E,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,GAAE;8BACE,mCAAY;sDAAC;2BArKjB,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CAsK5B"}
@@ -0,0 +1,9 @@
1
+ import { BaseEntitySimple } from "../../../../../common";
2
+ import { Group } from "../../../../group.entity";
3
+ import { AgentRecruitment } from "./h_agent_recruitment.entity";
4
+ export declare class TrainingType extends BaseEntitySimple {
5
+ name: string;
6
+ groupId?: string;
7
+ group?: Group;
8
+ recruitments: AgentRecruitment[];
9
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TrainingType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const swagger_1 = require("@nestjs/swagger");
15
+ const common_1 = require("../../../../../common");
16
+ const group_entity_1 = require("../../../../group.entity");
17
+ const h_agent_recruitment_entity_1 = require("./h_agent_recruitment.entity");
18
+ let TrainingType = class TrainingType extends common_1.BaseEntitySimple {
19
+ name;
20
+ groupId;
21
+ group;
22
+ recruitments;
23
+ };
24
+ exports.TrainingType = TrainingType;
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({
27
+ type: String,
28
+ description: "Name of the training type",
29
+ example: "Basic Sales Training"
30
+ }),
31
+ (0, typeorm_1.Column)({ length: 255 }),
32
+ __metadata("design:type", String)
33
+ ], TrainingType.prototype, "name", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({
36
+ type: String,
37
+ description: "ID of the associated group (nullable - applies to all groups if null)",
38
+ format: "uuid",
39
+ required: false,
40
+ }),
41
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
42
+ __metadata("design:type", String)
43
+ ], TrainingType.prototype, "groupId", void 0);
44
+ __decorate([
45
+ (0, swagger_1.ApiProperty)({
46
+ type: () => group_entity_1.Group,
47
+ description: "Group entity associated (nullable - applies to all groups if null)",
48
+ required: false,
49
+ }),
50
+ (0, typeorm_1.ManyToOne)(() => group_entity_1.Group, { nullable: true, onDelete: "SET NULL" }),
51
+ (0, typeorm_1.JoinColumn)(),
52
+ __metadata("design:type", group_entity_1.Group)
53
+ ], TrainingType.prototype, "group", void 0);
54
+ __decorate([
55
+ (0, swagger_1.ApiProperty)({
56
+ type: () => [h_agent_recruitment_entity_1.AgentRecruitment],
57
+ description: "Agent recruitments using this training type",
58
+ }),
59
+ (0, typeorm_1.OneToMany)(() => h_agent_recruitment_entity_1.AgentRecruitment, (recruitment) => recruitment.trainingType),
60
+ __metadata("design:type", Array)
61
+ ], TrainingType.prototype, "recruitments", void 0);
62
+ exports.TrainingType = TrainingType = __decorate([
63
+ (0, typeorm_1.Entity)()
64
+ ], TrainingType);
65
+ //# sourceMappingURL=training-type.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"training-type.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/helpers/sales/agent/recruitment/training-type.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA2E;AAC3E,6CAA8C;AAC9C,kDAAyD;AACzD,2DAAiD;AACjD,6EAAgE;AAGzD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,yBAAgB;IAOhD,IAAI,CAAS;IASb,OAAO,CAAU;IASjB,KAAK,CAAS;IAOd,YAAY,CAAqB;CAClC,CAAA;AAjCY,oCAAY;AAOvB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,sBAAsB;KAChC,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;0CACX;AASb;IAPC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,uEAAuE;QACpF,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACxB;AASjB;IAPC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,oBAAK;QACjB,WAAW,EAAE,oEAAoE;QACjF,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAChE,IAAA,oBAAU,GAAE;8BACL,oBAAK;2CAAC;AAOd;IALC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,6CAAgB,CAAC;QAC9B,WAAW,EAAE,6CAA6C;KAC3D,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAgB,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC;;kDAC5C;uBAhCtB,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAiCxB"}
@@ -34,7 +34,7 @@ __decorate([
34
34
  ], PlanFeature.prototype, "value", void 0);
35
35
  __decorate([
36
36
  (0, swagger_1.ApiProperty)({ description: 'Tipo de dato del valor de la característica', enum: ['boolean', 'string', 'number'], example: 'string' }),
37
- (0, typeorm_1.Column)({ type: 'enum', enum: ['boolean', 'string', 'number'], nullable: false }),
37
+ (0, typeorm_1.Column)({ type: 'enum', enum: ['boolean', 'string', 'number'], nullable: true, default: 'string' }),
38
38
  __metadata("design:type", String)
39
39
  ], PlanFeature.prototype, "type", void 0);
40
40
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"plan-feature.entity.js","sourceRoot":"","sources":["../../../src/entities/subscriptions/plan-feature.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4E;AAC5E,+CAAqC;AACrC,6CAA8C;AAC9C,qDAA2C;AAGpC,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEtB,EAAE,CAAS;IAIX,KAAK,CAAS;IAId,IAAI,CAAkC;IAItC,IAAI,CAAU;IAGd,IAAI,CAAO;IAGX,OAAO,CAAU;CAClB,CAAA;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C,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACpE,kBAAI;yCAAC;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;8BACvF,wBAAO;4CAAC;sBApBN,WAAW;IADvB,IAAA,gBAAM,EAAC,eAAe,CAAC;GACX,WAAW,CAqBvB"}
@@ -19,8 +19,8 @@ export declare class AuthorizationModule {
19
19
  }): {
20
20
  module: typeof AuthorizationModule;
21
21
  imports: import("@nestjs/common").DynamicModule[];
22
- providers: (typeof ResourceAccessFilterService | typeof ResourceAuthorizationService | typeof DynamicFilterService | typeof PermissionEvaluatorService | typeof PermissionCacheService | typeof AuthorizationService | typeof ResourceAuthorizationFactory | typeof ContactAuthorizationService | typeof LeadAuthorizationService | typeof PolicyAuthorizationService | typeof TaskAuthorizationService)[];
23
- exports: (typeof ResourceAccessFilterService | typeof ResourceAuthorizationService | typeof DynamicFilterService | typeof PermissionEvaluatorService | typeof PermissionCacheService | typeof AuthorizationService | typeof ResourceAuthorizationFactory | typeof ContactAuthorizationService | typeof LeadAuthorizationService | typeof PolicyAuthorizationService | typeof TaskAuthorizationService)[];
22
+ providers: (typeof TaskAuthorizationService | typeof PolicyAuthorizationService | typeof LeadAuthorizationService | typeof ContactAuthorizationService | typeof ResourceAuthorizationFactory | typeof PermissionEvaluatorService | typeof AuthorizationService | typeof PermissionCacheService | typeof ResourceAccessFilterService | typeof ResourceAuthorizationService | typeof DynamicFilterService)[];
23
+ exports: (typeof TaskAuthorizationService | typeof PolicyAuthorizationService | typeof LeadAuthorizationService | typeof ContactAuthorizationService | typeof ResourceAuthorizationFactory | typeof PermissionEvaluatorService | typeof AuthorizationService | typeof PermissionCacheService | typeof ResourceAccessFilterService | typeof ResourceAuthorizationService | typeof DynamicFilterService)[];
24
24
  global: boolean;
25
25
  };
26
26
  }
@@ -0,0 +1,35 @@
1
+ export declare class AppModule {
2
+ }
3
+ import { Repository } from 'typeorm';
4
+ import { ContactAuthorizationService, ResourceAuthorizationFactory, PermissionAction } from 'easywork-common-lib/modules';
5
+ import { Contact, SubGroup, User } from 'easywork-common-lib/entities';
6
+ export declare class ContactService {
7
+ private contactRepository;
8
+ private subGroupRepository;
9
+ private readonly contactAuthService;
10
+ private readonly authFactory;
11
+ constructor(contactRepository: Repository<Contact>, subGroupRepository: Repository<SubGroup>, contactAuthService: ContactAuthorizationService, authFactory: ResourceAuthorizationFactory);
12
+ getAllContacts(user: User): Promise<Contact[]>;
13
+ getContactById(id: string, user: User): Promise<Contact>;
14
+ }
15
+ export declare class PoliciesService {
16
+ private subGroupRepository;
17
+ private readonly authFactory;
18
+ constructor(subGroupRepository: Repository<SubGroup>, authFactory: ResourceAuthorizationFactory);
19
+ getAllPolicies(user: User): Promise<any>;
20
+ }
21
+ import { AuthorizationService } from 'easywork-common-lib/modules';
22
+ export declare class GenericResourceService {
23
+ private readonly authService;
24
+ constructor(authService: AuthorizationService);
25
+ checkUserAccess(user: User, action: PermissionAction, resource: string): Promise<any>;
26
+ validateMultiplePermissions(user: User): Promise<any>;
27
+ }
28
+ export declare class ContactController {
29
+ private readonly contactService;
30
+ constructor(contactService: ContactService);
31
+ getAllContacts(user: User): Promise<Contact[]>;
32
+ getContactById(id: string, user: User): Promise<Contact>;
33
+ }
34
+ export declare class ContactModule {
35
+ }
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var _a, _b, _c, _d, _e, _f;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ContactModule = exports.ContactController = exports.GenericResourceService = exports.PoliciesService = exports.ContactService = exports.AppModule = void 0;
17
+ const common_1 = require("@nestjs/common");
18
+ const modules_1 = require("easywork-common-lib/modules");
19
+ let AppModule = class AppModule {
20
+ };
21
+ exports.AppModule = AppModule;
22
+ exports.AppModule = AppModule = __decorate([
23
+ (0, common_1.Module)({
24
+ imports: [
25
+ modules_1.AuthorizationModule,
26
+ modules_1.AuthorizationModule.forRoot({
27
+ cache: {
28
+ ttl: 600,
29
+ max: 2000,
30
+ },
31
+ }),
32
+ ],
33
+ })
34
+ ], AppModule);
35
+ const common_2 = require("@nestjs/common");
36
+ const typeorm_1 = require("typeorm");
37
+ const typeorm_2 = require("@nestjs/typeorm");
38
+ const modules_2 = require("easywork-common-lib/modules");
39
+ const entities_1 = require("easywork-common-lib/entities");
40
+ let ContactService = class ContactService {
41
+ contactRepository;
42
+ subGroupRepository;
43
+ contactAuthService;
44
+ authFactory;
45
+ constructor(contactRepository, subGroupRepository, contactAuthService, authFactory) {
46
+ this.contactRepository = contactRepository;
47
+ this.subGroupRepository = subGroupRepository;
48
+ this.contactAuthService = contactAuthService;
49
+ this.authFactory = authFactory;
50
+ }
51
+ async getAllContacts(user) {
52
+ const queryBuilder = this.contactRepository
53
+ .createQueryBuilder('contact');
54
+ await this.contactAuthService.applyContactPermissionFilters(queryBuilder, user, {
55
+ action: modules_2.PermissionAction.READ,
56
+ subGroupRepository: this.subGroupRepository,
57
+ });
58
+ return queryBuilder.getMany();
59
+ }
60
+ async getContactById(id, user) {
61
+ const contact = await this.contactRepository.findOne({ where: { id } });
62
+ if (!contact) {
63
+ throw new Error('Contact not found');
64
+ }
65
+ await this.contactAuthService.validateContactAccess(user, modules_2.PermissionAction.READ, contact, this.subGroupRepository);
66
+ return contact;
67
+ }
68
+ };
69
+ exports.ContactService = ContactService;
70
+ exports.ContactService = ContactService = __decorate([
71
+ (0, common_2.Injectable)(),
72
+ __param(0, (0, typeorm_2.InjectRepository)(entities_1.Contact)),
73
+ __param(1, (0, typeorm_2.InjectRepository)(entities_1.SubGroup)),
74
+ __metadata("design:paramtypes", [typeorm_1.Repository,
75
+ typeorm_1.Repository, typeof (_a = typeof modules_2.ContactAuthorizationService !== "undefined" && modules_2.ContactAuthorizationService) === "function" ? _a : Object, typeof (_b = typeof modules_2.ResourceAuthorizationFactory !== "undefined" && modules_2.ResourceAuthorizationFactory) === "function" ? _b : Object])
76
+ ], ContactService);
77
+ let PoliciesService = class PoliciesService {
78
+ subGroupRepository;
79
+ authFactory;
80
+ constructor(subGroupRepository, authFactory) {
81
+ this.subGroupRepository = subGroupRepository;
82
+ this.authFactory = authFactory;
83
+ }
84
+ async getAllPolicies(user) {
85
+ const queryBuilder = this.policyRepository
86
+ .createQueryBuilder('policy');
87
+ const policyAuth = this.authFactory.forPolicy(this.subGroupRepository);
88
+ await policyAuth.applyPermissionFilters(queryBuilder, user, {
89
+ action: modules_2.PermissionAction.READ,
90
+ });
91
+ return queryBuilder.getMany();
92
+ }
93
+ };
94
+ exports.PoliciesService = PoliciesService;
95
+ exports.PoliciesService = PoliciesService = __decorate([
96
+ (0, common_2.Injectable)(),
97
+ __param(0, (0, typeorm_2.InjectRepository)(entities_1.SubGroup)),
98
+ __metadata("design:paramtypes", [typeorm_1.Repository, typeof (_c = typeof modules_2.ResourceAuthorizationFactory !== "undefined" && modules_2.ResourceAuthorizationFactory) === "function" ? _c : Object])
99
+ ], PoliciesService);
100
+ const modules_3 = require("easywork-common-lib/modules");
101
+ let GenericResourceService = class GenericResourceService {
102
+ authService;
103
+ constructor(authService) {
104
+ this.authService = authService;
105
+ }
106
+ async checkUserAccess(user, action, resource) {
107
+ const result = await this.authService.canAccess({
108
+ user,
109
+ action,
110
+ resource,
111
+ });
112
+ return result.allowed;
113
+ }
114
+ async validateMultiplePermissions(user) {
115
+ const results = await this.authService.canAccessMultiple([
116
+ { user, action: modules_2.PermissionAction.READ, resource: 'contact' },
117
+ { user, action: modules_2.PermissionAction.CREATE, resource: 'lead' },
118
+ { user, action: modules_2.PermissionAction.UPDATE, resource: 'policy' },
119
+ ]);
120
+ return results;
121
+ }
122
+ };
123
+ exports.GenericResourceService = GenericResourceService;
124
+ exports.GenericResourceService = GenericResourceService = __decorate([
125
+ (0, common_2.Injectable)(),
126
+ __metadata("design:paramtypes", [typeof (_d = typeof modules_3.AuthorizationService !== "undefined" && modules_3.AuthorizationService) === "function" ? _d : Object])
127
+ ], GenericResourceService);
128
+ const common_3 = require("@nestjs/common");
129
+ const modules_4 = require("easywork-common-lib/modules");
130
+ const your_auth_decorator_1 = require("your-auth-decorator");
131
+ let ContactController = class ContactController {
132
+ contactService;
133
+ constructor(contactService) {
134
+ this.contactService = contactService;
135
+ }
136
+ async getAllContacts(user) {
137
+ return this.contactService.getAllContacts(user);
138
+ }
139
+ async getContactById(id, user) {
140
+ return this.contactService.getContactById(id, user);
141
+ }
142
+ };
143
+ exports.ContactController = ContactController;
144
+ __decorate([
145
+ (0, common_3.Get)(),
146
+ __param(0, (0, your_auth_decorator_1.CurrentUser)()),
147
+ __metadata("design:type", Function),
148
+ __metadata("design:paramtypes", [typeof (_e = typeof entities_1.User !== "undefined" && entities_1.User) === "function" ? _e : Object]),
149
+ __metadata("design:returntype", Promise)
150
+ ], ContactController.prototype, "getAllContacts", null);
151
+ __decorate([
152
+ (0, common_3.Get)(':id'),
153
+ __param(0, (0, common_3.Param)('id')),
154
+ __param(1, (0, your_auth_decorator_1.CurrentUser)()),
155
+ __metadata("design:type", Function),
156
+ __metadata("design:paramtypes", [String, typeof (_f = typeof entities_1.User !== "undefined" && entities_1.User) === "function" ? _f : Object]),
157
+ __metadata("design:returntype", Promise)
158
+ ], ContactController.prototype, "getContactById", null);
159
+ exports.ContactController = ContactController = __decorate([
160
+ (0, common_3.Controller)('contacts'),
161
+ (0, common_3.UseGuards)(modules_4.EnhancedRolesPolicyGuard),
162
+ __metadata("design:paramtypes", [ContactService])
163
+ ], ContactController);
164
+ let ContactModule = class ContactModule {
165
+ };
166
+ exports.ContactModule = ContactModule;
167
+ exports.ContactModule = ContactModule = __decorate([
168
+ (0, common_1.Module)({
169
+ imports: [
170
+ TypeOrmModule.forFeature([entities_1.Contact, entities_1.Lead, Policy]),
171
+ ],
172
+ controllers: [ContactController],
173
+ providers: [
174
+ ContactService,
175
+ PoliciesService,
176
+ GenericResourceService,
177
+ ],
178
+ })
179
+ ], ContactModule);
180
+ //# sourceMappingURL=usage-example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-example.js","sourceRoot":"","sources":["../../../src/modules/authorization/usage-example.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiBA,2CAAwC;AACxC,yDAAkE;AAoB3D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAlBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YAEP,6BAAmB;YAGnB,6BAAmB,CAAC,OAAO,CAAC;gBAC1B,KAAK,EAAE;oBACL,GAAG,EAAE,GAAG;oBACR,GAAG,EAAE,IAAI;iBAEV;aACF,CAAC;SAGH;KAEF,CAAC;GACW,SAAS,CAAG;AAMzB,2CAA4C;AAC5C,qCAAqC;AACrC,6CAAmD;AACnD,yDAKqC;AACrC,2DAA6E;AAGtE,IAAM,cAAc,GAApB,MAAM,cAAc;IAGf;IAGA;IA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U,iBAAiB;IAF7B,IAAA,mBAAU,EAAC,UAAU,CAAC;IACtB,IAAA,kBAAS,EAAC,kCAAwB,CAAC;qCAEW,cAAc;GADhD,iBAAiB,CAe7B;AAoBM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAbzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,aAAa,CAAC,UAAU,CAAC,CAAC,kBAAO,EAAE,eAAI,EAAE,MAAM,CAAC,CAAC;SAElD;QACD,WAAW,EAAE,CAAC,iBAAiB,CAAC;QAChC,SAAS,EAAE;YACT,cAAc;YACd,eAAe;YACf,sBAAsB;SAEvB;KACF,CAAC;GACW,aAAa,CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easywork-common-lib",
3
- "version": "1.0.1145",
3
+ "version": "1.0.1147",
4
4
  "description": "Librería común de Easywork",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,15 +0,0 @@
1
- import { BaseEntityOnlyEssential } from '../../common/database/base.entity';
2
- import { PlanFeature } from './plan-feature';
3
- export declare enum FeatureType {
4
- BOOLEAN = "boolean",
5
- LIMIT = "limit",
6
- TEXT = "text"
7
- }
8
- export declare class Feature extends BaseEntityOnlyEssential {
9
- key: string;
10
- name: string;
11
- description: string;
12
- category: string;
13
- type: FeatureType;
14
- planFeatures: PlanFeature[];
15
- }
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Feature = exports.FeatureType = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const base_entity_1 = require("../../common/database/base.entity");
15
- const swagger_1 = require("@nestjs/swagger");
16
- const plan_feature_1 = require("./plan-feature");
17
- var FeatureType;
18
- (function (FeatureType) {
19
- FeatureType["BOOLEAN"] = "boolean";
20
- FeatureType["LIMIT"] = "limit";
21
- FeatureType["TEXT"] = "text";
22
- })(FeatureType || (exports.FeatureType = FeatureType = {}));
23
- let Feature = class Feature extends base_entity_1.BaseEntityOnlyEssential {
24
- key;
25
- name;
26
- description;
27
- category;
28
- type;
29
- planFeatures;
30
- };
31
- exports.Feature = Feature;
32
- __decorate([
33
- (0, swagger_1.ApiProperty)({ description: 'Nombre único y programático de la característica', example: 'PRO_POLICY_READER' }),
34
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, unique: true, nullable: false }),
35
- __metadata("design:type", String)
36
- ], Feature.prototype, "key", void 0);
37
- __decorate([
38
- (0, swagger_1.ApiProperty)({ description: 'Nombre de la característica para mostrar al usuario', example: 'Lector de Pólizas Pro' }),
39
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
40
- __metadata("design:type", String)
41
- ], Feature.prototype, "name", void 0);
42
- __decorate([
43
- (0, swagger_1.ApiProperty)({ description: 'Descripción detallada de lo que hace la característica', example: 'Permite analizar y extraer datos de pólizas en formato PDF.' }),
44
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
45
- __metadata("design:type", String)
46
- ], Feature.prototype, "description", void 0);
47
- __decorate([
48
- (0, swagger_1.ApiProperty)({ description: 'Categoría para agrupar en la UI', example: 'Reportes' }),
49
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
50
- __metadata("design:type", String)
51
- ], Feature.prototype, "category", void 0);
52
- __decorate([
53
- (0, swagger_1.ApiProperty)({ description: 'El tipo de valor que esta característica almacena', enum: FeatureType, example: FeatureType.BOOLEAN }),
54
- (0, typeorm_1.Column)({ type: 'enum', enum: FeatureType, nullable: false }),
55
- __metadata("design:type", String)
56
- ], Feature.prototype, "type", void 0);
57
- __decorate([
58
- (0, typeorm_1.OneToMany)(() => plan_feature_1.PlanFeature, planFeature => planFeature.feature),
59
- __metadata("design:type", Array)
60
- ], Feature.prototype, "planFeatures", void 0);
61
- exports.Feature = Feature = __decorate([
62
- (0, typeorm_1.Entity)('features')
63
- ], Feature);
64
- //# sourceMappingURL=feature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../src/entities/subscriptions/feature.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAoD;AACpD,mEAA4E;AAC5E,6CAA8C;AAC9C,iDAA6C;AAE7C,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAGM,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qCAAuB;IAGlD,GAAG,CAAS;IAIZ,IAAI,CAAS;IAIb,WAAW,CAAS;IAIpB,QAAQ,CAAS;IAIjB,IAAI,CAAc;IAGlB,YAAY,CAAgB;CAC7B,CAAA;AAvBY,0BAAO;AAGlB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,kDAAkD,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC9G,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;oCAC5D;AAIZ;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,qDAAqD,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACrH,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;qCAC7C;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,wDAAwD,EAAE,OAAO,EAAE,6DAA6D,EAAE,CAAC;IAC9J,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACrB;AAIpB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IACpF,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACxC;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mDAAmD,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC;IAClI,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;qCAC3C;AAGlB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;6CACrC;kBAtBjB,OAAO;IADnB,IAAA,gBAAM,EAAC,UAAU,CAAC;GACN,OAAO,CAuBnB"}
@@ -1,8 +0,0 @@
1
- import { Plan } from './plan.entity';
2
- import { Feature } from './feature';
3
- export declare class PlanFeature {
4
- id: string;
5
- value: string;
6
- plan: Plan;
7
- feature: Feature;
8
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.PlanFeature = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const plan_entity_1 = require("./plan.entity");
15
- const swagger_1 = require("@nestjs/swagger");
16
- const feature_1 = require("./feature");
17
- let PlanFeature = class PlanFeature {
18
- id;
19
- value;
20
- plan;
21
- feature;
22
- };
23
- exports.PlanFeature = PlanFeature;
24
- __decorate([
25
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
26
- __metadata("design:type", String)
27
- ], PlanFeature.prototype, "id", void 0);
28
- __decorate([
29
- (0, swagger_1.ApiProperty)({ description: 'Valor de la característica para este plan. Puede ser "true", "100", "ilimitado", etc.', example: 'true' }),
30
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
31
- __metadata("design:type", String)
32
- ], PlanFeature.prototype, "value", void 0);
33
- __decorate([
34
- (0, typeorm_1.ManyToOne)(() => plan_entity_1.Plan, plan => plan.planFeatures, { onDelete: 'CASCADE' }),
35
- __metadata("design:type", plan_entity_1.Plan)
36
- ], PlanFeature.prototype, "plan", void 0);
37
- __decorate([
38
- (0, typeorm_1.ManyToOne)(() => feature_1.Feature, feature => feature.planFeatures, { onDelete: 'CASCADE', eager: true }),
39
- __metadata("design:type", feature_1.Feature)
40
- ], PlanFeature.prototype, "feature", void 0);
41
- exports.PlanFeature = PlanFeature = __decorate([
42
- (0, typeorm_1.Entity)('plan_features')
43
- ], PlanFeature);
44
- //# sourceMappingURL=plan-feature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan-feature.js","sourceRoot":"","sources":["../../../src/entities/subscriptions/plan-feature.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4E;AAC5E,+CAAqC;AACrC,6CAA8C;AAC9C,uCAAoC;AAG7B,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEtB,EAAE,CAAS;IAIX,KAAK,CAAS;IAGd,IAAI,CAAO;IAGX,OAAO,CAAU;CAClB,CAAA;AAbY,kCAAW;AAEtB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;uCACpB;AAIX;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,uFAAuF,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IACtI,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0CAC5C;AAGd;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACpE,kBAAI;yCAAC;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iBAAO,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;8BACvF,iBAAO;4CAAC;sBAZN,WAAW;IADvB,IAAA,gBAAM,EAAC,eAAe,CAAC;GACX,WAAW,CAavB"}
@@ -1,5 +0,0 @@
1
- import { EntityBase } from '../common/database/base.entity';
2
- import { Role } from './role.entity';
3
- export declare class UserGroupNewRelation extends EntityBase {
4
- role: Role;
5
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UserGroupNewRelation = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const base_entity_1 = require("../common/database/base.entity");
15
- const role_entity_1 = require("./role.entity");
16
- let UserGroupNewRelation = class UserGroupNewRelation extends base_entity_1.EntityBase {
17
- role;
18
- };
19
- exports.UserGroupNewRelation = UserGroupNewRelation;
20
- __decorate([
21
- (0, typeorm_1.ManyToOne)(() => role_entity_1.Role, {
22
- onDelete: 'RESTRICT',
23
- onUpdate: 'CASCADE',
24
- }),
25
- (0, typeorm_1.JoinColumn)(),
26
- __metadata("design:type", role_entity_1.Role)
27
- ], UserGroupNewRelation.prototype, "role", void 0);
28
- exports.UserGroupNewRelation = UserGroupNewRelation = __decorate([
29
- (0, typeorm_1.Entity)()
30
- ], UserGroupNewRelation);
31
- //# sourceMappingURL=user-group.entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-group.entity.js","sourceRoot":"","sources":["../../src/entities/user-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AACxD,gEAA4D;AAG5D,+CAAqC;AAI9B,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,wBAAU;IA4BlD,IAAI,CAAO;CACZ,CAAA;AA7BY,oDAAoB;AA4B/B;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,GAAE;8BACP,kBAAI;kDAAC;+BA5BA,oBAAoB;IAFhC,IAAA,gBAAM,GAAE;GAEI,oBAAoB,CA6BhC"}