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