Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Apr 24, 2024
1 parent 60f303c commit 6bde864
Show file tree
Hide file tree
Showing 236 changed files with 867 additions and 10,129 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 1274
configured_endpoints: 1251
159 changes: 30 additions & 129 deletions api.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
make_request_options,
)
from ...types.certificate_authorities import (
HostnameAssociationItem,
HostnameAssociation,
HostnameAssociationGetResponse,
HostnameAssociationUpdateResponse,
hostname_association_get_params,
Expand All @@ -47,7 +47,7 @@ def update(
self,
*,
zone_id: str,
hostnames: List[HostnameAssociationItem] | NotGiven = NOT_GIVEN,
hostnames: List[HostnameAssociation] | NotGiven = NOT_GIVEN,
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -157,7 +157,7 @@ async def update(
self,
*,
zone_id: str,
hostnames: List[HostnameAssociationItem] | NotGiven = NOT_GIVEN,
hostnames: List[HostnameAssociation] | NotGiven = NOT_GIVEN,
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down
22 changes: 11 additions & 11 deletions src/cloudflare/resources/challenges/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from ...types.challenges import (
Widget,
WidgetDomain,
WidgetDomainItem,
WidgetListResponse,
widget_list_params,
widget_create_params,
widget_update_params,
Expand All @@ -52,7 +52,7 @@ def create(
self,
*,
account_id: str,
domains: List[WidgetDomainItem],
domains: List[WidgetDomain],
mode: Literal["non-interactive", "invisible", "managed"],
name: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -148,7 +148,7 @@ def update(
sitekey: str,
*,
account_id: str,
domains: List[WidgetDomainItem],
domains: List[WidgetDomain],
mode: Literal["non-interactive", "invisible", "managed"],
name: str,
bot_fight_mode: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -232,7 +232,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncV4PagePaginationArray[WidgetDomain]:
) -> SyncV4PagePaginationArray[WidgetListResponse]:
"""
Lists all turnstile widgets of an account.
Expand All @@ -259,7 +259,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/challenges/widgets",
page=SyncV4PagePaginationArray[WidgetDomain],
page=SyncV4PagePaginationArray[WidgetListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -275,7 +275,7 @@ def list(
widget_list_params.WidgetListParams,
),
),
model=WidgetDomain,
model=WidgetListResponse,
)

def delete(
Expand Down Expand Up @@ -436,7 +436,7 @@ async def create(
self,
*,
account_id: str,
domains: List[WidgetDomainItem],
domains: List[WidgetDomain],
mode: Literal["non-interactive", "invisible", "managed"],
name: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -532,7 +532,7 @@ async def update(
sitekey: str,
*,
account_id: str,
domains: List[WidgetDomainItem],
domains: List[WidgetDomain],
mode: Literal["non-interactive", "invisible", "managed"],
name: str,
bot_fight_mode: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -616,7 +616,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[WidgetDomain, AsyncV4PagePaginationArray[WidgetDomain]]:
) -> AsyncPaginator[WidgetListResponse, AsyncV4PagePaginationArray[WidgetListResponse]]:
"""
Lists all turnstile widgets of an account.
Expand All @@ -643,7 +643,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/challenges/widgets",
page=AsyncV4PagePaginationArray[WidgetDomain],
page=AsyncV4PagePaginationArray[WidgetListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -659,7 +659,7 @@ def list(
widget_list_params.WidgetListParams,
),
),
model=WidgetDomain,
model=WidgetListResponse,
)

async def delete(
Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/cloudforce_one/requests/priority.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
)
from ....types.cloudforce_one import Item, Quota
from ....types.cloudforce_one.requests import (
Label,
Priority,
LabelItem,
PriorityDeleteResponse,
priority_create_params,
priority_update_params,
Expand All @@ -49,7 +49,7 @@ def create(
self,
account_identifier: str,
*,
labels: List[LabelItem],
labels: List[Label],
priority: int,
requirement: str,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],
Expand Down Expand Up @@ -110,7 +110,7 @@ def update(
priority_identifer: str,
*,
account_identifier: str,
labels: List[LabelItem],
labels: List[Label],
priority: int,
requirement: str,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],
Expand Down Expand Up @@ -316,7 +316,7 @@ async def create(
self,
account_identifier: str,
*,
labels: List[LabelItem],
labels: List[Label],
priority: int,
requirement: str,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],
Expand Down Expand Up @@ -377,7 +377,7 @@ async def update(
priority_identifer: str,
*,
account_identifier: str,
labels: List[LabelItem],
labels: List[Label],
priority: int,
requirement: str,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],
Expand Down
16 changes: 8 additions & 8 deletions src/cloudflare/resources/cloudforce_one/requests/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Any, Type, Union, cast
from typing import Any, List, Type, Union, cast
from datetime import datetime
from typing_extensions import Literal

Expand Down Expand Up @@ -45,8 +45,8 @@
)
from ....types.cloudforce_one import (
Item,
List,
Quota,
ListItem,
RequestTypes,
RequestConstants,
RequestDeleteResponse,
Expand Down Expand Up @@ -233,7 +233,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncV4PagePaginationArray[ListItem]:
) -> SyncV4PagePaginationArray[List]:
"""
List Requests
Expand Down Expand Up @@ -272,7 +272,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
return self._get_api_list(
f"/accounts/{account_identifier}/cloudforce-one/requests",
page=SyncV4PagePaginationArray[ListItem],
page=SyncV4PagePaginationArray[List],
body=maybe_transform(
{
"page": page,
Expand All @@ -291,7 +291,7 @@ def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
model=ListItem,
model=List,
method="post",
)

Expand Down Expand Up @@ -681,7 +681,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[ListItem, AsyncV4PagePaginationArray[ListItem]]:
) -> AsyncPaginator[List, AsyncV4PagePaginationArray[List]]:
"""
List Requests
Expand Down Expand Up @@ -720,7 +720,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
return self._get_api_list(
f"/accounts/{account_identifier}/cloudforce-one/requests",
page=AsyncV4PagePaginationArray[ListItem],
page=AsyncV4PagePaginationArray[List],
body=maybe_transform(
{
"page": page,
Expand All @@ -739,7 +739,7 @@ def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
model=ListItem,
model=List,
method="post",
)

Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/resources/dns/firewall/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
from ...._wrappers import ResultWrapper
from ....types.dns import (
Firewall,
FirewallIPsParam,
UpstreamIPsParam,
FirewallIPsItemParam,
AttackMitigationParam,
FirewallDeleteResponse,
firewall_edit_params,
Expand Down Expand Up @@ -250,7 +250,7 @@ def edit(
*,
account_id: str,
deprecate_any_requests: bool,
dns_firewall_ips: List[FirewallIPsItemParam],
dns_firewall_ips: List[FirewallIPsParam],
ecs_fallback: bool,
maximum_cache_ttl: float,
minimum_cache_ttl: float,
Expand Down Expand Up @@ -581,7 +581,7 @@ async def edit(
*,
account_id: str,
deprecate_any_requests: bool,
dns_firewall_ips: List[FirewallIPsItemParam],
dns_firewall_ips: List[FirewallIPsParam],
ecs_fallback: bool,
maximum_cache_ttl: float,
minimum_cache_ttl: float,
Expand Down
Loading

0 comments on commit 6bde864

Please sign in to comment.