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 @@
{
".": "1.14.0"
".": "1.15.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: 89
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-fe051300804a0ee8b0212b288cec99c00918e570f4c4b8852f3f4a27afdddd1c.yml
openapi_spec_hash: d2f75f52ceb88b56e4fcf58bf876fe44
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-226200e7cda539eab84341167939339109659a66a48312fd41cb8b15b89ef8e2.yml
openapi_spec_hash: 2097f5fdc617bdbe6a2780daa693a2f8
config_hash: 658c551418df454aa40794f8ac679c18
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.15.0 (2025-10-13)

Full Changelog: [v1.14.0...v1.15.0](https://github.com/knocklabs/knock-python/compare/v1.14.0...v1.15.0)

### Features

* **api:** api update ([f20d9d2](https://github.com/knocklabs/knock-python/commit/f20d9d2b2a07ca1193140f4409d3701fe7bd00df))


### Chores

* **internal:** detect missing future annotations with ruff ([1ca76cb](https://github.com/knocklabs/knock-python/commit/1ca76cb3ed72befb82a5474996c2f4d4c928b205))

## 1.14.0 (2025-10-07)

Full Changelog: [v1.13.0...v1.14.0](https://github.com/knocklabs/knock-python/compare/v1.13.0...v1.14.0)
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "knockapi"
version = "1.14.0"
version = "1.15.0"
description = "The official Python library for the knock API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -224,6 +224,8 @@ select = [
"B",
# remove unused imports
"F401",
# check for missing future annotations
"FA102",
# bare except statements
"E722",
# unused arguments
Expand All @@ -246,6 +248,8 @@ unfixable = [
"T203",
]

extend-safe-fixes = ["FA102"]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"

Expand Down
2 changes: 1 addition & 1 deletion src/knockapi/_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__ = "knockapi"
__version__ = "1.14.0" # x-release-please-version
__version__ = "1.15.0" # x-release-please-version
30 changes: 28 additions & 2 deletions src/knockapi/types/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .._models import BaseModel
from .recipient_reference import RecipientReference

__all__ = ["Message", "Source"]
__all__ = ["Message", "Source", "Channel"]


class Source(BaseModel):
Expand All @@ -31,6 +31,29 @@ class Source(BaseModel):
"""Whether this message was generated from a workflow, broadcast, or guide."""


class Channel(BaseModel):
id: str
"""The unique identifier for the channel."""

created_at: datetime
"""The timestamp of when the channel was created."""

provider: str
"""The ID of the provider that this channel uses to deliver messages."""

type: Literal["email", "in_app", "in_app_feed", "in_app_guide", "sms", "push", "chat", "http"]
"""The type of channel, determining what kind of messages it can send."""

updated_at: datetime
"""The timestamp of when the channel was last updated."""

key: Optional[str] = None
"""Unique identifier for the channel within a project (immutable once created)."""

name: Optional[str] = None
"""The human-readable name of the channel."""


class Message(BaseModel):
id: str
"""The unique identifier for the message."""
Expand All @@ -39,7 +62,7 @@ class Message(BaseModel):
"""The typename of the schema."""

channel_id: str
"""The ID for the channel the message was sent through."""
"""Deprecated, use channel.id instead."""

engagement_statuses: List[Literal["seen", "read", "interacted", "link_clicked", "archived"]]
"""A list of engagement statuses."""
Expand Down Expand Up @@ -72,6 +95,9 @@ class Message(BaseModel):
archived_at: Optional[datetime] = None
"""Timestamp when the message was archived."""

channel: Optional[Channel] = None
"""A configured channel, which is a way to route messages to a provider."""

clicked_at: Optional[datetime] = None
"""Timestamp when the message was clicked."""

Expand Down
Loading