zou 0.20.82__py3-none-any.whl → 0.20.84__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 (114) hide show
  1. zou/__init__.py +1 -1
  2. zou/app/blueprints/assets/resources.py +1060 -153
  3. zou/app/blueprints/auth/resources.py +368 -238
  4. zou/app/blueprints/breakdown/resources.py +584 -94
  5. zou/app/blueprints/chats/resources.py +176 -37
  6. zou/app/blueprints/comments/resources.py +409 -150
  7. zou/app/blueprints/concepts/resources.py +443 -63
  8. zou/app/blueprints/crud/asset_instance.py +272 -0
  9. zou/app/blueprints/crud/attachment_file.py +263 -0
  10. zou/app/blueprints/crud/base.py +176 -69
  11. zou/app/blueprints/crud/budget.py +278 -0
  12. zou/app/blueprints/crud/budget_entry.py +269 -0
  13. zou/app/blueprints/crud/chat.py +282 -0
  14. zou/app/blueprints/crud/chat_message.py +286 -0
  15. zou/app/blueprints/crud/comments.py +312 -1
  16. zou/app/blueprints/crud/custom_action.py +268 -0
  17. zou/app/blueprints/crud/day_off.py +298 -0
  18. zou/app/blueprints/crud/department.py +268 -0
  19. zou/app/blueprints/crud/entity.py +297 -3
  20. zou/app/blueprints/crud/entity_link.py +303 -0
  21. zou/app/blueprints/crud/entity_type.py +269 -0
  22. zou/app/blueprints/crud/event.py +197 -0
  23. zou/app/blueprints/crud/file_status.py +268 -0
  24. zou/app/blueprints/crud/hardware_item.py +268 -0
  25. zou/app/blueprints/crud/metadata_descriptor.py +312 -0
  26. zou/app/blueprints/crud/milestone.py +302 -1
  27. zou/app/blueprints/crud/news.py +285 -0
  28. zou/app/blueprints/crud/notification.py +287 -0
  29. zou/app/blueprints/crud/organisation.py +269 -0
  30. zou/app/blueprints/crud/output_file.py +34 -10
  31. zou/app/blueprints/crud/output_type.py +30 -10
  32. zou/app/blueprints/crud/person.py +407 -2
  33. zou/app/blueprints/crud/playlist.py +322 -4
  34. zou/app/blueprints/crud/plugin.py +269 -0
  35. zou/app/blueprints/crud/preview_background_file.py +272 -0
  36. zou/app/blueprints/crud/preview_file.py +280 -9
  37. zou/app/blueprints/crud/production_schedule_version.py +569 -0
  38. zou/app/blueprints/crud/project.py +440 -0
  39. zou/app/blueprints/crud/project_status.py +268 -0
  40. zou/app/blueprints/crud/salary_scale.py +185 -5
  41. zou/app/blueprints/crud/schedule_item.py +305 -0
  42. zou/app/blueprints/crud/search_filter.py +302 -0
  43. zou/app/blueprints/crud/search_filter_group.py +270 -0
  44. zou/app/blueprints/crud/software.py +30 -10
  45. zou/app/blueprints/crud/status_automation.py +296 -2
  46. zou/app/blueprints/crud/studio.py +268 -0
  47. zou/app/blueprints/crud/subscription.py +279 -0
  48. zou/app/blueprints/crud/task.py +325 -5
  49. zou/app/blueprints/crud/task_status.py +301 -0
  50. zou/app/blueprints/crud/task_type.py +283 -0
  51. zou/app/blueprints/crud/time_spent.py +327 -0
  52. zou/app/blueprints/crud/working_file.py +273 -10
  53. zou/app/blueprints/departments/resources.py +302 -68
  54. zou/app/blueprints/edits/resources.py +651 -81
  55. zou/app/blueprints/entities/resources.py +104 -39
  56. zou/app/blueprints/events/resources.py +96 -8
  57. zou/app/blueprints/export/csv/assets.py +15 -5
  58. zou/app/blueprints/export/csv/base.py +12 -3
  59. zou/app/blueprints/export/csv/casting.py +32 -5
  60. zou/app/blueprints/export/csv/edits.py +15 -5
  61. zou/app/blueprints/export/csv/persons.py +24 -0
  62. zou/app/blueprints/export/csv/playlists.py +16 -5
  63. zou/app/blueprints/export/csv/projects.py +23 -0
  64. zou/app/blueprints/export/csv/shots.py +15 -5
  65. zou/app/blueprints/export/csv/task_types.py +23 -0
  66. zou/app/blueprints/export/csv/tasks.py +24 -0
  67. zou/app/blueprints/export/csv/time_spents.py +24 -0
  68. zou/app/blueprints/files/resources.py +928 -377
  69. zou/app/blueprints/index/resources.py +49 -42
  70. zou/app/blueprints/news/resources.py +47 -27
  71. zou/app/blueprints/persons/resources.py +644 -271
  72. zou/app/blueprints/playlists/resources.py +154 -72
  73. zou/app/blueprints/previews/resources.py +473 -228
  74. zou/app/blueprints/projects/__init__.py +5 -0
  75. zou/app/blueprints/projects/resources.py +987 -420
  76. zou/app/blueprints/search/resources.py +44 -32
  77. zou/app/blueprints/shots/resources.py +1338 -88
  78. zou/app/blueprints/source/csv/assets.py +44 -6
  79. zou/app/blueprints/source/csv/casting.py +43 -6
  80. zou/app/blueprints/source/csv/edits.py +47 -9
  81. zou/app/blueprints/source/csv/persons.py +43 -4
  82. zou/app/blueprints/source/csv/shots.py +47 -6
  83. zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
  84. zou/app/blueprints/source/kitsu.py +433 -11
  85. zou/app/blueprints/source/otio.py +215 -20
  86. zou/app/blueprints/source/shotgun/assets.py +146 -0
  87. zou/app/blueprints/source/shotgun/base.py +85 -14
  88. zou/app/blueprints/source/shotgun/episode.py +124 -0
  89. zou/app/blueprints/source/shotgun/import_errors.py +105 -14
  90. zou/app/blueprints/source/shotgun/notes.py +132 -0
  91. zou/app/blueprints/source/shotgun/person.py +163 -0
  92. zou/app/blueprints/source/shotgun/project.py +120 -0
  93. zou/app/blueprints/source/shotgun/scene.py +120 -0
  94. zou/app/blueprints/source/shotgun/sequence.py +134 -0
  95. zou/app/blueprints/source/shotgun/shot.py +166 -0
  96. zou/app/blueprints/source/shotgun/status.py +129 -0
  97. zou/app/blueprints/source/shotgun/steps.py +138 -0
  98. zou/app/blueprints/source/shotgun/tasks.py +199 -0
  99. zou/app/blueprints/source/shotgun/team.py +132 -0
  100. zou/app/blueprints/source/shotgun/versions.py +155 -0
  101. zou/app/blueprints/tasks/resources.py +1197 -308
  102. zou/app/blueprints/user/resources.py +1808 -215
  103. zou/app/models/metadata_descriptor.py +1 -0
  104. zou/app/services/persons_service.py +1 -1
  105. zou/app/services/projects_service.py +45 -1
  106. zou/app/services/time_spents_service.py +1 -1
  107. zou/app/swagger.py +100 -27
  108. zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
  109. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/METADATA +18 -18
  110. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/RECORD +114 -113
  111. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
  112. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
  113. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
  114. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
@@ -26,24 +26,63 @@ class BaseImportKitsuResource(Resource, ArgsMixin):
26
26
  @jwt_required()
27
27
  def post(self):
28
28
  """
29
- Import Kitsu resource.
29
+ Import kitsu resource
30
30
  ---
31
31
  tags:
32
32
  - Import
33
- parameters:
34
- - in: body
35
- name: entries
36
- required: True
37
- schema:
33
+ description: Import Kitsu resources. Send a list of Kitsu entries in
34
+ the JSON body. Returns created or updated resources.
35
+ requestBody:
36
+ required: true
37
+ content:
38
+ application/json:
39
+ schema:
38
40
  type: array
39
41
  items:
40
- type: object
41
- properties:
42
- id:
43
- type: string
42
+ type: object
43
+ properties:
44
+ id:
45
+ type: string
46
+ format: uuid
47
+ example: a24a6ea4-ce75-4665-a070-57453082c25
48
+ name:
49
+ type: string
50
+ example: Resource name
51
+ project_id:
52
+ type: string
53
+ format: uuid
54
+ example: b24a6ea4-ce75-4665-a070-57453082c25
55
+ example:
56
+ - id: a24a6ea4-ce75-4665-a070-57453082c25
57
+ name: Example resource
58
+ project_id: b24a6ea4-ce75-4665-a070-57453082c25
44
59
  responses:
45
60
  200:
46
- description: Resource imported
61
+ description: Resources imported successfully
62
+ content:
63
+ application/json:
64
+ schema:
65
+ type: array
66
+ items:
67
+ type: object
68
+ properties:
69
+ id:
70
+ type: string
71
+ format: uuid
72
+ example: a24a6ea4-ce75-4665-a070-57453082c25
73
+ name:
74
+ type: string
75
+ example: Imported resource
76
+ created_at:
77
+ type: string
78
+ format: date-time
79
+ example: "2024-01-15T10:30:00Z"
80
+ updated_at:
81
+ type: string
82
+ format: date-time
83
+ example: "2024-01-15T11:00:00Z"
84
+ 400:
85
+ description: Invalid request body or missing required fields
47
86
  """
48
87
  kitsu_entries = request.json
49
88
  if not isinstance(kitsu_entries, list):
@@ -77,6 +116,83 @@ class ImportKitsuCommentsResource(BaseImportKitsuResource):
77
116
  BaseImportKitsuResource.__init__(self, Entity)
78
117
  user_service.check_project_manager_access()
79
118
 
119
+ @jwt_required()
120
+ def post(self):
121
+ """
122
+ Import kitsu comments
123
+ ---
124
+ description: Import Kitsu comments. Send a list of Kitsu comment
125
+ entries in the JSON body. Returns created or updated comments
126
+ linked to tasks.
127
+ tags:
128
+ - Import
129
+ requestBody:
130
+ required: true
131
+ content:
132
+ application/json:
133
+ schema:
134
+ type: array
135
+ items:
136
+ type: object
137
+ properties:
138
+ id:
139
+ type: string
140
+ format: uuid
141
+ description: Kitsu ID of the comment
142
+ example: a24a6ea4-ce75-4665-a070-57453082c25
143
+ object_id:
144
+ type: string
145
+ format: uuid
146
+ description: Task ID the comment is linked to
147
+ example: b24a6ea4-ce75-4665-a070-57453082c25
148
+ text:
149
+ type: string
150
+ description: Comment text
151
+ example: "This is a comment"
152
+ person_id:
153
+ type: string
154
+ format: uuid
155
+ description: Person who created the comment
156
+ example: c24a6ea4-ce75-4665-a070-57453082c25
157
+ example:
158
+ - id: a24a6ea4-ce75-4665-a070-57453082c25
159
+ object_id: b24a6ea4-ce75-4665-a070-57453082c25
160
+ text: "This is a comment"
161
+ person_id: c24a6ea4-ce75-4665-a070-57453082c25
162
+ responses:
163
+ 200:
164
+ description: Comments imported successfully
165
+ content:
166
+ application/json:
167
+ schema:
168
+ type: array
169
+ items:
170
+ type: object
171
+ properties:
172
+ id:
173
+ type: string
174
+ format: uuid
175
+ description: Comment unique identifier
176
+ example: a24a6ea4-ce75-4665-a070-57453082c25
177
+ text:
178
+ type: string
179
+ description: Comment text
180
+ example: "This is a comment"
181
+ created_at:
182
+ type: string
183
+ format: date-time
184
+ description: Creation timestamp
185
+ example: "2024-01-15T10:30:00Z"
186
+ updated_at:
187
+ type: string
188
+ format: date-time
189
+ description: Update timestamp
190
+ example: "2024-01-15T11:00:00Z"
191
+ 400:
192
+ description: Invalid request body or missing required fields
193
+ """
194
+ return super().post()
195
+
80
196
  def check_access(self, entry):
81
197
  try:
82
198
  task = tasks_service.get_task(str(entry.object_id))
@@ -100,6 +216,83 @@ class ImportKitsuEntitiesResource(BaseImportKitsuResource):
100
216
  def __init__(self):
101
217
  BaseImportKitsuResource.__init__(self, Entity)
102
218
 
219
+ @jwt_required()
220
+ def post(self):
221
+ """
222
+ Import kitsu entities
223
+ ---
224
+ description: Import Kitsu entities (assets, shots, sequences, etc.).
225
+ Send a list of Kitsu entity entries in the JSON body. Returns
226
+ created or updated entities.
227
+ tags:
228
+ - Import
229
+ requestBody:
230
+ required: true
231
+ content:
232
+ application/json:
233
+ schema:
234
+ type: array
235
+ items:
236
+ type: object
237
+ properties:
238
+ id:
239
+ type: string
240
+ format: uuid
241
+ description: Kitsu ID of the entity
242
+ example: a24a6ea4-ce75-4665-a070-57453082c25
243
+ name:
244
+ type: string
245
+ description: Entity name
246
+ example: "Asset01"
247
+ project_id:
248
+ type: string
249
+ format: uuid
250
+ description: Project ID
251
+ example: b24a6ea4-ce75-4665-a070-57453082c25
252
+ entity_type_id:
253
+ type: string
254
+ format: uuid
255
+ description: Entity type ID
256
+ example: c24a6ea4-ce75-4665-a070-57453082c25
257
+ example:
258
+ - id: a24a6ea4-ce75-4665-a070-57453082c25
259
+ name: "Asset01"
260
+ project_id: b24a6ea4-ce75-4665-a070-57453082c25
261
+ entity_type_id: c24a6ea4-ce75-4665-a070-57453082c25
262
+ responses:
263
+ 200:
264
+ description: Entities imported successfully
265
+ content:
266
+ application/json:
267
+ schema:
268
+ type: array
269
+ items:
270
+ type: object
271
+ properties:
272
+ id:
273
+ type: string
274
+ format: uuid
275
+ description: Entity unique identifier
276
+ example: a24a6ea4-ce75-4665-a070-57453082c25
277
+ name:
278
+ type: string
279
+ description: Entity name
280
+ example: "Asset01"
281
+ created_at:
282
+ type: string
283
+ format: date-time
284
+ description: Creation timestamp
285
+ example: "2024-01-15T10:30:00Z"
286
+ updated_at:
287
+ type: string
288
+ format: date-time
289
+ description: Update timestamp
290
+ example: "2024-01-15T11:00:00Z"
291
+ 400:
292
+ description: Invalid request body or missing required fields
293
+ """
294
+ return super().post()
295
+
103
296
  def check_access(self, entry):
104
297
  try:
105
298
  project_id = entry["project_id"]
@@ -122,6 +315,75 @@ class ImportKitsuProjectsResource(BaseImportKitsuResource):
122
315
  def __init__(self):
123
316
  BaseImportKitsuResource.__init__(self, Project)
124
317
 
318
+ @jwt_required()
319
+ def post(self):
320
+ """
321
+ Import kitsu projects
322
+ ---
323
+ description: Import Kitsu projects. Send a list of Kitsu project
324
+ entries in the JSON body. Returns created or updated projects.
325
+ tags:
326
+ - Import
327
+ requestBody:
328
+ required: true
329
+ content:
330
+ application/json:
331
+ schema:
332
+ type: array
333
+ items:
334
+ type: object
335
+ properties:
336
+ id:
337
+ type: string
338
+ format: uuid
339
+ description: Kitsu ID of the project
340
+ example: a24a6ea4-ce75-4665-a070-57453082c25
341
+ name:
342
+ type: string
343
+ description: Project name
344
+ example: "My Project"
345
+ production_type:
346
+ type: string
347
+ description: Production type
348
+ example: "tvshow"
349
+ example:
350
+ - id: a24a6ea4-ce75-4665-a070-57453082c25
351
+ name: "My Project"
352
+ production_type: "tvshow"
353
+ responses:
354
+ 200:
355
+ description: Projects imported successfully
356
+ content:
357
+ application/json:
358
+ schema:
359
+ type: array
360
+ items:
361
+ type: object
362
+ properties:
363
+ id:
364
+ type: string
365
+ format: uuid
366
+ description: Project unique identifier
367
+ example: a24a6ea4-ce75-4665-a070-57453082c25
368
+ name:
369
+ type: string
370
+ description: Project name
371
+ example: "My Project"
372
+ created_at:
373
+ type: string
374
+ format: date-time
375
+ description: Creation timestamp
376
+ example: "2024-01-15T10:30:00Z"
377
+ updated_at:
378
+ type: string
379
+ format: date-time
380
+ description: Update timestamp
381
+ example: "2024-01-15T11:00:00Z"
382
+ 400:
383
+ description: Invalid request body or missing required fields
384
+ """
385
+ return super().post()
386
+
125
387
  def emit_event(self, event_type, entry):
126
388
  events.emit("project:%s" % event_type, project_id=entry["id"])
127
389
 
@@ -130,6 +392,88 @@ class ImportKitsuTasksResource(BaseImportKitsuResource):
130
392
  def __init__(self):
131
393
  BaseImportKitsuResource.__init__(self, Task)
132
394
 
395
+ @jwt_required()
396
+ def post(self):
397
+ """
398
+ Import kitsu tasks
399
+ ---
400
+ description: Import Kitsu tasks. Send a list of Kitsu task entries in
401
+ the JSON body. Returns created or updated tasks.
402
+ tags:
403
+ - Import
404
+ requestBody:
405
+ required: true
406
+ content:
407
+ application/json:
408
+ schema:
409
+ type: array
410
+ items:
411
+ type: object
412
+ properties:
413
+ id:
414
+ type: string
415
+ format: uuid
416
+ description: Kitsu ID of the task
417
+ example: a24a6ea4-ce75-4665-a070-57453082c25
418
+ name:
419
+ type: string
420
+ description: Task name
421
+ example: "Modeling"
422
+ project_id:
423
+ type: string
424
+ format: uuid
425
+ description: Project ID
426
+ example: b24a6ea4-ce75-4665-a070-57453082c25
427
+ entity_id:
428
+ type: string
429
+ format: uuid
430
+ description: Entity ID the task is linked to
431
+ example: c24a6ea4-ce75-4665-a070-57453082c25
432
+ task_type_id:
433
+ type: string
434
+ format: uuid
435
+ description: Task type ID
436
+ example: d24a6ea4-ce75-4665-a070-57453082c25
437
+ example:
438
+ - id: a24a6ea4-ce75-4665-a070-57453082c25
439
+ name: "Modeling"
440
+ project_id: b24a6ea4-ce75-4665-a070-57453082c25
441
+ entity_id: c24a6ea4-ce75-4665-a070-57453082c25
442
+ task_type_id: d24a6ea4-ce75-4665-a070-57453082c25
443
+ responses:
444
+ 200:
445
+ description: Tasks imported successfully
446
+ content:
447
+ application/json:
448
+ schema:
449
+ type: array
450
+ items:
451
+ type: object
452
+ properties:
453
+ id:
454
+ type: string
455
+ format: uuid
456
+ description: Task unique identifier
457
+ example: a24a6ea4-ce75-4665-a070-57453082c25
458
+ name:
459
+ type: string
460
+ description: Task name
461
+ example: "Modeling"
462
+ created_at:
463
+ type: string
464
+ format: date-time
465
+ description: Creation timestamp
466
+ example: "2024-01-15T10:30:00Z"
467
+ updated_at:
468
+ type: string
469
+ format: date-time
470
+ description: Update timestamp
471
+ example: "2024-01-15T11:00:00Z"
472
+ 400:
473
+ description: Invalid request body or missing required fields
474
+ """
475
+ return super().post()
476
+
133
477
  def check_access(self, entry):
134
478
  try:
135
479
  project_id = entry["project_id"]
@@ -146,6 +490,84 @@ class ImportKitsuEntityLinksResource(BaseImportKitsuResource):
146
490
  def __init__(self):
147
491
  BaseImportKitsuResource.__init__(self, EntityLink)
148
492
 
493
+ @jwt_required()
494
+ def post(self):
495
+ """
496
+ Import kitsu entity links
497
+ ---
498
+ description: Import Kitsu entity links (casting links). Send a list
499
+ of Kitsu entity link entries in the JSON body. Returns created or
500
+ updated entity links.
501
+ tags:
502
+ - Import
503
+ requestBody:
504
+ required: true
505
+ content:
506
+ application/json:
507
+ schema:
508
+ type: array
509
+ items:
510
+ type: object
511
+ properties:
512
+ id:
513
+ type: string
514
+ format: uuid
515
+ description: Kitsu ID of the entity link
516
+ example: a24a6ea4-ce75-4665-a070-57453082c25
517
+ entity_in_id:
518
+ type: string
519
+ format: uuid
520
+ description: Source entity ID
521
+ example: b24a6ea4-ce75-4665-a070-57453082c25
522
+ entity_out_id:
523
+ type: string
524
+ format: uuid
525
+ description: Target entity ID
526
+ example: c24a6ea4-ce75-4665-a070-57453082c25
527
+ example:
528
+ - id: a24a6ea4-ce75-4665-a070-57453082c25
529
+ entity_in_id: b24a6ea4-ce75-4665-a070-57453082c25
530
+ entity_out_id: c24a6ea4-ce75-4665-a070-57453082c25
531
+ responses:
532
+ 200:
533
+ description: Entity links imported successfully
534
+ content:
535
+ application/json:
536
+ schema:
537
+ type: array
538
+ items:
539
+ type: object
540
+ properties:
541
+ id:
542
+ type: string
543
+ format: uuid
544
+ description: Entity link unique identifier
545
+ example: a24a6ea4-ce75-4665-a070-57453082c25
546
+ entity_in_id:
547
+ type: string
548
+ format: uuid
549
+ description: Source entity ID
550
+ example: b24a6ea4-ce75-4665-a070-57453082c25
551
+ entity_out_id:
552
+ type: string
553
+ format: uuid
554
+ description: Target entity ID
555
+ example: c24a6ea4-ce75-4665-a070-57453082c25
556
+ created_at:
557
+ type: string
558
+ format: date-time
559
+ description: Creation timestamp
560
+ example: "2024-01-15T10:30:00Z"
561
+ updated_at:
562
+ type: string
563
+ format: date-time
564
+ description: Update timestamp
565
+ example: "2024-01-15T11:00:00Z"
566
+ 400:
567
+ description: Invalid request body or missing required fields
568
+ """
569
+ return super().post()
570
+
149
571
  def check_access(self, entry):
150
572
  try:
151
573
  entity = entities_service.get_entity(entry["entity_in_id"])