zou 0.20.82__py3-none-any.whl → 0.20.83__py3-none-any.whl
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.
- zou/__init__.py +1 -1
- zou/app/blueprints/assets/resources.py +1060 -153
- zou/app/blueprints/auth/resources.py +368 -238
- zou/app/blueprints/breakdown/resources.py +584 -94
- zou/app/blueprints/chats/resources.py +176 -37
- zou/app/blueprints/comments/resources.py +387 -125
- zou/app/blueprints/concepts/resources.py +428 -63
- zou/app/blueprints/departments/resources.py +302 -68
- zou/app/blueprints/edits/resources.py +651 -81
- zou/app/blueprints/entities/resources.py +104 -39
- zou/app/blueprints/events/resources.py +96 -8
- zou/app/blueprints/index/resources.py +49 -42
- zou/app/blueprints/news/resources.py +45 -27
- zou/app/blueprints/user/resources.py +1808 -215
- zou/app/swagger.py +100 -27
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/METADATA +1 -1
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/RECORD +21 -21
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/WHEEL +0 -0
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/entry_points.txt +0 -0
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/top_level.txt +0 -0
|
@@ -23,10 +23,11 @@ class DownloadAttachmentResource(Resource):
|
|
|
23
23
|
@jwt_required()
|
|
24
24
|
def get(self, attachment_file_id, file_name):
|
|
25
25
|
"""
|
|
26
|
-
Download attachment file
|
|
26
|
+
Download attachment file
|
|
27
27
|
---
|
|
28
|
+
description: Download a specific attachment file from a comment or chat message. Supports various file types including images and documents.
|
|
28
29
|
tags:
|
|
29
|
-
|
|
30
|
+
- Comments
|
|
30
31
|
produces:
|
|
31
32
|
- multipart/form-data
|
|
32
33
|
- image/png
|
|
@@ -35,22 +36,26 @@ class DownloadAttachmentResource(Resource):
|
|
|
35
36
|
parameters:
|
|
36
37
|
- in: path
|
|
37
38
|
name: attachment_file_id
|
|
38
|
-
required:
|
|
39
|
+
required: true
|
|
39
40
|
type: string
|
|
40
41
|
format: uuid
|
|
41
42
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
43
|
+
description: Unique identifier of the attachment file
|
|
42
44
|
- in: path
|
|
43
45
|
name: file_name
|
|
44
|
-
required:
|
|
46
|
+
required: true
|
|
45
47
|
type: string
|
|
46
|
-
example:
|
|
48
|
+
example: "document.pdf"
|
|
49
|
+
description: Name of the file to download
|
|
47
50
|
responses:
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
200:
|
|
52
|
+
description: Attachment file successfully downloaded
|
|
53
|
+
content:
|
|
54
|
+
application/octet-stream:
|
|
50
55
|
schema:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
type: string
|
|
57
|
+
format: binary
|
|
58
|
+
description: File content
|
|
54
59
|
"""
|
|
55
60
|
attachment_file = comments_service.get_attachment_file(
|
|
56
61
|
attachment_file_id
|
|
@@ -99,27 +104,43 @@ class AckCommentResource(Resource):
|
|
|
99
104
|
@jwt_required()
|
|
100
105
|
def post(self, task_id, comment_id):
|
|
101
106
|
"""
|
|
102
|
-
Acknowledge
|
|
107
|
+
Acknowledge comment
|
|
103
108
|
---
|
|
109
|
+
description: Acknowledge a specific comment. If it's already acknowledged, remove the acknowledgement.
|
|
104
110
|
tags:
|
|
105
|
-
|
|
106
|
-
description: If it's already acknowledged, remove acknowledgement.
|
|
111
|
+
- Comments
|
|
107
112
|
parameters:
|
|
108
113
|
- in: path
|
|
109
114
|
name: task_id
|
|
110
|
-
required:
|
|
115
|
+
required: true
|
|
111
116
|
type: string
|
|
112
117
|
format: uuid
|
|
113
118
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
119
|
+
description: Unique identifier of the task
|
|
114
120
|
- in: path
|
|
115
121
|
name: comment_id
|
|
116
|
-
required:
|
|
122
|
+
required: true
|
|
117
123
|
type: string
|
|
118
124
|
format: uuid
|
|
119
|
-
example:
|
|
125
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
126
|
+
description: Unique identifier of the comment
|
|
120
127
|
responses:
|
|
121
|
-
|
|
122
|
-
|
|
128
|
+
200:
|
|
129
|
+
description: Comment acknowledgement status successfully updated
|
|
130
|
+
content:
|
|
131
|
+
application/json:
|
|
132
|
+
schema:
|
|
133
|
+
type: object
|
|
134
|
+
properties:
|
|
135
|
+
id:
|
|
136
|
+
type: string
|
|
137
|
+
format: uuid
|
|
138
|
+
description: Comment unique identifier
|
|
139
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
140
|
+
acknowledged:
|
|
141
|
+
type: boolean
|
|
142
|
+
description: Whether the comment is acknowledged
|
|
143
|
+
example: true
|
|
123
144
|
"""
|
|
124
145
|
user_service.check_task_access(task_id)
|
|
125
146
|
return comments_service.acknowledge_comment(comment_id)
|
|
@@ -136,50 +157,94 @@ class CommentTaskResource(Resource):
|
|
|
136
157
|
@jwt_required()
|
|
137
158
|
def post(self, task_id):
|
|
138
159
|
"""
|
|
139
|
-
Create
|
|
160
|
+
Create task comment
|
|
140
161
|
---
|
|
162
|
+
description: Create a new comment for a specific task. It requires a text, a task_status and a person as arguments. This way, comments keep history of status changes. When the comment is created, it updates the task status with the given task status.
|
|
141
163
|
tags:
|
|
142
|
-
|
|
143
|
-
description: It requires a text, a task_status and a person as arguments.
|
|
144
|
-
This way, comments keep history of status changes.
|
|
145
|
-
When the comment is created, it updates the task status with given task status.
|
|
164
|
+
- Comments
|
|
146
165
|
parameters:
|
|
147
166
|
- in: path
|
|
148
167
|
name: task_id
|
|
149
|
-
required:
|
|
168
|
+
required: true
|
|
150
169
|
type: string
|
|
151
170
|
format: uuid
|
|
152
171
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
172
|
+
description: Unique identifier of the task
|
|
173
|
+
requestBody:
|
|
174
|
+
required: true
|
|
175
|
+
content:
|
|
176
|
+
application/json:
|
|
177
|
+
schema:
|
|
157
178
|
type: object
|
|
158
179
|
required:
|
|
159
|
-
|
|
180
|
+
- task_status_id
|
|
160
181
|
properties:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
182
|
+
task_status_id:
|
|
183
|
+
type: string
|
|
184
|
+
format: uuid
|
|
185
|
+
description: Task status identifier
|
|
186
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
187
|
+
comment:
|
|
188
|
+
type: string
|
|
189
|
+
description: Comment text content
|
|
190
|
+
example: "This looks great! Ready for review."
|
|
191
|
+
person_id:
|
|
192
|
+
type: string
|
|
193
|
+
format: uuid
|
|
194
|
+
description: Person identifier (optional, defaults to current user)
|
|
195
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
196
|
+
created_at:
|
|
197
|
+
type: string
|
|
198
|
+
format: date-time
|
|
199
|
+
description: Creation timestamp (optional, defaults to current time)
|
|
200
|
+
example: "2023-01-01T12:00:00Z"
|
|
201
|
+
checklist:
|
|
202
|
+
type: object
|
|
203
|
+
description: Checklist items for the comment
|
|
204
|
+
example: {"item1": "Check lighting", "item2": "Verify textures"}
|
|
205
|
+
links:
|
|
206
|
+
type: array
|
|
207
|
+
items:
|
|
208
|
+
type: string
|
|
209
|
+
description: List of related links
|
|
210
|
+
example: ["https://example.com/reference1", "https://example.com/reference2"]
|
|
211
|
+
responses:
|
|
212
|
+
201:
|
|
213
|
+
description: Comment successfully created
|
|
214
|
+
content:
|
|
215
|
+
application/json:
|
|
216
|
+
schema:
|
|
217
|
+
type: object
|
|
218
|
+
properties:
|
|
219
|
+
id:
|
|
220
|
+
type: string
|
|
221
|
+
format: uuid
|
|
222
|
+
description: Comment unique identifier
|
|
223
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
224
|
+
task_id:
|
|
225
|
+
type: string
|
|
226
|
+
format: uuid
|
|
227
|
+
description: Task identifier
|
|
228
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
167
229
|
person_id:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
230
|
+
type: string
|
|
231
|
+
format: uuid
|
|
232
|
+
description: Person identifier
|
|
233
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
234
|
+
comment:
|
|
235
|
+
type: string
|
|
236
|
+
description: Comment text content
|
|
237
|
+
example: "This looks great! Ready for review."
|
|
238
|
+
task_status_id:
|
|
239
|
+
type: string
|
|
240
|
+
format: uuid
|
|
241
|
+
description: Task status identifier
|
|
242
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
171
243
|
created_at:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
type: object
|
|
177
|
-
properties:
|
|
178
|
-
item 1:
|
|
179
|
-
type: string
|
|
180
|
-
responses:
|
|
181
|
-
201:
|
|
182
|
-
description: New comment created
|
|
244
|
+
type: string
|
|
245
|
+
format: date-time
|
|
246
|
+
description: Creation timestamp
|
|
247
|
+
example: "2023-01-01T12:00:00Z"
|
|
183
248
|
"""
|
|
184
249
|
(
|
|
185
250
|
task_status_id,
|
|
@@ -259,32 +324,36 @@ class AttachmentResource(Resource):
|
|
|
259
324
|
@jwt_required()
|
|
260
325
|
def delete(self, task_id, comment_id, attachment_id):
|
|
261
326
|
"""
|
|
262
|
-
Delete
|
|
327
|
+
Delete comment attachment
|
|
263
328
|
---
|
|
329
|
+
description: Delete a specific attachment file linked to a comment. Only the comment author or project managers can delete attachments.
|
|
264
330
|
tags:
|
|
265
|
-
|
|
331
|
+
- Comments
|
|
266
332
|
parameters:
|
|
267
333
|
- in: path
|
|
268
334
|
name: task_id
|
|
269
|
-
required:
|
|
335
|
+
required: true
|
|
270
336
|
type: string
|
|
271
337
|
format: uuid
|
|
272
338
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
339
|
+
description: Unique identifier of the task
|
|
273
340
|
- in: path
|
|
274
341
|
name: comment_id
|
|
275
|
-
required:
|
|
342
|
+
required: true
|
|
276
343
|
type: string
|
|
277
344
|
format: uuid
|
|
278
|
-
example:
|
|
345
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
346
|
+
description: Unique identifier of the comment
|
|
279
347
|
- in: path
|
|
280
348
|
name: attachment_id
|
|
281
|
-
required:
|
|
349
|
+
required: true
|
|
282
350
|
type: string
|
|
283
351
|
format: uuid
|
|
284
|
-
example:
|
|
352
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
353
|
+
description: Unique identifier of the attachment
|
|
285
354
|
responses:
|
|
286
|
-
|
|
287
|
-
|
|
355
|
+
204:
|
|
356
|
+
description: Attachment successfully deleted
|
|
288
357
|
"""
|
|
289
358
|
user = persons_service.get_current_user()
|
|
290
359
|
comment = tasks_service.get_comment(comment_id)
|
|
@@ -300,10 +369,11 @@ class AddAttachmentToCommentResource(Resource):
|
|
|
300
369
|
@jwt_required()
|
|
301
370
|
def post(self, task_id, comment_id):
|
|
302
371
|
"""
|
|
303
|
-
Add
|
|
372
|
+
Add comment attachments
|
|
304
373
|
---
|
|
374
|
+
description: Add one or more files as attachments to a specific comment. Supports various file types including images and documents.
|
|
305
375
|
tags:
|
|
306
|
-
|
|
376
|
+
- Comments
|
|
307
377
|
consumes:
|
|
308
378
|
- image/png
|
|
309
379
|
- image/gif
|
|
@@ -312,27 +382,61 @@ class AddAttachmentToCommentResource(Resource):
|
|
|
312
382
|
parameters:
|
|
313
383
|
- in: path
|
|
314
384
|
name: task_id
|
|
315
|
-
required:
|
|
385
|
+
required: true
|
|
316
386
|
type: string
|
|
317
387
|
format: uuid
|
|
318
388
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
389
|
+
description: Unique identifier of the task
|
|
319
390
|
- in: path
|
|
320
391
|
name: comment_id
|
|
321
|
-
required:
|
|
392
|
+
required: true
|
|
322
393
|
type: string
|
|
323
394
|
format: uuid
|
|
324
|
-
example:
|
|
395
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
396
|
+
description: Unique identifier of the comment
|
|
325
397
|
- in: formData
|
|
326
398
|
name: reply_id
|
|
327
|
-
type:
|
|
328
|
-
|
|
399
|
+
type: string
|
|
400
|
+
format: uuid
|
|
401
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
402
|
+
description: Reply identifier (optional)
|
|
329
403
|
- in: formData
|
|
330
404
|
name: files
|
|
331
405
|
type: file
|
|
332
|
-
required:
|
|
406
|
+
required: true
|
|
407
|
+
description: Files to attach to the comment
|
|
333
408
|
responses:
|
|
334
|
-
|
|
335
|
-
|
|
409
|
+
201:
|
|
410
|
+
description: Files successfully added as attachments
|
|
411
|
+
content:
|
|
412
|
+
application/json:
|
|
413
|
+
schema:
|
|
414
|
+
type: array
|
|
415
|
+
items:
|
|
416
|
+
type: object
|
|
417
|
+
properties:
|
|
418
|
+
id:
|
|
419
|
+
type: string
|
|
420
|
+
format: uuid
|
|
421
|
+
description: Attachment file unique identifier
|
|
422
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
423
|
+
name:
|
|
424
|
+
type: string
|
|
425
|
+
description: File name
|
|
426
|
+
example: "document.pdf"
|
|
427
|
+
mimetype:
|
|
428
|
+
type: string
|
|
429
|
+
description: File MIME type
|
|
430
|
+
example: "application/pdf"
|
|
431
|
+
size:
|
|
432
|
+
type: integer
|
|
433
|
+
description: File size in bytes
|
|
434
|
+
example: 1024000
|
|
435
|
+
comment_id:
|
|
436
|
+
type: string
|
|
437
|
+
format: uuid
|
|
438
|
+
description: Comment identifier
|
|
439
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
336
440
|
"""
|
|
337
441
|
user = persons_service.get_current_user()
|
|
338
442
|
comment = tasks_service.get_comment(comment_id)
|
|
@@ -358,54 +462,104 @@ class CommentManyTasksResource(Resource):
|
|
|
358
462
|
@jwt_required()
|
|
359
463
|
def post(self, project_id):
|
|
360
464
|
"""
|
|
361
|
-
Create
|
|
465
|
+
Create multiple comments
|
|
362
466
|
---
|
|
467
|
+
description: Create several comments at once for a specific project. Each comment requires a text, a task id, a task_status and a person as arguments. This way, comments keep history of status changes. When the comment is created, it updates the task status with the given task status.
|
|
363
468
|
tags:
|
|
364
|
-
|
|
365
|
-
description: Each comment requires a text, a task id, a task_status and a person as arguments.
|
|
366
|
-
This way, comments keep history of status changes.
|
|
367
|
-
When the comment is created, it updates the task status with given task status.
|
|
469
|
+
- Comments
|
|
368
470
|
parameters:
|
|
369
471
|
- in: path
|
|
370
472
|
name: project_id
|
|
371
|
-
required:
|
|
473
|
+
required: true
|
|
372
474
|
type: string
|
|
373
475
|
format: uuid
|
|
374
476
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
477
|
+
description: Unique identifier of the project
|
|
478
|
+
requestBody:
|
|
479
|
+
required: true
|
|
480
|
+
content:
|
|
481
|
+
application/json:
|
|
482
|
+
schema:
|
|
483
|
+
type: array
|
|
484
|
+
items:
|
|
485
|
+
type: object
|
|
486
|
+
required:
|
|
381
487
|
- task_status_id
|
|
382
|
-
|
|
488
|
+
- object_id
|
|
489
|
+
properties:
|
|
383
490
|
task_status_id:
|
|
491
|
+
type: string
|
|
492
|
+
format: uuid
|
|
493
|
+
description: Task status identifier
|
|
494
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
495
|
+
comment:
|
|
496
|
+
type: string
|
|
497
|
+
description: Comment text content
|
|
498
|
+
example: "This looks great! Ready for review."
|
|
499
|
+
person_id:
|
|
500
|
+
type: string
|
|
501
|
+
format: uuid
|
|
502
|
+
description: Person identifier (optional, defaults to current user)
|
|
503
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
504
|
+
object_id:
|
|
505
|
+
type: string
|
|
506
|
+
format: uuid
|
|
507
|
+
description: Task identifier
|
|
508
|
+
example: e68e0ie8-gi19-8009-e514-91897426g69
|
|
509
|
+
created_at:
|
|
510
|
+
type: string
|
|
511
|
+
format: date-time
|
|
512
|
+
description: Creation timestamp (optional, defaults to current time)
|
|
513
|
+
example: "2023-01-01T12:00:00Z"
|
|
514
|
+
checklist:
|
|
515
|
+
type: object
|
|
516
|
+
description: Checklist items for the comment
|
|
517
|
+
example: {"item1": "Check lighting", "item2": "Verify textures"}
|
|
518
|
+
links:
|
|
519
|
+
type: array
|
|
520
|
+
items:
|
|
521
|
+
type: string
|
|
522
|
+
description: List of related links
|
|
523
|
+
example: ["https://example.com/reference1", "https://example.com/reference2"]
|
|
524
|
+
responses:
|
|
525
|
+
201:
|
|
526
|
+
description: Comments successfully created
|
|
527
|
+
content:
|
|
528
|
+
application/json:
|
|
529
|
+
schema:
|
|
530
|
+
type: array
|
|
531
|
+
items:
|
|
532
|
+
type: object
|
|
533
|
+
properties:
|
|
534
|
+
id:
|
|
384
535
|
type: string
|
|
385
536
|
format: uuid
|
|
386
|
-
|
|
387
|
-
|
|
537
|
+
description: Comment unique identifier
|
|
538
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
539
|
+
task_id:
|
|
388
540
|
type: string
|
|
389
|
-
|
|
541
|
+
format: uuid
|
|
542
|
+
description: Task identifier
|
|
543
|
+
example: e68e0ie8-gi19-8009-e514-91897426g69
|
|
544
|
+
person_id:
|
|
390
545
|
type: string
|
|
391
546
|
format: uuid
|
|
392
|
-
|
|
393
|
-
|
|
547
|
+
description: Person identifier
|
|
548
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
549
|
+
comment:
|
|
550
|
+
type: string
|
|
551
|
+
description: Comment text content
|
|
552
|
+
example: "This looks great! Ready for review."
|
|
553
|
+
task_status_id:
|
|
394
554
|
type: string
|
|
395
555
|
format: uuid
|
|
396
|
-
|
|
397
|
-
|
|
556
|
+
description: Task status identifier
|
|
557
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
558
|
+
created_at:
|
|
398
559
|
type: string
|
|
399
560
|
format: date-time
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
type: object
|
|
403
|
-
properties:
|
|
404
|
-
item 1:
|
|
405
|
-
type: string
|
|
406
|
-
responses:
|
|
407
|
-
201:
|
|
408
|
-
description: Given files added to the comment entry as attachments
|
|
561
|
+
description: Creation timestamp
|
|
562
|
+
example: "2023-01-01T12:00:00Z"
|
|
409
563
|
"""
|
|
410
564
|
comments = request.json
|
|
411
565
|
person = persons_service.get_current_user(relations=True)
|
|
@@ -467,31 +621,63 @@ class ReplyCommentResource(Resource, ArgsMixin):
|
|
|
467
621
|
@jwt_required()
|
|
468
622
|
def post(self, task_id, comment_id):
|
|
469
623
|
"""
|
|
470
|
-
Reply to
|
|
624
|
+
Reply to comment
|
|
471
625
|
---
|
|
626
|
+
description: Add a reply to a specific comment. The reply will be added to the comment's replies list.
|
|
472
627
|
tags:
|
|
473
|
-
|
|
474
|
-
description: Add comment to its replies list.
|
|
628
|
+
- Comments
|
|
475
629
|
parameters:
|
|
476
630
|
- in: path
|
|
477
631
|
name: task_id
|
|
478
|
-
required:
|
|
632
|
+
required: true
|
|
479
633
|
type: string
|
|
480
634
|
format: uuid
|
|
481
635
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
636
|
+
description: Unique identifier of the task
|
|
482
637
|
- in: path
|
|
483
638
|
name: comment_id
|
|
484
|
-
required:
|
|
639
|
+
required: true
|
|
485
640
|
type: string
|
|
486
641
|
format: uuid
|
|
487
|
-
example:
|
|
642
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
643
|
+
description: Unique identifier of the comment
|
|
488
644
|
- in: formData
|
|
489
645
|
name: text
|
|
490
646
|
type: string
|
|
491
|
-
example:
|
|
647
|
+
example: "Thanks for the feedback!"
|
|
648
|
+
description: Reply text content
|
|
492
649
|
responses:
|
|
493
|
-
|
|
494
|
-
|
|
650
|
+
200:
|
|
651
|
+
description: Reply successfully added to comment
|
|
652
|
+
content:
|
|
653
|
+
application/json:
|
|
654
|
+
schema:
|
|
655
|
+
type: object
|
|
656
|
+
properties:
|
|
657
|
+
id:
|
|
658
|
+
type: string
|
|
659
|
+
format: uuid
|
|
660
|
+
description: Reply unique identifier
|
|
661
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
662
|
+
comment_id:
|
|
663
|
+
type: string
|
|
664
|
+
format: uuid
|
|
665
|
+
description: Parent comment identifier
|
|
666
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
667
|
+
text:
|
|
668
|
+
type: string
|
|
669
|
+
description: Reply text content
|
|
670
|
+
example: "Thanks for the feedback!"
|
|
671
|
+
person_id:
|
|
672
|
+
type: string
|
|
673
|
+
format: uuid
|
|
674
|
+
description: Person identifier who made the reply
|
|
675
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
676
|
+
created_at:
|
|
677
|
+
type: string
|
|
678
|
+
format: date-time
|
|
679
|
+
description: Creation timestamp
|
|
680
|
+
example: "2023-01-01T12:00:00Z"
|
|
495
681
|
"""
|
|
496
682
|
comment = tasks_service.get_comment(comment_id)
|
|
497
683
|
current_user = persons_service.get_current_user()
|
|
@@ -524,32 +710,36 @@ class DeleteReplyCommentResource(Resource):
|
|
|
524
710
|
@jwt_required()
|
|
525
711
|
def delete(self, task_id, comment_id, reply_id):
|
|
526
712
|
"""
|
|
527
|
-
Delete
|
|
713
|
+
Delete comment reply
|
|
528
714
|
---
|
|
715
|
+
description: Delete a specific reply from a comment. Only the reply author or administrators can delete replies.
|
|
529
716
|
tags:
|
|
530
|
-
|
|
717
|
+
- Comments
|
|
531
718
|
parameters:
|
|
532
719
|
- in: path
|
|
533
720
|
name: task_id
|
|
534
|
-
required:
|
|
721
|
+
required: true
|
|
535
722
|
type: string
|
|
536
723
|
format: uuid
|
|
537
724
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
725
|
+
description: Unique identifier of the task
|
|
538
726
|
- in: path
|
|
539
727
|
name: comment_id
|
|
540
|
-
required:
|
|
728
|
+
required: true
|
|
541
729
|
type: string
|
|
542
730
|
format: uuid
|
|
543
|
-
example:
|
|
731
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
732
|
+
description: Unique identifier of the comment
|
|
544
733
|
- in: path
|
|
545
734
|
name: reply_id
|
|
546
|
-
required:
|
|
735
|
+
required: true
|
|
547
736
|
type: string
|
|
548
737
|
format: uuid
|
|
549
|
-
example:
|
|
738
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
739
|
+
description: Unique identifier of the reply
|
|
550
740
|
responses:
|
|
551
|
-
|
|
552
|
-
|
|
741
|
+
200:
|
|
742
|
+
description: Reply successfully deleted
|
|
553
743
|
"""
|
|
554
744
|
reply = comments_service.get_reply(comment_id, reply_id)
|
|
555
745
|
current_user = persons_service.get_current_user()
|
|
@@ -562,20 +752,56 @@ class ProjectAttachmentFiles(Resource):
|
|
|
562
752
|
@jwt_required()
|
|
563
753
|
def get(self, project_id):
|
|
564
754
|
"""
|
|
565
|
-
|
|
755
|
+
Get project attachment files
|
|
566
756
|
---
|
|
757
|
+
description: Retrieve all attachment files related to a specific project. Requires administrator permissions.
|
|
567
758
|
tags:
|
|
568
|
-
|
|
759
|
+
- Comments
|
|
569
760
|
parameters:
|
|
570
761
|
- in: path
|
|
571
762
|
name: project_id
|
|
572
|
-
required:
|
|
763
|
+
required: true
|
|
573
764
|
type: string
|
|
574
765
|
format: uuid
|
|
575
766
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
767
|
+
description: Unique identifier of the project
|
|
576
768
|
responses:
|
|
577
|
-
|
|
578
|
-
|
|
769
|
+
200:
|
|
770
|
+
description: Project attachment files successfully retrieved
|
|
771
|
+
content:
|
|
772
|
+
application/json:
|
|
773
|
+
schema:
|
|
774
|
+
type: array
|
|
775
|
+
items:
|
|
776
|
+
type: object
|
|
777
|
+
properties:
|
|
778
|
+
id:
|
|
779
|
+
type: string
|
|
780
|
+
format: uuid
|
|
781
|
+
description: Attachment file unique identifier
|
|
782
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
783
|
+
name:
|
|
784
|
+
type: string
|
|
785
|
+
description: File name
|
|
786
|
+
example: "document.pdf"
|
|
787
|
+
mimetype:
|
|
788
|
+
type: string
|
|
789
|
+
description: File MIME type
|
|
790
|
+
example: "application/pdf"
|
|
791
|
+
size:
|
|
792
|
+
type: integer
|
|
793
|
+
description: File size in bytes
|
|
794
|
+
example: 1024000
|
|
795
|
+
comment_id:
|
|
796
|
+
type: string
|
|
797
|
+
format: uuid
|
|
798
|
+
description: Comment identifier
|
|
799
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
800
|
+
project_id:
|
|
801
|
+
type: string
|
|
802
|
+
format: uuid
|
|
803
|
+
description: Project identifier
|
|
804
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
579
805
|
"""
|
|
580
806
|
permissions.check_admin_permissions()
|
|
581
807
|
return comments_service.get_all_attachment_files_for_project(
|
|
@@ -591,20 +817,56 @@ class TaskAttachmentFiles(Resource):
|
|
|
591
817
|
@jwt_required()
|
|
592
818
|
def get(self, task_id):
|
|
593
819
|
"""
|
|
594
|
-
|
|
820
|
+
Get task attachment files
|
|
595
821
|
---
|
|
822
|
+
description: Retrieve all attachment files related to a specific task. Requires administrator permissions.
|
|
596
823
|
tags:
|
|
597
|
-
|
|
824
|
+
- Comments
|
|
598
825
|
parameters:
|
|
599
826
|
- in: path
|
|
600
827
|
name: task_id
|
|
601
|
-
required:
|
|
828
|
+
required: true
|
|
602
829
|
type: string
|
|
603
830
|
format: uuid
|
|
604
831
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
832
|
+
description: Unique identifier of the task
|
|
605
833
|
responses:
|
|
606
|
-
|
|
607
|
-
|
|
834
|
+
200:
|
|
835
|
+
description: Task attachment files successfully retrieved
|
|
836
|
+
content:
|
|
837
|
+
application/json:
|
|
838
|
+
schema:
|
|
839
|
+
type: array
|
|
840
|
+
items:
|
|
841
|
+
type: object
|
|
842
|
+
properties:
|
|
843
|
+
id:
|
|
844
|
+
type: string
|
|
845
|
+
format: uuid
|
|
846
|
+
description: Attachment file unique identifier
|
|
847
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
848
|
+
name:
|
|
849
|
+
type: string
|
|
850
|
+
description: File name
|
|
851
|
+
example: "document.pdf"
|
|
852
|
+
mimetype:
|
|
853
|
+
type: string
|
|
854
|
+
description: File MIME type
|
|
855
|
+
example: "application/pdf"
|
|
856
|
+
size:
|
|
857
|
+
type: integer
|
|
858
|
+
description: File size in bytes
|
|
859
|
+
example: 1024000
|
|
860
|
+
comment_id:
|
|
861
|
+
type: string
|
|
862
|
+
format: uuid
|
|
863
|
+
description: Comment identifier
|
|
864
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
865
|
+
task_id:
|
|
866
|
+
type: string
|
|
867
|
+
format: uuid
|
|
868
|
+
description: Task identifier
|
|
869
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
608
870
|
"""
|
|
609
871
|
permissions.check_admin_permissions()
|
|
610
872
|
return comments_service.get_all_attachment_files_for_task(task_id)
|