diff --git a/.release-please-manifest.json b/.release-please-manifest.json index de44c40..69eb19a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.19.0" + ".": "1.20.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 84e29ab..faedbdb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-ce72fff9b44a47ab7e0425e496f09c61cde5b4258feb20cb5dbef6fa615a57e4.yml -openapi_spec_hash: 3054ea299cf43dc89b68266818fecfe4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-b4f3f8094215f4027ce5c50b44b4ba289b96bfe071deba53497eac31f6bd44ec.yml +openapi_spec_hash: da078194fc3bbcae05af20ad6dee4adc config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/CHANGELOG.md b/CHANGELOG.md index 8228415..d34a6c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## 1.20.0 (2025-12-08) + +Full Changelog: [v1.19.0...v1.20.0](https://github.com/knocklabs/knock-python/compare/v1.19.0...v1.20.0) + +### Features + +* **api:** api update ([47806ce](https://github.com/knocklabs/knock-python/commit/47806ce73d09bedb21d6ded55c68a5401d50abbe)) + + +### Bug Fixes + +* ensure streams are always closed ([007d337](https://github.com/knocklabs/knock-python/commit/007d337f07c9de1883d0580209aa743384e24925)) +* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([ab076a9](https://github.com/knocklabs/knock-python/commit/ab076a9225fe2b2d013603b7136c7a76ea0f3300)) + + +### Chores + +* add missing docstrings ([dad2da6](https://github.com/knocklabs/knock-python/commit/dad2da6573ee829b4ac6c44d480e7becd19a25e0)) +* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([227e51f](https://github.com/knocklabs/knock-python/commit/227e51fa9f367e8aa67f9fe9ce96c844c3925b9e)) +* **docs:** use environment variables for authentication in code snippets ([89f2835](https://github.com/knocklabs/knock-python/commit/89f283596c21f14a316593dd8542c0ae8b872afc)) +* **internal:** codegen related update ([98724ee](https://github.com/knocklabs/knock-python/commit/98724ee95eeaf2dffd5e725b212d223b9db1096a)) +* update lockfile ([48e85d7](https://github.com/knocklabs/knock-python/commit/48e85d7d0cdd44f342abd95e1517dc4f51f1d67d)) + ## 1.19.0 (2025-11-20) Full Changelog: [v1.18.1...v1.19.0](https://github.com/knocklabs/knock-python/compare/v1.18.1...v1.19.0) diff --git a/README.md b/README.md index b3962b5..169ec8e 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ pip install knockapi[aiohttp] Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: ```python +import os import asyncio from knockapi import DefaultAioHttpClient from knockapi import AsyncKnock @@ -94,7 +95,7 @@ from knockapi import AsyncKnock async def main() -> None: async with AsyncKnock( - api_key="My API Key", + api_key=os.environ.get("KNOCK_API_KEY"), # This is the default and can be omitted http_client=DefaultAioHttpClient(), ) as client: response = await client.workflows.trigger( diff --git a/pyproject.toml b/pyproject.toml index ba8f9b0..d593fac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,22 @@ [project] name = "knockapi" -version = "1.19.0" +version = "1.20.0" description = "The official Python library for the knock API" dynamic = ["readme"] license = "Apache-2.0" authors = [ { name = "Knock", email = "support@knock.app" }, ] + dependencies = [ - "httpx>=0.23.0, <1", - "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", - "anyio>=3.5.0, <5", - "distro>=1.7.0, <2", - "sniffio", + "httpx>=0.23.0, <1", + "pydantic>=1.9.0, <3", + "typing-extensions>=4.10, <5", + "anyio>=3.5.0, <5", + "distro>=1.7.0, <2", + "sniffio", ] + requires-python = ">= 3.9" classifiers = [ "Typing :: Typed", @@ -24,6 +26,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", @@ -45,7 +48,7 @@ managed = true # version pins are in requirements-dev.lock dev-dependencies = [ "pyright==1.1.399", - "mypy", + "mypy==1.17", "respx", "pytest", "pytest-asyncio", diff --git a/requirements-dev.lock b/requirements-dev.lock index 7348fc4..fc891d5 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,40 +12,45 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via knockapi -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via knockapi -argcomplete==3.1.2 +argcomplete==3.6.3 # via nox async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 + # via nox +backports-asyncio-runner==1.2.0 + # via pytest-asyncio +certifi==2025.11.12 # via httpcore # via httpx -colorlog==6.7.0 +colorlog==6.10.1 + # via nox +dependency-groups==1.3.1 # via nox -dirty-equals==0.6.0 -distlib==0.3.7 +dirty-equals==0.11 +distlib==0.4.0 # via virtualenv -distro==1.8.0 +distro==1.9.0 # via knockapi -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio # via pytest -execnet==2.1.1 +execnet==2.1.2 # via pytest-xdist -filelock==3.12.4 +filelock==3.19.1 # via virtualenv -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -58,80 +63,87 @@ httpx==0.28.1 # via respx httpx-aiohttp==0.1.9 # via knockapi -idna==3.4 +humanize==4.13.0 + # via nox +idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==7.0.0 -iniconfig==2.0.0 +importlib-metadata==8.7.0 +iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl -mypy==1.14.1 -mypy-extensions==1.0.0 +mypy==1.17.0 +mypy-extensions==1.1.0 # via mypy -nodeenv==1.8.0 +nodeenv==1.9.1 # via pyright -nox==2023.4.22 -packaging==23.2 +nox==2025.11.12 +packaging==25.0 + # via dependency-groups # via nox # via pytest -platformdirs==3.11.0 +pathspec==0.12.1 + # via mypy +platformdirs==4.4.0 # via virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via pytest -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via knockapi -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic -pygments==2.18.0 +pygments==2.19.2 + # via pytest # via rich pyright==1.1.399 -pytest==8.3.3 +pytest==8.4.2 # via pytest-asyncio # via pytest-xdist -pytest-asyncio==0.24.0 -pytest-xdist==3.7.0 -python-dateutil==2.8.2 +pytest-asyncio==1.2.0 +pytest-xdist==3.8.0 +python-dateutil==2.9.0.post0 # via time-machine -pytz==2023.3.post1 - # via dirty-equals respx==0.22.0 -rich==13.7.1 -ruff==0.9.4 -setuptools==68.2.2 - # via nodeenv -six==1.16.0 +rich==14.2.0 +ruff==0.14.7 +six==1.17.0 # via python-dateutil -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via knockapi -time-machine==2.9.0 -tomli==2.0.2 +time-machine==2.19.0 +tomli==2.3.0 + # via dependency-groups # via mypy + # via nox # via pytest -typing-extensions==4.12.2 +typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via knockapi # via multidict # via mypy # via pydantic # via pydantic-core # via pyright + # via pytest-asyncio # via typing-inspection -typing-inspection==0.4.1 + # via virtualenv +typing-inspection==0.4.2 # via pydantic -virtualenv==20.24.5 +virtualenv==20.35.4 # via nox -yarl==1.20.0 +yarl==1.22.0 # via aiohttp -zipp==3.17.0 +zipp==3.23.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index e35bc1f..20d4ecf 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,28 +12,28 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via knockapi -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via knockapi async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 +certifi==2025.11.12 # via httpcore # via httpx -distro==1.8.0 +distro==1.9.0 # via knockapi -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -45,31 +45,32 @@ httpx==0.28.1 # via knockapi httpx-aiohttp==0.1.9 # via knockapi -idna==3.4 +idna==3.11 # via anyio # via httpx # via yarl -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via knockapi -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via knockapi -typing-extensions==4.12.2 +typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via knockapi # via multidict # via pydantic # via pydantic-core # via typing-inspection -typing-inspection==0.4.1 +typing-inspection==0.4.2 # via pydantic -yarl==1.20.0 +yarl==1.22.0 # via aiohttp diff --git a/src/knockapi/_streaming.py b/src/knockapi/_streaming.py index 01eb112..5a41eae 100644 --- a/src/knockapi/_streaming.py +++ b/src/knockapi/_streaming.py @@ -54,11 +54,12 @@ def __stream__(self) -> Iterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - response.close() + try: + for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + response.close() def __enter__(self) -> Self: return self @@ -117,11 +118,12 @@ async def __stream__(self) -> AsyncIterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - async for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - await response.aclose() + try: + async for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + await response.aclose() async def __aenter__(self) -> Self: return self diff --git a/src/knockapi/_types.py b/src/knockapi/_types.py index da9efb8..9d73533 100644 --- a/src/knockapi/_types.py +++ b/src/knockapi/_types.py @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False): if TYPE_CHECKING: # This works because str.__contains__ does not accept object (either in typeshed or at runtime) # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + # + # Note: index() and count() methods are intentionally omitted to allow pyright to properly + # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr. class SequenceNotStr(Protocol[_T_co]): @overload def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... - def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... else: # just point this to a normal `Sequence` at runtime to avoid having to special case diff --git a/src/knockapi/_version.py b/src/knockapi/_version.py index 0abf59d..2b28f91 100644 --- a/src/knockapi/_version.py +++ b/src/knockapi/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "knockapi" -__version__ = "1.19.0" # x-release-please-version +__version__ = "1.20.0" # x-release-please-version diff --git a/src/knockapi/types/activity.py b/src/knockapi/types/activity.py index 4f1d6e3..9108451 100644 --- a/src/knockapi/types/activity.py +++ b/src/knockapi/types/activity.py @@ -12,6 +12,11 @@ class Activity(BaseModel): + """An activity associated with a workflow trigger request. + + Messages produced after a [batch step](/designing-workflows/batch-function) can be associated with one or more activities. Non-batched messages will always be associated with a single activity. + """ + id: Optional[str] = None """Unique identifier for the activity.""" diff --git a/src/knockapi/types/audience_add_members_params.py b/src/knockapi/types/audience_add_members_params.py index 0c23568..6461285 100644 --- a/src/knockapi/types/audience_add_members_params.py +++ b/src/knockapi/types/audience_add_members_params.py @@ -14,11 +14,15 @@ class AudienceAddMembersParams(TypedDict, total=False): class MemberUser(TypedDict, total=False): + """An object containing the user's ID.""" + id: str """The unique identifier of the user.""" class Member(TypedDict, total=False): + """An audience member.""" + user: Required[MemberUser] """An object containing the user's ID.""" diff --git a/src/knockapi/types/audience_list_members_response.py b/src/knockapi/types/audience_list_members_response.py index fc2da4a..049dbab 100644 --- a/src/knockapi/types/audience_list_members_response.py +++ b/src/knockapi/types/audience_list_members_response.py @@ -10,6 +10,8 @@ class AudienceListMembersResponse(BaseModel): + """A paginated list of audience members.""" + entries: List[AudienceMember] """A list of audience members.""" diff --git a/src/knockapi/types/audience_member.py b/src/knockapi/types/audience_member.py index d7eac53..6c6120e 100644 --- a/src/knockapi/types/audience_member.py +++ b/src/knockapi/types/audience_member.py @@ -12,6 +12,8 @@ class AudienceMember(BaseModel): + """An audience member.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" diff --git a/src/knockapi/types/audience_remove_members_params.py b/src/knockapi/types/audience_remove_members_params.py index 393c10c..d33f0a3 100644 --- a/src/knockapi/types/audience_remove_members_params.py +++ b/src/knockapi/types/audience_remove_members_params.py @@ -14,11 +14,15 @@ class AudienceRemoveMembersParams(TypedDict, total=False): class MemberUser(TypedDict, total=False): + """An object containing the user's ID.""" + id: str """The unique identifier of the user.""" class Member(TypedDict, total=False): + """An audience member.""" + user: Required[MemberUser] """An object containing the user's ID.""" diff --git a/src/knockapi/types/bulk_operation.py b/src/knockapi/types/bulk_operation.py index 58d6e6b..0c3aef1 100644 --- a/src/knockapi/types/bulk_operation.py +++ b/src/knockapi/types/bulk_operation.py @@ -20,6 +20,8 @@ class ErrorItem(BaseModel): class BulkOperation(BaseModel): + """A bulk operation entity.""" + id: str """Unique identifier for the bulk operation.""" diff --git a/src/knockapi/types/inline_identify_user_request_param.py b/src/knockapi/types/inline_identify_user_request_param.py index c18cc0b..9254781 100644 --- a/src/knockapi/types/inline_identify_user_request_param.py +++ b/src/knockapi/types/inline_identify_user_request_param.py @@ -14,6 +14,11 @@ class InlineIdentifyUserRequestParamTyped(TypedDict, total=False): + """A set of parameters to inline-identify a user with. + + Inline identifying the user will ensure that the user is available before the request is executed in Knock. It will perform an upsert for the user you're supplying, replacing any properties specified. + """ + id: Required[str] """The unique identifier of the user.""" diff --git a/src/knockapi/types/inline_object_request_param.py b/src/knockapi/types/inline_object_request_param.py index 59e4d59..de8a0ec 100644 --- a/src/knockapi/types/inline_object_request_param.py +++ b/src/knockapi/types/inline_object_request_param.py @@ -14,6 +14,8 @@ class InlineObjectRequestParamTyped(TypedDict, total=False): + """A custom [Object](/concepts/objects) entity which belongs to a collection.""" + id: Required[str] """Unique identifier for the object.""" diff --git a/src/knockapi/types/message.py b/src/knockapi/types/message.py index dc8a8bc..b368ffd 100644 --- a/src/knockapi/types/message.py +++ b/src/knockapi/types/message.py @@ -13,6 +13,8 @@ class Source(BaseModel): + """The workflow or guide that triggered the message.""" + api_typename: str = FieldInfo(alias="__typename") categories: List[str] @@ -30,8 +32,23 @@ class Source(BaseModel): type: Optional[Literal["broadcast", "workflow", "guide"]] = None """Whether this message was generated from a workflow, broadcast, or guide.""" + workflow_recipient_run_id: Optional[str] = None + """The unique identifier for the workflow recipient run that generated this + message. + + Only present for workflow/broadcast messages. + """ + + workflow_run_id: Optional[str] = None + """The unique identifier for the workflow run that generated this message. + + Only present for workflow/broadcast messages. + """ + class Channel(BaseModel): + """A configured channel, which is a way to route messages to a provider.""" + id: str """The unique identifier for the channel.""" @@ -55,6 +72,10 @@ class Channel(BaseModel): class Message(BaseModel): + """ + Represents a single message that was generated by a workflow for a given channel. + """ + id: str """The unique identifier for the message.""" diff --git a/src/knockapi/types/message_delivery_log.py b/src/knockapi/types/message_delivery_log.py index 49273a6..a27ceed 100644 --- a/src/knockapi/types/message_delivery_log.py +++ b/src/knockapi/types/message_delivery_log.py @@ -11,6 +11,8 @@ class Request(BaseModel): + """A message delivery log request.""" + body: Union[str, Dict[str, object], None] = None """The body content that was sent with the request.""" @@ -31,6 +33,8 @@ class Request(BaseModel): class Response(BaseModel): + """A message delivery log response.""" + body: Union[str, Dict[str, object], None] = None """The body content that was received with the response.""" @@ -42,6 +46,10 @@ class Response(BaseModel): class MessageDeliveryLog(BaseModel): + """ + A message delivery log contains a `request` from Knock to a downstream provider and the `response` that was returned. + """ + id: str """The unique identifier for the message delivery log.""" diff --git a/src/knockapi/types/message_event.py b/src/knockapi/types/message_event.py index dba46e2..0bf16aa 100644 --- a/src/knockapi/types/message_event.py +++ b/src/knockapi/types/message_event.py @@ -13,6 +13,11 @@ class MessageEvent(BaseModel): + """A message event. + + Occurs when a message [delivery or engagement status](/send-notifications/message-statuses) changes. + """ + id: str """The unique identifier for the message event.""" diff --git a/src/knockapi/types/message_get_content_response.py b/src/knockapi/types/message_get_content_response.py index c22339a..8433cf0 100644 --- a/src/knockapi/types/message_get_content_response.py +++ b/src/knockapi/types/message_get_content_response.py @@ -26,6 +26,8 @@ class DataMessageEmailContent(BaseModel): + """The content of an email message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -55,6 +57,8 @@ class DataMessageEmailContent(BaseModel): class DataMessageSMSContent(BaseModel): + """The content of an SMS message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -66,6 +70,8 @@ class DataMessageSMSContent(BaseModel): class DataMessagePushContent(BaseModel): + """Push channel data.""" + token: str """The device token to send the push notification to.""" @@ -83,6 +89,8 @@ class DataMessagePushContent(BaseModel): class DataMessageChatContentTemplateBlock(BaseModel): + """A block in a message in a chat.""" + content: str """The actual content of the block.""" @@ -94,6 +102,8 @@ class DataMessageChatContentTemplateBlock(BaseModel): class DataMessageChatContentTemplate(BaseModel): + """The template structure for the chat message.""" + blocks: Optional[List[DataMessageChatContentTemplateBlock]] = None """The blocks of the message in a chat.""" @@ -105,6 +115,8 @@ class DataMessageChatContentTemplate(BaseModel): class DataMessageChatContent(BaseModel): + """The content of a chat message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -119,6 +131,8 @@ class DataMessageChatContent(BaseModel): class DataMessageInAppFeedContentBlockMessageInAppFeedContentBlock(BaseModel): + """A block in a message in an app feed.""" + content: str """The content of the block in a message in an app feed.""" @@ -133,6 +147,8 @@ class DataMessageInAppFeedContentBlockMessageInAppFeedContentBlock(BaseModel): class DataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlockButton(BaseModel): + """A button in an in app feed message.""" + action: str """The action to take when the button is clicked.""" @@ -144,6 +160,8 @@ class DataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlockButton(BaseM class DataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlock(BaseModel): + """A button set block in a message in an app feed.""" + buttons: List[DataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlockButton] """A list of buttons in an in app feed message.""" @@ -161,6 +179,8 @@ class DataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlock(BaseModel): class DataMessageInAppFeedContent(BaseModel): + """The content of an in-app feed message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -178,6 +198,8 @@ class DataMessageInAppFeedContent(BaseModel): class MessageGetContentResponse(BaseModel): + """The content of a message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" diff --git a/src/knockapi/types/messages/batch_get_content_response.py b/src/knockapi/types/messages/batch_get_content_response.py index 1205f7a..b88ebc1 100644 --- a/src/knockapi/types/messages/batch_get_content_response.py +++ b/src/knockapi/types/messages/batch_get_content_response.py @@ -27,6 +27,8 @@ class BatchGetContentResponseItemDataMessageEmailContent(BaseModel): + """The content of an email message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -56,6 +58,8 @@ class BatchGetContentResponseItemDataMessageEmailContent(BaseModel): class BatchGetContentResponseItemDataMessageSMSContent(BaseModel): + """The content of an SMS message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -67,6 +71,8 @@ class BatchGetContentResponseItemDataMessageSMSContent(BaseModel): class BatchGetContentResponseItemDataMessagePushContent(BaseModel): + """Push channel data.""" + token: str """The device token to send the push notification to.""" @@ -84,6 +90,8 @@ class BatchGetContentResponseItemDataMessagePushContent(BaseModel): class BatchGetContentResponseItemDataMessageChatContentTemplateBlock(BaseModel): + """A block in a message in a chat.""" + content: str """The actual content of the block.""" @@ -95,6 +103,8 @@ class BatchGetContentResponseItemDataMessageChatContentTemplateBlock(BaseModel): class BatchGetContentResponseItemDataMessageChatContentTemplate(BaseModel): + """The template structure for the chat message.""" + blocks: Optional[List[BatchGetContentResponseItemDataMessageChatContentTemplateBlock]] = None """The blocks of the message in a chat.""" @@ -106,6 +116,8 @@ class BatchGetContentResponseItemDataMessageChatContentTemplate(BaseModel): class BatchGetContentResponseItemDataMessageChatContent(BaseModel): + """The content of a chat message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -120,6 +132,8 @@ class BatchGetContentResponseItemDataMessageChatContent(BaseModel): class BatchGetContentResponseItemDataMessageInAppFeedContentBlockMessageInAppFeedContentBlock(BaseModel): + """A block in a message in an app feed.""" + content: str """The content of the block in a message in an app feed.""" @@ -134,6 +148,8 @@ class BatchGetContentResponseItemDataMessageInAppFeedContentBlockMessageInAppFee class BatchGetContentResponseItemDataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlockButton(BaseModel): + """A button in an in app feed message.""" + action: str """The action to take when the button is clicked.""" @@ -145,6 +161,8 @@ class BatchGetContentResponseItemDataMessageInAppFeedContentBlockMessageInAppFee class BatchGetContentResponseItemDataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlock(BaseModel): + """A button set block in a message in an app feed.""" + buttons: List[BatchGetContentResponseItemDataMessageInAppFeedContentBlockMessageInAppFeedButtonSetBlockButton] """A list of buttons in an in app feed message.""" @@ -162,6 +180,8 @@ class BatchGetContentResponseItemDataMessageInAppFeedContentBlockMessageInAppFee class BatchGetContentResponseItemDataMessageInAppFeedContent(BaseModel): + """The content of an in-app feed message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -179,6 +199,8 @@ class BatchGetContentResponseItemDataMessageInAppFeedContent(BaseModel): class BatchGetContentResponseItem(BaseModel): + """The content of a message.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" diff --git a/src/knockapi/types/object.py b/src/knockapi/types/object.py index 3d2ed63..8148f7a 100644 --- a/src/knockapi/types/object.py +++ b/src/knockapi/types/object.py @@ -11,6 +11,8 @@ class Object(BaseModel): + """A custom [Object](/concepts/objects) entity which belongs to a collection.""" + id: str """Unique identifier for the object.""" diff --git a/src/knockapi/types/object_list_subscriptions_params.py b/src/knockapi/types/object_list_subscriptions_params.py index f8a45fc..ea79c1e 100644 --- a/src/knockapi/types/object_list_subscriptions_params.py +++ b/src/knockapi/types/object_list_subscriptions_params.py @@ -39,6 +39,8 @@ class ObjectListSubscriptionsParams(TypedDict, total=False): class Object(TypedDict, total=False): + """A reference to a recipient object.""" + id: str """An identifier for the recipient object.""" diff --git a/src/knockapi/types/object_set_preferences_params.py b/src/knockapi/types/object_set_preferences_params.py index ce0037b..7bfa77e 100644 --- a/src/knockapi/types/object_set_preferences_params.py +++ b/src/knockapi/types/object_set_preferences_params.py @@ -59,6 +59,10 @@ class ObjectSetPreferencesParams(TypedDict, total=False): class CategoriesPreferenceSetWorkflowCategorySettingObject(TypedDict, total=False): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypesParam] """Channel type preferences.""" @@ -77,6 +81,10 @@ class CategoriesPreferenceSetWorkflowCategorySettingObject(TypedDict, total=Fals class WorkflowsPreferenceSetWorkflowCategorySettingObject(TypedDict, total=False): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypesParam] """Channel type preferences.""" diff --git a/src/knockapi/types/objects/bulk_add_subscriptions_params.py b/src/knockapi/types/objects/bulk_add_subscriptions_params.py index cb4584e..9f137d7 100644 --- a/src/knockapi/types/objects/bulk_add_subscriptions_params.py +++ b/src/knockapi/types/objects/bulk_add_subscriptions_params.py @@ -17,6 +17,8 @@ class BulkAddSubscriptionsParams(TypedDict, total=False): class Subscription(TypedDict, total=False): + """A list of subscriptions. 1 subscribed-to id, and N subscriber recipients.""" + id: Required[str] """Unique identifier for the object.""" diff --git a/src/knockapi/types/objects/bulk_delete_subscriptions_params.py b/src/knockapi/types/objects/bulk_delete_subscriptions_params.py index ab33214..08c4c54 100644 --- a/src/knockapi/types/objects/bulk_delete_subscriptions_params.py +++ b/src/knockapi/types/objects/bulk_delete_subscriptions_params.py @@ -17,6 +17,8 @@ class BulkDeleteSubscriptionsParams(TypedDict, total=False): class Subscription(TypedDict, total=False): + """A list of subscriptions. 1 subscribed-to id, and N subscriber recipients.""" + id: Required[str] """Unique identifier for the object.""" diff --git a/src/knockapi/types/objects/bulk_set_params.py b/src/knockapi/types/objects/bulk_set_params.py index cebd5f8..27a8da0 100644 --- a/src/knockapi/types/objects/bulk_set_params.py +++ b/src/knockapi/types/objects/bulk_set_params.py @@ -19,6 +19,8 @@ class BulkSetParams(TypedDict, total=False): class ObjectTyped(TypedDict, total=False): + """A custom [Object](/concepts/objects) entity which belongs to a collection.""" + id: Required[str] """Unique identifier for the object.""" diff --git a/src/knockapi/types/providers/ms_team_check_auth_response.py b/src/knockapi/types/providers/ms_team_check_auth_response.py index 154fde3..c1d5e90 100644 --- a/src/knockapi/types/providers/ms_team_check_auth_response.py +++ b/src/knockapi/types/providers/ms_team_check_auth_response.py @@ -8,6 +8,8 @@ class Connection(BaseModel): + """A Microsoft Teams connection object.""" + ok: bool """Whether the Microsoft Teams connection is valid.""" @@ -16,5 +18,7 @@ class Connection(BaseModel): class MsTeamCheckAuthResponse(BaseModel): + """The response from a Microsoft Teams auth check request.""" + connection: Connection """A Microsoft Teams connection object.""" diff --git a/src/knockapi/types/providers/ms_team_list_channels_response.py b/src/knockapi/types/providers/ms_team_list_channels_response.py index 5d4ad75..c7d7451 100644 --- a/src/knockapi/types/providers/ms_team_list_channels_response.py +++ b/src/knockapi/types/providers/ms_team_list_channels_response.py @@ -30,5 +30,9 @@ class MsTeamsChannel(BaseModel): class MsTeamListChannelsResponse(BaseModel): + """ + The response from a Microsoft Teams provider request, containing a list of channels. + """ + ms_teams_channels: List[MsTeamsChannel] """List of Microsoft Teams channels.""" diff --git a/src/knockapi/types/providers/ms_team_revoke_access_response.py b/src/knockapi/types/providers/ms_team_revoke_access_response.py index c9c8a1b..9281e78 100644 --- a/src/knockapi/types/providers/ms_team_revoke_access_response.py +++ b/src/knockapi/types/providers/ms_team_revoke_access_response.py @@ -8,5 +8,7 @@ class MsTeamRevokeAccessResponse(BaseModel): + """A response indicating the operation was successful.""" + ok: Optional[str] = None """OK response.""" diff --git a/src/knockapi/types/providers/slack_check_auth_response.py b/src/knockapi/types/providers/slack_check_auth_response.py index 13b705c..2d07ca1 100644 --- a/src/knockapi/types/providers/slack_check_auth_response.py +++ b/src/knockapi/types/providers/slack_check_auth_response.py @@ -8,6 +8,8 @@ class Connection(BaseModel): + """A Slack connection object.""" + ok: bool """Whether the Slack connection is valid.""" @@ -16,5 +18,7 @@ class Connection(BaseModel): class SlackCheckAuthResponse(BaseModel): + """The response from a Slack auth check request.""" + connection: Connection """A Slack connection object.""" diff --git a/src/knockapi/types/providers/slack_list_channels_response.py b/src/knockapi/types/providers/slack_list_channels_response.py index 35376d2..5d374b5 100644 --- a/src/knockapi/types/providers/slack_list_channels_response.py +++ b/src/knockapi/types/providers/slack_list_channels_response.py @@ -6,6 +6,8 @@ class SlackListChannelsResponse(BaseModel): + """A Slack channel.""" + id: str """A Slack channel ID from the Slack provider.""" diff --git a/src/knockapi/types/providers/slack_revoke_access_response.py b/src/knockapi/types/providers/slack_revoke_access_response.py index 613697b..ad0479d 100644 --- a/src/knockapi/types/providers/slack_revoke_access_response.py +++ b/src/knockapi/types/providers/slack_revoke_access_response.py @@ -8,5 +8,7 @@ class SlackRevokeAccessResponse(BaseModel): + """A response indicating the operation was successful.""" + ok: Optional[str] = None """OK response.""" diff --git a/src/knockapi/types/recipient_reference.py b/src/knockapi/types/recipient_reference.py index 1a85c86..fd4d4c8 100644 --- a/src/knockapi/types/recipient_reference.py +++ b/src/knockapi/types/recipient_reference.py @@ -9,6 +9,8 @@ class ObjectReference(BaseModel): + """A reference to a recipient object.""" + id: Optional[str] = None """An identifier for the recipient object.""" diff --git a/src/knockapi/types/recipient_reference_param.py b/src/knockapi/types/recipient_reference_param.py index ba1e3ae..dec0f9e 100644 --- a/src/knockapi/types/recipient_reference_param.py +++ b/src/knockapi/types/recipient_reference_param.py @@ -9,6 +9,8 @@ class ObjectReference(TypedDict, total=False): + """A reference to a recipient object.""" + id: str """An identifier for the recipient object.""" diff --git a/src/knockapi/types/recipients/aws_sns_push_channel_data_devices_only_param.py b/src/knockapi/types/recipients/aws_sns_push_channel_data_devices_only_param.py index cdeb803..14eb418 100644 --- a/src/knockapi/types/recipients/aws_sns_push_channel_data_devices_only_param.py +++ b/src/knockapi/types/recipients/aws_sns_push_channel_data_devices_only_param.py @@ -33,6 +33,8 @@ class Device(TypedDict, total=False): class AwsSnsPushChannelDataDevicesOnlyParam(TypedDict, total=False): + """AWS SNS push channel data.""" + devices: Required[Iterable[Device]] """A list of devices. diff --git a/src/knockapi/types/recipients/aws_sns_push_channel_data_target_arns_only_param.py b/src/knockapi/types/recipients/aws_sns_push_channel_data_target_arns_only_param.py index 53f9172..7a34dd2 100644 --- a/src/knockapi/types/recipients/aws_sns_push_channel_data_target_arns_only_param.py +++ b/src/knockapi/types/recipients/aws_sns_push_channel_data_target_arns_only_param.py @@ -10,6 +10,8 @@ class AwsSnsPushChannelDataTargetArnsOnlyParam(TypedDict, total=False): + """AWS SNS push channel data.""" + target_arns: Required[SequenceNotStr[str]] """A list of platform endpoint ARNs. diff --git a/src/knockapi/types/recipients/channel_data.py b/src/knockapi/types/recipients/channel_data.py index b9b9a37..6bf8398 100644 --- a/src/knockapi/types/recipients/channel_data.py +++ b/src/knockapi/types/recipients/channel_data.py @@ -42,6 +42,8 @@ class DataPushChannelDataFullDevice(BaseModel): class DataPushChannelDataFull(BaseModel): + """Push channel data.""" + devices: List[DataPushChannelDataFullDevice] """A list of devices. @@ -77,6 +79,8 @@ class DataAwssnsPushChannelDataFullDevice(BaseModel): class DataAwssnsPushChannelDataFull(BaseModel): + """AWS SNS push channel data.""" + devices: List[DataAwssnsPushChannelDataFullDevice] """A list of devices. @@ -102,6 +106,8 @@ class DataAwssnsPushChannelDataFull(BaseModel): class ChannelData(BaseModel): + """Channel data for a given channel type.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" diff --git a/src/knockapi/types/recipients/discord_channel_data.py b/src/knockapi/types/recipients/discord_channel_data.py index 0425a8f..cc00dfc 100644 --- a/src/knockapi/types/recipients/discord_channel_data.py +++ b/src/knockapi/types/recipients/discord_channel_data.py @@ -15,16 +15,22 @@ class ConnectionDiscordChannelConnection(BaseModel): + """Discord channel connection.""" + channel_id: str """Discord channel ID.""" class ConnectionDiscordIncomingWebhookConnectionIncomingWebhook(BaseModel): + """Discord incoming webhook object.""" + url: str """Incoming webhook URL.""" class ConnectionDiscordIncomingWebhookConnection(BaseModel): + """Discord incoming webhook connection.""" + incoming_webhook: ConnectionDiscordIncomingWebhookConnectionIncomingWebhook """Discord incoming webhook object.""" @@ -33,5 +39,7 @@ class ConnectionDiscordIncomingWebhookConnection(BaseModel): class DiscordChannelData(BaseModel): + """Discord channel data.""" + connections: List[Connection] """List of Discord channel connections.""" diff --git a/src/knockapi/types/recipients/discord_channel_data_param.py b/src/knockapi/types/recipients/discord_channel_data_param.py index f621934..f4664a8 100644 --- a/src/knockapi/types/recipients/discord_channel_data_param.py +++ b/src/knockapi/types/recipients/discord_channel_data_param.py @@ -15,16 +15,22 @@ class ConnectionDiscordChannelConnection(TypedDict, total=False): + """Discord channel connection.""" + channel_id: Required[str] """Discord channel ID.""" class ConnectionDiscordIncomingWebhookConnectionIncomingWebhook(TypedDict, total=False): + """Discord incoming webhook object.""" + url: Required[str] """Incoming webhook URL.""" class ConnectionDiscordIncomingWebhookConnection(TypedDict, total=False): + """Discord incoming webhook connection.""" + incoming_webhook: Required[ConnectionDiscordIncomingWebhookConnectionIncomingWebhook] """Discord incoming webhook object.""" @@ -33,5 +39,7 @@ class ConnectionDiscordIncomingWebhookConnection(TypedDict, total=False): class DiscordChannelDataParam(TypedDict, total=False): + """Discord channel data.""" + connections: Required[Iterable[Connection]] """List of Discord channel connections.""" diff --git a/src/knockapi/types/recipients/ms_teams_channel_data.py b/src/knockapi/types/recipients/ms_teams_channel_data.py index 8b259e1..fab64a0 100644 --- a/src/knockapi/types/recipients/ms_teams_channel_data.py +++ b/src/knockapi/types/recipients/ms_teams_channel_data.py @@ -15,6 +15,8 @@ class ConnectionMsTeamsTokenConnection(BaseModel): + """Microsoft Teams token connection.""" + ms_teams_channel_id: Optional[str] = None """Microsoft Teams channel ID.""" @@ -29,11 +31,15 @@ class ConnectionMsTeamsTokenConnection(BaseModel): class ConnectionMsTeamsIncomingWebhookConnectionIncomingWebhook(BaseModel): + """Microsoft Teams incoming webhook.""" + url: str """Microsoft Teams incoming webhook URL.""" class ConnectionMsTeamsIncomingWebhookConnection(BaseModel): + """Microsoft Teams incoming webhook connection.""" + incoming_webhook: ConnectionMsTeamsIncomingWebhookConnectionIncomingWebhook """Microsoft Teams incoming webhook.""" @@ -42,6 +48,8 @@ class ConnectionMsTeamsIncomingWebhookConnection(BaseModel): class MsTeamsChannelData(BaseModel): + """Microsoft Teams channel data.""" + connections: List[Connection] """List of Microsoft Teams connections.""" diff --git a/src/knockapi/types/recipients/ms_teams_channel_data_param.py b/src/knockapi/types/recipients/ms_teams_channel_data_param.py index 6627b69..4648a57 100644 --- a/src/knockapi/types/recipients/ms_teams_channel_data_param.py +++ b/src/knockapi/types/recipients/ms_teams_channel_data_param.py @@ -15,6 +15,8 @@ class ConnectionMsTeamsTokenConnection(TypedDict, total=False): + """Microsoft Teams token connection.""" + ms_teams_channel_id: Optional[str] """Microsoft Teams channel ID.""" @@ -29,11 +31,15 @@ class ConnectionMsTeamsTokenConnection(TypedDict, total=False): class ConnectionMsTeamsIncomingWebhookConnectionIncomingWebhook(TypedDict, total=False): + """Microsoft Teams incoming webhook.""" + url: Required[str] """Microsoft Teams incoming webhook URL.""" class ConnectionMsTeamsIncomingWebhookConnection(TypedDict, total=False): + """Microsoft Teams incoming webhook connection.""" + incoming_webhook: Required[ConnectionMsTeamsIncomingWebhookConnectionIncomingWebhook] """Microsoft Teams incoming webhook.""" @@ -42,6 +48,8 @@ class ConnectionMsTeamsIncomingWebhookConnection(TypedDict, total=False): class MsTeamsChannelDataParam(TypedDict, total=False): + """Microsoft Teams channel data.""" + connections: Required[Iterable[Connection]] """List of Microsoft Teams connections.""" diff --git a/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only.py b/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only.py index e683ff4..f0ba659 100644 --- a/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only.py +++ b/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only.py @@ -8,5 +8,7 @@ class OneSignalChannelDataPlayerIDsOnly(BaseModel): + """OneSignal channel data.""" + player_ids: List[str] """A list of OneSignal player IDs.""" diff --git a/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only_param.py b/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only_param.py index bcc1bfd..80791e9 100644 --- a/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only_param.py +++ b/src/knockapi/types/recipients/one_signal_channel_data_player_ids_only_param.py @@ -10,5 +10,7 @@ class OneSignalChannelDataPlayerIDsOnlyParam(TypedDict, total=False): + """OneSignal channel data.""" + player_ids: Required[SequenceNotStr[str]] """A list of OneSignal player IDs.""" diff --git a/src/knockapi/types/recipients/preference_set.py b/src/knockapi/types/recipients/preference_set.py index b690579..ac8b56a 100644 --- a/src/knockapi/types/recipients/preference_set.py +++ b/src/knockapi/types/recipients/preference_set.py @@ -23,6 +23,10 @@ class CategoriesPreferenceSetWorkflowCategorySettingObject(BaseModel): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypes] = None """Channel type preferences.""" @@ -41,6 +45,10 @@ class CategoriesPreferenceSetWorkflowCategorySettingObject(BaseModel): class WorkflowsPreferenceSetWorkflowCategorySettingObject(BaseModel): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypes] = None """Channel type preferences.""" @@ -55,6 +63,10 @@ class WorkflowsPreferenceSetWorkflowCategorySettingObject(BaseModel): class PreferenceSet(BaseModel): + """ + A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets. + """ + id: str """Unique identifier for the preference set.""" diff --git a/src/knockapi/types/recipients/preference_set_channel_setting.py b/src/knockapi/types/recipients/preference_set_channel_setting.py index 33388b7..244e32b 100644 --- a/src/knockapi/types/recipients/preference_set_channel_setting.py +++ b/src/knockapi/types/recipients/preference_set_channel_setting.py @@ -9,5 +9,10 @@ class PreferenceSetChannelSetting(BaseModel): + """A set of settings for a specific channel. + + Currently, this can only be a list of conditions to apply. + """ + conditions: List[Condition] """A list of conditions to apply to a specific channel.""" diff --git a/src/knockapi/types/recipients/preference_set_channel_setting_param.py b/src/knockapi/types/recipients/preference_set_channel_setting_param.py index 660d701..6caa7a4 100644 --- a/src/knockapi/types/recipients/preference_set_channel_setting_param.py +++ b/src/knockapi/types/recipients/preference_set_channel_setting_param.py @@ -11,5 +11,10 @@ class PreferenceSetChannelSettingParam(TypedDict, total=False): + """A set of settings for a specific channel. + + Currently, this can only be a list of conditions to apply. + """ + conditions: Required[Iterable[Condition]] """A list of conditions to apply to a specific channel.""" diff --git a/src/knockapi/types/recipients/preference_set_channel_type_setting.py b/src/knockapi/types/recipients/preference_set_channel_type_setting.py index 4b74464..0b2115b 100644 --- a/src/knockapi/types/recipients/preference_set_channel_type_setting.py +++ b/src/knockapi/types/recipients/preference_set_channel_type_setting.py @@ -9,5 +9,10 @@ class PreferenceSetChannelTypeSetting(BaseModel): + """A set of settings for a channel type. + + Currently, this can only be a list of conditions to apply. + """ + conditions: List[Condition] """A list of conditions to apply to a channel type.""" diff --git a/src/knockapi/types/recipients/preference_set_channel_type_setting_param.py b/src/knockapi/types/recipients/preference_set_channel_type_setting_param.py index a058812..d9a0945 100644 --- a/src/knockapi/types/recipients/preference_set_channel_type_setting_param.py +++ b/src/knockapi/types/recipients/preference_set_channel_type_setting_param.py @@ -11,5 +11,10 @@ class PreferenceSetChannelTypeSettingParam(TypedDict, total=False): + """A set of settings for a channel type. + + Currently, this can only be a list of conditions to apply. + """ + conditions: Required[Iterable[Condition]] """A list of conditions to apply to a channel type.""" diff --git a/src/knockapi/types/recipients/preference_set_channel_types.py b/src/knockapi/types/recipients/preference_set_channel_types.py index d0d9543..86fde8f 100644 --- a/src/knockapi/types/recipients/preference_set_channel_types.py +++ b/src/knockapi/types/recipients/preference_set_channel_types.py @@ -22,6 +22,8 @@ class PreferenceSetChannelTypes(BaseModel): + """Channel type preferences.""" + chat: Optional[Chat] = None """Whether the channel type is enabled for the preference set.""" diff --git a/src/knockapi/types/recipients/preference_set_channel_types_param.py b/src/knockapi/types/recipients/preference_set_channel_types_param.py index f9c48f5..8877db6 100644 --- a/src/knockapi/types/recipients/preference_set_channel_types_param.py +++ b/src/knockapi/types/recipients/preference_set_channel_types_param.py @@ -23,6 +23,8 @@ class PreferenceSetChannelTypesParam(TypedDict, total=False): + """Channel type preferences.""" + chat: Chat """Whether the channel type is enabled for the preference set.""" diff --git a/src/knockapi/types/recipients/preference_set_request_param.py b/src/knockapi/types/recipients/preference_set_request_param.py index 268d264..d84aa20 100644 --- a/src/knockapi/types/recipients/preference_set_request_param.py +++ b/src/knockapi/types/recipients/preference_set_request_param.py @@ -25,6 +25,10 @@ class CategoriesPreferenceSetWorkflowCategorySettingObject(TypedDict, total=False): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypesParam] """Channel type preferences.""" @@ -43,6 +47,10 @@ class CategoriesPreferenceSetWorkflowCategorySettingObject(TypedDict, total=Fals class WorkflowsPreferenceSetWorkflowCategorySettingObject(TypedDict, total=False): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypesParam] """Channel type preferences.""" @@ -57,6 +65,8 @@ class WorkflowsPreferenceSetWorkflowCategorySettingObject(TypedDict, total=False class PreferenceSetRequestParam(TypedDict, total=False): + """A request to set a preference set for a recipient.""" + _persistence_strategy: Annotated[Literal["merge", "replace"], PropertyInfo(alias="__persistence_strategy__")] """Controls how the preference set is persisted. diff --git a/src/knockapi/types/recipients/push_channel_data_devices_only_param.py b/src/knockapi/types/recipients/push_channel_data_devices_only_param.py index f183ff6..33f7921 100644 --- a/src/knockapi/types/recipients/push_channel_data_devices_only_param.py +++ b/src/knockapi/types/recipients/push_channel_data_devices_only_param.py @@ -29,6 +29,8 @@ class Device(TypedDict, total=False): class PushChannelDataDevicesOnlyParam(TypedDict, total=False): + """Push channel data.""" + devices: Required[Iterable[Device]] """A list of devices. diff --git a/src/knockapi/types/recipients/push_channel_data_tokens_only_param.py b/src/knockapi/types/recipients/push_channel_data_tokens_only_param.py index 77960f1..e7d2aad 100644 --- a/src/knockapi/types/recipients/push_channel_data_tokens_only_param.py +++ b/src/knockapi/types/recipients/push_channel_data_tokens_only_param.py @@ -10,5 +10,7 @@ class PushChannelDataTokensOnlyParam(TypedDict, total=False): + """Push channel data.""" + tokens: Required[SequenceNotStr[str]] """A list of push channel tokens.""" diff --git a/src/knockapi/types/recipients/slack_channel_data.py b/src/knockapi/types/recipients/slack_channel_data.py index 5855872..261631d 100644 --- a/src/knockapi/types/recipients/slack_channel_data.py +++ b/src/knockapi/types/recipients/slack_channel_data.py @@ -15,6 +15,8 @@ class ConnectionSlackTokenConnection(BaseModel): + """A Slack connection token.""" + access_token: Optional[str] = None """A Slack access token.""" @@ -26,6 +28,8 @@ class ConnectionSlackTokenConnection(BaseModel): class ConnectionSlackIncomingWebhookConnection(BaseModel): + """A Slack connection incoming webhook.""" + url: str """The URL of the incoming webhook for a Slack connection.""" @@ -34,11 +38,15 @@ class ConnectionSlackIncomingWebhookConnection(BaseModel): class Token(BaseModel): + """A Slack connection token.""" + access_token: Optional[str] = None """A Slack access token.""" class SlackChannelData(BaseModel): + """Slack channel data.""" + connections: List[Connection] """List of Slack channel connections.""" diff --git a/src/knockapi/types/recipients/slack_channel_data_param.py b/src/knockapi/types/recipients/slack_channel_data_param.py index 3943fa6..0100c10 100644 --- a/src/knockapi/types/recipients/slack_channel_data_param.py +++ b/src/knockapi/types/recipients/slack_channel_data_param.py @@ -15,6 +15,8 @@ class ConnectionSlackTokenConnection(TypedDict, total=False): + """A Slack connection token.""" + access_token: Optional[str] """A Slack access token.""" @@ -26,6 +28,8 @@ class ConnectionSlackTokenConnection(TypedDict, total=False): class ConnectionSlackIncomingWebhookConnection(TypedDict, total=False): + """A Slack connection incoming webhook.""" + url: Required[str] """The URL of the incoming webhook for a Slack connection.""" @@ -34,11 +38,15 @@ class ConnectionSlackIncomingWebhookConnection(TypedDict, total=False): class Token(TypedDict, total=False): + """A Slack connection token.""" + access_token: Required[Optional[str]] """A Slack access token.""" class SlackChannelDataParam(TypedDict, total=False): + """Slack channel data.""" + connections: Required[Iterable[Connection]] """List of Slack channel connections.""" diff --git a/src/knockapi/types/recipients/subscription.py b/src/knockapi/types/recipients/subscription.py index ff47ce9..c4d8662 100644 --- a/src/knockapi/types/recipients/subscription.py +++ b/src/knockapi/types/recipients/subscription.py @@ -14,6 +14,8 @@ class Subscription(BaseModel): + """A subscription object.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" diff --git a/src/knockapi/types/schedule.py b/src/knockapi/types/schedule.py index 56fd93e..5499496 100644 --- a/src/knockapi/types/schedule.py +++ b/src/knockapi/types/schedule.py @@ -13,6 +13,8 @@ class Schedule(BaseModel): + """A schedule represents a recurring workflow execution.""" + id: str """Unique identifier for the schedule.""" diff --git a/src/knockapi/types/schedule_repeat_rule.py b/src/knockapi/types/schedule_repeat_rule.py index cec89c8..e778297 100644 --- a/src/knockapi/types/schedule_repeat_rule.py +++ b/src/knockapi/types/schedule_repeat_rule.py @@ -11,6 +11,8 @@ class ScheduleRepeatRule(BaseModel): + """The repeat rule for the schedule.""" + frequency: Literal["daily", "weekly", "monthly", "hourly"] """The frequency of the schedule.""" diff --git a/src/knockapi/types/schedule_repeat_rule_param.py b/src/knockapi/types/schedule_repeat_rule_param.py index 08133ee..0c527b7 100644 --- a/src/knockapi/types/schedule_repeat_rule_param.py +++ b/src/knockapi/types/schedule_repeat_rule_param.py @@ -11,6 +11,8 @@ class ScheduleRepeatRuleParam(TypedDict, total=False): + """The repeat rule for the schedule.""" + frequency: Required[Literal["daily", "weekly", "monthly", "hourly"]] """The frequency of the schedule.""" diff --git a/src/knockapi/types/schedules/bulk_create_params.py b/src/knockapi/types/schedules/bulk_create_params.py index 6b59e5c..f09b60e 100644 --- a/src/knockapi/types/schedules/bulk_create_params.py +++ b/src/knockapi/types/schedules/bulk_create_params.py @@ -20,6 +20,8 @@ class BulkCreateParams(TypedDict, total=False): class Schedule(TypedDict, total=False): + """A schedule represents a recurring workflow execution.""" + workflow: Required[str] """The key of the workflow.""" diff --git a/src/knockapi/types/shared/condition.py b/src/knockapi/types/shared/condition.py index 0b57d1c..fe3f5d6 100644 --- a/src/knockapi/types/shared/condition.py +++ b/src/knockapi/types/shared/condition.py @@ -9,6 +9,8 @@ class Condition(BaseModel): + """A condition to be evaluated.""" + argument: Optional[str] = None """The argument value to compare against in the condition.""" diff --git a/src/knockapi/types/shared/page_info.py b/src/knockapi/types/shared/page_info.py index c211dbd..e0b49f3 100644 --- a/src/knockapi/types/shared/page_info.py +++ b/src/knockapi/types/shared/page_info.py @@ -10,6 +10,8 @@ class PageInfo(BaseModel): + """Pagination information for a list of resources.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" diff --git a/src/knockapi/types/shared_params/condition.py b/src/knockapi/types/shared_params/condition.py index 1cbb66c..eb29011 100644 --- a/src/knockapi/types/shared_params/condition.py +++ b/src/knockapi/types/shared_params/condition.py @@ -9,6 +9,8 @@ class Condition(TypedDict, total=False): + """A condition to be evaluated.""" + argument: Required[Optional[str]] """The argument value to compare against in the condition.""" diff --git a/src/knockapi/types/tenant.py b/src/knockapi/types/tenant.py index 5270383..d9fd2c2 100644 --- a/src/knockapi/types/tenant.py +++ b/src/knockapi/types/tenant.py @@ -11,6 +11,8 @@ class SettingsBranding(BaseModel): + """The branding for the tenant.""" + icon_url: Optional[str] = None """The icon URL for the tenant. @@ -31,6 +33,8 @@ class SettingsBranding(BaseModel): class Settings(BaseModel): + """The settings for the tenant. Includes branding and preference set.""" + branding: Optional[SettingsBranding] = None """The branding for the tenant.""" @@ -42,6 +46,8 @@ class Settings(BaseModel): class Tenant(BaseModel): + """A tenant entity.""" + id: str """The unique identifier for the tenant.""" diff --git a/src/knockapi/types/tenant_request_param.py b/src/knockapi/types/tenant_request_param.py index a9c7fb2..0949e57 100644 --- a/src/knockapi/types/tenant_request_param.py +++ b/src/knockapi/types/tenant_request_param.py @@ -13,6 +13,8 @@ class SettingsBranding(TypedDict, total=False): + """The branding for the tenant.""" + icon_url: Optional[str] """The icon URL for the tenant. @@ -33,6 +35,8 @@ class SettingsBranding(TypedDict, total=False): class Settings(TypedDict, total=False): + """The settings for the tenant. Includes branding and preference set.""" + branding: SettingsBranding """The branding for the tenant.""" @@ -41,6 +45,11 @@ class Settings(TypedDict, total=False): class TenantRequestParamTyped(TypedDict, total=False): + """A tenant to be set in the system. + + You can supply any additional properties on the tenant object. + """ + id: Required[str] """The unique identifier for the tenant.""" diff --git a/src/knockapi/types/tenant_set_params.py b/src/knockapi/types/tenant_set_params.py index 760794d..9f69494 100644 --- a/src/knockapi/types/tenant_set_params.py +++ b/src/knockapi/types/tenant_set_params.py @@ -30,6 +30,8 @@ class TenantSetParams(TypedDict, total=False): class SettingsBranding(TypedDict, total=False): + """The branding for the tenant.""" + icon_url: Optional[str] """The icon URL for the tenant. @@ -50,6 +52,8 @@ class SettingsBranding(TypedDict, total=False): class Settings(TypedDict, total=False): + """The settings for the tenant. Includes branding and preference set.""" + branding: SettingsBranding """The branding for the tenant.""" diff --git a/src/knockapi/types/user.py b/src/knockapi/types/user.py index c841676..11cf87c 100644 --- a/src/knockapi/types/user.py +++ b/src/knockapi/types/user.py @@ -11,6 +11,10 @@ class User(BaseModel): + """ + A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier. + """ + id: str """The unique identifier of the user.""" diff --git a/src/knockapi/types/user_set_preferences_params.py b/src/knockapi/types/user_set_preferences_params.py index 511b8a1..9ded001 100644 --- a/src/knockapi/types/user_set_preferences_params.py +++ b/src/knockapi/types/user_set_preferences_params.py @@ -59,6 +59,10 @@ class UserSetPreferencesParams(TypedDict, total=False): class CategoriesPreferenceSetWorkflowCategorySettingObject(TypedDict, total=False): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypesParam] """Channel type preferences.""" @@ -77,6 +81,10 @@ class CategoriesPreferenceSetWorkflowCategorySettingObject(TypedDict, total=Fals class WorkflowsPreferenceSetWorkflowCategorySettingObject(TypedDict, total=False): + """ + The settings object for a workflow or category, where you can specify channel types or conditions. + """ + channel_types: Optional[PreferenceSetChannelTypesParam] """Channel type preferences.""" diff --git a/src/knockapi/types/users/feed_get_settings_response.py b/src/knockapi/types/users/feed_get_settings_response.py index bcc30f1..c0798f2 100644 --- a/src/knockapi/types/users/feed_get_settings_response.py +++ b/src/knockapi/types/users/feed_get_settings_response.py @@ -6,10 +6,14 @@ class Features(BaseModel): + """Features configuration for the user's feed.""" + branding_required: bool """Whether branding is required for the user's feed.""" class FeedGetSettingsResponse(BaseModel): + """The response for the user's feed settings.""" + features: Features """Features configuration for the user's feed.""" diff --git a/src/knockapi/types/users/feed_list_items_response.py b/src/knockapi/types/users/feed_list_items_response.py index bb57719..eb46158 100644 --- a/src/knockapi/types/users/feed_list_items_response.py +++ b/src/knockapi/types/users/feed_list_items_response.py @@ -20,6 +20,8 @@ class BlockMessageInAppFeedContentBlock(BaseModel): + """A block in a message in an app feed.""" + content: str """The content of the block in a message in an app feed.""" @@ -34,6 +36,8 @@ class BlockMessageInAppFeedContentBlock(BaseModel): class BlockMessageInAppFeedButtonSetBlockButton(BaseModel): + """A button in an in app feed message.""" + action: str """The action to take when the button is clicked.""" @@ -45,6 +49,8 @@ class BlockMessageInAppFeedButtonSetBlockButton(BaseModel): class BlockMessageInAppFeedButtonSetBlock(BaseModel): + """A button set block in a message in an app feed.""" + buttons: List[BlockMessageInAppFeedButtonSetBlockButton] """A list of buttons in an in app feed message.""" @@ -59,6 +65,8 @@ class BlockMessageInAppFeedButtonSetBlock(BaseModel): class Source(BaseModel): + """Source information for the feed item.""" + api_typename: str = FieldInfo(alias="__typename") """The typename of the schema.""" @@ -73,6 +81,8 @@ class Source(BaseModel): class FeedListItemsResponse(BaseModel): + """An in-app feed message in a user's feed.""" + id: str """Unique identifier for the feed.""" diff --git a/src/knockapi/types/users/guide_get_channel_response.py b/src/knockapi/types/users/guide_get_channel_response.py index 7cdb296..d2c8653 100644 --- a/src/knockapi/types/users/guide_get_channel_response.py +++ b/src/knockapi/types/users/guide_get_channel_response.py @@ -124,6 +124,8 @@ class GuideGroup(BaseModel): class GuideGetChannelResponse(BaseModel): + """A response for a list of guides.""" + entries: List[Entry] """A list of guides.""" diff --git a/src/knockapi/types/users/guide_mark_message_as_archived_response.py b/src/knockapi/types/users/guide_mark_message_as_archived_response.py index 3d3bc4b..d6d2012 100644 --- a/src/knockapi/types/users/guide_mark_message_as_archived_response.py +++ b/src/knockapi/types/users/guide_mark_message_as_archived_response.py @@ -6,5 +6,7 @@ class GuideMarkMessageAsArchivedResponse(BaseModel): + """A response for a guide action.""" + status: str """The status of a guide's action.""" diff --git a/src/knockapi/types/users/guide_mark_message_as_interacted_response.py b/src/knockapi/types/users/guide_mark_message_as_interacted_response.py index 1b05083..c9cedac 100644 --- a/src/knockapi/types/users/guide_mark_message_as_interacted_response.py +++ b/src/knockapi/types/users/guide_mark_message_as_interacted_response.py @@ -6,5 +6,7 @@ class GuideMarkMessageAsInteractedResponse(BaseModel): + """A response for a guide action.""" + status: str """The status of a guide's action.""" diff --git a/src/knockapi/types/users/guide_mark_message_as_seen_response.py b/src/knockapi/types/users/guide_mark_message_as_seen_response.py index d2b3204..0f26093 100644 --- a/src/knockapi/types/users/guide_mark_message_as_seen_response.py +++ b/src/knockapi/types/users/guide_mark_message_as_seen_response.py @@ -6,5 +6,7 @@ class GuideMarkMessageAsSeenResponse(BaseModel): + """A response for a guide action.""" + status: str """The status of a guide's action.""" diff --git a/src/knockapi/types/workflow_trigger_response.py b/src/knockapi/types/workflow_trigger_response.py index a5fdcd6..4903df9 100644 --- a/src/knockapi/types/workflow_trigger_response.py +++ b/src/knockapi/types/workflow_trigger_response.py @@ -6,6 +6,8 @@ class WorkflowTriggerResponse(BaseModel): + """The response from triggering a workflow.""" + workflow_run_id: str """ This value allows you to track individual messages associated with this trigger