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.22.0"
".": "1.22.1"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.22.1 (2026-03-05)

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

### Chores

* **test:** do not count install time for mock server timeout ([fb90aa9](https://github.com/knocklabs/knock-python/commit/fb90aa9aeb75f917647c343385ab79e0e42aa85d))


### Refactors

* **types:** use `extra_items` from PEP 728 ([10ec48a](https://github.com/knocklabs/knock-python/commit/10ec48a716604bb5419a818320326e85c1eae04f))

## 1.22.0 (2026-03-02)

Full Changelog: [v1.21.0...v1.22.0](https://github.com/knocklabs/knock-python/compare/v1.21.0...v1.22.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "knockapi"
version = "1.22.0"
version = "1.22.1"
description = "The official Python library for the knock API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version

npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
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.22.0" # x-release-please-version
__version__ = "1.22.1" # x-release-please-version
9 changes: 3 additions & 6 deletions src/knockapi/types/inline_identify_user_request_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from __future__ import annotations

from typing import Dict, Union, Optional
from typing import Union, Optional
from datetime import datetime
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
from typing_extensions import Required, Annotated, TypedDict

from .._utils import PropertyInfo
from .recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
Expand All @@ -13,7 +13,7 @@
__all__ = ["InlineIdentifyUserRequestParam"]


class InlineIdentifyUserRequestParamTyped(TypedDict, total=False):
class InlineIdentifyUserRequestParam(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
"""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.
Expand Down Expand Up @@ -64,6 +64,3 @@ class InlineIdentifyUserRequestParamTyped(TypedDict, total=False):
Used
for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
"""


InlineIdentifyUserRequestParam: TypeAlias = Union[InlineIdentifyUserRequestParamTyped, Dict[str, object]]
9 changes: 3 additions & 6 deletions src/knockapi/types/inline_object_request_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from __future__ import annotations

from typing import Dict, Union, Optional
from typing import Union, Optional
from datetime import datetime
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
from typing_extensions import Required, Annotated, TypedDict

from .._utils import PropertyInfo
from .recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
Expand All @@ -13,7 +13,7 @@
__all__ = ["InlineObjectRequestParam"]


class InlineObjectRequestParamTyped(TypedDict, total=False):
class InlineObjectRequestParam(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
"""A custom [Object](/concepts/objects) entity which belongs to a collection."""

id: Required[str]
Expand All @@ -37,6 +37,3 @@ class InlineObjectRequestParamTyped(TypedDict, total=False):
Preferences that are set inline will be merged into any existing preferences
rather than replacing them.
"""


InlineObjectRequestParam: TypeAlias = Union[InlineObjectRequestParamTyped, Dict[str, object]]
9 changes: 3 additions & 6 deletions src/knockapi/types/objects/bulk_set_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from __future__ import annotations

from typing import Dict, Union, Iterable, Optional
from typing import Union, Iterable, Optional
from datetime import datetime
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
from typing_extensions import Required, Annotated, TypedDict

from ..._utils import PropertyInfo
from ..recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
Expand All @@ -18,7 +18,7 @@ class BulkSetParams(TypedDict, total=False):
"""A list of objects."""


class ObjectTyped(TypedDict, total=False):
class Object(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
"""A custom [Object](/concepts/objects) entity which belongs to a collection."""

id: Required[str]
Expand All @@ -39,6 +39,3 @@ class ObjectTyped(TypedDict, total=False):
Preferences that are set inline will be merged into any existing preferences
rather than replacing them.
"""


Object: TypeAlias = Union[ObjectTyped, Dict[str, object]]
9 changes: 3 additions & 6 deletions src/knockapi/types/tenant_request_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from __future__ import annotations

from typing import Dict, Union, Optional
from typing_extensions import Required, TypeAlias, TypedDict
from typing import Optional
from typing_extensions import Required, TypedDict

from .recipients.preference_set_request_param import PreferenceSetRequestParam
from .recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
Expand Down Expand Up @@ -44,7 +44,7 @@ class Settings(TypedDict, total=False):
"""A request to set a preference set for a recipient."""


class TenantRequestParamTyped(TypedDict, total=False):
class TenantRequestParam(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
"""A tenant to be set in the system.

You can supply any additional properties on the tenant object.
Expand All @@ -68,6 +68,3 @@ class TenantRequestParamTyped(TypedDict, total=False):

settings: Settings
"""The settings for the tenant. Includes branding and preference set."""


TenantRequestParam: TypeAlias = Union[TenantRequestParamTyped, Dict[str, object]]