cs-models 0.0.780__py3-none-any.whl → 0.0.781__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.
Potentially problematic release.
This version of cs-models might be problematic. Click here for more details.
- cs_models/resources/Meeting/schemas.py +79 -2
- {cs_models-0.0.780.dist-info → cs_models-0.0.781.dist-info}/METADATA +1 -1
- {cs_models-0.0.780.dist-info → cs_models-0.0.781.dist-info}/RECORD +5 -5
- {cs_models-0.0.780.dist-info → cs_models-0.0.781.dist-info}/WHEEL +0 -0
- {cs_models-0.0.780.dist-info → cs_models-0.0.781.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
from marshmallow import (
|
|
2
3
|
Schema,
|
|
3
4
|
fields,
|
|
@@ -5,6 +6,82 @@ from marshmallow import (
|
|
|
5
6
|
)
|
|
6
7
|
|
|
7
8
|
|
|
9
|
+
class MeetingImportantDatesField(fields.Field):
|
|
10
|
+
"""Field that stores result for the Assistant command."""
|
|
11
|
+
|
|
12
|
+
def _serialize(self, value, attr, obj, **kwargs):
|
|
13
|
+
"""
|
|
14
|
+
In the DB, the `result` field is a text field. We persist
|
|
15
|
+
data by performing the following:
|
|
16
|
+
|
|
17
|
+
AssistantCommandModel(
|
|
18
|
+
...
|
|
19
|
+
result=json.dumps({...}),
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
So here we need to perform the inverse operation (i.e `json.loads(..)`)
|
|
23
|
+
"""
|
|
24
|
+
if value is None:
|
|
25
|
+
return None
|
|
26
|
+
return json.loads(value)
|
|
27
|
+
|
|
28
|
+
def _deserialize(self, value, attr, data, **kwargs):
|
|
29
|
+
"""
|
|
30
|
+
In the DB, the `result` field is a text field. We persist
|
|
31
|
+
data by performing the following:
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
AssistantCommandModel(
|
|
36
|
+
***AssistantCommandResourceSchema().load({
|
|
37
|
+
...
|
|
38
|
+
"result": [{"some_key": 1}, {"some_key": 2}],
|
|
39
|
+
}),
|
|
40
|
+
)
|
|
41
|
+
"""
|
|
42
|
+
if value is None:
|
|
43
|
+
return None
|
|
44
|
+
return json.dumps(value)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class MeetingIndexingStatusField(fields.Field):
|
|
48
|
+
"""Field that stores result for the Assistant command."""
|
|
49
|
+
|
|
50
|
+
def _serialize(self, value, attr, obj, **kwargs):
|
|
51
|
+
"""
|
|
52
|
+
In the DB, the `result` field is a text field. We persist
|
|
53
|
+
data by performing the following:
|
|
54
|
+
|
|
55
|
+
AssistantCommandModel(
|
|
56
|
+
...
|
|
57
|
+
result=json.dumps({...}),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
So here we need to perform the inverse operation (i.e `json.loads(..)`)
|
|
61
|
+
"""
|
|
62
|
+
if value is None:
|
|
63
|
+
return None
|
|
64
|
+
return json.loads(value)
|
|
65
|
+
|
|
66
|
+
def _deserialize(self, value, attr, data, **kwargs):
|
|
67
|
+
"""
|
|
68
|
+
In the DB, the `result` field is a text field. We persist
|
|
69
|
+
data by performing the following:
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
AssistantCommandModel(
|
|
74
|
+
***AssistantCommandResourceSchema().load({
|
|
75
|
+
...
|
|
76
|
+
"result": [{"some_key": 1}, {"some_key": 2}],
|
|
77
|
+
}),
|
|
78
|
+
)
|
|
79
|
+
"""
|
|
80
|
+
if value is None:
|
|
81
|
+
return None
|
|
82
|
+
return json.dumps(value)
|
|
83
|
+
|
|
84
|
+
|
|
8
85
|
class MeetingResourceSchema(Schema):
|
|
9
86
|
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
87
|
|
|
@@ -18,7 +95,7 @@ class MeetingResourceSchema(Schema):
|
|
|
18
95
|
meeting_bucket_id = fields.Integer(allow_none=True)
|
|
19
96
|
author_pipeline = fields.Boolean(allow_none=True)
|
|
20
97
|
insights_pipeline = fields.Boolean(allow_none=True)
|
|
21
|
-
important_dates =
|
|
22
|
-
indexing_status =
|
|
98
|
+
important_dates = MeetingImportantDatesField(allow_none=True)
|
|
99
|
+
indexing_status = MeetingIndexingStatusField(allow_none=True)
|
|
23
100
|
status = fields.String(allow_none=True)
|
|
24
101
|
updated_at = fields.DateTime()
|
|
@@ -549,7 +549,7 @@ cs_models/resources/LicensingCollabTarget/models.py,sha256=AofVwKxsGt6kf0YGQqY3r
|
|
|
549
549
|
cs_models/resources/LicensingCollabTarget/schemas.py,sha256=jijLVNnVxOMWBMYfij-8-ZLz8m8A51cOn_U37Xqkg2Y,502
|
|
550
550
|
cs_models/resources/Meeting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
551
551
|
cs_models/resources/Meeting/models.py,sha256=TpOLgPRAgUXMwdSwtXO8-Kdytbarb0v5nhdlu23dO4Q,1262
|
|
552
|
-
cs_models/resources/Meeting/schemas.py,sha256=
|
|
552
|
+
cs_models/resources/Meeting/schemas.py,sha256=2_lO-8nLoVVypmwDUwp83Ix2HT0BKy2sa2wgWCVqvNg,2974
|
|
553
553
|
cs_models/resources/MeetingBucket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
554
554
|
cs_models/resources/MeetingBucket/models.py,sha256=OfjmVYISxesbvtu4E2bltlpvzFZluds7arFwjxma3S8,600
|
|
555
555
|
cs_models/resources/MeetingBucket/schemas.py,sha256=oZm2XHNaWEh-aoqPbsS405BGZoo06QGPtHNM6Jf-MkQ,312
|
|
@@ -1273,7 +1273,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
1273
1273
|
cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
|
|
1274
1274
|
cs_models/utils/utils.py,sha256=BzCDk3u1np7DoJQqCZIJN4f80JNHvJoWO4qEFgolN-8,4474
|
|
1275
1275
|
cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
|
|
1276
|
-
cs_models-0.0.
|
|
1277
|
-
cs_models-0.0.
|
|
1278
|
-
cs_models-0.0.
|
|
1279
|
-
cs_models-0.0.
|
|
1276
|
+
cs_models-0.0.781.dist-info/METADATA,sha256=ATpeqg5lzm2EbTa5yf42518CVnGCFJZ98EeFDwGRS-Y,751
|
|
1277
|
+
cs_models-0.0.781.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1278
|
+
cs_models-0.0.781.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
|
|
1279
|
+
cs_models-0.0.781.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|