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
|
@@ -20,13 +20,16 @@ from zou.app import config
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class DownloadAttachmentResource(Resource):
|
|
23
|
+
|
|
23
24
|
@jwt_required()
|
|
24
25
|
def get(self, attachment_file_id, file_name):
|
|
25
26
|
"""
|
|
26
|
-
Download attachment file
|
|
27
|
+
Download attachment file
|
|
27
28
|
---
|
|
29
|
+
description: Download a specific attachment file from a comment or chat
|
|
30
|
+
message. Supports various file types including images and documents.
|
|
28
31
|
tags:
|
|
29
|
-
|
|
32
|
+
- Comments
|
|
30
33
|
produces:
|
|
31
34
|
- multipart/form-data
|
|
32
35
|
- image/png
|
|
@@ -35,22 +38,26 @@ class DownloadAttachmentResource(Resource):
|
|
|
35
38
|
parameters:
|
|
36
39
|
- in: path
|
|
37
40
|
name: attachment_file_id
|
|
38
|
-
required:
|
|
41
|
+
required: true
|
|
39
42
|
type: string
|
|
40
43
|
format: uuid
|
|
41
44
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
45
|
+
description: Unique identifier of the attachment file
|
|
42
46
|
- in: path
|
|
43
47
|
name: file_name
|
|
44
|
-
required:
|
|
48
|
+
required: true
|
|
45
49
|
type: string
|
|
46
|
-
example:
|
|
50
|
+
example: "document.pdf"
|
|
51
|
+
description: Name of the file to download
|
|
47
52
|
responses:
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
200:
|
|
54
|
+
description: Attachment file successfully downloaded
|
|
55
|
+
content:
|
|
56
|
+
application/octet-stream:
|
|
50
57
|
schema:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
type: string
|
|
59
|
+
format: binary
|
|
60
|
+
description: File content
|
|
54
61
|
"""
|
|
55
62
|
attachment_file = comments_service.get_attachment_file(
|
|
56
63
|
attachment_file_id
|
|
@@ -91,95 +98,149 @@ class DownloadAttachmentResource(Resource):
|
|
|
91
98
|
|
|
92
99
|
|
|
93
100
|
class AckCommentResource(Resource):
|
|
94
|
-
"""
|
|
95
|
-
Acknowledge given comment. If it's already acknowledged, remove
|
|
96
|
-
acknowledgement.
|
|
97
|
-
"""
|
|
98
101
|
|
|
99
102
|
@jwt_required()
|
|
100
103
|
def post(self, task_id, comment_id):
|
|
101
104
|
"""
|
|
102
|
-
Acknowledge
|
|
105
|
+
Acknowledge comment
|
|
103
106
|
---
|
|
107
|
+
description: Acknowledge a specific comment. If it's already
|
|
108
|
+
acknowledged, remove the acknowledgement.
|
|
104
109
|
tags:
|
|
105
|
-
|
|
106
|
-
description: If it's already acknowledged, remove acknowledgement.
|
|
110
|
+
- Comments
|
|
107
111
|
parameters:
|
|
108
112
|
- in: path
|
|
109
113
|
name: task_id
|
|
110
|
-
required:
|
|
114
|
+
required: true
|
|
111
115
|
type: string
|
|
112
116
|
format: uuid
|
|
113
117
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
118
|
+
description: Unique identifier of the task
|
|
114
119
|
- in: path
|
|
115
120
|
name: comment_id
|
|
116
|
-
required:
|
|
121
|
+
required: true
|
|
117
122
|
type: string
|
|
118
123
|
format: uuid
|
|
119
|
-
example:
|
|
124
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
125
|
+
description: Unique identifier of the comment
|
|
120
126
|
responses:
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
200:
|
|
128
|
+
description: Comment acknowledgement status successfully updated
|
|
129
|
+
content:
|
|
130
|
+
application/json:
|
|
131
|
+
schema:
|
|
132
|
+
type: object
|
|
133
|
+
properties:
|
|
134
|
+
id:
|
|
135
|
+
type: string
|
|
136
|
+
format: uuid
|
|
137
|
+
description: Comment unique identifier
|
|
138
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
139
|
+
acknowledged:
|
|
140
|
+
type: boolean
|
|
141
|
+
description: Whether the comment is acknowledged
|
|
142
|
+
example: true
|
|
123
143
|
"""
|
|
124
144
|
user_service.check_task_access(task_id)
|
|
125
145
|
return comments_service.acknowledge_comment(comment_id)
|
|
126
146
|
|
|
127
147
|
|
|
128
148
|
class CommentTaskResource(Resource):
|
|
129
|
-
"""
|
|
130
|
-
Creates a new comment for given task. It requires a text, a task_status
|
|
131
|
-
and a person as arguments. This way, comments keep history of status
|
|
132
|
-
changes. When the comment is created, it updates the task status with
|
|
133
|
-
given task status.
|
|
134
|
-
"""
|
|
135
149
|
|
|
136
150
|
@jwt_required()
|
|
137
151
|
def post(self, task_id):
|
|
138
152
|
"""
|
|
139
|
-
Create
|
|
153
|
+
Create task comment
|
|
140
154
|
---
|
|
155
|
+
description: Create a new comment for a specific task. It requires a
|
|
156
|
+
text, a task_status and a person as arguments. This way, comments
|
|
157
|
+
keep history of status changes. When the comment is created, it
|
|
158
|
+
updates the task status with the given task status.
|
|
141
159
|
tags:
|
|
142
|
-
|
|
143
|
-
description: It requires a text, a task_status and a person as arguments.
|
|
144
|
-
This way, comments keep history of status changes.
|
|
145
|
-
When the comment is created, it updates the task status with given task status.
|
|
160
|
+
- Comments
|
|
146
161
|
parameters:
|
|
147
162
|
- in: path
|
|
148
163
|
name: task_id
|
|
149
|
-
required:
|
|
164
|
+
required: true
|
|
150
165
|
type: string
|
|
151
166
|
format: uuid
|
|
152
167
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
168
|
+
description: Unique identifier of the task
|
|
169
|
+
requestBody:
|
|
170
|
+
required: true
|
|
171
|
+
content:
|
|
172
|
+
application/json:
|
|
173
|
+
schema:
|
|
157
174
|
type: object
|
|
158
175
|
required:
|
|
159
|
-
|
|
176
|
+
- task_status_id
|
|
160
177
|
properties:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
178
|
+
task_status_id:
|
|
179
|
+
type: string
|
|
180
|
+
format: uuid
|
|
181
|
+
description: Task status identifier
|
|
182
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
183
|
+
comment:
|
|
184
|
+
type: string
|
|
185
|
+
description: Comment text content
|
|
186
|
+
example: "This looks great! Ready for review."
|
|
187
|
+
person_id:
|
|
188
|
+
type: string
|
|
189
|
+
format: uuid
|
|
190
|
+
description: Person identifier (optional, defaults to current user)
|
|
191
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
192
|
+
created_at:
|
|
193
|
+
type: string
|
|
194
|
+
format: date-time
|
|
195
|
+
description: Creation timestamp (optional, defaults to current time)
|
|
196
|
+
example: "2023-01-01T12:00:00Z"
|
|
197
|
+
checklist:
|
|
198
|
+
type: object
|
|
199
|
+
description: Checklist items for the comment
|
|
200
|
+
example: {"item1": "Check lighting", "item2": "Verify textures"}
|
|
201
|
+
links:
|
|
202
|
+
type: array
|
|
203
|
+
items:
|
|
204
|
+
type: string
|
|
205
|
+
description: List of related links
|
|
206
|
+
example: ["https://example.com/reference1", "https://example.com/reference2"]
|
|
207
|
+
responses:
|
|
208
|
+
201:
|
|
209
|
+
description: Comment successfully created
|
|
210
|
+
content:
|
|
211
|
+
application/json:
|
|
212
|
+
schema:
|
|
213
|
+
type: object
|
|
214
|
+
properties:
|
|
215
|
+
id:
|
|
216
|
+
type: string
|
|
217
|
+
format: uuid
|
|
218
|
+
description: Comment unique identifier
|
|
219
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
220
|
+
task_id:
|
|
221
|
+
type: string
|
|
222
|
+
format: uuid
|
|
223
|
+
description: Task identifier
|
|
224
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
167
225
|
person_id:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
226
|
+
type: string
|
|
227
|
+
format: uuid
|
|
228
|
+
description: Person identifier
|
|
229
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
230
|
+
comment:
|
|
231
|
+
type: string
|
|
232
|
+
description: Comment text content
|
|
233
|
+
example: "This looks great! Ready for review."
|
|
234
|
+
task_status_id:
|
|
235
|
+
type: string
|
|
236
|
+
format: uuid
|
|
237
|
+
description: Task status identifier
|
|
238
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
171
239
|
created_at:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
type: object
|
|
177
|
-
properties:
|
|
178
|
-
item 1:
|
|
179
|
-
type: string
|
|
180
|
-
responses:
|
|
181
|
-
201:
|
|
182
|
-
description: New comment created
|
|
240
|
+
type: string
|
|
241
|
+
format: date-time
|
|
242
|
+
description: Creation timestamp
|
|
243
|
+
example: "2023-01-01T12:00:00Z"
|
|
183
244
|
"""
|
|
184
245
|
(
|
|
185
246
|
task_status_id,
|
|
@@ -259,32 +320,37 @@ class AttachmentResource(Resource):
|
|
|
259
320
|
@jwt_required()
|
|
260
321
|
def delete(self, task_id, comment_id, attachment_id):
|
|
261
322
|
"""
|
|
262
|
-
Delete
|
|
323
|
+
Delete comment attachment
|
|
263
324
|
---
|
|
325
|
+
description: Delete a specific attachment file linked to a comment. Only
|
|
326
|
+
the comment author or project managers can delete attachments.
|
|
264
327
|
tags:
|
|
265
|
-
|
|
328
|
+
- Comments
|
|
266
329
|
parameters:
|
|
267
330
|
- in: path
|
|
268
331
|
name: task_id
|
|
269
|
-
required:
|
|
332
|
+
required: true
|
|
270
333
|
type: string
|
|
271
334
|
format: uuid
|
|
272
335
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
336
|
+
description: Unique identifier of the task
|
|
273
337
|
- in: path
|
|
274
338
|
name: comment_id
|
|
275
|
-
required:
|
|
339
|
+
required: true
|
|
276
340
|
type: string
|
|
277
341
|
format: uuid
|
|
278
|
-
example:
|
|
342
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
343
|
+
description: Unique identifier of the comment
|
|
279
344
|
- in: path
|
|
280
345
|
name: attachment_id
|
|
281
|
-
required:
|
|
346
|
+
required: true
|
|
282
347
|
type: string
|
|
283
348
|
format: uuid
|
|
284
|
-
example:
|
|
349
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
350
|
+
description: Unique identifier of the attachment
|
|
285
351
|
responses:
|
|
286
|
-
|
|
287
|
-
|
|
352
|
+
204:
|
|
353
|
+
description: Attachment successfully deleted
|
|
288
354
|
"""
|
|
289
355
|
user = persons_service.get_current_user()
|
|
290
356
|
comment = tasks_service.get_comment(comment_id)
|
|
@@ -300,10 +366,12 @@ class AddAttachmentToCommentResource(Resource):
|
|
|
300
366
|
@jwt_required()
|
|
301
367
|
def post(self, task_id, comment_id):
|
|
302
368
|
"""
|
|
303
|
-
Add
|
|
369
|
+
Add comment attachments
|
|
304
370
|
---
|
|
371
|
+
description: Add one or more files as attachments to a specific comment.
|
|
372
|
+
Supports various file types including images and documents.
|
|
305
373
|
tags:
|
|
306
|
-
|
|
374
|
+
- Comments
|
|
307
375
|
consumes:
|
|
308
376
|
- image/png
|
|
309
377
|
- image/gif
|
|
@@ -312,27 +380,61 @@ class AddAttachmentToCommentResource(Resource):
|
|
|
312
380
|
parameters:
|
|
313
381
|
- in: path
|
|
314
382
|
name: task_id
|
|
315
|
-
required:
|
|
383
|
+
required: true
|
|
316
384
|
type: string
|
|
317
385
|
format: uuid
|
|
318
386
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
387
|
+
description: Unique identifier of the task
|
|
319
388
|
- in: path
|
|
320
389
|
name: comment_id
|
|
321
|
-
required:
|
|
390
|
+
required: true
|
|
322
391
|
type: string
|
|
323
392
|
format: uuid
|
|
324
|
-
example:
|
|
393
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
394
|
+
description: Unique identifier of the comment
|
|
325
395
|
- in: formData
|
|
326
396
|
name: reply_id
|
|
327
|
-
type:
|
|
328
|
-
|
|
397
|
+
type: string
|
|
398
|
+
format: uuid
|
|
399
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
400
|
+
description: Reply identifier (optional)
|
|
329
401
|
- in: formData
|
|
330
402
|
name: files
|
|
331
403
|
type: file
|
|
332
|
-
required:
|
|
404
|
+
required: true
|
|
405
|
+
description: Files to attach to the comment
|
|
333
406
|
responses:
|
|
334
|
-
|
|
335
|
-
|
|
407
|
+
201:
|
|
408
|
+
description: Files successfully added as attachments
|
|
409
|
+
content:
|
|
410
|
+
application/json:
|
|
411
|
+
schema:
|
|
412
|
+
type: array
|
|
413
|
+
items:
|
|
414
|
+
type: object
|
|
415
|
+
properties:
|
|
416
|
+
id:
|
|
417
|
+
type: string
|
|
418
|
+
format: uuid
|
|
419
|
+
description: Attachment file unique identifier
|
|
420
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
421
|
+
name:
|
|
422
|
+
type: string
|
|
423
|
+
description: File name
|
|
424
|
+
example: "document.pdf"
|
|
425
|
+
mimetype:
|
|
426
|
+
type: string
|
|
427
|
+
description: File MIME type
|
|
428
|
+
example: "application/pdf"
|
|
429
|
+
size:
|
|
430
|
+
type: integer
|
|
431
|
+
description: File size in bytes
|
|
432
|
+
example: 1024000
|
|
433
|
+
comment_id:
|
|
434
|
+
type: string
|
|
435
|
+
format: uuid
|
|
436
|
+
description: Comment identifier
|
|
437
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
336
438
|
"""
|
|
337
439
|
user = persons_service.get_current_user()
|
|
338
440
|
comment = tasks_service.get_comment(comment_id)
|
|
@@ -348,64 +450,112 @@ class AddAttachmentToCommentResource(Resource):
|
|
|
348
450
|
|
|
349
451
|
|
|
350
452
|
class CommentManyTasksResource(Resource):
|
|
351
|
-
"""
|
|
352
|
-
Create several comments at once. Each comment requires a text, a task id,
|
|
353
|
-
a task_status and a person as arguments. This way, comments keep history of
|
|
354
|
-
status changes. When the comment is created, it updates the task status with
|
|
355
|
-
given task status.
|
|
356
|
-
"""
|
|
357
453
|
|
|
358
454
|
@jwt_required()
|
|
359
455
|
def post(self, project_id):
|
|
360
456
|
"""
|
|
361
|
-
Create
|
|
457
|
+
Create multiple comments
|
|
362
458
|
---
|
|
459
|
+
description: Create several comments at once for a specific project.
|
|
460
|
+
Each comment requires a text, a task id, a task_status and a person as
|
|
461
|
+
arguments. This way, comments keep history of status changes. When
|
|
462
|
+
the comment is created, it updates the task status with the given
|
|
463
|
+
task status.
|
|
363
464
|
tags:
|
|
364
|
-
|
|
365
|
-
description: Each comment requires a text, a task id, a task_status and a person as arguments.
|
|
366
|
-
This way, comments keep history of status changes.
|
|
367
|
-
When the comment is created, it updates the task status with given task status.
|
|
465
|
+
- Comments
|
|
368
466
|
parameters:
|
|
369
467
|
- in: path
|
|
370
468
|
name: project_id
|
|
371
|
-
required:
|
|
469
|
+
required: true
|
|
372
470
|
type: string
|
|
373
471
|
format: uuid
|
|
374
472
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
473
|
+
description: Unique identifier of the project
|
|
474
|
+
requestBody:
|
|
475
|
+
required: true
|
|
476
|
+
content:
|
|
477
|
+
application/json:
|
|
478
|
+
schema:
|
|
479
|
+
type: array
|
|
480
|
+
items:
|
|
481
|
+
type: object
|
|
482
|
+
required:
|
|
381
483
|
- task_status_id
|
|
382
|
-
|
|
484
|
+
- object_id
|
|
485
|
+
properties:
|
|
383
486
|
task_status_id:
|
|
487
|
+
type: string
|
|
488
|
+
format: uuid
|
|
489
|
+
description: Task status identifier
|
|
490
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
491
|
+
comment:
|
|
492
|
+
type: string
|
|
493
|
+
description: Comment text content
|
|
494
|
+
example: "This looks great! Ready for review."
|
|
495
|
+
person_id:
|
|
496
|
+
type: string
|
|
497
|
+
format: uuid
|
|
498
|
+
description: Person identifier (optional, defaults to current user)
|
|
499
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
500
|
+
object_id:
|
|
501
|
+
type: string
|
|
502
|
+
format: uuid
|
|
503
|
+
description: Task identifier
|
|
504
|
+
example: e68e0ie8-gi19-8009-e514-91897426g69
|
|
505
|
+
created_at:
|
|
506
|
+
type: string
|
|
507
|
+
format: date-time
|
|
508
|
+
description: Creation timestamp (optional, defaults to current time)
|
|
509
|
+
example: "2023-01-01T12:00:00Z"
|
|
510
|
+
checklist:
|
|
511
|
+
type: object
|
|
512
|
+
description: Checklist items for the comment
|
|
513
|
+
example: {"item1": "Check lighting", "item2": "Verify textures"}
|
|
514
|
+
links:
|
|
515
|
+
type: array
|
|
516
|
+
items:
|
|
517
|
+
type: string
|
|
518
|
+
description: List of related links
|
|
519
|
+
example: ["https://example.com/reference1", "https://example.com/reference2"]
|
|
520
|
+
responses:
|
|
521
|
+
201:
|
|
522
|
+
description: Comments successfully created
|
|
523
|
+
content:
|
|
524
|
+
application/json:
|
|
525
|
+
schema:
|
|
526
|
+
type: array
|
|
527
|
+
items:
|
|
528
|
+
type: object
|
|
529
|
+
properties:
|
|
530
|
+
id:
|
|
384
531
|
type: string
|
|
385
532
|
format: uuid
|
|
386
|
-
|
|
387
|
-
|
|
533
|
+
description: Comment unique identifier
|
|
534
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
535
|
+
task_id:
|
|
388
536
|
type: string
|
|
389
|
-
|
|
537
|
+
format: uuid
|
|
538
|
+
description: Task identifier
|
|
539
|
+
example: e68e0ie8-gi19-8009-e514-91897426g69
|
|
540
|
+
person_id:
|
|
390
541
|
type: string
|
|
391
542
|
format: uuid
|
|
392
|
-
|
|
393
|
-
|
|
543
|
+
description: Person identifier
|
|
544
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
545
|
+
comment:
|
|
546
|
+
type: string
|
|
547
|
+
description: Comment text content
|
|
548
|
+
example: "This looks great! Ready for review."
|
|
549
|
+
task_status_id:
|
|
394
550
|
type: string
|
|
395
551
|
format: uuid
|
|
396
|
-
|
|
397
|
-
|
|
552
|
+
description: Task status identifier
|
|
553
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
554
|
+
created_at:
|
|
398
555
|
type: string
|
|
399
556
|
format: date-time
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
type: object
|
|
403
|
-
properties:
|
|
404
|
-
item 1:
|
|
405
|
-
type: string
|
|
406
|
-
responses:
|
|
407
|
-
201:
|
|
408
|
-
description: Given files added to the comment entry as attachments
|
|
557
|
+
description: Creation timestamp
|
|
558
|
+
example: "2023-01-01T12:00:00Z"
|
|
409
559
|
"""
|
|
410
560
|
comments = request.json
|
|
411
561
|
person = persons_service.get_current_user(relations=True)
|
|
@@ -460,38 +610,68 @@ class CommentManyTasksResource(Resource):
|
|
|
460
610
|
|
|
461
611
|
|
|
462
612
|
class ReplyCommentResource(Resource, ArgsMixin):
|
|
463
|
-
"""
|
|
464
|
-
Reply to given comment. Add comment to its replies list.
|
|
465
|
-
"""
|
|
466
613
|
|
|
467
614
|
@jwt_required()
|
|
468
615
|
def post(self, task_id, comment_id):
|
|
469
616
|
"""
|
|
470
|
-
Reply to
|
|
617
|
+
Reply to comment
|
|
471
618
|
---
|
|
619
|
+
description: Add a reply to a specific comment. The reply will be added
|
|
620
|
+
to the comment's replies list.
|
|
472
621
|
tags:
|
|
473
|
-
|
|
474
|
-
description: Add comment to its replies list.
|
|
622
|
+
- Comments
|
|
475
623
|
parameters:
|
|
476
624
|
- in: path
|
|
477
625
|
name: task_id
|
|
478
|
-
required:
|
|
626
|
+
required: true
|
|
479
627
|
type: string
|
|
480
628
|
format: uuid
|
|
481
629
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
630
|
+
description: Unique identifier of the task
|
|
482
631
|
- in: path
|
|
483
632
|
name: comment_id
|
|
484
|
-
required:
|
|
633
|
+
required: true
|
|
485
634
|
type: string
|
|
486
635
|
format: uuid
|
|
487
|
-
example:
|
|
636
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
637
|
+
description: Unique identifier of the comment
|
|
488
638
|
- in: formData
|
|
489
639
|
name: text
|
|
490
640
|
type: string
|
|
491
|
-
example:
|
|
641
|
+
example: "Thanks for the feedback!"
|
|
642
|
+
description: Reply text content
|
|
492
643
|
responses:
|
|
493
|
-
|
|
494
|
-
|
|
644
|
+
200:
|
|
645
|
+
description: Reply successfully added to comment
|
|
646
|
+
content:
|
|
647
|
+
application/json:
|
|
648
|
+
schema:
|
|
649
|
+
type: object
|
|
650
|
+
properties:
|
|
651
|
+
id:
|
|
652
|
+
type: string
|
|
653
|
+
format: uuid
|
|
654
|
+
description: Reply unique identifier
|
|
655
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
656
|
+
comment_id:
|
|
657
|
+
type: string
|
|
658
|
+
format: uuid
|
|
659
|
+
description: Parent comment identifier
|
|
660
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
661
|
+
text:
|
|
662
|
+
type: string
|
|
663
|
+
description: Reply text content
|
|
664
|
+
example: "Thanks for the feedback!"
|
|
665
|
+
person_id:
|
|
666
|
+
type: string
|
|
667
|
+
format: uuid
|
|
668
|
+
description: Person identifier who made the reply
|
|
669
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
670
|
+
created_at:
|
|
671
|
+
type: string
|
|
672
|
+
format: date-time
|
|
673
|
+
description: Creation timestamp
|
|
674
|
+
example: "2023-01-01T12:00:00Z"
|
|
495
675
|
"""
|
|
496
676
|
comment = tasks_service.get_comment(comment_id)
|
|
497
677
|
current_user = persons_service.get_current_user()
|
|
@@ -517,39 +697,41 @@ class ReplyCommentResource(Resource, ArgsMixin):
|
|
|
517
697
|
|
|
518
698
|
|
|
519
699
|
class DeleteReplyCommentResource(Resource):
|
|
520
|
-
"""
|
|
521
|
-
Delete given comment reply.
|
|
522
|
-
"""
|
|
523
700
|
|
|
524
701
|
@jwt_required()
|
|
525
702
|
def delete(self, task_id, comment_id, reply_id):
|
|
526
703
|
"""
|
|
527
|
-
Delete
|
|
704
|
+
Delete comment reply
|
|
528
705
|
---
|
|
706
|
+
description: Delete a specific reply from a comment.
|
|
707
|
+
Only the reply author or administrators can delete replies.
|
|
529
708
|
tags:
|
|
530
|
-
|
|
709
|
+
- Comments
|
|
531
710
|
parameters:
|
|
532
711
|
- in: path
|
|
533
712
|
name: task_id
|
|
534
|
-
required:
|
|
713
|
+
required: true
|
|
535
714
|
type: string
|
|
536
715
|
format: uuid
|
|
537
716
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
717
|
+
description: Unique identifier of the task
|
|
538
718
|
- in: path
|
|
539
719
|
name: comment_id
|
|
540
|
-
required:
|
|
720
|
+
required: true
|
|
541
721
|
type: string
|
|
542
722
|
format: uuid
|
|
543
|
-
example:
|
|
723
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
724
|
+
description: Unique identifier of the comment
|
|
544
725
|
- in: path
|
|
545
726
|
name: reply_id
|
|
546
|
-
required:
|
|
727
|
+
required: true
|
|
547
728
|
type: string
|
|
548
729
|
format: uuid
|
|
549
|
-
example:
|
|
730
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
731
|
+
description: Unique identifier of the reply
|
|
550
732
|
responses:
|
|
551
|
-
|
|
552
|
-
|
|
733
|
+
200:
|
|
734
|
+
description: Reply successfully deleted
|
|
553
735
|
"""
|
|
554
736
|
reply = comments_service.get_reply(comment_id, reply_id)
|
|
555
737
|
current_user = persons_service.get_current_user()
|
|
@@ -559,23 +741,61 @@ class DeleteReplyCommentResource(Resource):
|
|
|
559
741
|
|
|
560
742
|
|
|
561
743
|
class ProjectAttachmentFiles(Resource):
|
|
744
|
+
|
|
562
745
|
@jwt_required()
|
|
563
746
|
def get(self, project_id):
|
|
564
747
|
"""
|
|
565
|
-
|
|
748
|
+
Get project attachment files
|
|
566
749
|
---
|
|
750
|
+
description: Retrieve all attachment files related to a specific
|
|
751
|
+
project. Requires administrator permissions.
|
|
567
752
|
tags:
|
|
568
|
-
|
|
753
|
+
- Comments
|
|
569
754
|
parameters:
|
|
570
755
|
- in: path
|
|
571
756
|
name: project_id
|
|
572
|
-
required:
|
|
757
|
+
required: true
|
|
573
758
|
type: string
|
|
574
759
|
format: uuid
|
|
575
760
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
761
|
+
description: Unique identifier of the project
|
|
576
762
|
responses:
|
|
577
|
-
|
|
578
|
-
|
|
763
|
+
200:
|
|
764
|
+
description: Project attachment files successfully retrieved
|
|
765
|
+
content:
|
|
766
|
+
application/json:
|
|
767
|
+
schema:
|
|
768
|
+
type: array
|
|
769
|
+
items:
|
|
770
|
+
type: object
|
|
771
|
+
properties:
|
|
772
|
+
id:
|
|
773
|
+
type: string
|
|
774
|
+
format: uuid
|
|
775
|
+
description: Attachment file unique identifier
|
|
776
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
777
|
+
name:
|
|
778
|
+
type: string
|
|
779
|
+
description: File name
|
|
780
|
+
example: "document.pdf"
|
|
781
|
+
mimetype:
|
|
782
|
+
type: string
|
|
783
|
+
description: File MIME type
|
|
784
|
+
example: "application/pdf"
|
|
785
|
+
size:
|
|
786
|
+
type: integer
|
|
787
|
+
description: File size in bytes
|
|
788
|
+
example: 1024000
|
|
789
|
+
comment_id:
|
|
790
|
+
type: string
|
|
791
|
+
format: uuid
|
|
792
|
+
description: Comment identifier
|
|
793
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
794
|
+
project_id:
|
|
795
|
+
type: string
|
|
796
|
+
format: uuid
|
|
797
|
+
description: Project identifier
|
|
798
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
579
799
|
"""
|
|
580
800
|
permissions.check_admin_permissions()
|
|
581
801
|
return comments_service.get_all_attachment_files_for_project(
|
|
@@ -584,27 +804,66 @@ class ProjectAttachmentFiles(Resource):
|
|
|
584
804
|
|
|
585
805
|
|
|
586
806
|
class TaskAttachmentFiles(Resource):
|
|
587
|
-
"""
|
|
588
|
-
Return all attachment files related to given task.
|
|
589
|
-
"""
|
|
590
807
|
|
|
591
808
|
@jwt_required()
|
|
592
809
|
def get(self, task_id):
|
|
593
810
|
"""
|
|
594
|
-
|
|
811
|
+
Get task attachment files
|
|
595
812
|
---
|
|
813
|
+
description: Retrieve all attachment files related to a specific task.
|
|
814
|
+
Requires administrator permissions.
|
|
596
815
|
tags:
|
|
597
|
-
|
|
816
|
+
- Comments
|
|
598
817
|
parameters:
|
|
599
818
|
- in: path
|
|
600
819
|
name: task_id
|
|
601
|
-
required:
|
|
820
|
+
required: true
|
|
602
821
|
type: string
|
|
603
822
|
format: uuid
|
|
604
823
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
824
|
+
description: Unique identifier of the task
|
|
605
825
|
responses:
|
|
606
|
-
|
|
607
|
-
|
|
826
|
+
200:
|
|
827
|
+
description: Task attachment files successfully retrieved
|
|
828
|
+
content:
|
|
829
|
+
application/json:
|
|
830
|
+
schema:
|
|
831
|
+
type: array
|
|
832
|
+
items:
|
|
833
|
+
type: object
|
|
834
|
+
properties:
|
|
835
|
+
id:
|
|
836
|
+
type: string
|
|
837
|
+
format: uuid
|
|
838
|
+
description: Attachment file unique identifier
|
|
839
|
+
example: d57d9hd7-fh08-7998-d403-80786315f58
|
|
840
|
+
name:
|
|
841
|
+
type: string
|
|
842
|
+
description: File name
|
|
843
|
+
example: "document.pdf"
|
|
844
|
+
mimetype:
|
|
845
|
+
type: string
|
|
846
|
+
description: File MIME type
|
|
847
|
+
example: "application/pdf"
|
|
848
|
+
size:
|
|
849
|
+
type: integer
|
|
850
|
+
description: File size in bytes
|
|
851
|
+
example: 1024000
|
|
852
|
+
comment_id:
|
|
853
|
+
type: string
|
|
854
|
+
format: uuid
|
|
855
|
+
description: Comment identifier
|
|
856
|
+
example: b35b7fb5-df86-5776-b181-68564193d36
|
|
857
|
+
task_id:
|
|
858
|
+
type: string
|
|
859
|
+
format: uuid
|
|
860
|
+
description: Task identifier
|
|
861
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
862
|
+
reply_id:
|
|
863
|
+
type: string
|
|
864
|
+
format: uuid
|
|
865
|
+
description: Reply identifier if attached to a reply
|
|
866
|
+
example: c46c8gc6-eg97-6887-c292-79675204e47
|
|
608
867
|
"""
|
|
609
868
|
permissions.check_admin_permissions()
|
|
610
869
|
return comments_service.get_all_attachment_files_for_task(task_id)
|