@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.
Files changed (163) hide show
  1. package/config/index.d.ts +3 -3
  2. package/controllers/index.d.ts +5 -5
  3. package/controllers/task-board.controller.d.ts +3 -3
  4. package/controllers/task-comment.controller.d.ts +2 -2
  5. package/controllers/task-label.controller.d.ts +2 -2
  6. package/controllers/task-list.controller.d.ts +3 -3
  7. package/controllers/task.controller.d.ts +4 -4
  8. package/docs/index.d.ts +1 -1
  9. package/docs/task-manager-swagger.config.d.ts +1 -1
  10. package/dtos/index.d.ts +5 -5
  11. package/dtos/task-board.dto.d.ts +1 -1
  12. package/dtos/task.dto.d.ts +2 -2
  13. package/entities/index.d.ts +19 -19
  14. package/entities/task-board-with-company.entity.d.ts +1 -1
  15. package/fesm/234.js +1393 -0
  16. package/fesm/431.js +981 -0
  17. package/fesm/827.js +1054 -0
  18. package/fesm/988.js +881 -0
  19. package/fesm/config/index.js +156 -3
  20. package/fesm/controllers/index.js +21 -5
  21. package/fesm/docs/index.js +58 -1
  22. package/fesm/dtos/index.js +280 -5
  23. package/fesm/entities/index.js +26 -46
  24. package/fesm/gateways/index.js +288 -1
  25. package/fesm/index.js +440 -9
  26. package/fesm/interfaces/index.js +16 -2
  27. package/fesm/modules/index.js +210 -1
  28. package/fesm/runtime.js +85 -0
  29. package/fesm/services/index.js +53 -8
  30. package/gateways/index.d.ts +1 -1
  31. package/gateways/task-board.gateway.d.ts +3 -3
  32. package/index.d.ts +9 -9
  33. package/interfaces/index.d.ts +2 -2
  34. package/interfaces/task-manager-module.interface.d.ts +3 -3
  35. package/interfaces/task.interface.d.ts +2 -2
  36. package/modules/index.d.ts +1 -1
  37. package/modules/task-manager.module.d.ts +2 -2
  38. package/package.json +26 -36
  39. package/services/index.d.ts +8 -8
  40. package/services/task-activity.service.d.ts +1 -1
  41. package/services/task-board.service.d.ts +5 -5
  42. package/services/task-comment.service.d.ts +4 -4
  43. package/services/task-label.service.d.ts +4 -4
  44. package/services/task-list.service.d.ts +4 -4
  45. package/services/task-manager-config.service.d.ts +3 -3
  46. package/services/task-manager-datasource.provider.d.ts +3 -3
  47. package/services/task.service.d.ts +7 -7
  48. package/cjs/config/event-actions.js +0 -37
  49. package/cjs/config/index.js +0 -20
  50. package/cjs/config/message-keys.js +0 -92
  51. package/cjs/config/task-manager.constants.js +0 -11
  52. package/cjs/controllers/index.js +0 -22
  53. package/cjs/controllers/task-board.controller.js +0 -219
  54. package/cjs/controllers/task-board.controller.spec.js +0 -132
  55. package/cjs/controllers/task-comment.controller.js +0 -103
  56. package/cjs/controllers/task-comment.controller.spec.js +0 -86
  57. package/cjs/controllers/task-label.controller.js +0 -112
  58. package/cjs/controllers/task-label.controller.spec.js +0 -88
  59. package/cjs/controllers/task-list.controller.js +0 -158
  60. package/cjs/controllers/task-list.controller.spec.js +0 -112
  61. package/cjs/controllers/task.controller.js +0 -199
  62. package/cjs/controllers/task.controller.spec.js +0 -131
  63. package/cjs/docs/index.js +0 -18
  64. package/cjs/docs/task-manager-swagger.config.js +0 -43
  65. package/cjs/docs/task-manager-swagger.config.spec.js +0 -28
  66. package/cjs/dtos/index.js +0 -22
  67. package/cjs/dtos/task-board.dto.js +0 -310
  68. package/cjs/dtos/task-comment.dto.js +0 -131
  69. package/cjs/dtos/task-label.dto.js +0 -120
  70. package/cjs/dtos/task-list.dto.js +0 -198
  71. package/cjs/dtos/task.dto.js +0 -367
  72. package/cjs/entities/index.js +0 -72
  73. package/cjs/entities/index.spec.js +0 -30
  74. package/cjs/entities/task-activity.entity.js +0 -98
  75. package/cjs/entities/task-assignee.entity.js +0 -67
  76. package/cjs/entities/task-board-member.entity.js +0 -94
  77. package/cjs/entities/task-board-with-company.entity.js +0 -57
  78. package/cjs/entities/task-board.entity.js +0 -88
  79. package/cjs/entities/task-comment.entity.js +0 -80
  80. package/cjs/entities/task-label.entity.js +0 -72
  81. package/cjs/entities/task-list.entity.js +0 -104
  82. package/cjs/entities/task-task-label.entity.js +0 -67
  83. package/cjs/entities/task.entity.js +0 -151
  84. package/cjs/gateways/index.js +0 -18
  85. package/cjs/gateways/task-board.gateway.js +0 -167
  86. package/cjs/gateways/task-board.gateway.spec.js +0 -243
  87. package/cjs/index.js +0 -26
  88. package/cjs/interfaces/index.js +0 -19
  89. package/cjs/interfaces/task-manager-module.interface.js +0 -4
  90. package/cjs/interfaces/task.interface.js +0 -4
  91. package/cjs/modules/index.js +0 -18
  92. package/cjs/modules/task-manager.module.js +0 -135
  93. package/cjs/modules/task-manager.module.spec.js +0 -144
  94. package/cjs/services/index.js +0 -25
  95. package/cjs/services/task-activity.service.js +0 -76
  96. package/cjs/services/task-activity.service.spec.js +0 -125
  97. package/cjs/services/task-board.service.js +0 -247
  98. package/cjs/services/task-board.service.spec.js +0 -465
  99. package/cjs/services/task-comment.service.js +0 -103
  100. package/cjs/services/task-comment.service.spec.js +0 -160
  101. package/cjs/services/task-label.service.js +0 -97
  102. package/cjs/services/task-label.service.spec.js +0 -138
  103. package/cjs/services/task-list.service.js +0 -130
  104. package/cjs/services/task-list.service.spec.js +0 -284
  105. package/cjs/services/task-manager-config.service.js +0 -69
  106. package/cjs/services/task-manager-config.service.spec.js +0 -98
  107. package/cjs/services/task-manager-datasource.provider.js +0 -84
  108. package/cjs/services/task-manager-datasource.provider.spec.js +0 -131
  109. package/cjs/services/task.service.js +0 -398
  110. package/cjs/services/task.service.spec.js +0 -700
  111. package/fesm/config/event-actions.js +0 -16
  112. package/fesm/config/message-keys.js +0 -65
  113. package/fesm/config/task-manager.constants.js +0 -1
  114. package/fesm/controllers/task-board.controller.js +0 -209
  115. package/fesm/controllers/task-board.controller.spec.js +0 -128
  116. package/fesm/controllers/task-comment.controller.js +0 -93
  117. package/fesm/controllers/task-comment.controller.spec.js +0 -82
  118. package/fesm/controllers/task-label.controller.js +0 -102
  119. package/fesm/controllers/task-label.controller.spec.js +0 -84
  120. package/fesm/controllers/task-list.controller.js +0 -148
  121. package/fesm/controllers/task-list.controller.spec.js +0 -108
  122. package/fesm/controllers/task.controller.js +0 -189
  123. package/fesm/controllers/task.controller.spec.js +0 -127
  124. package/fesm/docs/task-manager-swagger.config.js +0 -33
  125. package/fesm/docs/task-manager-swagger.config.spec.js +0 -24
  126. package/fesm/dtos/task-board.dto.js +0 -277
  127. package/fesm/dtos/task-comment.dto.js +0 -110
  128. package/fesm/dtos/task-label.dto.js +0 -99
  129. package/fesm/dtos/task-list.dto.js +0 -174
  130. package/fesm/dtos/task.dto.js +0 -337
  131. package/fesm/entities/index.spec.js +0 -26
  132. package/fesm/entities/task-activity.entity.js +0 -88
  133. package/fesm/entities/task-assignee.entity.js +0 -57
  134. package/fesm/entities/task-board-member.entity.js +0 -76
  135. package/fesm/entities/task-board-with-company.entity.js +0 -47
  136. package/fesm/entities/task-board.entity.js +0 -78
  137. package/fesm/entities/task-comment.entity.js +0 -70
  138. package/fesm/entities/task-label.entity.js +0 -62
  139. package/fesm/entities/task-list.entity.js +0 -94
  140. package/fesm/entities/task-task-label.entity.js +0 -57
  141. package/fesm/entities/task.entity.js +0 -133
  142. package/fesm/gateways/task-board.gateway.js +0 -157
  143. package/fesm/gateways/task-board.gateway.spec.js +0 -239
  144. package/fesm/interfaces/task-manager-module.interface.js +0 -1
  145. package/fesm/interfaces/task.interface.js +0 -1
  146. package/fesm/modules/task-manager.module.js +0 -125
  147. package/fesm/modules/task-manager.module.spec.js +0 -140
  148. package/fesm/services/task-activity.service.js +0 -66
  149. package/fesm/services/task-activity.service.spec.js +0 -121
  150. package/fesm/services/task-board.service.js +0 -237
  151. package/fesm/services/task-board.service.spec.js +0 -461
  152. package/fesm/services/task-comment.service.js +0 -93
  153. package/fesm/services/task-comment.service.spec.js +0 -156
  154. package/fesm/services/task-label.service.js +0 -87
  155. package/fesm/services/task-label.service.spec.js +0 -134
  156. package/fesm/services/task-list.service.js +0 -120
  157. package/fesm/services/task-list.service.spec.js +0 -280
  158. package/fesm/services/task-manager-config.service.js +0 -59
  159. package/fesm/services/task-manager-config.service.spec.js +0 -94
  160. package/fesm/services/task-manager-datasource.provider.js +0 -74
  161. package/fesm/services/task-manager-datasource.provider.spec.js +0 -127
  162. package/fesm/services/task.service.js +0 -388
  163. package/fesm/services/task.service.spec.js +0 -696
@@ -1,174 +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 { 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);
@@ -1,337 +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, 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);
@@ -1,26 +0,0 @@
1
- import { getTaskManagerEntitiesByConfig, TaskManagerCoreEntities, TaskManagerCompanyEntities } from './index';
2
- import { TaskBoard } from './task-board.entity';
3
- import { TaskBoardWithCompany } from './task-board-with-company.entity';
4
- import { TaskList } from './task-list.entity';
5
- import { Task } from './task.entity';
6
- describe('getTaskManagerEntitiesByConfig', ()=>{
7
- it('returns the core entities when the company feature is disabled', ()=>{
8
- expect(getTaskManagerEntitiesByConfig(false)).toBe(TaskManagerCoreEntities);
9
- expect(getTaskManagerEntitiesByConfig(false)).toContain(TaskBoard);
10
- expect(getTaskManagerEntitiesByConfig(false)).not.toContain(TaskBoardWithCompany);
11
- });
12
- it('returns the company-scoped entities when the company feature is enabled', ()=>{
13
- expect(getTaskManagerEntitiesByConfig(true)).toBe(TaskManagerCompanyEntities);
14
- expect(getTaskManagerEntitiesByConfig(true)).toContain(TaskBoardWithCompany);
15
- expect(getTaskManagerEntitiesByConfig(true)).not.toContain(TaskBoard);
16
- });
17
- it('shares non-board entities (TaskList, Task, ...) between core and company sets', ()=>{
18
- expect(getTaskManagerEntitiesByConfig(false)).toContain(TaskList);
19
- expect(getTaskManagerEntitiesByConfig(true)).toContain(TaskList);
20
- expect(getTaskManagerEntitiesByConfig(false)).toContain(Task);
21
- expect(getTaskManagerEntitiesByConfig(true)).toContain(Task);
22
- });
23
- it('both entity sets have the same length (only the board entity swaps)', ()=>{
24
- expect(TaskManagerCoreEntities).toHaveLength(TaskManagerCompanyEntities.length);
25
- });
26
- });
@@ -1,88 +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 { getJsonColumnType } from '@flusys/nestjs-shared';
24
- import { Identity } from '@flusys/nestjs-shared/entities';
25
- import { Column, Entity, Index } from 'typeorm';
26
- export class TaskActivity extends Identity {
27
- constructor(...args){
28
- super(...args), _define_property(this, "taskId", void 0), _define_property(this, "userId", void 0), _define_property(this, "boardId", void 0), _define_property(this, "action", void 0), _define_property(this, "oldValue", void 0), _define_property(this, "newValue", void 0);
29
- }
30
- }
31
- _ts_decorate([
32
- Index(),
33
- Column({
34
- name: 'task_id',
35
- type: 'uuid',
36
- nullable: false
37
- }),
38
- _ts_metadata("design:type", String)
39
- ], TaskActivity.prototype, "taskId", void 0);
40
- _ts_decorate([
41
- Column({
42
- name: 'user_id',
43
- type: 'uuid',
44
- nullable: true
45
- }),
46
- _ts_metadata("design:type", Object)
47
- ], TaskActivity.prototype, "userId", void 0);
48
- _ts_decorate([
49
- Column({
50
- name: 'board_id',
51
- type: 'uuid',
52
- nullable: false
53
- }),
54
- _ts_metadata("design:type", String)
55
- ], TaskActivity.prototype, "boardId", void 0);
56
- _ts_decorate([
57
- Column({
58
- type: 'varchar',
59
- length: 100,
60
- nullable: false
61
- }),
62
- _ts_metadata("design:type", String)
63
- ], TaskActivity.prototype, "action", void 0);
64
- _ts_decorate([
65
- Column({
66
- name: 'old_value',
67
- type: getJsonColumnType(),
68
- nullable: true
69
- }),
70
- _ts_metadata("design:type", Object)
71
- ], TaskActivity.prototype, "oldValue", void 0);
72
- _ts_decorate([
73
- Column({
74
- name: 'new_value',
75
- type: getJsonColumnType(),
76
- nullable: true
77
- }),
78
- _ts_metadata("design:type", Object)
79
- ], TaskActivity.prototype, "newValue", void 0);
80
- TaskActivity = _ts_decorate([
81
- Entity({
82
- name: 'task_activity'
83
- }),
84
- Index([
85
- 'taskId',
86
- 'createdAt'
87
- ])
88
- ], TaskActivity);
@@ -1,57 +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 { Identity } from '@flusys/nestjs-shared/entities';
24
- import { Column, Entity, Index } from 'typeorm';
25
- export class TaskAssignee extends Identity {
26
- constructor(...args){
27
- super(...args), _define_property(this, "taskId", void 0), _define_property(this, "userId", void 0);
28
- }
29
- }
30
- _ts_decorate([
31
- Index(),
32
- Column({
33
- name: 'task_id',
34
- type: 'uuid',
35
- nullable: false
36
- }),
37
- _ts_metadata("design:type", String)
38
- ], TaskAssignee.prototype, "taskId", void 0);
39
- _ts_decorate([
40
- Column({
41
- name: 'user_id',
42
- type: 'uuid',
43
- nullable: false
44
- }),
45
- _ts_metadata("design:type", String)
46
- ], TaskAssignee.prototype, "userId", void 0);
47
- TaskAssignee = _ts_decorate([
48
- Entity({
49
- name: 'task_assignee'
50
- }),
51
- Index([
52
- 'taskId',
53
- 'userId'
54
- ], {
55
- unique: true
56
- })
57
- ], TaskAssignee);