zou 0.20.81__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.
@@ -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
- - Comments
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: True
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: True
46
+ required: true
45
47
  type: string
46
- example: filename
48
+ example: "document.pdf"
49
+ description: Name of the file to download
47
50
  responses:
48
- 200:
49
- description: Attachment file downloaded
51
+ 200:
52
+ description: Attachment file successfully downloaded
53
+ content:
54
+ application/octet-stream:
50
55
  schema:
51
- type: file
52
- 404:
53
- description: Download failed
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 given comment.
107
+ Acknowledge comment
103
108
  ---
109
+ description: Acknowledge a specific comment. If it's already acknowledged, remove the acknowledgement.
104
110
  tags:
105
- - Comments
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: True
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: True
122
+ required: true
117
123
  type: string
118
124
  format: uuid
119
- example: a24a6ea4-ce75-4665-a070-57453082c25
125
+ example: b35b7fb5-df86-5776-b181-68564193d36
126
+ description: Unique identifier of the comment
120
127
  responses:
121
- 200:
122
- description: Comment acknowledged
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 a new comment for given task.
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
- - Comments
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: True
168
+ required: true
150
169
  type: string
151
170
  format: uuid
152
171
  example: a24a6ea4-ce75-4665-a070-57453082c25
153
- - in: body
154
- name: Comment
155
- description: person ID, name, comment, revision and change status of task
156
- schema:
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
- - task_status_id
180
+ - task_status_id
160
181
  properties:
161
- task_status_id:
162
- type: string
163
- format: uuid
164
- example: a24a6ea4-ce75-4665-a070-57453082c25a4-ce75-4665-a070-57453082c25
165
- comment:
166
- type: string
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
- type: string
169
- format: uuid
170
- example: a24a6ea4-ce75-4665-a070-57453082c25a4-ce75-4665-a070-57453082c25
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
- type: string
173
- format: date-time
174
- example: "2022-07-12T13:00:00"
175
- checklist:
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 attachment linked to a comment matching given ID.
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
- - Comments
331
+ - Comments
266
332
  parameters:
267
333
  - in: path
268
334
  name: task_id
269
- required: True
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: True
342
+ required: true
276
343
  type: string
277
344
  format: uuid
278
- example: a24a6ea4-ce75-4665-a070-57453082c25
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: True
349
+ required: true
282
350
  type: string
283
351
  format: uuid
284
- example: a24a6ea4-ce75-4665-a070-57453082c25
352
+ example: c46c8gc6-eg97-6887-c292-79675204e47
353
+ description: Unique identifier of the attachment
285
354
  responses:
286
- 204:
287
- description: Empty response
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 given files to the comment entry as attachments.
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
- - Comments
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: True
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: True
392
+ required: true
322
393
  type: string
323
394
  format: uuid
324
- example: a24a6ea4-ce75-4665-a070-57453082c25
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: uuid
328
- example: a24a6ea4-ce75-4665-a070-57453082c25
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: True
406
+ required: true
407
+ description: Files to attach to the comment
333
408
  responses:
334
- 201:
335
- description: Given files added to the comment entry as attachments
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 several comments at once.
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
- - Comments
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: True
473
+ required: true
372
474
  type: string
373
475
  format: uuid
374
476
  example: a24a6ea4-ce75-4665-a070-57453082c25
375
- - in: body
376
- name: Comment
377
- description: person ID, name, comment, revision and change status of task
378
- schema:
379
- type: object
380
- required:
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
- properties:
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
- example: a24a6ea4-ce75-4665-a070-57453082c25a4-ce75-4665-a070-57453082c25
387
- comment:
537
+ description: Comment unique identifier
538
+ example: b35b7fb5-df86-5776-b181-68564193d36
539
+ task_id:
388
540
  type: string
389
- person_id:
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
- example: a24a6ea4-ce75-4665-a070-57453082c25a4-ce75-4665-a070-57453082c25
393
- object_id:
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
- example: a24a6ea4-ce75-4665-a070-57453082c25a4-ce75-4665-a070-57453082c25
397
- created_at:
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
- example: "2022-07-12T13:00:00"
401
- checklist:
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 given comment.
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
- - Comments
474
- description: Add comment to its replies list.
628
+ - Comments
475
629
  parameters:
476
630
  - in: path
477
631
  name: task_id
478
- required: True
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: True
639
+ required: true
485
640
  type: string
486
641
  format: uuid
487
- example: a24a6ea4-ce75-4665-a070-57453082c25
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: comment
647
+ example: "Thanks for the feedback!"
648
+ description: Reply text content
492
649
  responses:
493
- 200:
494
- description: Reply to given comment
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 given comment reply.
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
- - Comments
717
+ - Comments
531
718
  parameters:
532
719
  - in: path
533
720
  name: task_id
534
- required: True
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: True
728
+ required: true
541
729
  type: string
542
730
  format: uuid
543
- example: a24a6ea4-ce75-4665-a070-57453082c25
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: True
735
+ required: true
547
736
  type: string
548
737
  format: uuid
549
- example: a24a6ea4-ce75-4665-a070-57453082c25
738
+ example: c46c8gc6-eg97-6887-c292-79675204e47
739
+ description: Unique identifier of the reply
550
740
  responses:
551
- 200:
552
- description: Given comment reply deleted
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
- Return all attachment files related to given project.
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
- - Comments
759
+ - Comments
569
760
  parameters:
570
761
  - in: path
571
762
  name: project_id
572
- required: True
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
- 200:
578
- description: All attachment files related to given project
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
- Return all attachment files related to given task.
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
- - Comments
824
+ - Comments
598
825
  parameters:
599
826
  - in: path
600
827
  name: task_id
601
- required: True
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
- 200:
607
- description: All attachment files related to given task
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)