zou 0.20.83__py3-none-any.whl → 0.20.84__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. zou/__init__.py +1 -1
  2. zou/app/blueprints/comments/resources.py +32 -35
  3. zou/app/blueprints/concepts/resources.py +23 -8
  4. zou/app/blueprints/crud/asset_instance.py +272 -0
  5. zou/app/blueprints/crud/attachment_file.py +263 -0
  6. zou/app/blueprints/crud/base.py +176 -69
  7. zou/app/blueprints/crud/budget.py +278 -0
  8. zou/app/blueprints/crud/budget_entry.py +269 -0
  9. zou/app/blueprints/crud/chat.py +282 -0
  10. zou/app/blueprints/crud/chat_message.py +286 -0
  11. zou/app/blueprints/crud/comments.py +312 -1
  12. zou/app/blueprints/crud/custom_action.py +268 -0
  13. zou/app/blueprints/crud/day_off.py +298 -0
  14. zou/app/blueprints/crud/department.py +268 -0
  15. zou/app/blueprints/crud/entity.py +297 -3
  16. zou/app/blueprints/crud/entity_link.py +303 -0
  17. zou/app/blueprints/crud/entity_type.py +269 -0
  18. zou/app/blueprints/crud/event.py +197 -0
  19. zou/app/blueprints/crud/file_status.py +268 -0
  20. zou/app/blueprints/crud/hardware_item.py +268 -0
  21. zou/app/blueprints/crud/metadata_descriptor.py +312 -0
  22. zou/app/blueprints/crud/milestone.py +302 -1
  23. zou/app/blueprints/crud/news.py +285 -0
  24. zou/app/blueprints/crud/notification.py +287 -0
  25. zou/app/blueprints/crud/organisation.py +269 -0
  26. zou/app/blueprints/crud/output_file.py +34 -10
  27. zou/app/blueprints/crud/output_type.py +30 -10
  28. zou/app/blueprints/crud/person.py +407 -2
  29. zou/app/blueprints/crud/playlist.py +322 -4
  30. zou/app/blueprints/crud/plugin.py +269 -0
  31. zou/app/blueprints/crud/preview_background_file.py +272 -0
  32. zou/app/blueprints/crud/preview_file.py +280 -9
  33. zou/app/blueprints/crud/production_schedule_version.py +569 -0
  34. zou/app/blueprints/crud/project.py +440 -0
  35. zou/app/blueprints/crud/project_status.py +268 -0
  36. zou/app/blueprints/crud/salary_scale.py +185 -5
  37. zou/app/blueprints/crud/schedule_item.py +305 -0
  38. zou/app/blueprints/crud/search_filter.py +302 -0
  39. zou/app/blueprints/crud/search_filter_group.py +270 -0
  40. zou/app/blueprints/crud/software.py +30 -10
  41. zou/app/blueprints/crud/status_automation.py +296 -2
  42. zou/app/blueprints/crud/studio.py +268 -0
  43. zou/app/blueprints/crud/subscription.py +279 -0
  44. zou/app/blueprints/crud/task.py +325 -5
  45. zou/app/blueprints/crud/task_status.py +301 -0
  46. zou/app/blueprints/crud/task_type.py +283 -0
  47. zou/app/blueprints/crud/time_spent.py +327 -0
  48. zou/app/blueprints/crud/working_file.py +273 -10
  49. zou/app/blueprints/export/csv/assets.py +15 -5
  50. zou/app/blueprints/export/csv/base.py +12 -3
  51. zou/app/blueprints/export/csv/casting.py +32 -5
  52. zou/app/blueprints/export/csv/edits.py +15 -5
  53. zou/app/blueprints/export/csv/persons.py +24 -0
  54. zou/app/blueprints/export/csv/playlists.py +16 -5
  55. zou/app/blueprints/export/csv/projects.py +23 -0
  56. zou/app/blueprints/export/csv/shots.py +15 -5
  57. zou/app/blueprints/export/csv/task_types.py +23 -0
  58. zou/app/blueprints/export/csv/tasks.py +24 -0
  59. zou/app/blueprints/export/csv/time_spents.py +24 -0
  60. zou/app/blueprints/files/resources.py +928 -377
  61. zou/app/blueprints/news/resources.py +7 -5
  62. zou/app/blueprints/persons/resources.py +644 -271
  63. zou/app/blueprints/playlists/resources.py +154 -72
  64. zou/app/blueprints/previews/resources.py +473 -228
  65. zou/app/blueprints/projects/__init__.py +5 -0
  66. zou/app/blueprints/projects/resources.py +987 -420
  67. zou/app/blueprints/search/resources.py +44 -32
  68. zou/app/blueprints/shots/resources.py +1338 -88
  69. zou/app/blueprints/source/csv/assets.py +44 -6
  70. zou/app/blueprints/source/csv/casting.py +43 -6
  71. zou/app/blueprints/source/csv/edits.py +47 -9
  72. zou/app/blueprints/source/csv/persons.py +43 -4
  73. zou/app/blueprints/source/csv/shots.py +47 -6
  74. zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
  75. zou/app/blueprints/source/kitsu.py +433 -11
  76. zou/app/blueprints/source/otio.py +215 -20
  77. zou/app/blueprints/source/shotgun/assets.py +146 -0
  78. zou/app/blueprints/source/shotgun/base.py +85 -14
  79. zou/app/blueprints/source/shotgun/episode.py +124 -0
  80. zou/app/blueprints/source/shotgun/import_errors.py +105 -14
  81. zou/app/blueprints/source/shotgun/notes.py +132 -0
  82. zou/app/blueprints/source/shotgun/person.py +163 -0
  83. zou/app/blueprints/source/shotgun/project.py +120 -0
  84. zou/app/blueprints/source/shotgun/scene.py +120 -0
  85. zou/app/blueprints/source/shotgun/sequence.py +134 -0
  86. zou/app/blueprints/source/shotgun/shot.py +166 -0
  87. zou/app/blueprints/source/shotgun/status.py +129 -0
  88. zou/app/blueprints/source/shotgun/steps.py +138 -0
  89. zou/app/blueprints/source/shotgun/tasks.py +199 -0
  90. zou/app/blueprints/source/shotgun/team.py +132 -0
  91. zou/app/blueprints/source/shotgun/versions.py +155 -0
  92. zou/app/blueprints/tasks/resources.py +1197 -308
  93. zou/app/models/metadata_descriptor.py +1 -0
  94. zou/app/services/persons_service.py +1 -1
  95. zou/app/services/projects_service.py +45 -1
  96. zou/app/services/time_spents_service.py +1 -1
  97. zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
  98. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/METADATA +18 -18
  99. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/RECORD +103 -102
  100. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
  101. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
  102. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
  103. {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
@@ -24,6 +24,150 @@ class WorkingFilesResource(BaseModelsResource):
24
24
  user_service.block_access_to_vendor()
25
25
  return True
26
26
 
27
+ @jwt_required()
28
+ def get(self):
29
+ """
30
+ Get working files
31
+ ---
32
+ tags:
33
+ - Crud
34
+ description: Retrieve all working files. Supports filtering via
35
+ query parameters and pagination. Vendor access is blocked.
36
+ Includes project permission filtering for non-admin users.
37
+ parameters:
38
+ - in: query
39
+ name: page
40
+ required: false
41
+ schema:
42
+ type: integer
43
+ example: 1
44
+ description: Page number for pagination
45
+ - in: query
46
+ name: limit
47
+ required: false
48
+ schema:
49
+ type: integer
50
+ example: 50
51
+ description: Number of results per page
52
+ - in: query
53
+ name: relations
54
+ required: false
55
+ schema:
56
+ type: boolean
57
+ default: false
58
+ example: false
59
+ description: Whether to include relations
60
+ responses:
61
+ 200:
62
+ description: Working files retrieved successfully
63
+ content:
64
+ application/json:
65
+ schema:
66
+ oneOf:
67
+ - type: array
68
+ items:
69
+ type: object
70
+ - type: object
71
+ properties:
72
+ data:
73
+ type: array
74
+ items:
75
+ type: object
76
+ example: []
77
+ total:
78
+ type: integer
79
+ example: 100
80
+ nb_pages:
81
+ type: integer
82
+ example: 2
83
+ limit:
84
+ type: integer
85
+ example: 50
86
+ offset:
87
+ type: integer
88
+ example: 0
89
+ page:
90
+ type: integer
91
+ example: 1
92
+ 400:
93
+ description: Invalid filter format or query error
94
+ """
95
+ return super().get()
96
+
97
+ @jwt_required()
98
+ def post(self):
99
+ """
100
+ Create working file
101
+ ---
102
+ tags:
103
+ - Crud
104
+ description: Create a new working file with data provided in the
105
+ request body. JSON format is expected.
106
+ requestBody:
107
+ required: true
108
+ content:
109
+ application/json:
110
+ schema:
111
+ type: object
112
+ required:
113
+ - name
114
+ - task_id
115
+ - entity_id
116
+ properties:
117
+ name:
118
+ type: string
119
+ example: work_file_v001
120
+ task_id:
121
+ type: string
122
+ format: uuid
123
+ example: a24a6ea4-ce75-4665-a070-57453082c25
124
+ entity_id:
125
+ type: string
126
+ format: uuid
127
+ example: b24a6ea4-ce75-4665-a070-57453082c25
128
+ revision:
129
+ type: integer
130
+ default: 1
131
+ example: 1
132
+ responses:
133
+ 201:
134
+ description: Working file created successfully
135
+ content:
136
+ application/json:
137
+ schema:
138
+ type: object
139
+ properties:
140
+ id:
141
+ type: string
142
+ format: uuid
143
+ example: a24a6ea4-ce75-4665-a070-57453082c25
144
+ name:
145
+ type: string
146
+ example: work_file_v001
147
+ task_id:
148
+ type: string
149
+ format: uuid
150
+ example: b24a6ea4-ce75-4665-a070-57453082c25
151
+ entity_id:
152
+ type: string
153
+ format: uuid
154
+ example: c24a6ea4-ce75-4665-a070-57453082c25
155
+ revision:
156
+ type: integer
157
+ example: 1
158
+ created_at:
159
+ type: string
160
+ format: date-time
161
+ example: "2024-01-15T10:30:00Z"
162
+ updated_at:
163
+ type: string
164
+ format: date-time
165
+ example: "2024-01-15T10:30:00Z"
166
+ 400:
167
+ description: Invalid data format or validation error
168
+ """
169
+ return super().post()
170
+
27
171
  def add_project_permission_filter(self, query):
28
172
  """
29
173
  Filtering to keep only the files from projects available to the user's
@@ -54,28 +198,147 @@ class WorkingFileResource(BaseModelResource):
54
198
  user_service.check_task_action_access(working_file["task_id"])
55
199
  return True
56
200
 
201
+ @jwt_required()
202
+ def put(self, instance_id):
203
+ """
204
+ Update working file
205
+ ---
206
+ tags:
207
+ - Crud
208
+ description: Update a working file with data provided in the
209
+ request body. JSON format is expected. Requires task action
210
+ access.
211
+ parameters:
212
+ - in: path
213
+ name: instance_id
214
+ required: true
215
+ schema:
216
+ type: string
217
+ format: uuid
218
+ example: a24a6ea4-ce75-4665-a070-57453082c25
219
+ requestBody:
220
+ required: true
221
+ content:
222
+ application/json:
223
+ schema:
224
+ type: object
225
+ properties:
226
+ name:
227
+ type: string
228
+ example: updated_work_file_v001
229
+ revision:
230
+ type: integer
231
+ example: 2
232
+ responses:
233
+ 200:
234
+ description: Working file updated successfully
235
+ content:
236
+ application/json:
237
+ schema:
238
+ type: object
239
+ properties:
240
+ id:
241
+ type: string
242
+ format: uuid
243
+ example: a24a6ea4-ce75-4665-a070-57453082c25
244
+ name:
245
+ type: string
246
+ example: updated_work_file_v001
247
+ task_id:
248
+ type: string
249
+ format: uuid
250
+ example: b24a6ea4-ce75-4665-a070-57453082c25
251
+ entity_id:
252
+ type: string
253
+ format: uuid
254
+ example: c24a6ea4-ce75-4665-a070-57453082c25
255
+ revision:
256
+ type: integer
257
+ example: 2
258
+ created_at:
259
+ type: string
260
+ format: date-time
261
+ example: "2024-01-15T10:30:00Z"
262
+ updated_at:
263
+ type: string
264
+ format: date-time
265
+ example: "2024-01-15T11:00:00Z"
266
+ 400:
267
+ description: Invalid data format or validation error
268
+ """
269
+ return super().put(instance_id)
270
+
271
+ @jwt_required()
272
+ def delete(self, instance_id):
273
+ """
274
+ Delete working file
275
+ ---
276
+ tags:
277
+ - Crud
278
+ description: Delete a working file by its ID. Returns empty
279
+ response on success.
280
+ parameters:
281
+ - in: path
282
+ name: instance_id
283
+ required: true
284
+ schema:
285
+ type: string
286
+ format: uuid
287
+ example: a24a6ea4-ce75-4665-a070-57453082c25
288
+ responses:
289
+ 204:
290
+ description: Working file deleted successfully
291
+ 400:
292
+ description: Integrity error or cannot delete
293
+ """
294
+ return super().delete(instance_id)
295
+
57
296
  @jwt_required()
58
297
  def get(self, instance_id):
59
298
  """
60
- Retrieve a working file corresponding at given ID and return it as a
61
- JSON object.
299
+ Get working file
62
300
  ---
63
301
  tags:
64
302
  - Crud
303
+ description: Retrieve a working file instance by its ID and return
304
+ it as a JSON object.
65
305
  parameters:
66
306
  - in: path
67
- name: working_file_id
68
- required: True
69
- type: string
70
- format: uuid
307
+ name: instance_id
308
+ required: true
309
+ schema:
310
+ type: string
311
+ format: uuid
71
312
  example: a24a6ea4-ce75-4665-a070-57453082c25
72
313
  responses:
73
314
  200:
74
- description: Model as a JSON object
315
+ description: Working file retrieved successfully
316
+ content:
317
+ application/json:
318
+ schema:
319
+ type: object
320
+ properties:
321
+ id:
322
+ type: string
323
+ format: uuid
324
+ example: a24a6ea4-ce75-4665-a070-57453082c25
325
+ name:
326
+ type: string
327
+ example: work_file_v001
328
+ task_id:
329
+ type: string
330
+ format: uuid
331
+ example: b24a6ea4-ce75-4665-a070-57453082c25
332
+ created_at:
333
+ type: string
334
+ format: date-time
335
+ example: "2024-01-15T10:30:00Z"
336
+ updated_at:
337
+ type: string
338
+ format: date-time
339
+ example: "2024-01-15T10:30:00Z"
75
340
  400:
76
- description: Statement error
77
- 404:
78
- description: Value error
341
+ description: Invalid ID format or query error
79
342
  """
80
343
  try:
81
344
  working_file = files_service.get_working_file(instance_id)
@@ -17,20 +17,30 @@ class AssetsCsvExport(Resource):
17
17
  @jwt_required()
18
18
  def get(self, project_id):
19
19
  """
20
- Export assets linked to a given project as csv.
20
+ Export assets csv
21
21
  ---
22
22
  tags:
23
23
  - Export
24
+ description: Export project assets as CSV file. Includes asset
25
+ information, task statuses, assignments, and metadata.
26
+ produces:
27
+ - text/csv
24
28
  parameters:
25
29
  - in: path
26
30
  name: project_id
27
- required: True
28
- type: string
29
- format: uuid
31
+ required: true
32
+ schema:
33
+ type: string
34
+ format: uuid
30
35
  example: a24a6ea4-ce75-4665-a070-57453082c25
31
36
  responses:
32
37
  200:
33
- description: Assets exported as csv
38
+ description: Assets exported as CSV successfully
39
+ content:
40
+ text/csv:
41
+ schema:
42
+ type: string
43
+ example: "Project,Type,Name,Description,Time Spent\nProject A,Character,Asset1,Description,10.50"
34
44
  """
35
45
  project = projects_service.get_project(project_id)
36
46
  self.check_permissions(project["id"])
@@ -20,13 +20,22 @@ class BaseCsvExport(Resource):
20
20
  @jwt_required()
21
21
  def get(self):
22
22
  """
23
- Export as csv.
23
+ Export csv
24
24
  ---
25
25
  tags:
26
- - Export
26
+ - Export
27
+ description: Export data as CSV file. Returns a CSV file with
28
+ formatted data based on the resource type.
29
+ produces:
30
+ - text/csv
27
31
  responses:
28
32
  200:
29
- description: Exported as csv
33
+ description: CSV file exported successfully
34
+ content:
35
+ text/csv:
36
+ schema:
37
+ type: string
38
+ example: "Header1,Header2\nValue1,Value2"
30
39
  """
31
40
  self.prepare_import()
32
41
  try:
@@ -16,20 +16,47 @@ class CastingCsvExport(Resource, ArgsMixin):
16
16
  @jwt_required()
17
17
  def get(self, project_id):
18
18
  """
19
- Export casting linked to a given project as csv.
19
+ Export casting csv
20
20
  ---
21
21
  tags:
22
22
  - Export
23
+ description: Export project casting links as CSV file. Includes
24
+ links between assets and shots, sequences, or episodes with
25
+ occurrence counts and labels.
26
+ produces:
27
+ - text/csv
23
28
  parameters:
24
29
  - in: path
25
30
  name: project_id
26
- required: True
27
- type: string
28
- format: uuid
31
+ required: true
32
+ schema:
33
+ type: string
34
+ format: uuid
29
35
  example: a24a6ea4-ce75-4665-a070-57453082c25
36
+ - in: query
37
+ name: episode_id
38
+ required: false
39
+ schema:
40
+ type: string
41
+ format: uuid
42
+ example: b24a6ea4-ce75-4665-a070-57453082c25
43
+ description: Episode ID to filter casting links
44
+ - in: query
45
+ name: is_shot_casting
46
+ required: false
47
+ schema:
48
+ type: boolean
49
+ default: false
50
+ example: false
51
+ description: Whether to export shot casting only
30
52
  responses:
31
53
  200:
32
- description: Casting exported as csv
54
+ description: Casting exported as CSV successfully
55
+ content:
56
+ text/csv:
57
+ schema:
58
+ type: string
59
+ example: "Parent,Name,Asset Type,Asset,Occurences,Label\nSequence1,SH010,Character,Asset1,1,fixed"
33
60
  """
34
61
  project = projects_service.get_project(project_id) # Check existence
35
62
  self.check_permissions(project_id)
@@ -16,20 +16,30 @@ class EditsCsvExport(Resource):
16
16
  @jwt_required()
17
17
  def get(self, project_id):
18
18
  """
19
- Export edits linked to a given project as csv.
19
+ Export edits csv
20
20
  ---
21
21
  tags:
22
22
  - Export
23
+ description: Export project edits as CSV file. Includes edit
24
+ information, task statuses, assignments, and metadata.
25
+ produces:
26
+ - text/csv
23
27
  parameters:
24
28
  - in: path
25
29
  name: project_id
26
- required: True
27
- type: string
28
- format: uuid
30
+ required: true
31
+ schema:
32
+ type: string
33
+ format: uuid
29
34
  example: a24a6ea4-ce75-4665-a070-57453082c25
30
35
  responses:
31
36
  200:
32
- description: Edits exported as csv
37
+ description: Edits exported as CSV successfully
38
+ content:
39
+ text/csv:
40
+ schema:
41
+ type: string
42
+ example: "Project,Episode,Name,Description,Time Spent\nProject A,EP01,Edit_001,Description,8.75"
33
43
  """
34
44
  self.task_type_map = tasks_service.get_task_type_map()
35
45
  self.task_status_map = tasks_service.get_task_status_map()
@@ -1,4 +1,5 @@
1
1
  from zou.app.blueprints.export.csv.base import BaseCsvExport
2
+ from flask_jwt_extended import jwt_required
2
3
 
3
4
  from zou.app.models.person import Person
4
5
 
@@ -8,6 +9,29 @@ class PersonsCsvExport(BaseCsvExport):
8
9
  BaseCsvExport.__init__(self)
9
10
  self.file_name = "people_export"
10
11
 
12
+ @jwt_required()
13
+ def get(self):
14
+ """
15
+ Export persons csv
16
+ ---
17
+ tags:
18
+ - Export
19
+ description: Export persons as CSV file. Includes person information
20
+ with last name, first name, email, phone, role, contract type,
21
+ and active status. Excludes bot accounts.
22
+ produces:
23
+ - text/csv
24
+ responses:
25
+ 200:
26
+ description: Persons exported as CSV successfully
27
+ content:
28
+ text/csv:
29
+ schema:
30
+ type: string
31
+ example: "Last Name,First Name,Email,Phone,Role,Contract Type,Active\nDoe,John,john.doe@example.com,+1234567890,user,freelance,yes"
32
+ """
33
+ return super().get()
34
+
11
35
  def build_headers(self):
12
36
  return [
13
37
  "Last Name",
@@ -22,20 +22,31 @@ class PlaylistCsvExport(Resource):
22
22
  @jwt_required()
23
23
  def get(self, playlist_id):
24
24
  """
25
- Export a given playlist as csv.
25
+ Export playlist csv
26
26
  ---
27
27
  tags:
28
28
  - Export
29
+ description: Export playlist as CSV file. Includes playlist shots
30
+ with preview information, task statuses, comments, and revision
31
+ details.
32
+ produces:
33
+ - text/csv
29
34
  parameters:
30
35
  - in: path
31
36
  name: playlist_id
32
- required: True
33
- type: string
34
- format: uuid
37
+ required: true
38
+ schema:
39
+ type: string
40
+ format: uuid
35
41
  example: a24a6ea4-ce75-4665-a070-57453082c25
36
42
  responses:
37
43
  200:
38
- description: Playlist exported as csv
44
+ description: Playlist exported as CSV successfully
45
+ content:
46
+ text/csv:
47
+ schema:
48
+ type: string
49
+ example: "Entity name,Nb Frames,Task Type,Retake count,Revision,Task Status,Last comment author,Last comment date,Last comment\nSH010,120,Animation,2,10,WIP,John Doe,2024-01-15,Good work"
39
50
  """
40
51
  user_service.block_access_to_vendor()
41
52
  playlist = playlists_service.get_playlist(playlist_id)
@@ -1,4 +1,5 @@
1
1
  from zou.app.blueprints.export.csv.base import BaseCsvExport
2
+ from flask_jwt_extended import jwt_required
2
3
 
3
4
  from zou.app.models.project_status import ProjectStatus
4
5
  from zou.app.models.project import Project
@@ -8,6 +9,28 @@ class ProjectsCsvExport(BaseCsvExport):
8
9
  def __init__(self):
9
10
  BaseCsvExport.__init__(self)
10
11
 
12
+ @jwt_required()
13
+ def get(self):
14
+ """
15
+ Export projects csv
16
+ ---
17
+ tags:
18
+ - Export
19
+ description: Export projects as CSV file. Includes project name
20
+ and status information.
21
+ produces:
22
+ - text/csv
23
+ responses:
24
+ 200:
25
+ description: Projects exported as CSV successfully
26
+ content:
27
+ text/csv:
28
+ schema:
29
+ type: string
30
+ example: "Name,Status\nProject A,Active\nProject B,Open"
31
+ """
32
+ return super().get()
33
+
11
34
  def build_headers(self):
12
35
  return ["Name", "Status"]
13
36
 
@@ -17,20 +17,30 @@ class ShotsCsvExport(Resource):
17
17
  @jwt_required()
18
18
  def get(self, project_id):
19
19
  """
20
- Export shots linked to a given project as csv.
20
+ Export shots csv
21
21
  ---
22
22
  tags:
23
23
  - Export
24
+ description: Export project shots as CSV file. Includes shot
25
+ information, frames, task statuses, assignments, and metadata.
26
+ produces:
27
+ - text/csv
24
28
  parameters:
25
29
  - in: path
26
30
  name: project_id
27
- required: True
28
- type: string
29
- format: uuid
31
+ required: true
32
+ schema:
33
+ type: string
34
+ format: uuid
30
35
  example: a24a6ea4-ce75-4665-a070-57453082c25
31
36
  responses:
32
37
  200:
33
- description: Shots exported as csv
38
+ description: Shots exported as CSV successfully
39
+ content:
40
+ text/csv:
41
+ schema:
42
+ type: string
43
+ example: "Project,Episode,Sequence,Name,Description,Time Spent,Frames,Frame In,Frame Out,FPS\nProject A,EP01,SQ01,SH010,Description,5.25,120,1001,1120,24"
34
44
  """
35
45
  project = projects_service.get_project(project_id)
36
46
  self.check_permissions(project["id"])
@@ -1,4 +1,5 @@
1
1
  from zou.app.blueprints.export.csv.base import BaseCsvExport
2
+ from flask_jwt_extended import jwt_required
2
3
 
3
4
  from zou.app.models.department import Department
4
5
  from zou.app.models.task_type import TaskType
@@ -10,6 +11,28 @@ class TaskTypesCsvExport(BaseCsvExport):
10
11
 
11
12
  self.name = "task_types_export"
12
13
 
14
+ @jwt_required()
15
+ def get(self):
16
+ """
17
+ Export task types csv
18
+ ---
19
+ tags:
20
+ - Export
21
+ description: Export task types as CSV file. Includes department
22
+ and task type name information.
23
+ produces:
24
+ - text/csv
25
+ responses:
26
+ 200:
27
+ description: Task types exported as CSV successfully
28
+ content:
29
+ text/csv:
30
+ schema:
31
+ type: string
32
+ example: "Department,Name\nAnimation,Animation\nModeling,Modeling"
33
+ """
34
+ return super().get()
35
+
13
36
  def build_headers(self):
14
37
  return ["Department", "Name"]
15
38
 
@@ -1,4 +1,5 @@
1
1
  from zou.app.blueprints.export.csv.base import BaseCsvExport
2
+ from flask_jwt_extended import jwt_required
2
3
  from sqlalchemy.orm import aliased
3
4
 
4
5
  from zou.app.models.task_status import TaskStatus
@@ -18,6 +19,29 @@ class TasksCsvExport(BaseCsvExport):
18
19
 
19
20
  self.file_name = "tasks_export"
20
21
 
22
+ @jwt_required()
23
+ def get(self):
24
+ """
25
+ Export tasks csv
26
+ ---
27
+ tags:
28
+ - Export
29
+ description: Export tasks as CSV file. Includes tasks from open
30
+ projects with project, task type, episode, sequence, entity,
31
+ assigner, assignees, dates, duration, estimation, and status.
32
+ produces:
33
+ - text/csv
34
+ responses:
35
+ 200:
36
+ description: Tasks exported as CSV successfully
37
+ content:
38
+ text/csv:
39
+ schema:
40
+ type: string
41
+ example: "Project,Task Type,Episode,Sequence,Entity Type,Entity,Assigner,Assignees,Duration,Estimation,Start date,Due date,WIP date,Validation date,Task Status\nProject A,Animation,EP01,SQ01,Shot,SH010,John Doe,Jane Doe,480,600,2024-01-01,2024-01-15,2024-01-05,2024-01-20,WIP"
42
+ """
43
+ return super().get()
44
+
21
45
  def build_headers(self):
22
46
  return [
23
47
  "Project",