cs-models 0.0.779__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.

@@ -7,6 +7,7 @@ from sqlalchemy import (
7
7
  DateTime,
8
8
  Boolean,
9
9
  ForeignKey,
10
+ Text,
10
11
  )
11
12
 
12
13
  from ...database import Base
@@ -29,6 +30,8 @@ class MeetingModel(Base):
29
30
  )
30
31
  author_pipeline = Column(Boolean, nullable=True)
31
32
  insights_pipeline = Column(Boolean, nullable=True)
33
+ important_dates = Column(Text, nullable=True)
34
+ indexing_status = Column(String(128), nullable=True)
32
35
  status = Column(String, nullable=True)
33
36
  updated_at = Column(
34
37
  DateTime,
@@ -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,5 +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)
98
+ important_dates = MeetingImportantDatesField(allow_none=True)
99
+ indexing_status = MeetingIndexingStatusField(allow_none=True)
21
100
  status = fields.String(allow_none=True)
22
101
  updated_at = fields.DateTime()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.779
3
+ Version: 0.0.781
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -548,8 +548,8 @@ cs_models/resources/LicensingCollabTarget/__init__.py,sha256=47DEQpj8HBSa-_TImW-
548
548
  cs_models/resources/LicensingCollabTarget/models.py,sha256=AofVwKxsGt6kf0YGQqY3r3I1GVrbSh5lHV1QUUfiB7c,959
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
- cs_models/resources/Meeting/models.py,sha256=opxL3vqIsoA63V9-mHRV1y77wAZzgWDl4ofiltKkylw,1145
552
- cs_models/resources/Meeting/schemas.py,sha256=PTwlvAK9OawoNTMQOq5qhIZXBhgZkmwGQTAR6Lhs114,772
551
+ cs_models/resources/Meeting/models.py,sha256=TpOLgPRAgUXMwdSwtXO8-Kdytbarb0v5nhdlu23dO4Q,1262
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.779.dist-info/METADATA,sha256=U8R4wxdbnGuDbLO8A_xqHdLxbdFohB0iobZRBU6LLkg,751
1277
- cs_models-0.0.779.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1278
- cs_models-0.0.779.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1279
- cs_models-0.0.779.dist-info/RECORD,,
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,,