Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #254

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2932,12 +2932,7 @@ Types:

```python
from cloudflare.types import (
BlockRule,
ExecuteRule,
LogRule,
RequestRule,
Ruleset,
SkipRule,
RulesetCreateResponse,
RulesetUpdateResponse,
RulesetGetResponse,
Expand Down
5 changes: 2 additions & 3 deletions src/cloudflare/resources/rulesets/phases/phases.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import httpx

from ....types import RequestRuleParam
from .versions import (
Versions,
AsyncVersions,
Expand Down Expand Up @@ -79,7 +78,7 @@ def update(
"magic_transit_managed",
],
*,
rules: Iterable[RequestRuleParam],
rules: Iterable[phase_update_params.Rule],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -312,7 +311,7 @@ async def update(
"magic_transit_managed",
],
*,
rules: Iterable[RequestRuleParam],
rules: Iterable[phase_update_params.Rule],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down
48 changes: 24 additions & 24 deletions src/cloudflare/resources/rulesets/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.BlockRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.RulesetsBlockRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -115,7 +115,7 @@ def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["execute"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.ExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.RulesetsExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -235,7 +235,7 @@ def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.SkipRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.RulesetsSkipRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -294,10 +294,10 @@ def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | Literal["execute"] | Literal["log"] | Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.BlockRuleActionParameters
| rule_create_params.ExecuteRuleActionParameters
action_parameters: rule_create_params.RulesetsBlockRuleActionParameters
| rule_create_params.RulesetsExecuteRuleActionParameters
| object
| rule_create_params.SkipRuleActionParameters
| rule_create_params.RulesetsSkipRuleActionParameters
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -428,7 +428,7 @@ def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.BlockRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.RulesetsBlockRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -489,7 +489,7 @@ def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["execute"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.ExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.RulesetsExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -611,7 +611,7 @@ def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.SkipRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.RulesetsSkipRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -672,10 +672,10 @@ def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | Literal["execute"] | Literal["log"] | Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.BlockRuleActionParameters
| rule_edit_params.ExecuteRuleActionParameters
action_parameters: rule_edit_params.RulesetsBlockRuleActionParameters
| rule_edit_params.RulesetsExecuteRuleActionParameters
| object
| rule_edit_params.SkipRuleActionParameters
| rule_edit_params.RulesetsSkipRuleActionParameters
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -752,7 +752,7 @@ async def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.BlockRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.RulesetsBlockRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -812,7 +812,7 @@ async def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["execute"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.ExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.RulesetsExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -932,7 +932,7 @@ async def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.SkipRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.RulesetsSkipRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -991,10 +991,10 @@ async def create(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | Literal["execute"] | Literal["log"] | Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_create_params.BlockRuleActionParameters
| rule_create_params.ExecuteRuleActionParameters
action_parameters: rule_create_params.RulesetsBlockRuleActionParameters
| rule_create_params.RulesetsExecuteRuleActionParameters
| object
| rule_create_params.SkipRuleActionParameters
| rule_create_params.RulesetsSkipRuleActionParameters
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1125,7 +1125,7 @@ async def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.BlockRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.RulesetsBlockRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1186,7 +1186,7 @@ async def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["execute"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.ExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.RulesetsExecuteRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1308,7 +1308,7 @@ async def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.SkipRuleActionParameters | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.RulesetsSkipRuleActionParameters | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
expression: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1369,10 +1369,10 @@ async def edit(
zone_id: str | NotGiven = NOT_GIVEN,
id: str | NotGiven = NOT_GIVEN,
action: Literal["block"] | Literal["execute"] | Literal["log"] | Literal["skip"] | NotGiven = NOT_GIVEN,
action_parameters: rule_edit_params.BlockRuleActionParameters
| rule_edit_params.ExecuteRuleActionParameters
action_parameters: rule_edit_params.RulesetsBlockRuleActionParameters
| rule_edit_params.RulesetsExecuteRuleActionParameters
| object
| rule_edit_params.SkipRuleActionParameters
| rule_edit_params.RulesetsSkipRuleActionParameters
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
Expand Down
9 changes: 4 additions & 5 deletions src/cloudflare/resources/rulesets/rulesets.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
)
from ...types import (
Ruleset,
RequestRuleParam,
RulesetGetResponse,
RulesetCreateResponse,
RulesetUpdateResponse,
Expand Down Expand Up @@ -116,7 +115,7 @@ def create(
"magic_transit_ids_managed",
"magic_transit_managed",
],
rules: Iterable[RequestRuleParam],
rules: Iterable[ruleset_create_params.Rule],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -194,7 +193,7 @@ def update(
self,
ruleset_id: str,
*,
rules: Iterable[RequestRuleParam],
rules: Iterable[ruleset_update_params.Rule],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -521,7 +520,7 @@ async def create(
"magic_transit_ids_managed",
"magic_transit_managed",
],
rules: Iterable[RequestRuleParam],
rules: Iterable[ruleset_create_params.Rule],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -599,7 +598,7 @@ async def update(
self,
ruleset_id: str,
*,
rules: Iterable[RequestRuleParam],
rules: Iterable[ruleset_update_params.Rule],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down
10 changes: 0 additions & 10 deletions src/cloudflare/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@
from .snippet import Snippet as Snippet
from .edge_ips import EdgeIPs as EdgeIPs
from .hostname import Hostname as Hostname
from .log_rule import LogRule as LogRule
from .settings import Settings as Settings
from .calls_app import CallsApp as CallsApp
from .component import Component as Component
from .dns_param import DNSParam as DNSParam
from .page_rule import PageRule as PageRule
from .rate_plan import RatePlan as RatePlan
from .skip_rule import SkipRule as SkipRule
from .block_rule import BlockRule as BlockRule
from .d1_binding import D1Binding as D1Binding
from .hyperdrive import Hyperdrive as Hyperdrive
from .membership import Membership as Membership
Expand All @@ -64,11 +61,9 @@
from .route_param import RouteParam as RouteParam
from .rules_param import RulesParam as RulesParam
from .check_region import CheckRegion as CheckRegion
from .execute_rule import ExecuteRule as ExecuteRule
from .header_param import HeaderParam as HeaderParam
from .health_check import HealthCheck as HealthCheck
from .origin_param import OriginParam as OriginParam
from .request_rule import RequestRule as RequestRule
from .targes_param import TargesParam as TargesParam
from .tunnel_param import TunnelParam as TunnelParam
from .waiting_room import WaitingRoom as WaitingRoom
Expand All @@ -82,17 +77,14 @@
from .hostname_param import HostnameParam as HostnameParam
from .ip_list_params import IPListParams as IPListParams
from .labeled_region import LabeledRegion as LabeledRegion
from .log_rule_param import LogRuleParam as LogRuleParam
from .warp_connector import WARPConnector as WARPConnector
from .allowed_origins import AllowedOrigins as AllowedOrigins
from .custom_hostname import CustomHostname as CustomHostname
from .firewall_filter import FirewallFilter as FirewallFilter
from .origin_steering import OriginSteering as OriginSteering
from .random_steering import RandomSteering as RandomSteering
from .service_binding import ServiceBinding as ServiceBinding
from .skip_rule_param import SkipRuleParam as SkipRuleParam
from .adaptive_routing import AdaptiveRouting as AdaptiveRouting
from .block_rule_param import BlockRuleParam as BlockRuleParam
from .geo_restrictions import GeoRestrictions as GeoRestrictions
from .ip_list_response import IPListResponse as IPListResponse
from .mtls_certificate import MTLSCertificate as MTLSCertificate
Expand All @@ -117,14 +109,12 @@
from .client_certificate import ClientCertificate as ClientCertificate
from .custom_certificate import CustomCertificate as CustomCertificate
from .dnssec_edit_params import DNSSECEditParams as DNSSECEditParams
from .execute_rule_param import ExecuteRuleParam as ExecuteRuleParam
from .filter_list_params import FilterListParams as FilterListParams
from .health_check_param import HealthCheckParam as HealthCheckParam
from .http_configuration import HTTPConfiguration as HTTPConfiguration
from .pcap_create_params import PCAPCreateParams as PCAPCreateParams
from .pcap_list_response import PCAPListResponse as PCAPListResponse
from .queue_get_response import QueueGetResponse as QueueGetResponse
from .request_rule_param import RequestRuleParam as RequestRuleParam
from .stream_list_params import StreamListParams as StreamListParams
from .zone_create_params import ZoneCreateParams as ZoneCreateParams
from .account_list_params import AccountListParams as AccountListParams
Expand Down
61 changes: 0 additions & 61 deletions src/cloudflare/types/block_rule.py

This file was deleted.

Loading