Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.7.0"
".": "0.8.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-37a94929911f4b5944524a51b722bb0eea0b0b167fd79814181f58ed877aa341.yml
openapi_spec_hash: a3d001964480c894a5b6cb9ffa4fa47b
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-68d71a6222b9b76fc00fbf74cb8ac86e5e5a6a65a472969269c912235e3c4cf7.yml
openapi_spec_hash: 8fdc1be6f5741bc4d478af7eddfff24c
config_hash: 3ab31decde29ec61e02db7dcb5313f82
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## 0.8.0 (2026-05-07)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/linq-team/linq-python/compare/v0.7.0...v0.8.0)

### Features

* **chat-service:** expose health_score.updated_at on chat reads + webhooks ([ae5f146](https://github.com/linq-team/linq-python/commit/ae5f1461f6468c48ec88d999d59293e2f364ddd6))
* remove health_score from synapse β€” health_status is the contract ([5ec27d1](https://github.com/linq-team/linq-python/commit/5ec27d1544c85532b8d0344b3108a88cf474db90))


### Bug Fixes

* **chat-service:** stamp health_status from risk-service sync reply ([ff22296](https://github.com/linq-team/linq-python/commit/ff222969e755bd20e352de665b5e7fe47ea99705))


### Chores

* **internal:** reformat pyproject.toml ([3ab97d9](https://github.com/linq-team/linq-python/commit/3ab97d9f5daea08054fba6086ca2c1849289d8ff))


### Documentation

* **openapi:** add HealthStatus [BETA] + deprecate HealthScore ([d4e3711](https://github.com/linq-team/linq-python/commit/d4e37118b71348796cb029bed6f3b831c3996941))
* **openapi:** add named examples to unblock docs OpExample ([6a37d71](https://github.com/linq-team/linq-python/commit/6a37d71c0aa57feefc85810a5012da74153b835f))

## 0.7.0 (2026-04-30)

Full Changelog: [v0.6.0...v0.7.0](https://github.com/linq-team/linq-python/compare/v0.6.0...v0.7.0)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "linq-python"
version = "0.7.0"
version = "0.8.0"
description = "The official Python library for the linq-api-v3 API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -154,7 +154,7 @@ show_error_codes = true
#
# We also exclude our `tests` as mypy doesn't always infer
# types correctly and Pyright will still catch any type errors.
exclude = ['src/linq/_files.py', '_dev/.*.py', 'tests/.*']
exclude = ["src/linq/_files.py", "_dev/.*.py", "tests/.*"]

strict_equality = true
implicit_reexport = true
Expand Down
2 changes: 1 addition & 1 deletion src/linq/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "linq"
__version__ = "0.7.0" # x-release-please-version
__version__ = "0.8.0" # x-release-please-version
51 changes: 35 additions & 16 deletions src/linq/types/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,37 @@

from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal

from .._models import BaseModel
from .shared.chat_handle import ChatHandle
from .shared.service_type import ServiceType

__all__ = ["Chat", "HealthScore"]
__all__ = ["Chat", "HealthStatus"]


class HealthScore(BaseModel):
"""**[BETA]** Health assessment for a chat.
class HealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Higher `score` is healthier.
`null` when a score isn't available yet. Scoring may change during beta.
Always present β€” chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status means and how to react.
"""

reason: str
"""Short summary of what's affecting the score. Empty when the score is 100."""
doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

score: int
"""Health score from 0 to 100. Higher is healthier."""
status: Literal["healthy", "at_risk", "critical", "opted_out"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
and how to react. `doc_url` deep-links to the relevant section.
"""

updated_at: datetime
"""When this status last changed."""


class Chat(BaseModel):
Expand All @@ -45,6 +56,21 @@ class Chat(BaseModel):
participant).
"""

health_status: HealthStatus
"""**[BETA]** Current health for a chat.

Always present β€” chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is
the long-term contract. Each status carries a `doc_url` that deep-links to the
relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status
means and how to react.
"""

is_archived: bool
"""Whether the chat is archived"""

Expand All @@ -54,12 +80,5 @@ class Chat(BaseModel):
updated_at: datetime
"""When the chat was last updated"""

health_score: Optional[HealthScore] = None
"""**[BETA]** Health assessment for a chat.

Higher `score` is healthier. `null` when a score isn't available yet. Scoring
may change during beta.
"""

service: Optional[ServiceType] = None
"""Messaging service type"""
52 changes: 36 additions & 16 deletions src/linq/types/chat_create_response.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal

from .._models import BaseModel
from .chats.sent_message import SentMessage
from .shared.chat_handle import ChatHandle
from .shared.service_type import ServiceType

__all__ = ["ChatCreateResponse", "Chat", "ChatHealthScore"]
__all__ = ["ChatCreateResponse", "Chat", "ChatHealthStatus"]


class ChatHealthScore(BaseModel):
"""**[BETA]** Health assessment for a chat.
class ChatHealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Higher `score` is healthier.
`null` when a score isn't available yet. Scoring may change during beta.
Always present β€” chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status means and how to react.
"""

reason: str
"""Short summary of what's affecting the score. Empty when the score is 100."""
doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

score: int
"""Health score from 0 to 100. Higher is healthier."""
status: Literal["healthy", "at_risk", "critical", "opted_out"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
and how to react. `doc_url` deep-links to the relevant section.
"""

updated_at: datetime
"""When this status last changed."""


class Chat(BaseModel):
Expand All @@ -42,6 +54,21 @@ class Chat(BaseModel):
participant).
"""

health_status: ChatHealthStatus
"""**[BETA]** Current health for a chat.

Always present β€” chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is
the long-term contract. Each status carries a `doc_url` that deep-links to the
relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status
means and how to react.
"""

is_group: bool
"""Whether this is a group chat"""

Expand All @@ -51,13 +78,6 @@ class Chat(BaseModel):
service: ServiceType
"""Messaging service type"""

health_score: Optional[ChatHealthScore] = None
"""**[BETA]** Health assessment for a chat.

Higher `score` is healthier. `null` when a score isn't available yet. Scoring
may change during beta.
"""


class ChatCreateResponse(BaseModel):
"""Response for creating a new chat with an initial message"""
Expand Down
42 changes: 41 additions & 1 deletion src/linq/types/chat_created_webhook_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,38 @@

from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal

from .._models import BaseModel
from .shared.chat_handle import ChatHandle
from .webhook_event_type import WebhookEventType
from .shared.service_type import ServiceType

__all__ = ["ChatCreatedWebhookEvent", "Data"]
__all__ = ["ChatCreatedWebhookEvent", "Data", "DataHealthStatus"]


class DataHealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Always present β€” chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status means and how to react.
"""

doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

status: Literal["healthy", "at_risk", "critical", "opted_out"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
and how to react. `doc_url` deep-links to the relevant section.
"""

updated_at: datetime
"""When this status last changed."""


class Data(BaseModel):
Expand Down Expand Up @@ -37,6 +62,21 @@ class Data(BaseModel):
participant).
"""

health_status: DataHealthStatus
"""**[BETA]** Current health for a chat.

Always present β€” chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is
the long-term contract. Each status carries a `doc_url` that deep-links to the
relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status
means and how to react.
"""

is_group: bool
"""Whether this is a group chat"""

Expand Down
41 changes: 40 additions & 1 deletion src/linq/types/message_edited_webhook_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,31 @@
from .shared.chat_handle import ChatHandle
from .webhook_event_type import WebhookEventType

__all__ = ["MessageEditedWebhookEvent", "Data", "DataChat", "DataPart"]
__all__ = ["MessageEditedWebhookEvent", "Data", "DataChat", "DataChatHealthStatus", "DataPart"]


class DataChatHealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Always present β€” chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status means and how to react.
"""

doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

status: Literal["healthy", "at_risk", "critical", "opted_out"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
and how to react. `doc_url` deep-links to the relevant section.
"""

updated_at: datetime
"""When this status last changed."""


class DataChat(BaseModel):
Expand All @@ -16,6 +40,21 @@ class DataChat(BaseModel):
id: str
"""Chat identifier"""

health_status: DataChatHealthStatus
"""**[BETA]** Current health for a chat.

Always present β€” chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI β€” the enum is
the long-term contract. Each status carries a `doc_url` that deep-links to the
relevant section of the Chat Health guide.

See the [Chat Health guide](/guides/chats/chat-health) for what each status
means and how to react.
"""

is_group: bool
"""Whether this is a group chat"""

Expand Down
Loading
Loading