zou 0.20.82__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.
- zou/__init__.py +1 -1
- zou/app/blueprints/assets/resources.py +1060 -153
- zou/app/blueprints/auth/resources.py +368 -238
- zou/app/blueprints/breakdown/resources.py +584 -94
- zou/app/blueprints/chats/resources.py +176 -37
- zou/app/blueprints/comments/resources.py +387 -125
- zou/app/blueprints/concepts/resources.py +428 -63
- zou/app/blueprints/departments/resources.py +302 -68
- zou/app/blueprints/edits/resources.py +651 -81
- zou/app/blueprints/entities/resources.py +104 -39
- zou/app/blueprints/events/resources.py +96 -8
- zou/app/blueprints/index/resources.py +49 -42
- zou/app/blueprints/news/resources.py +45 -27
- zou/app/blueprints/user/resources.py +1808 -215
- zou/app/swagger.py +100 -27
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/METADATA +1 -1
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/RECORD +21 -21
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/WHEEL +0 -0
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/entry_points.txt +0 -0
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.82.dist-info → zou-0.20.83.dist-info}/top_level.txt +0 -0
|
@@ -18,20 +18,47 @@ class ChatResource(Resource):
|
|
|
18
18
|
@jwt_required()
|
|
19
19
|
def get(self, entity_id):
|
|
20
20
|
"""
|
|
21
|
-
Get chat details
|
|
21
|
+
Get chat details
|
|
22
22
|
---
|
|
23
|
+
description: Retrieve chat information and messages for a specific entity.
|
|
24
|
+
Returns chat metadata including participants and all associated messages.
|
|
23
25
|
tags:
|
|
24
26
|
- Chat
|
|
25
27
|
parameters:
|
|
26
28
|
- in: path
|
|
27
29
|
name: entity_id
|
|
28
30
|
description: ID of the entity related to the chat
|
|
29
|
-
type:
|
|
31
|
+
type: string
|
|
32
|
+
format: uuid
|
|
30
33
|
required: true
|
|
31
34
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
32
35
|
responses:
|
|
33
36
|
200:
|
|
34
|
-
description: Chat information
|
|
37
|
+
description: Chat information successfully retrieved
|
|
38
|
+
content:
|
|
39
|
+
application/json:
|
|
40
|
+
schema:
|
|
41
|
+
type: object
|
|
42
|
+
properties:
|
|
43
|
+
id:
|
|
44
|
+
type: string
|
|
45
|
+
format: uuid
|
|
46
|
+
description: Chat unique identifier
|
|
47
|
+
entity_id:
|
|
48
|
+
type: string
|
|
49
|
+
format: uuid
|
|
50
|
+
description: Entity ID this chat is associated with
|
|
51
|
+
participants:
|
|
52
|
+
type: array
|
|
53
|
+
items:
|
|
54
|
+
type: string
|
|
55
|
+
format: uuid
|
|
56
|
+
description: List of participant user IDs
|
|
57
|
+
messages:
|
|
58
|
+
type: array
|
|
59
|
+
items:
|
|
60
|
+
type: object
|
|
61
|
+
description: Array of chat messages
|
|
35
62
|
"""
|
|
36
63
|
entity = entities_service.get_entity(entity_id)
|
|
37
64
|
user_service.check_project_access(entity["project_id"])
|
|
@@ -46,20 +73,50 @@ class ChatMessagesResource(Resource):
|
|
|
46
73
|
@jwt_required()
|
|
47
74
|
def get(self, entity_id):
|
|
48
75
|
"""
|
|
49
|
-
Get chat messages
|
|
76
|
+
Get chat messages
|
|
50
77
|
---
|
|
78
|
+
description: Retrieve all chat messages for a specific entity.
|
|
79
|
+
Returns a list of messages with sender information and timestamps.
|
|
51
80
|
tags:
|
|
52
81
|
- Chat
|
|
53
82
|
parameters:
|
|
54
83
|
- in: path
|
|
55
84
|
name: entity_id
|
|
56
85
|
description: ID of the entity related to the chat
|
|
57
|
-
type:
|
|
86
|
+
type: string
|
|
87
|
+
format: uuid
|
|
58
88
|
required: true
|
|
59
89
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
60
90
|
responses:
|
|
61
|
-
|
|
62
|
-
|
|
91
|
+
200:
|
|
92
|
+
description: Chat messages successfully retrieved
|
|
93
|
+
content:
|
|
94
|
+
application/json:
|
|
95
|
+
schema:
|
|
96
|
+
type: array
|
|
97
|
+
items:
|
|
98
|
+
type: object
|
|
99
|
+
properties:
|
|
100
|
+
id:
|
|
101
|
+
type: string
|
|
102
|
+
format: uuid
|
|
103
|
+
description: Message unique identifier
|
|
104
|
+
message:
|
|
105
|
+
type: string
|
|
106
|
+
description: Message content
|
|
107
|
+
person_id:
|
|
108
|
+
type: string
|
|
109
|
+
format: uuid
|
|
110
|
+
description: ID of the message sender
|
|
111
|
+
created_at:
|
|
112
|
+
type: string
|
|
113
|
+
format: date-time
|
|
114
|
+
description: Message creation timestamp
|
|
115
|
+
attachments:
|
|
116
|
+
type: array
|
|
117
|
+
items:
|
|
118
|
+
type: object
|
|
119
|
+
description: Array of file attachments
|
|
63
120
|
"""
|
|
64
121
|
entity = entities_service.get_entity(entity_id)
|
|
65
122
|
user_service.check_project_access(entity["project_id"])
|
|
@@ -69,33 +126,78 @@ class ChatMessagesResource(Resource):
|
|
|
69
126
|
@jwt_required()
|
|
70
127
|
def post(self, entity_id):
|
|
71
128
|
"""
|
|
72
|
-
Create
|
|
129
|
+
Create chat message
|
|
73
130
|
---
|
|
131
|
+
description: Create a new chat message for a specific entity.
|
|
132
|
+
Supports both JSON and form data with optional file attachments.
|
|
133
|
+
Only chat participants can send messages.
|
|
74
134
|
tags:
|
|
75
135
|
- Chat
|
|
76
136
|
parameters:
|
|
77
137
|
- in: path
|
|
78
138
|
name: entity_id
|
|
79
139
|
description: ID of the entity related to the chat
|
|
80
|
-
type: integer
|
|
81
|
-
required: true
|
|
82
|
-
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
83
|
-
- in: body
|
|
84
|
-
name: message
|
|
85
|
-
description: Message to send
|
|
86
140
|
type: string
|
|
141
|
+
format: uuid
|
|
87
142
|
required: true
|
|
88
|
-
example:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
143
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
144
|
+
requestBody:
|
|
145
|
+
required: true
|
|
146
|
+
content:
|
|
147
|
+
application/json:
|
|
148
|
+
schema:
|
|
149
|
+
type: object
|
|
150
|
+
properties:
|
|
151
|
+
message:
|
|
152
|
+
type: string
|
|
153
|
+
description: Message content to send
|
|
154
|
+
example: Hello, world!
|
|
155
|
+
required:
|
|
156
|
+
- message
|
|
157
|
+
multipart/form-data:
|
|
158
|
+
schema:
|
|
159
|
+
type: object
|
|
160
|
+
properties:
|
|
161
|
+
message:
|
|
162
|
+
type: string
|
|
163
|
+
description: Message content to send
|
|
164
|
+
example: Hello, world!
|
|
165
|
+
files:
|
|
166
|
+
type: array
|
|
167
|
+
items:
|
|
168
|
+
type: string
|
|
169
|
+
format: binary
|
|
170
|
+
description: Files to attach to the message
|
|
171
|
+
required:
|
|
172
|
+
- message
|
|
94
173
|
responses:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
174
|
+
201:
|
|
175
|
+
description: Chat message successfully created
|
|
176
|
+
content:
|
|
177
|
+
application/json:
|
|
178
|
+
schema:
|
|
179
|
+
type: object
|
|
180
|
+
properties:
|
|
181
|
+
id:
|
|
182
|
+
type: string
|
|
183
|
+
format: uuid
|
|
184
|
+
description: Created message unique identifier
|
|
185
|
+
message:
|
|
186
|
+
type: string
|
|
187
|
+
description: Message content
|
|
188
|
+
person_id:
|
|
189
|
+
type: string
|
|
190
|
+
format: uuid
|
|
191
|
+
description: ID of the message sender
|
|
192
|
+
created_at:
|
|
193
|
+
type: string
|
|
194
|
+
format: date-time
|
|
195
|
+
description: Message creation timestamp
|
|
196
|
+
attachments:
|
|
197
|
+
type: array
|
|
198
|
+
items:
|
|
199
|
+
type: object
|
|
200
|
+
description: Array of attached files
|
|
99
201
|
"""
|
|
100
202
|
entity = entities_service.get_entity(entity_id)
|
|
101
203
|
user_service.check_project_access(entity["project_id"])
|
|
@@ -133,26 +235,59 @@ class ChatMessageResource(Resource):
|
|
|
133
235
|
@jwt_required()
|
|
134
236
|
def get(self, entity_id, chat_message_id):
|
|
135
237
|
"""
|
|
136
|
-
Get chat message
|
|
238
|
+
Get chat message
|
|
137
239
|
---
|
|
240
|
+
description: Retrieve a specific chat message by its ID.
|
|
241
|
+
Returns detailed message information including content and metadata.
|
|
138
242
|
tags:
|
|
139
243
|
- Chat
|
|
140
244
|
parameters:
|
|
141
245
|
- in: path
|
|
142
246
|
name: entity_id
|
|
143
247
|
description: ID of the entity related to the chat
|
|
144
|
-
type:
|
|
248
|
+
type: string
|
|
249
|
+
format: uuid
|
|
145
250
|
required: true
|
|
146
251
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
147
252
|
- in: path
|
|
148
253
|
name: chat_message_id
|
|
149
254
|
description: ID of the chat message
|
|
150
|
-
type:
|
|
255
|
+
type: string
|
|
256
|
+
format: uuid
|
|
151
257
|
required: true
|
|
152
|
-
example:
|
|
258
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
153
259
|
responses:
|
|
154
|
-
|
|
155
|
-
|
|
260
|
+
200:
|
|
261
|
+
description: Chat message successfully retrieved
|
|
262
|
+
content:
|
|
263
|
+
application/json:
|
|
264
|
+
schema:
|
|
265
|
+
type: object
|
|
266
|
+
properties:
|
|
267
|
+
id:
|
|
268
|
+
type: string
|
|
269
|
+
format: uuid
|
|
270
|
+
description: Message unique identifier
|
|
271
|
+
message:
|
|
272
|
+
type: string
|
|
273
|
+
description: Message content
|
|
274
|
+
person_id:
|
|
275
|
+
type: string
|
|
276
|
+
format: uuid
|
|
277
|
+
description: ID of the message sender
|
|
278
|
+
created_at:
|
|
279
|
+
type: string
|
|
280
|
+
format: date-time
|
|
281
|
+
description: Message creation timestamp
|
|
282
|
+
updated_at:
|
|
283
|
+
type: string
|
|
284
|
+
format: date-time
|
|
285
|
+
description: Message last update timestamp
|
|
286
|
+
attachments:
|
|
287
|
+
type: array
|
|
288
|
+
items:
|
|
289
|
+
type: object
|
|
290
|
+
description: Array of file attachments
|
|
156
291
|
"""
|
|
157
292
|
entity = entities_service.get_entity(entity_id)
|
|
158
293
|
user_service.check_project_access(entity["project_id"])
|
|
@@ -162,26 +297,30 @@ class ChatMessageResource(Resource):
|
|
|
162
297
|
@jwt_required()
|
|
163
298
|
def delete(self, entity_id, chat_message_id):
|
|
164
299
|
"""
|
|
165
|
-
Delete chat message
|
|
300
|
+
Delete chat message
|
|
166
301
|
---
|
|
302
|
+
description: Delete a specific chat message. Only the message author
|
|
303
|
+
or administrators can delete messages.
|
|
167
304
|
tags:
|
|
168
305
|
- Chat
|
|
169
306
|
parameters:
|
|
170
307
|
- in: path
|
|
171
308
|
name: entity_id
|
|
172
309
|
description: ID of the entity related to the chat
|
|
173
|
-
type:
|
|
310
|
+
type: string
|
|
311
|
+
format: uuid
|
|
174
312
|
required: true
|
|
175
313
|
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
176
314
|
- in: path
|
|
177
315
|
name: chat_message_id
|
|
178
|
-
description: ID of the chat message
|
|
179
|
-
type:
|
|
316
|
+
description: ID of the chat message to delete
|
|
317
|
+
type: string
|
|
318
|
+
format: uuid
|
|
180
319
|
required: true
|
|
181
|
-
example:
|
|
320
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
182
321
|
responses:
|
|
183
|
-
|
|
184
|
-
|
|
322
|
+
204:
|
|
323
|
+
description: Chat message successfully deleted
|
|
185
324
|
"""
|
|
186
325
|
entity = entities_service.get_entity(entity_id)
|
|
187
326
|
user_service.check_project_access(entity["project_id"])
|