shared-dto 1.0.94 → 1.0.95
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/Task.dto.d.ts +3 -30
- package/dist/Task.dto.d.ts.map +1 -1
- package/dist/Task.dto.js +10 -96
- package/dist/Task.dto.js.map +1 -1
- package/package.json +1 -1
- package/src/Task.dto.ts +8 -79
package/dist/Task.dto.d.ts
CHANGED
|
@@ -1,42 +1,15 @@
|
|
|
1
|
-
export declare enum TaskStatus {
|
|
2
|
-
PENDING = "PENDING",
|
|
3
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
4
|
-
COMPLETED = "COMPLETED",
|
|
5
|
-
CANCELLED = "CANCELLED",
|
|
6
|
-
ON_HOLD = "ON_HOLD"
|
|
7
|
-
}
|
|
8
|
-
export declare enum Priority {
|
|
9
|
-
LOW = "LOW",
|
|
10
|
-
MEDIUM = "MEDIUM",
|
|
11
|
-
HIGH = "HIGH",
|
|
12
|
-
URGENT = "URGENT"
|
|
13
|
-
}
|
|
14
1
|
export declare class CreateTaskDto {
|
|
15
|
-
title: string;
|
|
16
2
|
description: string;
|
|
17
|
-
status: TaskStatus;
|
|
18
|
-
dueDate?: Date;
|
|
19
|
-
priority?: Priority;
|
|
20
3
|
apartmentId: string;
|
|
21
|
-
assignedUserIds: string[];
|
|
22
|
-
createdById: string;
|
|
23
|
-
attachments?: string[];
|
|
24
4
|
}
|
|
25
5
|
export declare class updatedTaskDTO extends CreateTaskDto {
|
|
26
6
|
id: string;
|
|
7
|
+
isDone: Boolean;
|
|
27
8
|
}
|
|
28
|
-
export declare class TaskDTO {
|
|
9
|
+
export declare class TaskDTO extends CreateTaskDto {
|
|
29
10
|
id: string;
|
|
30
|
-
title: string;
|
|
31
|
-
description: string;
|
|
32
|
-
status: TaskStatus;
|
|
33
11
|
createdAt: Date;
|
|
34
12
|
updatedAt: Date;
|
|
35
|
-
|
|
36
|
-
priority?: Priority;
|
|
37
|
-
apartmentId: string;
|
|
38
|
-
assignedUserIds: string[];
|
|
39
|
-
createdById: string;
|
|
40
|
-
attachments?: string[];
|
|
13
|
+
isDone: Boolean;
|
|
41
14
|
}
|
|
42
15
|
//# sourceMappingURL=Task.dto.d.ts.map
|
package/dist/Task.dto.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Task.dto.d.ts","sourceRoot":"","sources":["../src/Task.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Task.dto.d.ts","sourceRoot":"","sources":["../src/Task.dto.ts"],"names":[],"mappings":"AAWA,qBAAa,aAAa;IAGxB,WAAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,cAAe,SAAQ,aAAa;IAG/C,EAAE,EAAE,MAAM,CAAC;IAIX,MAAM,EAAC,OAAO,CAAC;CAChB;AAED,qBAAa,OAAS,SAAQ,aAAa;IAGzC,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,MAAM,EAAC,OAAO,CAAC;CAChB"}
|
package/dist/Task.dto.js
CHANGED
|
@@ -9,71 +9,21 @@ 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.TaskDTO = exports.updatedTaskDTO = exports.CreateTaskDto =
|
|
12
|
+
exports.TaskDTO = exports.updatedTaskDTO = exports.CreateTaskDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
var TaskStatus;
|
|
15
|
-
(function (TaskStatus) {
|
|
16
|
-
TaskStatus["PENDING"] = "PENDING";
|
|
17
|
-
TaskStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
18
|
-
TaskStatus["COMPLETED"] = "COMPLETED";
|
|
19
|
-
TaskStatus["CANCELLED"] = "CANCELLED";
|
|
20
|
-
TaskStatus["ON_HOLD"] = "ON_HOLD";
|
|
21
|
-
})(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
|
|
22
|
-
var Priority;
|
|
23
|
-
(function (Priority) {
|
|
24
|
-
Priority["LOW"] = "LOW";
|
|
25
|
-
Priority["MEDIUM"] = "MEDIUM";
|
|
26
|
-
Priority["HIGH"] = "HIGH";
|
|
27
|
-
Priority["URGENT"] = "URGENT";
|
|
28
|
-
})(Priority || (exports.Priority = Priority = {}));
|
|
29
14
|
class CreateTaskDto {
|
|
30
15
|
}
|
|
31
16
|
exports.CreateTaskDto = CreateTaskDto;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.IsString)(),
|
|
34
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], CreateTaskDto.prototype, "title", void 0);
|
|
37
17
|
__decorate([
|
|
38
18
|
(0, class_validator_1.IsString)(),
|
|
39
19
|
(0, class_validator_1.IsNotEmpty)(),
|
|
40
20
|
__metadata("design:type", String)
|
|
41
21
|
], CreateTaskDto.prototype, "description", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_validator_1.IsEnum)(TaskStatus),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], CreateTaskDto.prototype, "status", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsDate)(),
|
|
49
|
-
__metadata("design:type", Date)
|
|
50
|
-
], CreateTaskDto.prototype, "dueDate", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_validator_1.IsOptional)(),
|
|
53
|
-
(0, class_validator_1.IsEnum)(Priority),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], CreateTaskDto.prototype, "priority", void 0);
|
|
56
22
|
__decorate([
|
|
57
23
|
(0, class_validator_1.IsString)(),
|
|
58
24
|
(0, class_validator_1.IsNotEmpty)(),
|
|
59
25
|
__metadata("design:type", String)
|
|
60
26
|
], CreateTaskDto.prototype, "apartmentId", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_validator_1.IsArray)(),
|
|
63
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
64
|
-
__metadata("design:type", Array)
|
|
65
|
-
], CreateTaskDto.prototype, "assignedUserIds", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, class_validator_1.IsString)(),
|
|
68
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], CreateTaskDto.prototype, "createdById", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, class_validator_1.IsOptional)(),
|
|
73
|
-
(0, class_validator_1.IsArray)(),
|
|
74
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
75
|
-
__metadata("design:type", Array)
|
|
76
|
-
], CreateTaskDto.prototype, "attachments", void 0);
|
|
77
27
|
class updatedTaskDTO extends CreateTaskDto {
|
|
78
28
|
}
|
|
79
29
|
exports.updatedTaskDTO = updatedTaskDTO;
|
|
@@ -82,7 +32,12 @@ __decorate([
|
|
|
82
32
|
(0, class_validator_1.IsNotEmpty)(),
|
|
83
33
|
__metadata("design:type", String)
|
|
84
34
|
], updatedTaskDTO.prototype, "id", void 0);
|
|
85
|
-
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsBoolean)(),
|
|
37
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], updatedTaskDTO.prototype, "isDone", void 0);
|
|
40
|
+
class TaskDTO extends CreateTaskDto {
|
|
86
41
|
}
|
|
87
42
|
exports.TaskDTO = TaskDTO;
|
|
88
43
|
__decorate([
|
|
@@ -90,21 +45,6 @@ __decorate([
|
|
|
90
45
|
(0, class_validator_1.IsNotEmpty)(),
|
|
91
46
|
__metadata("design:type", String)
|
|
92
47
|
], TaskDTO.prototype, "id", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, class_validator_1.IsString)(),
|
|
95
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
96
|
-
__metadata("design:type", String)
|
|
97
|
-
], TaskDTO.prototype, "title", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, class_validator_1.IsString)(),
|
|
100
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], TaskDTO.prototype, "description", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
(0, class_validator_1.IsEnum)(TaskStatus),
|
|
105
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
106
|
-
__metadata("design:type", String)
|
|
107
|
-
], TaskDTO.prototype, "status", void 0);
|
|
108
48
|
__decorate([
|
|
109
49
|
(0, class_validator_1.IsDate)(),
|
|
110
50
|
__metadata("design:type", Date)
|
|
@@ -114,34 +54,8 @@ __decorate([
|
|
|
114
54
|
__metadata("design:type", Date)
|
|
115
55
|
], TaskDTO.prototype, "updatedAt", void 0);
|
|
116
56
|
__decorate([
|
|
117
|
-
(0, class_validator_1.
|
|
118
|
-
(0, class_validator_1.IsDate)(),
|
|
119
|
-
__metadata("design:type", Date)
|
|
120
|
-
], TaskDTO.prototype, "dueDate", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
(0, class_validator_1.IsOptional)(),
|
|
123
|
-
(0, class_validator_1.IsEnum)(Priority),
|
|
124
|
-
__metadata("design:type", String)
|
|
125
|
-
], TaskDTO.prototype, "priority", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
(0, class_validator_1.IsString)(),
|
|
128
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
129
|
-
__metadata("design:type", String)
|
|
130
|
-
], TaskDTO.prototype, "apartmentId", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
(0, class_validator_1.IsArray)(),
|
|
133
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
134
|
-
__metadata("design:type", Array)
|
|
135
|
-
], TaskDTO.prototype, "assignedUserIds", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
(0, class_validator_1.IsString)(),
|
|
57
|
+
(0, class_validator_1.IsBoolean)(),
|
|
138
58
|
(0, class_validator_1.IsNotEmpty)(),
|
|
139
|
-
__metadata("design:type",
|
|
140
|
-
], TaskDTO.prototype, "
|
|
141
|
-
__decorate([
|
|
142
|
-
(0, class_validator_1.IsOptional)(),
|
|
143
|
-
(0, class_validator_1.IsArray)(),
|
|
144
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
145
|
-
__metadata("design:type", Array)
|
|
146
|
-
], TaskDTO.prototype, "attachments", void 0);
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], TaskDTO.prototype, "isDone", void 0);
|
|
147
61
|
//# sourceMappingURL=Task.dto.js.map
|
package/dist/Task.dto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Task.dto.js","sourceRoot":"","sources":["../src/Task.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"Task.dto.js","sourceRoot":"","sources":["../src/Task.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAQyB;AAEzB,MAAa,aAAa;CAQzB;AARD,sCAQC;AALC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACO;AAGtB,MAAa,cAAe,SAAQ,aAAa;CAQhD;AARD,wCAQC;AALC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0CACF;AAIX;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;8BACN,OAAO;8CAAC;AAGjB,MAAa,OAAS,SAAQ,aAAa;CAc1C;AAdD,0BAcC;AAXC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mCACF;AAGX;IADC,IAAA,wBAAM,GAAE;8BACE,IAAI;0CAAC;AAGhB;IADC,IAAA,wBAAM,GAAE;8BACE,IAAI;0CAAC;AAIhB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;8BACN,OAAO;uCAAC"}
|
package/package.json
CHANGED
package/src/Task.dto.ts
CHANGED
|
@@ -6,83 +6,33 @@ import {
|
|
|
6
6
|
IsEnum,
|
|
7
7
|
IsDate,
|
|
8
8
|
IsArray,
|
|
9
|
+
IsBoolean,
|
|
9
10
|
} from "class-validator";
|
|
10
11
|
|
|
11
|
-
export enum TaskStatus {
|
|
12
|
-
PENDING = "PENDING",
|
|
13
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
14
|
-
COMPLETED = "COMPLETED",
|
|
15
|
-
CANCELLED = "CANCELLED",
|
|
16
|
-
ON_HOLD = "ON_HOLD",
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export enum Priority {
|
|
20
|
-
LOW = "LOW",
|
|
21
|
-
MEDIUM = "MEDIUM",
|
|
22
|
-
HIGH = "HIGH",
|
|
23
|
-
URGENT = "URGENT",
|
|
24
|
-
}
|
|
25
|
-
|
|
26
12
|
export class CreateTaskDto {
|
|
27
|
-
@IsString()
|
|
28
|
-
@IsNotEmpty()
|
|
29
|
-
title: string;
|
|
30
|
-
|
|
31
13
|
@IsString()
|
|
32
14
|
@IsNotEmpty()
|
|
33
15
|
description: string;
|
|
34
16
|
|
|
35
|
-
@IsEnum(TaskStatus)
|
|
36
|
-
status: TaskStatus;
|
|
37
|
-
|
|
38
|
-
@IsOptional()
|
|
39
|
-
@IsDate()
|
|
40
|
-
dueDate?: Date;
|
|
41
|
-
|
|
42
|
-
@IsOptional()
|
|
43
|
-
@IsEnum(Priority)
|
|
44
|
-
priority?: Priority;
|
|
45
|
-
|
|
46
17
|
@IsString()
|
|
47
18
|
@IsNotEmpty()
|
|
48
19
|
apartmentId: string;
|
|
49
|
-
|
|
50
|
-
@IsArray()
|
|
51
|
-
@IsString({ each: true })
|
|
52
|
-
assignedUserIds: string[];
|
|
53
|
-
|
|
54
|
-
@IsString()
|
|
55
|
-
@IsNotEmpty()
|
|
56
|
-
createdById: string;
|
|
57
|
-
|
|
58
|
-
@IsOptional()
|
|
59
|
-
@IsArray()
|
|
60
|
-
@IsString({ each: true })
|
|
61
|
-
attachments?: string[];
|
|
62
20
|
}
|
|
63
21
|
|
|
64
22
|
export class updatedTaskDTO extends CreateTaskDto {
|
|
65
23
|
@IsString()
|
|
66
24
|
@IsNotEmpty()
|
|
67
25
|
id: string;
|
|
68
|
-
}
|
|
69
26
|
|
|
70
|
-
|
|
71
|
-
@IsString()
|
|
27
|
+
@IsBoolean()
|
|
72
28
|
@IsNotEmpty()
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
@IsString()
|
|
76
|
-
@IsNotEmpty()
|
|
77
|
-
title: string;
|
|
29
|
+
isDone:Boolean;
|
|
30
|
+
}
|
|
78
31
|
|
|
32
|
+
export class TaskDTO extends CreateTaskDto{
|
|
79
33
|
@IsString()
|
|
80
34
|
@IsNotEmpty()
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@IsEnum(TaskStatus)
|
|
84
|
-
@IsNotEmpty()
|
|
85
|
-
status: TaskStatus;
|
|
35
|
+
id: string;
|
|
86
36
|
|
|
87
37
|
@IsDate()
|
|
88
38
|
createdAt: Date;
|
|
@@ -90,28 +40,7 @@ export class TaskDTO {
|
|
|
90
40
|
@IsDate()
|
|
91
41
|
updatedAt: Date;
|
|
92
42
|
|
|
93
|
-
@
|
|
94
|
-
@IsDate()
|
|
95
|
-
dueDate?: Date;
|
|
96
|
-
|
|
97
|
-
@IsOptional()
|
|
98
|
-
@IsEnum(Priority)
|
|
99
|
-
priority?: Priority;
|
|
100
|
-
|
|
101
|
-
@IsString()
|
|
43
|
+
@IsBoolean()
|
|
102
44
|
@IsNotEmpty()
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
@IsArray()
|
|
106
|
-
@IsString({ each: true })
|
|
107
|
-
assignedUserIds: string[];
|
|
108
|
-
|
|
109
|
-
@IsString()
|
|
110
|
-
@IsNotEmpty()
|
|
111
|
-
createdById: string;
|
|
112
|
-
|
|
113
|
-
@IsOptional()
|
|
114
|
-
@IsArray()
|
|
115
|
-
@IsString({ each: true })
|
|
116
|
-
attachments?: string[];
|
|
45
|
+
isDone:Boolean;
|
|
117
46
|
}
|