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