Skip to content

Commit faa3432

Browse files
release: 1.22.1 (#74)
* refactor(types): use `extra_items` from PEP 728 * chore(test): do not count install time for mock server timeout * release: 1.22.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent bcc249f commit faa3432

9 files changed

Lines changed: 40 additions & 28 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.22.0"
2+
".": "1.22.1"
33
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 1.22.1 (2026-03-05)
4+
5+
Full Changelog: [v1.22.0...v1.22.1](https://github.com/knocklabs/knock-python/compare/v1.22.0...v1.22.1)
6+
7+
### Chores
8+
9+
* **test:** do not count install time for mock server timeout ([fb90aa9](https://github.com/knocklabs/knock-python/commit/fb90aa9aeb75f917647c343385ab79e0e42aa85d))
10+
11+
12+
### Refactors
13+
14+
* **types:** use `extra_items` from PEP 728 ([10ec48a](https://github.com/knocklabs/knock-python/commit/10ec48a716604bb5419a818320326e85c1eae04f))
15+
316
## 1.22.0 (2026-03-02)
417

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "knockapi"
3-
version = "1.22.0"
3+
version = "1.22.1"
44
description = "The official Python library for the knock API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

scripts/mock

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"
2121

2222
# Run prism mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24+
# Pre-install the package so the download doesn't eat into the startup timeout
25+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
26+
2427
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
2528

26-
# Wait for server to come online
29+
# Wait for server to come online (max 30s)
2730
echo -n "Waiting for server"
31+
attempts=0
2832
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
33+
attempts=$((attempts + 1))
34+
if [ "$attempts" -ge 300 ]; then
35+
echo
36+
echo "Timed out waiting for Prism server to start"
37+
cat .prism.log
38+
exit 1
39+
fi
2940
echo -n "."
3041
sleep 0.1
3142
done

src/knockapi/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "knockapi"
4-
__version__ = "1.22.0" # x-release-please-version
4+
__version__ = "1.22.1" # x-release-please-version

src/knockapi/types/inline_identify_user_request_param.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Optional
5+
from typing import Union, Optional
66
from datetime import datetime
7-
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
7+
from typing_extensions import Required, Annotated, TypedDict
88

99
from .._utils import PropertyInfo
1010
from .recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
@@ -13,7 +13,7 @@
1313
__all__ = ["InlineIdentifyUserRequestParam"]
1414

1515

16-
class InlineIdentifyUserRequestParamTyped(TypedDict, total=False):
16+
class InlineIdentifyUserRequestParam(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
1717
"""A set of parameters to inline-identify a user with.
1818
1919
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.
@@ -64,6 +64,3 @@ class InlineIdentifyUserRequestParamTyped(TypedDict, total=False):
6464
Used
6565
for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
6666
"""
67-
68-
69-
InlineIdentifyUserRequestParam: TypeAlias = Union[InlineIdentifyUserRequestParamTyped, Dict[str, object]]

src/knockapi/types/inline_object_request_param.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Optional
5+
from typing import Union, Optional
66
from datetime import datetime
7-
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
7+
from typing_extensions import Required, Annotated, TypedDict
88

99
from .._utils import PropertyInfo
1010
from .recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
@@ -13,7 +13,7 @@
1313
__all__ = ["InlineObjectRequestParam"]
1414

1515

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

1919
id: Required[str]
@@ -37,6 +37,3 @@ class InlineObjectRequestParamTyped(TypedDict, total=False):
3737
Preferences that are set inline will be merged into any existing preferences
3838
rather than replacing them.
3939
"""
40-
41-
42-
InlineObjectRequestParam: TypeAlias = Union[InlineObjectRequestParamTyped, Dict[str, object]]

src/knockapi/types/objects/bulk_set_params.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Iterable, Optional
5+
from typing import Union, Iterable, Optional
66
from datetime import datetime
7-
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
7+
from typing_extensions import Required, Annotated, TypedDict
88

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

2020

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

2424
id: Required[str]
@@ -39,6 +39,3 @@ class ObjectTyped(TypedDict, total=False):
3939
Preferences that are set inline will be merged into any existing preferences
4040
rather than replacing them.
4141
"""
42-
43-
44-
Object: TypeAlias = Union[ObjectTyped, Dict[str, object]]

src/knockapi/types/tenant_request_param.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Optional
6-
from typing_extensions import Required, TypeAlias, TypedDict
5+
from typing import Optional
6+
from typing_extensions import Required, TypedDict
77

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

4646

47-
class TenantRequestParamTyped(TypedDict, total=False):
47+
class TenantRequestParam(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
4848
"""A tenant to be set in the system.
4949
5050
You can supply any additional properties on the tenant object.
@@ -68,6 +68,3 @@ class TenantRequestParamTyped(TypedDict, total=False):
6868

6969
settings: Settings
7070
"""The settings for the tenant. Includes branding and preference set."""
71-
72-
73-
TenantRequestParam: TypeAlias = Union[TenantRequestParamTyped, Dict[str, object]]

0 commit comments

Comments
 (0)