easywork-common-lib 1.0.1179 → 1.0.1180
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/dist/entities/subscriptions/feature.d.ts +15 -0
- package/dist/entities/subscriptions/feature.js +64 -0
- package/dist/entities/subscriptions/feature.js.map +1 -0
- package/dist/entities/subscriptions/plan-feature.d.ts +8 -0
- package/dist/entities/subscriptions/plan-feature.js +44 -0
- package/dist/entities/subscriptions/plan-feature.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-general-config.entity.d.ts +2 -10
- package/dist/entities/tools/calendar/calendar-general-config.entity.js +10 -61
- package/dist/entities/tools/calendar/calendar-general-config.entity.js.map +1 -1
- package/dist/entities/tools/calendar/calendar-item.entity.d.ts +16 -0
- package/dist/entities/tools/calendar/calendar-item.entity.js +129 -1
- package/dist/entities/tools/calendar/calendar-item.entity.js.map +1 -1
- package/dist/entities/user-group.entity.d.ts +1 -5
- package/dist/entities/user-group.entity.js +7 -41
- package/dist/entities/user-group.entity.js.map +1 -1
- package/dist/grpc/drive/drive.proto +310 -310
- package/dist/grpc/drive/leads.proto +114 -114
- package/dist/modules/authorization/authorization.module.d.ts +2 -2
- package/dist/modules/authorization/services/resource-access-filter.service.js +21 -21
- package/package.json +54 -54
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.d.ts +0 -9
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.js +0 -64
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,20 +1,12 @@
|
|
|
1
1
|
import { BaseEntityOnlyEssential } from '../../../common/database/base.entity';
|
|
2
2
|
import { User } from '../../user.entity';
|
|
3
|
+
import { Group } from '../../group.entity';
|
|
3
4
|
export declare class CalendarGeneralConfig extends BaseEntityOnlyEssential {
|
|
4
|
-
timeZone: string;
|
|
5
|
-
calendarIdForInvitation?: string;
|
|
6
|
-
calendarIdForCRM?: string;
|
|
7
|
-
showRejectedEvents: boolean;
|
|
8
|
-
showTasks: boolean;
|
|
9
|
-
synchronizeTasks: boolean;
|
|
10
|
-
doNotInviteIfTimeIsAssigned: boolean;
|
|
11
|
-
showWeekNumber: boolean;
|
|
12
|
-
sendInvitationsByEmail: boolean;
|
|
13
|
-
invitationsByEmailFrom?: string;
|
|
14
5
|
workTimeStart?: string;
|
|
15
6
|
workTimeEnd?: string;
|
|
16
7
|
weekends?: string;
|
|
17
8
|
holidays?: string;
|
|
18
9
|
workingDays?: string;
|
|
19
10
|
user: User;
|
|
11
|
+
group: Group;
|
|
20
12
|
}
|
|
@@ -14,75 +14,17 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const base_entity_1 = require("../../../common/database/base.entity");
|
|
15
15
|
const swagger_1 = require("@nestjs/swagger");
|
|
16
16
|
const user_entity_1 = require("../../user.entity");
|
|
17
|
+
const group_entity_1 = require("../../group.entity");
|
|
17
18
|
let CalendarGeneralConfig = class CalendarGeneralConfig extends base_entity_1.BaseEntityOnlyEssential {
|
|
18
|
-
timeZone;
|
|
19
|
-
calendarIdForInvitation;
|
|
20
|
-
calendarIdForCRM;
|
|
21
|
-
showRejectedEvents;
|
|
22
|
-
showTasks;
|
|
23
|
-
synchronizeTasks;
|
|
24
|
-
doNotInviteIfTimeIsAssigned;
|
|
25
|
-
showWeekNumber;
|
|
26
|
-
sendInvitationsByEmail;
|
|
27
|
-
invitationsByEmailFrom;
|
|
28
19
|
workTimeStart;
|
|
29
20
|
workTimeEnd;
|
|
30
21
|
weekends;
|
|
31
22
|
holidays;
|
|
32
23
|
workingDays;
|
|
33
24
|
user;
|
|
25
|
+
group;
|
|
34
26
|
};
|
|
35
27
|
exports.CalendarGeneralConfig = CalendarGeneralConfig;
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, swagger_1.ApiProperty)({ description: 'General timezone', required: true }),
|
|
38
|
-
(0, typeorm_1.Column)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], CalendarGeneralConfig.prototype, "timeZone", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, swagger_1.ApiProperty)({ description: 'Selected calendar to send invitations', required: false }),
|
|
43
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], CalendarGeneralConfig.prototype, "calendarIdForInvitation", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, swagger_1.ApiProperty)({ description: 'Selected calendar to set CRM integrations', required: false }),
|
|
48
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], CalendarGeneralConfig.prototype, "calendarIdForCRM", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, swagger_1.ApiProperty)({ description: 'Show rejected events', required: true, default: false }),
|
|
53
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
54
|
-
__metadata("design:type", Boolean)
|
|
55
|
-
], CalendarGeneralConfig.prototype, "showRejectedEvents", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, swagger_1.ApiProperty)({ description: 'Show tasks', required: true, default: false }),
|
|
58
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
59
|
-
__metadata("design:type", Boolean)
|
|
60
|
-
], CalendarGeneralConfig.prototype, "showTasks", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, swagger_1.ApiProperty)({ description: 'Synchronize calendar with tasks', required: true, default: false }),
|
|
63
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
64
|
-
__metadata("design:type", Boolean)
|
|
65
|
-
], CalendarGeneralConfig.prototype, "synchronizeTasks", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, swagger_1.ApiProperty)({ description: "Don't send invitations if time is assigned", required: true, default: false }),
|
|
68
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
69
|
-
__metadata("design:type", Boolean)
|
|
70
|
-
], CalendarGeneralConfig.prototype, "doNotInviteIfTimeIsAssigned", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, swagger_1.ApiProperty)({ description: 'Show week number', required: true, default: false }),
|
|
73
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
74
|
-
__metadata("design:type", Boolean)
|
|
75
|
-
], CalendarGeneralConfig.prototype, "showWeekNumber", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, swagger_1.ApiProperty)({ description: 'Send invitations by email', required: true, default: false }),
|
|
78
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
79
|
-
__metadata("design:type", Boolean)
|
|
80
|
-
], CalendarGeneralConfig.prototype, "sendInvitationsByEmail", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, swagger_1.ApiProperty)({ description: 'Email address from invitation will be sent', required: false }),
|
|
83
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], CalendarGeneralConfig.prototype, "invitationsByEmailFrom", void 0);
|
|
86
28
|
__decorate([
|
|
87
29
|
(0, swagger_1.ApiProperty)({ description: 'Work starts at', required: false }),
|
|
88
30
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
@@ -109,10 +51,17 @@ __decorate([
|
|
|
109
51
|
__metadata("design:type", String)
|
|
110
52
|
], CalendarGeneralConfig.prototype, "workingDays", void 0);
|
|
111
53
|
__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)({ description: 'User associated with this configuration', type: () => user_entity_1.User }),
|
|
112
55
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: false, onDelete: 'CASCADE' }),
|
|
113
56
|
__metadata("design:type", user_entity_1.User)
|
|
114
57
|
], CalendarGeneralConfig.prototype, "user", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, swagger_1.ApiProperty)({ description: 'Group associated with this configuration', type: () => group_entity_1.Group }),
|
|
60
|
+
(0, typeorm_1.ManyToOne)(() => group_entity_1.Group, { nullable: false, onDelete: 'CASCADE' }),
|
|
61
|
+
__metadata("design:type", group_entity_1.Group)
|
|
62
|
+
], CalendarGeneralConfig.prototype, "group", void 0);
|
|
115
63
|
exports.CalendarGeneralConfig = CalendarGeneralConfig = __decorate([
|
|
116
|
-
(0, typeorm_1.Entity)()
|
|
64
|
+
(0, typeorm_1.Entity)(),
|
|
65
|
+
(0, typeorm_1.Unique)(['user', 'group'])
|
|
117
66
|
], CalendarGeneralConfig);
|
|
118
67
|
//# sourceMappingURL=calendar-general-config.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-general-config.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/calendar-general-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"calendar-general-config.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/calendar-general-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4D;AAE5D,sEAA+E;AAC/E,6CAA8C;AAC9C,mDAAyC;AACzC,qDAA2C;AAIpC,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,qCAAuB;IAIhE,aAAa,CAAU;IAIvB,WAAW,CAAU;IAIrB,QAAQ,CAAU;IAIlB,QAAQ,CAAU;IAIlB,WAAW,CAAU;IAIrB,IAAI,CAAO;IAIX,KAAK,CAAQ;CACd,CAAA;AA7BY,sDAAqB;AAIhC;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC/D,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACJ;AAIvB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,K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7,10 +7,26 @@ export declare enum CalendarProvider {
|
|
|
7
7
|
ICLOUD = "icloud",
|
|
8
8
|
MICROSOFT = "microsoft"
|
|
9
9
|
}
|
|
10
|
+
export declare enum EmailInvitationSetting {
|
|
11
|
+
UNSPECIFIED = "unspecified",
|
|
12
|
+
ALWAYS_SEND = "always_send",
|
|
13
|
+
NEVER_SEND = "never_send",
|
|
14
|
+
ASK_EACH_TIME = "ask_each_time"
|
|
15
|
+
}
|
|
10
16
|
export declare class CalendarItem extends BaseEntityOnlyEssential {
|
|
11
17
|
name?: string;
|
|
12
18
|
email: string;
|
|
13
19
|
provider: CalendarProvider;
|
|
20
|
+
timezone?: string;
|
|
21
|
+
invitationCalendarId?: string;
|
|
22
|
+
crmCalendarEmail?: string;
|
|
23
|
+
showPastEvents: boolean;
|
|
24
|
+
showTasks: boolean;
|
|
25
|
+
syncTaskCalendar: boolean;
|
|
26
|
+
noInvitationWhenTimeAssigned: boolean;
|
|
27
|
+
showWeekNumber: boolean;
|
|
28
|
+
sendInvitationsByEmail: boolean;
|
|
29
|
+
emailInvitationSetting: EmailInvitationSetting;
|
|
14
30
|
subCalendars: CalendarSubItem[];
|
|
15
31
|
oauth: Oauth;
|
|
16
32
|
user: User;
|
|
@@ -9,8 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CalendarItem = exports.CalendarProvider = void 0;
|
|
12
|
+
exports.CalendarItem = exports.EmailInvitationSetting = exports.CalendarProvider = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
const base_entity_1 = require("../../../common/database/base.entity");
|
|
15
16
|
const oauth_entity_1 = require("../../thirdparty/oauth.entity");
|
|
16
17
|
const user_entity_1 = require("../../user.entity");
|
|
@@ -21,36 +22,163 @@ var CalendarProvider;
|
|
|
21
22
|
CalendarProvider["ICLOUD"] = "icloud";
|
|
22
23
|
CalendarProvider["MICROSOFT"] = "microsoft";
|
|
23
24
|
})(CalendarProvider || (exports.CalendarProvider = CalendarProvider = {}));
|
|
25
|
+
var EmailInvitationSetting;
|
|
26
|
+
(function (EmailInvitationSetting) {
|
|
27
|
+
EmailInvitationSetting["UNSPECIFIED"] = "unspecified";
|
|
28
|
+
EmailInvitationSetting["ALWAYS_SEND"] = "always_send";
|
|
29
|
+
EmailInvitationSetting["NEVER_SEND"] = "never_send";
|
|
30
|
+
EmailInvitationSetting["ASK_EACH_TIME"] = "ask_each_time";
|
|
31
|
+
})(EmailInvitationSetting || (exports.EmailInvitationSetting = EmailInvitationSetting = {}));
|
|
24
32
|
let CalendarItem = class CalendarItem extends base_entity_1.BaseEntityOnlyEssential {
|
|
25
33
|
name;
|
|
26
34
|
email;
|
|
27
35
|
provider;
|
|
36
|
+
timezone;
|
|
37
|
+
invitationCalendarId;
|
|
38
|
+
crmCalendarEmail;
|
|
39
|
+
showPastEvents;
|
|
40
|
+
showTasks;
|
|
41
|
+
syncTaskCalendar;
|
|
42
|
+
noInvitationWhenTimeAssigned;
|
|
43
|
+
showWeekNumber;
|
|
44
|
+
sendInvitationsByEmail;
|
|
45
|
+
emailInvitationSetting;
|
|
28
46
|
subCalendars;
|
|
29
47
|
oauth;
|
|
30
48
|
user;
|
|
31
49
|
};
|
|
32
50
|
exports.CalendarItem = CalendarItem;
|
|
33
51
|
__decorate([
|
|
52
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
53
|
+
description: 'Name of the calendar',
|
|
54
|
+
example: 'My Work Calendar'
|
|
55
|
+
}),
|
|
34
56
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
35
57
|
__metadata("design:type", String)
|
|
36
58
|
], CalendarItem.prototype, "name", void 0);
|
|
37
59
|
__decorate([
|
|
60
|
+
(0, swagger_1.ApiProperty)({
|
|
61
|
+
description: 'Email associated with the calendar',
|
|
62
|
+
example: 'user@example.com'
|
|
63
|
+
}),
|
|
38
64
|
(0, typeorm_1.Column)(),
|
|
39
65
|
__metadata("design:type", String)
|
|
40
66
|
], CalendarItem.prototype, "email", void 0);
|
|
41
67
|
__decorate([
|
|
68
|
+
(0, swagger_1.ApiProperty)({
|
|
69
|
+
description: 'Calendar provider type',
|
|
70
|
+
enum: CalendarProvider,
|
|
71
|
+
example: CalendarProvider.GOOGLE
|
|
72
|
+
}),
|
|
42
73
|
(0, typeorm_1.Column)({ type: 'enum', enum: CalendarProvider }),
|
|
43
74
|
__metadata("design:type", String)
|
|
44
75
|
], CalendarItem.prototype, "provider", void 0);
|
|
45
76
|
__decorate([
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
description: 'Timezone for this calendar',
|
|
79
|
+
example: 'America/New_York'
|
|
80
|
+
}),
|
|
81
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], CalendarItem.prototype, "timezone", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
86
|
+
description: 'Calendar ID used for sending invitations',
|
|
87
|
+
example: 'calendar-123'
|
|
88
|
+
}),
|
|
89
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], CalendarItem.prototype, "invitationCalendarId", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
94
|
+
description: 'Email address for CRM calendar integration',
|
|
95
|
+
example: 'crm@example.com'
|
|
96
|
+
}),
|
|
97
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], CalendarItem.prototype, "crmCalendarEmail", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
102
|
+
description: 'Whether to show past events in calendar view',
|
|
103
|
+
default: false
|
|
104
|
+
}),
|
|
105
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
106
|
+
__metadata("design:type", Boolean)
|
|
107
|
+
], CalendarItem.prototype, "showPastEvents", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
110
|
+
description: 'Whether to show tasks in calendar view',
|
|
111
|
+
default: false
|
|
112
|
+
}),
|
|
113
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
114
|
+
__metadata("design:type", Boolean)
|
|
115
|
+
], CalendarItem.prototype, "showTasks", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
118
|
+
description: 'Whether to synchronize task calendar',
|
|
119
|
+
default: false
|
|
120
|
+
}),
|
|
121
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
122
|
+
__metadata("design:type", Boolean)
|
|
123
|
+
], CalendarItem.prototype, "syncTaskCalendar", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
126
|
+
description: 'Do not send invitation notifications if time is already assigned',
|
|
127
|
+
default: false
|
|
128
|
+
}),
|
|
129
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
130
|
+
__metadata("design:type", Boolean)
|
|
131
|
+
], CalendarItem.prototype, "noInvitationWhenTimeAssigned", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
134
|
+
description: 'Whether to show week numbers in calendar',
|
|
135
|
+
default: false
|
|
136
|
+
}),
|
|
137
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
138
|
+
__metadata("design:type", Boolean)
|
|
139
|
+
], CalendarItem.prototype, "showWeekNumber", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
142
|
+
description: 'Whether to send invitations by email',
|
|
143
|
+
default: false
|
|
144
|
+
}),
|
|
145
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
146
|
+
__metadata("design:type", Boolean)
|
|
147
|
+
], CalendarItem.prototype, "sendInvitationsByEmail", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
150
|
+
description: 'Email invitation setting preference',
|
|
151
|
+
enum: EmailInvitationSetting,
|
|
152
|
+
default: EmailInvitationSetting.UNSPECIFIED
|
|
153
|
+
}),
|
|
154
|
+
(0, typeorm_1.Column)({
|
|
155
|
+
type: 'enum',
|
|
156
|
+
enum: EmailInvitationSetting,
|
|
157
|
+
default: EmailInvitationSetting.UNSPECIFIED
|
|
158
|
+
}),
|
|
159
|
+
__metadata("design:type", String)
|
|
160
|
+
], CalendarItem.prototype, "emailInvitationSetting", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
163
|
+
description: 'Sub-calendars associated with this calendar item',
|
|
164
|
+
type: () => [calendar_sub_item_entity_1.CalendarSubItem]
|
|
165
|
+
}),
|
|
46
166
|
(0, typeorm_1.OneToMany)(() => calendar_sub_item_entity_1.CalendarSubItem, calendarSubItem => calendarSubItem.calendar, { nullable: true }),
|
|
47
167
|
__metadata("design:type", Array)
|
|
48
168
|
], CalendarItem.prototype, "subCalendars", void 0);
|
|
49
169
|
__decorate([
|
|
170
|
+
(0, swagger_1.ApiProperty)({
|
|
171
|
+
description: 'OAuth configuration for calendar authentication',
|
|
172
|
+
type: () => oauth_entity_1.Oauth
|
|
173
|
+
}),
|
|
50
174
|
(0, typeorm_1.ManyToOne)(() => oauth_entity_1.Oauth, { nullable: false, onDelete: 'CASCADE' }),
|
|
51
175
|
__metadata("design:type", oauth_entity_1.Oauth)
|
|
52
176
|
], CalendarItem.prototype, "oauth", void 0);
|
|
53
177
|
__decorate([
|
|
178
|
+
(0, swagger_1.ApiProperty)({
|
|
179
|
+
description: 'User who owns this calendar',
|
|
180
|
+
type: () => user_entity_1.User
|
|
181
|
+
}),
|
|
54
182
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: false, onDelete: 'CASCADE' }),
|
|
55
183
|
__metadata("design:type", user_entity_1.User)
|
|
56
184
|
], CalendarItem.prototype, "user", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-item.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/calendar-item.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;
|
|
1
|
+
{"version":3,"file":"calendar-item.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/calendar-item.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,6CAAmE;AAEnE,sEAA+E;AAC/E,gEAAsD;AACtD,mDAAyC;AACzC,yEAA6D;AAE7D,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;AACzB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAED,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAChC,qDAA2B,CAAA;IAC3B,qDAA2B,CAAA;IAC3B,mDAAyB,CAAA;IACzB,yDAA+B,CAAA;AACjC,CAAC,EALW,sBAAsB,sCAAtB,sBAAsB,QAKjC;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,qCAAuB;IAMvD,IAAI,CAAU;IAOd,KAAK,CAAS;IAQd,QAAQ,CAAmB;IAO3B,QAAQ,CAAU;IAOlB,oBAAoB,CAAU;IAO9B,gBAAgB,CAAU;IAO1B,cAAc,CAAU;IAOxB,SAAS,CAAU;IAOnB,gBAAgB,CAAU;IAO1B,4BAA4B,CAAU;IAOtC,cAAc,CAAU;IAOxB,sBAAsB,CAAU;IAYhC,sBAAsB,CAAyB;IAO/C,YAAY,CAAoB;IAOhC,KAAK,CAAQ;IAOb,IAAI,CAAO;CACZ,CA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E,eAAe,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAClE;AAOhC;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iDAAiD;QAC9D,IAAI,EAAE,GAAG,EAAE,CAAC,oBAAK;KAClB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC1D,oBAAK;2CAAC;AAOb;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;KACjB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC1D,kBAAI;0CAAC;uBArHA,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAsHxB"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { EntityBase } from '../common/database/base.entity';
|
|
2
|
-
import { User } from './user.entity';
|
|
3
|
-
import { Group } from './group.entity';
|
|
4
2
|
import { Role } from './role.entity';
|
|
5
|
-
export declare class
|
|
6
|
-
user: User;
|
|
7
|
-
group: Group;
|
|
3
|
+
export declare class UserGroupNewRelation extends EntityBase {
|
|
8
4
|
role: Role;
|
|
9
5
|
}
|
|
@@ -9,57 +9,23 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
12
|
+
exports.UserGroupNewRelation = void 0;
|
|
14
13
|
const typeorm_1 = require("typeorm");
|
|
15
14
|
const base_entity_1 = require("../common/database/base.entity");
|
|
16
|
-
const user_entity_1 = require("./user.entity");
|
|
17
|
-
const group_entity_1 = require("./group.entity");
|
|
18
15
|
const role_entity_1 = require("./role.entity");
|
|
19
|
-
let
|
|
20
|
-
user;
|
|
21
|
-
group;
|
|
16
|
+
let UserGroupNewRelation = class UserGroupNewRelation extends base_entity_1.EntityBase {
|
|
22
17
|
role;
|
|
23
18
|
};
|
|
24
|
-
exports.
|
|
19
|
+
exports.UserGroupNewRelation = UserGroupNewRelation;
|
|
25
20
|
__decorate([
|
|
26
|
-
(0, swagger_1.ApiProperty)({
|
|
27
|
-
type: () => user_entity_1.User,
|
|
28
|
-
description: 'User in the group',
|
|
29
|
-
}),
|
|
30
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, user => user.userGroups, {
|
|
31
|
-
onDelete: 'CASCADE',
|
|
32
|
-
onUpdate: 'CASCADE',
|
|
33
|
-
}),
|
|
34
|
-
(0, typeorm_1.JoinColumn)(),
|
|
35
|
-
__metadata("design:type", user_entity_1.User)
|
|
36
|
-
], UserGroup.prototype, "user", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, swagger_1.ApiProperty)({
|
|
39
|
-
type: () => group_entity_1.Group,
|
|
40
|
-
description: 'Group where the user belongs',
|
|
41
|
-
}),
|
|
42
|
-
(0, typeorm_1.ManyToOne)(() => group_entity_1.Group, group => group.userGroups, {
|
|
43
|
-
onDelete: 'CASCADE',
|
|
44
|
-
onUpdate: 'CASCADE',
|
|
45
|
-
}),
|
|
46
|
-
(0, typeorm_1.JoinColumn)(),
|
|
47
|
-
__metadata("design:type", group_entity_1.Group)
|
|
48
|
-
], UserGroup.prototype, "group", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, swagger_1.ApiProperty)({
|
|
51
|
-
type: () => role_entity_1.Role,
|
|
52
|
-
description: 'Role assigned to the user in this specific group',
|
|
53
|
-
}),
|
|
54
21
|
(0, typeorm_1.ManyToOne)(() => role_entity_1.Role, {
|
|
55
22
|
onDelete: 'RESTRICT',
|
|
56
23
|
onUpdate: 'CASCADE',
|
|
57
24
|
}),
|
|
58
25
|
(0, typeorm_1.JoinColumn)(),
|
|
59
26
|
__metadata("design:type", role_entity_1.Role)
|
|
60
|
-
],
|
|
61
|
-
exports.
|
|
62
|
-
(0, typeorm_1.Entity)()
|
|
63
|
-
|
|
64
|
-
], UserGroup);
|
|
27
|
+
], UserGroupNewRelation.prototype, "role", void 0);
|
|
28
|
+
exports.UserGroupNewRelation = UserGroupNewRelation = __decorate([
|
|
29
|
+
(0, typeorm_1.Entity)()
|
|
30
|
+
], UserGroupNewRelation);
|
|
65
31
|
//# sourceMappingURL=user-group.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-group.entity.js","sourceRoot":"","sources":["../../src/entities/user-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
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"}
|