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.
- zou/__init__.py +1 -1
- zou/app/blueprints/assets/resources.py +1060 -153
- zou/app/blueprints/auth/resources.py +368 -238
- zou/app/blueprints/breakdown/resources.py +584 -94
- zou/app/blueprints/chats/resources.py +176 -37
- zou/app/blueprints/comments/resources.py +409 -150
- zou/app/blueprints/concepts/resources.py +443 -63
- zou/app/blueprints/crud/asset_instance.py +272 -0
- zou/app/blueprints/crud/attachment_file.py +263 -0
- zou/app/blueprints/crud/base.py +176 -69
- zou/app/blueprints/crud/budget.py +278 -0
- zou/app/blueprints/crud/budget_entry.py +269 -0
- zou/app/blueprints/crud/chat.py +282 -0
- zou/app/blueprints/crud/chat_message.py +286 -0
- zou/app/blueprints/crud/comments.py +312 -1
- zou/app/blueprints/crud/custom_action.py +268 -0
- zou/app/blueprints/crud/day_off.py +298 -0
- zou/app/blueprints/crud/department.py +268 -0
- zou/app/blueprints/crud/entity.py +297 -3
- zou/app/blueprints/crud/entity_link.py +303 -0
- zou/app/blueprints/crud/entity_type.py +269 -0
- zou/app/blueprints/crud/event.py +197 -0
- zou/app/blueprints/crud/file_status.py +268 -0
- zou/app/blueprints/crud/hardware_item.py +268 -0
- zou/app/blueprints/crud/metadata_descriptor.py +312 -0
- zou/app/blueprints/crud/milestone.py +302 -1
- zou/app/blueprints/crud/news.py +285 -0
- zou/app/blueprints/crud/notification.py +287 -0
- zou/app/blueprints/crud/organisation.py +269 -0
- zou/app/blueprints/crud/output_file.py +34 -10
- zou/app/blueprints/crud/output_type.py +30 -10
- zou/app/blueprints/crud/person.py +407 -2
- zou/app/blueprints/crud/playlist.py +322 -4
- zou/app/blueprints/crud/plugin.py +269 -0
- zou/app/blueprints/crud/preview_background_file.py +272 -0
- zou/app/blueprints/crud/preview_file.py +280 -9
- zou/app/blueprints/crud/production_schedule_version.py +569 -0
- zou/app/blueprints/crud/project.py +440 -0
- zou/app/blueprints/crud/project_status.py +268 -0
- zou/app/blueprints/crud/salary_scale.py +185 -5
- zou/app/blueprints/crud/schedule_item.py +305 -0
- zou/app/blueprints/crud/search_filter.py +302 -0
- zou/app/blueprints/crud/search_filter_group.py +270 -0
- zou/app/blueprints/crud/software.py +30 -10
- zou/app/blueprints/crud/status_automation.py +296 -2
- zou/app/blueprints/crud/studio.py +268 -0
- zou/app/blueprints/crud/subscription.py +279 -0
- zou/app/blueprints/crud/task.py +325 -5
- zou/app/blueprints/crud/task_status.py +301 -0
- zou/app/blueprints/crud/task_type.py +283 -0
- zou/app/blueprints/crud/time_spent.py +327 -0
- zou/app/blueprints/crud/working_file.py +273 -10
- zou/app/blueprints/departments/resources.py +302 -68
- zou/app/blueprints/edits/resources.py +651 -81
- zou/app/blueprints/entities/resources.py +104 -39
- zou/app/blueprints/events/resources.py +96 -8
- zou/app/blueprints/export/csv/assets.py +15 -5
- zou/app/blueprints/export/csv/base.py +12 -3
- zou/app/blueprints/export/csv/casting.py +32 -5
- zou/app/blueprints/export/csv/edits.py +15 -5
- zou/app/blueprints/export/csv/persons.py +24 -0
- zou/app/blueprints/export/csv/playlists.py +16 -5
- zou/app/blueprints/export/csv/projects.py +23 -0
- zou/app/blueprints/export/csv/shots.py +15 -5
- zou/app/blueprints/export/csv/task_types.py +23 -0
- zou/app/blueprints/export/csv/tasks.py +24 -0
- zou/app/blueprints/export/csv/time_spents.py +24 -0
- zou/app/blueprints/files/resources.py +928 -377
- zou/app/blueprints/index/resources.py +49 -42
- zou/app/blueprints/news/resources.py +47 -27
- zou/app/blueprints/persons/resources.py +644 -271
- zou/app/blueprints/playlists/resources.py +154 -72
- zou/app/blueprints/previews/resources.py +473 -228
- zou/app/blueprints/projects/__init__.py +5 -0
- zou/app/blueprints/projects/resources.py +987 -420
- zou/app/blueprints/search/resources.py +44 -32
- zou/app/blueprints/shots/resources.py +1338 -88
- zou/app/blueprints/source/csv/assets.py +44 -6
- zou/app/blueprints/source/csv/casting.py +43 -6
- zou/app/blueprints/source/csv/edits.py +47 -9
- zou/app/blueprints/source/csv/persons.py +43 -4
- zou/app/blueprints/source/csv/shots.py +47 -6
- zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
- zou/app/blueprints/source/kitsu.py +433 -11
- zou/app/blueprints/source/otio.py +215 -20
- zou/app/blueprints/source/shotgun/assets.py +146 -0
- zou/app/blueprints/source/shotgun/base.py +85 -14
- zou/app/blueprints/source/shotgun/episode.py +124 -0
- zou/app/blueprints/source/shotgun/import_errors.py +105 -14
- zou/app/blueprints/source/shotgun/notes.py +132 -0
- zou/app/blueprints/source/shotgun/person.py +163 -0
- zou/app/blueprints/source/shotgun/project.py +120 -0
- zou/app/blueprints/source/shotgun/scene.py +120 -0
- zou/app/blueprints/source/shotgun/sequence.py +134 -0
- zou/app/blueprints/source/shotgun/shot.py +166 -0
- zou/app/blueprints/source/shotgun/status.py +129 -0
- zou/app/blueprints/source/shotgun/steps.py +138 -0
- zou/app/blueprints/source/shotgun/tasks.py +199 -0
- zou/app/blueprints/source/shotgun/team.py +132 -0
- zou/app/blueprints/source/shotgun/versions.py +155 -0
- zou/app/blueprints/tasks/resources.py +1197 -308
- zou/app/blueprints/user/resources.py +1808 -215
- zou/app/models/metadata_descriptor.py +1 -0
- zou/app/services/persons_service.py +1 -1
- zou/app/services/projects_service.py +45 -1
- zou/app/services/time_spents_service.py +1 -1
- zou/app/swagger.py +100 -27
- zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
- {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/METADATA +18 -18
- {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/RECORD +114 -113
- {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
- {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
- {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
|
@@ -24,7 +24,6 @@ def check_criterion_access(criterions):
|
|
|
24
24
|
|
|
25
25
|
if "project_id" in criterions:
|
|
26
26
|
user_service.check_project_access(project_id)
|
|
27
|
-
|
|
28
27
|
return True
|
|
29
28
|
|
|
30
29
|
|
|
@@ -33,8 +32,9 @@ class AssetResource(Resource, ArgsMixin):
|
|
|
33
32
|
@jwt_required()
|
|
34
33
|
def get(self, asset_id):
|
|
35
34
|
"""
|
|
36
|
-
|
|
35
|
+
Get asset
|
|
37
36
|
---
|
|
37
|
+
description: Retrieve detailed information about a specific asset including metadata, project context, and related data
|
|
38
38
|
tags:
|
|
39
39
|
- Assets
|
|
40
40
|
parameters:
|
|
@@ -43,10 +43,45 @@ class AssetResource(Resource, ArgsMixin):
|
|
|
43
43
|
type: string
|
|
44
44
|
format: uuid
|
|
45
45
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
46
|
-
required:
|
|
46
|
+
required: true
|
|
47
|
+
description: Unique identifier of the asset
|
|
47
48
|
responses:
|
|
48
49
|
200:
|
|
49
|
-
description:
|
|
50
|
+
description: Asset information successfully retrieved
|
|
51
|
+
content:
|
|
52
|
+
application/json:
|
|
53
|
+
schema:
|
|
54
|
+
type: object
|
|
55
|
+
properties:
|
|
56
|
+
id:
|
|
57
|
+
type: string
|
|
58
|
+
format: uuid
|
|
59
|
+
description: Asset unique identifier
|
|
60
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
61
|
+
name:
|
|
62
|
+
type: string
|
|
63
|
+
description: Asset name
|
|
64
|
+
example: "Character Name"
|
|
65
|
+
project_id:
|
|
66
|
+
type: string
|
|
67
|
+
format: uuid
|
|
68
|
+
description: Project identifier
|
|
69
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
70
|
+
entity_type_id:
|
|
71
|
+
type: string
|
|
72
|
+
format: uuid
|
|
73
|
+
description: Asset type identifier
|
|
74
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
75
|
+
created_at:
|
|
76
|
+
type: string
|
|
77
|
+
format: date-time
|
|
78
|
+
description: Creation timestamp
|
|
79
|
+
example: "2023-01-01T12:00:00Z"
|
|
80
|
+
updated_at:
|
|
81
|
+
type: string
|
|
82
|
+
format: date-time
|
|
83
|
+
description: Last update timestamp
|
|
84
|
+
example: "2023-01-01T12:30:00Z"
|
|
50
85
|
"""
|
|
51
86
|
asset = assets_service.get_full_asset(asset_id)
|
|
52
87
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -56,8 +91,9 @@ class AssetResource(Resource, ArgsMixin):
|
|
|
56
91
|
@jwt_required()
|
|
57
92
|
def delete(self, asset_id):
|
|
58
93
|
"""
|
|
59
|
-
Delete
|
|
94
|
+
Delete asset
|
|
60
95
|
---
|
|
96
|
+
description: Permanently remove an asset from the system. Only asset creators or project managers can delete assets
|
|
61
97
|
tags:
|
|
62
98
|
- Assets
|
|
63
99
|
parameters:
|
|
@@ -66,10 +102,17 @@ class AssetResource(Resource, ArgsMixin):
|
|
|
66
102
|
type: string
|
|
67
103
|
format: uuid
|
|
68
104
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
69
|
-
required:
|
|
105
|
+
required: true
|
|
106
|
+
description: Unique identifier of the asset to delete
|
|
107
|
+
- in: query
|
|
108
|
+
name: force
|
|
109
|
+
type: boolean
|
|
110
|
+
required: false
|
|
111
|
+
description: Force deletion bypassing validation checks
|
|
112
|
+
example: false
|
|
70
113
|
responses:
|
|
71
114
|
204:
|
|
72
|
-
description:
|
|
115
|
+
description: Asset successfully deleted
|
|
73
116
|
"""
|
|
74
117
|
force = self.get_force()
|
|
75
118
|
|
|
@@ -88,14 +131,71 @@ class AllAssetsResource(Resource):
|
|
|
88
131
|
@jwt_required()
|
|
89
132
|
def get(self):
|
|
90
133
|
"""
|
|
91
|
-
|
|
92
|
-
Adds project name and asset type name.
|
|
134
|
+
Get all assets
|
|
93
135
|
---
|
|
136
|
+
description: Retrieve all production assets with filtering and pagination. Supports advanced filtering by project, asset type, task status, and other criteria
|
|
94
137
|
tags:
|
|
95
138
|
- Assets
|
|
139
|
+
parameters:
|
|
140
|
+
- in: query
|
|
141
|
+
name: project_id
|
|
142
|
+
type: string
|
|
143
|
+
format: uuid
|
|
144
|
+
description: Filter assets by specific project
|
|
145
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
146
|
+
- in: query
|
|
147
|
+
name: asset_type_id
|
|
148
|
+
type: string
|
|
149
|
+
format: uuid
|
|
150
|
+
description: Filter assets by asset type
|
|
151
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
152
|
+
- in: query
|
|
153
|
+
name: page
|
|
154
|
+
type: integer
|
|
155
|
+
description: Page number for pagination
|
|
156
|
+
example: 1
|
|
157
|
+
- in: query
|
|
158
|
+
name: limit
|
|
159
|
+
type: integer
|
|
160
|
+
description: Number of assets per page
|
|
161
|
+
example: 100
|
|
96
162
|
responses:
|
|
97
163
|
200:
|
|
98
|
-
description:
|
|
164
|
+
description: List of assets successfully retrieved
|
|
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: Asset unique identifier
|
|
176
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
177
|
+
name:
|
|
178
|
+
type: string
|
|
179
|
+
description: Asset name
|
|
180
|
+
example: "Character Name"
|
|
181
|
+
project_id:
|
|
182
|
+
type: string
|
|
183
|
+
format: uuid
|
|
184
|
+
description: Project identifier
|
|
185
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
186
|
+
entity_type_id:
|
|
187
|
+
type: string
|
|
188
|
+
format: uuid
|
|
189
|
+
description: Asset type identifier
|
|
190
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
191
|
+
project_name:
|
|
192
|
+
type: string
|
|
193
|
+
description: Project name
|
|
194
|
+
example: "My Project"
|
|
195
|
+
asset_type_name:
|
|
196
|
+
type: string
|
|
197
|
+
description: Asset type name
|
|
198
|
+
example: "Character"
|
|
99
199
|
"""
|
|
100
200
|
criterions = query.get_query_criterions_from_request(request)
|
|
101
201
|
check_criterion_access(criterions)
|
|
@@ -118,16 +218,72 @@ class AssetsAndTasksResource(Resource, ArgsMixin):
|
|
|
118
218
|
@jwt_required()
|
|
119
219
|
def get(self):
|
|
120
220
|
"""
|
|
121
|
-
|
|
122
|
-
Adds project name and asset type name and all related tasks.
|
|
123
|
-
If episode_id is given as parameter, it returns assets not linked
|
|
124
|
-
to an episode and assets linked to given episode.
|
|
221
|
+
Get assets with tasks
|
|
125
222
|
---
|
|
223
|
+
description: Retrieve all production assets with their related tasks. Includes project name, asset type name, and all associated tasks. Supports filtering by episode
|
|
126
224
|
tags:
|
|
127
225
|
- Assets
|
|
226
|
+
parameters:
|
|
227
|
+
- in: query
|
|
228
|
+
name: project_id
|
|
229
|
+
type: string
|
|
230
|
+
format: uuid
|
|
231
|
+
description: Filter assets by specific project
|
|
232
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
233
|
+
- in: query
|
|
234
|
+
name: episode_id
|
|
235
|
+
type: string
|
|
236
|
+
format: uuid
|
|
237
|
+
description: Filter assets by episode (returns assets not linked to episode and assets linked to given episode)
|
|
238
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
239
|
+
- in: query
|
|
240
|
+
name: asset_type_id
|
|
241
|
+
type: string
|
|
242
|
+
format: uuid
|
|
243
|
+
description: Filter assets by asset type
|
|
244
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
128
245
|
responses:
|
|
129
246
|
200:
|
|
130
|
-
description:
|
|
247
|
+
description: List of assets with tasks successfully retrieved
|
|
248
|
+
content:
|
|
249
|
+
application/json:
|
|
250
|
+
schema:
|
|
251
|
+
type: array
|
|
252
|
+
items:
|
|
253
|
+
type: object
|
|
254
|
+
properties:
|
|
255
|
+
id:
|
|
256
|
+
type: string
|
|
257
|
+
format: uuid
|
|
258
|
+
description: Asset unique identifier
|
|
259
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
260
|
+
name:
|
|
261
|
+
type: string
|
|
262
|
+
description: Asset name
|
|
263
|
+
example: "Character Name"
|
|
264
|
+
project_id:
|
|
265
|
+
type: string
|
|
266
|
+
format: uuid
|
|
267
|
+
description: Project identifier
|
|
268
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
269
|
+
entity_type_id:
|
|
270
|
+
type: string
|
|
271
|
+
format: uuid
|
|
272
|
+
description: Asset type identifier
|
|
273
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
274
|
+
project_name:
|
|
275
|
+
type: string
|
|
276
|
+
description: Project name
|
|
277
|
+
example: "My Project"
|
|
278
|
+
asset_type_name:
|
|
279
|
+
type: string
|
|
280
|
+
description: Asset type name
|
|
281
|
+
example: "Character"
|
|
282
|
+
tasks:
|
|
283
|
+
type: array
|
|
284
|
+
items:
|
|
285
|
+
type: object
|
|
286
|
+
description: Array of related tasks
|
|
131
287
|
"""
|
|
132
288
|
criterions = query.get_query_criterions_from_request(request)
|
|
133
289
|
check_criterion_access(criterions)
|
|
@@ -147,8 +303,9 @@ class AssetTypeResource(Resource):
|
|
|
147
303
|
@jwt_required()
|
|
148
304
|
def get(self, asset_type_id):
|
|
149
305
|
"""
|
|
150
|
-
|
|
306
|
+
Get asset type
|
|
151
307
|
---
|
|
308
|
+
description: Retrieve detailed information about a specific asset type including metadata and configuration
|
|
152
309
|
tags:
|
|
153
310
|
- Assets
|
|
154
311
|
parameters:
|
|
@@ -157,10 +314,35 @@ class AssetTypeResource(Resource):
|
|
|
157
314
|
type: string
|
|
158
315
|
format: uuid
|
|
159
316
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
160
|
-
required:
|
|
317
|
+
required: true
|
|
318
|
+
description: Unique identifier of the asset type
|
|
161
319
|
responses:
|
|
162
320
|
200:
|
|
163
321
|
description: Given asset type
|
|
322
|
+
content:
|
|
323
|
+
application/json:
|
|
324
|
+
schema:
|
|
325
|
+
type: object
|
|
326
|
+
properties:
|
|
327
|
+
id:
|
|
328
|
+
type: string
|
|
329
|
+
format: uuid
|
|
330
|
+
description: Asset type unique identifier
|
|
331
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
332
|
+
name:
|
|
333
|
+
type: string
|
|
334
|
+
description: Asset type name
|
|
335
|
+
example: "Character"
|
|
336
|
+
created_at:
|
|
337
|
+
type: string
|
|
338
|
+
format: date-time
|
|
339
|
+
description: Creation timestamp
|
|
340
|
+
example: "2023-01-01T12:00:00Z"
|
|
341
|
+
updated_at:
|
|
342
|
+
type: string
|
|
343
|
+
format: date-time
|
|
344
|
+
description: Last update timestamp
|
|
345
|
+
example: "2023-01-01T12:30:00Z"
|
|
164
346
|
"""
|
|
165
347
|
return assets_service.get_asset_type(asset_type_id)
|
|
166
348
|
|
|
@@ -170,13 +352,47 @@ class AssetTypesResource(Resource):
|
|
|
170
352
|
@jwt_required()
|
|
171
353
|
def get(self):
|
|
172
354
|
"""
|
|
173
|
-
|
|
355
|
+
Get asset types
|
|
174
356
|
---
|
|
357
|
+
description: Retrieve all available asset types (entity types that are not shot, sequence, or episode) with filtering support
|
|
175
358
|
tags:
|
|
176
359
|
- Assets
|
|
360
|
+
parameters:
|
|
361
|
+
- in: query
|
|
362
|
+
name: project_id
|
|
363
|
+
type: string
|
|
364
|
+
format: uuid
|
|
365
|
+
description: Filter asset types by project
|
|
366
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
177
367
|
responses:
|
|
178
368
|
200:
|
|
179
|
-
description:
|
|
369
|
+
description: List of asset types successfully retrieved
|
|
370
|
+
content:
|
|
371
|
+
application/json:
|
|
372
|
+
schema:
|
|
373
|
+
type: array
|
|
374
|
+
items:
|
|
375
|
+
type: object
|
|
376
|
+
properties:
|
|
377
|
+
id:
|
|
378
|
+
type: string
|
|
379
|
+
format: uuid
|
|
380
|
+
description: Asset type unique identifier
|
|
381
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
382
|
+
name:
|
|
383
|
+
type: string
|
|
384
|
+
description: Asset type name
|
|
385
|
+
example: "Character"
|
|
386
|
+
created_at:
|
|
387
|
+
type: string
|
|
388
|
+
format: date-time
|
|
389
|
+
description: Creation timestamp
|
|
390
|
+
example: "2023-01-01T12:00:00Z"
|
|
391
|
+
updated_at:
|
|
392
|
+
type: string
|
|
393
|
+
format: date-time
|
|
394
|
+
description: Last update timestamp
|
|
395
|
+
example: "2023-01-01T12:30:00Z"
|
|
180
396
|
"""
|
|
181
397
|
criterions = query.get_query_criterions_from_request(request)
|
|
182
398
|
return assets_service.get_asset_types(criterions)
|
|
@@ -187,8 +403,9 @@ class ProjectAssetTypesResource(Resource):
|
|
|
187
403
|
@jwt_required()
|
|
188
404
|
def get(self, project_id):
|
|
189
405
|
"""
|
|
190
|
-
|
|
406
|
+
Get project asset types
|
|
191
407
|
---
|
|
408
|
+
description: Retrieve all asset types available for a specific project
|
|
192
409
|
tags:
|
|
193
410
|
- Assets
|
|
194
411
|
parameters:
|
|
@@ -197,10 +414,32 @@ class ProjectAssetTypesResource(Resource):
|
|
|
197
414
|
type: string
|
|
198
415
|
format: uuid
|
|
199
416
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
200
|
-
required:
|
|
417
|
+
required: true
|
|
418
|
+
description: Unique identifier of the project
|
|
201
419
|
responses:
|
|
202
420
|
200:
|
|
203
|
-
description:
|
|
421
|
+
description: List of project asset types successfully retrieved
|
|
422
|
+
content:
|
|
423
|
+
application/json:
|
|
424
|
+
schema:
|
|
425
|
+
type: array
|
|
426
|
+
items:
|
|
427
|
+
type: object
|
|
428
|
+
properties:
|
|
429
|
+
id:
|
|
430
|
+
type: string
|
|
431
|
+
format: uuid
|
|
432
|
+
description: Asset type unique identifier
|
|
433
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
434
|
+
name:
|
|
435
|
+
type: string
|
|
436
|
+
description: Asset type name
|
|
437
|
+
example: "Character"
|
|
438
|
+
project_id:
|
|
439
|
+
type: string
|
|
440
|
+
format: uuid
|
|
441
|
+
description: Project identifier
|
|
442
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
204
443
|
"""
|
|
205
444
|
user_service.check_project_access(project_id)
|
|
206
445
|
return assets_service.get_asset_types_for_project(project_id)
|
|
@@ -211,8 +450,9 @@ class ShotAssetTypesResource(Resource):
|
|
|
211
450
|
@jwt_required()
|
|
212
451
|
def get(self, shot_id):
|
|
213
452
|
"""
|
|
214
|
-
|
|
453
|
+
Get shot asset types
|
|
215
454
|
---
|
|
455
|
+
description: Retrieve all asset types of assets that are casted in a specific shot
|
|
216
456
|
tags:
|
|
217
457
|
- Assets
|
|
218
458
|
parameters:
|
|
@@ -221,10 +461,32 @@ class ShotAssetTypesResource(Resource):
|
|
|
221
461
|
type: string
|
|
222
462
|
format: uuid
|
|
223
463
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
224
|
-
required:
|
|
464
|
+
required: true
|
|
465
|
+
description: Unique identifier of the shot
|
|
225
466
|
responses:
|
|
226
467
|
200:
|
|
227
|
-
description:
|
|
468
|
+
description: List of shot asset types successfully retrieved
|
|
469
|
+
content:
|
|
470
|
+
application/json:
|
|
471
|
+
schema:
|
|
472
|
+
type: array
|
|
473
|
+
items:
|
|
474
|
+
type: object
|
|
475
|
+
properties:
|
|
476
|
+
id:
|
|
477
|
+
type: string
|
|
478
|
+
format: uuid
|
|
479
|
+
description: Asset type unique identifier
|
|
480
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
481
|
+
name:
|
|
482
|
+
type: string
|
|
483
|
+
description: Asset type name
|
|
484
|
+
example: "Character"
|
|
485
|
+
shot_id:
|
|
486
|
+
type: string
|
|
487
|
+
format: uuid
|
|
488
|
+
description: Shot identifier
|
|
489
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
228
490
|
"""
|
|
229
491
|
shot = shots_service.get_shot(shot_id)
|
|
230
492
|
user_service.check_project_access(shot["project_id"])
|
|
@@ -236,8 +498,9 @@ class ProjectAssetsResource(Resource):
|
|
|
236
498
|
@jwt_required()
|
|
237
499
|
def get(self, project_id):
|
|
238
500
|
"""
|
|
239
|
-
|
|
501
|
+
Get project assets
|
|
240
502
|
---
|
|
503
|
+
description: Retrieve all assets belonging to a specific project with filtering support
|
|
241
504
|
tags:
|
|
242
505
|
- Assets
|
|
243
506
|
parameters:
|
|
@@ -246,10 +509,61 @@ class ProjectAssetsResource(Resource):
|
|
|
246
509
|
type: string
|
|
247
510
|
format: uuid
|
|
248
511
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
249
|
-
required:
|
|
512
|
+
required: true
|
|
513
|
+
description: Unique identifier of the project
|
|
514
|
+
- in: query
|
|
515
|
+
name: asset_type_id
|
|
516
|
+
type: string
|
|
517
|
+
format: uuid
|
|
518
|
+
description: Filter assets by asset type
|
|
519
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
520
|
+
- in: query
|
|
521
|
+
name: page
|
|
522
|
+
type: integer
|
|
523
|
+
description: Page number for pagination
|
|
524
|
+
example: 1
|
|
525
|
+
- in: query
|
|
526
|
+
name: limit
|
|
527
|
+
type: integer
|
|
528
|
+
description: Number of assets per page
|
|
529
|
+
example: 100
|
|
250
530
|
responses:
|
|
251
531
|
200:
|
|
252
|
-
description:
|
|
532
|
+
description: List of project assets successfully retrieved
|
|
533
|
+
content:
|
|
534
|
+
application/json:
|
|
535
|
+
schema:
|
|
536
|
+
type: array
|
|
537
|
+
items:
|
|
538
|
+
type: object
|
|
539
|
+
properties:
|
|
540
|
+
id:
|
|
541
|
+
type: string
|
|
542
|
+
format: uuid
|
|
543
|
+
description: Asset unique identifier
|
|
544
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
545
|
+
name:
|
|
546
|
+
type: string
|
|
547
|
+
description: Asset name
|
|
548
|
+
example: "Character Name"
|
|
549
|
+
project_id:
|
|
550
|
+
type: string
|
|
551
|
+
format: uuid
|
|
552
|
+
description: Project identifier
|
|
553
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
554
|
+
entity_type_id:
|
|
555
|
+
type: string
|
|
556
|
+
format: uuid
|
|
557
|
+
description: Asset type identifier
|
|
558
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
559
|
+
project_name:
|
|
560
|
+
type: string
|
|
561
|
+
description: Project name
|
|
562
|
+
example: "My Project"
|
|
563
|
+
asset_type_name:
|
|
564
|
+
type: string
|
|
565
|
+
description: Asset type name
|
|
566
|
+
example: "Character"
|
|
253
567
|
"""
|
|
254
568
|
user_service.check_project_access(project_id)
|
|
255
569
|
criterions = query.get_query_criterions_from_request(request)
|
|
@@ -266,26 +580,73 @@ class ProjectAssetTypeAssetsResource(Resource):
|
|
|
266
580
|
@jwt_required()
|
|
267
581
|
def get(self, project_id, asset_type_id):
|
|
268
582
|
"""
|
|
269
|
-
|
|
583
|
+
Get project asset type assets
|
|
270
584
|
---
|
|
585
|
+
description: Retrieve all assets of a specific type within a project.
|
|
271
586
|
tags:
|
|
272
|
-
|
|
587
|
+
- Assets
|
|
273
588
|
parameters:
|
|
274
589
|
- in: path
|
|
275
590
|
name: project_id
|
|
276
|
-
required:
|
|
591
|
+
required: true
|
|
277
592
|
type: string
|
|
278
593
|
format: uuid
|
|
279
594
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
595
|
+
description: Unique identifier of the project
|
|
280
596
|
- in: path
|
|
281
597
|
name: asset_type_id
|
|
282
|
-
required:
|
|
598
|
+
required: true
|
|
283
599
|
type: string
|
|
284
600
|
format: uuid
|
|
285
601
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
602
|
+
description: Unique identifier of the asset type
|
|
603
|
+
- in: query
|
|
604
|
+
name: page
|
|
605
|
+
type: integer
|
|
606
|
+
description: Page number for pagination
|
|
607
|
+
example: 1
|
|
608
|
+
- in: query
|
|
609
|
+
name: limit
|
|
610
|
+
type: integer
|
|
611
|
+
description: Number of assets per page
|
|
612
|
+
example: 100
|
|
286
613
|
responses:
|
|
287
|
-
|
|
288
|
-
|
|
614
|
+
200:
|
|
615
|
+
description: List of project asset type assets successfully retrieved
|
|
616
|
+
content:
|
|
617
|
+
application/json:
|
|
618
|
+
schema:
|
|
619
|
+
type: array
|
|
620
|
+
items:
|
|
621
|
+
type: object
|
|
622
|
+
properties:
|
|
623
|
+
id:
|
|
624
|
+
type: string
|
|
625
|
+
format: uuid
|
|
626
|
+
description: Asset unique identifier
|
|
627
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
628
|
+
name:
|
|
629
|
+
type: string
|
|
630
|
+
description: Asset name
|
|
631
|
+
example: "Character Name"
|
|
632
|
+
project_id:
|
|
633
|
+
type: string
|
|
634
|
+
format: uuid
|
|
635
|
+
description: Project identifier
|
|
636
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
637
|
+
entity_type_id:
|
|
638
|
+
type: string
|
|
639
|
+
format: uuid
|
|
640
|
+
description: Asset type identifier
|
|
641
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
642
|
+
project_name:
|
|
643
|
+
type: string
|
|
644
|
+
description: Project name
|
|
645
|
+
example: "My Project"
|
|
646
|
+
asset_type_name:
|
|
647
|
+
type: string
|
|
648
|
+
description: Asset type name
|
|
649
|
+
example: "Character"
|
|
289
650
|
"""
|
|
290
651
|
user_service.check_project_access(project_id)
|
|
291
652
|
criterions = query.get_query_criterions_from_request(request)
|
|
@@ -303,20 +664,48 @@ class AssetAssetsResource(Resource):
|
|
|
303
664
|
@jwt_required()
|
|
304
665
|
def get(self, asset_id):
|
|
305
666
|
"""
|
|
306
|
-
|
|
667
|
+
Get linked assets
|
|
307
668
|
---
|
|
669
|
+
description: Retrieve all assets that are linked to a specific asset through casting relationships
|
|
308
670
|
tags:
|
|
309
|
-
|
|
671
|
+
- Assets
|
|
310
672
|
parameters:
|
|
311
673
|
- in: path
|
|
312
674
|
name: asset_id
|
|
313
|
-
required:
|
|
675
|
+
required: true
|
|
314
676
|
type: string
|
|
315
677
|
format: uuid
|
|
316
678
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
679
|
+
description: Unique identifier of the asset
|
|
317
680
|
responses:
|
|
318
|
-
|
|
319
|
-
|
|
681
|
+
200:
|
|
682
|
+
description: List of linked assets successfully retrieved
|
|
683
|
+
content:
|
|
684
|
+
application/json:
|
|
685
|
+
schema:
|
|
686
|
+
type: array
|
|
687
|
+
items:
|
|
688
|
+
type: object
|
|
689
|
+
properties:
|
|
690
|
+
id:
|
|
691
|
+
type: string
|
|
692
|
+
format: uuid
|
|
693
|
+
description: Linked asset unique identifier
|
|
694
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
695
|
+
name:
|
|
696
|
+
type: string
|
|
697
|
+
description: Linked asset name
|
|
698
|
+
example: "Character Name"
|
|
699
|
+
project_id:
|
|
700
|
+
type: string
|
|
701
|
+
format: uuid
|
|
702
|
+
description: Project identifier
|
|
703
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
704
|
+
entity_type_id:
|
|
705
|
+
type: string
|
|
706
|
+
format: uuid
|
|
707
|
+
description: Asset type identifier
|
|
708
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
320
709
|
"""
|
|
321
710
|
asset = assets_service.get_asset(asset_id)
|
|
322
711
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -329,20 +718,80 @@ class AssetTasksResource(Resource, ArgsMixin):
|
|
|
329
718
|
@jwt_required()
|
|
330
719
|
def get(self, asset_id):
|
|
331
720
|
"""
|
|
332
|
-
|
|
721
|
+
Get asset tasks
|
|
333
722
|
---
|
|
723
|
+
description: Retrieve all tasks related to a specific asset.
|
|
334
724
|
tags:
|
|
335
|
-
|
|
725
|
+
- Assets
|
|
336
726
|
parameters:
|
|
337
727
|
- in: path
|
|
338
728
|
name: asset_id
|
|
339
|
-
required:
|
|
729
|
+
required: true
|
|
340
730
|
type: string
|
|
341
731
|
format: uuid
|
|
342
732
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
733
|
+
description: Unique identifier of the asset
|
|
734
|
+
- in: query
|
|
735
|
+
name: task_type_id
|
|
736
|
+
type: string
|
|
737
|
+
format: uuid
|
|
738
|
+
description: Filter tasks by task type
|
|
739
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
740
|
+
- in: query
|
|
741
|
+
name: task_status_id
|
|
742
|
+
type: string
|
|
743
|
+
format: uuid
|
|
744
|
+
description: Filter tasks by task status
|
|
745
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
343
746
|
responses:
|
|
344
|
-
|
|
345
|
-
|
|
747
|
+
200:
|
|
748
|
+
description: List of asset tasks successfully retrieved
|
|
749
|
+
content:
|
|
750
|
+
application/json:
|
|
751
|
+
schema:
|
|
752
|
+
type: array
|
|
753
|
+
items:
|
|
754
|
+
type: object
|
|
755
|
+
properties:
|
|
756
|
+
id:
|
|
757
|
+
type: string
|
|
758
|
+
format: uuid
|
|
759
|
+
description: Task unique identifier
|
|
760
|
+
example: e68e0ie8-gi19-8009-e514-91897426g69
|
|
761
|
+
name:
|
|
762
|
+
type: string
|
|
763
|
+
description: Task name
|
|
764
|
+
example: "Modeling Task"
|
|
765
|
+
task_type_id:
|
|
766
|
+
type: string
|
|
767
|
+
format: uuid
|
|
768
|
+
description: Task type identifier
|
|
769
|
+
example: f79f1jf9-hj20-9110-f625-02908537h70
|
|
770
|
+
task_status_id:
|
|
771
|
+
type: string
|
|
772
|
+
format: uuid
|
|
773
|
+
description: Task status identifier
|
|
774
|
+
example: g80g2kg0-ik31-0221-g736-13019648i81
|
|
775
|
+
entity_id:
|
|
776
|
+
type: string
|
|
777
|
+
format: uuid
|
|
778
|
+
description: Asset identifier
|
|
779
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
780
|
+
assigned_to:
|
|
781
|
+
type: string
|
|
782
|
+
format: uuid
|
|
783
|
+
description: Assigned user identifier
|
|
784
|
+
example: h91h3lh1-jl42-1332-h847-24120759j92
|
|
785
|
+
created_at:
|
|
786
|
+
type: string
|
|
787
|
+
format: date-time
|
|
788
|
+
description: Creation timestamp
|
|
789
|
+
example: "2023-01-01T12:00:00Z"
|
|
790
|
+
updated_at:
|
|
791
|
+
type: string
|
|
792
|
+
format: date-time
|
|
793
|
+
description: Last update timestamp
|
|
794
|
+
example: "2023-01-01T12:30:00Z"
|
|
346
795
|
"""
|
|
347
796
|
asset = assets_service.get_asset(asset_id)
|
|
348
797
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -356,20 +805,50 @@ class AssetTaskTypesResource(Resource):
|
|
|
356
805
|
@jwt_required()
|
|
357
806
|
def get(self, asset_id):
|
|
358
807
|
"""
|
|
359
|
-
|
|
808
|
+
Get asset task types
|
|
360
809
|
---
|
|
810
|
+
description: Retrieve all task types that are used for tasks related to a specific asset.
|
|
361
811
|
tags:
|
|
362
|
-
|
|
812
|
+
- Assets
|
|
363
813
|
parameters:
|
|
364
814
|
- in: path
|
|
365
815
|
name: asset_id
|
|
366
|
-
required:
|
|
816
|
+
required: true
|
|
367
817
|
type: string
|
|
368
818
|
format: uuid
|
|
369
819
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
820
|
+
description: Unique identifier of the asset
|
|
370
821
|
responses:
|
|
371
|
-
|
|
372
|
-
|
|
822
|
+
200:
|
|
823
|
+
description: List of asset task types successfully retrieved
|
|
824
|
+
content:
|
|
825
|
+
application/json:
|
|
826
|
+
schema:
|
|
827
|
+
type: array
|
|
828
|
+
items:
|
|
829
|
+
type: object
|
|
830
|
+
properties:
|
|
831
|
+
id:
|
|
832
|
+
type: string
|
|
833
|
+
format: uuid
|
|
834
|
+
description: Task type unique identifier
|
|
835
|
+
example: f79f1jf9-hj20-9110-f625-02908537h70
|
|
836
|
+
name:
|
|
837
|
+
type: string
|
|
838
|
+
description: Task type name
|
|
839
|
+
example: "Modeling"
|
|
840
|
+
short_name:
|
|
841
|
+
type: string
|
|
842
|
+
description: Task type short name
|
|
843
|
+
example: "MOD"
|
|
844
|
+
color:
|
|
845
|
+
type: string
|
|
846
|
+
description: Task type color code
|
|
847
|
+
example: "#FF5733"
|
|
848
|
+
for_entity:
|
|
849
|
+
type: string
|
|
850
|
+
description: Entity type this task type is for
|
|
851
|
+
example: "Asset"
|
|
373
852
|
"""
|
|
374
853
|
asset = assets_service.get_asset(asset_id)
|
|
375
854
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -381,23 +860,26 @@ class NewAssetResource(Resource, ArgsMixin):
|
|
|
381
860
|
@jwt_required()
|
|
382
861
|
def post(self, project_id, asset_type_id):
|
|
383
862
|
"""
|
|
384
|
-
Create
|
|
863
|
+
Create asset
|
|
385
864
|
---
|
|
865
|
+
description: Create a new asset in a specific project with the given asset type and parameters.
|
|
386
866
|
tags:
|
|
387
|
-
|
|
867
|
+
- Assets
|
|
388
868
|
parameters:
|
|
389
869
|
- in: path
|
|
390
870
|
name: project_id
|
|
391
|
-
required:
|
|
871
|
+
required: true
|
|
392
872
|
type: string
|
|
393
873
|
format: uuid
|
|
394
874
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
875
|
+
description: Unique identifier of the project
|
|
395
876
|
- in: path
|
|
396
877
|
name: asset_type_id
|
|
397
|
-
required:
|
|
878
|
+
required: true
|
|
398
879
|
type: string
|
|
399
880
|
format: uuid
|
|
400
881
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
882
|
+
description: Unique identifier of the asset type
|
|
401
883
|
requestBody:
|
|
402
884
|
required: true
|
|
403
885
|
content:
|
|
@@ -405,31 +887,79 @@ class NewAssetResource(Resource, ArgsMixin):
|
|
|
405
887
|
schema:
|
|
406
888
|
type: object
|
|
407
889
|
required:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
890
|
+
- name
|
|
891
|
+
- description
|
|
892
|
+
- data
|
|
893
|
+
- is_shared
|
|
894
|
+
- source_id
|
|
413
895
|
properties:
|
|
896
|
+
name:
|
|
897
|
+
type: string
|
|
898
|
+
description: Asset name
|
|
899
|
+
example: "Character Name"
|
|
900
|
+
description:
|
|
901
|
+
type: string
|
|
902
|
+
description: Asset description
|
|
903
|
+
example: "Main character"
|
|
904
|
+
data:
|
|
905
|
+
type: object
|
|
906
|
+
description: Asset metadata and custom data
|
|
907
|
+
example: [{"difficulty": "easy", "atmsophere": "sunny"}]
|
|
908
|
+
is_shared:
|
|
909
|
+
type: boolean
|
|
910
|
+
description: Whether the asset is shared across projects
|
|
911
|
+
example: false
|
|
912
|
+
source_id:
|
|
913
|
+
type: string
|
|
914
|
+
format: uuid
|
|
915
|
+
description: Source asset identifier for duplication
|
|
916
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
917
|
+
episode_id:
|
|
918
|
+
type: string
|
|
919
|
+
format: uuid
|
|
920
|
+
description: Episode identifier for episodic assets
|
|
921
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
922
|
+
responses:
|
|
923
|
+
201:
|
|
924
|
+
description: Asset successfully created
|
|
925
|
+
content:
|
|
926
|
+
application/json:
|
|
927
|
+
schema:
|
|
928
|
+
type: object
|
|
929
|
+
properties:
|
|
930
|
+
id:
|
|
931
|
+
type: string
|
|
932
|
+
format: uuid
|
|
933
|
+
description: Created asset unique identifier
|
|
934
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
414
935
|
name:
|
|
415
|
-
|
|
416
|
-
|
|
936
|
+
type: string
|
|
937
|
+
description: Asset name
|
|
938
|
+
example: "Character Name"
|
|
417
939
|
description:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
940
|
+
type: string
|
|
941
|
+
description: Asset description
|
|
942
|
+
example: "Main character"
|
|
943
|
+
project_id:
|
|
944
|
+
type: string
|
|
945
|
+
format: uuid
|
|
946
|
+
description: Project identifier
|
|
947
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
948
|
+
entity_type_id:
|
|
949
|
+
type: string
|
|
950
|
+
format: uuid
|
|
951
|
+
description: Asset type identifier
|
|
952
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
953
|
+
created_at:
|
|
954
|
+
type: string
|
|
955
|
+
format: date-time
|
|
956
|
+
description: Creation timestamp
|
|
957
|
+
example: "2023-01-01T12:00:00Z"
|
|
958
|
+
updated_at:
|
|
959
|
+
type: string
|
|
960
|
+
format: date-time
|
|
961
|
+
description: Last update timestamp
|
|
962
|
+
example: "2023-01-01T12:30:00Z"
|
|
433
963
|
"""
|
|
434
964
|
(name, description, data, is_shared, source_id) = self.get_arguments()
|
|
435
965
|
|
|
@@ -480,20 +1010,55 @@ class AssetCastingResource(Resource):
|
|
|
480
1010
|
@jwt_required()
|
|
481
1011
|
def get(self, asset_id):
|
|
482
1012
|
"""
|
|
483
|
-
|
|
1013
|
+
Get asset casting
|
|
484
1014
|
---
|
|
1015
|
+
description: Retrieve the casting information for a specific asset showing which shots or sequences use this asset
|
|
485
1016
|
tags:
|
|
486
|
-
|
|
1017
|
+
- Assets
|
|
487
1018
|
parameters:
|
|
488
1019
|
- in: path
|
|
489
1020
|
name: asset_id
|
|
490
|
-
required:
|
|
1021
|
+
required: true
|
|
491
1022
|
type: string
|
|
492
1023
|
format: uuid
|
|
493
1024
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1025
|
+
description: Unique identifier of the asset
|
|
494
1026
|
responses:
|
|
495
|
-
|
|
496
|
-
|
|
1027
|
+
200:
|
|
1028
|
+
description: Asset casting information successfully retrieved
|
|
1029
|
+
content:
|
|
1030
|
+
application/json:
|
|
1031
|
+
schema:
|
|
1032
|
+
type: object
|
|
1033
|
+
properties:
|
|
1034
|
+
asset_id:
|
|
1035
|
+
type: string
|
|
1036
|
+
format: uuid
|
|
1037
|
+
description: Asset unique identifier
|
|
1038
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1039
|
+
casting:
|
|
1040
|
+
type: array
|
|
1041
|
+
items:
|
|
1042
|
+
type: object
|
|
1043
|
+
properties:
|
|
1044
|
+
id:
|
|
1045
|
+
type: string
|
|
1046
|
+
format: uuid
|
|
1047
|
+
description: Casting entry unique identifier
|
|
1048
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1049
|
+
entity_id:
|
|
1050
|
+
type: string
|
|
1051
|
+
format: uuid
|
|
1052
|
+
description: Entity identifier (shot/sequence)
|
|
1053
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
1054
|
+
entity_name:
|
|
1055
|
+
type: string
|
|
1056
|
+
description: Entity name
|
|
1057
|
+
example: "SH001"
|
|
1058
|
+
entity_type:
|
|
1059
|
+
type: string
|
|
1060
|
+
description: Entity type (shot/sequence)
|
|
1061
|
+
example: "shot"
|
|
497
1062
|
"""
|
|
498
1063
|
asset = assets_service.get_asset(asset_id)
|
|
499
1064
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -503,17 +1068,19 @@ class AssetCastingResource(Resource):
|
|
|
503
1068
|
@jwt_required()
|
|
504
1069
|
def put(self, asset_id):
|
|
505
1070
|
"""
|
|
506
|
-
|
|
1071
|
+
Update asset casting
|
|
507
1072
|
---
|
|
1073
|
+
description: Modify the casting relationships for a specific asset by updating which shots or sequences use this asset.
|
|
508
1074
|
tags:
|
|
509
|
-
|
|
1075
|
+
- Assets
|
|
510
1076
|
parameters:
|
|
511
1077
|
- in: path
|
|
512
1078
|
name: asset_id
|
|
513
|
-
required:
|
|
1079
|
+
required: true
|
|
514
1080
|
type: string
|
|
515
1081
|
format: uuid
|
|
516
1082
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1083
|
+
description: Unique identifier of the asset
|
|
517
1084
|
requestBody:
|
|
518
1085
|
required: true
|
|
519
1086
|
content:
|
|
@@ -521,9 +1088,53 @@ class AssetCastingResource(Resource):
|
|
|
521
1088
|
schema:
|
|
522
1089
|
type: object
|
|
523
1090
|
description: Casting data to update
|
|
1091
|
+
properties:
|
|
1092
|
+
casting:
|
|
1093
|
+
type: array
|
|
1094
|
+
items:
|
|
1095
|
+
type: object
|
|
1096
|
+
properties:
|
|
1097
|
+
entity_id:
|
|
1098
|
+
type: string
|
|
1099
|
+
format: uuid
|
|
1100
|
+
description: Entity identifier to cast
|
|
1101
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
1102
|
+
entity_type:
|
|
1103
|
+
type: string
|
|
1104
|
+
description: Entity type (shot/sequence)
|
|
1105
|
+
example: "shot"
|
|
524
1106
|
responses:
|
|
525
|
-
|
|
526
|
-
|
|
1107
|
+
200:
|
|
1108
|
+
description: Asset casting successfully updated
|
|
1109
|
+
content:
|
|
1110
|
+
application/json:
|
|
1111
|
+
schema:
|
|
1112
|
+
type: object
|
|
1113
|
+
properties:
|
|
1114
|
+
asset_id:
|
|
1115
|
+
type: string
|
|
1116
|
+
format: uuid
|
|
1117
|
+
description: Asset unique identifier
|
|
1118
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1119
|
+
casting:
|
|
1120
|
+
type: array
|
|
1121
|
+
items:
|
|
1122
|
+
type: object
|
|
1123
|
+
properties:
|
|
1124
|
+
id:
|
|
1125
|
+
type: string
|
|
1126
|
+
format: uuid
|
|
1127
|
+
description: Casting entry unique identifier
|
|
1128
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1129
|
+
entity_id:
|
|
1130
|
+
type: string
|
|
1131
|
+
format: uuid
|
|
1132
|
+
description: Entity identifier
|
|
1133
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
1134
|
+
entity_name:
|
|
1135
|
+
type: string
|
|
1136
|
+
description: Entity name
|
|
1137
|
+
example: "SH001"
|
|
527
1138
|
"""
|
|
528
1139
|
casting = request.json
|
|
529
1140
|
asset = assets_service.get_asset(asset_id)
|
|
@@ -536,20 +1147,60 @@ class AssetCastInResource(Resource):
|
|
|
536
1147
|
@jwt_required()
|
|
537
1148
|
def get(self, asset_id):
|
|
538
1149
|
"""
|
|
539
|
-
|
|
1150
|
+
Get shots casting asset
|
|
540
1151
|
---
|
|
1152
|
+
description: Retrieve all shots that cast a specific asset in their breakdown.
|
|
541
1153
|
tags:
|
|
542
|
-
|
|
1154
|
+
- Assets
|
|
543
1155
|
parameters:
|
|
544
1156
|
- in: path
|
|
545
1157
|
name: asset_id
|
|
546
|
-
required:
|
|
1158
|
+
required: true
|
|
547
1159
|
type: string
|
|
548
1160
|
format: uuid
|
|
549
1161
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1162
|
+
description: Unique identifier of the asset
|
|
550
1163
|
responses:
|
|
551
|
-
|
|
552
|
-
|
|
1164
|
+
200:
|
|
1165
|
+
description: List of shots casting the asset successfully retrieved
|
|
1166
|
+
content:
|
|
1167
|
+
application/json:
|
|
1168
|
+
schema:
|
|
1169
|
+
type: array
|
|
1170
|
+
items:
|
|
1171
|
+
type: object
|
|
1172
|
+
properties:
|
|
1173
|
+
id:
|
|
1174
|
+
type: string
|
|
1175
|
+
format: uuid
|
|
1176
|
+
description: Shot unique identifier
|
|
1177
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
1178
|
+
name:
|
|
1179
|
+
type: string
|
|
1180
|
+
description: Shot name
|
|
1181
|
+
example: "SH001"
|
|
1182
|
+
project_id:
|
|
1183
|
+
type: string
|
|
1184
|
+
format: uuid
|
|
1185
|
+
description: Project identifier
|
|
1186
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1187
|
+
sequence_id:
|
|
1188
|
+
type: string
|
|
1189
|
+
format: uuid
|
|
1190
|
+
description: Sequence identifier
|
|
1191
|
+
example: e68e0ie8-gi19-8009-e514-91897426g69
|
|
1192
|
+
frame_in:
|
|
1193
|
+
type: integer
|
|
1194
|
+
description: Frame in
|
|
1195
|
+
example: 100
|
|
1196
|
+
frame_out:
|
|
1197
|
+
type: integer
|
|
1198
|
+
description: Frame out
|
|
1199
|
+
example: 200
|
|
1200
|
+
duration:
|
|
1201
|
+
type: integer
|
|
1202
|
+
description: Shot duration in frames
|
|
1203
|
+
example: 100
|
|
553
1204
|
"""
|
|
554
1205
|
asset = assets_service.get_asset(asset_id)
|
|
555
1206
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -562,20 +1213,52 @@ class AssetShotAssetInstancesResource(Resource):
|
|
|
562
1213
|
@jwt_required()
|
|
563
1214
|
def get(self, asset_id):
|
|
564
1215
|
"""
|
|
565
|
-
|
|
1216
|
+
Get shot asset instances
|
|
566
1217
|
---
|
|
1218
|
+
description: Retrieve all shot asset instances that are linked to a specific asset.
|
|
567
1219
|
tags:
|
|
568
|
-
|
|
1220
|
+
- Assets
|
|
569
1221
|
parameters:
|
|
570
1222
|
- in: path
|
|
571
1223
|
name: asset_id
|
|
572
|
-
required:
|
|
1224
|
+
required: true
|
|
573
1225
|
type: string
|
|
574
1226
|
format: uuid
|
|
575
1227
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1228
|
+
description: Unique identifier of the asset
|
|
576
1229
|
responses:
|
|
577
|
-
|
|
578
|
-
|
|
1230
|
+
200:
|
|
1231
|
+
description: List of shot asset instances successfully retrieved.
|
|
1232
|
+
content:
|
|
1233
|
+
application/json:
|
|
1234
|
+
schema:
|
|
1235
|
+
type: array
|
|
1236
|
+
items:
|
|
1237
|
+
type: object
|
|
1238
|
+
properties:
|
|
1239
|
+
id:
|
|
1240
|
+
type: string
|
|
1241
|
+
format: uuid
|
|
1242
|
+
description: Asset instance unique identifier
|
|
1243
|
+
example: f79f1jf9-hj20-9110-f625-02908537h70
|
|
1244
|
+
asset_id:
|
|
1245
|
+
type: string
|
|
1246
|
+
format: uuid
|
|
1247
|
+
description: Asset identifier
|
|
1248
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1249
|
+
shot_id:
|
|
1250
|
+
type: string
|
|
1251
|
+
format: uuid
|
|
1252
|
+
description: Shot identifier
|
|
1253
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
1254
|
+
number:
|
|
1255
|
+
type: string
|
|
1256
|
+
description: Instance number
|
|
1257
|
+
example: "001"
|
|
1258
|
+
description:
|
|
1259
|
+
type: string
|
|
1260
|
+
description: Instance description
|
|
1261
|
+
example: "Main character instance"
|
|
579
1262
|
"""
|
|
580
1263
|
asset = assets_service.get_asset(asset_id)
|
|
581
1264
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -586,20 +1269,52 @@ class AssetSceneAssetInstancesResource(Resource):
|
|
|
586
1269
|
@jwt_required()
|
|
587
1270
|
def get(self, asset_id):
|
|
588
1271
|
"""
|
|
589
|
-
|
|
1272
|
+
Get scene asset instances
|
|
590
1273
|
---
|
|
1274
|
+
description: Retrieve all scene asset instances that are linked to a specific asset.
|
|
591
1275
|
tags:
|
|
592
|
-
|
|
1276
|
+
- Assets
|
|
593
1277
|
parameters:
|
|
594
1278
|
- in: path
|
|
595
1279
|
name: asset_id
|
|
596
|
-
required:
|
|
1280
|
+
required: true
|
|
597
1281
|
type: string
|
|
598
1282
|
format: uuid
|
|
599
1283
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1284
|
+
description: Unique identifier of the asset
|
|
600
1285
|
responses:
|
|
601
|
-
|
|
602
|
-
|
|
1286
|
+
200:
|
|
1287
|
+
description: List of scene asset instances successfully retrieved.
|
|
1288
|
+
content:
|
|
1289
|
+
application/json:
|
|
1290
|
+
schema:
|
|
1291
|
+
type: array
|
|
1292
|
+
items:
|
|
1293
|
+
type: object
|
|
1294
|
+
properties:
|
|
1295
|
+
id:
|
|
1296
|
+
type: string
|
|
1297
|
+
format: uuid
|
|
1298
|
+
description: Asset instance unique identifier
|
|
1299
|
+
example: f79f1jf9-hj20-9110-f625-02908537h70
|
|
1300
|
+
asset_id:
|
|
1301
|
+
type: string
|
|
1302
|
+
format: uuid
|
|
1303
|
+
description: Asset identifier
|
|
1304
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1305
|
+
scene_id:
|
|
1306
|
+
type: string
|
|
1307
|
+
format: uuid
|
|
1308
|
+
description: Scene identifier
|
|
1309
|
+
example: g80g2kg0-ik31-0221-g736-13019648i81
|
|
1310
|
+
number:
|
|
1311
|
+
type: string
|
|
1312
|
+
description: Instance number
|
|
1313
|
+
example: "001"
|
|
1314
|
+
description:
|
|
1315
|
+
type: string
|
|
1316
|
+
description: Instance description
|
|
1317
|
+
example: "Main character instance"
|
|
603
1318
|
"""
|
|
604
1319
|
asset = assets_service.get_asset(asset_id)
|
|
605
1320
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -610,20 +1325,52 @@ class AssetAssetInstancesResource(Resource, ArgsMixin):
|
|
|
610
1325
|
@jwt_required()
|
|
611
1326
|
def get(self, asset_id):
|
|
612
1327
|
"""
|
|
613
|
-
|
|
1328
|
+
Get asset instances
|
|
614
1329
|
---
|
|
1330
|
+
description: Retrieve all asset instances that are instantiated inside a specific asset.
|
|
615
1331
|
tags:
|
|
616
|
-
|
|
1332
|
+
- Assets
|
|
617
1333
|
parameters:
|
|
618
1334
|
- in: path
|
|
619
1335
|
name: asset_id
|
|
620
|
-
required:
|
|
1336
|
+
required: true
|
|
621
1337
|
type: string
|
|
622
1338
|
format: uuid
|
|
623
1339
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1340
|
+
description: Unique identifier of the asset
|
|
624
1341
|
responses:
|
|
625
|
-
|
|
626
|
-
|
|
1342
|
+
200:
|
|
1343
|
+
description: List of asset instances successfully retrieved
|
|
1344
|
+
content:
|
|
1345
|
+
application/json:
|
|
1346
|
+
schema:
|
|
1347
|
+
type: array
|
|
1348
|
+
items:
|
|
1349
|
+
type: object
|
|
1350
|
+
properties:
|
|
1351
|
+
id:
|
|
1352
|
+
type: string
|
|
1353
|
+
format: uuid
|
|
1354
|
+
description: Asset instance unique identifier
|
|
1355
|
+
example: f79f1jf9-hj20-9110-f625-02908537h70
|
|
1356
|
+
asset_id:
|
|
1357
|
+
type: string
|
|
1358
|
+
format: uuid
|
|
1359
|
+
description: Parent asset identifier
|
|
1360
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1361
|
+
target_asset_id:
|
|
1362
|
+
type: string
|
|
1363
|
+
format: uuid
|
|
1364
|
+
description: Target asset identifier
|
|
1365
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1366
|
+
number:
|
|
1367
|
+
type: string
|
|
1368
|
+
description: Instance number
|
|
1369
|
+
example: "001"
|
|
1370
|
+
description:
|
|
1371
|
+
type: string
|
|
1372
|
+
description: Instance description
|
|
1373
|
+
example: "Main character instance"
|
|
627
1374
|
"""
|
|
628
1375
|
asset = assets_service.get_asset(asset_id)
|
|
629
1376
|
user_service.check_project_access(asset["project_id"])
|
|
@@ -632,38 +1379,73 @@ class AssetAssetInstancesResource(Resource, ArgsMixin):
|
|
|
632
1379
|
@jwt_required()
|
|
633
1380
|
def post(self, asset_id):
|
|
634
1381
|
"""
|
|
635
|
-
Create
|
|
1382
|
+
Create asset instance
|
|
636
1383
|
---
|
|
1384
|
+
description: Create a new asset instance inside a specific asset by instantiating another asset.
|
|
637
1385
|
tags:
|
|
638
|
-
|
|
1386
|
+
- Assets
|
|
639
1387
|
parameters:
|
|
640
1388
|
- in: path
|
|
641
1389
|
name: asset_id
|
|
642
|
-
required:
|
|
1390
|
+
required: true
|
|
643
1391
|
type: string
|
|
644
1392
|
format: uuid
|
|
645
1393
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1394
|
+
description: Unique identifier of the parent asset
|
|
646
1395
|
requestBody:
|
|
647
1396
|
required: true
|
|
648
1397
|
content:
|
|
649
1398
|
application/json:
|
|
650
1399
|
schema:
|
|
651
1400
|
type: object
|
|
1401
|
+
required:
|
|
1402
|
+
- asset_to_instantiate_id
|
|
652
1403
|
properties:
|
|
653
1404
|
asset_to_instantiate_id:
|
|
654
1405
|
type: string
|
|
655
1406
|
format: uuid
|
|
656
|
-
|
|
1407
|
+
description: Unique identifier of the asset to instantiate
|
|
657
1408
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
658
1409
|
description:
|
|
659
1410
|
type: string
|
|
660
|
-
|
|
1411
|
+
description: Description for the asset instance
|
|
661
1412
|
example: "Asset instance description"
|
|
662
|
-
required:
|
|
663
|
-
- asset_to_instantiate_id
|
|
664
1413
|
responses:
|
|
665
|
-
|
|
666
|
-
|
|
1414
|
+
201:
|
|
1415
|
+
description: Asset instance successfully created
|
|
1416
|
+
content:
|
|
1417
|
+
application/json:
|
|
1418
|
+
schema:
|
|
1419
|
+
type: object
|
|
1420
|
+
properties:
|
|
1421
|
+
id:
|
|
1422
|
+
type: string
|
|
1423
|
+
format: uuid
|
|
1424
|
+
description: Created asset instance unique identifier
|
|
1425
|
+
example: f79f1jf9-hj20-9110-f625-02908537h70
|
|
1426
|
+
asset_id:
|
|
1427
|
+
type: string
|
|
1428
|
+
format: uuid
|
|
1429
|
+
description: Parent asset identifier
|
|
1430
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1431
|
+
target_asset_id:
|
|
1432
|
+
type: string
|
|
1433
|
+
format: uuid
|
|
1434
|
+
description: Target asset identifier
|
|
1435
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1436
|
+
number:
|
|
1437
|
+
type: string
|
|
1438
|
+
description: Instance number
|
|
1439
|
+
example: "001"
|
|
1440
|
+
description:
|
|
1441
|
+
type: string
|
|
1442
|
+
description: Instance description
|
|
1443
|
+
example: "Main character instance"
|
|
1444
|
+
created_at:
|
|
1445
|
+
type: string
|
|
1446
|
+
format: date-time
|
|
1447
|
+
description: Creation timestamp
|
|
1448
|
+
example: "2023-01-01T12:00:00Z"
|
|
667
1449
|
"""
|
|
668
1450
|
args = self.get_args(
|
|
669
1451
|
[
|
|
@@ -707,17 +1489,19 @@ class SetSharedProjectAssetsResource(BaseSetSharedAssetsResource):
|
|
|
707
1489
|
@jwt_required()
|
|
708
1490
|
def post(self, project_id):
|
|
709
1491
|
"""
|
|
710
|
-
|
|
1492
|
+
Set project assets shared
|
|
711
1493
|
---
|
|
1494
|
+
description: Share or unshare all assets for a specific project or a list of specific assets.
|
|
712
1495
|
tags:
|
|
713
|
-
|
|
1496
|
+
- Assets
|
|
714
1497
|
parameters:
|
|
715
1498
|
- in: path
|
|
716
1499
|
name: project_id
|
|
717
|
-
required:
|
|
1500
|
+
required: true
|
|
718
1501
|
type: string
|
|
719
1502
|
format: uuid
|
|
720
1503
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1504
|
+
description: Unique identifier of the project
|
|
721
1505
|
requestBody:
|
|
722
1506
|
required: false
|
|
723
1507
|
content:
|
|
@@ -725,20 +1509,34 @@ class SetSharedProjectAssetsResource(BaseSetSharedAssetsResource):
|
|
|
725
1509
|
schema:
|
|
726
1510
|
type: object
|
|
727
1511
|
properties:
|
|
1512
|
+
is_shared:
|
|
1513
|
+
type: boolean
|
|
1514
|
+
description: Whether to share or unshare the assets
|
|
1515
|
+
example: true
|
|
728
1516
|
asset_ids:
|
|
729
1517
|
type: array
|
|
730
1518
|
items:
|
|
731
1519
|
type: string
|
|
732
1520
|
format: uuid
|
|
733
|
-
|
|
734
|
-
example: ["a24a6ea4-ce75-4665-a070-57453082c25"]
|
|
735
|
-
is_shared:
|
|
736
|
-
type: boolean
|
|
737
|
-
default: true
|
|
738
|
-
example: true
|
|
1521
|
+
description: Specific asset IDs to update.
|
|
1522
|
+
example: ["a24a6ea4-ce75-4665-a070-57453082c25", "b35b7fb5-df86-5776-b181-68564193d36"]
|
|
739
1523
|
responses:
|
|
740
|
-
|
|
741
|
-
|
|
1524
|
+
200:
|
|
1525
|
+
description: Assets shared status successfully updated
|
|
1526
|
+
content:
|
|
1527
|
+
application/json:
|
|
1528
|
+
schema:
|
|
1529
|
+
type: object
|
|
1530
|
+
properties:
|
|
1531
|
+
updated_count:
|
|
1532
|
+
type: integer
|
|
1533
|
+
description: Number of assets updated
|
|
1534
|
+
example: 5
|
|
1535
|
+
project_id:
|
|
1536
|
+
type: string
|
|
1537
|
+
format: uuid
|
|
1538
|
+
description: Project identifier
|
|
1539
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
742
1540
|
"""
|
|
743
1541
|
args = self.get_args(
|
|
744
1542
|
[
|
|
@@ -760,25 +1558,26 @@ class SetSharedProjectAssetTypeAssetsResource(BaseSetSharedAssetsResource):
|
|
|
760
1558
|
@jwt_required()
|
|
761
1559
|
def post(self, project_id, asset_type_id):
|
|
762
1560
|
"""
|
|
763
|
-
|
|
1561
|
+
Set asset type assets shared
|
|
764
1562
|
---
|
|
1563
|
+
description: Share or unshare all assets for a specific project and asset type.
|
|
765
1564
|
tags:
|
|
766
|
-
|
|
767
|
-
consumes:
|
|
768
|
-
- multipart/form-data
|
|
1565
|
+
- Assets
|
|
769
1566
|
parameters:
|
|
770
1567
|
- in: path
|
|
771
1568
|
name: project_id
|
|
772
|
-
required:
|
|
1569
|
+
required: true
|
|
773
1570
|
type: string
|
|
774
1571
|
format: uuid
|
|
775
1572
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1573
|
+
description: Unique identifier of the project
|
|
776
1574
|
- in: path
|
|
777
1575
|
name: asset_type_id
|
|
778
|
-
required:
|
|
1576
|
+
required: true
|
|
779
1577
|
type: string
|
|
780
1578
|
format: uuid
|
|
781
1579
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1580
|
+
description: Unique identifier of the asset type
|
|
782
1581
|
requestBody:
|
|
783
1582
|
required: false
|
|
784
1583
|
content:
|
|
@@ -788,11 +1587,30 @@ class SetSharedProjectAssetTypeAssetsResource(BaseSetSharedAssetsResource):
|
|
|
788
1587
|
properties:
|
|
789
1588
|
is_shared:
|
|
790
1589
|
type: boolean
|
|
791
|
-
|
|
1590
|
+
description: Whether to share or unshare the assets
|
|
792
1591
|
example: true
|
|
793
1592
|
responses:
|
|
794
|
-
|
|
795
|
-
|
|
1593
|
+
200:
|
|
1594
|
+
description: Asset type assets shared status successfully updated
|
|
1595
|
+
content:
|
|
1596
|
+
application/json:
|
|
1597
|
+
schema:
|
|
1598
|
+
type: object
|
|
1599
|
+
properties:
|
|
1600
|
+
updated_count:
|
|
1601
|
+
type: integer
|
|
1602
|
+
description: Number of assets updated
|
|
1603
|
+
example: 3
|
|
1604
|
+
project_id:
|
|
1605
|
+
type: string
|
|
1606
|
+
format: uuid
|
|
1607
|
+
description: Project identifier
|
|
1608
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1609
|
+
asset_type_id:
|
|
1610
|
+
type: string
|
|
1611
|
+
format: uuid
|
|
1612
|
+
description: Asset type identifier
|
|
1613
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
796
1614
|
"""
|
|
797
1615
|
user_service.check_manager_project_access(project_id)
|
|
798
1616
|
return super().post(project_id=project_id, asset_type_id=asset_type_id)
|
|
@@ -803,31 +1621,50 @@ class SetSharedAssetsResource(BaseSetSharedAssetsResource):
|
|
|
803
1621
|
@jwt_required()
|
|
804
1622
|
def post(self):
|
|
805
1623
|
"""
|
|
806
|
-
|
|
1624
|
+
Set assets shared
|
|
807
1625
|
---
|
|
1626
|
+
description: Share or unshare a specific list of assets by their IDs.
|
|
808
1627
|
tags:
|
|
809
|
-
|
|
1628
|
+
- Assets
|
|
810
1629
|
requestBody:
|
|
811
|
-
required:
|
|
1630
|
+
required: true
|
|
812
1631
|
content:
|
|
813
1632
|
application/json:
|
|
814
1633
|
schema:
|
|
815
1634
|
type: object
|
|
1635
|
+
required:
|
|
1636
|
+
- asset_ids
|
|
816
1637
|
properties:
|
|
817
1638
|
asset_ids:
|
|
818
1639
|
type: array
|
|
819
1640
|
items:
|
|
820
1641
|
type: string
|
|
821
1642
|
format: uuid
|
|
822
|
-
|
|
823
|
-
example: ["a24a6ea4-ce75-4665-a070-57453082c25"]
|
|
1643
|
+
description: List of asset IDs to update
|
|
1644
|
+
example: ["a24a6ea4-ce75-4665-a070-57453082c25", "b35b7fb5-df86-5776-b181-68564193d36"]
|
|
824
1645
|
is_shared:
|
|
825
1646
|
type: boolean
|
|
826
|
-
|
|
1647
|
+
description: Whether to share or unshare the assets
|
|
827
1648
|
example: true
|
|
828
1649
|
responses:
|
|
829
|
-
|
|
830
|
-
|
|
1650
|
+
200:
|
|
1651
|
+
description: Assets shared status successfully updated
|
|
1652
|
+
content:
|
|
1653
|
+
application/json:
|
|
1654
|
+
schema:
|
|
1655
|
+
type: object
|
|
1656
|
+
properties:
|
|
1657
|
+
updated_count:
|
|
1658
|
+
type: integer
|
|
1659
|
+
description: Number of assets updated
|
|
1660
|
+
example: 2
|
|
1661
|
+
asset_ids:
|
|
1662
|
+
type: array
|
|
1663
|
+
items:
|
|
1664
|
+
type: string
|
|
1665
|
+
format: uuid
|
|
1666
|
+
description: List of updated asset IDs
|
|
1667
|
+
example: ["a24a6ea4-ce75-4665-a070-57453082c25", "b35b7fb5-df86-5776-b181-68564193d36"]
|
|
831
1668
|
"""
|
|
832
1669
|
args = self.get_args(
|
|
833
1670
|
[
|
|
@@ -853,20 +1690,52 @@ class ProjectAssetsSharedUsedResource(Resource):
|
|
|
853
1690
|
@jwt_required()
|
|
854
1691
|
def get(self, project_id):
|
|
855
1692
|
"""
|
|
856
|
-
|
|
1693
|
+
Get shared assets used in project
|
|
857
1694
|
---
|
|
1695
|
+
description: Retrieve all shared assets that are used in a specific project.
|
|
858
1696
|
tags:
|
|
859
|
-
|
|
1697
|
+
- Assets
|
|
860
1698
|
parameters:
|
|
861
1699
|
- in: path
|
|
862
1700
|
name: project_id
|
|
863
|
-
required:
|
|
1701
|
+
required: true
|
|
864
1702
|
type: string
|
|
865
1703
|
format: uuid
|
|
866
1704
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1705
|
+
description: Unique identifier of the project
|
|
867
1706
|
responses:
|
|
868
|
-
|
|
869
|
-
|
|
1707
|
+
200:
|
|
1708
|
+
description: List of shared assets used in project successfully retrieved
|
|
1709
|
+
content:
|
|
1710
|
+
application/json:
|
|
1711
|
+
schema:
|
|
1712
|
+
type: array
|
|
1713
|
+
items:
|
|
1714
|
+
type: object
|
|
1715
|
+
properties:
|
|
1716
|
+
id:
|
|
1717
|
+
type: string
|
|
1718
|
+
format: uuid
|
|
1719
|
+
description: Asset unique identifier
|
|
1720
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1721
|
+
name:
|
|
1722
|
+
type: string
|
|
1723
|
+
description: Asset name
|
|
1724
|
+
example: "Character Name"
|
|
1725
|
+
project_id:
|
|
1726
|
+
type: string
|
|
1727
|
+
format: uuid
|
|
1728
|
+
description: Original project identifier
|
|
1729
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1730
|
+
entity_type_id:
|
|
1731
|
+
type: string
|
|
1732
|
+
format: uuid
|
|
1733
|
+
description: Asset type identifier
|
|
1734
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
1735
|
+
is_shared:
|
|
1736
|
+
type: boolean
|
|
1737
|
+
description: Whether the asset is shared
|
|
1738
|
+
example: true
|
|
870
1739
|
"""
|
|
871
1740
|
user_service.check_project_access(project_id)
|
|
872
1741
|
return assets_service.get_shared_assets_used_in_project(project_id)
|
|
@@ -877,26 +1746,64 @@ class ProjectEpisodeAssetsSharedUsedResource(Resource):
|
|
|
877
1746
|
@jwt_required()
|
|
878
1747
|
def get(self, project_id, episode_id):
|
|
879
1748
|
"""
|
|
880
|
-
|
|
1749
|
+
Get shared assets used in episode
|
|
881
1750
|
---
|
|
1751
|
+
description: Retrieve all shared assets that are used in a specific project episode.
|
|
882
1752
|
tags:
|
|
883
|
-
|
|
1753
|
+
- Assets
|
|
884
1754
|
parameters:
|
|
885
1755
|
- in: path
|
|
886
1756
|
name: project_id
|
|
887
|
-
required:
|
|
1757
|
+
required: true
|
|
888
1758
|
type: string
|
|
889
1759
|
format: uuid
|
|
890
1760
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1761
|
+
description: Unique identifier of the project
|
|
891
1762
|
- in: path
|
|
892
1763
|
name: episode_id
|
|
893
|
-
required:
|
|
1764
|
+
required: true
|
|
894
1765
|
type: string
|
|
895
1766
|
format: uuid
|
|
896
1767
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1768
|
+
description: Unique identifier of the episode
|
|
897
1769
|
responses:
|
|
898
|
-
|
|
899
|
-
|
|
1770
|
+
200:
|
|
1771
|
+
description: List of shared assets used in episode successfully retrieved
|
|
1772
|
+
content:
|
|
1773
|
+
application/json:
|
|
1774
|
+
schema:
|
|
1775
|
+
type: array
|
|
1776
|
+
items:
|
|
1777
|
+
type: object
|
|
1778
|
+
properties:
|
|
1779
|
+
id:
|
|
1780
|
+
type: string
|
|
1781
|
+
format: uuid
|
|
1782
|
+
description: Asset unique identifier
|
|
1783
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
1784
|
+
name:
|
|
1785
|
+
type: string
|
|
1786
|
+
description: Asset name
|
|
1787
|
+
example: "Character Name"
|
|
1788
|
+
project_id:
|
|
1789
|
+
type: string
|
|
1790
|
+
format: uuid
|
|
1791
|
+
description: Original project identifier
|
|
1792
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
1793
|
+
entity_type_id:
|
|
1794
|
+
type: string
|
|
1795
|
+
format: uuid
|
|
1796
|
+
description: Asset type identifier
|
|
1797
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
1798
|
+
is_shared:
|
|
1799
|
+
type: boolean
|
|
1800
|
+
description: Whether the asset is shared
|
|
1801
|
+
example: true
|
|
1802
|
+
episode_id:
|
|
1803
|
+
type: string
|
|
1804
|
+
format: uuid
|
|
1805
|
+
description: Episode identifier
|
|
1806
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
900
1807
|
"""
|
|
901
1808
|
user_service.check_project_access(project_id)
|
|
902
1809
|
return assets_service.get_shared_assets_used_in_project(
|