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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. zou/__init__.py +1 -1
  2. zou/app/blueprints/assets/resources.py +1060 -153
  3. zou/app/blueprints/auth/resources.py +368 -238
  4. zou/app/blueprints/breakdown/resources.py +584 -94
  5. zou/app/blueprints/chats/resources.py +176 -37
  6. zou/app/blueprints/comments/resources.py +409 -150
  7. zou/app/blueprints/concepts/resources.py +443 -63
  8. zou/app/blueprints/crud/asset_instance.py +272 -0
  9. zou/app/blueprints/crud/attachment_file.py +263 -0
  10. zou/app/blueprints/crud/base.py +176 -69
  11. zou/app/blueprints/crud/budget.py +278 -0
  12. zou/app/blueprints/crud/budget_entry.py +269 -0
  13. zou/app/blueprints/crud/chat.py +282 -0
  14. zou/app/blueprints/crud/chat_message.py +286 -0
  15. zou/app/blueprints/crud/comments.py +312 -1
  16. zou/app/blueprints/crud/custom_action.py +268 -0
  17. zou/app/blueprints/crud/day_off.py +298 -0
  18. zou/app/blueprints/crud/department.py +268 -0
  19. zou/app/blueprints/crud/entity.py +297 -3
  20. zou/app/blueprints/crud/entity_link.py +303 -0
  21. zou/app/blueprints/crud/entity_type.py +269 -0
  22. zou/app/blueprints/crud/event.py +197 -0
  23. zou/app/blueprints/crud/file_status.py +268 -0
  24. zou/app/blueprints/crud/hardware_item.py +268 -0
  25. zou/app/blueprints/crud/metadata_descriptor.py +312 -0
  26. zou/app/blueprints/crud/milestone.py +302 -1
  27. zou/app/blueprints/crud/news.py +285 -0
  28. zou/app/blueprints/crud/notification.py +287 -0
  29. zou/app/blueprints/crud/organisation.py +269 -0
  30. zou/app/blueprints/crud/output_file.py +34 -10
  31. zou/app/blueprints/crud/output_type.py +30 -10
  32. zou/app/blueprints/crud/person.py +407 -2
  33. zou/app/blueprints/crud/playlist.py +322 -4
  34. zou/app/blueprints/crud/plugin.py +269 -0
  35. zou/app/blueprints/crud/preview_background_file.py +272 -0
  36. zou/app/blueprints/crud/preview_file.py +280 -9
  37. zou/app/blueprints/crud/production_schedule_version.py +569 -0
  38. zou/app/blueprints/crud/project.py +440 -0
  39. zou/app/blueprints/crud/project_status.py +268 -0
  40. zou/app/blueprints/crud/salary_scale.py +185 -5
  41. zou/app/blueprints/crud/schedule_item.py +305 -0
  42. zou/app/blueprints/crud/search_filter.py +302 -0
  43. zou/app/blueprints/crud/search_filter_group.py +270 -0
  44. zou/app/blueprints/crud/software.py +30 -10
  45. zou/app/blueprints/crud/status_automation.py +296 -2
  46. zou/app/blueprints/crud/studio.py +268 -0
  47. zou/app/blueprints/crud/subscription.py +279 -0
  48. zou/app/blueprints/crud/task.py +325 -5
  49. zou/app/blueprints/crud/task_status.py +301 -0
  50. zou/app/blueprints/crud/task_type.py +283 -0
  51. zou/app/blueprints/crud/time_spent.py +327 -0
  52. zou/app/blueprints/crud/working_file.py +273 -10
  53. zou/app/blueprints/departments/resources.py +302 -68
  54. zou/app/blueprints/edits/resources.py +651 -81
  55. zou/app/blueprints/entities/resources.py +104 -39
  56. zou/app/blueprints/events/resources.py +96 -8
  57. zou/app/blueprints/export/csv/assets.py +15 -5
  58. zou/app/blueprints/export/csv/base.py +12 -3
  59. zou/app/blueprints/export/csv/casting.py +32 -5
  60. zou/app/blueprints/export/csv/edits.py +15 -5
  61. zou/app/blueprints/export/csv/persons.py +24 -0
  62. zou/app/blueprints/export/csv/playlists.py +16 -5
  63. zou/app/blueprints/export/csv/projects.py +23 -0
  64. zou/app/blueprints/export/csv/shots.py +15 -5
  65. zou/app/blueprints/export/csv/task_types.py +23 -0
  66. zou/app/blueprints/export/csv/tasks.py +24 -0
  67. zou/app/blueprints/export/csv/time_spents.py +24 -0
  68. zou/app/blueprints/files/resources.py +928 -377
  69. zou/app/blueprints/index/resources.py +49 -42
  70. zou/app/blueprints/news/resources.py +47 -27
  71. zou/app/blueprints/persons/resources.py +644 -271
  72. zou/app/blueprints/playlists/resources.py +154 -72
  73. zou/app/blueprints/previews/resources.py +473 -228
  74. zou/app/blueprints/projects/__init__.py +5 -0
  75. zou/app/blueprints/projects/resources.py +987 -420
  76. zou/app/blueprints/search/resources.py +44 -32
  77. zou/app/blueprints/shots/resources.py +1338 -88
  78. zou/app/blueprints/source/csv/assets.py +44 -6
  79. zou/app/blueprints/source/csv/casting.py +43 -6
  80. zou/app/blueprints/source/csv/edits.py +47 -9
  81. zou/app/blueprints/source/csv/persons.py +43 -4
  82. zou/app/blueprints/source/csv/shots.py +47 -6
  83. zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
  84. zou/app/blueprints/source/kitsu.py +433 -11
  85. zou/app/blueprints/source/otio.py +215 -20
  86. zou/app/blueprints/source/shotgun/assets.py +146 -0
  87. zou/app/blueprints/source/shotgun/base.py +85 -14
  88. zou/app/blueprints/source/shotgun/episode.py +124 -0
  89. zou/app/blueprints/source/shotgun/import_errors.py +105 -14
  90. zou/app/blueprints/source/shotgun/notes.py +132 -0
  91. zou/app/blueprints/source/shotgun/person.py +163 -0
  92. zou/app/blueprints/source/shotgun/project.py +120 -0
  93. zou/app/blueprints/source/shotgun/scene.py +120 -0
  94. zou/app/blueprints/source/shotgun/sequence.py +134 -0
  95. zou/app/blueprints/source/shotgun/shot.py +166 -0
  96. zou/app/blueprints/source/shotgun/status.py +129 -0
  97. zou/app/blueprints/source/shotgun/steps.py +138 -0
  98. zou/app/blueprints/source/shotgun/tasks.py +199 -0
  99. zou/app/blueprints/source/shotgun/team.py +132 -0
  100. zou/app/blueprints/source/shotgun/versions.py +155 -0
  101. zou/app/blueprints/tasks/resources.py +1197 -308
  102. zou/app/blueprints/user/resources.py +1808 -215
  103. zou/app/models/metadata_descriptor.py +1 -0
  104. zou/app/services/persons_service.py +1 -1
  105. zou/app/services/projects_service.py +45 -1
  106. zou/app/services/time_spents_service.py +1 -1
  107. zou/app/swagger.py +100 -27
  108. zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
  109. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/METADATA +18 -18
  110. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/RECORD +114 -113
  111. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
  112. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
  113. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
  114. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
@@ -31,6 +31,84 @@ class TasksResource(BaseModelsResource, ArgsMixin):
31
31
  def check_read_permissions(self, options=None):
32
32
  return True
33
33
 
34
+ @jwt_required()
35
+ def get(self):
36
+ """
37
+ Get tasks
38
+ ---
39
+ tags:
40
+ - Crud
41
+ description: Retrieve all tasks. Supports filtering via query
42
+ parameters and pagination. Includes project permission filtering
43
+ for non-admin users. Vendor users only see assigned tasks.
44
+ parameters:
45
+ - in: query
46
+ name: page
47
+ required: false
48
+ schema:
49
+ type: integer
50
+ example: 1
51
+ description: Page number for pagination
52
+ - in: query
53
+ name: limit
54
+ required: false
55
+ schema:
56
+ type: integer
57
+ example: 50
58
+ description: Number of results per page
59
+ - in: query
60
+ name: relations
61
+ required: false
62
+ schema:
63
+ type: boolean
64
+ default: false
65
+ example: false
66
+ description: Whether to include relations
67
+ - in: query
68
+ name: episode_id
69
+ required: false
70
+ schema:
71
+ type: string
72
+ format: uuid
73
+ example: a24a6ea4-ce75-4665-a070-57453082c25
74
+ description: Filter tasks by episode ID
75
+ responses:
76
+ 200:
77
+ description: Tasks retrieved successfully
78
+ content:
79
+ application/json:
80
+ schema:
81
+ oneOf:
82
+ - type: array
83
+ items:
84
+ type: object
85
+ - type: object
86
+ properties:
87
+ data:
88
+ type: array
89
+ items:
90
+ type: object
91
+ example: []
92
+ total:
93
+ type: integer
94
+ example: 100
95
+ nb_pages:
96
+ type: integer
97
+ example: 2
98
+ limit:
99
+ type: integer
100
+ example: 50
101
+ offset:
102
+ type: integer
103
+ example: 0
104
+ page:
105
+ type: integer
106
+ example: 1
107
+ 400:
108
+ description: Invalid filter format or query error
109
+ """
110
+ return super().get()
111
+
34
112
  def add_project_permission_filter(self, query):
35
113
  if permissions.has_vendor_permissions():
36
114
  query = query.filter(user_service.build_assignee_filter())
@@ -70,11 +148,68 @@ class TasksResource(BaseModelsResource, ArgsMixin):
70
148
 
71
149
  return query
72
150
 
151
+ @jwt_required()
73
152
  def post(self):
74
153
  """
75
- Create a task with data given in the request body. JSON format is
76
- expected. The model performs the validation automatically when
77
- instantiated.
154
+ Create task
155
+ ---
156
+ tags:
157
+ - Crud
158
+ description: Create a task with data provided in the request
159
+ body. JSON format is expected. The task type must match the
160
+ entity type.
161
+ requestBody:
162
+ required: true
163
+ content:
164
+ application/json:
165
+ schema:
166
+ type: object
167
+ required:
168
+ - task_type_id
169
+ - entity_id
170
+ properties:
171
+ task_type_id:
172
+ type: string
173
+ format: uuid
174
+ example: a24a6ea4-ce75-4665-a070-57453082c25
175
+ entity_id:
176
+ type: string
177
+ format: uuid
178
+ example: b24a6ea4-ce75-4665-a070-57453082c25
179
+ assignees:
180
+ type: array
181
+ items:
182
+ type: string
183
+ format: uuid
184
+ example: ["c24a6ea4-ce75-4665-a070-57453082c25"]
185
+ responses:
186
+ 201:
187
+ description: Task created successfully
188
+ content:
189
+ application/json:
190
+ schema:
191
+ type: object
192
+ properties:
193
+ id:
194
+ type: string
195
+ format: uuid
196
+ example: d24a6ea4-ce75-4665-a070-57453082c25
197
+ task_type_id:
198
+ type: string
199
+ format: uuid
200
+ example: a24a6ea4-ce75-4665-a070-57453082c25
201
+ entity_id:
202
+ type: string
203
+ format: uuid
204
+ example: b24a6ea4-ce75-4665-a070-57453082c25
205
+ assignees:
206
+ type: array
207
+ items:
208
+ type: string
209
+ format: uuid
210
+ example: ["c24a6ea4-ce75-4665-a070-57453082c25"]
211
+ 400:
212
+ description: Task type does not match entity type or task already exists
78
213
  """
79
214
  try:
80
215
  data = request.json
@@ -131,6 +266,166 @@ class TaskResource(BaseModelResource, ArgsMixin):
131
266
  user_service.check_project_access(task["project_id"])
132
267
  user_service.check_entity_access(task["entity_id"])
133
268
 
269
+ @jwt_required()
270
+ def get(self, instance_id):
271
+ """
272
+ Get task
273
+ ---
274
+ tags:
275
+ - Crud
276
+ description: Retrieve a task by its ID and return it as a JSON
277
+ object. Supports including relations. Requires project and
278
+ entity access.
279
+ parameters:
280
+ - in: path
281
+ name: instance_id
282
+ required: true
283
+ schema:
284
+ type: string
285
+ format: uuid
286
+ example: a24a6ea4-ce75-4665-a070-57453082c25
287
+ - in: query
288
+ name: relations
289
+ required: false
290
+ schema:
291
+ type: boolean
292
+ default: true
293
+ example: true
294
+ description: Whether to include relations
295
+ responses:
296
+ 200:
297
+ description: Task retrieved successfully
298
+ content:
299
+ application/json:
300
+ schema:
301
+ type: object
302
+ properties:
303
+ id:
304
+ type: string
305
+ format: uuid
306
+ example: a24a6ea4-ce75-4665-a070-57453082c25
307
+ task_type_id:
308
+ type: string
309
+ format: uuid
310
+ example: b24a6ea4-ce75-4665-a070-57453082c25
311
+ entity_id:
312
+ type: string
313
+ format: uuid
314
+ example: c24a6ea4-ce75-4665-a070-57453082c25
315
+ project_id:
316
+ type: string
317
+ format: uuid
318
+ example: d24a6ea4-ce75-4665-a070-57453082c25
319
+ task_status_id:
320
+ type: string
321
+ format: uuid
322
+ example: e24a6ea4-ce75-4665-a070-57453082c25
323
+ assignees:
324
+ type: array
325
+ items:
326
+ type: string
327
+ format: uuid
328
+ example: ["f24a6ea4-ce75-4665-a070-57453082c25"]
329
+ created_at:
330
+ type: string
331
+ format: date-time
332
+ example: "2024-01-15T10:30:00Z"
333
+ updated_at:
334
+ type: string
335
+ format: date-time
336
+ example: "2024-01-15T10:30:00Z"
337
+ 400:
338
+ description: Invalid ID format or query error
339
+ """
340
+ return super().get(instance_id)
341
+
342
+ @jwt_required()
343
+ def put(self, instance_id):
344
+ """
345
+ Update task
346
+ ---
347
+ tags:
348
+ - Crud
349
+ description: Update a task with data provided in the request
350
+ body. JSON format is expected. Requires supervisor access.
351
+ parameters:
352
+ - in: path
353
+ name: instance_id
354
+ required: true
355
+ schema:
356
+ type: string
357
+ format: uuid
358
+ example: a24a6ea4-ce75-4665-a070-57453082c25
359
+ requestBody:
360
+ required: true
361
+ content:
362
+ application/json:
363
+ schema:
364
+ type: object
365
+ properties:
366
+ task_status_id:
367
+ type: string
368
+ format: uuid
369
+ example: b24a6ea4-ce75-4665-a070-57453082c25
370
+ assignees:
371
+ type: array
372
+ items:
373
+ type: string
374
+ format: uuid
375
+ example: ["c24a6ea4-ce75-4665-a070-57453082c25"]
376
+ duration:
377
+ type: number
378
+ example: 8.5
379
+ responses:
380
+ 200:
381
+ description: Task updated successfully
382
+ content:
383
+ application/json:
384
+ schema:
385
+ type: object
386
+ properties:
387
+ id:
388
+ type: string
389
+ format: uuid
390
+ example: a24a6ea4-ce75-4665-a070-57453082c25
391
+ task_type_id:
392
+ type: string
393
+ format: uuid
394
+ example: b24a6ea4-ce75-4665-a070-57453082c25
395
+ entity_id:
396
+ type: string
397
+ format: uuid
398
+ example: c24a6ea4-ce75-4665-a070-57453082c25
399
+ project_id:
400
+ type: string
401
+ format: uuid
402
+ example: d24a6ea4-ce75-4665-a070-57453082c25
403
+ task_status_id:
404
+ type: string
405
+ format: uuid
406
+ example: e24a6ea4-ce75-4665-a070-57453082c25
407
+ assignees:
408
+ type: array
409
+ items:
410
+ type: string
411
+ format: uuid
412
+ example: ["f24a6ea4-ce75-4665-a070-57453082c25"]
413
+ duration:
414
+ type: number
415
+ example: 8.5
416
+ created_at:
417
+ type: string
418
+ format: date-time
419
+ example: "2024-01-15T10:30:00Z"
420
+ updated_at:
421
+ type: string
422
+ format: date-time
423
+ example: "2024-01-15T11:00:00Z"
424
+ 400:
425
+ description: Invalid data format or validation error
426
+ """
427
+ return super().put(instance_id)
428
+
134
429
  def check_update_permissions(self, task, data):
135
430
  user_service.check_supervisor_task_access(task, data)
136
431
 
@@ -144,8 +439,33 @@ class TaskResource(BaseModelResource, ArgsMixin):
144
439
  @jwt_required()
145
440
  def delete(self, instance_id):
146
441
  """
147
- Delete a model corresponding at given ID and return it as a JSON
148
- object.
442
+ Delete task
443
+ ---
444
+ tags:
445
+ - Crud
446
+ description: Delete a task by its ID. Returns empty response on
447
+ success. May require force flag if task has associated data.
448
+ parameters:
449
+ - in: path
450
+ name: instance_id
451
+ required: true
452
+ schema:
453
+ type: string
454
+ format: uuid
455
+ example: a24a6ea4-ce75-4665-a070-57453082c25
456
+ - in: query
457
+ name: force
458
+ required: false
459
+ schema:
460
+ type: boolean
461
+ default: false
462
+ example: false
463
+ description: Force deletion even if task has associated data
464
+ responses:
465
+ 204:
466
+ description: Task deleted successfully
467
+ 400:
468
+ description: Integrity error or cannot delete
149
469
  """
150
470
  force = self.get_force()
151
471
 
@@ -1,3 +1,5 @@
1
+ from flask_jwt_extended import jwt_required
2
+
1
3
  from zou.app.models.task_status import TaskStatus
2
4
  from zou.app.services import tasks_service
3
5
  from zou.app.blueprints.crud.base import BaseModelResource, BaseModelsResource
@@ -10,6 +12,144 @@ class TaskStatusesResource(BaseModelsResource):
10
12
  def check_read_permissions(self, options=None):
11
13
  return True
12
14
 
15
+ @jwt_required()
16
+ def get(self):
17
+ """
18
+ Get task statuses
19
+ ---
20
+ tags:
21
+ - Crud
22
+ description: Retrieve all task statuses. Supports filtering via
23
+ query parameters and pagination.
24
+ parameters:
25
+ - in: query
26
+ name: page
27
+ required: false
28
+ schema:
29
+ type: integer
30
+ example: 1
31
+ description: Page number for pagination
32
+ - in: query
33
+ name: limit
34
+ required: false
35
+ schema:
36
+ type: integer
37
+ example: 50
38
+ description: Number of results per page
39
+ - in: query
40
+ name: relations
41
+ required: false
42
+ schema:
43
+ type: boolean
44
+ default: false
45
+ example: false
46
+ description: Whether to include relations
47
+ responses:
48
+ 200:
49
+ description: Task statuses retrieved successfully
50
+ content:
51
+ application/json:
52
+ schema:
53
+ oneOf:
54
+ - type: array
55
+ items:
56
+ type: object
57
+ - type: object
58
+ properties:
59
+ data:
60
+ type: array
61
+ items:
62
+ type: object
63
+ example: []
64
+ total:
65
+ type: integer
66
+ example: 100
67
+ nb_pages:
68
+ type: integer
69
+ example: 2
70
+ limit:
71
+ type: integer
72
+ example: 50
73
+ offset:
74
+ type: integer
75
+ example: 0
76
+ page:
77
+ type: integer
78
+ example: 1
79
+ 400:
80
+ description: Invalid filter format or query error
81
+ """
82
+ return super().get()
83
+
84
+ @jwt_required()
85
+ def post(self):
86
+ """
87
+ Create task status
88
+ ---
89
+ tags:
90
+ - Crud
91
+ description: Create a new task status with data provided in the
92
+ request body. JSON format is expected. If is_default is true,
93
+ sets all other statuses to non-default.
94
+ requestBody:
95
+ required: true
96
+ content:
97
+ application/json:
98
+ schema:
99
+ type: object
100
+ required:
101
+ - name
102
+ properties:
103
+ name:
104
+ type: string
105
+ example: To Do
106
+ short_name:
107
+ type: string
108
+ example: TODO
109
+ color:
110
+ type: string
111
+ example: "#FF5733"
112
+ is_default:
113
+ type: boolean
114
+ default: false
115
+ example: false
116
+ responses:
117
+ 201:
118
+ description: Task status created successfully
119
+ content:
120
+ application/json:
121
+ schema:
122
+ type: object
123
+ properties:
124
+ id:
125
+ type: string
126
+ format: uuid
127
+ example: a24a6ea4-ce75-4665-a070-57453082c25
128
+ name:
129
+ type: string
130
+ example: To Do
131
+ short_name:
132
+ type: string
133
+ example: TODO
134
+ color:
135
+ type: string
136
+ example: "#FF5733"
137
+ is_default:
138
+ type: boolean
139
+ example: false
140
+ created_at:
141
+ type: string
142
+ format: date-time
143
+ example: "2024-01-15T10:30:00Z"
144
+ updated_at:
145
+ type: string
146
+ format: date-time
147
+ example: "2024-01-15T10:30:00Z"
148
+ 400:
149
+ description: Invalid data format or validation error
150
+ """
151
+ return super().post()
152
+
13
153
  def post_creation(self, instance):
14
154
  tasks_service.clear_task_status_cache(str(instance.id))
15
155
  return instance.serialize()
@@ -29,6 +169,167 @@ class TaskStatusResource(BaseModelResource):
29
169
  def check_read_permissions(self, instance):
30
170
  return True
31
171
 
172
+ @jwt_required()
173
+ def get(self, instance_id):
174
+ """
175
+ Get task status
176
+ ---
177
+ tags:
178
+ - Crud
179
+ description: Retrieve a task status by its ID and return it as a
180
+ JSON object. Supports including relations.
181
+ parameters:
182
+ - in: path
183
+ name: instance_id
184
+ required: true
185
+ schema:
186
+ type: string
187
+ format: uuid
188
+ example: a24a6ea4-ce75-4665-a070-57453082c25
189
+ - in: query
190
+ name: relations
191
+ required: false
192
+ schema:
193
+ type: boolean
194
+ default: true
195
+ example: true
196
+ description: Whether to include relations
197
+ responses:
198
+ 200:
199
+ description: Task status retrieved successfully
200
+ content:
201
+ application/json:
202
+ schema:
203
+ type: object
204
+ properties:
205
+ id:
206
+ type: string
207
+ format: uuid
208
+ example: a24a6ea4-ce75-4665-a070-57453082c25
209
+ name:
210
+ type: string
211
+ example: To Do
212
+ short_name:
213
+ type: string
214
+ example: TODO
215
+ color:
216
+ type: string
217
+ example: "#FF5733"
218
+ is_default:
219
+ type: boolean
220
+ example: false
221
+ created_at:
222
+ type: string
223
+ format: date-time
224
+ example: "2024-01-15T10:30:00Z"
225
+ updated_at:
226
+ type: string
227
+ format: date-time
228
+ example: "2024-01-15T10:30:00Z"
229
+ 400:
230
+ description: Invalid ID format or query error
231
+ """
232
+ return super().get(instance_id)
233
+
234
+ @jwt_required()
235
+ def put(self, instance_id):
236
+ """
237
+ Update task status
238
+ ---
239
+ tags:
240
+ - Crud
241
+ description: Update a task status with data provided in the
242
+ request body. JSON format is expected. If is_default is set
243
+ to true, sets all other statuses to non-default.
244
+ parameters:
245
+ - in: path
246
+ name: instance_id
247
+ required: true
248
+ schema:
249
+ type: string
250
+ format: uuid
251
+ example: a24a6ea4-ce75-4665-a070-57453082c25
252
+ requestBody:
253
+ required: true
254
+ content:
255
+ application/json:
256
+ schema:
257
+ type: object
258
+ properties:
259
+ name:
260
+ type: string
261
+ example: In Progress
262
+ short_name:
263
+ type: string
264
+ example: WIP
265
+ color:
266
+ type: string
267
+ example: "#00FF00"
268
+ is_default:
269
+ type: boolean
270
+ example: true
271
+ responses:
272
+ 200:
273
+ description: Task status updated successfully
274
+ content:
275
+ application/json:
276
+ schema:
277
+ type: object
278
+ properties:
279
+ id:
280
+ type: string
281
+ format: uuid
282
+ example: a24a6ea4-ce75-4665-a070-57453082c25
283
+ name:
284
+ type: string
285
+ example: In Progress
286
+ short_name:
287
+ type: string
288
+ example: WIP
289
+ color:
290
+ type: string
291
+ example: "#00FF00"
292
+ is_default:
293
+ type: boolean
294
+ example: true
295
+ created_at:
296
+ type: string
297
+ format: date-time
298
+ example: "2024-01-15T10:30:00Z"
299
+ updated_at:
300
+ type: string
301
+ format: date-time
302
+ example: "2024-01-15T11:00:00Z"
303
+ 400:
304
+ description: Invalid data format or validation error
305
+ """
306
+ return super().put(instance_id)
307
+
308
+ @jwt_required()
309
+ def delete(self, instance_id):
310
+ """
311
+ Delete task status
312
+ ---
313
+ tags:
314
+ - Crud
315
+ description: Delete a task status by its ID. Returns empty
316
+ response on success.
317
+ parameters:
318
+ - in: path
319
+ name: instance_id
320
+ required: true
321
+ schema:
322
+ type: string
323
+ format: uuid
324
+ example: a24a6ea4-ce75-4665-a070-57453082c25
325
+ responses:
326
+ 204:
327
+ description: Task status deleted successfully
328
+ 400:
329
+ description: Integrity error or cannot delete
330
+ """
331
+ return super().delete(instance_id)
332
+
32
333
  def pre_update(self, instance_dict, data):
33
334
  if data.get("is_default", False):
34
335
  status = TaskStatus.get_by(is_default=True)