@flusys/nestjs-task-manager 7.1.0 → 8.0.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/config/index.d.ts +3 -3
- package/controllers/index.d.ts +5 -5
- package/controllers/task-board.controller.d.ts +3 -3
- package/controllers/task-comment.controller.d.ts +2 -2
- package/controllers/task-label.controller.d.ts +2 -2
- package/controllers/task-list.controller.d.ts +3 -3
- package/controllers/task.controller.d.ts +4 -4
- package/docs/index.d.ts +1 -1
- package/docs/task-manager-swagger.config.d.ts +1 -1
- package/dtos/index.d.ts +5 -5
- package/dtos/task-board.dto.d.ts +1 -1
- package/dtos/task.dto.d.ts +2 -2
- package/entities/index.d.ts +19 -19
- package/entities/task-board-with-company.entity.d.ts +1 -1
- package/fesm/234.js +1393 -0
- package/fesm/431.js +981 -0
- package/fesm/827.js +1054 -0
- package/fesm/988.js +881 -0
- package/fesm/config/index.js +156 -3
- package/fesm/controllers/index.js +21 -5
- package/fesm/docs/index.js +58 -1
- package/fesm/dtos/index.js +280 -5
- package/fesm/entities/index.js +26 -46
- package/fesm/gateways/index.js +288 -1
- package/fesm/index.js +440 -9
- package/fesm/interfaces/index.js +16 -2
- package/fesm/modules/index.js +210 -1
- package/fesm/runtime.js +85 -0
- package/fesm/services/index.js +53 -8
- package/gateways/index.d.ts +1 -1
- package/gateways/task-board.gateway.d.ts +3 -3
- package/index.d.ts +9 -9
- package/interfaces/index.d.ts +2 -2
- package/interfaces/task-manager-module.interface.d.ts +3 -3
- package/interfaces/task.interface.d.ts +2 -2
- package/modules/index.d.ts +1 -1
- package/modules/task-manager.module.d.ts +2 -2
- package/package.json +26 -36
- package/services/index.d.ts +8 -8
- package/services/task-activity.service.d.ts +1 -1
- package/services/task-board.service.d.ts +5 -5
- package/services/task-comment.service.d.ts +4 -4
- package/services/task-label.service.d.ts +4 -4
- package/services/task-list.service.d.ts +4 -4
- package/services/task-manager-config.service.d.ts +3 -3
- package/services/task-manager-datasource.provider.d.ts +3 -3
- package/services/task.service.d.ts +7 -7
- package/cjs/config/event-actions.js +0 -37
- package/cjs/config/index.js +0 -20
- package/cjs/config/message-keys.js +0 -92
- package/cjs/config/task-manager.constants.js +0 -11
- package/cjs/controllers/index.js +0 -22
- package/cjs/controllers/task-board.controller.js +0 -219
- package/cjs/controllers/task-board.controller.spec.js +0 -132
- package/cjs/controllers/task-comment.controller.js +0 -103
- package/cjs/controllers/task-comment.controller.spec.js +0 -86
- package/cjs/controllers/task-label.controller.js +0 -112
- package/cjs/controllers/task-label.controller.spec.js +0 -88
- package/cjs/controllers/task-list.controller.js +0 -158
- package/cjs/controllers/task-list.controller.spec.js +0 -112
- package/cjs/controllers/task.controller.js +0 -199
- package/cjs/controllers/task.controller.spec.js +0 -131
- package/cjs/docs/index.js +0 -18
- package/cjs/docs/task-manager-swagger.config.js +0 -43
- package/cjs/docs/task-manager-swagger.config.spec.js +0 -28
- package/cjs/dtos/index.js +0 -22
- package/cjs/dtos/task-board.dto.js +0 -310
- package/cjs/dtos/task-comment.dto.js +0 -131
- package/cjs/dtos/task-label.dto.js +0 -120
- package/cjs/dtos/task-list.dto.js +0 -198
- package/cjs/dtos/task.dto.js +0 -367
- package/cjs/entities/index.js +0 -72
- package/cjs/entities/index.spec.js +0 -30
- package/cjs/entities/task-activity.entity.js +0 -98
- package/cjs/entities/task-assignee.entity.js +0 -67
- package/cjs/entities/task-board-member.entity.js +0 -94
- package/cjs/entities/task-board-with-company.entity.js +0 -57
- package/cjs/entities/task-board.entity.js +0 -88
- package/cjs/entities/task-comment.entity.js +0 -80
- package/cjs/entities/task-label.entity.js +0 -72
- package/cjs/entities/task-list.entity.js +0 -104
- package/cjs/entities/task-task-label.entity.js +0 -67
- package/cjs/entities/task.entity.js +0 -151
- package/cjs/gateways/index.js +0 -18
- package/cjs/gateways/task-board.gateway.js +0 -167
- package/cjs/gateways/task-board.gateway.spec.js +0 -243
- package/cjs/index.js +0 -26
- package/cjs/interfaces/index.js +0 -19
- package/cjs/interfaces/task-manager-module.interface.js +0 -4
- package/cjs/interfaces/task.interface.js +0 -4
- package/cjs/modules/index.js +0 -18
- package/cjs/modules/task-manager.module.js +0 -135
- package/cjs/modules/task-manager.module.spec.js +0 -144
- package/cjs/services/index.js +0 -25
- package/cjs/services/task-activity.service.js +0 -76
- package/cjs/services/task-activity.service.spec.js +0 -125
- package/cjs/services/task-board.service.js +0 -247
- package/cjs/services/task-board.service.spec.js +0 -465
- package/cjs/services/task-comment.service.js +0 -103
- package/cjs/services/task-comment.service.spec.js +0 -160
- package/cjs/services/task-label.service.js +0 -97
- package/cjs/services/task-label.service.spec.js +0 -138
- package/cjs/services/task-list.service.js +0 -130
- package/cjs/services/task-list.service.spec.js +0 -284
- package/cjs/services/task-manager-config.service.js +0 -69
- package/cjs/services/task-manager-config.service.spec.js +0 -98
- package/cjs/services/task-manager-datasource.provider.js +0 -84
- package/cjs/services/task-manager-datasource.provider.spec.js +0 -131
- package/cjs/services/task.service.js +0 -398
- package/cjs/services/task.service.spec.js +0 -700
- package/fesm/config/event-actions.js +0 -16
- package/fesm/config/message-keys.js +0 -65
- package/fesm/config/task-manager.constants.js +0 -1
- package/fesm/controllers/task-board.controller.js +0 -209
- package/fesm/controllers/task-board.controller.spec.js +0 -128
- package/fesm/controllers/task-comment.controller.js +0 -93
- package/fesm/controllers/task-comment.controller.spec.js +0 -82
- package/fesm/controllers/task-label.controller.js +0 -102
- package/fesm/controllers/task-label.controller.spec.js +0 -84
- package/fesm/controllers/task-list.controller.js +0 -148
- package/fesm/controllers/task-list.controller.spec.js +0 -108
- package/fesm/controllers/task.controller.js +0 -189
- package/fesm/controllers/task.controller.spec.js +0 -127
- package/fesm/docs/task-manager-swagger.config.js +0 -33
- package/fesm/docs/task-manager-swagger.config.spec.js +0 -24
- package/fesm/dtos/task-board.dto.js +0 -277
- package/fesm/dtos/task-comment.dto.js +0 -110
- package/fesm/dtos/task-label.dto.js +0 -99
- package/fesm/dtos/task-list.dto.js +0 -174
- package/fesm/dtos/task.dto.js +0 -337
- package/fesm/entities/index.spec.js +0 -26
- package/fesm/entities/task-activity.entity.js +0 -88
- package/fesm/entities/task-assignee.entity.js +0 -57
- package/fesm/entities/task-board-member.entity.js +0 -76
- package/fesm/entities/task-board-with-company.entity.js +0 -47
- package/fesm/entities/task-board.entity.js +0 -78
- package/fesm/entities/task-comment.entity.js +0 -70
- package/fesm/entities/task-label.entity.js +0 -62
- package/fesm/entities/task-list.entity.js +0 -94
- package/fesm/entities/task-task-label.entity.js +0 -57
- package/fesm/entities/task.entity.js +0 -133
- package/fesm/gateways/task-board.gateway.js +0 -157
- package/fesm/gateways/task-board.gateway.spec.js +0 -239
- package/fesm/interfaces/task-manager-module.interface.js +0 -1
- package/fesm/interfaces/task.interface.js +0 -1
- package/fesm/modules/task-manager.module.js +0 -125
- package/fesm/modules/task-manager.module.spec.js +0 -140
- package/fesm/services/task-activity.service.js +0 -66
- package/fesm/services/task-activity.service.spec.js +0 -121
- package/fesm/services/task-board.service.js +0 -237
- package/fesm/services/task-board.service.spec.js +0 -461
- package/fesm/services/task-comment.service.js +0 -93
- package/fesm/services/task-comment.service.spec.js +0 -156
- package/fesm/services/task-label.service.js +0 -87
- package/fesm/services/task-label.service.spec.js +0 -134
- package/fesm/services/task-list.service.js +0 -120
- package/fesm/services/task-list.service.spec.js +0 -280
- package/fesm/services/task-manager-config.service.js +0 -59
- package/fesm/services/task-manager-config.service.spec.js +0 -94
- package/fesm/services/task-manager-datasource.provider.js +0 -74
- package/fesm/services/task-manager-datasource.provider.spec.js +0 -127
- package/fesm/services/task.service.js +0 -388
- package/fesm/services/task.service.spec.js +0 -696
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { buildMockUser } from '@test-utils/mocks/logged-user.mock';
|
|
2
|
-
import { TaskPriority } from '../entities';
|
|
3
|
-
import { TaskController } from './task.controller';
|
|
4
|
-
function buildTask(overrides = {}) {
|
|
5
|
-
return {
|
|
6
|
-
id: 'task-uuid-1',
|
|
7
|
-
boardId: 'board-uuid-1',
|
|
8
|
-
listId: 'list-uuid-1',
|
|
9
|
-
title: 'Fix bug',
|
|
10
|
-
description: null,
|
|
11
|
-
priority: TaskPriority.MEDIUM,
|
|
12
|
-
dueDate: null,
|
|
13
|
-
position: 0,
|
|
14
|
-
assignees: [],
|
|
15
|
-
reporterId: 'user-uuid-1',
|
|
16
|
-
parentTaskId: null,
|
|
17
|
-
estimatedHours: null,
|
|
18
|
-
createdAt: new Date(),
|
|
19
|
-
updatedAt: new Date(),
|
|
20
|
-
...overrides
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
describe('TaskController', ()=>{
|
|
24
|
-
let controller;
|
|
25
|
-
let mockTaskService;
|
|
26
|
-
let mockGateway;
|
|
27
|
-
beforeEach(async ()=>{
|
|
28
|
-
mockTaskService = {
|
|
29
|
-
moveTask: jest.fn(),
|
|
30
|
-
assignTask: jest.fn(),
|
|
31
|
-
insert: jest.fn(),
|
|
32
|
-
update: jest.fn(),
|
|
33
|
-
getAll: jest.fn(),
|
|
34
|
-
findById: jest.fn(),
|
|
35
|
-
delete: jest.fn()
|
|
36
|
-
};
|
|
37
|
-
mockGateway = {
|
|
38
|
-
emitToBoardRoom: jest.fn()
|
|
39
|
-
};
|
|
40
|
-
controller = new TaskController(mockTaskService, mockGateway);
|
|
41
|
-
});
|
|
42
|
-
describe('moveTask', ()=>{
|
|
43
|
-
it('moves the task and broadcasts a task:moved event to the board room', async ()=>{
|
|
44
|
-
const task = buildTask({
|
|
45
|
-
listId: 'list-new',
|
|
46
|
-
position: 2
|
|
47
|
-
});
|
|
48
|
-
mockTaskService.moveTask.mockResolvedValue(task);
|
|
49
|
-
const user = buildMockUser();
|
|
50
|
-
const result = await controller.moveTask({
|
|
51
|
-
taskId: 'task-uuid-1',
|
|
52
|
-
targetListId: 'list-new',
|
|
53
|
-
position: 2
|
|
54
|
-
}, user);
|
|
55
|
-
expect(mockTaskService.moveTask).toHaveBeenCalledWith({
|
|
56
|
-
taskId: 'task-uuid-1',
|
|
57
|
-
targetListId: 'list-new',
|
|
58
|
-
position: 2
|
|
59
|
-
}, user);
|
|
60
|
-
expect(result.success).toBe(true);
|
|
61
|
-
expect(result.data).toEqual(expect.objectContaining({
|
|
62
|
-
id: 'task-uuid-1',
|
|
63
|
-
listId: 'list-new'
|
|
64
|
-
}));
|
|
65
|
-
expect(mockGateway.emitToBoardRoom).toHaveBeenCalledWith('board-uuid-1', expect.objectContaining({
|
|
66
|
-
type: 'task:moved',
|
|
67
|
-
boardId: 'board-uuid-1'
|
|
68
|
-
}));
|
|
69
|
-
});
|
|
70
|
-
it('still returns successfully when no gateway is wired (optional dependency)', async ()=>{
|
|
71
|
-
const controllerNoGateway = new TaskController(mockTaskService, undefined);
|
|
72
|
-
mockTaskService.moveTask.mockResolvedValue(buildTask());
|
|
73
|
-
const result = await controllerNoGateway.moveTask({
|
|
74
|
-
taskId: 'task-uuid-1',
|
|
75
|
-
targetListId: 'list-1'
|
|
76
|
-
}, buildMockUser());
|
|
77
|
-
expect(result.success).toBe(true);
|
|
78
|
-
});
|
|
79
|
-
it('propagates a NotFoundException from the service when the task does not exist', async ()=>{
|
|
80
|
-
mockTaskService.moveTask.mockRejectedValue(new Error('Task not found'));
|
|
81
|
-
await expect(controller.moveTask({
|
|
82
|
-
taskId: 'missing',
|
|
83
|
-
targetListId: 'list-1'
|
|
84
|
-
}, buildMockUser())).rejects.toThrow('Task not found');
|
|
85
|
-
expect(mockGateway.emitToBoardRoom).not.toHaveBeenCalled();
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
describe('assignTask', ()=>{
|
|
89
|
-
it('assigns the task and broadcasts a task:updated event to the board room', async ()=>{
|
|
90
|
-
const task = buildTask({
|
|
91
|
-
assignees: [
|
|
92
|
-
{
|
|
93
|
-
userId: 'user-2',
|
|
94
|
-
userName: 'Bob'
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
});
|
|
98
|
-
mockTaskService.assignTask.mockResolvedValue(task);
|
|
99
|
-
const user = buildMockUser();
|
|
100
|
-
const result = await controller.assignTask({
|
|
101
|
-
taskId: 'task-uuid-1',
|
|
102
|
-
assigneeIds: [
|
|
103
|
-
'user-2'
|
|
104
|
-
]
|
|
105
|
-
}, user);
|
|
106
|
-
expect(mockTaskService.assignTask).toHaveBeenCalledWith({
|
|
107
|
-
taskId: 'task-uuid-1',
|
|
108
|
-
assigneeIds: [
|
|
109
|
-
'user-2'
|
|
110
|
-
]
|
|
111
|
-
}, user);
|
|
112
|
-
expect(result.success).toBe(true);
|
|
113
|
-
expect(mockGateway.emitToBoardRoom).toHaveBeenCalledWith('board-uuid-1', expect.objectContaining({
|
|
114
|
-
type: 'task:updated'
|
|
115
|
-
}));
|
|
116
|
-
});
|
|
117
|
-
it('propagates a BadRequestException when an assignee is not a board member', async ()=>{
|
|
118
|
-
mockTaskService.assignTask.mockRejectedValue(new Error('Assignee is not a board member'));
|
|
119
|
-
await expect(controller.assignTask({
|
|
120
|
-
taskId: 'task-uuid-1',
|
|
121
|
-
assigneeIds: [
|
|
122
|
-
'stranger'
|
|
123
|
-
]
|
|
124
|
-
}, buildMockUser())).rejects.toThrow('Assignee is not a board member');
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export function taskManagerSwaggerConfig() {
|
|
2
|
-
return {
|
|
3
|
-
title: 'Task Manager API',
|
|
4
|
-
description: `
|
|
5
|
-
## Task Manager API
|
|
6
|
-
|
|
7
|
-
Manages kanban boards, task lists, tasks, labels, comments, and real-time board collaboration.
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
- Board management with member access control
|
|
11
|
-
- Drag-and-drop task lists with position ordering
|
|
12
|
-
- Tasks with priority, due date, assignee, and label support
|
|
13
|
-
- Label assignment via junction table (many-to-many)
|
|
14
|
-
- Task comments and activity log
|
|
15
|
-
- Real-time updates via WebSocket (Socket.IO)
|
|
16
|
-
|
|
17
|
-
### Endpoints
|
|
18
|
-
|
|
19
|
-
- \`POST /task-manager/board/*\` — Board CRUD + member management
|
|
20
|
-
|
|
21
|
-
- \`POST /task-manager/list/*\` — List CRUD + reorder
|
|
22
|
-
|
|
23
|
-
- \`POST /task-manager/task/*\` — Task CRUD + move + assign
|
|
24
|
-
|
|
25
|
-
- \`POST /task-manager/label/*\` — Label CRUD
|
|
26
|
-
|
|
27
|
-
- \`POST /task-manager/comment/*\` — Comment CRUD
|
|
28
|
-
`,
|
|
29
|
-
version: '1.0',
|
|
30
|
-
path: 'api/docs/task-manager',
|
|
31
|
-
bearerAuth: true
|
|
32
|
-
};
|
|
33
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { taskManagerSwaggerConfig } from './task-manager-swagger.config';
|
|
2
|
-
describe('taskManagerSwaggerConfig', ()=>{
|
|
3
|
-
it('should build a static swagger config with the expected identity fields', ()=>{
|
|
4
|
-
const config = taskManagerSwaggerConfig();
|
|
5
|
-
expect(config.title).toBe('Task Manager API');
|
|
6
|
-
expect(config.path).toBe('api/docs/task-manager');
|
|
7
|
-
expect(config.version).toBe('1.0');
|
|
8
|
-
expect(config.bearerAuth).toBe(true);
|
|
9
|
-
});
|
|
10
|
-
it('should describe every top-level resource endpoint group', ()=>{
|
|
11
|
-
const config = taskManagerSwaggerConfig();
|
|
12
|
-
expect(config.description).toContain('/task-manager/board/*');
|
|
13
|
-
expect(config.description).toContain('/task-manager/list/*');
|
|
14
|
-
expect(config.description).toContain('/task-manager/task/*');
|
|
15
|
-
expect(config.description).toContain('/task-manager/label/*');
|
|
16
|
-
expect(config.description).toContain('/task-manager/comment/*');
|
|
17
|
-
});
|
|
18
|
-
it('should return a fresh object on every call rather than a shared mutable singleton', ()=>{
|
|
19
|
-
const first = taskManagerSwaggerConfig();
|
|
20
|
-
const second = taskManagerSwaggerConfig();
|
|
21
|
-
expect(first).not.toBe(second);
|
|
22
|
-
expect(first).toEqual(second);
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,277 +0,0 @@
|
|
|
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 { IsBoolean, IsNotEmpty, IsOptional, IsString, IsUUID, MaxLength, IsEnum } from 'class-validator';
|
|
26
|
-
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
27
|
-
import { BoardMemberRole } from '../entities/task-board-member.entity';
|
|
28
|
-
export class CreateTaskBoardDto {
|
|
29
|
-
constructor(){
|
|
30
|
-
_define_property(this, "name", void 0);
|
|
31
|
-
_define_property(this, "description", void 0);
|
|
32
|
-
_define_property(this, "color", void 0);
|
|
33
|
-
_define_property(this, "memberIds", void 0);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
_ts_decorate([
|
|
37
|
-
ApiProperty({
|
|
38
|
-
description: 'Board name',
|
|
39
|
-
maxLength: 255
|
|
40
|
-
}),
|
|
41
|
-
IsNotEmpty(),
|
|
42
|
-
IsString(),
|
|
43
|
-
MaxLength(255),
|
|
44
|
-
_ts_metadata("design:type", String)
|
|
45
|
-
], CreateTaskBoardDto.prototype, "name", void 0);
|
|
46
|
-
_ts_decorate([
|
|
47
|
-
ApiPropertyOptional({
|
|
48
|
-
description: 'Board description'
|
|
49
|
-
}),
|
|
50
|
-
IsOptional(),
|
|
51
|
-
IsString(),
|
|
52
|
-
_ts_metadata("design:type", String)
|
|
53
|
-
], CreateTaskBoardDto.prototype, "description", void 0);
|
|
54
|
-
_ts_decorate([
|
|
55
|
-
ApiPropertyOptional({
|
|
56
|
-
description: 'Board color hex',
|
|
57
|
-
example: '#3B82F6',
|
|
58
|
-
default: '#3B82F6'
|
|
59
|
-
}),
|
|
60
|
-
IsOptional(),
|
|
61
|
-
IsString(),
|
|
62
|
-
MaxLength(7),
|
|
63
|
-
_ts_metadata("design:type", String)
|
|
64
|
-
], CreateTaskBoardDto.prototype, "color", void 0);
|
|
65
|
-
_ts_decorate([
|
|
66
|
-
ApiPropertyOptional({
|
|
67
|
-
description: 'Initial member user IDs',
|
|
68
|
-
type: [
|
|
69
|
-
String
|
|
70
|
-
]
|
|
71
|
-
}),
|
|
72
|
-
IsOptional(),
|
|
73
|
-
IsUUID('4', {
|
|
74
|
-
each: true
|
|
75
|
-
}),
|
|
76
|
-
_ts_metadata("design:type", Array)
|
|
77
|
-
], CreateTaskBoardDto.prototype, "memberIds", void 0);
|
|
78
|
-
export class UpdateTaskBoardDto extends PartialType(CreateTaskBoardDto) {
|
|
79
|
-
constructor(...args){
|
|
80
|
-
super(...args), _define_property(this, "id", void 0), _define_property(this, "isActive", void 0);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
_ts_decorate([
|
|
84
|
-
ApiProperty(),
|
|
85
|
-
IsUUID(),
|
|
86
|
-
_ts_metadata("design:type", String)
|
|
87
|
-
], UpdateTaskBoardDto.prototype, "id", void 0);
|
|
88
|
-
_ts_decorate([
|
|
89
|
-
ApiPropertyOptional(),
|
|
90
|
-
IsOptional(),
|
|
91
|
-
IsBoolean(),
|
|
92
|
-
_ts_metadata("design:type", Boolean)
|
|
93
|
-
], UpdateTaskBoardDto.prototype, "isActive", void 0);
|
|
94
|
-
export class AddBoardMemberDto {
|
|
95
|
-
constructor(){
|
|
96
|
-
_define_property(this, "boardId", void 0);
|
|
97
|
-
_define_property(this, "userId", void 0);
|
|
98
|
-
_define_property(this, "role", void 0);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
_ts_decorate([
|
|
102
|
-
ApiProperty(),
|
|
103
|
-
IsUUID(),
|
|
104
|
-
_ts_metadata("design:type", String)
|
|
105
|
-
], AddBoardMemberDto.prototype, "boardId", void 0);
|
|
106
|
-
_ts_decorate([
|
|
107
|
-
ApiProperty(),
|
|
108
|
-
IsUUID(),
|
|
109
|
-
_ts_metadata("design:type", String)
|
|
110
|
-
], AddBoardMemberDto.prototype, "userId", void 0);
|
|
111
|
-
_ts_decorate([
|
|
112
|
-
ApiPropertyOptional({
|
|
113
|
-
enum: BoardMemberRole,
|
|
114
|
-
default: BoardMemberRole.MEMBER
|
|
115
|
-
}),
|
|
116
|
-
IsOptional(),
|
|
117
|
-
IsEnum(BoardMemberRole),
|
|
118
|
-
_ts_metadata("design:type", typeof BoardMemberRole === "undefined" ? Object : BoardMemberRole)
|
|
119
|
-
], AddBoardMemberDto.prototype, "role", void 0);
|
|
120
|
-
export class RemoveBoardMemberDto {
|
|
121
|
-
constructor(){
|
|
122
|
-
_define_property(this, "boardId", void 0);
|
|
123
|
-
_define_property(this, "userId", void 0);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
_ts_decorate([
|
|
127
|
-
ApiProperty(),
|
|
128
|
-
IsUUID(),
|
|
129
|
-
_ts_metadata("design:type", String)
|
|
130
|
-
], RemoveBoardMemberDto.prototype, "boardId", void 0);
|
|
131
|
-
_ts_decorate([
|
|
132
|
-
ApiProperty(),
|
|
133
|
-
IsUUID(),
|
|
134
|
-
_ts_metadata("design:type", String)
|
|
135
|
-
], RemoveBoardMemberDto.prototype, "userId", void 0);
|
|
136
|
-
export class GetBoardMembersDto {
|
|
137
|
-
constructor(){
|
|
138
|
-
_define_property(this, "boardId", void 0);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
_ts_decorate([
|
|
142
|
-
ApiProperty(),
|
|
143
|
-
IsUUID(),
|
|
144
|
-
_ts_metadata("design:type", String)
|
|
145
|
-
], GetBoardMembersDto.prototype, "boardId", void 0);
|
|
146
|
-
export class TaskBoardResponseDto extends IdentityResponseDto {
|
|
147
|
-
constructor(...args){
|
|
148
|
-
super(...args), _define_property(this, "name", void 0), _define_property(this, "description", void 0), _define_property(this, "color", void 0), _define_property(this, "isActive", void 0), _define_property(this, "settings", void 0), _define_property(this, "companyId", void 0), _define_property(this, "totalMembers", void 0), _define_property(this, "totalLists", void 0), _define_property(this, "totalTasks", void 0);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
_ts_decorate([
|
|
152
|
-
Expose(),
|
|
153
|
-
ApiProperty({
|
|
154
|
-
type: String,
|
|
155
|
-
description: 'Board name',
|
|
156
|
-
maxLength: 255
|
|
157
|
-
}),
|
|
158
|
-
_ts_metadata("design:type", String)
|
|
159
|
-
], TaskBoardResponseDto.prototype, "name", void 0);
|
|
160
|
-
_ts_decorate([
|
|
161
|
-
Expose(),
|
|
162
|
-
ApiPropertyOptional({
|
|
163
|
-
type: String,
|
|
164
|
-
description: 'Board description',
|
|
165
|
-
nullable: true
|
|
166
|
-
}),
|
|
167
|
-
_ts_metadata("design:type", Object)
|
|
168
|
-
], TaskBoardResponseDto.prototype, "description", void 0);
|
|
169
|
-
_ts_decorate([
|
|
170
|
-
Expose(),
|
|
171
|
-
ApiProperty({
|
|
172
|
-
type: String,
|
|
173
|
-
description: 'Board color hex',
|
|
174
|
-
example: '#3B82F6'
|
|
175
|
-
}),
|
|
176
|
-
_ts_metadata("design:type", String)
|
|
177
|
-
], TaskBoardResponseDto.prototype, "color", void 0);
|
|
178
|
-
_ts_decorate([
|
|
179
|
-
Expose(),
|
|
180
|
-
ApiProperty({
|
|
181
|
-
type: Boolean,
|
|
182
|
-
description: 'Whether the board is active'
|
|
183
|
-
}),
|
|
184
|
-
_ts_metadata("design:type", Boolean)
|
|
185
|
-
], TaskBoardResponseDto.prototype, "isActive", void 0);
|
|
186
|
-
_ts_decorate([
|
|
187
|
-
Expose(),
|
|
188
|
-
ApiPropertyOptional({
|
|
189
|
-
type: Object,
|
|
190
|
-
description: 'Board settings JSON',
|
|
191
|
-
nullable: true
|
|
192
|
-
}),
|
|
193
|
-
_ts_metadata("design:type", Object)
|
|
194
|
-
], TaskBoardResponseDto.prototype, "settings", void 0);
|
|
195
|
-
_ts_decorate([
|
|
196
|
-
Expose(),
|
|
197
|
-
ApiPropertyOptional({
|
|
198
|
-
type: String,
|
|
199
|
-
format: 'uuid',
|
|
200
|
-
description: 'Company ID',
|
|
201
|
-
nullable: true
|
|
202
|
-
}),
|
|
203
|
-
_ts_metadata("design:type", Object)
|
|
204
|
-
], TaskBoardResponseDto.prototype, "companyId", void 0);
|
|
205
|
-
_ts_decorate([
|
|
206
|
-
Expose(),
|
|
207
|
-
ApiPropertyOptional({
|
|
208
|
-
type: Number,
|
|
209
|
-
description: 'Total number of board members'
|
|
210
|
-
}),
|
|
211
|
-
_ts_metadata("design:type", Number)
|
|
212
|
-
], TaskBoardResponseDto.prototype, "totalMembers", void 0);
|
|
213
|
-
_ts_decorate([
|
|
214
|
-
Expose(),
|
|
215
|
-
ApiPropertyOptional({
|
|
216
|
-
type: Number,
|
|
217
|
-
description: 'Total number of task lists'
|
|
218
|
-
}),
|
|
219
|
-
_ts_metadata("design:type", Number)
|
|
220
|
-
], TaskBoardResponseDto.prototype, "totalLists", void 0);
|
|
221
|
-
_ts_decorate([
|
|
222
|
-
Expose(),
|
|
223
|
-
ApiPropertyOptional({
|
|
224
|
-
type: Number,
|
|
225
|
-
description: 'Total number of tasks'
|
|
226
|
-
}),
|
|
227
|
-
_ts_metadata("design:type", Number)
|
|
228
|
-
], TaskBoardResponseDto.prototype, "totalTasks", void 0);
|
|
229
|
-
export class TaskBoardMemberResponseDto extends IdentityResponseDto {
|
|
230
|
-
constructor(...args){
|
|
231
|
-
super(...args), _define_property(this, "boardId", void 0), _define_property(this, "userId", void 0), _define_property(this, "role", void 0), _define_property(this, "userName", void 0), _define_property(this, "userEmail", void 0);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
_ts_decorate([
|
|
235
|
-
Expose(),
|
|
236
|
-
ApiProperty({
|
|
237
|
-
type: String,
|
|
238
|
-
format: 'uuid',
|
|
239
|
-
description: 'Board ID'
|
|
240
|
-
}),
|
|
241
|
-
_ts_metadata("design:type", String)
|
|
242
|
-
], TaskBoardMemberResponseDto.prototype, "boardId", void 0);
|
|
243
|
-
_ts_decorate([
|
|
244
|
-
Expose(),
|
|
245
|
-
ApiProperty({
|
|
246
|
-
type: String,
|
|
247
|
-
format: 'uuid',
|
|
248
|
-
description: 'User ID'
|
|
249
|
-
}),
|
|
250
|
-
_ts_metadata("design:type", String)
|
|
251
|
-
], TaskBoardMemberResponseDto.prototype, "userId", void 0);
|
|
252
|
-
_ts_decorate([
|
|
253
|
-
Expose(),
|
|
254
|
-
ApiProperty({
|
|
255
|
-
enum: BoardMemberRole,
|
|
256
|
-
description: 'Member role on the board'
|
|
257
|
-
}),
|
|
258
|
-
_ts_metadata("design:type", typeof BoardMemberRole === "undefined" ? Object : BoardMemberRole)
|
|
259
|
-
], TaskBoardMemberResponseDto.prototype, "role", void 0);
|
|
260
|
-
_ts_decorate([
|
|
261
|
-
Expose(),
|
|
262
|
-
ApiPropertyOptional({
|
|
263
|
-
type: String,
|
|
264
|
-
description: 'User display name',
|
|
265
|
-
nullable: true
|
|
266
|
-
}),
|
|
267
|
-
_ts_metadata("design:type", Object)
|
|
268
|
-
], TaskBoardMemberResponseDto.prototype, "userName", void 0);
|
|
269
|
-
_ts_decorate([
|
|
270
|
-
Expose(),
|
|
271
|
-
ApiPropertyOptional({
|
|
272
|
-
type: String,
|
|
273
|
-
description: 'User email',
|
|
274
|
-
nullable: true
|
|
275
|
-
}),
|
|
276
|
-
_ts_metadata("design:type", Object)
|
|
277
|
-
], TaskBoardMemberResponseDto.prototype, "userEmail", void 0);
|
|
@@ -1,110 +0,0 @@
|
|
|
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 } from '@nestjs/swagger';
|
|
24
|
-
import { Expose } from 'class-transformer';
|
|
25
|
-
import { IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator';
|
|
26
|
-
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
27
|
-
export class CreateTaskCommentDto {
|
|
28
|
-
constructor(){
|
|
29
|
-
_define_property(this, "taskId", void 0);
|
|
30
|
-
_define_property(this, "content", void 0);
|
|
31
|
-
_define_property(this, "parentCommentId", void 0);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
_ts_decorate([
|
|
35
|
-
ApiProperty(),
|
|
36
|
-
IsUUID(),
|
|
37
|
-
_ts_metadata("design:type", String)
|
|
38
|
-
], CreateTaskCommentDto.prototype, "taskId", void 0);
|
|
39
|
-
_ts_decorate([
|
|
40
|
-
ApiProperty(),
|
|
41
|
-
IsNotEmpty(),
|
|
42
|
-
IsString(),
|
|
43
|
-
_ts_metadata("design:type", String)
|
|
44
|
-
], CreateTaskCommentDto.prototype, "content", void 0);
|
|
45
|
-
_ts_decorate([
|
|
46
|
-
ApiPropertyOptional({
|
|
47
|
-
description: 'Reply to comment ID'
|
|
48
|
-
}),
|
|
49
|
-
IsOptional(),
|
|
50
|
-
IsUUID(),
|
|
51
|
-
_ts_metadata("design:type", Object)
|
|
52
|
-
], CreateTaskCommentDto.prototype, "parentCommentId", void 0);
|
|
53
|
-
export class UpdateTaskCommentDto {
|
|
54
|
-
constructor(){
|
|
55
|
-
_define_property(this, "id", void 0);
|
|
56
|
-
_define_property(this, "content", void 0);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
_ts_decorate([
|
|
60
|
-
ApiProperty(),
|
|
61
|
-
IsUUID(),
|
|
62
|
-
_ts_metadata("design:type", String)
|
|
63
|
-
], UpdateTaskCommentDto.prototype, "id", void 0);
|
|
64
|
-
_ts_decorate([
|
|
65
|
-
ApiProperty(),
|
|
66
|
-
IsNotEmpty(),
|
|
67
|
-
IsString(),
|
|
68
|
-
_ts_metadata("design:type", String)
|
|
69
|
-
], UpdateTaskCommentDto.prototype, "content", void 0);
|
|
70
|
-
export class TaskCommentResponseDto extends IdentityResponseDto {
|
|
71
|
-
constructor(...args){
|
|
72
|
-
super(...args), _define_property(this, "taskId", void 0), _define_property(this, "userId", void 0), _define_property(this, "content", void 0), _define_property(this, "parentCommentId", void 0);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
_ts_decorate([
|
|
76
|
-
Expose(),
|
|
77
|
-
ApiProperty({
|
|
78
|
-
type: String,
|
|
79
|
-
format: 'uuid',
|
|
80
|
-
description: 'Task ID'
|
|
81
|
-
}),
|
|
82
|
-
_ts_metadata("design:type", String)
|
|
83
|
-
], TaskCommentResponseDto.prototype, "taskId", void 0);
|
|
84
|
-
_ts_decorate([
|
|
85
|
-
Expose(),
|
|
86
|
-
ApiProperty({
|
|
87
|
-
type: String,
|
|
88
|
-
format: 'uuid',
|
|
89
|
-
description: 'Author user ID'
|
|
90
|
-
}),
|
|
91
|
-
_ts_metadata("design:type", String)
|
|
92
|
-
], TaskCommentResponseDto.prototype, "userId", void 0);
|
|
93
|
-
_ts_decorate([
|
|
94
|
-
Expose(),
|
|
95
|
-
ApiProperty({
|
|
96
|
-
type: String,
|
|
97
|
-
description: 'Comment content'
|
|
98
|
-
}),
|
|
99
|
-
_ts_metadata("design:type", String)
|
|
100
|
-
], TaskCommentResponseDto.prototype, "content", void 0);
|
|
101
|
-
_ts_decorate([
|
|
102
|
-
Expose(),
|
|
103
|
-
ApiPropertyOptional({
|
|
104
|
-
type: String,
|
|
105
|
-
format: 'uuid',
|
|
106
|
-
description: 'Parent comment ID for replies',
|
|
107
|
-
nullable: true
|
|
108
|
-
}),
|
|
109
|
-
_ts_metadata("design:type", Object)
|
|
110
|
-
], TaskCommentResponseDto.prototype, "parentCommentId", void 0);
|
|
@@ -1,99 +0,0 @@
|
|
|
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);
|