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