zou 0.20.83__py3-none-any.whl → 0.20.85__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.
Files changed (103) hide show
  1. zou/__init__.py +1 -1
  2. zou/app/blueprints/comments/resources.py +32 -35
  3. zou/app/blueprints/concepts/resources.py +23 -8
  4. zou/app/blueprints/crud/asset_instance.py +272 -0
  5. zou/app/blueprints/crud/attachment_file.py +263 -0
  6. zou/app/blueprints/crud/base.py +176 -69
  7. zou/app/blueprints/crud/budget.py +278 -0
  8. zou/app/blueprints/crud/budget_entry.py +269 -0
  9. zou/app/blueprints/crud/chat.py +282 -0
  10. zou/app/blueprints/crud/chat_message.py +286 -0
  11. zou/app/blueprints/crud/comments.py +312 -1
  12. zou/app/blueprints/crud/custom_action.py +268 -0
  13. zou/app/blueprints/crud/day_off.py +298 -0
  14. zou/app/blueprints/crud/department.py +268 -0
  15. zou/app/blueprints/crud/entity.py +297 -3
  16. zou/app/blueprints/crud/entity_link.py +303 -0
  17. zou/app/blueprints/crud/entity_type.py +269 -0
  18. zou/app/blueprints/crud/event.py +197 -0
  19. zou/app/blueprints/crud/file_status.py +268 -0
  20. zou/app/blueprints/crud/hardware_item.py +268 -0
  21. zou/app/blueprints/crud/metadata_descriptor.py +312 -0
  22. zou/app/blueprints/crud/milestone.py +302 -1
  23. zou/app/blueprints/crud/news.py +285 -0
  24. zou/app/blueprints/crud/notification.py +287 -0
  25. zou/app/blueprints/crud/organisation.py +269 -0
  26. zou/app/blueprints/crud/output_file.py +34 -10
  27. zou/app/blueprints/crud/output_type.py +30 -10
  28. zou/app/blueprints/crud/person.py +407 -2
  29. zou/app/blueprints/crud/playlist.py +322 -4
  30. zou/app/blueprints/crud/plugin.py +269 -0
  31. zou/app/blueprints/crud/preview_background_file.py +272 -0
  32. zou/app/blueprints/crud/preview_file.py +280 -9
  33. zou/app/blueprints/crud/production_schedule_version.py +569 -0
  34. zou/app/blueprints/crud/project.py +440 -0
  35. zou/app/blueprints/crud/project_status.py +268 -0
  36. zou/app/blueprints/crud/salary_scale.py +185 -5
  37. zou/app/blueprints/crud/schedule_item.py +305 -0
  38. zou/app/blueprints/crud/search_filter.py +302 -0
  39. zou/app/blueprints/crud/search_filter_group.py +270 -0
  40. zou/app/blueprints/crud/software.py +30 -10
  41. zou/app/blueprints/crud/status_automation.py +296 -2
  42. zou/app/blueprints/crud/studio.py +268 -0
  43. zou/app/blueprints/crud/subscription.py +279 -0
  44. zou/app/blueprints/crud/task.py +325 -5
  45. zou/app/blueprints/crud/task_status.py +301 -0
  46. zou/app/blueprints/crud/task_type.py +283 -0
  47. zou/app/blueprints/crud/time_spent.py +327 -0
  48. zou/app/blueprints/crud/working_file.py +273 -10
  49. zou/app/blueprints/export/csv/assets.py +15 -5
  50. zou/app/blueprints/export/csv/base.py +12 -3
  51. zou/app/blueprints/export/csv/casting.py +32 -5
  52. zou/app/blueprints/export/csv/edits.py +15 -5
  53. zou/app/blueprints/export/csv/persons.py +24 -0
  54. zou/app/blueprints/export/csv/playlists.py +16 -5
  55. zou/app/blueprints/export/csv/projects.py +23 -0
  56. zou/app/blueprints/export/csv/shots.py +15 -5
  57. zou/app/blueprints/export/csv/task_types.py +23 -0
  58. zou/app/blueprints/export/csv/tasks.py +24 -0
  59. zou/app/blueprints/export/csv/time_spents.py +24 -0
  60. zou/app/blueprints/files/resources.py +928 -377
  61. zou/app/blueprints/news/resources.py +7 -5
  62. zou/app/blueprints/persons/resources.py +644 -271
  63. zou/app/blueprints/playlists/resources.py +154 -72
  64. zou/app/blueprints/previews/resources.py +473 -228
  65. zou/app/blueprints/projects/__init__.py +5 -0
  66. zou/app/blueprints/projects/resources.py +987 -420
  67. zou/app/blueprints/search/resources.py +44 -32
  68. zou/app/blueprints/shots/resources.py +1338 -88
  69. zou/app/blueprints/source/csv/assets.py +44 -6
  70. zou/app/blueprints/source/csv/casting.py +43 -6
  71. zou/app/blueprints/source/csv/edits.py +47 -9
  72. zou/app/blueprints/source/csv/persons.py +43 -4
  73. zou/app/blueprints/source/csv/shots.py +47 -6
  74. zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
  75. zou/app/blueprints/source/kitsu.py +433 -11
  76. zou/app/blueprints/source/otio.py +215 -20
  77. zou/app/blueprints/source/shotgun/assets.py +146 -0
  78. zou/app/blueprints/source/shotgun/base.py +85 -14
  79. zou/app/blueprints/source/shotgun/episode.py +124 -0
  80. zou/app/blueprints/source/shotgun/import_errors.py +105 -14
  81. zou/app/blueprints/source/shotgun/notes.py +132 -0
  82. zou/app/blueprints/source/shotgun/person.py +163 -0
  83. zou/app/blueprints/source/shotgun/project.py +120 -0
  84. zou/app/blueprints/source/shotgun/scene.py +120 -0
  85. zou/app/blueprints/source/shotgun/sequence.py +134 -0
  86. zou/app/blueprints/source/shotgun/shot.py +166 -0
  87. zou/app/blueprints/source/shotgun/status.py +129 -0
  88. zou/app/blueprints/source/shotgun/steps.py +138 -0
  89. zou/app/blueprints/source/shotgun/tasks.py +199 -0
  90. zou/app/blueprints/source/shotgun/team.py +132 -0
  91. zou/app/blueprints/source/shotgun/versions.py +155 -0
  92. zou/app/blueprints/tasks/resources.py +1197 -308
  93. zou/app/models/metadata_descriptor.py +1 -0
  94. zou/app/services/persons_service.py +1 -1
  95. zou/app/services/projects_service.py +45 -1
  96. zou/app/services/time_spents_service.py +1 -1
  97. zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
  98. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/METADATA +18 -18
  99. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/RECORD +103 -102
  100. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/WHEEL +0 -0
  101. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/entry_points.txt +0 -0
  102. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/licenses/LICENSE +0 -0
  103. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/top_level.txt +0 -0
@@ -30,13 +30,22 @@ class OpenProjectsResource(Resource, ArgsMixin):
30
30
  @jwt_required()
31
31
  def get(self):
32
32
  """
33
- Return the list of projects currently running.
33
+ Get open projects
34
34
  ---
35
+ description: Return the list of projects currently running. Most of the
36
+ time, past projects are not needed.
35
37
  tags:
36
38
  - Projects
37
- description: Most of the time, past projects are not needed.
39
+ parameters:
40
+ - in: query
41
+ name: name
42
+ required: false
43
+ schema:
44
+ type: string
45
+ description: Filter projects by name
46
+ example: "My Project"
38
47
  responses:
39
- '200':
48
+ 200:
40
49
  description: All running projects
41
50
  content:
42
51
  application/json:
@@ -48,11 +57,17 @@ class OpenProjectsResource(Resource, ArgsMixin):
48
57
  id:
49
58
  type: string
50
59
  format: uuid
60
+ description: Project unique identifier
61
+ example: a24a6ea4-ce75-4665-a070-57453082c25
51
62
  name:
52
63
  type: string
64
+ description: Project name
65
+ example: "My Project"
53
66
  project_status_id:
54
67
  type: string
55
68
  format: uuid
69
+ description: Project status unique identifier
70
+ example: b35b7fb5-df86-5776-b181-68564193d36
56
71
  """
57
72
  name = self.get_text_parameter("name")
58
73
  if permissions.has_admin_permissions():
@@ -70,13 +85,22 @@ class AllProjectsResource(Resource, ArgsMixin):
70
85
  @jwt_required()
71
86
  def get(self):
72
87
  """
73
- Return all projects listed in database.
88
+ Get all projects
74
89
  ---
90
+ description: Return all projects listed in database. Ensure that user has
91
+ at least the manager level before that.
75
92
  tags:
76
93
  - Projects
77
- description: Ensure that user has at least the manager level before that.
94
+ parameters:
95
+ - in: query
96
+ name: name
97
+ required: false
98
+ schema:
99
+ type: string
100
+ description: Filter projects by name
101
+ example: "My Project"
78
102
  responses:
79
- '200':
103
+ 200:
80
104
  description: All projects listed in database
81
105
  content:
82
106
  application/json:
@@ -88,11 +112,17 @@ class AllProjectsResource(Resource, ArgsMixin):
88
112
  id:
89
113
  type: string
90
114
  format: uuid
115
+ description: Project unique identifier
116
+ example: a24a6ea4-ce75-4665-a070-57453082c25
91
117
  name:
92
118
  type: string
119
+ description: Project name
120
+ example: "My Project"
93
121
  project_status_id:
94
122
  type: string
95
123
  format: uuid
124
+ description: Project status unique identifier
125
+ example: b35b7fb5-df86-5776-b181-68564193d36
96
126
  """
97
127
  name = self.get_text_parameter("name")
98
128
  try:
@@ -117,8 +147,9 @@ class ProductionTeamResource(Resource, ArgsMixin):
117
147
  @jwt_required()
118
148
  def get(self, project_id):
119
149
  """
120
- Return the people listed in a production team.
150
+ Get production team
121
151
  ---
152
+ description: Return the people listed in a production team.
122
153
  tags:
123
154
  - Projects
124
155
  parameters:
@@ -128,9 +159,10 @@ class ProductionTeamResource(Resource, ArgsMixin):
128
159
  schema:
129
160
  type: string
130
161
  format: uuid
162
+ description: Project unique identifier
131
163
  example: a24a6ea4-ce75-4665-a070-57453082c25
132
164
  responses:
133
- '200':
165
+ 200:
134
166
  description: People listed in a production team
135
167
  content:
136
168
  application/json:
@@ -142,14 +174,20 @@ class ProductionTeamResource(Resource, ArgsMixin):
142
174
  id:
143
175
  type: string
144
176
  format: uuid
177
+ description: Person unique identifier
178
+ example: a24a6ea4-ce75-4665-a070-57453082c25
145
179
  first_name:
146
180
  type: string
181
+ description: Person first name
182
+ example: "John"
147
183
  last_name:
148
184
  type: string
185
+ description: Person last name
186
+ example: "Doe"
149
187
  email:
150
188
  type: string
151
- '404':
152
- description: Project not found
189
+ description: Person email address
190
+ example: "john.doe@example.com"
153
191
  """
154
192
  user_service.check_project_access(project_id)
155
193
  project = projects_service.get_project_raw(project_id)
@@ -164,8 +202,9 @@ class ProductionTeamResource(Resource, ArgsMixin):
164
202
  @jwt_required()
165
203
  def post(self, project_id):
166
204
  """
167
- Add a person to a production team.
205
+ Add person to production team
168
206
  ---
207
+ description: Add a person to a production team.
169
208
  tags:
170
209
  - Projects
171
210
  parameters:
@@ -175,11 +214,12 @@ class ProductionTeamResource(Resource, ArgsMixin):
175
214
  schema:
176
215
  type: string
177
216
  format: uuid
217
+ description: Project unique identifier
178
218
  example: a24a6ea4-ce75-4665-a070-57453082c25
179
219
  requestBody:
180
220
  required: true
181
221
  content:
182
- application/x-www-form-urlencoded:
222
+ application/json:
183
223
  schema:
184
224
  type: object
185
225
  required:
@@ -188,9 +228,10 @@ class ProductionTeamResource(Resource, ArgsMixin):
188
228
  person_id:
189
229
  type: string
190
230
  format: uuid
191
- example: a24a6ea4-ce75-4665-a070-57453082c25
231
+ description: Person unique identifier
232
+ example: b35b7fb5-df86-5776-b181-68564193d36
192
233
  responses:
193
- '201':
234
+ 201:
194
235
  description: Person added to the production team
195
236
  content:
196
237
  application/json:
@@ -200,12 +241,14 @@ class ProductionTeamResource(Resource, ArgsMixin):
200
241
  id:
201
242
  type: string
202
243
  format: uuid
244
+ description: Project unique identifier
245
+ example: a24a6ea4-ce75-4665-a070-57453082c25
203
246
  name:
204
247
  type: string
205
- '400':
248
+ description: Project name
249
+ example: "My Project"
250
+ 400:
206
251
  description: Invalid parameters
207
- '404':
208
- description: Project or person not found
209
252
  """
210
253
  args = self.get_args([("person_id", "", True)])
211
254
 
@@ -217,35 +260,35 @@ class ProductionTeamResource(Resource, ArgsMixin):
217
260
 
218
261
 
219
262
  class ProductionTeamRemoveResource(Resource):
220
- """
221
- Allow to remove people listed in a production team.
222
- """
223
263
 
224
264
  @jwt_required()
225
265
  def delete(self, project_id, person_id):
226
266
  """
227
- Remove people listed in a production team.
267
+ Remove person from production team
228
268
  ---
269
+ description: Remove people listed in a production team.
229
270
  tags:
230
271
  - Projects
231
272
  parameters:
232
273
  - in: path
233
274
  name: project_id
234
275
  required: true
235
- type: string
236
- format: uuid
276
+ schema:
277
+ type: string
278
+ format: uuid
279
+ description: Project unique identifier
237
280
  example: a24a6ea4-ce75-4665-a070-57453082c25
238
281
  - in: path
239
282
  name: person_id
240
283
  required: true
241
- type: string
242
- format: uuid
243
- example: a24a6ea4-ce75-4665-a070-57453082c25
284
+ schema:
285
+ type: string
286
+ format: uuid
287
+ description: Person unique identifier
288
+ example: b35b7fb5-df86-5776-b181-68564193d36
244
289
  responses:
245
- 204:
246
- description: Person removed from production team
247
- 404:
248
- description: Project or person not found
290
+ 204:
291
+ description: Person removed from production team
249
292
  """
250
293
  user_service.check_manager_project_access(project_id)
251
294
  projects_service.remove_team_member(project_id, person_id)
@@ -260,8 +303,9 @@ class ProductionAssetTypeResource(Resource, ArgsMixin):
260
303
  @jwt_required()
261
304
  def post(self, project_id):
262
305
  """
263
- Add an asset type linked to a production.
306
+ Add asset type to production
264
307
  ---
308
+ description: Add an asset type linked to a production.
265
309
  tags:
266
310
  - Projects
267
311
  parameters:
@@ -271,11 +315,12 @@ class ProductionAssetTypeResource(Resource, ArgsMixin):
271
315
  schema:
272
316
  type: string
273
317
  format: uuid
318
+ description: Project unique identifier
274
319
  example: a24a6ea4-ce75-4665-a070-57453082c25
275
320
  requestBody:
276
321
  required: true
277
322
  content:
278
- application/x-www-form-urlencoded:
323
+ application/json:
279
324
  schema:
280
325
  type: object
281
326
  required:
@@ -284,9 +329,10 @@ class ProductionAssetTypeResource(Resource, ArgsMixin):
284
329
  asset_type_id:
285
330
  type: string
286
331
  format: uuid
287
- example: a24a6ea4-ce75-4665-a070-57453082c25
332
+ description: Asset type unique identifier
333
+ example: b35b7fb5-df86-5776-b181-68564193d36
288
334
  responses:
289
- '201':
335
+ 201:
290
336
  description: Asset type added to production
291
337
  content:
292
338
  application/json:
@@ -296,12 +342,14 @@ class ProductionAssetTypeResource(Resource, ArgsMixin):
296
342
  id:
297
343
  type: string
298
344
  format: uuid
345
+ description: Project unique identifier
346
+ example: a24a6ea4-ce75-4665-a070-57453082c25
299
347
  name:
300
348
  type: string
301
- '400':
349
+ description: Project name
350
+ example: "My Project"
351
+ 400:
302
352
  description: Invalid parameters
303
- '404':
304
- description: Project or asset type not found
305
353
  """
306
354
  args = self.get_args([("asset_type_id", "", True)])
307
355
 
@@ -313,33 +361,35 @@ class ProductionAssetTypeResource(Resource, ArgsMixin):
313
361
 
314
362
 
315
363
  class ProductionAssetTypeRemoveResource(Resource):
316
- """
317
- Allow to remove an asset type linked to a production.
318
- """
319
364
 
320
365
  @jwt_required()
321
366
  def delete(self, project_id, asset_type_id):
322
367
  """
323
- Remove an asset type from a production.
368
+ Remove asset type from production
324
369
  ---
370
+ description: Remove an asset type from a production.
325
371
  tags:
326
372
  - Projects
327
373
  parameters:
328
374
  - in: path
329
375
  name: project_id
330
376
  required: true
331
- type: string
332
- format: uuid
377
+ schema:
378
+ type: string
379
+ format: uuid
380
+ description: Project unique identifier
333
381
  example: a24a6ea4-ce75-4665-a070-57453082c25
334
382
  - in: path
335
383
  name: asset_type_id
336
384
  required: true
337
- type: string
338
- format: uuid
339
- example: a24a6ea4-ce75-4665-a070-57453082c25
385
+ schema:
386
+ type: string
387
+ format: uuid
388
+ description: Asset type unique identifier
389
+ example: b35b7fb5-df86-5776-b181-68564193d36
340
390
  responses:
341
- 204:
342
- description: Empty response
391
+ 204:
392
+ description: Asset type removed from production
343
393
  """
344
394
  user_service.check_manager_project_access(project_id)
345
395
  projects_service.remove_asset_type_setting(project_id, asset_type_id)
@@ -354,20 +404,29 @@ class ProductionTaskTypesResource(Resource, ArgsMixin):
354
404
  @jwt_required()
355
405
  def get(self, project_id):
356
406
  """
357
- Retrieve task types linked to the production
407
+ Get production task types
358
408
  ---
409
+ description: Retrieve task types linked to the production.
359
410
  tags:
360
411
  - Projects
361
412
  parameters:
362
413
  - in: path
363
414
  name: project_id
364
415
  required: true
365
- type: string
366
- format: uuid
416
+ schema:
417
+ type: string
418
+ format: uuid
419
+ description: Project unique identifier
367
420
  example: a24a6ea4-ce75-4665-a070-57453082c25
368
421
  responses:
369
- 200:
370
- description: Task types linked to the production
422
+ 200:
423
+ description: Task types linked to the production
424
+ content:
425
+ application/json:
426
+ schema:
427
+ type: array
428
+ items:
429
+ type: object
371
430
  """
372
431
  user_service.check_project_access(project_id)
373
432
  return projects_service.get_project_task_types(project_id)
@@ -381,8 +440,9 @@ class ProductionTaskTypeResource(Resource, ArgsMixin):
381
440
  @jwt_required()
382
441
  def post(self, project_id):
383
442
  """
384
- Add a task type linked to a production.
443
+ Add task type to production
385
444
  ---
445
+ description: Add a task type linked to a production.
386
446
  tags:
387
447
  - Projects
388
448
  parameters:
@@ -392,11 +452,12 @@ class ProductionTaskTypeResource(Resource, ArgsMixin):
392
452
  schema:
393
453
  type: string
394
454
  format: uuid
455
+ description: Project unique identifier
395
456
  example: a24a6ea4-ce75-4665-a070-57453082c25
396
457
  requestBody:
397
458
  required: true
398
459
  content:
399
- application/x-www-form-urlencoded:
460
+ application/json:
400
461
  schema:
401
462
  type: object
402
463
  required:
@@ -405,12 +466,14 @@ class ProductionTaskTypeResource(Resource, ArgsMixin):
405
466
  task_type_id:
406
467
  type: string
407
468
  format: uuid
408
- example: a24a6ea4-ce75-4665-a070-57453082c25
469
+ description: Task type unique identifier
470
+ example: b35b7fb5-df86-5776-b181-68564193d36
409
471
  priority:
410
472
  type: string
411
- default: "None"
473
+ description: Task type priority
474
+ example: "None"
412
475
  responses:
413
- '201':
476
+ 201:
414
477
  description: Task type added to production
415
478
  content:
416
479
  application/json:
@@ -420,12 +483,14 @@ class ProductionTaskTypeResource(Resource, ArgsMixin):
420
483
  id:
421
484
  type: string
422
485
  format: uuid
486
+ description: Project unique identifier
487
+ example: a24a6ea4-ce75-4665-a070-57453082c25
423
488
  name:
424
489
  type: string
425
- '400':
490
+ description: Project name
491
+ example: "My Project"
492
+ 400:
426
493
  description: Invalid parameters
427
- '404':
428
- description: Project or task type not found
429
494
  """
430
495
  args = self.get_args(
431
496
  [("task_type_id", "", True), ("priority", None, False)]
@@ -446,26 +511,31 @@ class ProductionTaskTypeRemoveResource(Resource):
446
511
  @jwt_required()
447
512
  def delete(self, project_id, task_type_id):
448
513
  """
449
- Remove a task type from a production.
514
+ Remove task type from production
450
515
  ---
516
+ description: Remove a task type from a production.
451
517
  tags:
452
518
  - Projects
453
519
  parameters:
454
520
  - in: path
455
521
  name: project_id
456
522
  required: true
457
- type: string
458
- format: uuid
523
+ schema:
524
+ type: string
525
+ format: uuid
526
+ description: Project unique identifier
459
527
  example: a24a6ea4-ce75-4665-a070-57453082c25
460
528
  - in: path
461
529
  name: task_type_id
462
530
  required: true
463
- type: string
464
- format: uuid
465
- example: a24a6ea4-ce75-4665-a070-57453082c25
531
+ schema:
532
+ type: string
533
+ format: uuid
534
+ description: Task type unique identifier
535
+ example: b35b7fb5-df86-5776-b181-68564193d36
466
536
  responses:
467
- 204:
468
- description: Empty response
537
+ 204:
538
+ description: Task type removed from production
469
539
  """
470
540
  user_service.check_manager_project_access(project_id)
471
541
  projects_service.remove_task_type_setting(project_id, task_type_id)
@@ -480,20 +550,29 @@ class ProductionTaskStatusResource(Resource, ArgsMixin):
480
550
  @jwt_required()
481
551
  def get(self, project_id):
482
552
  """
483
- Return task statuses linked to a production
553
+ Get production task statuses
484
554
  ---
555
+ description: Return task statuses linked to a production.
485
556
  tags:
486
557
  - Projects
487
558
  parameters:
488
559
  - in: path
489
560
  name: project_id
490
561
  required: true
491
- type: string
492
- format: uuid
562
+ schema:
563
+ type: string
564
+ format: uuid
565
+ description: Project unique identifier
493
566
  example: a24a6ea4-ce75-4665-a070-57453082c25
494
567
  responses:
495
- 200:
496
- description: Task statuses linked to production
568
+ 200:
569
+ description: Task statuses linked to production
570
+ content:
571
+ application/json:
572
+ schema:
573
+ type: array
574
+ items:
575
+ type: object
497
576
  """
498
577
  user_service.check_project_access(project_id)
499
578
  return projects_service.get_project_task_statuses(project_id)
@@ -501,8 +580,9 @@ class ProductionTaskStatusResource(Resource, ArgsMixin):
501
580
  @jwt_required()
502
581
  def post(self, project_id):
503
582
  """
504
- Add a task status linked to a production.
583
+ Add task status to production
505
584
  ---
585
+ description: Add a task status linked to a production.
506
586
  tags:
507
587
  - Projects
508
588
  parameters:
@@ -512,11 +592,12 @@ class ProductionTaskStatusResource(Resource, ArgsMixin):
512
592
  schema:
513
593
  type: string
514
594
  format: uuid
595
+ description: Project unique identifier
515
596
  example: a24a6ea4-ce75-4665-a070-57453082c25
516
597
  requestBody:
517
598
  required: true
518
599
  content:
519
- application/x-www-form-urlencoded:
600
+ application/json:
520
601
  schema:
521
602
  type: object
522
603
  required:
@@ -525,9 +606,10 @@ class ProductionTaskStatusResource(Resource, ArgsMixin):
525
606
  task_status_id:
526
607
  type: string
527
608
  format: uuid
528
- example: a24a6ea4-ce75-4665-a070-57453082c25
609
+ description: Task status unique identifier
610
+ example: b35b7fb5-df86-5776-b181-68564193d36
529
611
  responses:
530
- '201':
612
+ 201:
531
613
  description: Task status added to production
532
614
  content:
533
615
  application/json:
@@ -537,12 +619,14 @@ class ProductionTaskStatusResource(Resource, ArgsMixin):
537
619
  id:
538
620
  type: string
539
621
  format: uuid
622
+ description: Project unique identifier
623
+ example: a24a6ea4-ce75-4665-a070-57453082c25
540
624
  name:
541
625
  type: string
542
- '400':
626
+ description: Project name
627
+ example: "My Project"
628
+ 400:
543
629
  description: Invalid parameters
544
- '404':
545
- description: Project or task status not found
546
630
  """
547
631
  args = self.get_args([("task_status_id", "", True)])
548
632
 
@@ -561,26 +645,31 @@ class ProductionTaskStatusRemoveResource(Resource):
561
645
  @jwt_required()
562
646
  def delete(self, project_id, task_status_id):
563
647
  """
564
- Remove a task status from a production.
648
+ Remove task status from production
565
649
  ---
650
+ description: Remove a task status from a production.
566
651
  tags:
567
652
  - Projects
568
653
  parameters:
569
654
  - in: path
570
655
  name: project_id
571
656
  required: true
572
- type: string
573
- format: uuid
657
+ schema:
658
+ type: string
659
+ format: uuid
660
+ description: Project unique identifier
574
661
  example: a24a6ea4-ce75-4665-a070-57453082c25
575
662
  - in: path
576
663
  name: task_status_id
577
664
  required: true
578
- type: string
579
- format: uuid
580
- example: a24a6ea4-ce75-4665-a070-57453082c25
665
+ schema:
666
+ type: string
667
+ format: uuid
668
+ description: Task status unique identifier
669
+ example: b35b7fb5-df86-5776-b181-68564193d36
581
670
  responses:
582
- 204:
583
- description: Empty response
671
+ 204:
672
+ description: Task status removed from production
584
673
  """
585
674
  user_service.check_manager_project_access(project_id)
586
675
  projects_service.remove_task_status_setting(project_id, task_status_id)
@@ -595,20 +684,29 @@ class ProductionStatusAutomationResource(Resource, ArgsMixin):
595
684
  @jwt_required()
596
685
  def get(self, project_id):
597
686
  """
598
- Get a status automation linked to a production.
687
+ Get production status automations
599
688
  ---
689
+ description: Get status automations linked to a production.
600
690
  tags:
601
691
  - Projects
602
692
  parameters:
603
693
  - in: path
604
694
  name: project_id
605
695
  required: true
606
- type: string
607
- format: uuid
696
+ schema:
697
+ type: string
698
+ format: uuid
699
+ description: Project unique identifier
608
700
  example: a24a6ea4-ce75-4665-a070-57453082c25
609
701
  responses:
610
- 200:
611
- description: Status automation linked to production
702
+ 200:
703
+ description: Status automations linked to production
704
+ content:
705
+ application/json:
706
+ schema:
707
+ type: array
708
+ items:
709
+ type: object
612
710
  """
613
711
  user_service.check_manager_project_access(project_id)
614
712
  return projects_service.get_project_status_automations(project_id)
@@ -616,26 +714,51 @@ class ProductionStatusAutomationResource(Resource, ArgsMixin):
616
714
  @jwt_required()
617
715
  def post(self, project_id):
618
716
  """
619
- Add a status automation linked to a production.
717
+ Add status automation to production
620
718
  ---
719
+ description: Add a status automation linked to a production.
621
720
  tags:
622
721
  - Projects
623
722
  parameters:
624
723
  - in: path
625
724
  name: project_id
626
725
  required: true
627
- type: string
628
- format: uuid
629
- example: a24a6ea4-ce75-4665-a070-57453082c25
630
- - in: formData
631
- name: status_automation_id
632
- required: True
633
- type: string
634
- format: uuid
726
+ schema:
727
+ type: string
728
+ format: uuid
729
+ description: Project unique identifier
635
730
  example: a24a6ea4-ce75-4665-a070-57453082c25
731
+ requestBody:
732
+ required: true
733
+ content:
734
+ application/json:
735
+ schema:
736
+ type: object
737
+ required:
738
+ - status_automation_id
739
+ properties:
740
+ status_automation_id:
741
+ type: string
742
+ format: uuid
743
+ description: Status automation unique identifier
744
+ example: b35b7fb5-df86-5776-b181-68564193d36
636
745
  responses:
637
- 201:
638
- description: Status automation added to production
746
+ 201:
747
+ description: Status automation added to production
748
+ content:
749
+ application/json:
750
+ schema:
751
+ type: object
752
+ properties:
753
+ id:
754
+ type: string
755
+ format: uuid
756
+ description: Project unique identifier
757
+ example: a24a6ea4-ce75-4665-a070-57453082c25
758
+ name:
759
+ type: string
760
+ description: Project name
761
+ example: "My Project"
639
762
  """
640
763
  args = self.get_args([("status_automation_id", "", True)])
641
764
 
@@ -654,26 +777,31 @@ class ProductionStatusAutomationRemoveResource(Resource):
654
777
  @jwt_required()
655
778
  def delete(self, project_id, status_automation_id):
656
779
  """
657
- Remove a status automation from a production.
780
+ Remove status automation from production
658
781
  ---
782
+ description: Remove a status automation from a production.
659
783
  tags:
660
784
  - Projects
661
785
  parameters:
662
786
  - in: path
663
787
  name: project_id
664
788
  required: true
665
- type: string
666
- format: uuid
789
+ schema:
790
+ type: string
791
+ format: uuid
792
+ description: Project unique identifier
667
793
  example: a24a6ea4-ce75-4665-a070-57453082c25
668
794
  - in: path
669
795
  name: status_automation_id
670
796
  required: true
671
- type: string
672
- format: uuid
673
- example: a24a6ea4-ce75-4665-a070-57453082c25
797
+ schema:
798
+ type: string
799
+ format: uuid
800
+ description: Status automation unique identifier
801
+ example: b35b7fb5-df86-5776-b181-68564193d36
674
802
  responses:
675
- 204:
676
- description: Empty response
803
+ 204:
804
+ description: Status automation removed from production
677
805
  """
678
806
  user_service.check_manager_project_access(project_id)
679
807
  projects_service.remove_status_automation_setting(
@@ -690,20 +818,29 @@ class ProductionPreviewBackgroundFileResource(Resource, ArgsMixin):
690
818
  @jwt_required()
691
819
  def get(self, project_id):
692
820
  """
693
- Return preview background files linked to a production
821
+ Get production preview background files
694
822
  ---
823
+ description: Return preview background files linked to a production.
695
824
  tags:
696
825
  - Projects
697
826
  parameters:
698
827
  - in: path
699
828
  name: project_id
700
829
  required: true
701
- type: string
702
- format: uuid
830
+ schema:
831
+ type: string
832
+ format: uuid
833
+ description: Project unique identifier
703
834
  example: a24a6ea4-ce75-4665-a070-57453082c25
704
835
  responses:
705
- 200:
706
- description: Preview background files linked to production
836
+ 200:
837
+ description: Preview background files linked to production
838
+ content:
839
+ application/json:
840
+ schema:
841
+ type: array
842
+ items:
843
+ type: object
707
844
  """
708
845
  user_service.check_project_access(project_id)
709
846
  return projects_service.get_project_preview_background_files(
@@ -713,26 +850,51 @@ class ProductionPreviewBackgroundFileResource(Resource, ArgsMixin):
713
850
  @jwt_required()
714
851
  def post(self, project_id):
715
852
  """
716
- Add a preview background file linked to a production.
853
+ Add preview background file to production
717
854
  ---
855
+ description: Add a preview background file linked to a production.
718
856
  tags:
719
857
  - Projects
720
858
  parameters:
721
859
  - in: path
722
860
  name: project_id
723
861
  required: true
724
- type: string
725
- format: uuid
726
- example: a24a6ea4-ce75-4665-a070-57453082c25
727
- - in: formData
728
- name: preview_background_file_id
729
- required: True
730
- type: string
731
- format: uuid
862
+ schema:
863
+ type: string
864
+ format: uuid
865
+ description: Project unique identifier
732
866
  example: a24a6ea4-ce75-4665-a070-57453082c25
867
+ requestBody:
868
+ required: true
869
+ content:
870
+ application/json:
871
+ schema:
872
+ type: object
873
+ required:
874
+ - preview_background_file_id
875
+ properties:
876
+ preview_background_file_id:
877
+ type: string
878
+ format: uuid
879
+ description: Preview background file unique identifier
880
+ example: b35b7fb5-df86-5776-b181-68564193d36
733
881
  responses:
734
- 201:
735
- description: Preview background file added to production
882
+ 201:
883
+ description: Preview background file added to production
884
+ content:
885
+ application/json:
886
+ schema:
887
+ type: object
888
+ properties:
889
+ id:
890
+ type: string
891
+ format: uuid
892
+ description: Project unique identifier
893
+ example: a24a6ea4-ce75-4665-a070-57453082c25
894
+ name:
895
+ type: string
896
+ description: Project name
897
+ example: "My Project"
736
898
  """
737
899
  args = self.get_args([("preview_background_file_id", "", True)])
738
900
 
@@ -751,26 +913,31 @@ class ProductionPreviewBackgroundFileRemoveResource(Resource):
751
913
  @jwt_required()
752
914
  def delete(self, project_id, preview_background_file_id):
753
915
  """
754
- Remove a preview background file from a production.
916
+ Remove preview background file from production
755
917
  ---
918
+ description: Remove a preview background file from a production.
756
919
  tags:
757
920
  - Projects
758
921
  parameters:
759
922
  - in: path
760
923
  name: project_id
761
924
  required: true
762
- type: string
763
- format: uuid
925
+ schema:
926
+ type: string
927
+ format: uuid
928
+ description: Project unique identifier
764
929
  example: a24a6ea4-ce75-4665-a070-57453082c25
765
930
  - in: path
766
931
  name: preview_background_file_id
767
932
  required: true
768
- type: string
769
- format: uuid
770
- example: a24a6ea4-ce75-4665-a070-57453082c25
933
+ schema:
934
+ type: string
935
+ format: uuid
936
+ description: Preview background file unique identifier
937
+ example: b35b7fb5-df86-5776-b181-68564193d36
771
938
  responses:
772
- 204:
773
- description: Empty response
939
+ 204:
940
+ description: Preview background file removed from production
774
941
  """
775
942
  user_service.check_manager_project_access(project_id)
776
943
  projects_service.remove_preview_background_file_setting(
@@ -788,21 +955,30 @@ class ProductionMetadataDescriptorsResource(Resource, ArgsMixin):
788
955
  @jwt_required()
789
956
  def get(self, project_id):
790
957
  """
791
- Get all metadata descriptors
958
+ Get metadata descriptors
792
959
  ---
793
- description: It serves to describe extra fields listed in the data attribute of entities.
960
+ description: Get all metadata descriptors. It serves to describe extra
961
+ fields listed in the data attribute of entities.
794
962
  tags:
795
963
  - Projects
796
964
  parameters:
797
965
  - in: path
798
966
  name: project_id
799
967
  required: true
800
- type: string
801
- format: uuid
968
+ schema:
969
+ type: string
970
+ format: uuid
971
+ description: Project unique identifier
802
972
  example: a24a6ea4-ce75-4665-a070-57453082c25
803
973
  responses:
804
- 200:
805
- description: All metadata descriptors
974
+ 200:
975
+ description: All metadata descriptors
976
+ content:
977
+ application/json:
978
+ schema:
979
+ type: array
980
+ items:
981
+ type: object
806
982
  """
807
983
  user_service.check_project_access(project_id)
808
984
  for_client = permissions.has_client_permissions()
@@ -813,9 +989,10 @@ class ProductionMetadataDescriptorsResource(Resource, ArgsMixin):
813
989
  @jwt_required()
814
990
  def post(self, project_id):
815
991
  """
816
- Create a new metadata descriptor
992
+ Create metadata descriptor
817
993
  ---
818
- description: It serves to describe extra fields listed in the data attribute of entities.
994
+ description: Create a new metadata descriptor. It serves to describe
995
+ extra fields listed in the data attribute of entities.
819
996
  tags:
820
997
  - Projects
821
998
  parameters:
@@ -825,11 +1002,12 @@ class ProductionMetadataDescriptorsResource(Resource, ArgsMixin):
825
1002
  schema:
826
1003
  type: string
827
1004
  format: uuid
1005
+ description: Project unique identifier
828
1006
  example: a24a6ea4-ce75-4665-a070-57453082c25
829
1007
  requestBody:
830
1008
  required: true
831
1009
  content:
832
- application/x-www-form-urlencoded:
1010
+ application/json:
833
1011
  schema:
834
1012
  type: object
835
1013
  required:
@@ -838,30 +1016,37 @@ class ProductionMetadataDescriptorsResource(Resource, ArgsMixin):
838
1016
  properties:
839
1017
  entity_type:
840
1018
  type: string
841
- default: "Asset"
1019
+ description: Entity type for the metadata descriptor
842
1020
  enum: ["Asset", "Shot", "Edit", "Episode", "Sequence"]
1021
+ default: "Asset"
1022
+ example: "Asset"
843
1023
  name:
844
1024
  type: string
845
1025
  description: Name of the metadata descriptor
1026
+ example: "Custom Field"
846
1027
  data_type:
847
1028
  type: string
848
1029
  description: Type of data (string, number, boolean, etc.)
1030
+ example: "string"
849
1031
  for_client:
850
1032
  type: string
1033
+ description: Whether the descriptor is for client
851
1034
  default: "False"
852
1035
  example: "True"
853
1036
  choices:
854
1037
  type: array
1038
+ description: List of choices for the descriptor
855
1039
  items:
856
1040
  type: string
857
1041
  example: ["option1", "option2"]
858
1042
  departments:
859
1043
  type: array
1044
+ description: List of departments for the descriptor
860
1045
  items:
861
1046
  type: string
862
1047
  example: ["department1", "department2"]
863
1048
  responses:
864
- '201':
1049
+ 201:
865
1050
  description: Metadata descriptor created
866
1051
  content:
867
1052
  application/json:
@@ -871,14 +1056,18 @@ class ProductionMetadataDescriptorsResource(Resource, ArgsMixin):
871
1056
  id:
872
1057
  type: string
873
1058
  format: uuid
1059
+ description: Metadata descriptor unique identifier
1060
+ example: a24a6ea4-ce75-4665-a070-57453082c25
874
1061
  name:
875
1062
  type: string
1063
+ description: Metadata descriptor name
1064
+ example: "Custom Field"
876
1065
  data_type:
877
1066
  type: string
878
- '400':
1067
+ description: Metadata descriptor data type
1068
+ example: "string"
1069
+ 400:
879
1070
  description: Invalid parameters
880
- '404':
881
- description: Project not found
882
1071
  """
883
1072
  args = self.get_args(
884
1073
  [
@@ -938,27 +1127,36 @@ class ProductionMetadataDescriptorResource(Resource, ArgsMixin):
938
1127
  @jwt_required()
939
1128
  def get(self, project_id, descriptor_id):
940
1129
  """
941
- Get a metadata descriptor.
1130
+ Get metadata descriptor
942
1131
  ---
943
- description: Descriptors serve to describe extra fields listed in the data attribute of entities.
1132
+ description: Get a metadata descriptor. Descriptors serve to describe
1133
+ extra fields listed in the data attribute of entities.
944
1134
  tags:
945
1135
  - Projects
946
1136
  parameters:
947
1137
  - in: path
948
1138
  name: project_id
949
1139
  required: true
950
- type: string
951
- format: uuid
1140
+ schema:
1141
+ type: string
1142
+ format: uuid
1143
+ description: Project unique identifier
952
1144
  example: a24a6ea4-ce75-4665-a070-57453082c25
953
1145
  - in: path
954
1146
  name: descriptor_id
955
1147
  required: true
956
- type: string
957
- format: uuid
958
- example: a24a6ea4-ce75-4665-a070-57453082c25
1148
+ schema:
1149
+ type: string
1150
+ format: uuid
1151
+ description: Metadata descriptor unique identifier
1152
+ example: b35b7fb5-df86-5776-b181-68564193d36
959
1153
  responses:
960
- 200:
961
- description: Metadata descriptor
1154
+ 200:
1155
+ description: Metadata descriptor
1156
+ content:
1157
+ application/json:
1158
+ schema:
1159
+ type: object
962
1160
  """
963
1161
  user_service.check_project_access(project_id)
964
1162
  return projects_service.get_metadata_descriptor(descriptor_id)
@@ -966,52 +1164,64 @@ class ProductionMetadataDescriptorResource(Resource, ArgsMixin):
966
1164
  @jwt_required()
967
1165
  def put(self, project_id, descriptor_id):
968
1166
  """
969
- Update a metadata descriptor.
1167
+ Update metadata descriptor
970
1168
  ---
971
- description: Descriptors serve to describe extra fields listed in the data attribute of entities.
1169
+ description: Update a metadata descriptor. Descriptors serve to
1170
+ describe extra fields listed in the data attribute of entities.
972
1171
  tags:
973
1172
  - Projects
974
1173
  parameters:
975
1174
  - in: path
976
1175
  name: project_id
977
1176
  required: true
978
- type: string
979
- format: uuid
1177
+ schema:
1178
+ type: string
1179
+ format: uuid
1180
+ description: Project unique identifier
980
1181
  example: a24a6ea4-ce75-4665-a070-57453082c25
981
1182
  - in: path
982
1183
  name: descriptor_id
983
1184
  required: true
984
- type: string
985
- format: uuid
986
- example: a24a6ea4-ce75-4665-a070-57453082c25
987
- - in: formData
988
- name: name
989
- required: True
990
- type: string
991
- required: False
992
- - in: formData
993
- name: for_client
994
- required: false
995
- type: string
996
- default: "False"
997
- example: "True"
998
- - in: formData
999
- name: choices
1000
- required: false
1001
- type: array
1002
- items:
1003
- type: string
1004
- example: ["option1", "option2"]
1005
- - in: formData
1006
- name: departments
1007
- required: false
1008
- type: array
1009
- items:
1185
+ schema:
1010
1186
  type: string
1011
- example: ["department1", "department2"]
1187
+ format: uuid
1188
+ description: Metadata descriptor unique identifier
1189
+ example: b35b7fb5-df86-5776-b181-68564193d36
1190
+ requestBody:
1191
+ required: true
1192
+ content:
1193
+ application/json:
1194
+ schema:
1195
+ type: object
1196
+ properties:
1197
+ name:
1198
+ type: string
1199
+ description: Name of the metadata descriptor
1200
+ example: "Custom Field"
1201
+ for_client:
1202
+ type: string
1203
+ description: Whether the descriptor is for client
1204
+ default: "False"
1205
+ example: "True"
1206
+ choices:
1207
+ type: array
1208
+ description: List of choices for the descriptor
1209
+ items:
1210
+ type: string
1211
+ example: ["option1", "option2"]
1212
+ departments:
1213
+ type: array
1214
+ description: List of departments for the descriptor
1215
+ items:
1216
+ type: string
1217
+ example: ["department1", "department2"]
1012
1218
  responses:
1013
- 200:
1014
- description: Metadata descriptor updated
1219
+ 200:
1220
+ description: Metadata descriptor updated
1221
+ content:
1222
+ application/json:
1223
+ schema:
1224
+ type: object
1015
1225
  """
1016
1226
  args = self.get_args(
1017
1227
  [
@@ -1044,27 +1254,32 @@ class ProductionMetadataDescriptorResource(Resource, ArgsMixin):
1044
1254
  @jwt_required()
1045
1255
  def delete(self, project_id, descriptor_id):
1046
1256
  """
1047
- Delete a metadata descriptor.
1257
+ Delete metadata descriptor
1048
1258
  ---
1049
- description: Descriptors serve to describe extra fields listed in the data attribute of entities.
1259
+ description: Delete a metadata descriptor. Descriptors serve to describe
1260
+ extra fields listed in the data attribute of entities.
1050
1261
  tags:
1051
1262
  - Projects
1052
1263
  parameters:
1053
1264
  - in: path
1054
1265
  name: project_id
1055
1266
  required: true
1056
- type: string
1057
- format: uuid
1267
+ schema:
1268
+ type: string
1269
+ format: uuid
1270
+ description: Project unique identifier
1058
1271
  example: a24a6ea4-ce75-4665-a070-57453082c25
1059
1272
  - in: path
1060
1273
  name: descriptor_id
1061
1274
  required: true
1062
- type: string
1063
- format: uuid
1064
- example: a24a6ea4-ce75-4665-a070-57453082c25
1275
+ schema:
1276
+ type: string
1277
+ format: uuid
1278
+ description: Metadata descriptor unique identifier
1279
+ example: b35b7fb5-df86-5776-b181-68564193d36
1065
1280
  responses:
1066
- 204:
1067
- description: Empty response
1281
+ 204:
1282
+ description: Metadata descriptor deleted
1068
1283
  """
1069
1284
  user_service.check_all_departments_access(
1070
1285
  project_id,
@@ -1076,33 +1291,145 @@ class ProductionMetadataDescriptorResource(Resource, ArgsMixin):
1076
1291
  return "", 204
1077
1292
 
1078
1293
 
1079
- class ProductionTimeSpentsResource(Resource):
1080
- """
1081
- Resource to retrieve time spents for given production.
1082
- """
1294
+ class ProductionMetadataDescriptorsReorderResource(Resource, ArgsMixin):
1083
1295
 
1084
1296
  @jwt_required()
1085
- def get(self, project_id):
1297
+ def post(self, project_id):
1086
1298
  """
1087
- Retrieve time spents for given production
1299
+ Reorder metadata descriptors
1088
1300
  ---
1301
+ description: Reorder metadata descriptors for a specific entity type
1302
+ and project. Descriptors are reordered based on the list of
1303
+ descriptor IDs provided in the request body. Position is set
1304
+ according to the order in the list.
1089
1305
  tags:
1090
1306
  - Projects
1091
1307
  parameters:
1092
1308
  - in: path
1093
1309
  name: project_id
1094
1310
  required: true
1095
- type: string
1096
- format: uuid
1311
+ schema:
1312
+ type: string
1313
+ format: uuid
1314
+ description: Project unique identifier
1097
1315
  example: a24a6ea4-ce75-4665-a070-57453082c25
1316
+ requestBody:
1317
+ required: true
1318
+ content:
1319
+ application/json:
1320
+ schema:
1321
+ type: object
1322
+ required:
1323
+ - entity_type
1324
+ - descriptor_ids
1325
+ properties:
1326
+ entity_type:
1327
+ type: string
1328
+ description: Entity type for the metadata descriptors
1329
+ enum: ["Asset", "Shot", "Edit", "Episode", "Sequence"]
1330
+ example: "Asset"
1331
+ descriptor_ids:
1332
+ type: array
1333
+ description: List of metadata descriptor IDs in the
1334
+ desired order
1335
+ items:
1336
+ type: string
1337
+ format: uuid
1338
+ example: ["b35b7fb5-df86-5776-b181-68564193d36", "c46c8gc6-eg97-6887-c292-79675204e47"]
1098
1339
  responses:
1099
- 200:
1100
- description: All time spents of given production
1101
- """
1102
- user_service.check_project_access(project_id)
1103
- return tasks_service.get_time_spents_for_project(project_id)
1104
-
1105
-
1340
+ 200:
1341
+ description: Metadata descriptors reordered successfully
1342
+ content:
1343
+ application/json:
1344
+ schema:
1345
+ type: array
1346
+ items:
1347
+ type: object
1348
+ properties:
1349
+ id:
1350
+ type: string
1351
+ format: uuid
1352
+ description: Metadata descriptor unique identifier
1353
+ example: a24a6ea4-ce75-4665-a070-57453082c25
1354
+ name:
1355
+ type: string
1356
+ description: Metadata descriptor name
1357
+ example: "Custom Field"
1358
+ position:
1359
+ type: integer
1360
+ description: Position of the descriptor
1361
+ example: 1
1362
+ entity_type:
1363
+ type: string
1364
+ description: Entity type
1365
+ example: "Asset"
1366
+ 400:
1367
+ description: Invalid parameters or descriptor not found
1368
+ """
1369
+ args = self.get_args(
1370
+ [
1371
+ ("entity_type", "", True),
1372
+ ("descriptor_ids", [], True, str, "append"),
1373
+ ]
1374
+ )
1375
+
1376
+ user_service.check_manager_project_access(project_id)
1377
+
1378
+ if args["entity_type"] not in [
1379
+ "Asset",
1380
+ "Shot",
1381
+ "Edit",
1382
+ "Episode",
1383
+ "Sequence",
1384
+ ]:
1385
+ raise WrongParameterException(
1386
+ "Wrong entity type. Please select Asset, Shot, Sequence, Episode or Edit."
1387
+ )
1388
+
1389
+ if not args["descriptor_ids"]:
1390
+ raise WrongParameterException("descriptor_ids cannot be empty.")
1391
+
1392
+ return projects_service.reorder_metadata_descriptors(
1393
+ project_id, args["entity_type"], args["descriptor_ids"]
1394
+ )
1395
+
1396
+
1397
+ class ProductionTimeSpentsResource(Resource):
1398
+ """
1399
+ Resource to retrieve time spents for given production.
1400
+ """
1401
+
1402
+ @jwt_required()
1403
+ def get(self, project_id):
1404
+ """
1405
+ Get production time spents
1406
+ ---
1407
+ description: Retrieve time spents for given production.
1408
+ tags:
1409
+ - Projects
1410
+ parameters:
1411
+ - in: path
1412
+ name: project_id
1413
+ required: true
1414
+ schema:
1415
+ type: string
1416
+ format: uuid
1417
+ description: Project unique identifier
1418
+ example: a24a6ea4-ce75-4665-a070-57453082c25
1419
+ responses:
1420
+ 200:
1421
+ description: All time spents of given production
1422
+ content:
1423
+ application/json:
1424
+ schema:
1425
+ type: array
1426
+ items:
1427
+ type: object
1428
+ """
1429
+ user_service.check_project_access(project_id)
1430
+ return tasks_service.get_time_spents_for_project(project_id)
1431
+
1432
+
1106
1433
  class ProductionMilestonesResource(Resource):
1107
1434
  """
1108
1435
  Resource to retrieve milestones for given production.
@@ -1111,20 +1438,29 @@ class ProductionMilestonesResource(Resource):
1111
1438
  @jwt_required()
1112
1439
  def get(self, project_id):
1113
1440
  """
1114
- Retrieve milestones for given production
1441
+ Get production milestones
1115
1442
  ---
1443
+ description: Retrieve milestones for given production.
1116
1444
  tags:
1117
1445
  - Projects
1118
1446
  parameters:
1119
1447
  - in: path
1120
1448
  name: project_id
1121
1449
  required: true
1122
- type: string
1123
- format: uuid
1450
+ schema:
1451
+ type: string
1452
+ format: uuid
1453
+ description: Project unique identifier
1124
1454
  example: a24a6ea4-ce75-4665-a070-57453082c25
1125
1455
  responses:
1126
- 200:
1127
- description: All milestones of given production
1456
+ 200:
1457
+ description: All milestones of given production
1458
+ content:
1459
+ application/json:
1460
+ schema:
1461
+ type: array
1462
+ items:
1463
+ type: object
1128
1464
  """
1129
1465
  user_service.check_project_access(project_id)
1130
1466
  return schedule_service.get_milestones_for_project(project_id)
@@ -1138,20 +1474,29 @@ class ProductionScheduleItemsResource(Resource):
1138
1474
  @jwt_required()
1139
1475
  def get(self, project_id):
1140
1476
  """
1141
- Retrieve schedule items for given production
1477
+ Get production schedule items
1142
1478
  ---
1479
+ description: Retrieve schedule items for given production.
1143
1480
  tags:
1144
1481
  - Projects
1145
1482
  parameters:
1146
1483
  - in: path
1147
1484
  name: project_id
1148
1485
  required: true
1149
- type: string
1150
- format: uuid
1486
+ schema:
1487
+ type: string
1488
+ format: uuid
1489
+ description: Project unique identifier
1151
1490
  example: a24a6ea4-ce75-4665-a070-57453082c25
1152
1491
  responses:
1153
- 200:
1154
- description: All schedule items of given production
1492
+ 200:
1493
+ description: All schedule items of given production
1494
+ content:
1495
+ application/json:
1496
+ schema:
1497
+ type: array
1498
+ items:
1499
+ type: object
1155
1500
  """
1156
1501
  user_service.check_project_access(project_id)
1157
1502
  user_service.block_access_to_vendor()
@@ -1166,20 +1511,29 @@ class ProductionTaskTypeScheduleItemsResource(Resource):
1166
1511
  @jwt_required()
1167
1512
  def get(self, project_id):
1168
1513
  """
1169
- Retrieve task type schedule items for given production
1514
+ Get production task type schedule items
1170
1515
  ---
1516
+ description: Retrieve task type schedule items for given production.
1171
1517
  tags:
1172
1518
  - Projects
1173
1519
  parameters:
1174
1520
  - in: path
1175
1521
  name: project_id
1176
1522
  required: true
1177
- type: string
1178
- format: uuid
1523
+ schema:
1524
+ type: string
1525
+ format: uuid
1526
+ description: Project unique identifier
1179
1527
  example: a24a6ea4-ce75-4665-a070-57453082c25
1180
1528
  responses:
1181
- 200:
1182
- description: All task types schedule items of given production
1529
+ 200:
1530
+ description: All task types schedule items of given production
1531
+ content:
1532
+ application/json:
1533
+ schema:
1534
+ type: array
1535
+ items:
1536
+ type: object
1183
1537
  """
1184
1538
  user_service.check_project_access(project_id)
1185
1539
  user_service.block_access_to_vendor()
@@ -1194,26 +1548,37 @@ class ProductionAssetTypesScheduleItemsResource(Resource):
1194
1548
  @jwt_required()
1195
1549
  def get(self, project_id, task_type_id):
1196
1550
  """
1197
- Retrieve asset types schedule items for given task type
1551
+ Get asset types schedule items
1198
1552
  ---
1553
+ description: Retrieve asset types schedule items for given task type.
1199
1554
  tags:
1200
1555
  - Projects
1201
1556
  parameters:
1202
1557
  - in: path
1203
1558
  name: project_id
1204
1559
  required: true
1205
- type: string
1206
- format: uuid
1560
+ schema:
1561
+ type: string
1562
+ format: uuid
1563
+ description: Project unique identifier
1207
1564
  example: a24a6ea4-ce75-4665-a070-57453082c25
1208
1565
  - in: path
1209
1566
  name: task_type_id
1210
1567
  required: true
1211
- type: string
1212
- format: uuid
1213
- example: a24a6ea4-ce75-4665-a070-57453082c25
1568
+ schema:
1569
+ type: string
1570
+ format: uuid
1571
+ description: Task type unique identifier
1572
+ example: b35b7fb5-df86-5776-b181-68564193d36
1214
1573
  responses:
1215
- 200:
1216
- description: All asset types schedule items for given task type
1574
+ 200:
1575
+ description: All asset types schedule items for given task type
1576
+ content:
1577
+ application/json:
1578
+ schema:
1579
+ type: array
1580
+ items:
1581
+ type: object
1217
1582
  """
1218
1583
  user_service.check_project_access(project_id)
1219
1584
  user_service.block_access_to_vendor()
@@ -1230,26 +1595,37 @@ class ProductionEpisodesScheduleItemsResource(Resource):
1230
1595
  @jwt_required()
1231
1596
  def get(self, project_id, task_type_id):
1232
1597
  """
1233
- Retrieve episodes schedule items for given task type
1598
+ Get episodes schedule items
1234
1599
  ---
1600
+ description: Retrieve episodes schedule items for given task type.
1235
1601
  tags:
1236
1602
  - Projects
1237
1603
  parameters:
1238
1604
  - in: path
1239
1605
  name: project_id
1240
1606
  required: true
1241
- type: string
1242
- format: uuid
1607
+ schema:
1608
+ type: string
1609
+ format: uuid
1610
+ description: Project unique identifier
1243
1611
  example: a24a6ea4-ce75-4665-a070-57453082c25
1244
1612
  - in: path
1245
1613
  name: task_type_id
1246
1614
  required: true
1247
- type: string
1248
- format: uuid
1249
- example: a24a6ea4-ce75-4665-a070-57453082c25
1615
+ schema:
1616
+ type: string
1617
+ format: uuid
1618
+ description: Task type unique identifier
1619
+ example: b35b7fb5-df86-5776-b181-68564193d36
1250
1620
  responses:
1251
- 200:
1252
- description: All episodes schedule items for given task type
1621
+ 200:
1622
+ description: All episodes schedule items for given task type
1623
+ content:
1624
+ application/json:
1625
+ schema:
1626
+ type: array
1627
+ items:
1628
+ type: object
1253
1629
  """
1254
1630
  user_service.check_project_access(project_id)
1255
1631
  user_service.block_access_to_vendor()
@@ -1266,26 +1642,37 @@ class ProductionSequencesScheduleItemsResource(Resource):
1266
1642
  @jwt_required()
1267
1643
  def get(self, project_id, task_type_id):
1268
1644
  """
1269
- Retrieve sequences schedule items for given task type
1645
+ Get sequences schedule items
1270
1646
  ---
1647
+ description: Retrieve sequences schedule items for given task type.
1271
1648
  tags:
1272
1649
  - Projects
1273
1650
  parameters:
1274
1651
  - in: path
1275
1652
  name: project_id
1276
1653
  required: true
1277
- type: string
1278
- format: uuid
1654
+ schema:
1655
+ type: string
1656
+ format: uuid
1657
+ description: Project unique identifier
1279
1658
  example: a24a6ea4-ce75-4665-a070-57453082c25
1280
1659
  - in: path
1281
1660
  name: task_type_id
1282
1661
  required: true
1283
- type: string
1284
- format: uuid
1285
- example: a24a6ea4-ce75-4665-a070-57453082c25
1662
+ schema:
1663
+ type: string
1664
+ format: uuid
1665
+ description: Task type unique identifier
1666
+ example: b35b7fb5-df86-5776-b181-68564193d36
1286
1667
  responses:
1287
- 200:
1288
- description: All sequences schedule items for given task type
1668
+ 200:
1669
+ description: All sequences schedule items for given task type
1670
+ content:
1671
+ application/json:
1672
+ schema:
1673
+ type: array
1674
+ items:
1675
+ type: object
1289
1676
  """
1290
1677
  user_service.check_project_access(project_id)
1291
1678
  user_service.block_access_to_vendor()
@@ -1299,20 +1686,29 @@ class ProductionBudgetsResource(Resource, ArgsMixin):
1299
1686
  @jwt_required()
1300
1687
  def get(self, project_id):
1301
1688
  """
1302
- Retrieve budgets for given production
1689
+ Get production budgets
1303
1690
  ---
1691
+ description: Retrieve budgets for given production.
1304
1692
  tags:
1305
1693
  - Projects
1306
1694
  parameters:
1307
1695
  - in: path
1308
1696
  name: project_id
1309
1697
  required: true
1310
- type: string
1311
- format: uuid
1698
+ schema:
1699
+ type: string
1700
+ format: uuid
1701
+ description: Project unique identifier
1312
1702
  example: a24a6ea4-ce75-4665-a070-57453082c25
1313
1703
  responses:
1314
- 200:
1315
- description: All budgets of given production
1704
+ 200:
1705
+ description: All budgets of given production
1706
+ content:
1707
+ application/json:
1708
+ schema:
1709
+ type: array
1710
+ items:
1711
+ type: object
1316
1712
  """
1317
1713
  user_service.check_manager_project_access(project_id)
1318
1714
  self.check_id_parameter(project_id)
@@ -1321,8 +1717,9 @@ class ProductionBudgetsResource(Resource, ArgsMixin):
1321
1717
  @jwt_required()
1322
1718
  def post(self, project_id):
1323
1719
  """
1324
- Create a budget for given production.
1720
+ Create budget
1325
1721
  ---
1722
+ description: Create a budget for given production.
1326
1723
  tags:
1327
1724
  - Projects
1328
1725
  parameters:
@@ -1332,11 +1729,12 @@ class ProductionBudgetsResource(Resource, ArgsMixin):
1332
1729
  schema:
1333
1730
  type: string
1334
1731
  format: uuid
1732
+ description: Project unique identifier
1335
1733
  example: a24a6ea4-ce75-4665-a070-57453082c25
1336
1734
  requestBody:
1337
1735
  required: true
1338
1736
  content:
1339
- application/x-www-form-urlencoded:
1737
+ application/json:
1340
1738
  schema:
1341
1739
  type: object
1342
1740
  required:
@@ -1344,13 +1742,15 @@ class ProductionBudgetsResource(Resource, ArgsMixin):
1344
1742
  properties:
1345
1743
  name:
1346
1744
  type: string
1745
+ description: Budget name
1347
1746
  example: "New Budget"
1348
1747
  currency:
1349
1748
  type: string
1749
+ description: Budget currency code
1350
1750
  default: "USD"
1351
1751
  example: "USD"
1352
1752
  responses:
1353
- '201':
1753
+ 201:
1354
1754
  description: Budget created
1355
1755
  content:
1356
1756
  application/json:
@@ -1360,14 +1760,18 @@ class ProductionBudgetsResource(Resource, ArgsMixin):
1360
1760
  id:
1361
1761
  type: string
1362
1762
  format: uuid
1763
+ description: Budget unique identifier
1764
+ example: a24a6ea4-ce75-4665-a070-57453082c25
1363
1765
  name:
1364
1766
  type: string
1767
+ description: Budget name
1768
+ example: "New Budget"
1365
1769
  currency:
1366
1770
  type: string
1367
- '400':
1771
+ description: Budget currency code
1772
+ example: "USD"
1773
+ 400:
1368
1774
  description: Invalid parameters
1369
- '404':
1370
- description: Project not found
1371
1775
  """
1372
1776
  self.check_id_parameter(project_id)
1373
1777
  user_service.check_manager_project_access(project_id)
@@ -1387,26 +1791,35 @@ class ProductionBudgetResource(Resource, ArgsMixin):
1387
1791
  @jwt_required()
1388
1792
  def get(self, project_id, budget_id):
1389
1793
  """
1390
- Retrieve a budget for given production
1794
+ Get budget
1391
1795
  ---
1796
+ description: Retrieve a budget for given production.
1392
1797
  tags:
1393
1798
  - Projects
1394
1799
  parameters:
1395
1800
  - in: path
1396
1801
  name: project_id
1397
1802
  required: true
1398
- type: string
1399
- format: uuid
1803
+ schema:
1804
+ type: string
1805
+ format: uuid
1806
+ description: Project unique identifier
1400
1807
  example: a24a6ea4-ce75-4665-a070-57453082c25
1401
1808
  - in: path
1402
1809
  name: budget_id
1403
1810
  required: true
1404
- type: string
1405
- format: uuid
1406
- example: a24a6ea4-ce75-4665-a070-57453082c25
1811
+ schema:
1812
+ type: string
1813
+ format: uuid
1814
+ description: Budget unique identifier
1815
+ example: b35b7fb5-df86-5776-b181-68564193d36
1407
1816
  responses:
1408
- 200:
1409
- description: Budget retrieved
1817
+ 200:
1818
+ description: Budget retrieved
1819
+ content:
1820
+ application/json:
1821
+ schema:
1822
+ type: object
1410
1823
  """
1411
1824
  self.check_id_parameter(project_id)
1412
1825
  self.check_id_parameter(budget_id)
@@ -1416,36 +1829,50 @@ class ProductionBudgetResource(Resource, ArgsMixin):
1416
1829
  @jwt_required()
1417
1830
  def put(self, project_id, budget_id):
1418
1831
  """
1419
- Update a budget name for given production
1832
+ Update budget
1420
1833
  ---
1834
+ description: Update a budget for given production.
1421
1835
  tags:
1422
1836
  - Projects
1423
1837
  parameters:
1424
1838
  - in: path
1425
1839
  name: project_id
1426
1840
  required: true
1427
- type: string
1428
- format: uuid
1841
+ schema:
1842
+ type: string
1843
+ format: uuid
1844
+ description: Project unique identifier
1429
1845
  example: a24a6ea4-ce75-4665-a070-57453082c25
1430
1846
  - in: path
1431
1847
  name: budget_id
1432
1848
  required: true
1433
- type: string
1434
- format: uuid
1435
- example: a24a6ea4-ce75-4665-a070-57453082c25
1436
- - in: formData
1437
- name: name
1438
- required: false
1439
- type: string
1440
- example: "New Budget"
1441
- - in: formData
1442
- name: currency
1443
- required: false
1444
- type: string
1445
- example: "USD"
1849
+ schema:
1850
+ type: string
1851
+ format: uuid
1852
+ description: Budget unique identifier
1853
+ example: b35b7fb5-df86-5776-b181-68564193d36
1854
+ requestBody:
1855
+ required: true
1856
+ content:
1857
+ application/json:
1858
+ schema:
1859
+ type: object
1860
+ properties:
1861
+ name:
1862
+ type: string
1863
+ description: Budget name
1864
+ example: "New Budget"
1865
+ currency:
1866
+ type: string
1867
+ description: Budget currency code
1868
+ example: "USD"
1446
1869
  responses:
1447
- 200:
1448
- description: Budget updated
1870
+ 200:
1871
+ description: Budget updated
1872
+ content:
1873
+ application/json:
1874
+ schema:
1875
+ type: object
1449
1876
  """
1450
1877
  self.check_id_parameter(project_id)
1451
1878
  self.check_id_parameter(budget_id)
@@ -1460,26 +1887,31 @@ class ProductionBudgetResource(Resource, ArgsMixin):
1460
1887
  @jwt_required()
1461
1888
  def delete(self, project_id, budget_id):
1462
1889
  """
1463
- Delete a budget for given production
1890
+ Delete budget
1464
1891
  ---
1892
+ description: Delete a budget for given production.
1465
1893
  tags:
1466
1894
  - Projects
1467
1895
  parameters:
1468
1896
  - in: path
1469
1897
  name: project_id
1470
1898
  required: true
1471
- type: string
1472
- format: uuid
1899
+ schema:
1900
+ type: string
1901
+ format: uuid
1902
+ description: Project unique identifier
1473
1903
  example: a24a6ea4-ce75-4665-a070-57453082c25
1474
1904
  - in: path
1475
1905
  name: budget_id
1476
1906
  required: true
1477
- type: string
1478
- format: uuid
1479
- example: a24a6ea4-ce75-4665-a070-57453082c25
1907
+ schema:
1908
+ type: string
1909
+ format: uuid
1910
+ description: Budget unique identifier
1911
+ example: b35b7fb5-df86-5776-b181-68564193d36
1480
1912
  responses:
1481
- 204:
1482
- description: Empty response
1913
+ 204:
1914
+ description: Budget deleted
1483
1915
  """
1484
1916
  self.check_id_parameter(project_id)
1485
1917
  self.check_id_parameter(budget_id)
@@ -1493,26 +1925,37 @@ class ProductionBudgetEntriesResource(Resource, ArgsMixin):
1493
1925
  @jwt_required()
1494
1926
  def get(self, project_id, budget_id):
1495
1927
  """
1496
- Retrieve budget entries for given production
1928
+ Get budget entries
1497
1929
  ---
1930
+ description: Retrieve budget entries for given production.
1498
1931
  tags:
1499
1932
  - Projects
1500
1933
  parameters:
1501
1934
  - in: path
1502
1935
  name: project_id
1503
1936
  required: true
1504
- type: string
1505
- format: uuid
1937
+ schema:
1938
+ type: string
1939
+ format: uuid
1940
+ description: Project unique identifier
1506
1941
  example: a24a6ea4-ce75-4665-a070-57453082c25
1507
1942
  - in: path
1508
1943
  name: budget_id
1509
1944
  required: true
1510
- type: string
1511
- format: uuid
1512
- example: a24a6ea4-ce75-4665-a070-57453082c25
1945
+ schema:
1946
+ type: string
1947
+ format: uuid
1948
+ description: Budget unique identifier
1949
+ example: b35b7fb5-df86-5776-b181-68564193d36
1513
1950
  responses:
1514
- 200:
1515
- description: All budget entries of given production and budget
1951
+ 200:
1952
+ description: All budget entries of given production and budget
1953
+ content:
1954
+ application/json:
1955
+ schema:
1956
+ type: array
1957
+ items:
1958
+ type: object
1516
1959
  """
1517
1960
  self.check_id_parameter(project_id)
1518
1961
  self.check_id_parameter(budget_id)
@@ -1522,8 +1965,9 @@ class ProductionBudgetEntriesResource(Resource, ArgsMixin):
1522
1965
  @jwt_required()
1523
1966
  def post(self, project_id, budget_id):
1524
1967
  """
1525
- Create a budget entry for given production and budget
1968
+ Create budget entry
1526
1969
  ---
1970
+ description: Create a budget entry for given production and budget.
1527
1971
  tags:
1528
1972
  - Projects
1529
1973
  parameters:
@@ -1533,6 +1977,7 @@ class ProductionBudgetEntriesResource(Resource, ArgsMixin):
1533
1977
  schema:
1534
1978
  type: string
1535
1979
  format: uuid
1980
+ description: Project unique identifier
1536
1981
  example: a24a6ea4-ce75-4665-a070-57453082c25
1537
1982
  - in: path
1538
1983
  name: budget_id
@@ -1540,11 +1985,12 @@ class ProductionBudgetEntriesResource(Resource, ArgsMixin):
1540
1985
  schema:
1541
1986
  type: string
1542
1987
  format: uuid
1543
- example: a24a6ea4-ce75-4665-a070-57453082c25
1988
+ description: Budget unique identifier
1989
+ example: b35b7fb5-df86-5776-b181-68564193d36
1544
1990
  requestBody:
1545
1991
  required: true
1546
1992
  content:
1547
- application/x-www-form-urlencoded:
1993
+ application/json:
1548
1994
  schema:
1549
1995
  type: object
1550
1996
  required:
@@ -1553,30 +1999,37 @@ class ProductionBudgetEntriesResource(Resource, ArgsMixin):
1553
1999
  department_id:
1554
2000
  type: string
1555
2001
  format: uuid
1556
- example: a24a6ea4-ce75-4665-a070-57453082c25
2002
+ description: Department unique identifier
2003
+ example: c46c8gc6-eg97-6887-c292-79675204e47
1557
2004
  person_id:
1558
2005
  type: string
1559
2006
  format: uuid
2007
+ description: Person unique identifier
1560
2008
  example: a24a6ea4-ce75-4665-a070-57453082c25
1561
2009
  start_date:
1562
2010
  type: string
1563
2011
  format: date
2012
+ description: Budget entry start date
1564
2013
  example: "2025-01-01"
1565
2014
  months_duration:
1566
2015
  type: integer
2016
+ description: Budget entry duration in months
1567
2017
  example: 12
1568
2018
  daily_salary:
1569
2019
  type: number
1570
2020
  format: float
2021
+ description: Daily salary amount
1571
2022
  example: 100.00
1572
2023
  position:
1573
2024
  type: string
2025
+ description: Position name
1574
2026
  example: "Artist"
1575
2027
  seniority:
1576
2028
  type: string
2029
+ description: Seniority level
1577
2030
  example: "Mid"
1578
2031
  responses:
1579
- '201':
2032
+ 201:
1580
2033
  description: Budget entry created
1581
2034
  content:
1582
2035
  application/json:
@@ -1586,13 +2039,15 @@ class ProductionBudgetEntriesResource(Resource, ArgsMixin):
1586
2039
  id:
1587
2040
  type: string
1588
2041
  format: uuid
2042
+ description: Budget entry unique identifier
2043
+ example: a24a6ea4-ce75-4665-a070-57453082c25
1589
2044
  department_id:
1590
2045
  type: string
1591
2046
  format: uuid
1592
- '400':
2047
+ description: Department unique identifier
2048
+ example: c46c8gc6-eg97-6887-c292-79675204e47
2049
+ 400:
1593
2050
  description: Invalid parameters
1594
- '404':
1595
- description: Project or budget not found
1596
2051
  """
1597
2052
  self.check_id_parameter(project_id)
1598
2053
  self.check_id_parameter(budget_id)
@@ -1625,32 +2080,43 @@ class ProductionBudgetEntryResource(Resource, ArgsMixin):
1625
2080
  @jwt_required()
1626
2081
  def get(self, project_id, budget_id, entry_id):
1627
2082
  """
1628
- Retrieve a budget entry for given production and budget
2083
+ Get budget entry
1629
2084
  ---
2085
+ description: Retrieve a budget entry for given production and budget.
1630
2086
  tags:
1631
2087
  - Projects
1632
2088
  parameters:
1633
2089
  - in: path
1634
2090
  name: project_id
1635
2091
  required: true
1636
- type: string
1637
- format: uuid
2092
+ schema:
2093
+ type: string
2094
+ format: uuid
2095
+ description: Project unique identifier
1638
2096
  example: a24a6ea4-ce75-4665-a070-57453082c25
1639
2097
  - in: path
1640
2098
  name: budget_id
1641
2099
  required: true
1642
- type: string
1643
- format: uuid
1644
- example: a24a6ea4-ce75-4665-a070-57453082c25
2100
+ schema:
2101
+ type: string
2102
+ format: uuid
2103
+ description: Budget unique identifier
2104
+ example: b35b7fb5-df86-5776-b181-68564193d36
1645
2105
  - in: path
1646
2106
  name: entry_id
1647
2107
  required: true
1648
- type: string
1649
- format: uuid
1650
- example: a24a6ea4-ce75-4665-a070-57453082c25
2108
+ schema:
2109
+ type: string
2110
+ format: uuid
2111
+ description: Budget entry unique identifier
2112
+ example: c46c8gc6-eg97-6887-c292-79675204e47
1651
2113
  responses:
1652
- 200:
1653
- description: Budget entry retrieved
2114
+ 200:
2115
+ description: Budget entry retrieved
2116
+ content:
2117
+ application/json:
2118
+ schema:
2119
+ type: object
1654
2120
  """
1655
2121
  user_service.check_manager_project_access(project_id)
1656
2122
  self.check_id_parameter(project_id)
@@ -1661,70 +2127,87 @@ class ProductionBudgetEntryResource(Resource, ArgsMixin):
1661
2127
  @jwt_required()
1662
2128
  def put(self, project_id, budget_id, entry_id):
1663
2129
  """
1664
- Update a budget entry for given production and budget
2130
+ Update budget entry
1665
2131
  ---
2132
+ description: Update a budget entry for given production and budget.
1666
2133
  tags:
1667
2134
  - Projects
1668
2135
  parameters:
1669
2136
  - in: path
1670
2137
  name: project_id
1671
2138
  required: true
1672
- type: string
1673
- format: uuid
2139
+ schema:
2140
+ type: string
2141
+ format: uuid
2142
+ description: Project unique identifier
1674
2143
  example: a24a6ea4-ce75-4665-a070-57453082c25
1675
2144
  - in: path
1676
2145
  name: budget_id
1677
2146
  required: true
1678
- type: string
1679
- format: uuid
1680
- example: a24a6ea4-ce75-4665-a070-57453082c25
2147
+ schema:
2148
+ type: string
2149
+ format: uuid
2150
+ description: Budget unique identifier
2151
+ example: b35b7fb5-df86-5776-b181-68564193d36
1681
2152
  - in: path
1682
2153
  name: entry_id
1683
2154
  required: true
1684
- type: string
1685
- format: uuid
1686
- example: a24a6ea4-ce75-4665-a070-57453082c25
1687
- - in: formData
1688
- name: department_id
1689
- required: false
1690
- type: string
1691
- format: uuid
1692
- example: a24a6ea4-ce75-4665-a070-57453082c25
1693
- - in: formData
1694
- name: person_id
1695
- required: false
1696
- type: string
1697
- format: uuid
1698
- example: a24a6ea4-ce75-4665-a070-57453082c25
1699
- - in: formData
1700
- name: start_date
1701
- required: false
1702
- type: string
1703
- format: date
1704
- example: 2025-01-01
1705
- - in: formData
1706
- name: months_duration
1707
- required: false
1708
- type: integer
1709
- example: 12
1710
- - in: formData
1711
- name: daily_salary
1712
- required: false
1713
- type: float
1714
- example: 100.00
1715
- - in: formData
1716
- name: position
1717
- required: false
1718
- type: string
1719
- example: "Artist"
1720
- - in: formData
1721
- name: seniority
1722
- required: false
1723
- type: string
1724
- example: "Mid"
2155
+ schema:
2156
+ type: string
2157
+ format: uuid
2158
+ description: Budget entry unique identifier
2159
+ example: c46c8gc6-eg97-6887-c292-79675204e47
2160
+ requestBody:
2161
+ required: true
2162
+ content:
2163
+ application/json:
2164
+ schema:
2165
+ type: object
2166
+ properties:
2167
+ department_id:
2168
+ type: string
2169
+ format: uuid
2170
+ description: Department unique identifier
2171
+ example: c46c8gc6-eg97-6887-c292-79675204e47
2172
+ person_id:
2173
+ type: string
2174
+ format: uuid
2175
+ description: Person unique identifier
2176
+ example: a24a6ea4-ce75-4665-a070-57453082c25
2177
+ start_date:
2178
+ type: string
2179
+ format: date
2180
+ description: Budget entry start date
2181
+ example: "2025-01-01"
2182
+ months_duration:
2183
+ type: integer
2184
+ description: Budget entry duration in months
2185
+ example: 12
2186
+ daily_salary:
2187
+ type: number
2188
+ format: float
2189
+ description: Daily salary amount
2190
+ example: 100.00
2191
+ position:
2192
+ type: string
2193
+ description: Position name
2194
+ example: "Artist"
2195
+ seniority:
2196
+ type: string
2197
+ description: Seniority level
2198
+ example: "Mid"
2199
+ exceptions:
2200
+ type: object
2201
+ description: Map of amount exceptions. Key is the date and
2202
+ value is the amount
2203
+ example: {"2025-01-01": 1000, "2025-02-01": 2000}
1725
2204
  responses:
1726
- 200:
1727
- description: Budget entry updated
2205
+ 200:
2206
+ description: Budget entry updated
2207
+ content:
2208
+ application/json:
2209
+ schema:
2210
+ type: object
1728
2211
  """
1729
2212
  user_service.check_manager_project_access(project_id)
1730
2213
  self.check_id_parameter(project_id)
@@ -1753,32 +2236,39 @@ class ProductionBudgetEntryResource(Resource, ArgsMixin):
1753
2236
  @jwt_required()
1754
2237
  def delete(self, project_id, budget_id, entry_id):
1755
2238
  """
1756
- Delete a budget entry for given production and budget.
2239
+ Delete budget entry
1757
2240
  ---
2241
+ description: Delete a budget entry for given production and budget.
1758
2242
  tags:
1759
2243
  - Projects
1760
2244
  parameters:
1761
2245
  - in: path
1762
2246
  name: project_id
1763
2247
  required: true
1764
- type: string
1765
- format: uuid
2248
+ schema:
2249
+ type: string
2250
+ format: uuid
2251
+ description: Project unique identifier
1766
2252
  example: a24a6ea4-ce75-4665-a070-57453082c25
1767
2253
  - in: path
1768
2254
  name: budget_id
1769
2255
  required: true
1770
- type: string
1771
- format: uuid
1772
- example: a24a6ea4-ce75-4665-a070-57453082c25
2256
+ schema:
2257
+ type: string
2258
+ format: uuid
2259
+ description: Budget unique identifier
2260
+ example: b35b7fb5-df86-5776-b181-68564193d36
1773
2261
  - in: path
1774
2262
  name: entry_id
1775
2263
  required: true
1776
- type: string
1777
- format: uuid
1778
- example: a24a6ea4-ce75-4665-a070-57453082c25
2264
+ schema:
2265
+ type: string
2266
+ format: uuid
2267
+ description: Budget entry unique identifier
2268
+ example: c46c8gc6-eg97-6887-c292-79675204e47
1779
2269
  responses:
1780
- 204:
1781
- description: empty response
2270
+ 204:
2271
+ description: Budget entry deleted
1782
2272
  """
1783
2273
  self.check_id_parameter(project_id)
1784
2274
  self.check_id_parameter(budget_id)
@@ -1793,20 +2283,27 @@ class ProductionMonthTimeSpentsResource(Resource, ArgsMixin):
1793
2283
  @jwt_required()
1794
2284
  def get(self, project_id):
1795
2285
  """
1796
- Get aggregated time spents by month for given project.
2286
+ Get production month time spents
1797
2287
  ---
2288
+ description: Get aggregated time spents by month for given project.
1798
2289
  tags:
1799
2290
  - Projects
1800
2291
  parameters:
1801
2292
  - in: path
1802
2293
  name: project_id
1803
2294
  required: true
1804
- type: string
1805
- format: uuid
2295
+ schema:
2296
+ type: string
2297
+ format: uuid
2298
+ description: Project unique identifier
1806
2299
  example: a24a6ea4-ce75-4665-a070-57453082c25
1807
2300
  responses:
1808
2301
  200:
1809
- description: Aggregated time spents for given person and month
2302
+ description: Aggregated time spents for given project and month
2303
+ content:
2304
+ application/json:
2305
+ schema:
2306
+ type: object
1810
2307
  400:
1811
2308
  description: Wrong ID format
1812
2309
  """
@@ -1823,26 +2320,37 @@ class ProductionScheduleVersionTaskLinksResource(Resource, ArgsMixin):
1823
2320
  @jwt_required()
1824
2321
  def get(self, production_schedule_version_id):
1825
2322
  """
1826
- Get task links for given production schedule version.
2323
+ Get production schedule version task links
1827
2324
  ---
2325
+ description: Get task links for given production schedule version.
1828
2326
  tags:
1829
2327
  - Projects
1830
2328
  parameters:
1831
2329
  - in: path
1832
2330
  name: production_schedule_version_id
1833
2331
  required: true
1834
- type: string
1835
- format: uuid
2332
+ schema:
2333
+ type: string
2334
+ format: uuid
2335
+ description: Production schedule version unique identifier
1836
2336
  example: a24a6ea4-ce75-4665-a070-57453082c25
1837
2337
  - in: query
1838
2338
  name: task_type_id
1839
2339
  required: false
1840
- type: string
1841
- format: uuid
1842
- example: a24a6ea4-ce75-4665-a070-57453082c25
2340
+ schema:
2341
+ type: string
2342
+ format: uuid
2343
+ description: Task type unique identifier for filtering
2344
+ example: b35b7fb5-df86-5776-b181-68564193d36
1843
2345
  responses:
1844
2346
  200:
1845
2347
  description: Task links for given production schedule version
2348
+ content:
2349
+ application/json:
2350
+ schema:
2351
+ type: array
2352
+ items:
2353
+ type: object
1846
2354
  400:
1847
2355
  description: Wrong ID format
1848
2356
  """
@@ -1882,20 +2390,28 @@ class ProductionScheduleVersionSetTaskLinksFromTasksResource(
1882
2390
  @jwt_required()
1883
2391
  def post(self, production_schedule_version_id):
1884
2392
  """
1885
- Set task links for given production schedule version from tasks.
2393
+ Set task links from tasks
1886
2394
  ---
2395
+ description: Set task links for given production schedule version from
2396
+ tasks.
1887
2397
  tags:
1888
2398
  - Projects
1889
2399
  parameters:
1890
2400
  - in: path
1891
2401
  name: production_schedule_version_id
1892
2402
  required: true
1893
- type: string
1894
- format: uuid
2403
+ schema:
2404
+ type: string
2405
+ format: uuid
2406
+ description: Production schedule version unique identifier
1895
2407
  example: a24a6ea4-ce75-4665-a070-57453082c25
1896
2408
  responses:
1897
2409
  200:
1898
2410
  description: Task links created
2411
+ content:
2412
+ application/json:
2413
+ schema:
2414
+ type: object
1899
2415
  400:
1900
2416
  description: Wrong ID format
1901
2417
  """
@@ -1918,20 +2434,27 @@ class ProductionScheduleVersionApplyToProductionResource(Resource, ArgsMixin):
1918
2434
  @jwt_required()
1919
2435
  def post(self, production_schedule_version_id):
1920
2436
  """
1921
- Apply production schedule version to production.
2437
+ Apply production schedule version
1922
2438
  ---
2439
+ description: Apply production schedule version to production.
1923
2440
  tags:
1924
2441
  - Projects
1925
2442
  parameters:
1926
2443
  - in: path
1927
2444
  name: production_schedule_version_id
1928
2445
  required: true
1929
- type: string
1930
- format: uuid
2446
+ schema:
2447
+ type: string
2448
+ format: uuid
2449
+ description: Production schedule version unique identifier
1931
2450
  example: a24a6ea4-ce75-4665-a070-57453082c25
1932
2451
  responses:
1933
2452
  200:
1934
2453
  description: Production schedule version applied
2454
+ content:
2455
+ application/json:
2456
+ schema:
2457
+ type: object
1935
2458
  400:
1936
2459
  description: Wrong ID format
1937
2460
  """
@@ -1958,26 +2481,43 @@ class ProductionScheduleVersionSetTaskLinksFromProductionScheduleVersionResource
1958
2481
  @jwt_required()
1959
2482
  def post(self, production_schedule_version_id):
1960
2483
  """
1961
- Set task links for given production schedule version from another production schedule version.
2484
+ Set task links from production schedule version
1962
2485
  ---
2486
+ description: Set task links for given production schedule version from
2487
+ another production schedule version.
1963
2488
  tags:
1964
2489
  - Projects
1965
2490
  parameters:
1966
2491
  - in: path
1967
2492
  name: production_schedule_version_id
1968
2493
  required: true
1969
- type: string
1970
- format: uuid
1971
- example: a24a6ea4-ce75-4665-a070-57453082c25
1972
- - in: formData
1973
- name: production_schedule_version_id
1974
- required: true
1975
- type: string
1976
- format: uuid
2494
+ schema:
2495
+ type: string
2496
+ format: uuid
2497
+ description: Production schedule version unique identifier
1977
2498
  example: a24a6ea4-ce75-4665-a070-57453082c25
2499
+ requestBody:
2500
+ required: true
2501
+ content:
2502
+ application/json:
2503
+ schema:
2504
+ type: object
2505
+ required:
2506
+ - production_schedule_version_id
2507
+ properties:
2508
+ production_schedule_version_id:
2509
+ type: string
2510
+ format: uuid
2511
+ description: Source production schedule version unique
2512
+ identifier
2513
+ example: b35b7fb5-df86-5776-b181-68564193d36
1978
2514
  responses:
1979
2515
  200:
1980
2516
  description: Task links created
2517
+ content:
2518
+ application/json:
2519
+ schema:
2520
+ type: object
1981
2521
  400:
1982
2522
  description: Wrong ID format
1983
2523
  """
@@ -2026,8 +2566,9 @@ class ProductionTaskTypesTimeSpentsResource(Resource, ArgsMixin):
2026
2566
  @jwt_required()
2027
2567
  def get(self, project_id, task_type_id):
2028
2568
  """
2029
- Retrieve time spents for a task type in the production
2569
+ Get production task type time spents
2030
2570
  ---
2571
+ description: Retrieve time spents for a task type in the production.
2031
2572
  tags:
2032
2573
  - Projects
2033
2574
  parameters:
@@ -2037,6 +2578,7 @@ class ProductionTaskTypesTimeSpentsResource(Resource, ArgsMixin):
2037
2578
  schema:
2038
2579
  type: string
2039
2580
  format: uuid
2581
+ description: Project unique identifier
2040
2582
  example: a24a6ea4-ce75-4665-a070-57453082c25
2041
2583
  - in: path
2042
2584
  name: task_type_id
@@ -2044,13 +2586,15 @@ class ProductionTaskTypesTimeSpentsResource(Resource, ArgsMixin):
2044
2586
  schema:
2045
2587
  type: string
2046
2588
  format: uuid
2047
- example: a24a6ea4-ce75-4665-a070-57453082c25
2589
+ description: Task type unique identifier
2590
+ example: b35b7fb5-df86-5776-b181-68564193d36
2048
2591
  - in: query
2049
2592
  name: start_date
2050
2593
  required: false
2051
2594
  schema:
2052
2595
  type: string
2053
2596
  format: date
2597
+ description: Start date for filtering time spents
2054
2598
  example: "2022-07-01"
2055
2599
  - in: query
2056
2600
  name: end_date
@@ -2058,9 +2602,10 @@ class ProductionTaskTypesTimeSpentsResource(Resource, ArgsMixin):
2058
2602
  schema:
2059
2603
  type: string
2060
2604
  format: date
2605
+ description: End date for filtering time spents
2061
2606
  example: "2022-07-31"
2062
2607
  responses:
2063
- '200':
2608
+ 200:
2064
2609
  description: All time spents for given task type and project
2065
2610
  content:
2066
2611
  application/json:
@@ -2072,16 +2617,24 @@ class ProductionTaskTypesTimeSpentsResource(Resource, ArgsMixin):
2072
2617
  id:
2073
2618
  type: string
2074
2619
  format: uuid
2620
+ description: Time spent unique identifier
2621
+ example: a24a6ea4-ce75-4665-a070-57453082c25
2075
2622
  person_id:
2076
2623
  type: string
2077
2624
  format: uuid
2625
+ description: Person unique identifier
2626
+ example: b35b7fb5-df86-5776-b181-68564193d36
2078
2627
  duration:
2079
2628
  type: number
2080
2629
  format: float
2630
+ description: Time spent duration in hours
2631
+ example: 8.5
2081
2632
  date:
2082
2633
  type: string
2083
2634
  format: date
2084
- '400':
2635
+ description: Date of time spent entry
2636
+ example: "2022-07-15"
2637
+ 400:
2085
2638
  description: Invalid date range parameters
2086
2639
  """
2087
2640
  user_service.check_manager_project_access(project_id)
@@ -2106,8 +2659,9 @@ class ProductionDayOffsResource(Resource, ArgsMixin):
2106
2659
  @jwt_required()
2107
2660
  def get(self, project_id):
2108
2661
  """
2109
- Retrieve all day offs for a production
2662
+ Get production day offs
2110
2663
  ---
2664
+ description: Retrieve all day offs for a production.
2111
2665
  tags:
2112
2666
  - Projects
2113
2667
  parameters:
@@ -2117,6 +2671,7 @@ class ProductionDayOffsResource(Resource, ArgsMixin):
2117
2671
  schema:
2118
2672
  type: string
2119
2673
  format: uuid
2674
+ description: Project unique identifier
2120
2675
  example: a24a6ea4-ce75-4665-a070-57453082c25
2121
2676
  - in: query
2122
2677
  name: start_date
@@ -2124,6 +2679,7 @@ class ProductionDayOffsResource(Resource, ArgsMixin):
2124
2679
  schema:
2125
2680
  type: string
2126
2681
  format: date
2682
+ description: Start date for filtering day offs
2127
2683
  example: "2022-07-01"
2128
2684
  - in: query
2129
2685
  name: end_date
@@ -2131,9 +2687,10 @@ class ProductionDayOffsResource(Resource, ArgsMixin):
2131
2687
  schema:
2132
2688
  type: string
2133
2689
  format: date
2690
+ description: End date for filtering day offs
2134
2691
  example: "2022-07-31"
2135
2692
  responses:
2136
- '200':
2693
+ 200:
2137
2694
  description: All day offs for given project
2138
2695
  content:
2139
2696
  application/json:
@@ -2145,18 +2702,28 @@ class ProductionDayOffsResource(Resource, ArgsMixin):
2145
2702
  id:
2146
2703
  type: string
2147
2704
  format: uuid
2705
+ description: Day off unique identifier
2706
+ example: a24a6ea4-ce75-4665-a070-57453082c25
2148
2707
  person_id:
2149
2708
  type: string
2150
2709
  format: uuid
2710
+ description: Person unique identifier
2711
+ example: b35b7fb5-df86-5776-b181-68564193d36
2151
2712
  description:
2152
2713
  type: string
2714
+ description: Day off description
2715
+ example: "Vacation"
2153
2716
  date:
2154
2717
  type: string
2155
2718
  format: date
2719
+ description: Day off start date
2720
+ example: "2022-07-15"
2156
2721
  end_date:
2157
2722
  type: string
2158
2723
  format: date
2159
- '400':
2724
+ description: Day off end date
2725
+ example: "2022-07-22"
2726
+ 400:
2160
2727
  description: Invalid date range parameters
2161
2728
  """
2162
2729
  user_service.check_project_access(project_id)