easywork-common-lib 1.0.521 → 1.0.522
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/.gitattributes +2 -2
- package/.github/workflows/npm-publish.yml +33 -33
- package/.vscode/settings.json +12 -12
- package/dist/common/constants/app.contants.d.ts +0 -1
- package/dist/common/constants/app.contants.js +28 -29
- package/dist/common/constants/app.contants.js.map +1 -1
- package/dist/common/constants/index.d.ts +0 -1
- package/dist/common/constants/index.js +0 -1
- package/dist/common/constants/index.js.map +1 -1
- package/dist/common/enums/sales.enum.d.ts +0 -5
- package/dist/common/enums/sales.enum.js +1 -7
- package/dist/common/enums/sales.enum.js.map +1 -1
- package/dist/common/enums/tools.enum.d.ts +0 -7
- package/dist/common/enums/tools.enum.js +1 -9
- package/dist/common/enums/tools.enum.js.map +1 -1
- package/dist/entities/helpers/sales/poliza/index.d.ts +1 -0
- package/dist/entities/helpers/sales/poliza/index.js +1 -0
- package/dist/entities/helpers/sales/poliza/index.js.map +1 -1
- package/dist/entities/role.entity.d.ts +0 -1
- package/dist/entities/role.entity.js +3 -9
- package/dist/entities/role.entity.js.map +1 -1
- package/dist/entities/sales/contact.entity.d.ts +0 -1
- package/dist/entities/sales/contact.entity.js +38 -177
- package/dist/entities/sales/contact.entity.js.map +1 -1
- package/dist/entities/sales/poliza.entity.d.ts +21 -7
- package/dist/entities/sales/poliza.entity.js +193 -41
- package/dist/entities/sales/poliza.entity.js.map +1 -1
- package/dist/entities/tools/calendar/event.entity.js +19 -54
- package/dist/entities/tools/calendar/event.entity.js.map +1 -1
- package/dist/entities/tools/task.entity.d.ts +0 -2
- package/dist/entities/tools/task.entity.js +29 -116
- package/dist/entities/tools/task.entity.js.map +1 -1
- package/dist/entities/user.entity.d.ts +1 -6
- package/dist/entities/user.entity.js +23 -86
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/grpc/drive/drive.proto +181 -225
- package/justfile +8 -8
- package/package.json +45 -45
- package/scripts/bump.sh +5 -5
- package/test.bat +15 -15
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +25 -25
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/common/constants/string.constant.d.ts +0 -5
- package/dist/common/constants/string.constant.js +0 -41
- package/dist/common/constants/string.constant.js.map +0 -1
- package/dist/grpc/drive/leads.proto +0 -114
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,qCAAkG;AAClG,6CAA8C;AAC9C,sEAAkE;AAClE,4CAAkD;AAClD,mDAAyC;AACzC,+CAA+C;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,wBAAU;IAI3C,IAAI,CAAS;IAIb,WAAW,CAAS;IAIpB,SAAS,CAAO;IAIhB,OAAO,CAAO;IAYd,MAAM,CAAkB;IAQxB,YAAY,CAAU;IAItB,QAAQ,CAAO;IAIf,KAAK,CAAS;IAId,YAAY,CAAS;IAIrB,OAAO,CAAU;IAIjB,SAAS,CAAU;IAInB,MAAM,CAAU;IAIhB,QAAQ,CAAS;IASjB,SAAS,CAAQ;IASjB,UAAU,CAAQ;IAOlB,GAAG,CAAc;CAClB,CAAA;AA1FY,sCAAa;AAIxB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAC7E,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;2CAC9B;AAIb;IAFC,IAAA,qBAAW,E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E,CAAC,kBAAI,EAAE,WAAW,EAAE,4BAA4B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7F,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAU,GAAE;8BACD,kBAAI;gDAAC;AASjB;IAPC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,6BAA6B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC9F,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAU,GAAE;8BACA,kBAAI;iDAAC;AAOlB;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAQ,CAAC,EAAE,WAAW,EAAE,uCAAuC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC9G,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gBAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE;QACtD,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;;0CACe;wBAzFN,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CA0FzB"}
|
|
@@ -5,7 +5,6 @@ import { EntityBase } from "../../common/database/base.entity";
|
|
|
5
5
|
import { TaskStatus } from "../../common/enums";
|
|
6
6
|
import { TaskListField } from "./task-list-field";
|
|
7
7
|
import { TaskCRM } from "../../entities/helpers";
|
|
8
|
-
import { AttachedObject } from "entities/drive";
|
|
9
8
|
export declare class Task extends EntityBase {
|
|
10
9
|
idBitrix: number;
|
|
11
10
|
name: string;
|
|
@@ -32,5 +31,4 @@ export declare class Task extends EntityBase {
|
|
|
32
31
|
crm?: TaskCRM[];
|
|
33
32
|
parentTask?: Task;
|
|
34
33
|
subTasks?: Task[];
|
|
35
|
-
attachedObjects?: AttachedObject[];
|
|
36
34
|
}
|
|
@@ -46,20 +46,15 @@ let Task = class Task extends base_entity_1.EntityBase {
|
|
|
46
46
|
crm;
|
|
47
47
|
parentTask;
|
|
48
48
|
subTasks;
|
|
49
|
-
attachedObjects;
|
|
50
49
|
};
|
|
51
50
|
exports.Task = Task;
|
|
52
51
|
__decorate([
|
|
53
|
-
(0, swagger_1.ApiProperty)({
|
|
54
|
-
type: Number,
|
|
55
|
-
description: "Bitrix ID of the policy",
|
|
56
|
-
required: false,
|
|
57
|
-
}),
|
|
52
|
+
(0, swagger_1.ApiProperty)({ type: Number, description: 'Bitrix ID of the policy', required: false }),
|
|
58
53
|
(0, typeorm_1.Column)({ name: "id_bitrix", nullable: true }),
|
|
59
54
|
__metadata("design:type", Number)
|
|
60
55
|
], Task.prototype, "idBitrix", void 0);
|
|
61
56
|
__decorate([
|
|
62
|
-
(0, swagger_1.ApiProperty)({ type: String, description:
|
|
57
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Name of the task', minLength: 3 }),
|
|
63
58
|
(0, class_validator_1.MinLength)(3),
|
|
64
59
|
(0, typeorm_1.Column)({ unique: false, nullable: false }),
|
|
65
60
|
__metadata("design:type", String)
|
|
@@ -70,114 +65,70 @@ __decorate([
|
|
|
70
65
|
__metadata("design:type", Number)
|
|
71
66
|
], Task.prototype, "number", void 0);
|
|
72
67
|
__decorate([
|
|
73
|
-
(0, swagger_1.ApiProperty)({
|
|
74
|
-
type: String,
|
|
75
|
-
description: "Description of the task",
|
|
76
|
-
required: false,
|
|
77
|
-
}),
|
|
68
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Description of the task', required: false }),
|
|
78
69
|
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
79
70
|
__metadata("design:type", String)
|
|
80
71
|
], Task.prototype, "description", void 0);
|
|
81
72
|
__decorate([
|
|
82
|
-
(0, swagger_1.ApiProperty)({
|
|
83
|
-
type: Date,
|
|
84
|
-
description: "Deadline of the task",
|
|
85
|
-
required: false,
|
|
86
|
-
}),
|
|
73
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Deadline of the task', required: false }),
|
|
87
74
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
88
75
|
__metadata("design:type", Date)
|
|
89
76
|
], Task.prototype, "deadline", void 0);
|
|
90
77
|
__decorate([
|
|
91
|
-
(0, swagger_1.ApiProperty)({
|
|
92
|
-
type: Date,
|
|
93
|
-
description: "Start time of the task",
|
|
94
|
-
required: false,
|
|
95
|
-
}),
|
|
78
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Start time of the task', required: false }),
|
|
96
79
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
97
80
|
__metadata("design:type", Date)
|
|
98
81
|
], Task.prototype, "startTime", void 0);
|
|
99
82
|
__decorate([
|
|
100
|
-
(0, swagger_1.ApiProperty)({
|
|
101
|
-
type: Date,
|
|
102
|
-
description: "Completion time of the task",
|
|
103
|
-
required: false,
|
|
104
|
-
}),
|
|
83
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Completion time of the task', required: false }),
|
|
105
84
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
106
85
|
__metadata("design:type", Date)
|
|
107
86
|
], Task.prototype, "completedTime", void 0);
|
|
108
87
|
__decorate([
|
|
109
|
-
(0, swagger_1.ApiProperty)({
|
|
110
|
-
type: Boolean,
|
|
111
|
-
description: "Does the task require revision?",
|
|
112
|
-
default: false,
|
|
113
|
-
}),
|
|
88
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Does the task require revision?', default: false }),
|
|
114
89
|
(0, typeorm_1.Column)({ default: false }),
|
|
115
90
|
__metadata("design:type", Boolean)
|
|
116
91
|
], Task.prototype, "requireRevision", void 0);
|
|
117
92
|
__decorate([
|
|
118
|
-
(0, swagger_1.ApiProperty)({
|
|
119
|
-
type: Boolean,
|
|
120
|
-
description: "Does the task require a summary?",
|
|
121
|
-
default: false,
|
|
122
|
-
}),
|
|
93
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Does the task require a summary?', default: false }),
|
|
123
94
|
(0, typeorm_1.Column)({ default: false }),
|
|
124
95
|
__metadata("design:type", Boolean)
|
|
125
96
|
], Task.prototype, "requireSummary", void 0);
|
|
126
97
|
__decorate([
|
|
127
|
-
(0, swagger_1.ApiProperty)({
|
|
128
|
-
type: Boolean,
|
|
129
|
-
description: "Can the responsible user change the date?",
|
|
130
|
-
default: false,
|
|
131
|
-
}),
|
|
98
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Can the responsible user change the date?', default: false }),
|
|
132
99
|
(0, typeorm_1.Column)({ default: false }),
|
|
133
100
|
__metadata("design:type", Boolean)
|
|
134
101
|
], Task.prototype, "responsibleCanChangeDate", void 0);
|
|
135
102
|
__decorate([
|
|
136
|
-
(0, swagger_1.ApiProperty)({
|
|
137
|
-
type: Boolean,
|
|
138
|
-
description: "La tarea es importante?",
|
|
139
|
-
default: false,
|
|
140
|
-
}),
|
|
103
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'La tarea es importante?', default: false }),
|
|
141
104
|
(0, typeorm_1.Column)({ default: false }),
|
|
142
105
|
__metadata("design:type", Boolean)
|
|
143
106
|
], Task.prototype, "important", void 0);
|
|
144
107
|
__decorate([
|
|
145
108
|
(0, swagger_1.ApiProperty)({
|
|
146
109
|
enum: enums_1.TaskStatus,
|
|
147
|
-
description:
|
|
148
|
-
default: enums_1.TaskStatus.PENDING
|
|
110
|
+
description: 'Status of the task',
|
|
111
|
+
default: enums_1.TaskStatus.PENDING
|
|
149
112
|
}),
|
|
150
113
|
(0, typeorm_1.Column)({
|
|
151
114
|
type: "enum",
|
|
152
115
|
enum: enums_1.TaskStatus,
|
|
153
|
-
default: enums_1.TaskStatus.PENDING
|
|
116
|
+
default: enums_1.TaskStatus.PENDING
|
|
154
117
|
}),
|
|
155
118
|
__metadata("design:type", String)
|
|
156
119
|
], Task.prototype, "status", void 0);
|
|
157
120
|
__decorate([
|
|
158
|
-
(0, swagger_1.ApiProperty)({
|
|
159
|
-
type: Boolean,
|
|
160
|
-
description: "Is the task completed?",
|
|
161
|
-
default: false,
|
|
162
|
-
}),
|
|
121
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the task completed?', default: false }),
|
|
163
122
|
(0, typeorm_1.Column)({ default: false }),
|
|
164
123
|
__metadata("design:type", Boolean)
|
|
165
124
|
], Task.prototype, "isCompleted", void 0);
|
|
166
125
|
__decorate([
|
|
167
|
-
(0, swagger_1.ApiProperty)({
|
|
168
|
-
type: Boolean,
|
|
169
|
-
description: "Has the task been reviewed?",
|
|
170
|
-
default: false,
|
|
171
|
-
}),
|
|
126
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Has the task been reviewed?', default: false }),
|
|
172
127
|
(0, typeorm_1.Column)({ default: false }),
|
|
173
128
|
__metadata("design:type", Boolean)
|
|
174
129
|
], Task.prototype, "reviewed", void 0);
|
|
175
130
|
__decorate([
|
|
176
|
-
(0, swagger_1.ApiProperty)({
|
|
177
|
-
type: () => user_entity_1.User,
|
|
178
|
-
description: "User who created the task",
|
|
179
|
-
required: false,
|
|
180
|
-
}),
|
|
131
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User who created the task', required: false }),
|
|
181
132
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
|
|
182
133
|
onDelete: "SET NULL",
|
|
183
134
|
onUpdate: "CASCADE",
|
|
@@ -186,11 +137,7 @@ __decorate([
|
|
|
186
137
|
__metadata("design:type", user_entity_1.User)
|
|
187
138
|
], Task.prototype, "createdBy", void 0);
|
|
188
139
|
__decorate([
|
|
189
|
-
(0, swagger_1.ApiProperty)({
|
|
190
|
-
type: () => user_entity_1.User,
|
|
191
|
-
description: "User who reviewed the task",
|
|
192
|
-
required: false,
|
|
193
|
-
}),
|
|
140
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User who reviewed the task', required: false }),
|
|
194
141
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
|
|
195
142
|
onDelete: "SET NULL",
|
|
196
143
|
onUpdate: "CASCADE",
|
|
@@ -199,11 +146,7 @@ __decorate([
|
|
|
199
146
|
__metadata("design:type", user_entity_1.User)
|
|
200
147
|
], Task.prototype, "reviewedBy", void 0);
|
|
201
148
|
__decorate([
|
|
202
|
-
(0, swagger_1.ApiProperty)({
|
|
203
|
-
type: () => [user_entity_1.User],
|
|
204
|
-
description: "Participants in the task",
|
|
205
|
-
required: false,
|
|
206
|
-
}),
|
|
149
|
+
(0, swagger_1.ApiProperty)({ type: () => [user_entity_1.User], description: 'Participants in the task', required: false }),
|
|
207
150
|
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, {
|
|
208
151
|
onDelete: "CASCADE",
|
|
209
152
|
onUpdate: "CASCADE",
|
|
@@ -212,11 +155,7 @@ __decorate([
|
|
|
212
155
|
__metadata("design:type", Array)
|
|
213
156
|
], Task.prototype, "participants", void 0);
|
|
214
157
|
__decorate([
|
|
215
|
-
(0, swagger_1.ApiProperty)({
|
|
216
|
-
type: () => [user_entity_1.User],
|
|
217
|
-
description: "Users responsible for the task",
|
|
218
|
-
required: false,
|
|
219
|
-
}),
|
|
158
|
+
(0, swagger_1.ApiProperty)({ type: () => [user_entity_1.User], description: 'Users responsible for the task', required: false }),
|
|
220
159
|
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, {
|
|
221
160
|
onDelete: "CASCADE",
|
|
222
161
|
onUpdate: "CASCADE",
|
|
@@ -225,11 +164,7 @@ __decorate([
|
|
|
225
164
|
__metadata("design:type", Array)
|
|
226
165
|
], Task.prototype, "responsible", void 0);
|
|
227
166
|
__decorate([
|
|
228
|
-
(0, swagger_1.ApiProperty)({
|
|
229
|
-
type: () => [user_entity_1.User],
|
|
230
|
-
description: "Observers of the task",
|
|
231
|
-
required: false,
|
|
232
|
-
}),
|
|
167
|
+
(0, swagger_1.ApiProperty)({ type: () => [user_entity_1.User], description: 'Observers of the task', required: false }),
|
|
233
168
|
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, {
|
|
234
169
|
onDelete: "CASCADE",
|
|
235
170
|
onUpdate: "CASCADE",
|
|
@@ -238,11 +173,8 @@ __decorate([
|
|
|
238
173
|
__metadata("design:type", Array)
|
|
239
174
|
], Task.prototype, "observers", void 0);
|
|
240
175
|
__decorate([
|
|
241
|
-
(0, swagger_1.ApiProperty)({
|
|
242
|
-
|
|
243
|
-
description: "Tags associated with the task",
|
|
244
|
-
}),
|
|
245
|
-
(0, typeorm_1.ManyToMany)(() => tag_entity_1.Tag, (tag) => tag.tasks, {
|
|
176
|
+
(0, swagger_1.ApiProperty)({ type: () => [tag_entity_1.Tag], description: 'Tags associated with the task' }),
|
|
177
|
+
(0, typeorm_1.ManyToMany)(() => tag_entity_1.Tag, tag => tag.tasks, {
|
|
246
178
|
onDelete: "CASCADE",
|
|
247
179
|
onUpdate: "CASCADE",
|
|
248
180
|
}),
|
|
@@ -250,29 +182,18 @@ __decorate([
|
|
|
250
182
|
__metadata("design:type", Array)
|
|
251
183
|
], Task.prototype, "tags", void 0);
|
|
252
184
|
__decorate([
|
|
253
|
-
(0, swagger_1.ApiProperty)({
|
|
254
|
-
type: () => [task_list_field_1.TaskListField],
|
|
255
|
-
description: "List fields associated with the task",
|
|
256
|
-
required: false,
|
|
257
|
-
}),
|
|
185
|
+
(0, swagger_1.ApiProperty)({ type: () => [task_list_field_1.TaskListField], description: 'List fields associated with the task', required: false }),
|
|
258
186
|
(0, typeorm_1.Column)("json", { nullable: true }),
|
|
259
187
|
__metadata("design:type", Array)
|
|
260
188
|
], Task.prototype, "listField", void 0);
|
|
261
189
|
__decorate([
|
|
262
|
-
(0, swagger_1.ApiProperty)({
|
|
263
|
-
|
|
264
|
-
description: "Comments on the task",
|
|
265
|
-
}),
|
|
266
|
-
(0, typeorm_1.OneToMany)(() => task_comment_entity_1.TaskComment, (taskComment) => taskComment.task),
|
|
190
|
+
(0, swagger_1.ApiProperty)({ type: () => [task_comment_entity_1.TaskComment], description: 'Comments on the task' }),
|
|
191
|
+
(0, typeorm_1.OneToMany)(() => task_comment_entity_1.TaskComment, taskComment => taskComment.task),
|
|
267
192
|
(0, typeorm_1.JoinColumn)(),
|
|
268
193
|
__metadata("design:type", Array)
|
|
269
194
|
], Task.prototype, "comments", void 0);
|
|
270
195
|
__decorate([
|
|
271
|
-
(0, swagger_1.ApiProperty)({
|
|
272
|
-
type: () => [helpers_1.TaskCRM],
|
|
273
|
-
description: "CRM entries associated with the task",
|
|
274
|
-
required: false,
|
|
275
|
-
}),
|
|
196
|
+
(0, swagger_1.ApiProperty)({ type: () => [helpers_1.TaskCRM], description: 'CRM entries associated with the task', required: false }),
|
|
276
197
|
(0, typeorm_1.OneToMany)(() => helpers_1.TaskCRM, (taskCRM) => taskCRM.task, {
|
|
277
198
|
onDelete: "CASCADE",
|
|
278
199
|
onUpdate: "CASCADE",
|
|
@@ -280,11 +201,7 @@ __decorate([
|
|
|
280
201
|
__metadata("design:type", Array)
|
|
281
202
|
], Task.prototype, "crm", void 0);
|
|
282
203
|
__decorate([
|
|
283
|
-
(0, swagger_1.ApiProperty)({
|
|
284
|
-
type: () => Task,
|
|
285
|
-
description: "Parent task",
|
|
286
|
-
required: false,
|
|
287
|
-
}),
|
|
204
|
+
(0, swagger_1.ApiProperty)({ type: () => Task, description: 'Parent task', required: false }),
|
|
288
205
|
(0, typeorm_1.ManyToOne)(() => Task, {
|
|
289
206
|
onDelete: "CASCADE",
|
|
290
207
|
onUpdate: "CASCADE",
|
|
@@ -294,12 +211,8 @@ __decorate([
|
|
|
294
211
|
__metadata("design:type", Task)
|
|
295
212
|
], Task.prototype, "parentTask", void 0);
|
|
296
213
|
__decorate([
|
|
297
|
-
(0, swagger_1.ApiProperty)({
|
|
298
|
-
|
|
299
|
-
description: "Child tasks",
|
|
300
|
-
required: false,
|
|
301
|
-
}),
|
|
302
|
-
(0, typeorm_1.OneToMany)(() => Task, (task) => task.parentTask),
|
|
214
|
+
(0, swagger_1.ApiProperty)({ type: () => [Task], description: 'Child tasks', required: false }),
|
|
215
|
+
(0, typeorm_1.OneToMany)(() => Task, task => task.parentTask),
|
|
303
216
|
__metadata("design:type", Array)
|
|
304
217
|
], Task.prototype, "subTasks", void 0);
|
|
305
218
|
exports.Task = Task = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.entity.js","sourceRoot":"","sources":["../../../src/entities/tools/task.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,gDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"task.entity.js","sourceRoot":"","sources":["../../../src/entities/tools/task.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,gDAAsC;AACtC,qCAA6G;AAC7G,+DAAoD;AACpD,8CAAoC;AACpC,mEAA+D;AAC/D,8CAAgD;AAChD,uDAAkD;AAClD,oDAAiD;AACjD,6CAA8C;AAGvC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,wBAAU;IAGhC,QAAQ,CAAS;IAKjB,IAAI,CAAS;IAIb,MAAM,CAAS;IAIf,WAAW,CAAS;IAIpB,QAAQ,CAAO;IAIf,SAAS,CAAO;IAIhB,aAAa,CAAO;IAIpB,eAAe,CAAU;IAIzB,cAAc,CAAU;IAIxB,wBAAwB,CAAU;IAIlC,SAAS,CAAU;IAYnB,MAAM,CAAa;IAInB,WAAW,CAAU;IAIrB,QAAQ,CAAU;IAQlB,SAAS,CAAO;IAQhB,UAAU,CAAO;IAQjB,YAAY,CAAU;IAQtB,WAAW,CAAU;IAQrB,SAAS,CAAU;IAQnB,IAAI,CAAQ;IAIZ,SAAS,CA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AE;GACI,IAAI,CA8IhB"}
|
|
@@ -6,15 +6,11 @@ import { UserEmailRelation } from "./thirdparty/user-email-relation.entity";
|
|
|
6
6
|
import { PushToken } from "./notifications/push-token.entity";
|
|
7
7
|
import { Group } from "./group.entity";
|
|
8
8
|
import { MenuPermissions } from "./menu-permissions.entity";
|
|
9
|
-
import { Contact } from "./sales";
|
|
10
|
-
import { UserStatus } from "../common/enums/tools.enum";
|
|
11
9
|
export declare class User extends EntityBase {
|
|
12
10
|
username: string;
|
|
13
11
|
email: string;
|
|
14
|
-
bio
|
|
12
|
+
bio: string;
|
|
15
13
|
avatar: string;
|
|
16
|
-
status: UserStatus;
|
|
17
|
-
savedStatus: UserStatus;
|
|
18
14
|
hash: string;
|
|
19
15
|
twoFactorSecret?: string;
|
|
20
16
|
isTwoFactorEnabled?: boolean;
|
|
@@ -29,6 +25,5 @@ export declare class User extends EntityBase {
|
|
|
29
25
|
groups?: Group[];
|
|
30
26
|
menuPermissions: MenuPermissions;
|
|
31
27
|
cua: string;
|
|
32
|
-
contact?: Contact;
|
|
33
28
|
get name(): string;
|
|
34
29
|
}
|
|
@@ -21,15 +21,11 @@ const push_token_entity_1 = require("./notifications/push-token.entity");
|
|
|
21
21
|
const swagger_1 = require("@nestjs/swagger");
|
|
22
22
|
const group_entity_1 = require("./group.entity");
|
|
23
23
|
const menu_permissions_entity_1 = require("./menu-permissions.entity");
|
|
24
|
-
const sales_1 = require("./sales");
|
|
25
|
-
const tools_enum_1 = require("../common/enums/tools.enum");
|
|
26
24
|
let User = class User extends base_entity_1.EntityBase {
|
|
27
25
|
username;
|
|
28
26
|
email;
|
|
29
27
|
bio;
|
|
30
28
|
avatar;
|
|
31
|
-
status;
|
|
32
|
-
savedStatus;
|
|
33
29
|
hash;
|
|
34
30
|
twoFactorSecret;
|
|
35
31
|
isTwoFactorEnabled;
|
|
@@ -44,110 +40,75 @@ let User = class User extends base_entity_1.EntityBase {
|
|
|
44
40
|
groups;
|
|
45
41
|
menuPermissions;
|
|
46
42
|
cua;
|
|
47
|
-
contact;
|
|
48
43
|
get name() {
|
|
49
|
-
return `${this.profile?.firstName ??
|
|
44
|
+
return `${this.profile?.firstName ?? ''} ${this.profile?.lastName ?? ''}`.trim();
|
|
50
45
|
}
|
|
51
46
|
};
|
|
52
47
|
exports.User = User;
|
|
53
48
|
__decorate([
|
|
54
|
-
(0, swagger_1.ApiProperty)({ type: String, description:
|
|
49
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Unique username' }),
|
|
55
50
|
(0, typeorm_1.Column)({ unique: true }),
|
|
56
51
|
__metadata("design:type", String)
|
|
57
52
|
], User.prototype, "username", void 0);
|
|
58
53
|
__decorate([
|
|
59
|
-
(0, swagger_1.ApiProperty)({ type: String, description:
|
|
54
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Unique email address' }),
|
|
60
55
|
(0, typeorm_1.Column)({ unique: true }),
|
|
61
56
|
__metadata("design:type", String)
|
|
62
57
|
], User.prototype, "email", void 0);
|
|
63
58
|
__decorate([
|
|
64
|
-
(0, swagger_1.ApiProperty)({ type: String, description:
|
|
65
|
-
(0, typeorm_1.Column)({ type: "text"
|
|
59
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'User bio' }),
|
|
60
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
66
61
|
__metadata("design:type", String)
|
|
67
62
|
], User.prototype, "bio", void 0);
|
|
68
63
|
__decorate([
|
|
69
|
-
(0, swagger_1.ApiProperty)({ type: String, description:
|
|
64
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'User avatar URL' }),
|
|
70
65
|
(0, typeorm_1.Column)({ type: "text" }),
|
|
71
66
|
__metadata("design:type", String)
|
|
72
67
|
], User.prototype, "avatar", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, swagger_1.ApiProperty)({ enum: tools_enum_1.UserStatus, description: "User status" }),
|
|
75
|
-
(0, typeorm_1.Column)({ type: "enum", enum: tools_enum_1.UserStatus, default: tools_enum_1.UserStatus.offline }),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], User.prototype, "status", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, swagger_1.ApiProperty)({ enum: tools_enum_1.UserStatus, description: "User status" }),
|
|
80
|
-
(0, typeorm_1.Column)({ type: "enum", enum: tools_enum_1.UserStatus, default: tools_enum_1.UserStatus.working }),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], User.prototype, "savedStatus", void 0);
|
|
83
68
|
__decorate([
|
|
84
69
|
(0, class_transformer_1.Exclude)(),
|
|
85
|
-
(0, swagger_1.ApiProperty)({ type: String, description:
|
|
70
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Password hash', writeOnly: true }),
|
|
86
71
|
(0, typeorm_1.Column)({ type: "text" }),
|
|
87
72
|
__metadata("design:type", String)
|
|
88
73
|
], User.prototype, "hash", void 0);
|
|
89
74
|
__decorate([
|
|
90
75
|
(0, class_transformer_1.Exclude)(),
|
|
91
|
-
(0, swagger_1.ApiProperty)({
|
|
92
|
-
type: String,
|
|
93
|
-
description: "Two-factor authentication secret",
|
|
94
|
-
required: false,
|
|
95
|
-
writeOnly: true,
|
|
96
|
-
}),
|
|
76
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Two-factor authentication secret', required: false, writeOnly: true }),
|
|
97
77
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
98
78
|
__metadata("design:type", String)
|
|
99
79
|
], User.prototype, "twoFactorSecret", void 0);
|
|
100
80
|
__decorate([
|
|
101
|
-
(0, swagger_1.ApiProperty)({
|
|
102
|
-
type: Boolean,
|
|
103
|
-
description: "Is two-factor authentication enabled",
|
|
104
|
-
default: false,
|
|
105
|
-
}),
|
|
81
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is two-factor authentication enabled', default: false }),
|
|
106
82
|
(0, typeorm_1.Column)({ default: false }),
|
|
107
83
|
__metadata("design:type", Boolean)
|
|
108
84
|
], User.prototype, "isTwoFactorEnabled", void 0);
|
|
109
85
|
__decorate([
|
|
110
|
-
(0, swagger_1.ApiProperty)({
|
|
111
|
-
type: String,
|
|
112
|
-
description: "User phone number",
|
|
113
|
-
required: false,
|
|
114
|
-
}),
|
|
86
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'User phone number', required: false }),
|
|
115
87
|
(0, typeorm_1.Column)({ unique: true }),
|
|
116
88
|
__metadata("design:type", String)
|
|
117
89
|
], User.prototype, "phone", void 0);
|
|
118
90
|
__decorate([
|
|
119
|
-
(0, swagger_1.ApiProperty)({
|
|
120
|
-
type: Boolean,
|
|
121
|
-
description: "Is user verified",
|
|
122
|
-
default: false,
|
|
123
|
-
}),
|
|
91
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is user verified', default: false }),
|
|
124
92
|
(0, typeorm_1.Column)({ default: false }),
|
|
125
93
|
__metadata("design:type", Boolean)
|
|
126
94
|
], User.prototype, "isVerified", void 0);
|
|
127
95
|
__decorate([
|
|
128
|
-
(0, swagger_1.ApiProperty)({
|
|
129
|
-
type: Date,
|
|
130
|
-
description: "Last login timestamp",
|
|
131
|
-
required: false,
|
|
132
|
-
}),
|
|
96
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Last login timestamp', required: false }),
|
|
133
97
|
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
134
98
|
__metadata("design:type", Date)
|
|
135
99
|
], User.prototype, "lastLogin", void 0);
|
|
136
100
|
__decorate([
|
|
137
|
-
(0, swagger_1.ApiProperty)({ type: () => profile_entity_1.Profile, description:
|
|
101
|
+
(0, swagger_1.ApiProperty)({ type: () => profile_entity_1.Profile, description: 'User profile' }),
|
|
138
102
|
(0, typeorm_1.OneToOne)(() => profile_entity_1.Profile, {
|
|
139
103
|
onDelete: "CASCADE",
|
|
140
104
|
onUpdate: "CASCADE",
|
|
141
|
-
eager: true
|
|
105
|
+
eager: true
|
|
142
106
|
}),
|
|
143
107
|
(0, typeorm_1.JoinColumn)(),
|
|
144
108
|
__metadata("design:type", profile_entity_1.Profile)
|
|
145
109
|
], User.prototype, "profile", void 0);
|
|
146
110
|
__decorate([
|
|
147
|
-
(0, swagger_1.ApiProperty)({
|
|
148
|
-
type: () => [role_entity_1.Role],
|
|
149
|
-
description: "Roles assigned to the user",
|
|
150
|
-
}),
|
|
111
|
+
(0, swagger_1.ApiProperty)({ type: () => [role_entity_1.Role], description: 'Roles assigned to the user' }),
|
|
151
112
|
(0, typeorm_1.ManyToMany)(() => role_entity_1.Role, {
|
|
152
113
|
onDelete: "CASCADE",
|
|
153
114
|
onUpdate: "CASCADE",
|
|
@@ -156,34 +117,22 @@ __decorate([
|
|
|
156
117
|
__metadata("design:type", Array)
|
|
157
118
|
], User.prototype, "roles", void 0);
|
|
158
119
|
__decorate([
|
|
159
|
-
(0, swagger_1.ApiProperty)({
|
|
160
|
-
type: () => [tag_entity_1.Tag],
|
|
161
|
-
description: "Tags associated with the user",
|
|
162
|
-
}),
|
|
120
|
+
(0, swagger_1.ApiProperty)({ type: () => [tag_entity_1.Tag], description: 'Tags associated with the user' }),
|
|
163
121
|
(0, typeorm_1.OneToMany)(() => tag_entity_1.Tag, (tag) => tag.user),
|
|
164
122
|
__metadata("design:type", Array)
|
|
165
123
|
], User.prototype, "tags", void 0);
|
|
166
124
|
__decorate([
|
|
167
|
-
(0, swagger_1.ApiProperty)({
|
|
168
|
-
type: () => [push_token_entity_1.PushToken],
|
|
169
|
-
description: "Push tokens associated with the user",
|
|
170
|
-
}),
|
|
125
|
+
(0, swagger_1.ApiProperty)({ type: () => [push_token_entity_1.PushToken], description: 'Push tokens associated with the user' }),
|
|
171
126
|
(0, typeorm_1.OneToMany)(() => push_token_entity_1.PushToken, (pushToken) => pushToken.user),
|
|
172
127
|
__metadata("design:type", Array)
|
|
173
128
|
], User.prototype, "pushTokens", void 0);
|
|
174
129
|
__decorate([
|
|
175
|
-
(0, swagger_1.ApiProperty)({
|
|
176
|
-
type: () => [user_email_relation_entity_1.UserEmailRelation],
|
|
177
|
-
description: "Email relations associated with the user",
|
|
178
|
-
}),
|
|
130
|
+
(0, swagger_1.ApiProperty)({ type: () => [user_email_relation_entity_1.UserEmailRelation], description: 'Email relations associated with the user' }),
|
|
179
131
|
(0, typeorm_1.OneToMany)(() => user_email_relation_entity_1.UserEmailRelation, (relation) => relation.user),
|
|
180
132
|
__metadata("design:type", Array)
|
|
181
133
|
], User.prototype, "emailRelations", void 0);
|
|
182
134
|
__decorate([
|
|
183
|
-
(0, swagger_1.ApiProperty)({
|
|
184
|
-
type: () => [group_entity_1.Group],
|
|
185
|
-
description: "Groups assigned to the user",
|
|
186
|
-
}),
|
|
135
|
+
(0, swagger_1.ApiProperty)({ type: () => [group_entity_1.Group], description: 'Groups assigned to the user' }),
|
|
187
136
|
(0, typeorm_1.ManyToMany)(() => group_entity_1.Group, (group) => group.users, {
|
|
188
137
|
onDelete: "CASCADE",
|
|
189
138
|
onUpdate: "CASCADE",
|
|
@@ -192,34 +141,22 @@ __decorate([
|
|
|
192
141
|
__metadata("design:type", Array)
|
|
193
142
|
], User.prototype, "groups", void 0);
|
|
194
143
|
__decorate([
|
|
195
|
-
(0, swagger_1.ApiProperty)({ type: () => menu_permissions_entity_1.MenuPermissions, description:
|
|
144
|
+
(0, swagger_1.ApiProperty)({ type: () => menu_permissions_entity_1.MenuPermissions, description: 'Menu Permissions' }),
|
|
196
145
|
(0, typeorm_1.OneToOne)(() => menu_permissions_entity_1.MenuPermissions, {
|
|
197
146
|
onDelete: "CASCADE",
|
|
198
147
|
onUpdate: "CASCADE",
|
|
199
|
-
eager: true
|
|
148
|
+
eager: true
|
|
200
149
|
}),
|
|
201
150
|
(0, typeorm_1.JoinColumn)(),
|
|
202
151
|
__metadata("design:type", menu_permissions_entity_1.MenuPermissions)
|
|
203
152
|
], User.prototype, "menuPermissions", void 0);
|
|
204
153
|
__decorate([
|
|
205
|
-
(0, swagger_1.ApiProperty)({ type: String, description:
|
|
154
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'CUA', required: false }),
|
|
206
155
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
207
156
|
__metadata("design:type", String)
|
|
208
157
|
], User.prototype, "cua", void 0);
|
|
209
158
|
__decorate([
|
|
210
|
-
(0, swagger_1.ApiProperty)({
|
|
211
|
-
type: () => User,
|
|
212
|
-
description: "User associated with the contact",
|
|
213
|
-
required: false,
|
|
214
|
-
}),
|
|
215
|
-
(0, typeorm_1.OneToOne)(() => sales_1.Contact, (contact) => contact.user, {
|
|
216
|
-
onDelete: "SET NULL",
|
|
217
|
-
onUpdate: "CASCADE",
|
|
218
|
-
}),
|
|
219
|
-
__metadata("design:type", sales_1.Contact)
|
|
220
|
-
], User.prototype, "contact", void 0);
|
|
221
|
-
__decorate([
|
|
222
|
-
(0, swagger_1.ApiProperty)({ type: String, description: "Full name of the user" }),
|
|
159
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Full name of the user' }),
|
|
223
160
|
__metadata("design:type", String),
|
|
224
161
|
__metadata("design:paramtypes", [])
|
|
225
162
|
], User.prototype, "name", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA4D;AAC5D,qCAAiG;AACjG,yDAA4C;AAC5C,qDAA2C;AAC3C,+CAAqC;AACrC,6CAAmC;AACnC,wFAA4E;AAC5E,yEAA8D;AAC9D,6CAA8C;AAC9C,iDAAuC;AACvC,uEAA4D;AAGrD,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,wBAAU;IAGlC,QAAQ,CAAU;IAIlB,KAAK,CAAU;IAIf,GAAG,CAAU;IAIb,MAAM,CAAU;IAKhB,IAAI,CAAU;IAKd,eAAe,CAAU;IAI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