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.blueprints.crud.base import BaseModelResource, BaseModelsResource
|
|
2
4
|
|
|
3
5
|
from zou.app.models.entity_type import EntityType
|
|
@@ -11,6 +13,131 @@ class EntityTypesResource(BaseModelsResource):
|
|
|
11
13
|
def __init__(self):
|
|
12
14
|
BaseModelsResource.__init__(self, EntityType)
|
|
13
15
|
|
|
16
|
+
@jwt_required()
|
|
17
|
+
def get(self):
|
|
18
|
+
"""
|
|
19
|
+
Get entity types
|
|
20
|
+
---
|
|
21
|
+
tags:
|
|
22
|
+
- Crud
|
|
23
|
+
description: Retrieve all entity types. Supports filtering via query
|
|
24
|
+
parameters and pagination.
|
|
25
|
+
parameters:
|
|
26
|
+
- in: query
|
|
27
|
+
name: page
|
|
28
|
+
required: false
|
|
29
|
+
schema:
|
|
30
|
+
type: integer
|
|
31
|
+
example: 1
|
|
32
|
+
description: Page number for pagination
|
|
33
|
+
- in: query
|
|
34
|
+
name: limit
|
|
35
|
+
required: false
|
|
36
|
+
schema:
|
|
37
|
+
type: integer
|
|
38
|
+
example: 50
|
|
39
|
+
description: Number of results per page
|
|
40
|
+
- in: query
|
|
41
|
+
name: relations
|
|
42
|
+
required: false
|
|
43
|
+
schema:
|
|
44
|
+
type: boolean
|
|
45
|
+
default: false
|
|
46
|
+
example: false
|
|
47
|
+
description: Whether to include relations
|
|
48
|
+
responses:
|
|
49
|
+
200:
|
|
50
|
+
description: Entity types retrieved successfully
|
|
51
|
+
content:
|
|
52
|
+
application/json:
|
|
53
|
+
schema:
|
|
54
|
+
oneOf:
|
|
55
|
+
- type: array
|
|
56
|
+
items:
|
|
57
|
+
type: object
|
|
58
|
+
- type: object
|
|
59
|
+
properties:
|
|
60
|
+
data:
|
|
61
|
+
type: array
|
|
62
|
+
items:
|
|
63
|
+
type: object
|
|
64
|
+
example: []
|
|
65
|
+
total:
|
|
66
|
+
type: integer
|
|
67
|
+
example: 100
|
|
68
|
+
nb_pages:
|
|
69
|
+
type: integer
|
|
70
|
+
example: 2
|
|
71
|
+
limit:
|
|
72
|
+
type: integer
|
|
73
|
+
example: 50
|
|
74
|
+
offset:
|
|
75
|
+
type: integer
|
|
76
|
+
example: 0
|
|
77
|
+
page:
|
|
78
|
+
type: integer
|
|
79
|
+
example: 1
|
|
80
|
+
400:
|
|
81
|
+
description: Invalid filter format or query error
|
|
82
|
+
"""
|
|
83
|
+
return super().get()
|
|
84
|
+
|
|
85
|
+
@jwt_required()
|
|
86
|
+
def post(self):
|
|
87
|
+
"""
|
|
88
|
+
Create entity type
|
|
89
|
+
---
|
|
90
|
+
tags:
|
|
91
|
+
- Crud
|
|
92
|
+
description: Create a new entity type with data provided in the
|
|
93
|
+
request body. JSON format is expected. Entity type names must
|
|
94
|
+
be unique.
|
|
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: Character
|
|
107
|
+
color:
|
|
108
|
+
type: string
|
|
109
|
+
example: "#FF5733"
|
|
110
|
+
responses:
|
|
111
|
+
201:
|
|
112
|
+
description: Entity type 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: Character
|
|
125
|
+
color:
|
|
126
|
+
type: string
|
|
127
|
+
example: "#FF5733"
|
|
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 entity type already exists
|
|
138
|
+
"""
|
|
139
|
+
return super().post()
|
|
140
|
+
|
|
14
141
|
def all_entries(self, query=None, relations=False):
|
|
15
142
|
if query is None:
|
|
16
143
|
query = self.model.query
|
|
@@ -48,6 +175,148 @@ class EntityTypeResource(BaseModelResource):
|
|
|
48
175
|
def check_read_permissions(self, instance):
|
|
49
176
|
return True
|
|
50
177
|
|
|
178
|
+
@jwt_required()
|
|
179
|
+
def get(self, instance_id):
|
|
180
|
+
"""
|
|
181
|
+
Get entity type
|
|
182
|
+
---
|
|
183
|
+
tags:
|
|
184
|
+
- Crud
|
|
185
|
+
description: Retrieve an entity type by its ID and return it as a
|
|
186
|
+
JSON object. Supports including relations.
|
|
187
|
+
parameters:
|
|
188
|
+
- in: path
|
|
189
|
+
name: instance_id
|
|
190
|
+
required: true
|
|
191
|
+
schema:
|
|
192
|
+
type: string
|
|
193
|
+
format: uuid
|
|
194
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
195
|
+
- in: query
|
|
196
|
+
name: relations
|
|
197
|
+
required: false
|
|
198
|
+
schema:
|
|
199
|
+
type: boolean
|
|
200
|
+
default: true
|
|
201
|
+
example: true
|
|
202
|
+
description: Whether to include relations
|
|
203
|
+
responses:
|
|
204
|
+
200:
|
|
205
|
+
description: Entity type retrieved successfully
|
|
206
|
+
content:
|
|
207
|
+
application/json:
|
|
208
|
+
schema:
|
|
209
|
+
type: object
|
|
210
|
+
properties:
|
|
211
|
+
id:
|
|
212
|
+
type: string
|
|
213
|
+
format: uuid
|
|
214
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
215
|
+
name:
|
|
216
|
+
type: string
|
|
217
|
+
example: Character
|
|
218
|
+
color:
|
|
219
|
+
type: string
|
|
220
|
+
example: "#FF5733"
|
|
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 entity type
|
|
238
|
+
---
|
|
239
|
+
tags:
|
|
240
|
+
- Crud
|
|
241
|
+
description: Update an entity type with data provided in the
|
|
242
|
+
request body. JSON format is expected.
|
|
243
|
+
parameters:
|
|
244
|
+
- in: path
|
|
245
|
+
name: instance_id
|
|
246
|
+
required: true
|
|
247
|
+
schema:
|
|
248
|
+
type: string
|
|
249
|
+
format: uuid
|
|
250
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
251
|
+
requestBody:
|
|
252
|
+
required: true
|
|
253
|
+
content:
|
|
254
|
+
application/json:
|
|
255
|
+
schema:
|
|
256
|
+
type: object
|
|
257
|
+
properties:
|
|
258
|
+
name:
|
|
259
|
+
type: string
|
|
260
|
+
example: Updated Character
|
|
261
|
+
color:
|
|
262
|
+
type: string
|
|
263
|
+
example: "#FF5734"
|
|
264
|
+
responses:
|
|
265
|
+
200:
|
|
266
|
+
description: Entity type updated successfully
|
|
267
|
+
content:
|
|
268
|
+
application/json:
|
|
269
|
+
schema:
|
|
270
|
+
type: object
|
|
271
|
+
properties:
|
|
272
|
+
id:
|
|
273
|
+
type: string
|
|
274
|
+
format: uuid
|
|
275
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
276
|
+
name:
|
|
277
|
+
type: string
|
|
278
|
+
example: Updated Character
|
|
279
|
+
color:
|
|
280
|
+
type: string
|
|
281
|
+
example: "#FF5734"
|
|
282
|
+
created_at:
|
|
283
|
+
type: string
|
|
284
|
+
format: date-time
|
|
285
|
+
example: "2024-01-15T10:30:00Z"
|
|
286
|
+
updated_at:
|
|
287
|
+
type: string
|
|
288
|
+
format: date-time
|
|
289
|
+
example: "2024-01-15T11:00:00Z"
|
|
290
|
+
400:
|
|
291
|
+
description: Invalid data format or validation error
|
|
292
|
+
"""
|
|
293
|
+
return super().put(instance_id)
|
|
294
|
+
|
|
295
|
+
@jwt_required()
|
|
296
|
+
def delete(self, instance_id):
|
|
297
|
+
"""
|
|
298
|
+
Delete entity type
|
|
299
|
+
---
|
|
300
|
+
tags:
|
|
301
|
+
- Crud
|
|
302
|
+
description: Delete an entity type by its ID. Returns empty
|
|
303
|
+
response on success.
|
|
304
|
+
parameters:
|
|
305
|
+
- in: path
|
|
306
|
+
name: instance_id
|
|
307
|
+
required: true
|
|
308
|
+
schema:
|
|
309
|
+
type: string
|
|
310
|
+
format: uuid
|
|
311
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
312
|
+
responses:
|
|
313
|
+
204:
|
|
314
|
+
description: Entity type deleted successfully
|
|
315
|
+
400:
|
|
316
|
+
description: Integrity error or cannot delete
|
|
317
|
+
"""
|
|
318
|
+
return super().delete(instance_id)
|
|
319
|
+
|
|
51
320
|
def emit_update_event(self, instance_dict):
|
|
52
321
|
events.emit(
|
|
53
322
|
"asset-type:update", {"asset_type_id": instance_dict["id"]}
|
zou/app/blueprints/crud/event.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from flask_jwt_extended import jwt_required
|
|
2
|
+
|
|
1
3
|
from zou.app.models.event import ApiEvent
|
|
2
4
|
|
|
3
5
|
from zou.app.blueprints.crud.base import BaseModelResource, BaseModelsResource
|
|
@@ -7,6 +9,68 @@ class EventsResource(BaseModelsResource):
|
|
|
7
9
|
def __init__(self):
|
|
8
10
|
BaseModelsResource.__init__(self, ApiEvent)
|
|
9
11
|
|
|
12
|
+
@jwt_required()
|
|
13
|
+
def get(self):
|
|
14
|
+
"""
|
|
15
|
+
Get events
|
|
16
|
+
---
|
|
17
|
+
tags:
|
|
18
|
+
- Crud
|
|
19
|
+
description: Retrieve all events. Supports filtering via query
|
|
20
|
+
parameters and pagination. Limited to 1000 results.
|
|
21
|
+
parameters:
|
|
22
|
+
- in: query
|
|
23
|
+
name: page
|
|
24
|
+
required: false
|
|
25
|
+
schema:
|
|
26
|
+
type: integer
|
|
27
|
+
example: 1
|
|
28
|
+
description: Page number for pagination
|
|
29
|
+
- in: query
|
|
30
|
+
name: limit
|
|
31
|
+
required: false
|
|
32
|
+
schema:
|
|
33
|
+
type: integer
|
|
34
|
+
example: 50
|
|
35
|
+
description: Number of results per page
|
|
36
|
+
- in: query
|
|
37
|
+
name: relations
|
|
38
|
+
required: false
|
|
39
|
+
schema:
|
|
40
|
+
type: boolean
|
|
41
|
+
default: false
|
|
42
|
+
example: false
|
|
43
|
+
description: Whether to include relations
|
|
44
|
+
responses:
|
|
45
|
+
200:
|
|
46
|
+
description: Events retrieved successfully
|
|
47
|
+
content:
|
|
48
|
+
application/json:
|
|
49
|
+
schema:
|
|
50
|
+
type: array
|
|
51
|
+
items:
|
|
52
|
+
type: object
|
|
53
|
+
properties:
|
|
54
|
+
id:
|
|
55
|
+
type: string
|
|
56
|
+
format: uuid
|
|
57
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
58
|
+
name:
|
|
59
|
+
type: string
|
|
60
|
+
example: Event Name
|
|
61
|
+
created_at:
|
|
62
|
+
type: string
|
|
63
|
+
format: date-time
|
|
64
|
+
example: "2024-01-15T10:30:00Z"
|
|
65
|
+
updated_at:
|
|
66
|
+
type: string
|
|
67
|
+
format: date-time
|
|
68
|
+
example: "2024-01-15T10:30:00Z"
|
|
69
|
+
400:
|
|
70
|
+
description: Invalid filter format or query error
|
|
71
|
+
"""
|
|
72
|
+
return super().get()
|
|
73
|
+
|
|
10
74
|
def all_entries(self, query=None, relations=False):
|
|
11
75
|
if query is None:
|
|
12
76
|
query = self.model.query
|
|
@@ -19,3 +83,136 @@ class EventsResource(BaseModelsResource):
|
|
|
19
83
|
class EventResource(BaseModelResource):
|
|
20
84
|
def __init__(self):
|
|
21
85
|
BaseModelResource.__init__(self, ApiEvent)
|
|
86
|
+
|
|
87
|
+
@jwt_required()
|
|
88
|
+
def get(self, instance_id):
|
|
89
|
+
"""
|
|
90
|
+
Get event
|
|
91
|
+
---
|
|
92
|
+
tags:
|
|
93
|
+
- Crud
|
|
94
|
+
description: Retrieve an event by its ID and return it as a JSON
|
|
95
|
+
object. Supports including relations.
|
|
96
|
+
parameters:
|
|
97
|
+
- in: path
|
|
98
|
+
name: instance_id
|
|
99
|
+
required: true
|
|
100
|
+
schema:
|
|
101
|
+
type: string
|
|
102
|
+
format: uuid
|
|
103
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
104
|
+
- in: query
|
|
105
|
+
name: relations
|
|
106
|
+
required: false
|
|
107
|
+
schema:
|
|
108
|
+
type: boolean
|
|
109
|
+
default: true
|
|
110
|
+
example: true
|
|
111
|
+
description: Whether to include relations
|
|
112
|
+
responses:
|
|
113
|
+
200:
|
|
114
|
+
description: Event retrieved successfully
|
|
115
|
+
content:
|
|
116
|
+
application/json:
|
|
117
|
+
schema:
|
|
118
|
+
type: object
|
|
119
|
+
properties:
|
|
120
|
+
id:
|
|
121
|
+
type: string
|
|
122
|
+
format: uuid
|
|
123
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
124
|
+
name:
|
|
125
|
+
type: string
|
|
126
|
+
example: Event Name
|
|
127
|
+
created_at:
|
|
128
|
+
type: string
|
|
129
|
+
format: date-time
|
|
130
|
+
example: "2024-01-15T10:30:00Z"
|
|
131
|
+
updated_at:
|
|
132
|
+
type: string
|
|
133
|
+
format: date-time
|
|
134
|
+
example: "2024-01-15T10:30:00Z"
|
|
135
|
+
400:
|
|
136
|
+
description: Invalid ID format or query error
|
|
137
|
+
"""
|
|
138
|
+
return super().get(instance_id)
|
|
139
|
+
|
|
140
|
+
@jwt_required()
|
|
141
|
+
def put(self, instance_id):
|
|
142
|
+
"""
|
|
143
|
+
Update event
|
|
144
|
+
---
|
|
145
|
+
tags:
|
|
146
|
+
- Crud
|
|
147
|
+
description: Update an event with data provided in the request
|
|
148
|
+
body. JSON format is expected.
|
|
149
|
+
parameters:
|
|
150
|
+
- in: path
|
|
151
|
+
name: instance_id
|
|
152
|
+
required: true
|
|
153
|
+
schema:
|
|
154
|
+
type: string
|
|
155
|
+
format: uuid
|
|
156
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
157
|
+
requestBody:
|
|
158
|
+
required: true
|
|
159
|
+
content:
|
|
160
|
+
application/json:
|
|
161
|
+
schema:
|
|
162
|
+
type: object
|
|
163
|
+
properties:
|
|
164
|
+
name:
|
|
165
|
+
type: string
|
|
166
|
+
example: Updated Event Name
|
|
167
|
+
responses:
|
|
168
|
+
200:
|
|
169
|
+
description: Event updated successfully
|
|
170
|
+
content:
|
|
171
|
+
application/json:
|
|
172
|
+
schema:
|
|
173
|
+
type: object
|
|
174
|
+
properties:
|
|
175
|
+
id:
|
|
176
|
+
type: string
|
|
177
|
+
format: uuid
|
|
178
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
179
|
+
name:
|
|
180
|
+
type: string
|
|
181
|
+
example: Updated Event Name
|
|
182
|
+
created_at:
|
|
183
|
+
type: string
|
|
184
|
+
format: date-time
|
|
185
|
+
example: "2024-01-15T10:30:00Z"
|
|
186
|
+
updated_at:
|
|
187
|
+
type: string
|
|
188
|
+
format: date-time
|
|
189
|
+
example: "2024-01-15T11:00:00Z"
|
|
190
|
+
400:
|
|
191
|
+
description: Invalid data format or validation error
|
|
192
|
+
"""
|
|
193
|
+
return super().put(instance_id)
|
|
194
|
+
|
|
195
|
+
@jwt_required()
|
|
196
|
+
def delete(self, instance_id):
|
|
197
|
+
"""
|
|
198
|
+
Delete event
|
|
199
|
+
---
|
|
200
|
+
tags:
|
|
201
|
+
- Crud
|
|
202
|
+
description: Delete an event by its ID. Returns empty response
|
|
203
|
+
on success.
|
|
204
|
+
parameters:
|
|
205
|
+
- in: path
|
|
206
|
+
name: instance_id
|
|
207
|
+
required: true
|
|
208
|
+
schema:
|
|
209
|
+
type: string
|
|
210
|
+
format: uuid
|
|
211
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
212
|
+
responses:
|
|
213
|
+
204:
|
|
214
|
+
description: Event deleted successfully
|
|
215
|
+
400:
|
|
216
|
+
description: Integrity error or cannot delete
|
|
217
|
+
"""
|
|
218
|
+
return super().delete(instance_id)
|