Skip to content

Commit 248fa87

Browse files
release: 1.6.0 (#48)
* feat(api): api update * release: 1.6.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 0c39dde commit 248fa87

19 files changed

+79
-202
lines changed

.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.5.0"
2+
".": "1.6.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 89
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5ce0d88003acccf6111cd40663ad7b4d468696fc439fca41d88087ab84b465c3.yml
3-
openapi_spec_hash: ff864d7f3cad6a98a0e39fee0fb2b16a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-e5a7933b414d403d082b34db140fc5b8dca9a5ea3ae322f640b0f9f055c47288.yml
3+
openapi_spec_hash: 3740dc4d5c1f5a0c9ee6de9e40931fd4
44
config_hash: 2ae8965d371a03bd30c6a56819c04cf2

CHANGELOG.md

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

3+
## 1.6.0 (2025-06-06)
4+
5+
Full Changelog: [v1.5.0...v1.6.0](https://github.com/knocklabs/knock-python/compare/v1.5.0...v1.6.0)
6+
7+
### Features
8+
9+
* **api:** api update ([24475ca](https://github.com/knocklabs/knock-python/commit/24475ca823f2ba3ba4633898e65c92265225d4d8))
10+
311
## 1.5.0 (2025-06-04)
412

513
Full Changelog: [v1.4.0...v1.5.0](https://github.com/knocklabs/knock-python/compare/v1.4.0...v1.5.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.5.0"
3+
version = "1.6.0"
44
description = "The official Python library for the knock API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

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.5.0" # x-release-please-version
4+
__version__ = "1.6.0" # x-release-please-version

src/knockapi/resources/objects/bulk.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from ..._base_client import make_request_options
2020
from ...types.objects import bulk_set_params, bulk_delete_params, bulk_add_subscriptions_params
2121
from ...types.bulk_operation import BulkOperation
22-
from ...types.inline_object_request_param import InlineObjectRequestParam
2322

2423
__all__ = ["BulkResource", "AsyncBulkResource"]
2524

@@ -129,7 +128,7 @@ def set(
129128
self,
130129
collection: str,
131130
*,
132-
objects: Iterable[InlineObjectRequestParam],
131+
objects: Iterable[bulk_set_params.Object],
133132
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
134133
# The extra values given here take precedence over values defined on the client or passed to this method.
135134
extra_headers: Headers | None = None,
@@ -268,7 +267,7 @@ async def set(
268267
self,
269268
collection: str,
270269
*,
271-
objects: Iterable[InlineObjectRequestParam],
270+
objects: Iterable[bulk_set_params.Object],
272271
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
273272
# The extra values given here take precedence over values defined on the client or passed to this method.
274273
extra_headers: Headers | None = None,

src/knockapi/resources/schedules/schedules.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def list(
223223
after: str | NotGiven = NOT_GIVEN,
224224
before: str | NotGiven = NOT_GIVEN,
225225
page_size: int | NotGiven = NOT_GIVEN,
226-
recipients: List[str] | NotGiven = NOT_GIVEN,
226+
recipients: List[RecipientReferenceParam] | NotGiven = NOT_GIVEN,
227227
tenant: str | NotGiven = NOT_GIVEN,
228228
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
229229
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -245,7 +245,7 @@ def list(
245245
246246
page_size: The number of items per page.
247247
248-
recipients: Filter by recipient IDs.
248+
recipients: Filter by recipient references.
249249
250250
tenant: Filter by tenant ID.
251251
@@ -494,7 +494,7 @@ def list(
494494
after: str | NotGiven = NOT_GIVEN,
495495
before: str | NotGiven = NOT_GIVEN,
496496
page_size: int | NotGiven = NOT_GIVEN,
497-
recipients: List[str] | NotGiven = NOT_GIVEN,
497+
recipients: List[RecipientReferenceParam] | NotGiven = NOT_GIVEN,
498498
tenant: str | NotGiven = NOT_GIVEN,
499499
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
500500
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -516,7 +516,7 @@ def list(
516516
517517
page_size: The number of items per page.
518518
519-
recipients: Filter by recipient IDs.
519+
recipients: Filter by recipient references.
520520
521521
tenant: Filter by tenant ID.
522522

src/knockapi/resources/tenants/tenants.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from ..._base_client import AsyncPaginator, make_request_options
3030
from ...types.tenant import Tenant
3131
from ...types.recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
32-
from ...types.recipients.inline_preference_set_request_param import InlinePreferenceSetRequestParam
3332

3433
__all__ = ["TenantsResource", "AsyncTenantsResource"]
3534

@@ -189,7 +188,6 @@ def set(
189188
id: str,
190189
*,
191190
channel_data: Optional[InlineChannelDataRequestParam] | NotGiven = NOT_GIVEN,
192-
preferences: Optional[InlinePreferenceSetRequestParam] | NotGiven = NOT_GIVEN,
193191
settings: tenant_set_params.Settings | NotGiven = NOT_GIVEN,
194192
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
195193
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -206,8 +204,6 @@ def set(
206204
Args:
207205
channel_data: A request to set channel data for a type of channel inline.
208206
209-
preferences: Inline set preferences for a recipient, where the key is the preference set id.
210-
211207
settings: The settings for the tenant. Includes branding and preference set.
212208
213209
extra_headers: Send extra headers
@@ -225,7 +221,6 @@ def set(
225221
body=maybe_transform(
226222
{
227223
"channel_data": channel_data,
228-
"preferences": preferences,
229224
"settings": settings,
230225
},
231226
tenant_set_params.TenantSetParams,
@@ -392,7 +387,6 @@ async def set(
392387
id: str,
393388
*,
394389
channel_data: Optional[InlineChannelDataRequestParam] | NotGiven = NOT_GIVEN,
395-
preferences: Optional[InlinePreferenceSetRequestParam] | NotGiven = NOT_GIVEN,
396390
settings: tenant_set_params.Settings | NotGiven = NOT_GIVEN,
397391
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
398392
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -409,8 +403,6 @@ async def set(
409403
Args:
410404
channel_data: A request to set channel data for a type of channel inline.
411405
412-
preferences: Inline set preferences for a recipient, where the key is the preference set id.
413-
414406
settings: The settings for the tenant. Includes branding and preference set.
415407
416408
extra_headers: Send extra headers
@@ -428,7 +420,6 @@ async def set(
428420
body=await async_maybe_transform(
429421
{
430422
"channel_data": channel_data,
431-
"preferences": preferences,
432423
"settings": settings,
433424
},
434425
tenant_set_params.TenantSetParams,

src/knockapi/resources/users/users.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
from ...types.schedule import Schedule
6161
from ...types.recipients.channel_data import ChannelData
6262
from ...types.recipients.subscription import Subscription
63+
from ...types.recipient_reference_param import RecipientReferenceParam
6364
from ...types.recipients.preference_set import PreferenceSet
6465
from ...types.user_list_preferences_response import UserListPreferencesResponse
6566
from ...types.recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
@@ -594,7 +595,7 @@ def list_subscriptions(
594595
after: str | NotGiven = NOT_GIVEN,
595596
before: str | NotGiven = NOT_GIVEN,
596597
include: List[Literal["preferences"]] | NotGiven = NOT_GIVEN,
597-
objects: List[str] | NotGiven = NOT_GIVEN,
598+
objects: List[RecipientReferenceParam] | NotGiven = NOT_GIVEN,
598599
page_size: int | NotGiven = NOT_GIVEN,
599600
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
600601
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -614,7 +615,7 @@ def list_subscriptions(
614615
615616
include: Associated resources to include in the response.
616617
617-
objects: Only returns subscriptions for the specified object GIDs.
618+
objects: Only returns subscriptions for the specified object references.
618619
619620
page_size: The number of items per page.
620621
@@ -1352,7 +1353,7 @@ def list_subscriptions(
13521353
after: str | NotGiven = NOT_GIVEN,
13531354
before: str | NotGiven = NOT_GIVEN,
13541355
include: List[Literal["preferences"]] | NotGiven = NOT_GIVEN,
1355-
objects: List[str] | NotGiven = NOT_GIVEN,
1356+
objects: List[RecipientReferenceParam] | NotGiven = NOT_GIVEN,
13561357
page_size: int | NotGiven = NOT_GIVEN,
13571358
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
13581359
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1372,7 +1373,7 @@ def list_subscriptions(
13721373
13731374
include: Associated resources to include in the response.
13741375
1375-
objects: Only returns subscriptions for the specified object GIDs.
1376+
objects: Only returns subscriptions for the specified object references.
13761377
13771378
page_size: The number of items per page.
13781379

src/knockapi/types/objects/bulk_set_params.py

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,34 @@
22

33
from __future__ import annotations
44

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

8-
from ..inline_object_request_param import InlineObjectRequestParam
9+
from ..._utils import PropertyInfo
10+
from ..recipients.inline_channel_data_request_param import InlineChannelDataRequestParam
11+
from ..recipients.inline_preference_set_request_param import InlinePreferenceSetRequestParam
912

10-
__all__ = ["BulkSetParams"]
13+
__all__ = ["BulkSetParams", "Object"]
1114

1215

1316
class BulkSetParams(TypedDict, total=False):
14-
objects: Required[Iterable[InlineObjectRequestParam]]
17+
objects: Required[Iterable[Object]]
1518
"""A list of objects."""
19+
20+
21+
class ObjectTyped(TypedDict, total=False):
22+
id: Required[str]
23+
"""Unique identifier for the object."""
24+
25+
channel_data: Optional[InlineChannelDataRequestParam]
26+
"""A request to set channel data for a type of channel inline."""
27+
28+
created_at: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
29+
"""Timestamp when the resource was created."""
30+
31+
preferences: Optional[InlinePreferenceSetRequestParam]
32+
"""Inline set preferences for a recipient, where the key is the preference set id."""
33+
34+
35+
Object: TypeAlias = Union[ObjectTyped, Dict[str, object]]

0 commit comments

Comments
 (0)