cs-models 0.0.817__py3-none-any.whl → 0.0.819__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/MindgramOAuth/__init__.py +0 -0
- cs_models/resources/MindgramOAuth/models.py +35 -0
- cs_models/resources/MindgramOAuth/schemas.py +20 -0
- cs_models/resources/SmartDefGridCellQuestion/models.py +1 -0
- cs_models/resources/SmartDefGridCellQuestion/schemas.py +1 -0
- {cs_models-0.0.817.dist-info → cs_models-0.0.819.dist-info}/METADATA +1 -1
- {cs_models-0.0.817.dist-info → cs_models-0.0.819.dist-info}/RECORD +9 -6
- {cs_models-0.0.817.dist-info → cs_models-0.0.819.dist-info}/WHEEL +0 -0
- {cs_models-0.0.817.dist-info → cs_models-0.0.819.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from sqlalchemy import (
|
|
3
|
+
Column,
|
|
4
|
+
Integer,
|
|
5
|
+
String,
|
|
6
|
+
DateTime,
|
|
7
|
+
UniqueConstraint,
|
|
8
|
+
Text,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
from ...database import Base
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class OAuthTokenModel(Base):
|
|
15
|
+
__tablename__ = "mindgram_oauth_tokens"
|
|
16
|
+
__table_args__ = (UniqueConstraint("user_id", "provider", name="ux_user_provider"),)
|
|
17
|
+
|
|
18
|
+
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
19
|
+
user_id = Column(String(128), nullable=False)
|
|
20
|
+
provider = Column(String(32), nullable=False)
|
|
21
|
+
access_token = Column(Text, nullable=True)
|
|
22
|
+
refresh_token = Column(Text, nullable=False)
|
|
23
|
+
token_type = Column(String(32), nullable=True, default="Bearer")
|
|
24
|
+
scope = Column(Text, nullable=True)
|
|
25
|
+
expiry = Column(DateTime, nullable=True)
|
|
26
|
+
token_uri = Column(String(255), nullable=False)
|
|
27
|
+
client_id = Column(String(255), nullable=False)
|
|
28
|
+
client_secret = Column(String(255), nullable=False)
|
|
29
|
+
updated_at = Column(
|
|
30
|
+
DateTime,
|
|
31
|
+
nullable=False,
|
|
32
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
33
|
+
default=lambda: datetime.utcnow(),
|
|
34
|
+
onupdate=lambda: datetime.utcnow(),
|
|
35
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class MindgramOAuthTokenResourceSchema(Schema):
|
|
8
|
+
id = fields.Integer(dump_only=True)
|
|
9
|
+
user_id = fields.String(required=True)
|
|
10
|
+
provider = fields.String(required=True)
|
|
11
|
+
access_token = fields.String(allow_none=True)
|
|
12
|
+
refresh_token = fields.String(required=True)
|
|
13
|
+
token_type = fields.String(allow_none=True)
|
|
14
|
+
scope = fields.String(allow_none=True)
|
|
15
|
+
expiry = fields.DateTime(allow_none=True)
|
|
16
|
+
token_uri = fields.String(required=True)
|
|
17
|
+
client_id = fields.String(required=True)
|
|
18
|
+
client_secret = fields.String(required=True)
|
|
19
|
+
created_at = fields.DateTime(dump_only=True)
|
|
20
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
@@ -39,6 +39,7 @@ class SmartDefGridCellQuestionModel(Base):
|
|
|
39
39
|
|
|
40
40
|
# Answer
|
|
41
41
|
answer_text = Column(Text, nullable=True)
|
|
42
|
+
answer_info = Column(JSON, nullable=True)
|
|
42
43
|
|
|
43
44
|
# Queue & lifecycle
|
|
44
45
|
status = Column(Enum(QuestionStatus), nullable=False, default=QuestionStatus.pending)
|
|
@@ -22,6 +22,7 @@ class SmartDefGridCellQuestionResourceSchema(Schema):
|
|
|
22
22
|
retrieval_hints = fields.Raw(allow_none=True)
|
|
23
23
|
|
|
24
24
|
answer_text = fields.String(allow_none=True)
|
|
25
|
+
answer_info = fields.Raw(allow_none=True)
|
|
25
26
|
|
|
26
27
|
status = fields.String(required=True, validate=validate.OneOf(QUESTION_STATUS))
|
|
27
28
|
priority = fields.Integer(required=True)
|
|
@@ -596,6 +596,9 @@ cs_models/resources/MergerOutboxCompany/schemas.py,sha256=PpXAGPuk_tHR9ydmFEPr4e
|
|
|
596
596
|
cs_models/resources/MergerSentences/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
597
597
|
cs_models/resources/MergerSentences/models.py,sha256=I3q9pP9Nakzs9nqqgqDt-6HMql-pRHeTZ2JpK5pfvvA,818
|
|
598
598
|
cs_models/resources/MergerSentences/schemas.py,sha256=WmTpRQY42wTwG2Flk-LFJ7uukqYEcYyCj6hv-49Jmwk,455
|
|
599
|
+
cs_models/resources/MindgramOAuth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
600
|
+
cs_models/resources/MindgramOAuth/models.py,sha256=FsbuPkUqmT7BLFpr0GTUxEF3pDFUSfM-D0ZyTTCSiKk,1180
|
|
601
|
+
cs_models/resources/MindgramOAuth/schemas.py,sha256=UCU-d1GGQFie0uRWlMKFElyC5qSJcg5x9LXAB2Htzpo,702
|
|
599
602
|
cs_models/resources/Modality/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
600
603
|
cs_models/resources/Modality/models.py,sha256=aYM_svz7MwYQizydXMvzn_fPjy8lTFi5ExbgfJK4z5s,447
|
|
601
604
|
cs_models/resources/Modality/schemas.py,sha256=WdDFJ6C26XGN1eu9LdkbGBzlEDUSlvuyo0sPXdfOg_Q,296
|
|
@@ -966,8 +969,8 @@ cs_models/resources/SmartDefGridCellAnswerCitation/__init__.py,sha256=47DEQpj8HB
|
|
|
966
969
|
cs_models/resources/SmartDefGridCellAnswerCitation/models.py,sha256=pCNakAl08pSFTbuhJypF43zDfoapZDsvFPH2PP7QQqo,916
|
|
967
970
|
cs_models/resources/SmartDefGridCellAnswerCitation/schemas.py,sha256=1dYybWcoSuhP0OLqwQ3igNeexMcV-Nj0IqtBaPVap-Q,568
|
|
968
971
|
cs_models/resources/SmartDefGridCellQuestion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
969
|
-
cs_models/resources/SmartDefGridCellQuestion/models.py,sha256=
|
|
970
|
-
cs_models/resources/SmartDefGridCellQuestion/schemas.py,sha256=
|
|
972
|
+
cs_models/resources/SmartDefGridCellQuestion/models.py,sha256=Ov73g_1dR0RRZ5d5KLr8jQ6mQ7kiN_a7o6xFb030tZA,3432
|
|
973
|
+
cs_models/resources/SmartDefGridCellQuestion/schemas.py,sha256=fwHrW2RBCQRPyTdXzZ4d17styyD-wyvA6cMdbsRdweE,1690
|
|
971
974
|
cs_models/resources/SmartDefGridCellValue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
972
975
|
cs_models/resources/SmartDefGridCellValue/models.py,sha256=xNonMUcjN09lqS0CrYLoVGRpsGPFvW75FcT5IY7ggUA,2425
|
|
973
976
|
cs_models/resources/SmartDefGridCellValue/schemas.py,sha256=RjxVxBtxd29iReLOfArdHOzmV4ruyfyUnqfL8Wf9BG4,690
|
|
@@ -1321,7 +1324,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
1321
1324
|
cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
|
|
1322
1325
|
cs_models/utils/utils.py,sha256=BzCDk3u1np7DoJQqCZIJN4f80JNHvJoWO4qEFgolN-8,4474
|
|
1323
1326
|
cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
|
|
1324
|
-
cs_models-0.0.
|
|
1325
|
-
cs_models-0.0.
|
|
1326
|
-
cs_models-0.0.
|
|
1327
|
-
cs_models-0.0.
|
|
1327
|
+
cs_models-0.0.819.dist-info/METADATA,sha256=OBzyH7SKjbsPDtZMA1Kn3GZ0YjQPkwsPPX1YGcm5j_w,751
|
|
1328
|
+
cs_models-0.0.819.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1329
|
+
cs_models-0.0.819.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
|
|
1330
|
+
cs_models-0.0.819.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|