Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent fb43f24 commit 0e084cf
Show file tree
Hide file tree
Showing 38 changed files with 718 additions and 219 deletions.
7 changes: 3 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ from cloudflare.types import (
PaginationInfo,
ResponseInfo,
Result,
Tunnel,
)
```

Expand Down Expand Up @@ -3042,7 +3043,7 @@ from cloudflare.types.rulesets import (
ChallengeRule,
CompressResponseRule,
ExecuteRule,
JsChallengeRule,
JSChallengeRule,
LogRule,
Logging,
ManagedChallengeRule,
Expand Down Expand Up @@ -4595,13 +4596,12 @@ Methods:
- <code title="delete /accounts/{account_id}/r2/buckets/{bucket_name}/sippy">client.r2.sippy.<a href="./src/cloudflare/resources/r2/sippy.py">delete</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/r2/sippy_delete_response.py">SippyDeleteResponse</a></code>
- <code title="get /accounts/{account_id}/r2/buckets/{bucket_name}/sippy">client.r2.sippy.<a href="./src/cloudflare/resources/r2/sippy.py">get</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/r2/sippy.py">Sippy</a></code>

# WARPConnectorResource
# WARPConnector

Types:

```python
from cloudflare.types import (
WARPConnector,
WARPConnectorCreateResponse,
WARPConnectorListResponse,
WARPConnectorDeleteResponse,
Expand Down Expand Up @@ -5465,7 +5465,6 @@ Types:
```python
from cloudflare.types.zero_trust import (
Connection,
Tunnel,
TunnelCreateResponse,
TunnelListResponse,
TunnelDeleteResponse,
Expand Down
16 changes: 8 additions & 8 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Cloudflare(SyncAPIClient):
alerting: resources.Alerting
d1: resources.D1Resource
r2: resources.R2
warp_connector: resources.WARPConnectorResource
warp_connector: resources.WARPConnector
workers_for_platforms: resources.WorkersForPlatforms
zero_trust: resources.ZeroTrust
challenges: resources.Challenges
Expand Down Expand Up @@ -265,7 +265,7 @@ def __init__(
self.alerting = resources.Alerting(self)
self.d1 = resources.D1Resource(self)
self.r2 = resources.R2(self)
self.warp_connector = resources.WARPConnectorResource(self)
self.warp_connector = resources.WARPConnector(self)
self.workers_for_platforms = resources.WorkersForPlatforms(self)
self.zero_trust = resources.ZeroTrust(self)
self.challenges = resources.Challenges(self)
Expand Down Expand Up @@ -523,7 +523,7 @@ class AsyncCloudflare(AsyncAPIClient):
alerting: resources.AsyncAlerting
d1: resources.AsyncD1Resource
r2: resources.AsyncR2
warp_connector: resources.AsyncWARPConnectorResource
warp_connector: resources.AsyncWARPConnector
workers_for_platforms: resources.AsyncWorkersForPlatforms
zero_trust: resources.AsyncZeroTrust
challenges: resources.AsyncChallenges
Expand Down Expand Up @@ -678,7 +678,7 @@ def __init__(
self.alerting = resources.AsyncAlerting(self)
self.d1 = resources.AsyncD1Resource(self)
self.r2 = resources.AsyncR2(self)
self.warp_connector = resources.AsyncWARPConnectorResource(self)
self.warp_connector = resources.AsyncWARPConnector(self)
self.workers_for_platforms = resources.AsyncWorkersForPlatforms(self)
self.zero_trust = resources.AsyncZeroTrust(self)
self.challenges = resources.AsyncChallenges(self)
Expand Down Expand Up @@ -937,7 +937,7 @@ def __init__(self, client: Cloudflare) -> None:
self.alerting = resources.AlertingWithRawResponse(client.alerting)
self.d1 = resources.D1ResourceWithRawResponse(client.d1)
self.r2 = resources.R2WithRawResponse(client.r2)
self.warp_connector = resources.WARPConnectorResourceWithRawResponse(client.warp_connector)
self.warp_connector = resources.WARPConnectorWithRawResponse(client.warp_connector)
self.workers_for_platforms = resources.WorkersForPlatformsWithRawResponse(client.workers_for_platforms)
self.zero_trust = resources.ZeroTrustWithRawResponse(client.zero_trust)
self.challenges = resources.ChallengesWithRawResponse(client.challenges)
Expand Down Expand Up @@ -1027,7 +1027,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.alerting = resources.AsyncAlertingWithRawResponse(client.alerting)
self.d1 = resources.AsyncD1ResourceWithRawResponse(client.d1)
self.r2 = resources.AsyncR2WithRawResponse(client.r2)
self.warp_connector = resources.AsyncWARPConnectorResourceWithRawResponse(client.warp_connector)
self.warp_connector = resources.AsyncWARPConnectorWithRawResponse(client.warp_connector)
self.workers_for_platforms = resources.AsyncWorkersForPlatformsWithRawResponse(client.workers_for_platforms)
self.zero_trust = resources.AsyncZeroTrustWithRawResponse(client.zero_trust)
self.challenges = resources.AsyncChallengesWithRawResponse(client.challenges)
Expand Down Expand Up @@ -1117,7 +1117,7 @@ def __init__(self, client: Cloudflare) -> None:
self.alerting = resources.AlertingWithStreamingResponse(client.alerting)
self.d1 = resources.D1ResourceWithStreamingResponse(client.d1)
self.r2 = resources.R2WithStreamingResponse(client.r2)
self.warp_connector = resources.WARPConnectorResourceWithStreamingResponse(client.warp_connector)
self.warp_connector = resources.WARPConnectorWithStreamingResponse(client.warp_connector)
self.workers_for_platforms = resources.WorkersForPlatformsWithStreamingResponse(client.workers_for_platforms)
self.zero_trust = resources.ZeroTrustWithStreamingResponse(client.zero_trust)
self.challenges = resources.ChallengesWithStreamingResponse(client.challenges)
Expand Down Expand Up @@ -1211,7 +1211,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.alerting = resources.AsyncAlertingWithStreamingResponse(client.alerting)
self.d1 = resources.AsyncD1ResourceWithStreamingResponse(client.d1)
self.r2 = resources.AsyncR2WithStreamingResponse(client.r2)
self.warp_connector = resources.AsyncWARPConnectorResourceWithStreamingResponse(client.warp_connector)
self.warp_connector = resources.AsyncWARPConnectorWithStreamingResponse(client.warp_connector)
self.workers_for_platforms = resources.AsyncWorkersForPlatformsWithStreamingResponse(
client.workers_for_platforms
)
Expand Down
24 changes: 12 additions & 12 deletions src/cloudflare/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,12 @@
AsyncLoadBalancersWithStreamingResponse,
)
from .warp_connector import (
WARPConnectorResource,
AsyncWARPConnectorResource,
WARPConnectorResourceWithRawResponse,
AsyncWARPConnectorResourceWithRawResponse,
WARPConnectorResourceWithStreamingResponse,
AsyncWARPConnectorResourceWithStreamingResponse,
WARPConnector,
AsyncWARPConnector,
WARPConnectorWithRawResponse,
AsyncWARPConnectorWithRawResponse,
WARPConnectorWithStreamingResponse,
AsyncWARPConnectorWithStreamingResponse,
)
from .durable_objects import (
DurableObjects,
Expand Down Expand Up @@ -1020,12 +1020,12 @@
"AsyncR2WithRawResponse",
"R2WithStreamingResponse",
"AsyncR2WithStreamingResponse",
"WARPConnectorResource",
"AsyncWARPConnectorResource",
"WARPConnectorResourceWithRawResponse",
"AsyncWARPConnectorResourceWithRawResponse",
"WARPConnectorResourceWithStreamingResponse",
"AsyncWARPConnectorResourceWithStreamingResponse",
"WARPConnector",
"AsyncWARPConnector",
"WARPConnectorWithRawResponse",
"AsyncWARPConnectorWithRawResponse",
"WARPConnectorWithStreamingResponse",
"AsyncWARPConnectorWithStreamingResponse",
"WorkersForPlatforms",
"AsyncWorkersForPlatforms",
"WorkersForPlatformsWithRawResponse",
Expand Down
38 changes: 19 additions & 19 deletions src/cloudflare/resources/warp_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
make_request_options,
)

__all__ = ["WARPConnectorResource", "AsyncWARPConnectorResource"]
__all__ = ["WARPConnector", "AsyncWARPConnector"]


class WARPConnectorResource(SyncAPIResource):
class WARPConnector(SyncAPIResource):
@cached_property
def with_raw_response(self) -> WARPConnectorResourceWithRawResponse:
return WARPConnectorResourceWithRawResponse(self)
def with_raw_response(self) -> WARPConnectorWithRawResponse:
return WARPConnectorWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> WARPConnectorResourceWithStreamingResponse:
return WARPConnectorResourceWithStreamingResponse(self)
def with_streaming_response(self) -> WARPConnectorWithStreamingResponse:
return WARPConnectorWithStreamingResponse(self)

def create(
self,
Expand Down Expand Up @@ -393,14 +393,14 @@ def token(
)


class AsyncWARPConnectorResource(AsyncAPIResource):
class AsyncWARPConnector(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncWARPConnectorResourceWithRawResponse:
return AsyncWARPConnectorResourceWithRawResponse(self)
def with_raw_response(self) -> AsyncWARPConnectorWithRawResponse:
return AsyncWARPConnectorWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncWARPConnectorResourceWithStreamingResponse:
return AsyncWARPConnectorResourceWithStreamingResponse(self)
def with_streaming_response(self) -> AsyncWARPConnectorWithStreamingResponse:
return AsyncWARPConnectorWithStreamingResponse(self)

async def create(
self,
Expand Down Expand Up @@ -746,8 +746,8 @@ async def token(
)


class WARPConnectorResourceWithRawResponse:
def __init__(self, warp_connector: WARPConnectorResource) -> None:
class WARPConnectorWithRawResponse:
def __init__(self, warp_connector: WARPConnector) -> None:
self._warp_connector = warp_connector

self.create = to_raw_response_wrapper(
Expand All @@ -770,8 +770,8 @@ def __init__(self, warp_connector: WARPConnectorResource) -> None:
)


class AsyncWARPConnectorResourceWithRawResponse:
def __init__(self, warp_connector: AsyncWARPConnectorResource) -> None:
class AsyncWARPConnectorWithRawResponse:
def __init__(self, warp_connector: AsyncWARPConnector) -> None:
self._warp_connector = warp_connector

self.create = async_to_raw_response_wrapper(
Expand All @@ -794,8 +794,8 @@ def __init__(self, warp_connector: AsyncWARPConnectorResource) -> None:
)


class WARPConnectorResourceWithStreamingResponse:
def __init__(self, warp_connector: WARPConnectorResource) -> None:
class WARPConnectorWithStreamingResponse:
def __init__(self, warp_connector: WARPConnector) -> None:
self._warp_connector = warp_connector

self.create = to_streamed_response_wrapper(
Expand All @@ -818,8 +818,8 @@ def __init__(self, warp_connector: WARPConnectorResource) -> None:
)


class AsyncWARPConnectorResourceWithStreamingResponse:
def __init__(self, warp_connector: AsyncWARPConnectorResource) -> None:
class AsyncWARPConnectorWithStreamingResponse:
def __init__(self, warp_connector: AsyncWARPConnector) -> None:
self._warp_connector = warp_connector

self.create = async_to_streamed_response_wrapper(
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .origin import Origin as Origin
from .shared import (
Result as Result,
Tunnel as Tunnel,
AuditLog as AuditLog,
ErrorData as ErrorData,
Identifier as Identifier,
Expand Down Expand Up @@ -78,7 +79,6 @@
from .ip_list_params import IPListParams as IPListParams
from .labeled_region import LabeledRegion as LabeledRegion
from .migration_step import MigrationStep as MigrationStep
from .warp_connector import WARPConnector as WARPConnector
from .allowed_origins import AllowedOrigins as AllowedOrigins
from .firewall_filter import FirewallFilter as FirewallFilter
from .origin_steering import OriginSteering as OriginSteering
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/ruleset_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ChallengeRuleParam,
SetConfigRuleParam,
ServeErrorRuleParam,
JsChallengeRuleParam,
JSChallengeRuleParam,
CompressResponseRuleParam,
ManagedChallengeRuleParam,
SetCacheSettingsRuleParam,
Expand Down Expand Up @@ -80,7 +80,7 @@ class RulesetCreateParams(TypedDict, total=False):
ChallengeRuleParam,
CompressResponseRuleParam,
ExecuteRuleParam,
JsChallengeRuleParam,
JSChallengeRuleParam,
LogRuleParam,
ManagedChallengeRuleParam,
RedirectRuleParam,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/ruleset_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ChallengeRule,
SetConfigRule,
ServeErrorRule,
JsChallengeRule,
JSChallengeRule,
CompressResponseRule,
ManagedChallengeRule,
SetCacheSettingsRule,
Expand All @@ -30,7 +30,7 @@
ChallengeRule,
CompressResponseRule,
ExecuteRule,
JsChallengeRule,
JSChallengeRule,
LogRule,
ManagedChallengeRule,
RedirectRule,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/ruleset_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ChallengeRule,
SetConfigRule,
ServeErrorRule,
JsChallengeRule,
JSChallengeRule,
CompressResponseRule,
ManagedChallengeRule,
SetCacheSettingsRule,
Expand All @@ -30,7 +30,7 @@
ChallengeRule,
CompressResponseRule,
ExecuteRule,
JsChallengeRule,
JSChallengeRule,
LogRule,
ManagedChallengeRule,
RedirectRule,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/ruleset_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ChallengeRuleParam,
SetConfigRuleParam,
ServeErrorRuleParam,
JsChallengeRuleParam,
JSChallengeRuleParam,
CompressResponseRuleParam,
ManagedChallengeRuleParam,
SetCacheSettingsRuleParam,
Expand Down Expand Up @@ -78,7 +78,7 @@ class RulesetUpdateParams(TypedDict, total=False):
ChallengeRuleParam,
CompressResponseRuleParam,
ExecuteRuleParam,
JsChallengeRuleParam,
JSChallengeRuleParam,
LogRuleParam,
ManagedChallengeRuleParam,
RedirectRuleParam,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/ruleset_update_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ChallengeRule,
SetConfigRule,
ServeErrorRule,
JsChallengeRule,
JSChallengeRule,
CompressResponseRule,
ManagedChallengeRule,
SetCacheSettingsRule,
Expand All @@ -30,7 +30,7 @@
ChallengeRule,
CompressResponseRule,
ExecuteRule,
JsChallengeRule,
JSChallengeRule,
LogRule,
ManagedChallengeRule,
RedirectRule,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/rulesets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from .rule_edit_params import RuleEditParams as RuleEditParams
from .score_rule_param import ScoreRuleParam as ScoreRuleParam
from .serve_error_rule import ServeErrorRule as ServeErrorRule
from .js_challenge_rule import JsChallengeRule as JsChallengeRule
from .js_challenge_rule import JSChallengeRule as JSChallengeRule
from .execute_rule_param import ExecuteRuleParam as ExecuteRuleParam
from .phase_get_response import PhaseGetResponse as PhaseGetResponse
from .rewrite_rule_param import RewriteRuleParam as RewriteRuleParam
Expand All @@ -40,7 +40,7 @@
from .managed_challenge_rule import ManagedChallengeRule as ManagedChallengeRule
from .rewrite_uri_part_param import RewriteURIPartParam as RewriteURIPartParam
from .serve_error_rule_param import ServeErrorRuleParam as ServeErrorRuleParam
from .js_challenge_rule_param import JsChallengeRuleParam as JsChallengeRuleParam
from .js_challenge_rule_param import JSChallengeRuleParam as JSChallengeRuleParam
from .set_cache_settings_rule import SetCacheSettingsRule as SetCacheSettingsRule
from .compress_response_rule_param import CompressResponseRuleParam as CompressResponseRuleParam
from .managed_challenge_rule_param import ManagedChallengeRuleParam as ManagedChallengeRuleParam
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/rulesets/js_challenge_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from .logging import Logging
from ..._models import BaseModel

__all__ = ["JsChallengeRule"]
__all__ = ["JSChallengeRule"]


class JsChallengeRule(BaseModel):
class JSChallengeRule(BaseModel):
last_updated: datetime
"""The timestamp of when the rule was last modified."""

Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/rulesets/js_challenge_rule_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

from .logging_param import LoggingParam

__all__ = ["JsChallengeRuleParam"]
__all__ = ["JSChallengeRuleParam"]


class JsChallengeRuleParam(TypedDict, total=False):
class JSChallengeRuleParam(TypedDict, total=False):
id: str
"""The unique ID of the rule."""

Expand Down
Loading

0 comments on commit 0e084cf

Please sign in to comment.