zou 0.20.81__py3-none-any.whl → 0.20.83__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.
@@ -15,21 +15,23 @@ class EntityNewsResource(Resource):
15
15
  @jwt_required()
16
16
  def get(self, entity_id):
17
17
  """
18
- Retrieve all news linked to a given entity.
18
+ Get entity news
19
19
  ---
20
+ description: Retrieve all news entries that are linked to a specific
21
+ entity.
20
22
  tags:
21
23
  - Entities
22
24
  parameters:
23
25
  - in: path
24
26
  name: entity_id
25
27
  required: true
26
- schema:
27
- type: string
28
- format: uuid
28
+ type: string
29
+ format: uuid
29
30
  example: a24a6ea4-ce75-4665-a070-57453082c25
31
+ description: Unique identifier of the entity
30
32
  responses:
31
- '200':
32
- description: All news linked to given entity
33
+ 200:
34
+ description: List of entity news successfully retrieved
33
35
  content:
34
36
  application/json:
35
37
  schema:
@@ -40,21 +42,42 @@ class EntityNewsResource(Resource):
40
42
  id:
41
43
  type: string
42
44
  format: uuid
43
- title:
44
- type: string
45
- content:
45
+ description: News unique identifier
46
+ example: a24a6ea4-ce75-4665-a070-57453082c25
47
+ change:
48
+ type: boolean
49
+ description: Whether this news represents a change
50
+ example: true
51
+ author_id:
46
52
  type: string
47
- created_at:
53
+ format: uuid
54
+ description: Author person identifier
55
+ example: b35b7fb5-df86-5776-b181-68564193d36
56
+ comment_id:
48
57
  type: string
49
- format: date-time
50
- author_id:
58
+ format: uuid
59
+ description: Comment identifier
60
+ example: c46c8gc6-eg97-6887-c292-79675204e47
61
+ task_id:
51
62
  type: string
52
63
  format: uuid
53
- entity_id:
64
+ description: Task identifier
65
+ example: d57d9hd7-fh08-7998-d403-80786315f58
66
+ preview_file_id:
54
67
  type: string
55
68
  format: uuid
56
- '404':
57
- description: Entity not found
69
+ description: Preview file identifier
70
+ example: e68e0ie8-gi19-8009-e514-91897426g69
71
+ created_at:
72
+ type: string
73
+ format: date-time
74
+ description: Creation timestamp
75
+ example: "2023-01-01T12:00:00Z"
76
+ updated_at:
77
+ type: string
78
+ format: date-time
79
+ description: Last update timestamp
80
+ example: "2023-01-01T12:30:00Z"
58
81
  """
59
82
  entity = entities_service.get_entity(entity_id)
60
83
  user_service.check_project_access(entity["project_id"])
@@ -65,21 +88,24 @@ class EntityPreviewFilesResource(Resource):
65
88
  @jwt_required()
66
89
  def get(self, entity_id):
67
90
  """
68
- Retrieve all preview files linked to a given entity.
91
+ Get entity preview files
69
92
  ---
93
+ description: Retrieve all preview files that are linked to a specific
94
+ entity. This includes images, videos, and other preview media
95
+ associated with the entity.
70
96
  tags:
71
97
  - Entities
72
98
  parameters:
73
99
  - in: path
74
100
  name: entity_id
75
101
  required: true
76
- schema:
77
- type: string
78
- format: uuid
102
+ type: string
103
+ format: uuid
79
104
  example: a24a6ea4-ce75-4665-a070-57453082c25
105
+ description: Unique identifier of the entity
80
106
  responses:
81
- '200':
82
- description: All preview files linked to given entity
107
+ 200:
108
+ description: List of entity preview files successfully retrieved
83
109
  content:
84
110
  application/json:
85
111
  schema:
@@ -90,23 +116,35 @@ class EntityPreviewFilesResource(Resource):
90
116
  id:
91
117
  type: string
92
118
  format: uuid
119
+ description: Preview file unique identifier
120
+ example: a24a6ea4-ce75-4665-a070-57453082c25
93
121
  name:
94
122
  type: string
123
+ description: Preview file name
124
+ example: "preview_001.jpg"
95
125
  path:
96
126
  type: string
127
+ description: File path
128
+ example: "/previews/entity/preview_001.jpg"
97
129
  revision:
98
130
  type: integer
131
+ description: File revision number
132
+ example: 1
99
133
  created_at:
100
134
  type: string
101
135
  format: date-time
136
+ description: Creation timestamp
137
+ example: "2023-01-01T12:00:00Z"
102
138
  entity_id:
103
139
  type: string
104
140
  format: uuid
141
+ description: Entity identifier
142
+ example: b35b7fb5-df86-5776-b181-68564193d36
105
143
  task_id:
106
144
  type: string
107
145
  format: uuid
108
- '404':
109
- description: Entity not found
146
+ description: Task identifier
147
+ example: c46c8gc6-eg97-6887-c292-79675204e47
110
148
  """
111
149
  entity = entities_service.get_entity(entity_id)
112
150
  user_service.check_project_access(entity["project_id"])
@@ -117,21 +155,23 @@ class EntityTimeSpentsResource(Resource):
117
155
  @jwt_required()
118
156
  def get(self, entity_id):
119
157
  """
120
- Retrieve all time spents linked to a given entity.
158
+ Get entity time spent
121
159
  ---
160
+ description: Retrieve all time spent entries that are linked to a
161
+ specific entity.
122
162
  tags:
123
163
  - Entities
124
164
  parameters:
125
165
  - in: path
126
166
  name: entity_id
127
167
  required: true
128
- schema:
129
- type: string
130
- format: uuid
168
+ type: string
169
+ format: uuid
131
170
  example: a24a6ea4-ce75-4665-a070-57453082c25
171
+ description: Unique identifier of the entity
132
172
  responses:
133
- '200':
134
- description: All time spents linked to given entity
173
+ 200:
174
+ description: List of entity time spent entries successfully retrieved
135
175
  content:
136
176
  application/json:
137
177
  schema:
@@ -142,25 +182,33 @@ class EntityTimeSpentsResource(Resource):
142
182
  id:
143
183
  type: string
144
184
  format: uuid
185
+ description: Time spent unique identifier
186
+ example: a24a6ea4-ce75-4665-a070-57453082c25
145
187
  duration:
146
188
  type: number
147
189
  format: float
190
+ description: Time duration in hours
148
191
  example: 2.5
149
192
  date:
150
193
  type: string
151
194
  format: date
195
+ description: Date when time was spent
152
196
  example: "2023-12-07"
153
197
  created_at:
154
198
  type: string
155
199
  format: date-time
200
+ description: Creation timestamp
201
+ example: "2023-01-01T12:00:00Z"
156
202
  person_id:
157
203
  type: string
158
204
  format: uuid
205
+ description: Person identifier who spent the time
206
+ example: b35b7fb5-df86-5776-b181-68564193d36
159
207
  entity_id:
160
208
  type: string
161
209
  format: uuid
162
- '404':
163
- description: Entity not found
210
+ description: Entity identifier
211
+ example: c46c8gc6-eg97-6887-c292-79675204e47
164
212
  """
165
213
  entity = entities_service.get_entity(entity_id)
166
214
  user_service.check_project_access(entity["project_id"])
@@ -171,21 +219,24 @@ class EntitiesLinkedWithTasksResource(Resource):
171
219
  @jwt_required()
172
220
  def get(self, entity_id):
173
221
  """
174
- Resource to retrieve the entities linked on a given entity.
222
+ Get linked entities
175
223
  ---
224
+ description: Retrieve all entities that are linked to a specific entity
225
+ along with their associated tasks. This includes related entities,
226
+ dependencies, and hierarchical relationships.
176
227
  tags:
177
228
  - Entities
178
229
  parameters:
179
230
  - in: path
180
231
  name: entity_id
181
232
  required: true
182
- schema:
183
- type: string
184
- format: uuid
233
+ type: string
234
+ format: uuid
185
235
  example: a24a6ea4-ce75-4665-a070-57453082c25
236
+ description: Unique identifier of the entity
186
237
  responses:
187
- '200':
188
- description: Entities linked on given entity
238
+ 200:
239
+ description: List of linked entities successfully retrieved
189
240
  content:
190
241
  application/json:
191
242
  schema:
@@ -196,17 +247,27 @@ class EntitiesLinkedWithTasksResource(Resource):
196
247
  id:
197
248
  type: string
198
249
  format: uuid
250
+ description: Entity unique identifier
251
+ example: a24a6ea4-ce75-4665-a070-57453082c25
199
252
  name:
200
253
  type: string
254
+ description: Entity name
255
+ example: "Character Model"
201
256
  entity_type_id:
202
257
  type: string
203
258
  format: uuid
259
+ description: Entity type identifier
260
+ example: b35b7fb5-df86-5776-b181-68564193d36
204
261
  project_id:
205
262
  type: string
206
263
  format: uuid
264
+ description: Project identifier
265
+ example: c46c8gc6-eg97-6887-c292-79675204e47
207
266
  parent_id:
208
267
  type: string
209
268
  format: uuid
269
+ description: Parent entity identifier
270
+ example: d57d9hd7-fh08-7998-d403-80786315f58
210
271
  tasks:
211
272
  type: array
212
273
  items:
@@ -215,13 +276,17 @@ class EntitiesLinkedWithTasksResource(Resource):
215
276
  id:
216
277
  type: string
217
278
  format: uuid
279
+ description: Task unique identifier
280
+ example: e68e0ie8-gi19-8009-e514-91897426g69
218
281
  name:
219
282
  type: string
283
+ description: Task name
284
+ example: "Modeling Task"
220
285
  task_type_id:
221
286
  type: string
222
287
  format: uuid
223
- '404':
224
- description: Entity not found
288
+ description: Task type identifier
289
+ example: f79f1jf9-hj20-9010-f625-02998537h80
225
290
  """
226
291
  entity = entities_service.get_entity(entity_id)
227
292
  user_service.check_project_access(entity["project_id"])
@@ -12,8 +12,11 @@ class EventsResource(Resource, ArgsMixin):
12
12
  @jwt_required()
13
13
  def get(self):
14
14
  """
15
- Retrieve last events.
15
+ Get events
16
16
  ---
17
+ description: Retrieve last events with filtering support. Filters can be
18
+ specified in the query string to narrow down results by date range,
19
+ project, or other criteria.
17
20
  tags:
18
21
  - Events
19
22
  parameters:
@@ -22,28 +25,74 @@ class EventsResource(Resource, ArgsMixin):
22
25
  type: string
23
26
  format: date
24
27
  example: "2022-07-12"
28
+ description: Filter events after this date
25
29
  - in: query
26
30
  name: before
27
31
  type: string
28
32
  format: date
29
33
  example: "2022-07-12"
34
+ description: Filter events before this date
30
35
  - in: query
31
36
  name: only_files
32
37
  type: boolean
33
- default: False
38
+ default: false
39
+ description: Return only file-related events
40
+ example: false
34
41
  - in: query
35
42
  name: limit
36
43
  type: integer
37
44
  default: 100
38
45
  example: 100
46
+ description: Maximum number of events to return
39
47
  - in: query
40
48
  name: project_id
41
49
  type: string
42
50
  format: uuid
43
51
  example: a24a6ea4-ce75-4665-a070-57453082c25
52
+ description: Filter events by specific project
53
+ - in: query
54
+ name: name
55
+ type: string
56
+ example: "user_login"
57
+ description: Filter events by event name
44
58
  responses:
45
- 200:
46
- description: All login logs
59
+ 200:
60
+ description: List of events successfully retrieved
61
+ content:
62
+ application/json:
63
+ schema:
64
+ type: array
65
+ items:
66
+ type: object
67
+ properties:
68
+ id:
69
+ type: string
70
+ format: uuid
71
+ description: Event unique identifier
72
+ example: a24a6ea4-ce75-4665-a070-57453082c25
73
+ name:
74
+ type: string
75
+ description: Event name
76
+ example: "user_login"
77
+ data:
78
+ type: object
79
+ description: Event data content
80
+ example: {"user_id": "b35b7fb5-df86-5776-b181-68564193d36"}
81
+ project_id:
82
+ type: string
83
+ format: uuid
84
+ description: Project identifier
85
+ example: c46c8gc6-eg97-6887-c292-79675204e47
86
+ created_at:
87
+ type: string
88
+ format: date-time
89
+ description: Event timestamp
90
+ example: "2023-01-01T12:00:00Z"
91
+ user_id:
92
+ type: string
93
+ format: uuid
94
+ description: User identifier who triggered the event
95
+ example: d57d9hd7-fh08-7998-d403-80786315f58
47
96
  """
48
97
  args = self.get_args(
49
98
  [
@@ -82,23 +131,62 @@ class LoginLogsResource(Resource, ArgsMixin):
82
131
  @jwt_required()
83
132
  def get(self):
84
133
  """
85
- Retrieve all login logs.
134
+ Get login logs
86
135
  ---
136
+ description: Retrieve all login logs with filtering support. Filters can
137
+ be specified in the query string to narrow down results by date range
138
+ and limit.
87
139
  tags:
88
140
  - Events
89
141
  parameters:
90
142
  - in: query
91
143
  name: before
92
144
  type: string
93
- format: date
145
+ format: date-time
94
146
  example: "2022-07-12T00:00:00"
147
+ description: Filter logs before this date and time
95
148
  - in: query
96
149
  name: limit
97
150
  type: integer
98
151
  example: 100
152
+ description: Maximum number of login logs to return
99
153
  responses:
100
- 200:
101
- description: All login logs
154
+ 200:
155
+ description: List of login logs successfully retrieved
156
+ content:
157
+ application/json:
158
+ schema:
159
+ type: array
160
+ items:
161
+ type: object
162
+ properties:
163
+ id:
164
+ type: string
165
+ format: uuid
166
+ description: Login log unique identifier
167
+ example: a24a6ea4-ce75-4665-a070-57453082c25
168
+ user_id:
169
+ type: string
170
+ format: uuid
171
+ description: User identifier
172
+ example: b35b7fb5-df86-5776-b181-68564193d36
173
+ ip_address:
174
+ type: string
175
+ description: IP address of the login
176
+ example: "192.168.1.100"
177
+ user_agent:
178
+ type: string
179
+ description: User agent string
180
+ example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
181
+ success:
182
+ type: boolean
183
+ description: Whether the login was successful
184
+ example: true
185
+ created_at:
186
+ type: string
187
+ format: date-time
188
+ description: Login timestamp
189
+ example: "2023-01-01T12:00:00Z"
102
190
  """
103
191
  args = self.get_args(["before", ("limit", 100)])
104
192
 
@@ -17,7 +17,7 @@ from zou.app.utils.redis import get_redis_url
17
17
  class IndexResource(Resource):
18
18
  def get(self):
19
19
  """
20
- Get API name and version.
20
+ Get API name and version
21
21
  ---
22
22
  tags:
23
23
  - Index
@@ -106,39 +106,40 @@ class BaseStatusResource(Resource):
106
106
  class StatusResource(BaseStatusResource):
107
107
  def get(self):
108
108
  """
109
- Retrieve API name, version and status.
110
- ---
111
- tags:
112
- - Index
113
- responses:
114
- '200':
115
- description: API name, version and status
116
- content:
117
- application/json:
118
- schema:
119
- type: object
120
- properties:
121
- name:
122
- type: string
123
- example: "Zou"
124
- version:
125
- type: string
126
- example: "0.20.0"
127
- database-up:
128
- type: boolean
129
- example: true
130
- key-value-store-up:
131
- type: boolean
132
- example: true
133
- event-stream-up:
134
- type: boolean
135
- example: true
136
- job-queue-up:
137
- type: boolean
138
- example: true
139
- indexer-up:
140
- type: boolean
141
- example: true
109
+ Get status of the API services
110
+ ---
111
+ description: Get status of the database, key value store, event stream, job queue, indexer
112
+ tags:
113
+ - Index
114
+ responses:
115
+ '200':
116
+ description: Status of the API services
117
+ content:
118
+ application/json:
119
+ schema:
120
+ type: object
121
+ properties:
122
+ name:
123
+ type: string
124
+ example: "Zou"
125
+ version:
126
+ type: string
127
+ example: "0.20.0"
128
+ database-up:
129
+ type: boolean
130
+ example: true
131
+ key-value-store-up:
132
+ type: boolean
133
+ example: true
134
+ event-stream-up:
135
+ type: boolean
136
+ example: true
137
+ job-queue-up:
138
+ type: boolean
139
+ example: true
140
+ indexer-up:
141
+ type: boolean
142
+ example: true
142
143
  """
143
144
  (
144
145
  api_name,
@@ -164,13 +165,14 @@ class StatusResource(BaseStatusResource):
164
165
  class StatusResourcesResource(BaseStatusResource):
165
166
  def get(self):
166
167
  """
167
- Retrieve date and CPU, memory and jobs stats.
168
+ Get resource usage stats
168
169
  ---
170
+ description: Get CPU usage for each core, memory repartition and number of jobs in the job queue.
169
171
  tags:
170
172
  - Index
171
173
  responses:
172
174
  '200':
173
- description: Date and CPU, memory and jobs stats
175
+ description: CPU, memory and jobs stats
174
176
  content:
175
177
  application/json:
176
178
  schema:
@@ -261,8 +263,9 @@ class StatusResourcesResource(BaseStatusResource):
261
263
  class TxtStatusResource(BaseStatusResource):
262
264
  def get(self):
263
265
  """
264
- Retrieve API name, version and status as txt.
266
+ Get status of the API services as text
265
267
  ---
268
+ description: Get status of the database, key value store, event stream, job queue, the indexer as a text.
266
269
  tags:
267
270
  - Index
268
271
  responses:
@@ -313,8 +316,9 @@ indexer-up: %s
313
316
  class InfluxStatusResource(BaseStatusResource):
314
317
  def get(self):
315
318
  """
316
- Retrieve status of database and time.
319
+ Get status of the API services for InfluxDB
317
320
  ---
321
+ description: Get status of the database, key value store, event stream, job queue, indexer as a JSON object.
318
322
  tags:
319
323
  - Index
320
324
  responses:
@@ -371,8 +375,9 @@ class StatsResource(Resource):
371
375
  @jwt_required()
372
376
  def get(self):
373
377
  """
374
- Retrieve main stats.
378
+ Get usage stats
375
379
  ---
380
+ description: Get the amount of projects, assets, shots, tasks, and persons.
376
381
  tags:
377
382
  - Index
378
383
  responses:
@@ -407,13 +412,14 @@ class StatsResource(Resource):
407
412
  class ConfigResource(Resource):
408
413
  def get(self):
409
414
  """
410
- Get basic configuration for the current instance.
415
+ Get the configuration of the Kitsu instance
411
416
  ---
417
+ description: The configuration includes self-hosted status, Crisp token, indexer configuration, SAML status, and dark theme status.
412
418
  tags:
413
419
  - Index
414
420
  responses:
415
421
  '200':
416
- description: Configuration object including self-hosted status, Crisp token, indexer configuration, SAML status, and dark theme status
422
+ description: Configuration object
417
423
  content:
418
424
  application/json:
419
425
  schema:
@@ -475,8 +481,9 @@ class ConfigResource(Resource):
475
481
  class TestEventsResource(Resource):
476
482
  def get(self):
477
483
  """
478
- Generate a main:test event.
484
+ Generate a test event
479
485
  ---
486
+ description: Generate a `main:test` event to test the event stream with the Python client or similar.
480
487
  tags:
481
488
  - Index
482
489
  responses: