Skip to content

Commit d2d1c24

Browse files
feat(api): update path placeholders
1 parent 9579625 commit d2d1c24

37 files changed

+2289
-4
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1704
1+
configured_endpoints: 1711
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-721d870dfb134eb1ea0f8621e361ba18c53280e5b0b061bdadc7086505eaa634.yml
33
openapi_spec_hash: 4530d491424521c1237a73cb5cb1f025
4-
config_hash: 67f412c990647f3cb598378fa22a9db5
4+
config_hash: 501967dbe66b4bf5bcf0d508ebdc37c3

api.md

+33
Original file line numberDiff line numberDiff line change
@@ -3752,6 +3752,7 @@ from cloudflare.types.magic_transit import (
37523752
AppUpdateResponse,
37533753
AppListResponse,
37543754
AppDeleteResponse,
3755+
AppEditResponse,
37553756
)
37563757
```
37573758

@@ -3761,6 +3762,7 @@ Methods:
37613762
- <code title="put /accounts/{account_id}/magic/apps/{account_app_id}">client.magic_transit.apps.<a href="./src/cloudflare/resources/magic_transit/apps.py">update</a>(account_app_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/app_update_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/app_update_response.py">Optional[AppUpdateResponse]</a></code>
37623763
- <code title="get /accounts/{account_id}/magic/apps">client.magic_transit.apps.<a href="./src/cloudflare/resources/magic_transit/apps.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/magic_transit/app_list_response.py">SyncSinglePage[AppListResponse]</a></code>
37633764
- <code title="delete /accounts/{account_id}/magic/apps/{account_app_id}">client.magic_transit.apps.<a href="./src/cloudflare/resources/magic_transit/apps.py">delete</a>(account_app_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/app_delete_response.py">Optional[AppDeleteResponse]</a></code>
3765+
- <code title="patch /accounts/{account_id}/magic/apps/{account_app_id}">client.magic_transit.apps.<a href="./src/cloudflare/resources/magic_transit/apps.py">edit</a>(account_app_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/app_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/app_edit_response.py">Optional[AppEditResponse]</a></code>
37643766

37653767
## CfInterconnects
37663768

@@ -4458,6 +4460,18 @@ Methods:
44584460
- <code title="delete /accounts/{account_id}/rules/lists/{list_id}">client.rules.lists.<a href="./src/cloudflare/resources/rules/lists/lists.py">delete</a>(list_id, \*, account_id) -> <a href="./src/cloudflare/types/rules/list_delete_response.py">ListDeleteResponse</a></code>
44594461
- <code title="get /accounts/{account_id}/rules/lists/{list_id}">client.rules.lists.<a href="./src/cloudflare/resources/rules/lists/lists.py">get</a>(list_id, \*, account_id) -> <a href="./src/cloudflare/types/rules/list_get_response.py">ListGetResponse</a></code>
44604462

4463+
### BulkOperations
4464+
4465+
Types:
4466+
4467+
```python
4468+
from cloudflare.types.rules.lists import BulkOperationGetResponse
4469+
```
4470+
4471+
Methods:
4472+
4473+
- <code title="get /accounts/{account_id}/rules/lists/bulk_operations/{operation_id}">client.rules.lists.bulk_operations.<a href="./src/cloudflare/resources/rules/lists/bulk_operations.py">get</a>(operation_id, \*, account_id) -> <a href="./src/cloudflare/types/rules/lists/bulk_operation_get_response.py">BulkOperationGetResponse</a></code>
4474+
44614475
### Items
44624476

44634477
Types:
@@ -4470,6 +4484,7 @@ from cloudflare.types.rules.lists import (
44704484
ItemUpdateResponse,
44714485
ItemListResponse,
44724486
ItemDeleteResponse,
4487+
ItemGetResponse,
44734488
)
44744489
```
44754490

@@ -4479,6 +4494,7 @@ Methods:
44794494
- <code title="put /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/cloudflare/resources/rules/lists/items.py">update</a>(list_id, \*, account_id, \*\*<a href="src/cloudflare/types/rules/lists/item_update_params.py">params</a>) -> <a href="./src/cloudflare/types/rules/lists/item_update_response.py">ItemUpdateResponse</a></code>
44804495
- <code title="get /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/cloudflare/resources/rules/lists/items.py">list</a>(list_id, \*, account_id, \*\*<a href="src/cloudflare/types/rules/lists/item_list_params.py">params</a>) -> <a href="./src/cloudflare/types/rules/lists/item_list_response.py">ItemListResponse</a></code>
44814496
- <code title="delete /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/cloudflare/resources/rules/lists/items.py">delete</a>(list_id, \*, account_id) -> <a href="./src/cloudflare/types/rules/lists/item_delete_response.py">ItemDeleteResponse</a></code>
4497+
- <code title="get /accounts/{account_id}/rules/lists/{list_id}/items/{item_id}">client.rules.lists.items.<a href="./src/cloudflare/resources/rules/lists/items.py">get</a>(item_id, \*, account_id, list_id) -> <a href="./src/cloudflare/types/rules/lists/item_get_response.py">ItemGetResponse</a></code>
44824498

44834499
# Stream
44844500

@@ -4863,6 +4879,7 @@ Methods:
48634879
- <code title="post /accounts/{account_id}/r2/buckets">client.r2.buckets.<a href="./src/cloudflare/resources/r2/buckets/buckets.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/r2/bucket_create_params.py">params</a>) -> <a href="./src/cloudflare/types/r2/bucket.py">Bucket</a></code>
48644880
- <code title="get /accounts/{account_id}/r2/buckets">client.r2.buckets.<a href="./src/cloudflare/resources/r2/buckets/buckets.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/r2/bucket_list_params.py">params</a>) -> <a href="./src/cloudflare/types/r2/bucket_list_response.py">BucketListResponse</a></code>
48654881
- <code title="delete /accounts/{account_id}/r2/buckets/{bucket_name}">client.r2.buckets.<a href="./src/cloudflare/resources/r2/buckets/buckets.py">delete</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/r2/bucket_delete_response.py">object</a></code>
4882+
- <code title="patch /accounts/{account_id}/r2/buckets/{bucket_name}">client.r2.buckets.<a href="./src/cloudflare/resources/r2/buckets/buckets.py">edit</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/r2/bucket.py">Bucket</a></code>
48664883
- <code title="get /accounts/{account_id}/r2/buckets/{bucket_name}">client.r2.buckets.<a href="./src/cloudflare/resources/r2/buckets/buckets.py">get</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/r2/bucket.py">Bucket</a></code>
48674884

48684885
### Lifecycle
@@ -7088,6 +7105,18 @@ Methods:
70887105

70897106
## AI
70907107

7108+
### ToMarkdown
7109+
7110+
Types:
7111+
7112+
```python
7113+
from cloudflare.types.radar.ai import ToMarkdownCreateResponse
7114+
```
7115+
7116+
Methods:
7117+
7118+
- <code title="post /accounts/{account_id}/ai/tomarkdown">client.radar.ai.to_markdown.<a href="./src/cloudflare/resources/radar/ai/to_markdown.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/radar/ai/to_markdown_create_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/to_markdown_create_response.py">SyncSinglePage[ToMarkdownCreateResponse]</a></code>
7119+
70917120
### Inference
70927121

70937122
#### Summary
@@ -9250,6 +9279,7 @@ Types:
92509279
from cloudflare.types.workflows import (
92519280
WorkflowUpdateResponse,
92529281
WorkflowListResponse,
9282+
WorkflowDeleteResponse,
92539283
WorkflowGetResponse,
92549284
)
92559285
```
@@ -9258,6 +9288,7 @@ Methods:
92589288

92599289
- <code title="put /accounts/{account_id}/workflows/{workflow_name}">client.workflows.<a href="./src/cloudflare/resources/workflows/workflows.py">update</a>(workflow_name, \*, account_id, \*\*<a href="src/cloudflare/types/workflows/workflow_update_params.py">params</a>) -> <a href="./src/cloudflare/types/workflows/workflow_update_response.py">WorkflowUpdateResponse</a></code>
92609290
- <code title="get /accounts/{account_id}/workflows">client.workflows.<a href="./src/cloudflare/resources/workflows/workflows.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/workflows/workflow_list_params.py">params</a>) -> <a href="./src/cloudflare/types/workflows/workflow_list_response.py">SyncV4PagePaginationArray[WorkflowListResponse]</a></code>
9291+
- <code title="delete /accounts/{account_id}/workflows/{workflow_name}">client.workflows.<a href="./src/cloudflare/resources/workflows/workflows.py">delete</a>(workflow_name, \*, account_id) -> <a href="./src/cloudflare/types/workflows/workflow_delete_response.py">WorkflowDeleteResponse</a></code>
92619292
- <code title="get /accounts/{account_id}/workflows/{workflow_name}">client.workflows.<a href="./src/cloudflare/resources/workflows/workflows.py">get</a>(workflow_name, \*, account_id) -> <a href="./src/cloudflare/types/workflows/workflow_get_response.py">WorkflowGetResponse</a></code>
92629293

92639294
## Instances
@@ -9763,6 +9794,7 @@ from cloudflare.types.secrets_store.stores import (
97639794
SecretListResponse,
97649795
SecretDeleteResponse,
97659796
SecretBulkDeleteResponse,
9797+
SecretDuplicateResponse,
97669798
SecretEditResponse,
97679799
SecretGetResponse,
97689800
)
@@ -9774,6 +9806,7 @@ Methods:
97749806
- <code title="get /accounts/{account_id}/secrets_store/stores/{store_id}/secrets">client.secrets_store.stores.secrets.<a href="./src/cloudflare/resources/secrets_store/stores/secrets.py">list</a>(store_id, \*, account_id, \*\*<a href="src/cloudflare/types/secrets_store/stores/secret_list_params.py">params</a>) -> <a href="./src/cloudflare/types/secrets_store/stores/secret_list_response.py">SyncV4PagePaginationArray[SecretListResponse]</a></code>
97759807
- <code title="delete /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}">client.secrets_store.stores.secrets.<a href="./src/cloudflare/resources/secrets_store/stores/secrets.py">delete</a>(secret_id, \*, account_id, store_id) -> <a href="./src/cloudflare/types/secrets_store/stores/secret_delete_response.py">Optional[SecretDeleteResponse]</a></code>
97769808
- <code title="delete /accounts/{account_id}/secrets_store/stores/{store_id}/secrets">client.secrets_store.stores.secrets.<a href="./src/cloudflare/resources/secrets_store/stores/secrets.py">bulk_delete</a>(store_id, \*, account_id) -> <a href="./src/cloudflare/types/secrets_store/stores/secret_bulk_delete_response.py">SyncSinglePage[SecretBulkDeleteResponse]</a></code>
9809+
- <code title="post /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}/duplicate">client.secrets_store.stores.secrets.<a href="./src/cloudflare/resources/secrets_store/stores/secrets.py">duplicate</a>(secret_id, \*, account_id, store_id, \*\*<a href="src/cloudflare/types/secrets_store/stores/secret_duplicate_params.py">params</a>) -> <a href="./src/cloudflare/types/secrets_store/stores/secret_duplicate_response.py">Optional[SecretDuplicateResponse]</a></code>
97779810
- <code title="patch /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}">client.secrets_store.stores.secrets.<a href="./src/cloudflare/resources/secrets_store/stores/secrets.py">edit</a>(secret_id, \*, account_id, store_id, \*\*<a href="src/cloudflare/types/secrets_store/stores/secret_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/secrets_store/stores/secret_edit_response.py">Optional[SecretEditResponse]</a></code>
97789811
- <code title="get /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}">client.secrets_store.stores.secrets.<a href="./src/cloudflare/resources/secrets_store/stores/secrets.py">get</a>(secret_id, \*, account_id, store_id) -> <a href="./src/cloudflare/types/secrets_store/stores/secret_get_response.py">Optional[SecretGetResponse]</a></code>
97799812

src/cloudflare/resources/magic_transit/apps.py

+144-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
from ..._wrappers import ResultWrapper
2020
from ...pagination import SyncSinglePage, AsyncSinglePage
2121
from ..._base_client import AsyncPaginator, make_request_options
22-
from ...types.magic_transit import app_create_params, app_update_params
22+
from ...types.magic_transit import app_edit_params, app_create_params, app_update_params
23+
from ...types.magic_transit.app_edit_response import AppEditResponse
2324
from ...types.magic_transit.app_list_response import AppListResponse
2425
from ...types.magic_transit.app_create_response import AppCreateResponse
2526
from ...types.magic_transit.app_delete_response import AppDeleteResponse
@@ -253,6 +254,71 @@ def delete(
253254
cast_to=cast(Type[Optional[AppDeleteResponse]], ResultWrapper[AppDeleteResponse]),
254255
)
255256

257+
def edit(
258+
self,
259+
account_app_id: str,
260+
*,
261+
account_id: str,
262+
hostnames: List[str] | NotGiven = NOT_GIVEN,
263+
ip_subnets: List[str] | NotGiven = NOT_GIVEN,
264+
name: str | NotGiven = NOT_GIVEN,
265+
type: str | NotGiven = NOT_GIVEN,
266+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
267+
# The extra values given here take precedence over values defined on the client or passed to this method.
268+
extra_headers: Headers | None = None,
269+
extra_query: Query | None = None,
270+
extra_body: Body | None = None,
271+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
272+
) -> Optional[AppEditResponse]:
273+
"""
274+
Updates an Account App
275+
276+
Args:
277+
account_id: Identifier
278+
279+
account_app_id: Identifier
280+
281+
hostnames: FQDNs to associate with traffic decisions.
282+
283+
ip_subnets: CIDRs to associate with traffic decisions.
284+
285+
name: Display name for the app.
286+
287+
type: Category of the app.
288+
289+
extra_headers: Send extra headers
290+
291+
extra_query: Add additional query parameters to the request
292+
293+
extra_body: Add additional JSON properties to the request
294+
295+
timeout: Override the client-level default timeout for this request, in seconds
296+
"""
297+
if not account_id:
298+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
299+
if not account_app_id:
300+
raise ValueError(f"Expected a non-empty value for `account_app_id` but received {account_app_id!r}")
301+
return self._patch(
302+
f"/accounts/{account_id}/magic/apps/{account_app_id}",
303+
body=maybe_transform(
304+
{
305+
"hostnames": hostnames,
306+
"ip_subnets": ip_subnets,
307+
"name": name,
308+
"type": type,
309+
},
310+
app_edit_params.AppEditParams,
311+
),
312+
options=make_request_options(
313+
extra_headers=extra_headers,
314+
extra_query=extra_query,
315+
extra_body=extra_body,
316+
timeout=timeout,
317+
post_parser=ResultWrapper[Optional[AppEditResponse]]._unwrapper,
318+
),
319+
cast_to=cast(Type[Optional[AppEditResponse]], ResultWrapper[AppEditResponse]),
320+
)
321+
256322

257323
class AsyncAppsResource(AsyncAPIResource):
258324
@cached_property
@@ -479,6 +545,71 @@ async def delete(
479545
cast_to=cast(Type[Optional[AppDeleteResponse]], ResultWrapper[AppDeleteResponse]),
480546
)
481547

548+
async def edit(
549+
self,
550+
account_app_id: str,
551+
*,
552+
account_id: str,
553+
hostnames: List[str] | NotGiven = NOT_GIVEN,
554+
ip_subnets: List[str] | NotGiven = NOT_GIVEN,
555+
name: str | NotGiven = NOT_GIVEN,
556+
type: str | NotGiven = NOT_GIVEN,
557+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
558+
# The extra values given here take precedence over values defined on the client or passed to this method.
559+
extra_headers: Headers | None = None,
560+
extra_query: Query | None = None,
561+
extra_body: Body | None = None,
562+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
563+
) -> Optional[AppEditResponse]:
564+
"""
565+
Updates an Account App
566+
567+
Args:
568+
account_id: Identifier
569+
570+
account_app_id: Identifier
571+
572+
hostnames: FQDNs to associate with traffic decisions.
573+
574+
ip_subnets: CIDRs to associate with traffic decisions.
575+
576+
name: Display name for the app.
577+
578+
type: Category of the app.
579+
580+
extra_headers: Send extra headers
581+
582+
extra_query: Add additional query parameters to the request
583+
584+
extra_body: Add additional JSON properties to the request
585+
586+
timeout: Override the client-level default timeout for this request, in seconds
587+
"""
588+
if not account_id:
589+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
590+
if not account_app_id:
591+
raise ValueError(f"Expected a non-empty value for `account_app_id` but received {account_app_id!r}")
592+
return await self._patch(
593+
f"/accounts/{account_id}/magic/apps/{account_app_id}",
594+
body=await async_maybe_transform(
595+
{
596+
"hostnames": hostnames,
597+
"ip_subnets": ip_subnets,
598+
"name": name,
599+
"type": type,
600+
},
601+
app_edit_params.AppEditParams,
602+
),
603+
options=make_request_options(
604+
extra_headers=extra_headers,
605+
extra_query=extra_query,
606+
extra_body=extra_body,
607+
timeout=timeout,
608+
post_parser=ResultWrapper[Optional[AppEditResponse]]._unwrapper,
609+
),
610+
cast_to=cast(Type[Optional[AppEditResponse]], ResultWrapper[AppEditResponse]),
611+
)
612+
482613

483614
class AppsResourceWithRawResponse:
484615
def __init__(self, apps: AppsResource) -> None:
@@ -496,6 +627,9 @@ def __init__(self, apps: AppsResource) -> None:
496627
self.delete = to_raw_response_wrapper(
497628
apps.delete,
498629
)
630+
self.edit = to_raw_response_wrapper(
631+
apps.edit,
632+
)
499633

500634

501635
class AsyncAppsResourceWithRawResponse:
@@ -514,6 +648,9 @@ def __init__(self, apps: AsyncAppsResource) -> None:
514648
self.delete = async_to_raw_response_wrapper(
515649
apps.delete,
516650
)
651+
self.edit = async_to_raw_response_wrapper(
652+
apps.edit,
653+
)
517654

518655

519656
class AppsResourceWithStreamingResponse:
@@ -532,6 +669,9 @@ def __init__(self, apps: AppsResource) -> None:
532669
self.delete = to_streamed_response_wrapper(
533670
apps.delete,
534671
)
672+
self.edit = to_streamed_response_wrapper(
673+
apps.edit,
674+
)
535675

536676

537677
class AsyncAppsResourceWithStreamingResponse:
@@ -550,3 +690,6 @@ def __init__(self, apps: AsyncAppsResource) -> None:
550690
self.delete = async_to_streamed_response_wrapper(
551691
apps.delete,
552692
)
693+
self.edit = async_to_streamed_response_wrapper(
694+
apps.edit,
695+
)

0 commit comments

Comments
 (0)