zou 0.20.83__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 (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.84.dist-info}/METADATA +18 -18
  99. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/RECORD +103 -102
  100. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
  101. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
  102. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
  103. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,5 @@
1
+ from flask_jwt_extended import jwt_required
2
+
1
3
  from zou.app.models.playlist import Playlist
2
4
  from zou.app.services import user_service, playlists_service
3
5
 
@@ -12,6 +14,150 @@ class PlaylistsResource(BaseModelsResource):
12
14
  def check_read_permissions(self, options=None):
13
15
  return True
14
16
 
17
+ @jwt_required()
18
+ def get(self):
19
+ """
20
+ Get playlists
21
+ ---
22
+ tags:
23
+ - Crud
24
+ description: Retrieve all playlists. Supports filtering via query
25
+ parameters and pagination.
26
+ parameters:
27
+ - in: query
28
+ name: page
29
+ required: false
30
+ schema:
31
+ type: integer
32
+ example: 1
33
+ description: Page number for pagination
34
+ - in: query
35
+ name: limit
36
+ required: false
37
+ schema:
38
+ type: integer
39
+ example: 50
40
+ description: Number of results per page
41
+ - in: query
42
+ name: relations
43
+ required: false
44
+ schema:
45
+ type: boolean
46
+ default: false
47
+ example: false
48
+ description: Whether to include relations
49
+ responses:
50
+ 200:
51
+ description: Playlists retrieved successfully
52
+ content:
53
+ application/json:
54
+ schema:
55
+ oneOf:
56
+ - type: array
57
+ items:
58
+ type: object
59
+ - type: object
60
+ properties:
61
+ data:
62
+ type: array
63
+ items:
64
+ type: object
65
+ example: []
66
+ total:
67
+ type: integer
68
+ example: 100
69
+ nb_pages:
70
+ type: integer
71
+ example: 2
72
+ limit:
73
+ type: integer
74
+ example: 50
75
+ offset:
76
+ type: integer
77
+ example: 0
78
+ page:
79
+ type: integer
80
+ example: 1
81
+ 400:
82
+ description: Invalid filter format or query error
83
+ """
84
+ return super().get()
85
+
86
+ @jwt_required()
87
+ def post(self):
88
+ """
89
+ Create playlist
90
+ ---
91
+ tags:
92
+ - Crud
93
+ description: Create a new playlist with data provided in the
94
+ request body. JSON format is expected. Requires supervisor
95
+ access to the project.
96
+ requestBody:
97
+ required: true
98
+ content:
99
+ application/json:
100
+ schema:
101
+ type: object
102
+ required:
103
+ - name
104
+ - project_id
105
+ properties:
106
+ name:
107
+ type: string
108
+ example: Playlist Name
109
+ project_id:
110
+ type: string
111
+ format: uuid
112
+ example: a24a6ea4-ce75-4665-a070-57453082c25
113
+ episode_id:
114
+ type: string
115
+ format: uuid
116
+ example: b24a6ea4-ce75-4665-a070-57453082c25
117
+ task_type_id:
118
+ type: string
119
+ format: uuid
120
+ example: c24a6ea4-ce75-4665-a070-57453082c25
121
+ responses:
122
+ 201:
123
+ description: Playlist created successfully
124
+ content:
125
+ application/json:
126
+ schema:
127
+ type: object
128
+ properties:
129
+ id:
130
+ type: string
131
+ format: uuid
132
+ example: a24a6ea4-ce75-4665-a070-57453082c25
133
+ name:
134
+ type: string
135
+ example: Playlist Name
136
+ project_id:
137
+ type: string
138
+ format: uuid
139
+ example: b24a6ea4-ce75-4665-a070-57453082c25
140
+ episode_id:
141
+ type: string
142
+ format: uuid
143
+ example: c24a6ea4-ce75-4665-a070-57453082c25
144
+ task_type_id:
145
+ type: string
146
+ format: uuid
147
+ example: d24a6ea4-ce75-4665-a070-57453082c25
148
+ created_at:
149
+ type: string
150
+ format: date-time
151
+ example: "2024-01-15T10:30:00Z"
152
+ updated_at:
153
+ type: string
154
+ format: date-time
155
+ example: "2024-01-15T10:30:00Z"
156
+ 400:
157
+ description: Invalid data format or validation error
158
+ """
159
+ return super().post()
160
+
15
161
  def check_create_permissions(self, playlist):
16
162
  user_service.check_supervisor_project_access(playlist["project_id"])
17
163
 
@@ -34,6 +180,182 @@ class PlaylistResource(BaseModelResource):
34
180
  user_service.check_project_access(playlist["project_id"])
35
181
  user_service.block_access_to_vendor()
36
182
 
183
+ @jwt_required()
184
+ def get(self, instance_id):
185
+ """
186
+ Get playlist
187
+ ---
188
+ tags:
189
+ - Crud
190
+ description: Retrieve a playlist by its ID and return it as a JSON
191
+ object. Supports including relations. Requires project access.
192
+ Vendor access is blocked.
193
+ parameters:
194
+ - in: path
195
+ name: instance_id
196
+ required: true
197
+ schema:
198
+ type: string
199
+ format: uuid
200
+ example: a24a6ea4-ce75-4665-a070-57453082c25
201
+ - in: query
202
+ name: relations
203
+ required: false
204
+ schema:
205
+ type: boolean
206
+ default: true
207
+ example: true
208
+ description: Whether to include relations
209
+ responses:
210
+ 200:
211
+ description: Playlist retrieved successfully
212
+ content:
213
+ application/json:
214
+ schema:
215
+ type: object
216
+ properties:
217
+ id:
218
+ type: string
219
+ format: uuid
220
+ example: a24a6ea4-ce75-4665-a070-57453082c25
221
+ name:
222
+ type: string
223
+ example: Playlist Name
224
+ project_id:
225
+ type: string
226
+ format: uuid
227
+ example: b24a6ea4-ce75-4665-a070-57453082c25
228
+ episode_id:
229
+ type: string
230
+ format: uuid
231
+ example: c24a6ea4-ce75-4665-a070-57453082c25
232
+ task_type_id:
233
+ type: string
234
+ format: uuid
235
+ example: d24a6ea4-ce75-4665-a070-57453082c25
236
+ shots:
237
+ type: array
238
+ items:
239
+ type: object
240
+ example: []
241
+ created_at:
242
+ type: string
243
+ format: date-time
244
+ example: "2024-01-15T10:30:00Z"
245
+ updated_at:
246
+ type: string
247
+ format: date-time
248
+ example: "2024-01-15T10:30:00Z"
249
+ 400:
250
+ description: Invalid ID format or query error
251
+ """
252
+ return super().get(instance_id)
253
+
254
+ @jwt_required()
255
+ def put(self, instance_id):
256
+ """
257
+ Update playlist
258
+ ---
259
+ tags:
260
+ - Crud
261
+ description: Update a playlist with data provided in the request
262
+ body. JSON format is expected. Requires project access. Vendor
263
+ access is blocked.
264
+ parameters:
265
+ - in: path
266
+ name: instance_id
267
+ required: true
268
+ schema:
269
+ type: string
270
+ format: uuid
271
+ example: a24a6ea4-ce75-4665-a070-57453082c25
272
+ requestBody:
273
+ required: true
274
+ content:
275
+ application/json:
276
+ schema:
277
+ type: object
278
+ properties:
279
+ name:
280
+ type: string
281
+ example: Updated Playlist Name
282
+ shots:
283
+ type: array
284
+ items:
285
+ type: object
286
+ properties:
287
+ entity_id:
288
+ type: string
289
+ format: uuid
290
+ example: b24a6ea4-ce75-4665-a070-57453082c25
291
+ preview_file_id:
292
+ type: string
293
+ format: uuid
294
+ example: c24a6ea4-ce75-4665-a070-57453082c25
295
+ example: []
296
+ responses:
297
+ 200:
298
+ description: Playlist updated successfully
299
+ content:
300
+ application/json:
301
+ schema:
302
+ type: object
303
+ properties:
304
+ id:
305
+ type: string
306
+ format: uuid
307
+ example: a24a6ea4-ce75-4665-a070-57453082c25
308
+ name:
309
+ type: string
310
+ example: Updated Playlist Name
311
+ project_id:
312
+ type: string
313
+ format: uuid
314
+ example: b24a6ea4-ce75-4665-a070-57453082c25
315
+ shots:
316
+ type: array
317
+ items:
318
+ type: object
319
+ example: []
320
+ created_at:
321
+ type: string
322
+ format: date-time
323
+ example: "2024-01-15T10:30:00Z"
324
+ updated_at:
325
+ type: string
326
+ format: date-time
327
+ example: "2024-01-15T11:00:00Z"
328
+ 400:
329
+ description: Invalid data format or validation error
330
+ """
331
+ return super().put(instance_id)
332
+
333
+ @jwt_required()
334
+ def delete(self, instance_id):
335
+ """
336
+ Delete playlist
337
+ ---
338
+ tags:
339
+ - Crud
340
+ description: Delete a playlist by its ID. Returns empty response
341
+ on success.
342
+ parameters:
343
+ - in: path
344
+ name: instance_id
345
+ required: true
346
+ schema:
347
+ type: string
348
+ format: uuid
349
+ example: a24a6ea4-ce75-4665-a070-57453082c25
350
+ responses:
351
+ 204:
352
+ description: Playlist deleted successfully
353
+ 400:
354
+ description: Integrity error or cannot delete
355
+ """
356
+ playlists_service.remove_playlist(instance_id)
357
+ return "", 204
358
+
37
359
  def check_update_permissions(self, playlist, data):
38
360
  user_service.check_project_access(playlist["project_id"])
39
361
  user_service.block_access_to_vendor()
@@ -50,7 +372,3 @@ class PlaylistResource(BaseModelResource):
50
372
  ]
51
373
  data["shots"] = shots
52
374
  return data
53
-
54
- def delete(self, instance_id):
55
- playlists_service.remove_playlist(instance_id)
56
- return "", 204
@@ -1,3 +1,5 @@
1
+ from flask_jwt_extended import jwt_required
2
+
1
3
  from zou.app.models.plugin import Plugin
2
4
 
3
5
  from zou.app.blueprints.crud.base import BaseModelsResource, BaseModelResource
@@ -7,7 +9,274 @@ class PluginsResource(BaseModelsResource):
7
9
  def __init__(self):
8
10
  BaseModelsResource.__init__(self, Plugin)
9
11
 
12
+ @jwt_required()
13
+ def get(self):
14
+ """
15
+ Get plugins
16
+ ---
17
+ tags:
18
+ - Crud
19
+ description: Retrieve all plugins. Supports filtering via query
20
+ parameters and pagination.
21
+ parameters:
22
+ - in: query
23
+ name: page
24
+ required: false
25
+ schema:
26
+ type: integer
27
+ example: 1
28
+ description: Page number for pagination
29
+ - in: query
30
+ name: limit
31
+ required: false
32
+ schema:
33
+ type: integer
34
+ example: 50
35
+ description: Number of results per page
36
+ - in: query
37
+ name: relations
38
+ required: false
39
+ schema:
40
+ type: boolean
41
+ default: false
42
+ example: false
43
+ description: Whether to include relations
44
+ responses:
45
+ 200:
46
+ description: Plugins retrieved successfully
47
+ content:
48
+ application/json:
49
+ schema:
50
+ oneOf:
51
+ - type: array
52
+ items:
53
+ type: object
54
+ - type: object
55
+ properties:
56
+ data:
57
+ type: array
58
+ items:
59
+ type: object
60
+ example: []
61
+ total:
62
+ type: integer
63
+ example: 100
64
+ nb_pages:
65
+ type: integer
66
+ example: 2
67
+ limit:
68
+ type: integer
69
+ example: 50
70
+ offset:
71
+ type: integer
72
+ example: 0
73
+ page:
74
+ type: integer
75
+ example: 1
76
+ 400:
77
+ description: Invalid filter format or query error
78
+ """
79
+ return super().get()
80
+
81
+ @jwt_required()
82
+ def post(self):
83
+ """
84
+ Create plugin
85
+ ---
86
+ tags:
87
+ - Crud
88
+ description: Create a new plugin with data provided in the
89
+ request body. JSON format is expected.
90
+ requestBody:
91
+ required: true
92
+ content:
93
+ application/json:
94
+ schema:
95
+ type: object
96
+ required:
97
+ - name
98
+ properties:
99
+ name:
100
+ type: string
101
+ example: Plugin Name
102
+ active:
103
+ type: boolean
104
+ default: false
105
+ example: false
106
+ responses:
107
+ 201:
108
+ description: Plugin created successfully
109
+ content:
110
+ application/json:
111
+ schema:
112
+ type: object
113
+ properties:
114
+ id:
115
+ type: string
116
+ format: uuid
117
+ example: a24a6ea4-ce75-4665-a070-57453082c25
118
+ name:
119
+ type: string
120
+ example: Plugin Name
121
+ active:
122
+ type: boolean
123
+ example: false
124
+ created_at:
125
+ type: string
126
+ format: date-time
127
+ example: "2024-01-15T10:30:00Z"
128
+ updated_at:
129
+ type: string
130
+ format: date-time
131
+ example: "2024-01-15T10:30:00Z"
132
+ 400:
133
+ description: Invalid data format or validation error
134
+ """
135
+ return super().post()
136
+
10
137
 
11
138
  class PluginResource(BaseModelResource):
12
139
  def __init__(self):
13
140
  BaseModelResource.__init__(self, Plugin)
141
+
142
+ @jwt_required()
143
+ def get(self, instance_id):
144
+ """
145
+ Get plugin
146
+ ---
147
+ tags:
148
+ - Crud
149
+ description: Retrieve a plugin by its ID and return it as a JSON
150
+ object. Supports including relations.
151
+ parameters:
152
+ - in: path
153
+ name: instance_id
154
+ required: true
155
+ schema:
156
+ type: string
157
+ format: uuid
158
+ example: a24a6ea4-ce75-4665-a070-57453082c25
159
+ - in: query
160
+ name: relations
161
+ required: false
162
+ schema:
163
+ type: boolean
164
+ default: true
165
+ example: true
166
+ description: Whether to include relations
167
+ responses:
168
+ 200:
169
+ description: Plugin retrieved successfully
170
+ content:
171
+ application/json:
172
+ schema:
173
+ type: object
174
+ properties:
175
+ id:
176
+ type: string
177
+ format: uuid
178
+ example: a24a6ea4-ce75-4665-a070-57453082c25
179
+ name:
180
+ type: string
181
+ example: Plugin Name
182
+ active:
183
+ type: boolean
184
+ example: false
185
+ created_at:
186
+ type: string
187
+ format: date-time
188
+ example: "2024-01-15T10:30:00Z"
189
+ updated_at:
190
+ type: string
191
+ format: date-time
192
+ example: "2024-01-15T10:30:00Z"
193
+ 400:
194
+ description: Invalid ID format or query error
195
+ """
196
+ return super().get(instance_id)
197
+
198
+ @jwt_required()
199
+ def put(self, instance_id):
200
+ """
201
+ Update plugin
202
+ ---
203
+ tags:
204
+ - Crud
205
+ description: Update a plugin with data provided in the request
206
+ body. JSON format is expected.
207
+ parameters:
208
+ - in: path
209
+ name: instance_id
210
+ required: true
211
+ schema:
212
+ type: string
213
+ format: uuid
214
+ example: a24a6ea4-ce75-4665-a070-57453082c25
215
+ requestBody:
216
+ required: true
217
+ content:
218
+ application/json:
219
+ schema:
220
+ type: object
221
+ properties:
222
+ name:
223
+ type: string
224
+ example: Updated Plugin Name
225
+ active:
226
+ type: boolean
227
+ example: true
228
+ responses:
229
+ 200:
230
+ description: Plugin updated successfully
231
+ content:
232
+ application/json:
233
+ schema:
234
+ type: object
235
+ properties:
236
+ id:
237
+ type: string
238
+ format: uuid
239
+ example: a24a6ea4-ce75-4665-a070-57453082c25
240
+ name:
241
+ type: string
242
+ example: Updated Plugin Name
243
+ active:
244
+ type: boolean
245
+ example: true
246
+ created_at:
247
+ type: string
248
+ format: date-time
249
+ example: "2024-01-15T10:30:00Z"
250
+ updated_at:
251
+ type: string
252
+ format: date-time
253
+ example: "2024-01-15T11:00:00Z"
254
+ 400:
255
+ description: Invalid data format or validation error
256
+ """
257
+ return super().put(instance_id)
258
+
259
+ @jwt_required()
260
+ def delete(self, instance_id):
261
+ """
262
+ Delete plugin
263
+ ---
264
+ tags:
265
+ - Crud
266
+ description: Delete a plugin by its ID. Returns empty response
267
+ on success.
268
+ parameters:
269
+ - in: path
270
+ name: instance_id
271
+ required: true
272
+ schema:
273
+ type: string
274
+ format: uuid
275
+ example: a24a6ea4-ce75-4665-a070-57453082c25
276
+ responses:
277
+ 204:
278
+ description: Plugin deleted successfully
279
+ 400:
280
+ description: Integrity error or cannot delete
281
+ """
282
+ return super().delete(instance_id)