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
@@ -24,6 +24,150 @@ class WorkingFilesResource(BaseModelsResource):
24
24
  user_service.block_access_to_vendor()
25
25
  return True
26
26
 
27
+ @jwt_required()
28
+ def get(self):
29
+ """
30
+ Get working files
31
+ ---
32
+ tags:
33
+ - Crud
34
+ description: Retrieve all working files. Supports filtering via
35
+ query parameters and pagination. Vendor access is blocked.
36
+ Includes project permission filtering for non-admin users.
37
+ parameters:
38
+ - in: query
39
+ name: page
40
+ required: false
41
+ schema:
42
+ type: integer
43
+ example: 1
44
+ description: Page number for pagination
45
+ - in: query
46
+ name: limit
47
+ required: false
48
+ schema:
49
+ type: integer
50
+ example: 50
51
+ description: Number of results per page
52
+ - in: query
53
+ name: relations
54
+ required: false
55
+ schema:
56
+ type: boolean
57
+ default: false
58
+ example: false
59
+ description: Whether to include relations
60
+ responses:
61
+ 200:
62
+ description: Working files retrieved successfully
63
+ content:
64
+ application/json:
65
+ schema:
66
+ oneOf:
67
+ - type: array
68
+ items:
69
+ type: object
70
+ - type: object
71
+ properties:
72
+ data:
73
+ type: array
74
+ items:
75
+ type: object
76
+ example: []
77
+ total:
78
+ type: integer
79
+ example: 100
80
+ nb_pages:
81
+ type: integer
82
+ example: 2
83
+ limit:
84
+ type: integer
85
+ example: 50
86
+ offset:
87
+ type: integer
88
+ example: 0
89
+ page:
90
+ type: integer
91
+ example: 1
92
+ 400:
93
+ description: Invalid filter format or query error
94
+ """
95
+ return super().get()
96
+
97
+ @jwt_required()
98
+ def post(self):
99
+ """
100
+ Create working file
101
+ ---
102
+ tags:
103
+ - Crud
104
+ description: Create a new working file with data provided in the
105
+ request body. JSON format is expected.
106
+ requestBody:
107
+ required: true
108
+ content:
109
+ application/json:
110
+ schema:
111
+ type: object
112
+ required:
113
+ - name
114
+ - task_id
115
+ - entity_id
116
+ properties:
117
+ name:
118
+ type: string
119
+ example: work_file_v001
120
+ task_id:
121
+ type: string
122
+ format: uuid
123
+ example: a24a6ea4-ce75-4665-a070-57453082c25
124
+ entity_id:
125
+ type: string
126
+ format: uuid
127
+ example: b24a6ea4-ce75-4665-a070-57453082c25
128
+ revision:
129
+ type: integer
130
+ default: 1
131
+ example: 1
132
+ responses:
133
+ 201:
134
+ description: Working file created successfully
135
+ content:
136
+ application/json:
137
+ schema:
138
+ type: object
139
+ properties:
140
+ id:
141
+ type: string
142
+ format: uuid
143
+ example: a24a6ea4-ce75-4665-a070-57453082c25
144
+ name:
145
+ type: string
146
+ example: work_file_v001
147
+ task_id:
148
+ type: string
149
+ format: uuid
150
+ example: b24a6ea4-ce75-4665-a070-57453082c25
151
+ entity_id:
152
+ type: string
153
+ format: uuid
154
+ example: c24a6ea4-ce75-4665-a070-57453082c25
155
+ revision:
156
+ type: integer
157
+ example: 1
158
+ created_at:
159
+ type: string
160
+ format: date-time
161
+ example: "2024-01-15T10:30:00Z"
162
+ updated_at:
163
+ type: string
164
+ format: date-time
165
+ example: "2024-01-15T10:30:00Z"
166
+ 400:
167
+ description: Invalid data format or validation error
168
+ """
169
+ return super().post()
170
+
27
171
  def add_project_permission_filter(self, query):
28
172
  """
29
173
  Filtering to keep only the files from projects available to the user's
@@ -54,28 +198,147 @@ class WorkingFileResource(BaseModelResource):
54
198
  user_service.check_task_action_access(working_file["task_id"])
55
199
  return True
56
200
 
201
+ @jwt_required()
202
+ def put(self, instance_id):
203
+ """
204
+ Update working file
205
+ ---
206
+ tags:
207
+ - Crud
208
+ description: Update a working file with data provided in the
209
+ request body. JSON format is expected. Requires task action
210
+ access.
211
+ parameters:
212
+ - in: path
213
+ name: instance_id
214
+ required: true
215
+ schema:
216
+ type: string
217
+ format: uuid
218
+ example: a24a6ea4-ce75-4665-a070-57453082c25
219
+ requestBody:
220
+ required: true
221
+ content:
222
+ application/json:
223
+ schema:
224
+ type: object
225
+ properties:
226
+ name:
227
+ type: string
228
+ example: updated_work_file_v001
229
+ revision:
230
+ type: integer
231
+ example: 2
232
+ responses:
233
+ 200:
234
+ description: Working file updated successfully
235
+ content:
236
+ application/json:
237
+ schema:
238
+ type: object
239
+ properties:
240
+ id:
241
+ type: string
242
+ format: uuid
243
+ example: a24a6ea4-ce75-4665-a070-57453082c25
244
+ name:
245
+ type: string
246
+ example: updated_work_file_v001
247
+ task_id:
248
+ type: string
249
+ format: uuid
250
+ example: b24a6ea4-ce75-4665-a070-57453082c25
251
+ entity_id:
252
+ type: string
253
+ format: uuid
254
+ example: c24a6ea4-ce75-4665-a070-57453082c25
255
+ revision:
256
+ type: integer
257
+ example: 2
258
+ created_at:
259
+ type: string
260
+ format: date-time
261
+ example: "2024-01-15T10:30:00Z"
262
+ updated_at:
263
+ type: string
264
+ format: date-time
265
+ example: "2024-01-15T11:00:00Z"
266
+ 400:
267
+ description: Invalid data format or validation error
268
+ """
269
+ return super().put(instance_id)
270
+
271
+ @jwt_required()
272
+ def delete(self, instance_id):
273
+ """
274
+ Delete working file
275
+ ---
276
+ tags:
277
+ - Crud
278
+ description: Delete a working file by its ID. Returns empty
279
+ response on success.
280
+ parameters:
281
+ - in: path
282
+ name: instance_id
283
+ required: true
284
+ schema:
285
+ type: string
286
+ format: uuid
287
+ example: a24a6ea4-ce75-4665-a070-57453082c25
288
+ responses:
289
+ 204:
290
+ description: Working file deleted successfully
291
+ 400:
292
+ description: Integrity error or cannot delete
293
+ """
294
+ return super().delete(instance_id)
295
+
57
296
  @jwt_required()
58
297
  def get(self, instance_id):
59
298
  """
60
- Retrieve a working file corresponding at given ID and return it as a
61
- JSON object.
299
+ Get working file
62
300
  ---
63
301
  tags:
64
302
  - Crud
303
+ description: Retrieve a working file instance by its ID and return
304
+ it as a JSON object.
65
305
  parameters:
66
306
  - in: path
67
- name: working_file_id
68
- required: True
69
- type: string
70
- format: uuid
307
+ name: instance_id
308
+ required: true
309
+ schema:
310
+ type: string
311
+ format: uuid
71
312
  example: a24a6ea4-ce75-4665-a070-57453082c25
72
313
  responses:
73
314
  200:
74
- description: Model as a JSON object
315
+ description: Working file retrieved successfully
316
+ content:
317
+ application/json:
318
+ schema:
319
+ type: object
320
+ properties:
321
+ id:
322
+ type: string
323
+ format: uuid
324
+ example: a24a6ea4-ce75-4665-a070-57453082c25
325
+ name:
326
+ type: string
327
+ example: work_file_v001
328
+ task_id:
329
+ type: string
330
+ format: uuid
331
+ example: b24a6ea4-ce75-4665-a070-57453082c25
332
+ created_at:
333
+ type: string
334
+ format: date-time
335
+ example: "2024-01-15T10:30:00Z"
336
+ updated_at:
337
+ type: string
338
+ format: date-time
339
+ example: "2024-01-15T10:30:00Z"
75
340
  400:
76
- description: Statement error
77
- 404:
78
- description: Value error
341
+ description: Invalid ID format or query error
79
342
  """
80
343
  try:
81
344
  working_file = files_service.get_working_file(instance_id)