Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 28, 2024
1 parent 16b6e68 commit 71da3ed
Show file tree
Hide file tree
Showing 26 changed files with 348 additions and 383 deletions.
35 changes: 20 additions & 15 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3080,23 +3080,23 @@ Methods:
Types:

```python
from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse, RulesetListResponse
from cloudflare.types import Ruleset, RulesetListResponse
```

Methods:

- <code title="post /{account_or_zone}/{account_or_zone_id}/rulesets">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">create</a>(\*, account_id, zone_id, \*\*<a href="src/cloudflare/types/ruleset_create_params.py">params</a>) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="put /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">update</a>(ruleset_id, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/ruleset_update_params.py">params</a>) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="post /{account_or_zone}/{account_or_zone_id}/rulesets">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">create</a>(\*, account_id, zone_id, \*\*<a href="src/cloudflare/types/ruleset_create_params.py">params</a>) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>
- <code title="put /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">update</a>(ruleset_id, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/ruleset_update_params.py">params</a>) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">list</a>(\*, account_id, zone_id) -> <a href="./src/cloudflare/types/ruleset_list_response.py">SyncSinglePage[RulesetListResponse]</a></code>
- <code title="delete /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">delete</a>(ruleset_id, \*, account_id, zone_id) -> None</code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">get</a>(ruleset_id, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}">client.rulesets.<a href="./src/cloudflare/resources/rulesets/rulesets.py">get</a>(ruleset_id, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>

## Phases

Methods:

- <code title="put /{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint">client.rulesets.phases.<a href="./src/cloudflare/resources/rulesets/phases/phases.py">update</a>(ruleset_phase, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/rulesets/phase_update_params.py">params</a>) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint">client.rulesets.phases.<a href="./src/cloudflare/resources/rulesets/phases/phases.py">get</a>(ruleset_phase, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="put /{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint">client.rulesets.phases.<a href="./src/cloudflare/resources/rulesets/phases/phases.py">update</a>(ruleset_phase, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/rulesets/phase_update_params.py">params</a>) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint">client.rulesets.phases.<a href="./src/cloudflare/resources/rulesets/phases/phases.py">get</a>(ruleset_phase, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>

### Versions

Expand All @@ -3109,15 +3109,15 @@ from cloudflare.types.rulesets.phases import VersionListResponse
Methods:

- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions">client.rulesets.phases.versions.<a href="./src/cloudflare/resources/rulesets/phases/versions.py">list</a>(ruleset_phase, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/rulesets/phases/version_list_response.py">SyncSinglePage[VersionListResponse]</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}">client.rulesets.phases.versions.<a href="./src/cloudflare/resources/rulesets/phases/versions.py">get</a>(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}">client.rulesets.phases.versions.<a href="./src/cloudflare/resources/rulesets/phases/versions.py">get</a>(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>

## Rules

Methods:

- <code title="post /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/rules">client.rulesets.rules.<a href="./src/cloudflare/resources/rulesets/rules.py">create</a>(ruleset_id, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/rulesets/rule_create_params.py">params</a>) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="delete /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/rules/{rule_id}">client.rulesets.rules.<a href="./src/cloudflare/resources/rulesets/rules.py">delete</a>(rule_id, \*, ruleset_id, account_id, zone_id) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="patch /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/rules/{rule_id}">client.rulesets.rules.<a href="./src/cloudflare/resources/rulesets/rules.py">edit</a>(rule_id, \*, ruleset_id, account_id, zone_id, \*\*<a href="src/cloudflare/types/rulesets/rule_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="post /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/rules">client.rulesets.rules.<a href="./src/cloudflare/resources/rulesets/rules.py">create</a>(ruleset_id, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/rulesets/rule_create_params.py">params</a>) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>
- <code title="delete /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/rules/{rule_id}">client.rulesets.rules.<a href="./src/cloudflare/resources/rulesets/rules.py">delete</a>(rule_id, \*, ruleset_id, account_id, zone_id) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>
- <code title="patch /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/rules/{rule_id}">client.rulesets.rules.<a href="./src/cloudflare/resources/rulesets/rules.py">edit</a>(rule_id, \*, ruleset_id, account_id, zone_id, \*\*<a href="src/cloudflare/types/rulesets/rule_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>

## Versions

Expand All @@ -3131,13 +3131,13 @@ Methods:

- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/versions">client.rulesets.versions.<a href="./src/cloudflare/resources/rulesets/versions/versions.py">list</a>(ruleset_id, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/rulesets/version_list_response.py">SyncSinglePage[VersionListResponse]</a></code>
- <code title="delete /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}">client.rulesets.versions.<a href="./src/cloudflare/resources/rulesets/versions/versions.py">delete</a>(ruleset_version, \*, ruleset_id, account_id, zone_id) -> None</code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}">client.rulesets.versions.<a href="./src/cloudflare/resources/rulesets/versions/versions.py">get</a>(ruleset_version, \*, ruleset_id, account_id, zone_id) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}">client.rulesets.versions.<a href="./src/cloudflare/resources/rulesets/versions/versions.py">get</a>(ruleset_version, \*, ruleset_id, account_id, zone_id) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>

### ByTag

Methods:

- <code title="get /accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}/by_tag/{rule_tag}">client.rulesets.versions.by_tag.<a href="./src/cloudflare/resources/rulesets/versions/by_tag.py">get</a>(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> <a href="./src/cloudflare/types/rulesets_ruleset_response.py">RulesetsRulesetResponse</a></code>
- <code title="get /accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}/by_tag/{rule_tag}">client.rulesets.versions.by_tag.<a href="./src/cloudflare/resources/rulesets/versions/by_tag.py">get</a>(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> <a href="./src/cloudflare/types/ruleset.py">Ruleset</a></code>

# URLNormalization

Expand Down Expand Up @@ -4143,7 +4143,7 @@ Methods:
Types:

```python
from cloudflare.types.request_tracers import Trace, TraceCreateResponse
from cloudflare.types.request_tracers import Trace, TraceItem, TraceCreateResponse
```

Methods:
Expand Down Expand Up @@ -5776,15 +5776,20 @@ Methods:
- <code title="get /accounts/{account_id}/challenges/widgets/{sitekey}">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">get</a>(sitekey, \*, account_id) -> <a href="./src/cloudflare/types/challenges/challenges_widget.py">Optional</a></code>
- <code title="post /accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">rotate_secret</a>(sitekey, \*, account_id, \*\*<a href="src/cloudflare/types/challenges/widget_rotate_secret_params.py">params</a>) -> <a href="./src/cloudflare/types/challenges/challenges_widget.py">Optional</a></code>

# Hyperdrive
# HyperdriveResource

Types:

```python
from cloudflare.types import Hyperdrive
```

## Configs

Types:

```python
from cloudflare.types.hyperdrive import (
Hyperdrive,
ConfigCreateResponse,
ConfigUpdateResponse,
ConfigListResponse,
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ show_error_codes = True
# Exclude _files.py because mypy isn't smart enough to apply
# the correct type narrowing and as this is an internal module
# it's fine to just use Pyright.
exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/workers/ai\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py)$
exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py|src/cloudflare/resources/workers/ai\.py)$

strict_equality = True
implicit_reexport = True
Expand Down
16 changes: 8 additions & 8 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Cloudflare(SyncAPIClient):
workers_for_platforms: resources.WorkersForPlatforms
zero_trust: resources.ZeroTrust
challenges: resources.Challenges
hyperdrive: resources.Hyperdrive
hyperdrive: resources.HyperdriveResource
rum: resources.RUM
vectorize: resources.Vectorize
url_scanner: resources.URLScanner
Expand Down Expand Up @@ -267,7 +267,7 @@ def __init__(
self.workers_for_platforms = resources.WorkersForPlatforms(self)
self.zero_trust = resources.ZeroTrust(self)
self.challenges = resources.Challenges(self)
self.hyperdrive = resources.Hyperdrive(self)
self.hyperdrive = resources.HyperdriveResource(self)
self.rum = resources.RUM(self)
self.vectorize = resources.Vectorize(self)
self.url_scanner = resources.URLScanner(self)
Expand Down Expand Up @@ -525,7 +525,7 @@ class AsyncCloudflare(AsyncAPIClient):
workers_for_platforms: resources.AsyncWorkersForPlatforms
zero_trust: resources.AsyncZeroTrust
challenges: resources.AsyncChallenges
hyperdrive: resources.AsyncHyperdrive
hyperdrive: resources.AsyncHyperdriveResource
rum: resources.AsyncRUM
vectorize: resources.AsyncVectorize
url_scanner: resources.AsyncURLScanner
Expand Down Expand Up @@ -678,7 +678,7 @@ def __init__(
self.workers_for_platforms = resources.AsyncWorkersForPlatforms(self)
self.zero_trust = resources.AsyncZeroTrust(self)
self.challenges = resources.AsyncChallenges(self)
self.hyperdrive = resources.AsyncHyperdrive(self)
self.hyperdrive = resources.AsyncHyperdriveResource(self)
self.rum = resources.AsyncRUM(self)
self.vectorize = resources.AsyncVectorize(self)
self.url_scanner = resources.AsyncURLScanner(self)
Expand Down Expand Up @@ -937,7 +937,7 @@ def __init__(self, client: Cloudflare) -> None:
self.workers_for_platforms = resources.WorkersForPlatformsWithRawResponse(client.workers_for_platforms)
self.zero_trust = resources.ZeroTrustWithRawResponse(client.zero_trust)
self.challenges = resources.ChallengesWithRawResponse(client.challenges)
self.hyperdrive = resources.HyperdriveWithRawResponse(client.hyperdrive)
self.hyperdrive = resources.HyperdriveResourceWithRawResponse(client.hyperdrive)
self.rum = resources.RUMWithRawResponse(client.rum)
self.vectorize = resources.VectorizeWithRawResponse(client.vectorize)
self.url_scanner = resources.URLScannerWithRawResponse(client.url_scanner)
Expand Down Expand Up @@ -1027,7 +1027,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.workers_for_platforms = resources.AsyncWorkersForPlatformsWithRawResponse(client.workers_for_platforms)
self.zero_trust = resources.AsyncZeroTrustWithRawResponse(client.zero_trust)
self.challenges = resources.AsyncChallengesWithRawResponse(client.challenges)
self.hyperdrive = resources.AsyncHyperdriveWithRawResponse(client.hyperdrive)
self.hyperdrive = resources.AsyncHyperdriveResourceWithRawResponse(client.hyperdrive)
self.rum = resources.AsyncRUMWithRawResponse(client.rum)
self.vectorize = resources.AsyncVectorizeWithRawResponse(client.vectorize)
self.url_scanner = resources.AsyncURLScannerWithRawResponse(client.url_scanner)
Expand Down Expand Up @@ -1117,7 +1117,7 @@ def __init__(self, client: Cloudflare) -> None:
self.workers_for_platforms = resources.WorkersForPlatformsWithStreamingResponse(client.workers_for_platforms)
self.zero_trust = resources.ZeroTrustWithStreamingResponse(client.zero_trust)
self.challenges = resources.ChallengesWithStreamingResponse(client.challenges)
self.hyperdrive = resources.HyperdriveWithStreamingResponse(client.hyperdrive)
self.hyperdrive = resources.HyperdriveResourceWithStreamingResponse(client.hyperdrive)
self.rum = resources.RUMWithStreamingResponse(client.rum)
self.vectorize = resources.VectorizeWithStreamingResponse(client.vectorize)
self.url_scanner = resources.URLScannerWithStreamingResponse(client.url_scanner)
Expand Down Expand Up @@ -1213,7 +1213,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
)
self.zero_trust = resources.AsyncZeroTrustWithStreamingResponse(client.zero_trust)
self.challenges = resources.AsyncChallengesWithStreamingResponse(client.challenges)
self.hyperdrive = resources.AsyncHyperdriveWithStreamingResponse(client.hyperdrive)
self.hyperdrive = resources.AsyncHyperdriveResourceWithStreamingResponse(client.hyperdrive)
self.rum = resources.AsyncRUMWithStreamingResponse(client.rum)
self.vectorize = resources.AsyncVectorizeWithStreamingResponse(client.vectorize)
self.url_scanner = resources.AsyncURLScannerWithStreamingResponse(client.url_scanner)
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 @@ -353,12 +353,12 @@
AsyncChallengesWithStreamingResponse,
)
from .hyperdrive import (
Hyperdrive,
AsyncHyperdrive,
HyperdriveWithRawResponse,
AsyncHyperdriveWithRawResponse,
HyperdriveWithStreamingResponse,
AsyncHyperdriveWithStreamingResponse,
HyperdriveResource,
AsyncHyperdriveResource,
HyperdriveResourceWithRawResponse,
AsyncHyperdriveResourceWithRawResponse,
HyperdriveResourceWithStreamingResponse,
AsyncHyperdriveResourceWithStreamingResponse,
)
from .rate_plans import (
RatePlans,
Expand Down Expand Up @@ -1044,12 +1044,12 @@
"AsyncChallengesWithRawResponse",
"ChallengesWithStreamingResponse",
"AsyncChallengesWithStreamingResponse",
"Hyperdrive",
"AsyncHyperdrive",
"HyperdriveWithRawResponse",
"AsyncHyperdriveWithRawResponse",
"HyperdriveWithStreamingResponse",
"AsyncHyperdriveWithStreamingResponse",
"HyperdriveResource",
"AsyncHyperdriveResource",
"HyperdriveResourceWithRawResponse",
"AsyncHyperdriveResourceWithRawResponse",
"HyperdriveResourceWithStreamingResponse",
"AsyncHyperdriveResourceWithStreamingResponse",
"RUM",
"AsyncRUM",
"RUMWithRawResponse",
Expand Down
24 changes: 12 additions & 12 deletions src/cloudflare/resources/hyperdrive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
AsyncConfigsWithStreamingResponse,
)
from .hyperdrive import (
Hyperdrive,
AsyncHyperdrive,
HyperdriveWithRawResponse,
AsyncHyperdriveWithRawResponse,
HyperdriveWithStreamingResponse,
AsyncHyperdriveWithStreamingResponse,
HyperdriveResource,
AsyncHyperdriveResource,
HyperdriveResourceWithRawResponse,
AsyncHyperdriveResourceWithRawResponse,
HyperdriveResourceWithStreamingResponse,
AsyncHyperdriveResourceWithStreamingResponse,
)

__all__ = [
Expand All @@ -24,10 +24,10 @@
"AsyncConfigsWithRawResponse",
"ConfigsWithStreamingResponse",
"AsyncConfigsWithStreamingResponse",
"Hyperdrive",
"AsyncHyperdrive",
"HyperdriveWithRawResponse",
"AsyncHyperdriveWithRawResponse",
"HyperdriveWithStreamingResponse",
"AsyncHyperdriveWithStreamingResponse",
"HyperdriveResource",
"AsyncHyperdriveResource",
"HyperdriveResourceWithRawResponse",
"AsyncHyperdriveResourceWithRawResponse",
"HyperdriveResourceWithStreamingResponse",
"AsyncHyperdriveResourceWithStreamingResponse",
]
Loading

0 comments on commit 71da3ed

Please sign in to comment.