From dab602cb2f935e9c1bb6b00660adbaecfb001d18 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 19:58:48 +0000 Subject: [PATCH 1/5] feat(api): add health_status fields to PhoneNumber and webhook event --- .stats.yml | 2 +- src/linq/types/phone_number_status_updated_webhook_event.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 50bc9e8..6564cc0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-d7993802c9754a19b91058a03bab7fa59d76d993d8e025b4e046d863566b4a43.yml -openapi_spec_hash: adc3205a32d9469b6eaf6787c7835b84 +openapi_spec_hash: c0481fce4e777c528ec5a8d8024f2c75 config_hash: 7a8a13d75aa72faddd9a7f82f580873c diff --git a/src/linq/types/phone_number_status_updated_webhook_event.py b/src/linq/types/phone_number_status_updated_webhook_event.py index 3c11845..85325f3 100644 --- a/src/linq/types/phone_number_status_updated_webhook_event.py +++ b/src/linq/types/phone_number_status_updated_webhook_event.py @@ -14,12 +14,18 @@ class Data(BaseModel): changed_at: datetime """When the status change occurred""" + new_health_status: Literal["HEALTHY", "AT_RISK", "CRITICAL"] + """The new line health status""" + new_status: Literal["ACTIVE", "FLAGGED"] """The new service status""" phone_number: str """Phone number in E.164 format""" + previous_health_status: Literal["HEALTHY", "AT_RISK", "CRITICAL"] + """The previous line health status""" + previous_status: Literal["ACTIVE", "FLAGGED"] """The previous service status""" From 3467668bdbcee3805c3f2b4a99c93f842454ee8b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 21:00:42 +0000 Subject: [PATCH 2/5] feat(api): add health_status field to phone_number response --- .stats.yml | 2 +- src/linq/types/phone_number_list_response.py | 42 +++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6564cc0..1155143 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-d7993802c9754a19b91058a03bab7fa59d76d993d8e025b4e046d863566b4a43.yml -openapi_spec_hash: c0481fce4e777c528ec5a8d8024f2c75 +openapi_spec_hash: 299feffe33652c398255f9b24b605aa8 config_hash: 7a8a13d75aa72faddd9a7f82f580873c diff --git a/src/linq/types/phone_number_list_response.py b/src/linq/types/phone_number_list_response.py index aa7137e..d09d4f7 100644 --- a/src/linq/types/phone_number_list_response.py +++ b/src/linq/types/phone_number_list_response.py @@ -1,16 +1,56 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List +from typing_extensions import Literal from .._models import BaseModel -__all__ = ["PhoneNumberListResponse", "PhoneNumber"] +__all__ = ["PhoneNumberListResponse", "PhoneNumber", "PhoneNumberHealthStatus"] + + +class PhoneNumberHealthStatus(BaseModel): + """**[BETA]** Current health for a phone line. + + Always present — lines start at `HEALTHY` and may shift based on aggregate engagement and delivery signals across all conversations on the line. + + Unlike chat health, line health does not include `opted_out` — opt-out applies to individual recipients, not the whole line. + + See the [Phone Health guide](/guides/phone-numbers/phone-health) for what each status means and how to react. + """ + + doc_url: str + """Deep-link to the relevant section of the Phone Health guide for this status.""" + + status: Literal["HEALTHY", "AT_RISK", "CRITICAL"] + """Current health of this phone line as assessed by risk-service. + + - `HEALTHY` — No elevated risk detected. + - `AT_RISK` — Elevated risk indicators present; consider reducing send volume or + reviewing messaging patterns. + - `CRITICAL` — High risk; further sending may result in line flagging or + restriction. + + Defaults to `HEALTHY` for lines that have not yet been scored. + """ class PhoneNumber(BaseModel): id: str """Unique identifier for the phone number""" + health_status: PhoneNumberHealthStatus + """**[BETA]** Current health for a phone line. + + Always present — lines start at `HEALTHY` and may shift based on aggregate + engagement and delivery signals across all conversations on the line. + + Unlike chat health, line health does not include `opted_out` — opt-out applies + to individual recipients, not the whole line. + + See the [Phone Health guide](/guides/phone-numbers/phone-health) for what each + status means and how to react. + """ + phone_number: str """Phone number in E.164 format""" From d749ce639968a1d97d78f7ebb7a6e1eac79c919b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 21:44:35 +0000 Subject: [PATCH 3/5] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1155143..010c7cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-d7993802c9754a19b91058a03bab7fa59d76d993d8e025b4e046d863566b4a43.yml -openapi_spec_hash: 299feffe33652c398255f9b24b605aa8 +openapi_spec_hash: 8c895ef7a95b82ce5d01937a09e47b9b config_hash: 7a8a13d75aa72faddd9a7f82f580873c From a763854d1ca795bb1bb996058d97f306aef7b9e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 22:27:22 +0000 Subject: [PATCH 4/5] fix(types): uppercase health_status enum values in chat-related models --- .stats.yml | 4 ++-- src/linq/types/chat.py | 8 ++++---- src/linq/types/chat_create_response.py | 8 ++++---- src/linq/types/chat_created_webhook_event.py | 8 ++++---- src/linq/types/message_edited_webhook_event.py | 8 ++++---- src/linq/types/message_event_v2.py | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 010c7cf..388e0fc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-d7993802c9754a19b91058a03bab7fa59d76d993d8e025b4e046d863566b4a43.yml -openapi_spec_hash: 8c895ef7a95b82ce5d01937a09e47b9b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-b35ddaee2c9dfbc09a716112fcf7c177cb4f86700e09febc020187e5a1b71c37.yml +openapi_spec_hash: cb1d354d0402d78acad35ef9fdbbbc95 config_hash: 7a8a13d75aa72faddd9a7f82f580873c diff --git a/src/linq/types/chat.py b/src/linq/types/chat.py index 75463f9..b697e13 100644 --- a/src/linq/types/chat.py +++ b/src/linq/types/chat.py @@ -14,7 +14,7 @@ class HealthStatus(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. + 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. @@ -24,7 +24,7 @@ class HealthStatus(BaseModel): 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"] + 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 @@ -59,8 +59,8 @@ class Chat(BaseModel): 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 + 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 diff --git a/src/linq/types/chat_create_response.py b/src/linq/types/chat_create_response.py index 19f3a10..b2ef111 100644 --- a/src/linq/types/chat_create_response.py +++ b/src/linq/types/chat_create_response.py @@ -15,7 +15,7 @@ class ChatHealthStatus(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. + 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. @@ -25,7 +25,7 @@ class ChatHealthStatus(BaseModel): 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"] + 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 @@ -57,8 +57,8 @@ class Chat(BaseModel): 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 + 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 diff --git a/src/linq/types/chat_created_webhook_event.py b/src/linq/types/chat_created_webhook_event.py index 0ac3883..ae410f7 100644 --- a/src/linq/types/chat_created_webhook_event.py +++ b/src/linq/types/chat_created_webhook_event.py @@ -15,7 +15,7 @@ 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. + 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. @@ -25,7 +25,7 @@ class DataHealthStatus(BaseModel): 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"] + 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 @@ -65,8 +65,8 @@ class Data(BaseModel): 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 + 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 diff --git a/src/linq/types/message_edited_webhook_event.py b/src/linq/types/message_edited_webhook_event.py index 1202081..c7e098a 100644 --- a/src/linq/types/message_edited_webhook_event.py +++ b/src/linq/types/message_edited_webhook_event.py @@ -13,7 +13,7 @@ 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. + 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. @@ -23,7 +23,7 @@ class DataChatHealthStatus(BaseModel): 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"] + 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 @@ -43,8 +43,8 @@ class DataChat(BaseModel): 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 + 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 diff --git a/src/linq/types/message_event_v2.py b/src/linq/types/message_event_v2.py index 28ba778..97daca0 100644 --- a/src/linq/types/message_event_v2.py +++ b/src/linq/types/message_event_v2.py @@ -18,7 +18,7 @@ class ChatHealthStatus(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. + 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. @@ -28,7 +28,7 @@ class ChatHealthStatus(BaseModel): 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"] + 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 @@ -48,8 +48,8 @@ class Chat(BaseModel): 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 + 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 From ed7ca8ab313fa3adfb762138c6a2f043848c73ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 22:27:39 +0000 Subject: [PATCH 5/5] release: 0.10.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ pyproject.toml | 2 +- src/linq/_version.py | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6d78745..091cfb1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.9.0" + ".": "0.10.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 44414a9..a17bfe6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.10.0 (2026-05-15) + +Full Changelog: [v0.9.0...v0.10.0](https://github.com/linq-team/linq-python/compare/v0.9.0...v0.10.0) + +### Features + +* **api:** add health_status field to phone_number response ([3467668](https://github.com/linq-team/linq-python/commit/3467668bdbcee3805c3f2b4a99c93f842454ee8b)) +* **api:** add health_status fields to PhoneNumber and webhook event ([dab602c](https://github.com/linq-team/linq-python/commit/dab602cb2f935e9c1bb6b00660adbaecfb001d18)) + + +### Bug Fixes + +* **types:** uppercase health_status enum values in chat-related models ([a763854](https://github.com/linq-team/linq-python/commit/a763854d1ca795bb1bb996058d97f306aef7b9e7)) + ## 0.9.0 (2026-05-13) Full Changelog: [v0.8.0...v0.9.0](https://github.com/linq-team/linq-python/compare/v0.8.0...v0.9.0) diff --git a/pyproject.toml b/pyproject.toml index cc4d17f..629f0ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "linq-python" -version = "0.9.0" +version = "0.10.0" description = "The official Python library for the linq-api-v3 API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/linq/_version.py b/src/linq/_version.py index 11cdca6..a861904 100644 --- a/src/linq/_version.py +++ b/src/linq/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "linq" -__version__ = "0.9.0" # x-release-please-version +__version__ = "0.10.0" # x-release-please-version