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