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.
Files changed (103) hide show
  1. zou/__init__.py +1 -1
  2. zou/app/blueprints/comments/resources.py +32 -35
  3. zou/app/blueprints/concepts/resources.py +23 -8
  4. zou/app/blueprints/crud/asset_instance.py +272 -0
  5. zou/app/blueprints/crud/attachment_file.py +263 -0
  6. zou/app/blueprints/crud/base.py +176 -69
  7. zou/app/blueprints/crud/budget.py +278 -0
  8. zou/app/blueprints/crud/budget_entry.py +269 -0
  9. zou/app/blueprints/crud/chat.py +282 -0
  10. zou/app/blueprints/crud/chat_message.py +286 -0
  11. zou/app/blueprints/crud/comments.py +312 -1
  12. zou/app/blueprints/crud/custom_action.py +268 -0
  13. zou/app/blueprints/crud/day_off.py +298 -0
  14. zou/app/blueprints/crud/department.py +268 -0
  15. zou/app/blueprints/crud/entity.py +297 -3
  16. zou/app/blueprints/crud/entity_link.py +303 -0
  17. zou/app/blueprints/crud/entity_type.py +269 -0
  18. zou/app/blueprints/crud/event.py +197 -0
  19. zou/app/blueprints/crud/file_status.py +268 -0
  20. zou/app/blueprints/crud/hardware_item.py +268 -0
  21. zou/app/blueprints/crud/metadata_descriptor.py +312 -0
  22. zou/app/blueprints/crud/milestone.py +302 -1
  23. zou/app/blueprints/crud/news.py +285 -0
  24. zou/app/blueprints/crud/notification.py +287 -0
  25. zou/app/blueprints/crud/organisation.py +269 -0
  26. zou/app/blueprints/crud/output_file.py +34 -10
  27. zou/app/blueprints/crud/output_type.py +30 -10
  28. zou/app/blueprints/crud/person.py +407 -2
  29. zou/app/blueprints/crud/playlist.py +322 -4
  30. zou/app/blueprints/crud/plugin.py +269 -0
  31. zou/app/blueprints/crud/preview_background_file.py +272 -0
  32. zou/app/blueprints/crud/preview_file.py +280 -9
  33. zou/app/blueprints/crud/production_schedule_version.py +569 -0
  34. zou/app/blueprints/crud/project.py +440 -0
  35. zou/app/blueprints/crud/project_status.py +268 -0
  36. zou/app/blueprints/crud/salary_scale.py +185 -5
  37. zou/app/blueprints/crud/schedule_item.py +305 -0
  38. zou/app/blueprints/crud/search_filter.py +302 -0
  39. zou/app/blueprints/crud/search_filter_group.py +270 -0
  40. zou/app/blueprints/crud/software.py +30 -10
  41. zou/app/blueprints/crud/status_automation.py +296 -2
  42. zou/app/blueprints/crud/studio.py +268 -0
  43. zou/app/blueprints/crud/subscription.py +279 -0
  44. zou/app/blueprints/crud/task.py +325 -5
  45. zou/app/blueprints/crud/task_status.py +301 -0
  46. zou/app/blueprints/crud/task_type.py +283 -0
  47. zou/app/blueprints/crud/time_spent.py +327 -0
  48. zou/app/blueprints/crud/working_file.py +273 -10
  49. zou/app/blueprints/export/csv/assets.py +15 -5
  50. zou/app/blueprints/export/csv/base.py +12 -3
  51. zou/app/blueprints/export/csv/casting.py +32 -5
  52. zou/app/blueprints/export/csv/edits.py +15 -5
  53. zou/app/blueprints/export/csv/persons.py +24 -0
  54. zou/app/blueprints/export/csv/playlists.py +16 -5
  55. zou/app/blueprints/export/csv/projects.py +23 -0
  56. zou/app/blueprints/export/csv/shots.py +15 -5
  57. zou/app/blueprints/export/csv/task_types.py +23 -0
  58. zou/app/blueprints/export/csv/tasks.py +24 -0
  59. zou/app/blueprints/export/csv/time_spents.py +24 -0
  60. zou/app/blueprints/files/resources.py +928 -377
  61. zou/app/blueprints/news/resources.py +7 -5
  62. zou/app/blueprints/persons/resources.py +644 -271
  63. zou/app/blueprints/playlists/resources.py +154 -72
  64. zou/app/blueprints/previews/resources.py +473 -228
  65. zou/app/blueprints/projects/__init__.py +5 -0
  66. zou/app/blueprints/projects/resources.py +987 -420
  67. zou/app/blueprints/search/resources.py +44 -32
  68. zou/app/blueprints/shots/resources.py +1338 -88
  69. zou/app/blueprints/source/csv/assets.py +44 -6
  70. zou/app/blueprints/source/csv/casting.py +43 -6
  71. zou/app/blueprints/source/csv/edits.py +47 -9
  72. zou/app/blueprints/source/csv/persons.py +43 -4
  73. zou/app/blueprints/source/csv/shots.py +47 -6
  74. zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
  75. zou/app/blueprints/source/kitsu.py +433 -11
  76. zou/app/blueprints/source/otio.py +215 -20
  77. zou/app/blueprints/source/shotgun/assets.py +146 -0
  78. zou/app/blueprints/source/shotgun/base.py +85 -14
  79. zou/app/blueprints/source/shotgun/episode.py +124 -0
  80. zou/app/blueprints/source/shotgun/import_errors.py +105 -14
  81. zou/app/blueprints/source/shotgun/notes.py +132 -0
  82. zou/app/blueprints/source/shotgun/person.py +163 -0
  83. zou/app/blueprints/source/shotgun/project.py +120 -0
  84. zou/app/blueprints/source/shotgun/scene.py +120 -0
  85. zou/app/blueprints/source/shotgun/sequence.py +134 -0
  86. zou/app/blueprints/source/shotgun/shot.py +166 -0
  87. zou/app/blueprints/source/shotgun/status.py +129 -0
  88. zou/app/blueprints/source/shotgun/steps.py +138 -0
  89. zou/app/blueprints/source/shotgun/tasks.py +199 -0
  90. zou/app/blueprints/source/shotgun/team.py +132 -0
  91. zou/app/blueprints/source/shotgun/versions.py +155 -0
  92. zou/app/blueprints/tasks/resources.py +1197 -308
  93. zou/app/models/metadata_descriptor.py +1 -0
  94. zou/app/services/persons_service.py +1 -1
  95. zou/app/services/projects_service.py +45 -1
  96. zou/app/services/time_spents_service.py +1 -1
  97. zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
  98. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/METADATA +18 -18
  99. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/RECORD +103 -102
  100. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/WHEEL +0 -0
  101. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/entry_points.txt +0 -0
  102. {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/licenses/LICENSE +0 -0
  103. {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.models.news import News
2
4
 
3
5
  from zou.app.blueprints.crud.base import BaseModelResource, BaseModelsResource
@@ -7,7 +9,290 @@ class NewssResource(BaseModelsResource):
7
9
  def __init__(self):
8
10
  BaseModelsResource.__init__(self, News)
9
11
 
12
+ @jwt_required()
13
+ def get(self):
14
+ """
15
+ Get news
16
+ ---
17
+ tags:
18
+ - Crud
19
+ description: Retrieve all news entries. 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: News entries 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 news
85
+ ---
86
+ tags:
87
+ - Crud
88
+ description: Create a new news entry 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
+ - title
98
+ - project_id
99
+ properties:
100
+ title:
101
+ type: string
102
+ example: Project Update
103
+ project_id:
104
+ type: string
105
+ format: uuid
106
+ example: a24a6ea4-ce75-4665-a070-57453082c25
107
+ content:
108
+ type: string
109
+ example: News content text
110
+ responses:
111
+ 201:
112
+ description: News entry 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
+ title:
123
+ type: string
124
+ example: Project Update
125
+ project_id:
126
+ type: string
127
+ format: uuid
128
+ example: b24a6ea4-ce75-4665-a070-57453082c25
129
+ content:
130
+ type: string
131
+ example: News content text
132
+ created_at:
133
+ type: string
134
+ format: date-time
135
+ example: "2024-01-15T10:30:00Z"
136
+ updated_at:
137
+ type: string
138
+ format: date-time
139
+ example: "2024-01-15T10:30:00Z"
140
+ 400:
141
+ description: Invalid data format or validation error
142
+ """
143
+ return super().post()
144
+
10
145
 
11
146
  class NewsResource(BaseModelResource):
12
147
  def __init__(self):
13
148
  BaseModelResource.__init__(self, News)
149
+
150
+ @jwt_required()
151
+ def get(self, instance_id):
152
+ """
153
+ Get news
154
+ ---
155
+ tags:
156
+ - Crud
157
+ description: Retrieve a news entry by its ID and return it as a
158
+ JSON object. Supports including relations.
159
+ parameters:
160
+ - in: path
161
+ name: instance_id
162
+ required: true
163
+ schema:
164
+ type: string
165
+ format: uuid
166
+ example: a24a6ea4-ce75-4665-a070-57453082c25
167
+ - in: query
168
+ name: relations
169
+ required: false
170
+ schema:
171
+ type: boolean
172
+ default: true
173
+ example: true
174
+ description: Whether to include relations
175
+ responses:
176
+ 200:
177
+ description: News entry retrieved successfully
178
+ content:
179
+ application/json:
180
+ schema:
181
+ type: object
182
+ properties:
183
+ id:
184
+ type: string
185
+ format: uuid
186
+ example: a24a6ea4-ce75-4665-a070-57453082c25
187
+ title:
188
+ type: string
189
+ example: Project Update
190
+ project_id:
191
+ type: string
192
+ format: uuid
193
+ example: b24a6ea4-ce75-4665-a070-57453082c25
194
+ content:
195
+ type: string
196
+ example: News content text
197
+ created_at:
198
+ type: string
199
+ format: date-time
200
+ example: "2024-01-15T10:30:00Z"
201
+ updated_at:
202
+ type: string
203
+ format: date-time
204
+ example: "2024-01-15T10:30:00Z"
205
+ 400:
206
+ description: Invalid ID format or query error
207
+ """
208
+ return super().get(instance_id)
209
+
210
+ @jwt_required()
211
+ def put(self, instance_id):
212
+ """
213
+ Update news
214
+ ---
215
+ tags:
216
+ - Crud
217
+ description: Update a news entry with data provided in the
218
+ request body. JSON format is expected.
219
+ parameters:
220
+ - in: path
221
+ name: instance_id
222
+ required: true
223
+ schema:
224
+ type: string
225
+ format: uuid
226
+ example: a24a6ea4-ce75-4665-a070-57453082c25
227
+ requestBody:
228
+ required: true
229
+ content:
230
+ application/json:
231
+ schema:
232
+ type: object
233
+ properties:
234
+ title:
235
+ type: string
236
+ example: Updated Project Update
237
+ content:
238
+ type: string
239
+ example: Updated news content text
240
+ responses:
241
+ 200:
242
+ description: News entry updated successfully
243
+ content:
244
+ application/json:
245
+ schema:
246
+ type: object
247
+ properties:
248
+ id:
249
+ type: string
250
+ format: uuid
251
+ example: a24a6ea4-ce75-4665-a070-57453082c25
252
+ title:
253
+ type: string
254
+ example: Updated Project Update
255
+ project_id:
256
+ type: string
257
+ format: uuid
258
+ example: b24a6ea4-ce75-4665-a070-57453082c25
259
+ content:
260
+ type: string
261
+ example: Updated news content text
262
+ created_at:
263
+ type: string
264
+ format: date-time
265
+ example: "2024-01-15T10:30:00Z"
266
+ updated_at:
267
+ type: string
268
+ format: date-time
269
+ example: "2024-01-15T11:00:00Z"
270
+ 400:
271
+ description: Invalid data format or validation error
272
+ """
273
+ return super().put(instance_id)
274
+
275
+ @jwt_required()
276
+ def delete(self, instance_id):
277
+ """
278
+ Delete news
279
+ ---
280
+ tags:
281
+ - Crud
282
+ description: Delete a news entry by its ID. Returns empty
283
+ response on success.
284
+ parameters:
285
+ - in: path
286
+ name: instance_id
287
+ required: true
288
+ schema:
289
+ type: string
290
+ format: uuid
291
+ example: a24a6ea4-ce75-4665-a070-57453082c25
292
+ responses:
293
+ 204:
294
+ description: News entry deleted successfully
295
+ 400:
296
+ description: Integrity error or cannot delete
297
+ """
298
+ return super().delete(instance_id)
@@ -1,3 +1,5 @@
1
+ from flask_jwt_extended import jwt_required
2
+
1
3
  from zou.app.models.notification import Notification
2
4
 
3
5
  from zou.app.blueprints.crud.base import BaseModelResource, BaseModelsResource
@@ -7,7 +9,292 @@ class NotificationsResource(BaseModelsResource):
7
9
  def __init__(self):
8
10
  BaseModelsResource.__init__(self, Notification)
9
11
 
12
+ @jwt_required()
13
+ def get(self):
14
+ """
15
+ Get notifications
16
+ ---
17
+ tags:
18
+ - Crud
19
+ description: Retrieve all notifications. 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: Notifications 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 notification
85
+ ---
86
+ tags:
87
+ - Crud
88
+ description: Create a new notification 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
+ - comment_id
99
+ properties:
100
+ person_id:
101
+ type: string
102
+ format: uuid
103
+ example: a24a6ea4-ce75-4665-a070-57453082c25
104
+ comment_id:
105
+ type: string
106
+ format: uuid
107
+ example: b24a6ea4-ce75-4665-a070-57453082c25
108
+ read:
109
+ type: boolean
110
+ default: false
111
+ example: false
112
+ responses:
113
+ 201:
114
+ description: Notification created 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
+ person_id:
125
+ type: string
126
+ format: uuid
127
+ example: b24a6ea4-ce75-4665-a070-57453082c25
128
+ comment_id:
129
+ type: string
130
+ format: uuid
131
+ example: c24a6ea4-ce75-4665-a070-57453082c25
132
+ read:
133
+ type: boolean
134
+ example: false
135
+ created_at:
136
+ type: string
137
+ format: date-time
138
+ example: "2024-01-15T10:30:00Z"
139
+ updated_at:
140
+ type: string
141
+ format: date-time
142
+ example: "2024-01-15T10:30:00Z"
143
+ 400:
144
+ description: Invalid data format or validation error
145
+ """
146
+ return super().post()
147
+
10
148
 
11
149
  class NotificationResource(BaseModelResource):
12
150
  def __init__(self):
13
151
  BaseModelResource.__init__(self, Notification)
152
+
153
+ @jwt_required()
154
+ def get(self, instance_id):
155
+ """
156
+ Get notification
157
+ ---
158
+ tags:
159
+ - Crud
160
+ description: Retrieve a notification by its ID and return it as
161
+ a 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: Notification 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
+ person_id:
191
+ type: string
192
+ format: uuid
193
+ example: b24a6ea4-ce75-4665-a070-57453082c25
194
+ comment_id:
195
+ type: string
196
+ format: uuid
197
+ example: c24a6ea4-ce75-4665-a070-57453082c25
198
+ read:
199
+ type: boolean
200
+ example: false
201
+ created_at:
202
+ type: string
203
+ format: date-time
204
+ example: "2024-01-15T10:30:00Z"
205
+ updated_at:
206
+ type: string
207
+ format: date-time
208
+ example: "2024-01-15T10:30:00Z"
209
+ 400:
210
+ description: Invalid ID format or query error
211
+ """
212
+ return super().get(instance_id)
213
+
214
+ @jwt_required()
215
+ def put(self, instance_id):
216
+ """
217
+ Update notification
218
+ ---
219
+ tags:
220
+ - Crud
221
+ description: Update a notification with data provided in the
222
+ request body. JSON format is expected.
223
+ parameters:
224
+ - in: path
225
+ name: instance_id
226
+ required: true
227
+ schema:
228
+ type: string
229
+ format: uuid
230
+ example: a24a6ea4-ce75-4665-a070-57453082c25
231
+ requestBody:
232
+ required: true
233
+ content:
234
+ application/json:
235
+ schema:
236
+ type: object
237
+ properties:
238
+ read:
239
+ type: boolean
240
+ example: true
241
+ responses:
242
+ 200:
243
+ description: Notification updated successfully
244
+ content:
245
+ application/json:
246
+ schema:
247
+ type: object
248
+ properties:
249
+ id:
250
+ type: string
251
+ format: uuid
252
+ example: a24a6ea4-ce75-4665-a070-57453082c25
253
+ person_id:
254
+ type: string
255
+ format: uuid
256
+ example: b24a6ea4-ce75-4665-a070-57453082c25
257
+ comment_id:
258
+ type: string
259
+ format: uuid
260
+ example: c24a6ea4-ce75-4665-a070-57453082c25
261
+ read:
262
+ type: boolean
263
+ example: true
264
+ created_at:
265
+ type: string
266
+ format: date-time
267
+ example: "2024-01-15T10:30:00Z"
268
+ updated_at:
269
+ type: string
270
+ format: date-time
271
+ example: "2024-01-15T11:00:00Z"
272
+ 400:
273
+ description: Invalid data format or validation error
274
+ """
275
+ return super().put(instance_id)
276
+
277
+ @jwt_required()
278
+ def delete(self, instance_id):
279
+ """
280
+ Delete notification
281
+ ---
282
+ tags:
283
+ - Crud
284
+ description: Delete a notification by its ID. Returns empty
285
+ response on success.
286
+ parameters:
287
+ - in: path
288
+ name: instance_id
289
+ required: true
290
+ schema:
291
+ type: string
292
+ format: uuid
293
+ example: a24a6ea4-ce75-4665-a070-57453082c25
294
+ responses:
295
+ 204:
296
+ description: Notification deleted successfully
297
+ 400:
298
+ description: Integrity error or cannot delete
299
+ """
300
+ return super().delete(instance_id)