prism-models 0.1.3__py3-none-any.whl → 0.1.5__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 prism-models might be problematic. Click here for more details.

prism_models/chat.py CHANGED
@@ -24,6 +24,7 @@ class ContactSource(PyEnum):
24
24
  GRID = "GRID"
25
25
  CRM = "CRM"
26
26
  EXTERNAL = "EXTERNAL"
27
+ MICROSOFT_AD = "MICROSOFT_AD"
27
28
 
28
29
 
29
30
  class ConversationType(PyEnum):
@@ -46,6 +47,7 @@ class MessageStatus(PyEnum):
46
47
 
47
48
  class MessageType(PyEnum):
48
49
  TEXT = "TEXT"
50
+
49
51
 
50
52
 
51
53
  class Contact(ChatSchemaMixin, BaseModel):
@@ -78,6 +80,10 @@ class Contact(ChatSchemaMixin, BaseModel):
78
80
  crm_contact_guid = Column(String(36), nullable=True)
79
81
 
80
82
  account_id = Column(String(36), nullable=True)
83
+
84
+ # oid claim from Azure AD
85
+ azure_ad_object_id = Column(String(36), nullable=True, unique=True, index=True)
86
+ azure_ad_tenant_id = Column(String(36), nullable=True, index=True)
81
87
 
82
88
  conversations = relationship("Conversation", back_populates="contact", cascade="all, delete-orphan")
83
89
 
@@ -0,0 +1,46 @@
1
+ """AD Enum and field added
2
+
3
+ Revision ID: b789e61df26a
4
+ Revises: ff3be2c4311f
5
+ Create Date: 2025-10-28 13:33:30.377086
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = 'b789e61df26a'
16
+ down_revision: Union[str, Sequence[str], None] = 'ff3be2c4311f'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # Add new MICROSOFT_AD value to the existing contactsource enum type
24
+ op.execute("ALTER TYPE contactsource ADD VALUE IF NOT EXISTS 'MICROSOFT_AD'")
25
+
26
+ # ### commands auto generated by Alembic - please adjust! ###
27
+ op.add_column('contact', sa.Column('azure_ad_object_id', sa.String(length=36), nullable=True))
28
+ op.add_column('contact', sa.Column('azure_ad_tenant_id', sa.String(length=36), nullable=True))
29
+ op.create_index(op.f('contact_azure_ad_object_id_idx'), 'contact', ['azure_ad_object_id'], unique=True)
30
+ op.create_index(op.f('contact_azure_ad_tenant_id_idx'), 'contact', ['azure_ad_tenant_id'], unique=False)
31
+ # ### end Alembic commands ###
32
+
33
+
34
+ def downgrade() -> None:
35
+ """Downgrade schema."""
36
+ # ### commands auto generated by Alembic - please adjust! ###
37
+ op.drop_index(op.f('contact_azure_ad_tenant_id_idx'), table_name='contact')
38
+ op.drop_index(op.f('contact_azure_ad_object_id_idx'), table_name='contact')
39
+ op.drop_column('contact', 'azure_ad_tenant_id')
40
+ op.drop_column('contact', 'azure_ad_object_id')
41
+ # ### end Alembic commands ###
42
+
43
+ # NOTE: Removing enum values from PostgreSQL types is complex and risky.
44
+ # The 'MICROSOFT_AD' value will remain in the contactsource type after downgrade.
45
+ # If you need to remove it, you would need to recreate the enum type entirely,
46
+ # which requires updating all dependent columns. Not recommended for production.
prism_models/qdrant.py CHANGED
@@ -18,6 +18,11 @@ class QdrantVectorPayload(BaseModel):
18
18
  uuid: Optional[UUID4] = Field(
19
19
  default=None, description="Unique identifier for the vector"
20
20
  )
21
+
22
+ document_id: Optional[int] = Field(
23
+ default=None, description="ID of the document associated with the chunk"
24
+ )
25
+
21
26
  chunk_text: Optional[str] = Field(
22
27
  default=None, description="Text content of the chunk"
23
28
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prism-models
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Requires-Python: >=3.12
5
5
  Requires-Dist: sqlalchemy[asyncio]>=2.0.0
6
6
  Requires-Dist: alembic>=1.16.0
@@ -1,11 +1,11 @@
1
1
  prism_models/__init__.py,sha256=IMDlzCmXkCSiY2Ag5BUS4KS2muPJrinwgSquMcmLCG0,1448
2
2
  prism_models/agent_profile.py,sha256=pyWv0yZlt32iMzSht8z90F-RUZlLqVAFdjJKJlOuMEk,4602
3
3
  prism_models/base.py,sha256=Ka8zNToTiTG0jNgzqqj2goGmPXt8zxuuSMYvotnb8wY,2281
4
- prism_models/chat.py,sha256=zncfBav1YdB8AdC-9McY9fsKZ3-2plLLhy_NMd8JoyA,11784
4
+ prism_models/chat.py,sha256=apkzBWRhJyhT2VBMOSewhFfueyjkpR3u3vQYTSWG2qc,12013
5
5
  prism_models/config.py,sha256=gy_6HknnG17Clv8X_EBhaXEBFBLGR1PLjvN5-SFTo5E,962
6
6
  prism_models/content.py,sha256=gRyampLEpZnAeaVljVt4jz8X723eAAFzF10Ds2qUkcA,11083
7
7
  prism_models/feedback.py,sha256=tMZISQ0mk7_1ADsK4bO36_VZ0f-JDdAPcfWzIZBk0_g,6202
8
- prism_models/qdrant.py,sha256=ORIpLv1fbRJiL9qq2F-WurtY42MGEPku4ojY_-cdsRY,3266
8
+ prism_models/qdrant.py,sha256=rnW_MPeC1kdtAMPlVIwWoRyJKd2TgKP5rc8i8GMrqCs,3399
9
9
  prism_models/migration/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
10
10
  prism_models/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  prism_models/migration/env.py,sha256=Uobqv_peoEUYAZST0D0hO7xHPQe8OPxqZ0yV1xuNE2c,4096
@@ -34,7 +34,8 @@ prism_models/migration/versions/2025_10_09_1308_796b720ea35f_added_qa_id_to_vove
34
34
  prism_models/migration/versions/2025_10_16_1611_663c66268631_added_sharepoint_drive_item_id_as_an_.py,sha256=IaG9NDyTGENq65GyrhGoScBb-U82x5V7NBKpG9PYy5Q,968
35
35
  prism_models/migration/versions/2025_10_23_1228_919d07a93f83_added_sharepoint_directory_in_source.py,sha256=dk7jTusquTc9rDlJtduGIi-YiqNpGfex63WQkVLMeuk,923
36
36
  prism_models/migration/versions/2025_10_27_1331_ff3be2c4311f_added_agentcollectionaccess_table.py,sha256=wFa9DJSQjhHSrl2JUA2vgPz8qLcL01xepu_MDHhSjGo,2528
37
- prism_models-0.1.3.dist-info/METADATA,sha256=na_ong7CxPkGX_glT5-dz1onJgvVffUCAA8h8oLJlB0,283
38
- prism_models-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
- prism_models-0.1.3.dist-info/top_level.txt,sha256=UNzqwpLgFYU0EoyB9LiB1jTtc89A1sQ24fSEyNVvgJI,13
40
- prism_models-0.1.3.dist-info/RECORD,,
37
+ prism_models/migration/versions/2025_10_28_1333_b789e61df26a_ad_enum_and_field_added.py,sha256=rdtLBBRs8Sin4IkZZ4veV8cO_n_clFMGyPz5kIgIAwc,1922
38
+ prism_models-0.1.5.dist-info/METADATA,sha256=eFt_2Drt-IxwSPx5np_qi3kIvN4nacb_Lto9CIY8CHw,283
39
+ prism_models-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
+ prism_models-0.1.5.dist-info/top_level.txt,sha256=UNzqwpLgFYU0EoyB9LiB1jTtc89A1sQ24fSEyNVvgJI,13
41
+ prism_models-0.1.5.dist-info/RECORD,,