Skip to content

Commit 80ce92d

Browse files
chore(api): update composite API spec
1 parent 8d7e2c8 commit 80ce92d

4 files changed

Lines changed: 29 additions & 2 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2208
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
3-
openapi_spec_hash: 42dd4ac0ac3f5c00bbe80e26fed2fa51
3+
openapi_spec_hash: 1cb07cbc59f51be4843f63ea4357d7f2
44
config_hash: 0c33107d28fc9d1d5726d8ac8459421a

src/cloudflare/resources/resource_sharing/resource_sharing.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
10+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
1111
from ..._utils import path_template, maybe_transform, async_maybe_transform
1212
from ..._compat import cached_property
1313
from .resources import (
@@ -203,6 +203,7 @@ def list(
203203
]
204204
| Omit = omit,
205205
status: Literal["active", "deleting", "deleted"] | Omit = omit,
206+
tag: SequenceNotStr[str] | Omit = omit,
206207
target_type: Literal["account", "organization"] | Omit = omit,
207208
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
208209
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -235,6 +236,11 @@ def list(
235236
236237
status: Filter shares by status.
237238
239+
tag: Filter shares by tag. Each value is either `key=value` (matches shares whose
240+
tags contain that key/value pair) or `key` alone (matches shares that have any
241+
value for that key). May be repeated; multiple `tag` parameters are ANDed
242+
together. Maximum 20 `tag` parameters per request.
243+
238244
target_type: Filter shares by target_type.
239245
240246
extra_headers: Send extra headers
@@ -266,6 +272,7 @@ def list(
266272
"per_page": per_page,
267273
"resource_types": resource_types,
268274
"status": status,
275+
"tag": tag,
269276
"target_type": target_type,
270277
},
271278
resource_sharing_list_params.ResourceSharingListParams,
@@ -531,6 +538,7 @@ def list(
531538
]
532539
| Omit = omit,
533540
status: Literal["active", "deleting", "deleted"] | Omit = omit,
541+
tag: SequenceNotStr[str] | Omit = omit,
534542
target_type: Literal["account", "organization"] | Omit = omit,
535543
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
536544
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -563,6 +571,11 @@ def list(
563571
564572
status: Filter shares by status.
565573
574+
tag: Filter shares by tag. Each value is either `key=value` (matches shares whose
575+
tags contain that key/value pair) or `key` alone (matches shares that have any
576+
value for that key). May be repeated; multiple `tag` parameters are ANDed
577+
together. Maximum 20 `tag` parameters per request.
578+
566579
target_type: Filter shares by target_type.
567580
568581
extra_headers: Send extra headers
@@ -594,6 +607,7 @@ def list(
594607
"per_page": per_page,
595608
"resource_types": resource_types,
596609
"status": status,
610+
"tag": tag,
597611
"target_type": target_type,
598612
},
599613
resource_sharing_list_params.ResourceSharingListParams,

src/cloudflare/types/resource_sharing/resource_sharing_list_params.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from typing import List
66
from typing_extensions import Literal, Required, TypedDict
77

8+
from ..._types import SequenceNotStr
9+
810
__all__ = ["ResourceSharingListParams"]
911

1012

@@ -47,5 +49,14 @@ class ResourceSharingListParams(TypedDict, total=False):
4749
status: Literal["active", "deleting", "deleted"]
4850
"""Filter shares by status."""
4951

52+
tag: SequenceNotStr[str]
53+
"""Filter shares by tag.
54+
55+
Each value is either `key=value` (matches shares whose tags contain that
56+
key/value pair) or `key` alone (matches shares that have any value for that
57+
key). May be repeated; multiple `tag` parameters are ANDed together. Maximum 20
58+
`tag` parameters per request.
59+
"""
60+
5061
target_type: Literal["account", "organization"]
5162
"""Filter shares by target_type."""

tests/api_resources/test_resource_sharing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
175175
per_page=20,
176176
resource_types=["custom-ruleset"],
177177
status="active",
178+
tag=["env=production"],
178179
target_type="account",
179180
)
180181
assert_matches_type(SyncV4PagePaginationArray[ResourceSharingListResponse], resource_sharing, path=["response"])
@@ -477,6 +478,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
477478
per_page=20,
478479
resource_types=["custom-ruleset"],
479480
status="active",
481+
tag=["env=production"],
480482
target_type="account",
481483
)
482484
assert_matches_type(

0 commit comments

Comments
 (0)