zou 0.20.83__py3-none-any.whl → 0.20.85__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/comments/resources.py +32 -35
- zou/app/blueprints/concepts/resources.py +23 -8
- 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/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/news/resources.py +7 -5
- 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/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/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/METADATA +18 -18
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/RECORD +103 -102
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/WHEEL +0 -0
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/entry_points.txt +0 -0
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.83.dist-info → zou-0.20.85.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.organisation import Organisation
|
|
2
4
|
from zou.app.blueprints.crud.base import BaseModelResource, BaseModelsResource
|
|
3
5
|
|
|
@@ -12,6 +14,130 @@ class OrganisationsResource(BaseModelsResource):
|
|
|
12
14
|
def check_read_permissions(self, options=None):
|
|
13
15
|
return True
|
|
14
16
|
|
|
17
|
+
@jwt_required()
|
|
18
|
+
def get(self):
|
|
19
|
+
"""
|
|
20
|
+
Get organisations
|
|
21
|
+
---
|
|
22
|
+
tags:
|
|
23
|
+
- Crud
|
|
24
|
+
description: Retrieve all organisations. Supports filtering via
|
|
25
|
+
query parameters and pagination.
|
|
26
|
+
parameters:
|
|
27
|
+
- in: query
|
|
28
|
+
name: page
|
|
29
|
+
required: false
|
|
30
|
+
schema:
|
|
31
|
+
type: integer
|
|
32
|
+
example: 1
|
|
33
|
+
description: Page number for pagination
|
|
34
|
+
- in: query
|
|
35
|
+
name: limit
|
|
36
|
+
required: false
|
|
37
|
+
schema:
|
|
38
|
+
type: integer
|
|
39
|
+
example: 50
|
|
40
|
+
description: Number of results per page
|
|
41
|
+
- in: query
|
|
42
|
+
name: relations
|
|
43
|
+
required: false
|
|
44
|
+
schema:
|
|
45
|
+
type: boolean
|
|
46
|
+
default: false
|
|
47
|
+
example: false
|
|
48
|
+
description: Whether to include relations
|
|
49
|
+
responses:
|
|
50
|
+
200:
|
|
51
|
+
description: Organisations retrieved successfully
|
|
52
|
+
content:
|
|
53
|
+
application/json:
|
|
54
|
+
schema:
|
|
55
|
+
oneOf:
|
|
56
|
+
- type: array
|
|
57
|
+
items:
|
|
58
|
+
type: object
|
|
59
|
+
- type: object
|
|
60
|
+
properties:
|
|
61
|
+
data:
|
|
62
|
+
type: array
|
|
63
|
+
items:
|
|
64
|
+
type: object
|
|
65
|
+
example: []
|
|
66
|
+
total:
|
|
67
|
+
type: integer
|
|
68
|
+
example: 100
|
|
69
|
+
nb_pages:
|
|
70
|
+
type: integer
|
|
71
|
+
example: 2
|
|
72
|
+
limit:
|
|
73
|
+
type: integer
|
|
74
|
+
example: 50
|
|
75
|
+
offset:
|
|
76
|
+
type: integer
|
|
77
|
+
example: 0
|
|
78
|
+
page:
|
|
79
|
+
type: integer
|
|
80
|
+
example: 1
|
|
81
|
+
400:
|
|
82
|
+
description: Invalid filter format or query error
|
|
83
|
+
"""
|
|
84
|
+
return super().get()
|
|
85
|
+
|
|
86
|
+
@jwt_required()
|
|
87
|
+
def post(self):
|
|
88
|
+
"""
|
|
89
|
+
Create organisation
|
|
90
|
+
---
|
|
91
|
+
tags:
|
|
92
|
+
- Crud
|
|
93
|
+
description: Create a new organisation with data provided in the
|
|
94
|
+
request body. JSON format is expected.
|
|
95
|
+
requestBody:
|
|
96
|
+
required: true
|
|
97
|
+
content:
|
|
98
|
+
application/json:
|
|
99
|
+
schema:
|
|
100
|
+
type: object
|
|
101
|
+
required:
|
|
102
|
+
- name
|
|
103
|
+
properties:
|
|
104
|
+
name:
|
|
105
|
+
type: string
|
|
106
|
+
example: Studio Name
|
|
107
|
+
hours_by_day:
|
|
108
|
+
type: number
|
|
109
|
+
example: 8.0
|
|
110
|
+
responses:
|
|
111
|
+
201:
|
|
112
|
+
description: Organisation created successfully
|
|
113
|
+
content:
|
|
114
|
+
application/json:
|
|
115
|
+
schema:
|
|
116
|
+
type: object
|
|
117
|
+
properties:
|
|
118
|
+
id:
|
|
119
|
+
type: string
|
|
120
|
+
format: uuid
|
|
121
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
122
|
+
name:
|
|
123
|
+
type: string
|
|
124
|
+
example: Studio Name
|
|
125
|
+
hours_by_day:
|
|
126
|
+
type: number
|
|
127
|
+
example: 8.0
|
|
128
|
+
created_at:
|
|
129
|
+
type: string
|
|
130
|
+
format: date-time
|
|
131
|
+
example: "2024-01-15T10:30:00Z"
|
|
132
|
+
updated_at:
|
|
133
|
+
type: string
|
|
134
|
+
format: date-time
|
|
135
|
+
example: "2024-01-15T10:30:00Z"
|
|
136
|
+
400:
|
|
137
|
+
description: Invalid data format or validation error
|
|
138
|
+
"""
|
|
139
|
+
return super().post()
|
|
140
|
+
|
|
15
141
|
|
|
16
142
|
class OrganisationResource(BaseModelResource):
|
|
17
143
|
def __init__(self):
|
|
@@ -20,6 +146,149 @@ class OrganisationResource(BaseModelResource):
|
|
|
20
146
|
def check_read_permissions(self, instance):
|
|
21
147
|
return True
|
|
22
148
|
|
|
149
|
+
@jwt_required()
|
|
150
|
+
def get(self, instance_id):
|
|
151
|
+
"""
|
|
152
|
+
Get organisation
|
|
153
|
+
---
|
|
154
|
+
tags:
|
|
155
|
+
- Crud
|
|
156
|
+
description: Retrieve an organisation by its ID and return it as
|
|
157
|
+
a JSON object. Supports including relations. Non-admin users
|
|
158
|
+
cannot see chat tokens.
|
|
159
|
+
parameters:
|
|
160
|
+
- in: path
|
|
161
|
+
name: instance_id
|
|
162
|
+
required: true
|
|
163
|
+
schema:
|
|
164
|
+
type: string
|
|
165
|
+
format: uuid
|
|
166
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
167
|
+
- in: query
|
|
168
|
+
name: relations
|
|
169
|
+
required: false
|
|
170
|
+
schema:
|
|
171
|
+
type: boolean
|
|
172
|
+
default: true
|
|
173
|
+
example: true
|
|
174
|
+
description: Whether to include relations
|
|
175
|
+
responses:
|
|
176
|
+
200:
|
|
177
|
+
description: Organisation retrieved successfully
|
|
178
|
+
content:
|
|
179
|
+
application/json:
|
|
180
|
+
schema:
|
|
181
|
+
type: object
|
|
182
|
+
properties:
|
|
183
|
+
id:
|
|
184
|
+
type: string
|
|
185
|
+
format: uuid
|
|
186
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
187
|
+
name:
|
|
188
|
+
type: string
|
|
189
|
+
example: Studio Name
|
|
190
|
+
hours_by_day:
|
|
191
|
+
type: number
|
|
192
|
+
example: 8.0
|
|
193
|
+
created_at:
|
|
194
|
+
type: string
|
|
195
|
+
format: date-time
|
|
196
|
+
example: "2024-01-15T10:30:00Z"
|
|
197
|
+
updated_at:
|
|
198
|
+
type: string
|
|
199
|
+
format: date-time
|
|
200
|
+
example: "2024-01-15T10:30:00Z"
|
|
201
|
+
400:
|
|
202
|
+
description: Invalid ID format or query error
|
|
203
|
+
"""
|
|
204
|
+
return super().get(instance_id)
|
|
205
|
+
|
|
206
|
+
@jwt_required()
|
|
207
|
+
def put(self, instance_id):
|
|
208
|
+
"""
|
|
209
|
+
Update organisation
|
|
210
|
+
---
|
|
211
|
+
tags:
|
|
212
|
+
- Crud
|
|
213
|
+
description: Update an organisation with data provided in the
|
|
214
|
+
request body. JSON format is expected.
|
|
215
|
+
parameters:
|
|
216
|
+
- in: path
|
|
217
|
+
name: instance_id
|
|
218
|
+
required: true
|
|
219
|
+
schema:
|
|
220
|
+
type: string
|
|
221
|
+
format: uuid
|
|
222
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
223
|
+
requestBody:
|
|
224
|
+
required: true
|
|
225
|
+
content:
|
|
226
|
+
application/json:
|
|
227
|
+
schema:
|
|
228
|
+
type: object
|
|
229
|
+
properties:
|
|
230
|
+
name:
|
|
231
|
+
type: string
|
|
232
|
+
example: Updated Studio Name
|
|
233
|
+
hours_by_day:
|
|
234
|
+
type: number
|
|
235
|
+
example: 7.5
|
|
236
|
+
responses:
|
|
237
|
+
200:
|
|
238
|
+
description: Organisation updated successfully
|
|
239
|
+
content:
|
|
240
|
+
application/json:
|
|
241
|
+
schema:
|
|
242
|
+
type: object
|
|
243
|
+
properties:
|
|
244
|
+
id:
|
|
245
|
+
type: string
|
|
246
|
+
format: uuid
|
|
247
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
248
|
+
name:
|
|
249
|
+
type: string
|
|
250
|
+
example: Updated Studio Name
|
|
251
|
+
hours_by_day:
|
|
252
|
+
type: number
|
|
253
|
+
example: 7.5
|
|
254
|
+
created_at:
|
|
255
|
+
type: string
|
|
256
|
+
format: date-time
|
|
257
|
+
example: "2024-01-15T10:30:00Z"
|
|
258
|
+
updated_at:
|
|
259
|
+
type: string
|
|
260
|
+
format: date-time
|
|
261
|
+
example: "2024-01-15T11:00:00Z"
|
|
262
|
+
400:
|
|
263
|
+
description: Invalid data format or validation error
|
|
264
|
+
"""
|
|
265
|
+
return super().put(instance_id)
|
|
266
|
+
|
|
267
|
+
@jwt_required()
|
|
268
|
+
def delete(self, instance_id):
|
|
269
|
+
"""
|
|
270
|
+
Delete organisation
|
|
271
|
+
---
|
|
272
|
+
tags:
|
|
273
|
+
- Crud
|
|
274
|
+
description: Delete an organisation by its ID. Returns empty
|
|
275
|
+
response on success.
|
|
276
|
+
parameters:
|
|
277
|
+
- in: path
|
|
278
|
+
name: instance_id
|
|
279
|
+
required: true
|
|
280
|
+
schema:
|
|
281
|
+
type: string
|
|
282
|
+
format: uuid
|
|
283
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
284
|
+
responses:
|
|
285
|
+
204:
|
|
286
|
+
description: Organisation deleted successfully
|
|
287
|
+
400:
|
|
288
|
+
description: Integrity error or cannot delete
|
|
289
|
+
"""
|
|
290
|
+
return super().delete(instance_id)
|
|
291
|
+
|
|
23
292
|
def pre_update(self, instance_dict, data):
|
|
24
293
|
if "hours_by_day" in data:
|
|
25
294
|
data["hours_by_day"] = float(data["hours_by_day"])
|
|
@@ -62,25 +62,49 @@ class OutputFileResource(BaseModelResource):
|
|
|
62
62
|
@jwt_required()
|
|
63
63
|
def get(self, instance_id):
|
|
64
64
|
"""
|
|
65
|
-
|
|
66
|
-
object.
|
|
65
|
+
Get output file
|
|
67
66
|
---
|
|
68
67
|
tags:
|
|
69
68
|
- Crud
|
|
69
|
+
description: Retrieve an output file instance by its ID and return
|
|
70
|
+
it as a JSON object.
|
|
70
71
|
parameters:
|
|
71
72
|
- in: path
|
|
72
|
-
name:
|
|
73
|
-
required:
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
name: instance_id
|
|
74
|
+
required: true
|
|
75
|
+
schema:
|
|
76
|
+
type: string
|
|
77
|
+
format: uuid
|
|
76
78
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
77
79
|
responses:
|
|
78
80
|
200:
|
|
79
|
-
|
|
81
|
+
description: Output file retrieved successfully
|
|
82
|
+
content:
|
|
83
|
+
application/json:
|
|
84
|
+
schema:
|
|
85
|
+
type: object
|
|
86
|
+
properties:
|
|
87
|
+
id:
|
|
88
|
+
type: string
|
|
89
|
+
format: uuid
|
|
90
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
91
|
+
name:
|
|
92
|
+
type: string
|
|
93
|
+
example: output_file_v001
|
|
94
|
+
entity_id:
|
|
95
|
+
type: string
|
|
96
|
+
format: uuid
|
|
97
|
+
example: b24a6ea4-ce75-4665-a070-57453082c25
|
|
98
|
+
created_at:
|
|
99
|
+
type: string
|
|
100
|
+
format: date-time
|
|
101
|
+
example: "2024-01-15T10:30:00Z"
|
|
102
|
+
updated_at:
|
|
103
|
+
type: string
|
|
104
|
+
format: date-time
|
|
105
|
+
example: "2024-01-15T10:30:00Z"
|
|
80
106
|
400:
|
|
81
|
-
|
|
82
|
-
404:
|
|
83
|
-
description: Value error
|
|
107
|
+
description: Invalid ID format or query error
|
|
84
108
|
"""
|
|
85
109
|
try:
|
|
86
110
|
output_file = files_service.get_output_file(instance_id)
|
|
@@ -26,25 +26,45 @@ class OutputTypeResource(BaseModelResource):
|
|
|
26
26
|
@jwt_required()
|
|
27
27
|
def get(self, instance_id):
|
|
28
28
|
"""
|
|
29
|
-
|
|
30
|
-
JSON object.
|
|
29
|
+
Get output type
|
|
31
30
|
---
|
|
32
31
|
tags:
|
|
33
32
|
- Crud
|
|
33
|
+
description: Retrieve an output type instance by its ID and return
|
|
34
|
+
it as a JSON object.
|
|
34
35
|
parameters:
|
|
35
36
|
- in: path
|
|
36
|
-
name:
|
|
37
|
-
required:
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
name: instance_id
|
|
38
|
+
required: true
|
|
39
|
+
schema:
|
|
40
|
+
type: string
|
|
41
|
+
format: uuid
|
|
40
42
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
41
43
|
responses:
|
|
42
44
|
200:
|
|
43
|
-
|
|
45
|
+
description: Output type retrieved successfully
|
|
46
|
+
content:
|
|
47
|
+
application/json:
|
|
48
|
+
schema:
|
|
49
|
+
type: object
|
|
50
|
+
properties:
|
|
51
|
+
id:
|
|
52
|
+
type: string
|
|
53
|
+
format: uuid
|
|
54
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
55
|
+
name:
|
|
56
|
+
type: string
|
|
57
|
+
example: Image
|
|
58
|
+
created_at:
|
|
59
|
+
type: string
|
|
60
|
+
format: date-time
|
|
61
|
+
example: "2024-01-15T10:30:00Z"
|
|
62
|
+
updated_at:
|
|
63
|
+
type: string
|
|
64
|
+
format: date-time
|
|
65
|
+
example: "2024-01-15T10:30:00Z"
|
|
44
66
|
400:
|
|
45
|
-
|
|
46
|
-
404:
|
|
47
|
-
description: Value error
|
|
67
|
+
description: Invalid ID format or query error
|
|
48
68
|
"""
|
|
49
69
|
try:
|
|
50
70
|
output_type = files_service.get_output_type(instance_id)
|