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
@@ -1,4 +1,5 @@
1
1
  from flask import current_app
2
+ from flask_jwt_extended import jwt_required
2
3
 
3
4
  from zou.app.models.preview_file import PreviewFile
4
5
  from zou.app.models.person import Person
@@ -14,6 +15,114 @@ class ImportShotgunVersionsResource(BaseImportShotgunResource):
14
15
  def __init__(self):
15
16
  BaseImportShotgunResource.__init__(self)
16
17
 
18
+ @jwt_required()
19
+ def post(self):
20
+ """
21
+ Import shotgun versions
22
+ ---
23
+ description: Import Shotgun versions (preview files). Send a list of
24
+ Shotgun version entries in the JSON body. Only versions linked to
25
+ tasks are imported. Returns created or updated preview files.
26
+ tags:
27
+ - Import
28
+ requestBody:
29
+ required: true
30
+ content:
31
+ application/json:
32
+ schema:
33
+ type: array
34
+ items:
35
+ type: object
36
+ properties:
37
+ id:
38
+ type: integer
39
+ description: Shotgun ID of the version
40
+ example: 12345
41
+ code:
42
+ type: string
43
+ description: Version code
44
+ example: "v001"
45
+ description:
46
+ type: string
47
+ description: Version description
48
+ example: "First version"
49
+ sg_task:
50
+ type: object
51
+ description: Task information
52
+ properties:
53
+ id:
54
+ type: integer
55
+ example: 11111
56
+ user:
57
+ type: object
58
+ description: User information
59
+ properties:
60
+ id:
61
+ type: integer
62
+ example: 22222
63
+ sg_uploaded_movie:
64
+ type: object
65
+ description: Uploaded movie information
66
+ properties:
67
+ url:
68
+ type: string
69
+ example: "https://example.com/movie.mp4"
70
+ name:
71
+ type: string
72
+ example: "movie.mp4"
73
+ example:
74
+ - id: 12345
75
+ code: "v001"
76
+ description: "First version"
77
+ sg_task:
78
+ id: 11111
79
+ user:
80
+ id: 22222
81
+ sg_uploaded_movie:
82
+ url: "https://example.com/movie.mp4"
83
+ name: "movie.mp4"
84
+ responses:
85
+ 200:
86
+ description: Versions imported successfully
87
+ content:
88
+ application/json:
89
+ schema:
90
+ type: array
91
+ items:
92
+ type: object
93
+ properties:
94
+ id:
95
+ type: string
96
+ format: uuid
97
+ description: Preview file unique identifier
98
+ example: a24a6ea4-ce75-4665-a070-57453082c25
99
+ name:
100
+ type: string
101
+ description: Preview file name
102
+ example: "v001"
103
+ description:
104
+ type: string
105
+ description: Preview file description
106
+ example: "First version"
107
+ source:
108
+ type: string
109
+ description: Source of the preview
110
+ example: "Shotgun"
111
+ created_at:
112
+ type: string
113
+ format: date-time
114
+ description: Creation timestamp
115
+ example: "2024-01-15T10:30:00Z"
116
+ updated_at:
117
+ type: string
118
+ format: date-time
119
+ description: Update timestamp
120
+ example: "2024-01-15T11:00:00Z"
121
+ 400:
122
+ description: Invalid request body or data format error
123
+ """
124
+ return super().post()
125
+
17
126
  def prepare_import(self):
18
127
  self.person_ids = Person.get_id_map()
19
128
 
@@ -69,3 +178,49 @@ class ImportShotgunVersionsResource(BaseImportShotgunResource):
69
178
  class ImportRemoveShotgunVersionResource(ImportRemoveShotgunBaseResource):
70
179
  def __init__(self):
71
180
  ImportRemoveShotgunBaseResource.__init__(self, PreviewFile)
181
+
182
+ @jwt_required()
183
+ def post(self):
184
+ """
185
+ Remove shotgun version
186
+ ---
187
+ description: Remove a Shotgun version (preview file) from the
188
+ database. Provide the Shotgun entry ID in the JSON body.
189
+ tags:
190
+ - Import
191
+ requestBody:
192
+ required: true
193
+ content:
194
+ application/json:
195
+ schema:
196
+ type: object
197
+ required:
198
+ - id
199
+ properties:
200
+ id:
201
+ type: integer
202
+ description: Shotgun ID of the version to remove
203
+ example: 12345
204
+ example:
205
+ id: 12345
206
+ responses:
207
+ 200:
208
+ description: Removal result returned
209
+ content:
210
+ application/json:
211
+ schema:
212
+ type: object
213
+ properties:
214
+ success:
215
+ type: boolean
216
+ description: Whether the removal was successful
217
+ example: true
218
+ removed_instance_id:
219
+ type: string
220
+ format: uuid
221
+ description: ID of the removed version, if found
222
+ example: a24a6ea4-ce75-4665-a070-57453082c25
223
+ 400:
224
+ description: Invalid request body or instance not found
225
+ """
226
+ return super().post()