@flusys/nestjs-task-manager 5.3.0
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/README.md +245 -0
- package/cjs/config/index.js +19 -0
- package/cjs/config/message-keys.js +92 -0
- package/cjs/config/task-manager.constants.js +11 -0
- package/cjs/controllers/index.js +22 -0
- package/cjs/controllers/task-board.controller.js +219 -0
- package/cjs/controllers/task-comment.controller.js +103 -0
- package/cjs/controllers/task-label.controller.js +112 -0
- package/cjs/controllers/task-list.controller.js +158 -0
- package/cjs/controllers/task.controller.js +199 -0
- package/cjs/docs/index.js +18 -0
- package/cjs/docs/task-manager-swagger.config.js +43 -0
- package/cjs/dtos/index.js +22 -0
- package/cjs/dtos/task-board.dto.js +310 -0
- package/cjs/dtos/task-comment.dto.js +131 -0
- package/cjs/dtos/task-label.dto.js +120 -0
- package/cjs/dtos/task-list.dto.js +198 -0
- package/cjs/dtos/task.dto.js +367 -0
- package/cjs/entities/index.js +72 -0
- package/cjs/entities/task-activity.entity.js +98 -0
- package/cjs/entities/task-assignee.entity.js +67 -0
- package/cjs/entities/task-board-member.entity.js +94 -0
- package/cjs/entities/task-board-with-company.entity.js +57 -0
- package/cjs/entities/task-board.entity.js +88 -0
- package/cjs/entities/task-comment.entity.js +80 -0
- package/cjs/entities/task-label.entity.js +72 -0
- package/cjs/entities/task-list.entity.js +104 -0
- package/cjs/entities/task-task-label.entity.js +67 -0
- package/cjs/entities/task.entity.js +151 -0
- package/cjs/gateways/index.js +18 -0
- package/cjs/gateways/task-board.gateway.js +199 -0
- package/cjs/index.js +26 -0
- package/cjs/interfaces/index.js +19 -0
- package/cjs/interfaces/task-manager-module.interface.js +4 -0
- package/cjs/interfaces/task.interface.js +4 -0
- package/cjs/modules/index.js +18 -0
- package/cjs/modules/task-manager.module.js +131 -0
- package/cjs/services/index.js +25 -0
- package/cjs/services/task-activity.service.js +76 -0
- package/cjs/services/task-board.service.js +235 -0
- package/cjs/services/task-comment.service.js +103 -0
- package/cjs/services/task-label.service.js +97 -0
- package/cjs/services/task-list.service.js +115 -0
- package/cjs/services/task-manager-config.service.js +69 -0
- package/cjs/services/task-manager-datasource.provider.js +84 -0
- package/cjs/services/task.service.js +359 -0
- package/config/index.d.ts +2 -0
- package/config/message-keys.d.ts +65 -0
- package/config/task-manager.constants.d.ts +1 -0
- package/controllers/index.d.ts +5 -0
- package/controllers/task-board.controller.d.ts +27 -0
- package/controllers/task-comment.controller.d.ts +22 -0
- package/controllers/task-label.controller.d.ts +22 -0
- package/controllers/task-list.controller.d.ts +26 -0
- package/controllers/task.controller.d.ts +28 -0
- package/docs/index.d.ts +1 -0
- package/docs/task-manager-swagger.config.d.ts +2 -0
- package/dtos/index.d.ts +5 -0
- package/dtos/task-board.dto.d.ts +44 -0
- package/dtos/task-comment.dto.d.ts +16 -0
- package/dtos/task-label.dto.d.ts +16 -0
- package/dtos/task-list.dto.d.ts +26 -0
- package/dtos/task.dto.d.ts +48 -0
- package/entities/index.d.ts +22 -0
- package/entities/task-activity.entity.d.ts +9 -0
- package/entities/task-assignee.entity.d.ts +5 -0
- package/entities/task-board-member.entity.d.ts +12 -0
- package/entities/task-board-with-company.entity.d.ts +4 -0
- package/entities/task-board.entity.d.ts +8 -0
- package/entities/task-comment.entity.d.ts +7 -0
- package/entities/task-label.entity.d.ts +6 -0
- package/entities/task-list.entity.d.ts +9 -0
- package/entities/task-task-label.entity.d.ts +5 -0
- package/entities/task.entity.d.ts +23 -0
- package/fesm/config/index.js +2 -0
- package/fesm/config/message-keys.js +65 -0
- package/fesm/config/task-manager.constants.js +1 -0
- package/fesm/controllers/index.js +5 -0
- package/fesm/controllers/task-board.controller.js +209 -0
- package/fesm/controllers/task-comment.controller.js +93 -0
- package/fesm/controllers/task-label.controller.js +102 -0
- package/fesm/controllers/task-list.controller.js +148 -0
- package/fesm/controllers/task.controller.js +189 -0
- package/fesm/docs/index.js +1 -0
- package/fesm/docs/task-manager-swagger.config.js +33 -0
- package/fesm/dtos/index.js +5 -0
- package/fesm/dtos/task-board.dto.js +277 -0
- package/fesm/dtos/task-comment.dto.js +110 -0
- package/fesm/dtos/task-label.dto.js +99 -0
- package/fesm/dtos/task-list.dto.js +174 -0
- package/fesm/dtos/task.dto.js +337 -0
- package/fesm/entities/index.js +46 -0
- package/fesm/entities/task-activity.entity.js +88 -0
- package/fesm/entities/task-assignee.entity.js +57 -0
- package/fesm/entities/task-board-member.entity.js +76 -0
- package/fesm/entities/task-board-with-company.entity.js +47 -0
- package/fesm/entities/task-board.entity.js +78 -0
- package/fesm/entities/task-comment.entity.js +70 -0
- package/fesm/entities/task-label.entity.js +62 -0
- package/fesm/entities/task-list.entity.js +94 -0
- package/fesm/entities/task-task-label.entity.js +57 -0
- package/fesm/entities/task.entity.js +133 -0
- package/fesm/gateways/index.js +1 -0
- package/fesm/gateways/task-board.gateway.js +148 -0
- package/fesm/index.js +9 -0
- package/fesm/interfaces/index.js +2 -0
- package/fesm/interfaces/task-manager-module.interface.js +1 -0
- package/fesm/interfaces/task.interface.js +1 -0
- package/fesm/modules/index.js +1 -0
- package/fesm/modules/task-manager.module.js +121 -0
- package/fesm/services/index.js +8 -0
- package/fesm/services/task-activity.service.js +66 -0
- package/fesm/services/task-board.service.js +225 -0
- package/fesm/services/task-comment.service.js +93 -0
- package/fesm/services/task-label.service.js +87 -0
- package/fesm/services/task-list.service.js +105 -0
- package/fesm/services/task-manager-config.service.js +59 -0
- package/fesm/services/task-manager-datasource.provider.js +74 -0
- package/fesm/services/task.service.js +349 -0
- package/gateways/index.d.ts +1 -0
- package/gateways/task-board.gateway.d.ts +22 -0
- package/index.d.ts +9 -0
- package/interfaces/index.d.ts +2 -0
- package/interfaces/task-manager-module.interface.d.ts +19 -0
- package/interfaces/task.interface.d.ts +52 -0
- package/modules/index.d.ts +1 -0
- package/modules/task-manager.module.d.ts +8 -0
- package/package.json +91 -0
- package/services/index.d.ts +8 -0
- package/services/task-activity.service.d.ts +8 -0
- package/services/task-board.service.d.ts +32 -0
- package/services/task-comment.service.d.ts +18 -0
- package/services/task-label.service.d.ts +18 -0
- package/services/task-list.service.d.ts +19 -0
- package/services/task-manager-config.service.d.ts +12 -0
- package/services/task-manager-datasource.provider.d.ts +18 -0
- package/services/task.service.d.ts +44 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
}
|
|
20
|
+
function _ts_metadata(k, v) {
|
|
21
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
|
+
}
|
|
23
|
+
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
|
24
|
+
import { Expose } from 'class-transformer';
|
|
25
|
+
import { IsNotEmpty, IsOptional, IsString, IsUUID, MaxLength } from 'class-validator';
|
|
26
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
27
|
+
export class CreateTaskLabelDto {
|
|
28
|
+
constructor(){
|
|
29
|
+
_define_property(this, "boardId", void 0);
|
|
30
|
+
_define_property(this, "name", void 0);
|
|
31
|
+
_define_property(this, "color", void 0);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
_ts_decorate([
|
|
35
|
+
ApiProperty(),
|
|
36
|
+
IsUUID(),
|
|
37
|
+
_ts_metadata("design:type", String)
|
|
38
|
+
], CreateTaskLabelDto.prototype, "boardId", void 0);
|
|
39
|
+
_ts_decorate([
|
|
40
|
+
ApiProperty({
|
|
41
|
+
maxLength: 100
|
|
42
|
+
}),
|
|
43
|
+
IsNotEmpty(),
|
|
44
|
+
IsString(),
|
|
45
|
+
MaxLength(100),
|
|
46
|
+
_ts_metadata("design:type", String)
|
|
47
|
+
], CreateTaskLabelDto.prototype, "name", void 0);
|
|
48
|
+
_ts_decorate([
|
|
49
|
+
ApiPropertyOptional({
|
|
50
|
+
example: '#10B981'
|
|
51
|
+
}),
|
|
52
|
+
IsOptional(),
|
|
53
|
+
IsString(),
|
|
54
|
+
MaxLength(7),
|
|
55
|
+
_ts_metadata("design:type", String)
|
|
56
|
+
], CreateTaskLabelDto.prototype, "color", void 0);
|
|
57
|
+
export class UpdateTaskLabelDto extends PartialType(CreateTaskLabelDto) {
|
|
58
|
+
constructor(...args){
|
|
59
|
+
super(...args), _define_property(this, "id", void 0);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
_ts_decorate([
|
|
63
|
+
ApiProperty(),
|
|
64
|
+
IsUUID(),
|
|
65
|
+
_ts_metadata("design:type", String)
|
|
66
|
+
], UpdateTaskLabelDto.prototype, "id", void 0);
|
|
67
|
+
export class TaskLabelResponseDto extends IdentityResponseDto {
|
|
68
|
+
constructor(...args){
|
|
69
|
+
super(...args), _define_property(this, "boardId", void 0), _define_property(this, "name", void 0), _define_property(this, "color", void 0);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
_ts_decorate([
|
|
73
|
+
Expose(),
|
|
74
|
+
ApiProperty({
|
|
75
|
+
type: String,
|
|
76
|
+
format: 'uuid',
|
|
77
|
+
description: 'Board ID'
|
|
78
|
+
}),
|
|
79
|
+
_ts_metadata("design:type", String)
|
|
80
|
+
], TaskLabelResponseDto.prototype, "boardId", void 0);
|
|
81
|
+
_ts_decorate([
|
|
82
|
+
Expose(),
|
|
83
|
+
ApiProperty({
|
|
84
|
+
type: String,
|
|
85
|
+
description: 'Label name',
|
|
86
|
+
maxLength: 100
|
|
87
|
+
}),
|
|
88
|
+
_ts_metadata("design:type", String)
|
|
89
|
+
], TaskLabelResponseDto.prototype, "name", void 0);
|
|
90
|
+
_ts_decorate([
|
|
91
|
+
Expose(),
|
|
92
|
+
ApiPropertyOptional({
|
|
93
|
+
type: String,
|
|
94
|
+
description: 'Label color hex',
|
|
95
|
+
example: '#10B981',
|
|
96
|
+
nullable: true
|
|
97
|
+
}),
|
|
98
|
+
_ts_metadata("design:type", String)
|
|
99
|
+
], TaskLabelResponseDto.prototype, "color", void 0);
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
}
|
|
20
|
+
function _ts_metadata(k, v) {
|
|
21
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
|
+
}
|
|
23
|
+
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
|
24
|
+
import { Expose } from 'class-transformer';
|
|
25
|
+
import { IsArray, IsBoolean, IsInt, IsNotEmpty, IsOptional, IsString, IsUUID, MaxLength, Min } from 'class-validator';
|
|
26
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
27
|
+
export class CreateTaskListDto {
|
|
28
|
+
constructor(){
|
|
29
|
+
_define_property(this, "boardId", void 0);
|
|
30
|
+
_define_property(this, "name", void 0);
|
|
31
|
+
_define_property(this, "color", void 0);
|
|
32
|
+
_define_property(this, "position", void 0);
|
|
33
|
+
_define_property(this, "isDoneList", void 0);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
_ts_decorate([
|
|
37
|
+
ApiProperty(),
|
|
38
|
+
IsUUID(),
|
|
39
|
+
_ts_metadata("design:type", String)
|
|
40
|
+
], CreateTaskListDto.prototype, "boardId", void 0);
|
|
41
|
+
_ts_decorate([
|
|
42
|
+
ApiProperty({
|
|
43
|
+
maxLength: 255
|
|
44
|
+
}),
|
|
45
|
+
IsNotEmpty(),
|
|
46
|
+
IsString(),
|
|
47
|
+
MaxLength(255),
|
|
48
|
+
_ts_metadata("design:type", String)
|
|
49
|
+
], CreateTaskListDto.prototype, "name", void 0);
|
|
50
|
+
_ts_decorate([
|
|
51
|
+
ApiPropertyOptional({
|
|
52
|
+
example: '#6B7280'
|
|
53
|
+
}),
|
|
54
|
+
IsOptional(),
|
|
55
|
+
IsString(),
|
|
56
|
+
MaxLength(7),
|
|
57
|
+
_ts_metadata("design:type", String)
|
|
58
|
+
], CreateTaskListDto.prototype, "color", void 0);
|
|
59
|
+
_ts_decorate([
|
|
60
|
+
ApiPropertyOptional({
|
|
61
|
+
default: 0
|
|
62
|
+
}),
|
|
63
|
+
IsOptional(),
|
|
64
|
+
IsInt(),
|
|
65
|
+
Min(0),
|
|
66
|
+
_ts_metadata("design:type", Number)
|
|
67
|
+
], CreateTaskListDto.prototype, "position", void 0);
|
|
68
|
+
_ts_decorate([
|
|
69
|
+
ApiPropertyOptional({
|
|
70
|
+
description: 'Mark this column as the final/done state',
|
|
71
|
+
default: false
|
|
72
|
+
}),
|
|
73
|
+
IsOptional(),
|
|
74
|
+
IsBoolean(),
|
|
75
|
+
_ts_metadata("design:type", Boolean)
|
|
76
|
+
], CreateTaskListDto.prototype, "isDoneList", void 0);
|
|
77
|
+
export class UpdateTaskListDto extends PartialType(CreateTaskListDto) {
|
|
78
|
+
constructor(...args){
|
|
79
|
+
super(...args), _define_property(this, "id", void 0), _define_property(this, "isActive", void 0);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
_ts_decorate([
|
|
83
|
+
ApiProperty(),
|
|
84
|
+
IsUUID(),
|
|
85
|
+
_ts_metadata("design:type", String)
|
|
86
|
+
], UpdateTaskListDto.prototype, "id", void 0);
|
|
87
|
+
_ts_decorate([
|
|
88
|
+
ApiPropertyOptional(),
|
|
89
|
+
IsOptional(),
|
|
90
|
+
IsBoolean(),
|
|
91
|
+
_ts_metadata("design:type", Boolean)
|
|
92
|
+
], UpdateTaskListDto.prototype, "isActive", void 0);
|
|
93
|
+
export class ReorderTaskListsDto {
|
|
94
|
+
constructor(){
|
|
95
|
+
_define_property(this, "boardId", void 0);
|
|
96
|
+
_define_property(this, "orderedIds", void 0);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
_ts_decorate([
|
|
100
|
+
ApiProperty(),
|
|
101
|
+
IsUUID(),
|
|
102
|
+
_ts_metadata("design:type", String)
|
|
103
|
+
], ReorderTaskListsDto.prototype, "boardId", void 0);
|
|
104
|
+
_ts_decorate([
|
|
105
|
+
ApiProperty({
|
|
106
|
+
description: 'Ordered list of list IDs',
|
|
107
|
+
type: [
|
|
108
|
+
String
|
|
109
|
+
]
|
|
110
|
+
}),
|
|
111
|
+
IsArray(),
|
|
112
|
+
IsUUID('4', {
|
|
113
|
+
each: true
|
|
114
|
+
}),
|
|
115
|
+
_ts_metadata("design:type", Array)
|
|
116
|
+
], ReorderTaskListsDto.prototype, "orderedIds", void 0);
|
|
117
|
+
export class TaskListResponseDto extends IdentityResponseDto {
|
|
118
|
+
constructor(...args){
|
|
119
|
+
super(...args), _define_property(this, "boardId", void 0), _define_property(this, "name", void 0), _define_property(this, "color", void 0), _define_property(this, "position", void 0), _define_property(this, "isActive", void 0), _define_property(this, "isDoneList", void 0);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
_ts_decorate([
|
|
123
|
+
Expose(),
|
|
124
|
+
ApiProperty({
|
|
125
|
+
type: String,
|
|
126
|
+
format: 'uuid',
|
|
127
|
+
description: 'Board ID'
|
|
128
|
+
}),
|
|
129
|
+
_ts_metadata("design:type", String)
|
|
130
|
+
], TaskListResponseDto.prototype, "boardId", void 0);
|
|
131
|
+
_ts_decorate([
|
|
132
|
+
Expose(),
|
|
133
|
+
ApiProperty({
|
|
134
|
+
type: String,
|
|
135
|
+
description: 'List name',
|
|
136
|
+
maxLength: 255
|
|
137
|
+
}),
|
|
138
|
+
_ts_metadata("design:type", String)
|
|
139
|
+
], TaskListResponseDto.prototype, "name", void 0);
|
|
140
|
+
_ts_decorate([
|
|
141
|
+
Expose(),
|
|
142
|
+
ApiPropertyOptional({
|
|
143
|
+
type: String,
|
|
144
|
+
description: 'List color hex',
|
|
145
|
+
example: '#6B7280',
|
|
146
|
+
nullable: true
|
|
147
|
+
}),
|
|
148
|
+
_ts_metadata("design:type", String)
|
|
149
|
+
], TaskListResponseDto.prototype, "color", void 0);
|
|
150
|
+
_ts_decorate([
|
|
151
|
+
Expose(),
|
|
152
|
+
ApiProperty({
|
|
153
|
+
type: Number,
|
|
154
|
+
description: 'Display order position',
|
|
155
|
+
minimum: 0
|
|
156
|
+
}),
|
|
157
|
+
_ts_metadata("design:type", Number)
|
|
158
|
+
], TaskListResponseDto.prototype, "position", void 0);
|
|
159
|
+
_ts_decorate([
|
|
160
|
+
Expose(),
|
|
161
|
+
ApiProperty({
|
|
162
|
+
type: Boolean,
|
|
163
|
+
description: 'Whether the list is active'
|
|
164
|
+
}),
|
|
165
|
+
_ts_metadata("design:type", Boolean)
|
|
166
|
+
], TaskListResponseDto.prototype, "isActive", void 0);
|
|
167
|
+
_ts_decorate([
|
|
168
|
+
Expose(),
|
|
169
|
+
ApiProperty({
|
|
170
|
+
type: Boolean,
|
|
171
|
+
description: 'Whether this list represents the done/final state'
|
|
172
|
+
}),
|
|
173
|
+
_ts_metadata("design:type", Boolean)
|
|
174
|
+
], TaskListResponseDto.prototype, "isDoneList", void 0);
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
}
|
|
20
|
+
function _ts_metadata(k, v) {
|
|
21
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
|
+
}
|
|
23
|
+
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
|
24
|
+
import { Expose, Type } from 'class-transformer';
|
|
25
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
26
|
+
import { IsArray, IsEnum, IsInt, IsNotEmpty, IsOptional, IsString, IsUUID, Matches, MaxLength, Min } from 'class-validator';
|
|
27
|
+
import { TaskPriority } from '../entities/task.entity';
|
|
28
|
+
import { TaskLabelResponseDto } from './task-label.dto';
|
|
29
|
+
export class CreateTaskDto {
|
|
30
|
+
constructor(){
|
|
31
|
+
_define_property(this, "boardId", void 0);
|
|
32
|
+
_define_property(this, "listId", void 0);
|
|
33
|
+
_define_property(this, "title", void 0);
|
|
34
|
+
_define_property(this, "description", void 0);
|
|
35
|
+
_define_property(this, "priority", void 0);
|
|
36
|
+
_define_property(this, "dueDate", void 0);
|
|
37
|
+
_define_property(this, "assigneeIds", void 0);
|
|
38
|
+
_define_property(this, "parentTaskId", void 0);
|
|
39
|
+
_define_property(this, "estimatedHours", void 0);
|
|
40
|
+
_define_property(this, "labelIds", void 0);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
_ts_decorate([
|
|
44
|
+
ApiProperty(),
|
|
45
|
+
IsUUID(),
|
|
46
|
+
_ts_metadata("design:type", String)
|
|
47
|
+
], CreateTaskDto.prototype, "boardId", void 0);
|
|
48
|
+
_ts_decorate([
|
|
49
|
+
ApiProperty(),
|
|
50
|
+
IsUUID(),
|
|
51
|
+
_ts_metadata("design:type", String)
|
|
52
|
+
], CreateTaskDto.prototype, "listId", void 0);
|
|
53
|
+
_ts_decorate([
|
|
54
|
+
ApiProperty({
|
|
55
|
+
maxLength: 500
|
|
56
|
+
}),
|
|
57
|
+
IsNotEmpty(),
|
|
58
|
+
IsString(),
|
|
59
|
+
MaxLength(500),
|
|
60
|
+
_ts_metadata("design:type", String)
|
|
61
|
+
], CreateTaskDto.prototype, "title", void 0);
|
|
62
|
+
_ts_decorate([
|
|
63
|
+
ApiPropertyOptional(),
|
|
64
|
+
IsOptional(),
|
|
65
|
+
IsString(),
|
|
66
|
+
_ts_metadata("design:type", String)
|
|
67
|
+
], CreateTaskDto.prototype, "description", void 0);
|
|
68
|
+
_ts_decorate([
|
|
69
|
+
ApiPropertyOptional({
|
|
70
|
+
enum: TaskPriority,
|
|
71
|
+
default: TaskPriority.MEDIUM
|
|
72
|
+
}),
|
|
73
|
+
IsOptional(),
|
|
74
|
+
IsEnum(TaskPriority),
|
|
75
|
+
_ts_metadata("design:type", typeof TaskPriority === "undefined" ? Object : TaskPriority)
|
|
76
|
+
], CreateTaskDto.prototype, "priority", void 0);
|
|
77
|
+
_ts_decorate([
|
|
78
|
+
ApiPropertyOptional({
|
|
79
|
+
description: 'Due date YYYY-MM-DD'
|
|
80
|
+
}),
|
|
81
|
+
IsOptional(),
|
|
82
|
+
IsString(),
|
|
83
|
+
Matches(/^\d{4}-\d{2}-\d{2}$/, {
|
|
84
|
+
message: 'dueDate must be YYYY-MM-DD'
|
|
85
|
+
}),
|
|
86
|
+
_ts_metadata("design:type", Object)
|
|
87
|
+
], CreateTaskDto.prototype, "dueDate", void 0);
|
|
88
|
+
_ts_decorate([
|
|
89
|
+
ApiPropertyOptional({
|
|
90
|
+
type: [
|
|
91
|
+
String
|
|
92
|
+
],
|
|
93
|
+
description: 'Board member user IDs to assign'
|
|
94
|
+
}),
|
|
95
|
+
IsOptional(),
|
|
96
|
+
IsArray(),
|
|
97
|
+
IsUUID('4', {
|
|
98
|
+
each: true
|
|
99
|
+
}),
|
|
100
|
+
_ts_metadata("design:type", Array)
|
|
101
|
+
], CreateTaskDto.prototype, "assigneeIds", void 0);
|
|
102
|
+
_ts_decorate([
|
|
103
|
+
ApiPropertyOptional(),
|
|
104
|
+
IsOptional(),
|
|
105
|
+
IsUUID(),
|
|
106
|
+
_ts_metadata("design:type", Object)
|
|
107
|
+
], CreateTaskDto.prototype, "parentTaskId", void 0);
|
|
108
|
+
_ts_decorate([
|
|
109
|
+
ApiPropertyOptional(),
|
|
110
|
+
IsOptional(),
|
|
111
|
+
Min(0),
|
|
112
|
+
_ts_metadata("design:type", Object)
|
|
113
|
+
], CreateTaskDto.prototype, "estimatedHours", void 0);
|
|
114
|
+
_ts_decorate([
|
|
115
|
+
ApiPropertyOptional({
|
|
116
|
+
type: [
|
|
117
|
+
String
|
|
118
|
+
]
|
|
119
|
+
}),
|
|
120
|
+
IsOptional(),
|
|
121
|
+
IsArray(),
|
|
122
|
+
IsUUID('4', {
|
|
123
|
+
each: true
|
|
124
|
+
}),
|
|
125
|
+
_ts_metadata("design:type", Array)
|
|
126
|
+
], CreateTaskDto.prototype, "labelIds", void 0);
|
|
127
|
+
export class UpdateTaskDto extends PartialType(CreateTaskDto) {
|
|
128
|
+
constructor(...args){
|
|
129
|
+
super(...args), _define_property(this, "id", void 0);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
_ts_decorate([
|
|
133
|
+
ApiProperty(),
|
|
134
|
+
IsUUID(),
|
|
135
|
+
_ts_metadata("design:type", String)
|
|
136
|
+
], UpdateTaskDto.prototype, "id", void 0);
|
|
137
|
+
export class MoveTaskDto {
|
|
138
|
+
constructor(){
|
|
139
|
+
_define_property(this, "taskId", void 0);
|
|
140
|
+
_define_property(this, "targetListId", void 0);
|
|
141
|
+
_define_property(this, "position", void 0);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
_ts_decorate([
|
|
145
|
+
ApiProperty(),
|
|
146
|
+
IsUUID(),
|
|
147
|
+
_ts_metadata("design:type", String)
|
|
148
|
+
], MoveTaskDto.prototype, "taskId", void 0);
|
|
149
|
+
_ts_decorate([
|
|
150
|
+
ApiProperty(),
|
|
151
|
+
IsUUID(),
|
|
152
|
+
_ts_metadata("design:type", String)
|
|
153
|
+
], MoveTaskDto.prototype, "targetListId", void 0);
|
|
154
|
+
_ts_decorate([
|
|
155
|
+
ApiPropertyOptional({
|
|
156
|
+
default: 0
|
|
157
|
+
}),
|
|
158
|
+
IsOptional(),
|
|
159
|
+
IsInt(),
|
|
160
|
+
Min(0),
|
|
161
|
+
_ts_metadata("design:type", Number)
|
|
162
|
+
], MoveTaskDto.prototype, "position", void 0);
|
|
163
|
+
export class AssignTaskDto {
|
|
164
|
+
constructor(){
|
|
165
|
+
_define_property(this, "taskId", void 0);
|
|
166
|
+
_define_property(this, "assigneeIds", void 0);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
_ts_decorate([
|
|
170
|
+
ApiProperty(),
|
|
171
|
+
IsUUID(),
|
|
172
|
+
_ts_metadata("design:type", String)
|
|
173
|
+
], AssignTaskDto.prototype, "taskId", void 0);
|
|
174
|
+
_ts_decorate([
|
|
175
|
+
ApiProperty({
|
|
176
|
+
type: [
|
|
177
|
+
String
|
|
178
|
+
],
|
|
179
|
+
description: 'User IDs to assign (empty array to unassign all)'
|
|
180
|
+
}),
|
|
181
|
+
IsArray(),
|
|
182
|
+
IsUUID('4', {
|
|
183
|
+
each: true
|
|
184
|
+
}),
|
|
185
|
+
_ts_metadata("design:type", Array)
|
|
186
|
+
], AssignTaskDto.prototype, "assigneeIds", void 0);
|
|
187
|
+
export class TaskAssigneeResponseDto {
|
|
188
|
+
constructor(){
|
|
189
|
+
_define_property(this, "userId", void 0);
|
|
190
|
+
_define_property(this, "userName", void 0);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
_ts_decorate([
|
|
194
|
+
Expose(),
|
|
195
|
+
ApiProperty({
|
|
196
|
+
type: String,
|
|
197
|
+
format: 'uuid'
|
|
198
|
+
}),
|
|
199
|
+
_ts_metadata("design:type", String)
|
|
200
|
+
], TaskAssigneeResponseDto.prototype, "userId", void 0);
|
|
201
|
+
_ts_decorate([
|
|
202
|
+
Expose(),
|
|
203
|
+
ApiPropertyOptional({
|
|
204
|
+
type: String,
|
|
205
|
+
nullable: true
|
|
206
|
+
}),
|
|
207
|
+
_ts_metadata("design:type", Object)
|
|
208
|
+
], TaskAssigneeResponseDto.prototype, "userName", void 0);
|
|
209
|
+
export class TaskResponseDto extends IdentityResponseDto {
|
|
210
|
+
constructor(...args){
|
|
211
|
+
super(...args), _define_property(this, "boardId", void 0), _define_property(this, "listId", void 0), _define_property(this, "title", void 0), _define_property(this, "description", void 0), _define_property(this, "priority", void 0), _define_property(this, "dueDate", void 0), _define_property(this, "position", void 0), _define_property(this, "assignees", void 0), _define_property(this, "reporterId", void 0), _define_property(this, "parentTaskId", void 0), _define_property(this, "estimatedHours", void 0), _define_property(this, "labelIds", void 0), _define_property(this, "labels", void 0);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
_ts_decorate([
|
|
215
|
+
Expose(),
|
|
216
|
+
ApiProperty({
|
|
217
|
+
type: String,
|
|
218
|
+
format: 'uuid',
|
|
219
|
+
description: 'Board ID'
|
|
220
|
+
}),
|
|
221
|
+
_ts_metadata("design:type", String)
|
|
222
|
+
], TaskResponseDto.prototype, "boardId", void 0);
|
|
223
|
+
_ts_decorate([
|
|
224
|
+
Expose(),
|
|
225
|
+
ApiProperty({
|
|
226
|
+
type: String,
|
|
227
|
+
format: 'uuid',
|
|
228
|
+
description: 'List/column ID'
|
|
229
|
+
}),
|
|
230
|
+
_ts_metadata("design:type", String)
|
|
231
|
+
], TaskResponseDto.prototype, "listId", void 0);
|
|
232
|
+
_ts_decorate([
|
|
233
|
+
Expose(),
|
|
234
|
+
ApiProperty({
|
|
235
|
+
type: String,
|
|
236
|
+
description: 'Task title',
|
|
237
|
+
maxLength: 500
|
|
238
|
+
}),
|
|
239
|
+
_ts_metadata("design:type", String)
|
|
240
|
+
], TaskResponseDto.prototype, "title", void 0);
|
|
241
|
+
_ts_decorate([
|
|
242
|
+
Expose(),
|
|
243
|
+
ApiPropertyOptional({
|
|
244
|
+
type: String,
|
|
245
|
+
description: 'Task description',
|
|
246
|
+
nullable: true
|
|
247
|
+
}),
|
|
248
|
+
_ts_metadata("design:type", Object)
|
|
249
|
+
], TaskResponseDto.prototype, "description", void 0);
|
|
250
|
+
_ts_decorate([
|
|
251
|
+
Expose(),
|
|
252
|
+
ApiProperty({
|
|
253
|
+
enum: TaskPriority,
|
|
254
|
+
description: 'Task priority level'
|
|
255
|
+
}),
|
|
256
|
+
_ts_metadata("design:type", typeof TaskPriority === "undefined" ? Object : TaskPriority)
|
|
257
|
+
], TaskResponseDto.prototype, "priority", void 0);
|
|
258
|
+
_ts_decorate([
|
|
259
|
+
Expose(),
|
|
260
|
+
ApiPropertyOptional({
|
|
261
|
+
type: String,
|
|
262
|
+
description: 'Due date in YYYY-MM-DD format',
|
|
263
|
+
example: '2026-12-31',
|
|
264
|
+
nullable: true
|
|
265
|
+
}),
|
|
266
|
+
_ts_metadata("design:type", Object)
|
|
267
|
+
], TaskResponseDto.prototype, "dueDate", void 0);
|
|
268
|
+
_ts_decorate([
|
|
269
|
+
Expose(),
|
|
270
|
+
ApiProperty({
|
|
271
|
+
type: Number,
|
|
272
|
+
description: 'Display order position within the list',
|
|
273
|
+
minimum: 0
|
|
274
|
+
}),
|
|
275
|
+
_ts_metadata("design:type", Number)
|
|
276
|
+
], TaskResponseDto.prototype, "position", void 0);
|
|
277
|
+
_ts_decorate([
|
|
278
|
+
Expose(),
|
|
279
|
+
ApiPropertyOptional({
|
|
280
|
+
type: ()=>[
|
|
281
|
+
TaskAssigneeResponseDto
|
|
282
|
+
],
|
|
283
|
+
description: 'Assigned users'
|
|
284
|
+
}),
|
|
285
|
+
Type(()=>TaskAssigneeResponseDto),
|
|
286
|
+
_ts_metadata("design:type", Array)
|
|
287
|
+
], TaskResponseDto.prototype, "assignees", void 0);
|
|
288
|
+
_ts_decorate([
|
|
289
|
+
Expose(),
|
|
290
|
+
ApiPropertyOptional({
|
|
291
|
+
type: String,
|
|
292
|
+
format: 'uuid',
|
|
293
|
+
description: 'Reporter user ID',
|
|
294
|
+
nullable: true
|
|
295
|
+
}),
|
|
296
|
+
_ts_metadata("design:type", Object)
|
|
297
|
+
], TaskResponseDto.prototype, "reporterId", void 0);
|
|
298
|
+
_ts_decorate([
|
|
299
|
+
Expose(),
|
|
300
|
+
ApiPropertyOptional({
|
|
301
|
+
type: String,
|
|
302
|
+
format: 'uuid',
|
|
303
|
+
description: 'Parent task ID for subtasks',
|
|
304
|
+
nullable: true
|
|
305
|
+
}),
|
|
306
|
+
_ts_metadata("design:type", Object)
|
|
307
|
+
], TaskResponseDto.prototype, "parentTaskId", void 0);
|
|
308
|
+
_ts_decorate([
|
|
309
|
+
Expose(),
|
|
310
|
+
ApiPropertyOptional({
|
|
311
|
+
type: Number,
|
|
312
|
+
description: 'Estimated hours to complete',
|
|
313
|
+
nullable: true
|
|
314
|
+
}),
|
|
315
|
+
_ts_metadata("design:type", Object)
|
|
316
|
+
], TaskResponseDto.prototype, "estimatedHours", void 0);
|
|
317
|
+
_ts_decorate([
|
|
318
|
+
Expose(),
|
|
319
|
+
ApiPropertyOptional({
|
|
320
|
+
type: [
|
|
321
|
+
String
|
|
322
|
+
],
|
|
323
|
+
description: 'Applied label IDs'
|
|
324
|
+
}),
|
|
325
|
+
_ts_metadata("design:type", Array)
|
|
326
|
+
], TaskResponseDto.prototype, "labelIds", void 0);
|
|
327
|
+
_ts_decorate([
|
|
328
|
+
Expose(),
|
|
329
|
+
ApiPropertyOptional({
|
|
330
|
+
type: ()=>[
|
|
331
|
+
TaskLabelResponseDto
|
|
332
|
+
],
|
|
333
|
+
description: 'Populated label objects'
|
|
334
|
+
}),
|
|
335
|
+
Type(()=>TaskLabelResponseDto),
|
|
336
|
+
_ts_metadata("design:type", Array)
|
|
337
|
+
], TaskResponseDto.prototype, "labels", void 0);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export * from './task-board.entity';
|
|
2
|
+
export * from './task-board-with-company.entity';
|
|
3
|
+
export * from './task-board-member.entity';
|
|
4
|
+
export * from './task-list.entity';
|
|
5
|
+
export * from './task.entity';
|
|
6
|
+
export * from './task-label.entity';
|
|
7
|
+
export * from './task-task-label.entity';
|
|
8
|
+
export * from './task-assignee.entity';
|
|
9
|
+
export * from './task-comment.entity';
|
|
10
|
+
export * from './task-activity.entity';
|
|
11
|
+
import { TaskBoard } from './task-board.entity';
|
|
12
|
+
import { TaskBoardWithCompany } from './task-board-with-company.entity';
|
|
13
|
+
import { TaskBoardMember } from './task-board-member.entity';
|
|
14
|
+
import { TaskList } from './task-list.entity';
|
|
15
|
+
import { Task } from './task.entity';
|
|
16
|
+
import { TaskLabel } from './task-label.entity';
|
|
17
|
+
import { TaskTaskLabel } from './task-task-label.entity';
|
|
18
|
+
import { TaskAssignee } from './task-assignee.entity';
|
|
19
|
+
import { TaskComment } from './task-comment.entity';
|
|
20
|
+
import { TaskActivity } from './task-activity.entity';
|
|
21
|
+
export const TaskManagerCoreEntities = [
|
|
22
|
+
TaskBoard,
|
|
23
|
+
TaskBoardMember,
|
|
24
|
+
TaskList,
|
|
25
|
+
Task,
|
|
26
|
+
TaskLabel,
|
|
27
|
+
TaskTaskLabel,
|
|
28
|
+
TaskAssignee,
|
|
29
|
+
TaskComment,
|
|
30
|
+
TaskActivity
|
|
31
|
+
];
|
|
32
|
+
export const TaskManagerCompanyEntities = [
|
|
33
|
+
TaskBoardWithCompany,
|
|
34
|
+
TaskBoardMember,
|
|
35
|
+
TaskList,
|
|
36
|
+
Task,
|
|
37
|
+
TaskLabel,
|
|
38
|
+
TaskTaskLabel,
|
|
39
|
+
TaskAssignee,
|
|
40
|
+
TaskComment,
|
|
41
|
+
TaskActivity
|
|
42
|
+
];
|
|
43
|
+
export function getTaskManagerEntitiesByConfig(enableCompanyFeature) {
|
|
44
|
+
return enableCompanyFeature ? TaskManagerCompanyEntities : TaskManagerCoreEntities;
|
|
45
|
+
}
|
|
46
|
+
export { TaskBoard as TaskBoardBase } from './task-board.entity';
|