zou 0.20.72__py3-none-any.whl → 0.20.73__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.
@@ -47,25 +47,40 @@ class AddPreviewResource(Resource, ArgsMixin):
47
47
  parameters:
48
48
  - in: path
49
49
  name: task_id
50
- required: True
51
- type: string
52
- format: uuid
50
+ required: true
51
+ schema:
52
+ type: string
53
+ format: uuid
53
54
  example: a24a6ea4-ce75-4665-a070-57453082c25
54
55
  - in: path
55
56
  name: comment_id
56
- required: True
57
- type: string
58
- format: uuid
59
- example: a24a6ea4-ce75-4665-a070-57453082c25
60
- - in: body
57
+ required: true
61
58
  schema:
59
+ type: string
60
+ format: uuid
61
+ example: a24a6ea4-ce75-4665-a070-57453082c25
62
+ requestBody:
63
+ required: true
64
+ content:
65
+ application/json:
66
+ schema:
62
67
  type: object
63
68
  properties:
64
- revision:
65
- type: integer
69
+ revision:
70
+ type: integer
71
+ description: Revision number for the preview
72
+ example: 1
66
73
  responses:
67
74
  201:
68
- description: Preview metadata added to given task
75
+ description: Preview metadata added to given task
76
+ content:
77
+ application/json:
78
+ schema:
79
+ type: object
80
+ 400:
81
+ description: Bad request
82
+ 404:
83
+ description: Task or comment not found
69
84
  """
70
85
  args = self.get_args([("revision", 0, False, int)])
71
86
 
@@ -93,29 +108,47 @@ class AddExtraPreviewResource(Resource, ArgsMixin):
93
108
  parameters:
94
109
  - in: path
95
110
  name: task_id
96
- required: True
97
- type: string
98
- format: uuid
111
+ required: true
112
+ schema:
113
+ type: string
114
+ format: uuid
99
115
  example: a24a6ea4-ce75-4665-a070-57453082c25
100
116
  - in: path
101
117
  name: comment_id
102
- required: True
103
- type: string
104
- format: uuid
118
+ required: true
119
+ schema:
120
+ type: string
121
+ format: uuid
105
122
  example: a24a6ea4-ce75-4665-a070-57453082c25
106
123
  - in: path
107
124
  name: preview_file_id
108
- required: True
109
- type: string
110
- format: uuid
125
+ required: true
126
+ schema:
127
+ type: string
128
+ format: uuid
111
129
  example: a24a6ea4-ce75-4665-a070-57453082c25
112
- - in: formData
113
- name: file
114
- type: file
115
- required: True
130
+ requestBody:
131
+ required: true
132
+ content:
133
+ multipart/form-data:
134
+ schema:
135
+ type: object
136
+ properties:
137
+ file:
138
+ type: string
139
+ format: binary
140
+ description: Preview file to upload
116
141
  responses:
117
142
  201:
118
- description: Preview added to given comment
143
+ description: Preview added to given comment
144
+ content:
145
+ application/json:
146
+ schema:
147
+ type: object
148
+ 400:
149
+ description: Bad request
150
+ 404:
151
+ description: Task, comment, or preview file not found
119
152
  """
120
153
  user_service.check_task_action_access(task_id)
121
154
  tasks_service.get_comment(comment_id)
@@ -138,25 +171,37 @@ class AddExtraPreviewResource(Resource, ArgsMixin):
138
171
  parameters:
139
172
  - in: path
140
173
  name: task_id
141
- required: True
142
- type: string
143
- format: uuid
174
+ required: true
175
+ schema:
176
+ type: string
177
+ format: uuid
144
178
  example: a24a6ea4-ce75-4665-a070-57453082c25
145
179
  - in: path
146
180
  name: comment_id
147
- required: True
148
- type: string
149
- format: uuid
181
+ required: true
182
+ schema:
183
+ type: string
184
+ format: uuid
150
185
  example: a24a6ea4-ce75-4665-a070-57453082c25
151
186
  - in: path
152
187
  name: preview_file_id
153
- required: True
154
- type: string
155
- format: uuid
188
+ required: true
189
+ schema:
190
+ type: string
191
+ format: uuid
156
192
  example: a24a6ea4-ce75-4665-a070-57453082c25
193
+ - in: query
194
+ name: force
195
+ required: false
196
+ schema:
197
+ type: boolean
198
+ default: false
199
+ description: Force deletion even if preview has dependencies
157
200
  responses:
158
201
  204:
159
- description: Preview deleted from given comment
202
+ description: Preview deleted from given comment
203
+ 404:
204
+ description: Task, comment, or preview file not found
160
205
  """
161
206
  task = tasks_service.get_task(task_id)
162
207
  user_service.check_project_access(task["project_id"])
@@ -181,13 +226,22 @@ class TaskPreviewsResource(Resource):
181
226
  parameters:
182
227
  - in: path
183
228
  name: task_id
184
- required: True
185
- type: string
186
- format: uuid
229
+ required: true
230
+ schema:
231
+ type: string
232
+ format: uuid
187
233
  example: a24a6ea4-ce75-4665-a070-57453082c25
188
234
  responses:
189
235
  200:
190
- description: Previews linked to given task
236
+ description: Previews linked to given task
237
+ content:
238
+ application/json:
239
+ schema:
240
+ type: array
241
+ items:
242
+ type: object
243
+ 404:
244
+ description: Task not found
191
245
  """
192
246
  user_service.check_task_access(task_id)
193
247
  return files_service.get_preview_files_for_task(task_id)
@@ -208,13 +262,22 @@ class TaskCommentsResource(Resource):
208
262
  parameters:
209
263
  - in: path
210
264
  name: task_id
211
- required: True
212
- type: string
213
- format: uuid
265
+ required: true
266
+ schema:
267
+ type: string
268
+ format: uuid
214
269
  example: a24a6ea4-ce75-4665-a070-57453082c25
215
270
  responses:
216
271
  200:
217
- description: Comments linked to given task
272
+ description: Comments linked to given task
273
+ content:
274
+ application/json:
275
+ schema:
276
+ type: array
277
+ items:
278
+ type: object
279
+ 404:
280
+ description: Task not found
218
281
  """
219
282
  user_service.check_task_access(task_id)
220
283
  is_client = permissions.has_client_permissions()
@@ -240,19 +303,27 @@ class TaskCommentResource(Resource):
240
303
  parameters:
241
304
  - in: path
242
305
  name: task_id
243
- required: True
244
- type: string
245
- format: uuid
306
+ required: true
307
+ schema:
308
+ type: string
309
+ format: uuid
246
310
  example: a24a6ea4-ce75-4665-a070-57453082c25
247
311
  - in: path
248
312
  name: comment_id
249
- required: True
250
- type: string
251
- format: uuid
313
+ required: true
314
+ schema:
315
+ type: string
316
+ format: uuid
252
317
  example: a24a6ea4-ce75-4665-a070-57453082c25
253
318
  responses:
254
319
  200:
255
- description: Comment corresponding at given ID
320
+ description: Comment corresponding at given ID
321
+ content:
322
+ application/json:
323
+ schema:
324
+ type: object
325
+ 404:
326
+ description: Task or comment not found
256
327
  """
257
328
  comment = tasks_service.get_comment(comment_id)
258
329
  user_service.check_comment_access(comment)
@@ -289,19 +360,23 @@ class TaskCommentResource(Resource):
289
360
  parameters:
290
361
  - in: path
291
362
  name: task_id
292
- required: True
293
- type: string
294
- format: uuid
363
+ required: true
364
+ schema:
365
+ type: string
366
+ format: uuid
295
367
  example: a24a6ea4-ce75-4665-a070-57453082c25
296
368
  - in: path
297
369
  name: comment_id
298
- required: True
299
- type: string
300
- format: uuid
370
+ required: true
371
+ schema:
372
+ type: string
373
+ format: uuid
301
374
  example: a24a6ea4-ce75-4665-a070-57453082c25
302
375
  responses:
303
376
  204:
304
- description: Comment corresponding at given ID deleted
377
+ description: Comment corresponding at given ID deleted
378
+ 404:
379
+ description: Task or comment not found
305
380
  """
306
381
  comment = tasks_service.get_comment(comment_id)
307
382
  task = tasks_service.get_task(comment["object_id"])
@@ -333,13 +408,22 @@ class PersonTasksResource(Resource):
333
408
  parameters:
334
409
  - in: path
335
410
  name: person_id
336
- required: True
337
- type: string
338
- format: uuid
411
+ required: true
412
+ schema:
413
+ type: string
414
+ format: uuid
339
415
  example: a24a6ea4-ce75-4665-a070-57453082c25
340
416
  responses:
341
417
  200:
342
- description: Tasks assigned to user that are not done
418
+ description: Tasks assigned to user that are not done
419
+ content:
420
+ application/json:
421
+ schema:
422
+ type: array
423
+ items:
424
+ type: object
425
+ 404:
426
+ description: Person not found
343
427
  """
344
428
  user_service.check_person_is_not_bot(person_id)
345
429
  if not permissions.has_admin_permissions():
@@ -371,19 +455,29 @@ class PersonRelatedTasksResource(Resource):
371
455
  parameters:
372
456
  - in: path
373
457
  name: person_id
374
- required: True
375
- type: string
376
- format: uuid
458
+ required: true
459
+ schema:
460
+ type: string
461
+ format: uuid
377
462
  example: a24a6ea4-ce75-4665-a070-57453082c25
378
463
  - in: path
379
464
  name: task_type_id
380
- required: True
381
- type: string
382
- format: uuid
465
+ required: true
466
+ schema:
467
+ type: string
468
+ format: uuid
383
469
  example: a24a6ea4-ce75-4665-a070-57453082c25
384
470
  responses:
385
471
  200:
386
- description: All Tasks for given task type
472
+ description: All Tasks for given task type
473
+ content:
474
+ application/json:
475
+ schema:
476
+ type: array
477
+ items:
478
+ type: object
479
+ 404:
480
+ description: Person or task type not found
387
481
  """
388
482
  user_service.check_person_is_not_bot(person_id)
389
483
  user = persons_service.get_current_user()
@@ -409,13 +503,22 @@ class PersonDoneTasksResource(Resource):
409
503
  parameters:
410
504
  - in: path
411
505
  name: person_id
412
- required: True
413
- type: string
414
- format: uuid
506
+ required: true
507
+ schema:
508
+ type: string
509
+ format: uuid
415
510
  example: a24a6ea4-ce75-4665-a070-57453082c25
416
511
  responses:
417
512
  200:
418
- description: Tasks assigned to user that are done
513
+ description: Tasks assigned to user that are done
514
+ content:
515
+ application/json:
516
+ schema:
517
+ type: array
518
+ items:
519
+ type: object
520
+ 404:
521
+ description: Person not found
419
522
  """
420
523
  user_service.check_person_is_not_bot(person_id)
421
524
  if not permissions.has_admin_permissions():
@@ -446,19 +549,41 @@ class CreateShotTasksResource(Resource):
446
549
  parameters:
447
550
  - in: path
448
551
  name: project_id
449
- required: True
450
- type: string
451
- format: uuid
552
+ required: true
553
+ schema:
554
+ type: string
555
+ format: uuid
452
556
  example: a24a6ea4-ce75-4665-a070-57453082c25
453
557
  - in: path
454
558
  name: task_type_id
455
- required: True
456
- type: string
457
- format: uuid
559
+ required: true
560
+ schema:
561
+ type: string
562
+ format: uuid
458
563
  example: a24a6ea4-ce75-4665-a070-57453082c25
564
+ requestBody:
565
+ required: true
566
+ content:
567
+ application/json:
568
+ schema:
569
+ type: array
570
+ items:
571
+ type: string
572
+ format: uuid
573
+ description: List of shot IDs to create tasks for
459
574
  responses:
460
575
  201:
461
- description: New task for given shot and task type created
576
+ description: New task for given shot and task type created
577
+ content:
578
+ application/json:
579
+ schema:
580
+ type: array
581
+ items:
582
+ type: object
583
+ 400:
584
+ description: Bad request
585
+ 404:
586
+ description: Project or task type not found
462
587
  """
463
588
  user_service.check_manager_project_access(project_id)
464
589
  task_type = tasks_service.get_task_type(task_type_id)
@@ -495,19 +620,31 @@ class CreateConceptTasksResource(Resource):
495
620
  parameters:
496
621
  - in: path
497
622
  name: project_id
498
- required: True
499
- type: string
623
+ required: true
624
+ schema:
625
+ type: string
500
626
  format: uuid
501
627
  example: a24a6ea4-ce75-4665-a070-57453082c25
502
628
  - in: path
503
629
  name: task_type_id
504
- required: True
505
- type: string
630
+ required: true
631
+ schema:
632
+ type: string
506
633
  format: uuid
507
634
  example: a24a6ea4-ce75-4665-a070-57453082c25
508
635
  responses:
509
636
  201:
510
- description: New task for given concept and task type created
637
+ description: New task for given concept and task type created
638
+ content:
639
+ application/json:
640
+ schema:
641
+ type: array
642
+ items:
643
+ type: object
644
+ 400:
645
+ description: Bad request
646
+ 404:
647
+ description: Project or task type not found
511
648
  """
512
649
  user_service.check_project_access(project_id)
513
650
  if (
@@ -549,25 +686,38 @@ class CreateEntityTasksResource(Resource):
549
686
  parameters:
550
687
  - in: path
551
688
  name: project_id
552
- required: True
553
- type: string
689
+ required: true
690
+ schema:
691
+ type: string
554
692
  format: uuid
555
693
  example: a24a6ea4-ce75-4665-a070-57453082c25
556
694
  - in: path
557
695
  name: task_type_id
558
- required: True
559
- type: string
696
+ required: true
697
+ schema:
698
+ type: string
560
699
  format: uuid
561
700
  example: a24a6ea4-ce75-4665-a070-57453082c25
562
701
  - in: path
563
702
  name: task_type_id
564
- required: True
565
- type: string
703
+ required: true
704
+ schema:
705
+ type: string
566
706
  format: uuid
567
707
  example: a24a6ea4-ce75-4665-a070-57453082c25
568
708
  responses:
569
709
  201:
570
- description: List of created tasks.
710
+ description: List of created tasks
711
+ content:
712
+ application/json:
713
+ schema:
714
+ type: array
715
+ items:
716
+ type: object
717
+ 400:
718
+ description: Bad request
719
+ 404:
720
+ description: Project, entity type, or task type not found
571
721
  """
572
722
  user_service.check_manager_project_access(project_id)
573
723
  task_type = tasks_service.get_task_type(task_type_id)
@@ -610,19 +760,31 @@ class CreateAssetTasksResource(Resource):
610
760
  parameters:
611
761
  - in: path
612
762
  name: project_id
613
- required: True
614
- type: string
763
+ required: true
764
+ schema:
765
+ type: string
615
766
  format: uuid
616
767
  example: a24a6ea4-ce75-4665-a070-57453082c25
617
768
  - in: path
618
769
  name: task_type_id
619
- required: True
620
- type: string
770
+ required: true
771
+ schema:
772
+ type: string
621
773
  format: uuid
622
774
  example: a24a6ea4-ce75-4665-a070-57453082c25
623
775
  responses:
624
776
  201:
625
- description: New task for given asset and task type created
777
+ description: New task for given asset and task type created
778
+ content:
779
+ application/json:
780
+ schema:
781
+ type: array
782
+ items:
783
+ type: object
784
+ 400:
785
+ description: Bad request
786
+ 404:
787
+ description: Project or task type not found
626
788
  """
627
789
  user_service.check_manager_project_access(project_id)
628
790
  task_type = tasks_service.get_task_type(task_type_id)
@@ -658,19 +820,31 @@ class CreateEditTasksResource(Resource):
658
820
  parameters:
659
821
  - in: path
660
822
  name: project_id
661
- required: True
662
- type: string
823
+ required: true
824
+ schema:
825
+ type: string
663
826
  format: uuid
664
827
  example: a24a6ea4-ce75-4665-a070-57453082c25
665
828
  - in: path
666
829
  name: task_type_id
667
- required: True
668
- type: string
830
+ required: true
831
+ schema:
832
+ type: string
669
833
  format: uuid
670
834
  example: a24a6ea4-ce75-4665-a070-57453082c25
671
835
  responses:
672
836
  201:
673
- description: New task for given edit and task type created
837
+ description: New task for given edit and task type created
838
+ content:
839
+ application/json:
840
+ schema:
841
+ type: array
842
+ items:
843
+ type: object
844
+ 400:
845
+ description: Bad request
846
+ 404:
847
+ description: Project or task type not found
674
848
  """
675
849
  user_service.check_manager_project_access(project_id)
676
850
  task_type = tasks_service.get_task_type(task_type_id)
@@ -708,8 +882,9 @@ class ToReviewResource(Resource, ArgsMixin):
708
882
  parameters:
709
883
  - in: path
710
884
  name: task_id
711
- required: True
712
- type: string
885
+ required: true
886
+ schema:
887
+ type: string
713
888
  format: uuid
714
889
  example: a24a6ea4-ce75-4665-a070-57453082c25
715
890
  - in: body
@@ -884,10 +1059,11 @@ class TasksAssignResource(Resource, ArgsMixin):
884
1059
  parameters:
885
1060
  - in: path
886
1061
  name: person_id
887
- type: string
888
- format: uuid
1062
+ required: true
1063
+ schema:
1064
+ type: string
1065
+ format: uuid
889
1066
  example: a24a6ea4-ce75-4665-a070-57453082c25
890
- required: True
891
1067
  - in: body
892
1068
  name: Task
893
1069
  description: List of tasks ID
@@ -955,8 +1131,9 @@ class TaskAssignResource(Resource, ArgsMixin):
955
1131
  parameters:
956
1132
  - in: path
957
1133
  name: task_id
958
- required: True
959
- type: string
1134
+ required: true
1135
+ schema:
1136
+ type: string
960
1137
  format: uuid
961
1138
  example: a24a6ea4-ce75-4665-a070-57453082c25
962
1139
  - in: body
@@ -1021,8 +1198,9 @@ class TaskFullResource(Resource):
1021
1198
  parameters:
1022
1199
  - in: path
1023
1200
  name: task_id
1024
- required: True
1025
- type: string
1201
+ required: true
1202
+ schema:
1203
+ type: string
1026
1204
  format: uuid
1027
1205
  example: a24a6ea4-ce75-4665-a070-57453082c25
1028
1206
  responses:
@@ -1053,14 +1231,16 @@ class TaskForEntityResource(Resource):
1053
1231
  parameters:
1054
1232
  - in: path
1055
1233
  name: entity_id
1056
- required: True
1057
- type: string
1234
+ required: true
1235
+ schema:
1236
+ type: string
1058
1237
  format: uuid
1059
1238
  example: a24a6ea4-ce75-4665-a070-57453082c25
1060
1239
  - in: path
1061
1240
  name: task_type_id
1062
- required: True
1063
- type: string
1241
+ required: true
1242
+ schema:
1243
+ type: string
1064
1244
  format: uuid
1065
1245
  example: a24a6ea4-ce75-4665-a070-57453082c25
1066
1246
  responses:
@@ -1089,20 +1269,23 @@ class SetTimeSpentResource(Resource, ArgsMixin):
1089
1269
  parameters:
1090
1270
  - in: path
1091
1271
  name: task_id
1092
- required: True
1093
- type: string
1272
+ required: true
1273
+ schema:
1274
+ type: string
1094
1275
  format: uuid
1095
1276
  example: a24a6ea4-ce75-4665-a070-57453082c25
1096
1277
  - in: path
1097
1278
  name: date
1098
- required: True
1099
- type: string
1279
+ required: true
1280
+ schema:
1281
+ type: string
1100
1282
  format: date
1101
1283
  example: "2022-07-12"
1102
1284
  - in: path
1103
1285
  name: person_id
1104
- required: True
1105
- type: string
1286
+ required: true
1287
+ schema:
1288
+ type: string
1106
1289
  format: uuid
1107
1290
  example: a24a6ea4-ce75-4665-a070-57453082c25
1108
1291
  - in: body
@@ -1146,20 +1329,23 @@ class SetTimeSpentResource(Resource, ArgsMixin):
1146
1329
  parameters:
1147
1330
  - in: path
1148
1331
  name: task_id
1149
- required: True
1150
- type: string
1332
+ required: true
1333
+ schema:
1334
+ type: string
1151
1335
  format: uuid
1152
1336
  example: a24a6ea4-ce75-4665-a070-57453082c25
1153
1337
  - in: path
1154
1338
  name: date
1155
- required: True
1156
- type: string
1339
+ required: true
1340
+ schema:
1341
+ type: string
1157
1342
  format: date
1158
1343
  example: "2022-07-12"
1159
1344
  - in: path
1160
1345
  name: person_id
1161
- required: True
1162
- type: string
1346
+ required: true
1347
+ schema:
1348
+ type: string
1163
1349
  format: uuid
1164
1350
  example: a24a6ea4-ce75-4665-a070-57453082c25
1165
1351
  responses:
@@ -1198,20 +1384,23 @@ class AddTimeSpentResource(Resource, ArgsMixin):
1198
1384
  parameters:
1199
1385
  - in: path
1200
1386
  name: task_id
1201
- required: True
1202
- type: string
1387
+ required: true
1388
+ schema:
1389
+ type: string
1203
1390
  format: uuid
1204
1391
  example: a24a6ea4-ce75-4665-a070-57453082c25
1205
1392
  - in: path
1206
1393
  name: date
1207
- required: True
1208
- type: string
1394
+ required: true
1395
+ schema:
1396
+ type: string
1209
1397
  format: date
1210
1398
  example: "2022-07-12"
1211
1399
  - in: path
1212
1400
  name: person_id
1213
- required: True
1214
- type: string
1401
+ required: true
1402
+ schema:
1403
+ type: string
1215
1404
  format: uuid
1216
1405
  example: a24a6ea4-ce75-4665-a070-57453082c25
1217
1406
  - in: body
@@ -1258,8 +1447,9 @@ class GetTimeSpentResource(Resource):
1258
1447
  parameters:
1259
1448
  - in: path
1260
1449
  name: task_id
1261
- required: True
1262
- type: string
1450
+ required: true
1451
+ schema:
1452
+ type: string
1263
1453
  format: uuid
1264
1454
  example: a24a6ea4-ce75-4665-a070-57453082c25
1265
1455
  responses:
@@ -1287,14 +1477,16 @@ class GetTimeSpentDateResource(Resource):
1287
1477
  parameters:
1288
1478
  - in: path
1289
1479
  name: task_id
1290
- required: True
1291
- type: string
1480
+ required: true
1481
+ schema:
1482
+ type: string
1292
1483
  format: uuid
1293
1484
  example: a24a6ea4-ce75-4665-a070-57453082c25
1294
1485
  - in: path
1295
1486
  name: date
1296
- required: True
1297
- type: string
1487
+ required: true
1488
+ schema:
1489
+ type: string
1298
1490
  format: date
1299
1491
  example: "2022-07-12"
1300
1492
  responses:
@@ -1327,14 +1519,16 @@ class DeleteAllTasksForTaskTypeResource(Resource):
1327
1519
  parameters:
1328
1520
  - in: path
1329
1521
  name: project_id
1330
- required: True
1331
- type: string
1522
+ required: true
1523
+ schema:
1524
+ type: string
1332
1525
  format: uuid
1333
1526
  example: a24a6ea4-ce75-4665-a070-57453082c25
1334
1527
  - in: path
1335
1528
  name: task_type_id
1336
- required: True
1337
- type: string
1529
+ required: true
1530
+ schema:
1531
+ type: string
1338
1532
  format: uuid
1339
1533
  example: a24a6ea4-ce75-4665-a070-57453082c25
1340
1534
  responses:
@@ -1368,8 +1562,9 @@ class DeleteTasksResource(Resource):
1368
1562
  parameters:
1369
1563
  - in: path
1370
1564
  name: project_id
1371
- required: True
1372
- type: string
1565
+ required: true
1566
+ schema:
1567
+ type: string
1373
1568
  format: uuid
1374
1569
  example: a24a6ea4-ce75-4665-a070-57453082c25
1375
1570
  responses:
@@ -1402,8 +1597,9 @@ class ProjectSubscriptionsResource(Resource):
1402
1597
  parameters:
1403
1598
  - in: path
1404
1599
  name: project_id
1405
- required: True
1406
- type: string
1600
+ required: true
1601
+ schema:
1602
+ type: string
1407
1603
  format: uuid
1408
1604
  example: a24a6ea4-ce75-4665-a070-57453082c25
1409
1605
  responses:
@@ -1432,8 +1628,9 @@ class ProjectNotificationsResource(Resource, ArgsMixin):
1432
1628
  parameters:
1433
1629
  - in: path
1434
1630
  name: project_id
1435
- required: True
1436
- type: string
1631
+ required: true
1632
+ schema:
1633
+ type: string
1437
1634
  format: uuid
1438
1635
  example: a24a6ea4-ce75-4665-a070-57453082c25
1439
1636
  responses:
@@ -1464,8 +1661,9 @@ class ProjectTasksResource(Resource, ArgsMixin):
1464
1661
  parameters:
1465
1662
  - in: path
1466
1663
  name: project_id
1467
- required: True
1468
- type: string
1664
+ required: true
1665
+ schema:
1666
+ type: string
1469
1667
  format: uuid
1470
1668
  example: a24a6ea4-ce75-4665-a070-57453082c25
1471
1669
  - in: query
@@ -1515,8 +1713,9 @@ class ProjectCommentsResource(Resource, ArgsMixin):
1515
1713
  parameters:
1516
1714
  - in: path
1517
1715
  name: project_id
1518
- required: True
1519
- type: string
1716
+ required: true
1717
+ schema:
1718
+ type: string
1520
1719
  format: uuid
1521
1720
  example: a24a6ea4-ce75-4665-a070-57453082c25
1522
1721
  - in: query
@@ -1556,8 +1755,9 @@ class ProjectPreviewFilesResource(Resource, ArgsMixin):
1556
1755
  parameters:
1557
1756
  - in: path
1558
1757
  name: project_id
1559
- required: True
1560
- type: string
1758
+ required: true
1759
+ schema:
1760
+ type: string
1561
1761
  format: uuid
1562
1762
  example: a24a6ea4-ce75-4665-a070-57453082c25
1563
1763
  responses:
@@ -1582,8 +1782,9 @@ class SetTaskMainPreviewResource(Resource):
1582
1782
  parameters:
1583
1783
  - in: path
1584
1784
  name: preview_file_id
1585
- required: True
1586
- type: string
1785
+ required: true
1786
+ schema:
1787
+ type: string
1587
1788
  format: uuid
1588
1789
  example: a24a6ea4-ce75-4665-a070-57453082c25
1589
1790
  responses:
@@ -1614,15 +1815,35 @@ class PersonsTasksDatesResource(Resource, ArgsMixin):
1614
1815
  tags:
1615
1816
  - Tasks
1616
1817
  parameters:
1617
- - in: path
1818
+ - in: query
1618
1819
  name: project_id
1619
- required: True
1620
- type: string
1621
- format: uuid
1820
+ required: false
1821
+ schema:
1822
+ type: string
1823
+ format: uuid
1622
1824
  example: a24a6ea4-ce75-4665-a070-57453082c25
1825
+ description: Filter by project ID
1623
1826
  responses:
1624
1827
  200:
1625
- description: For each person, the first start date of all tasks of assigned to this person and the last end date.
1828
+ description: For each person, the first start date of all tasks assigned to this person and the last end date
1829
+ content:
1830
+ application/json:
1831
+ schema:
1832
+ type: array
1833
+ items:
1834
+ type: object
1835
+ properties:
1836
+ person_id:
1837
+ type: string
1838
+ format: uuid
1839
+ first_start_date:
1840
+ type: string
1841
+ format: date
1842
+ last_end_date:
1843
+ type: string
1844
+ format: date
1845
+ 403:
1846
+ description: Admin permissions required
1626
1847
  """
1627
1848
  permissions.check_admin_permissions()
1628
1849
  args = self.get_args([("project_id", None, False, str)])
@@ -1646,90 +1867,115 @@ class OpenTasksResource(Resource, ArgsMixin):
1646
1867
  parameters:
1647
1868
  - in: query
1648
1869
  name: project_id
1649
- description: Filter tasks on given project ID
1650
- type: string
1651
- format: uuid
1870
+ required: false
1871
+ schema:
1872
+ type: string
1873
+ format: uuid
1652
1874
  example: a24a6ea4-ce75-4665-a070-57453082c25
1875
+ description: Filter tasks on given project ID
1653
1876
  - in: query
1654
1877
  name: task_status_id
1655
- description: Filter tasks on given task status ID
1656
- type: string
1657
- format: uuid
1878
+ required: false
1879
+ schema:
1880
+ type: string
1881
+ format: uuid
1658
1882
  example: a24a6ea4-ce75-4665-a070-57453082c25
1883
+ description: Filter tasks on given task status ID
1659
1884
  - in: query
1660
1885
  name: task_type_id
1661
- description: Filter tasks on given task type ID ID
1662
- type: string
1663
- format: uuid
1886
+ required: false
1887
+ schema:
1888
+ type: string
1889
+ format: uuid
1664
1890
  example: a24a6ea4-ce75-4665-a070-57453082c25
1891
+ description: Filter tasks on given task type ID
1665
1892
  - in: query
1666
1893
  name: person_id
1667
- description: Filter tasks on given person ID
1668
- type: string
1669
- format: uuid
1894
+ required: false
1895
+ schema:
1896
+ type: string
1897
+ format: uuid
1670
1898
  example: a24a6ea4-ce75-4665-a070-57453082c25
1899
+ description: Filter tasks on given person ID
1671
1900
  - in: query
1672
1901
  name: start_date
1673
- description: Filter tasks posterior to given start date
1674
- type: string
1675
- format: date
1902
+ required: false
1903
+ schema:
1904
+ type: string
1905
+ format: date
1676
1906
  example: "2022-07-12"
1907
+ description: Filter tasks posterior to given start date
1677
1908
  - in: query
1678
1909
  name: due_date
1679
- description: Filter tasks anterior to given due date
1680
- type: string
1681
- format: date
1910
+ required: false
1911
+ schema:
1912
+ type: string
1913
+ format: date
1682
1914
  example: "2022-07-12"
1915
+ description: Filter tasks anterior to given due date
1683
1916
  - in: query
1684
1917
  name: priority
1918
+ required: false
1919
+ schema:
1920
+ type: integer
1921
+ example: 3
1685
1922
  description: Filter tasks on given priority
1686
- type: integer
1687
- example: "3"
1688
1923
  - in: query
1689
1924
  name: page
1690
- description: Page number
1691
- type: integer
1925
+ required: false
1926
+ schema:
1927
+ type: integer
1928
+ default: 1
1692
1929
  example: 1
1693
- default: 1
1930
+ description: Page number
1694
1931
  - in: query
1695
1932
  name: limit
1696
- description: Number of tasks per page
1697
- type: integer
1933
+ required: false
1934
+ schema:
1935
+ type: integer
1936
+ default: 100
1698
1937
  example: 100
1699
- default: 100
1938
+ description: Number of tasks per page
1700
1939
 
1701
1940
  responses:
1702
1941
  200:
1703
- schema:
1942
+ description: List of tasks with pagination and statistics
1943
+ content:
1944
+ application/json:
1945
+ schema:
1704
1946
  type: object
1705
1947
  properties:
1706
- data:
1707
- type: array
1708
- description: List of tasks
1709
- stats:
1710
- type: object
1711
- properties:
1712
- total:
1713
- type: integer
1714
- description: Total number of tasks
1715
- total_duration:
1716
- type: integer
1717
- description: Total duration of tasks in minutes
1718
- total_estimation:
1719
- type: integer
1720
- description: Total estimation of tasks in minutes
1721
- status:
1722
- type: object
1723
- description: Number of tasks per status
1724
- limit:
1948
+ data:
1949
+ type: array
1950
+ items:
1951
+ type: object
1952
+ description: List of tasks
1953
+ stats:
1954
+ type: object
1955
+ properties:
1956
+ total:
1957
+ type: integer
1958
+ description: Total number of tasks
1959
+ total_duration:
1725
1960
  type: integer
1726
- description: Number of tasks per page
1727
- page:
1961
+ description: Total duration of tasks in minutes
1962
+ total_estimation:
1728
1963
  type: integer
1729
- description: Page number
1730
- is_more:
1731
- type: boolean
1732
- description: True if there are more tasks to retrieve
1964
+ description: Total estimation of tasks in minutes
1965
+ status:
1966
+ type: object
1967
+ description: Number of tasks per status
1968
+ limit:
1969
+ type: integer
1970
+ description: Number of tasks per page
1971
+ page:
1972
+ type: integer
1973
+ description: Page number
1974
+ is_more:
1975
+ type: boolean
1976
+ description: True if there are more tasks to retrieve
1977
+ 400:
1978
+ description: Bad request
1733
1979
  """
1734
1980
  args = self.get_args(
1735
1981
  [
@@ -1775,7 +2021,28 @@ class OpenTasksStatsResource(Resource, ArgsMixin):
1775
2021
  - Tasks
1776
2022
  responses:
1777
2023
  200:
1778
- description: A dict organized by project that contains
1779
- the results for each task type and status pairs.
2024
+ description: A dict organized by project that contains the results for each task type and status pairs
2025
+ content:
2026
+ application/json:
2027
+ schema:
2028
+ type: object
2029
+ additionalProperties:
2030
+ type: object
2031
+ properties:
2032
+ task_types:
2033
+ type: object
2034
+ additionalProperties:
2035
+ type: object
2036
+ properties:
2037
+ total:
2038
+ type: integer
2039
+ done:
2040
+ type: integer
2041
+ estimation:
2042
+ type: integer
2043
+ duration:
2044
+ type: integer
2045
+ 400:
2046
+ description: Bad request
1780
2047
  """
1781
2048
  return tasks_service.get_open_tasks_stats()