Skip to content

Commit d4c7ac1

Browse files
feat: Merge branch 'davis/PINGORA-2658' into 'main'
feat: PINGORA-2658 | Add Smart Shield to stainless config See merge request cloudflare/sdks/cloudflare-config!144
1 parent 2e91bb3 commit d4c7ac1

21 files changed

Lines changed: 4000 additions & 2 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1818
1+
configured_endpoints: 1826
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-436dae5b63cd3641097063829d648648b983691f35bac8d179d970741190e128.yml
33
openapi_spec_hash: 44627cc45ee6623f37d3b9619b124ea5
4-
config_hash: 8ff73666f1faa9876bbdf71690c19bd6
4+
config_hash: 59212900ef3970ac3c41ca2537fabe7b

api.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,6 +2097,34 @@ Methods:
20972097
- <code title="put /zones/{zone_id}/rate_limits/{rate_limit_id}">client.rate_limits.<a href="./src/cloudflare/resources/rate_limits.py">edit</a>(rate_limit_id, \*, zone_id, \*\*<a href="src/cloudflare/types/rate_limits/rate_limit_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/rate_limits/rate_limit.py">RateLimit</a></code>
20982098
- <code title="get /zones/{zone_id}/rate_limits/{rate_limit_id}">client.rate_limits.<a href="./src/cloudflare/resources/rate_limits.py">get</a>(rate_limit_id, \*, zone_id) -> <a href="./src/cloudflare/types/rate_limits/rate_limit.py">RateLimit</a></code>
20992099

2100+
# SmartShield
2101+
2102+
Types:
2103+
2104+
```python
2105+
from cloudflare.types.smart_shield import (
2106+
SmartShieldUpdateResponse,
2107+
SmartShieldCreateHealthcheckResponse,
2108+
SmartShieldDeleteHealthcheckResponse,
2109+
SmartShieldEditHealthcheckResponse,
2110+
SmartShieldGetResponse,
2111+
SmartShieldGetHealthcheckResponse,
2112+
SmartShieldListHealthchecksResponse,
2113+
SmartShieldUpdateHealthcheckResponse,
2114+
)
2115+
```
2116+
2117+
Methods:
2118+
2119+
- <code title="patch /zones/{zone_id}/smart_shield">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">update</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/smart_shield/smart_shield_update_params.py">params</a>) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_update_response.py">SmartShieldUpdateResponse</a></code>
2120+
- <code title="post /zones/{zone_id}/smart_shield/healthchecks">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">create_healthcheck</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/smart_shield/smart_shield_create_healthcheck_params.py">params</a>) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_create_healthcheck_response.py">SmartShieldCreateHealthcheckResponse</a></code>
2121+
- <code title="delete /zones/{zone_id}/smart_shield/healthchecks/{healthcheck_id}">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">delete_healthcheck</a>(healthcheck_id, \*, zone_id) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_delete_healthcheck_response.py">SmartShieldDeleteHealthcheckResponse</a></code>
2122+
- <code title="patch /zones/{zone_id}/smart_shield/healthchecks/{healthcheck_id}">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">edit_healthcheck</a>(healthcheck_id, \*, zone_id, \*\*<a href="src/cloudflare/types/smart_shield/smart_shield_edit_healthcheck_params.py">params</a>) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_edit_healthcheck_response.py">SmartShieldEditHealthcheckResponse</a></code>
2123+
- <code title="get /zones/{zone_id}/smart_shield">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_get_response.py">SmartShieldGetResponse</a></code>
2124+
- <code title="get /zones/{zone_id}/smart_shield/healthchecks/{healthcheck_id}">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">get_healthcheck</a>(healthcheck_id, \*, zone_id) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_get_healthcheck_response.py">SmartShieldGetHealthcheckResponse</a></code>
2125+
- <code title="get /zones/{zone_id}/smart_shield/healthchecks">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">list_healthchecks</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/smart_shield/smart_shield_list_healthchecks_params.py">params</a>) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_list_healthchecks_response.py">SyncV4PagePaginationArray[SmartShieldListHealthchecksResponse]</a></code>
2126+
- <code title="put /zones/{zone_id}/smart_shield/healthchecks/{healthcheck_id}">client.smart_shield.<a href="./src/cloudflare/resources/smart_shield.py">update_healthcheck</a>(healthcheck_id, \*, zone_id, \*\*<a href="src/cloudflare/types/smart_shield/smart_shield_update_healthcheck_params.py">params</a>) -> <a href="./src/cloudflare/types/smart_shield/smart_shield_update_healthcheck_response.py">SmartShieldUpdateHealthcheckResponse</a></code>
2127+
21002128
# WaitingRooms
21012129

21022130
Types:

src/cloudflare/_client.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
dns_firewall,
9494
healthchecks,
9595
security_txt,
96+
smart_shield,
9697
abuse_reports,
9798
email_routing,
9899
magic_transit,
@@ -161,6 +162,7 @@
161162
from .resources.zones.zones import ZonesResource, AsyncZonesResource
162163
from .resources.custom_pages import CustomPagesResource, AsyncCustomPagesResource
163164
from .resources.security_txt import SecurityTXTResource, AsyncSecurityTXTResource
165+
from .resources.smart_shield import SmartShieldResource, AsyncSmartShieldResource
164166
from .resources.abuse_reports import AbuseReportsResource, AsyncAbuseReportsResource
165167
from .resources.images.images import ImagesResource, AsyncImagesResource
166168
from .resources.queues.queues import QueuesResource, AsyncQueuesResource
@@ -517,6 +519,12 @@ def rate_limits(self) -> RateLimitsResource:
517519

518520
return RateLimitsResource(self)
519521

522+
@cached_property
523+
def smart_shield(self) -> SmartShieldResource:
524+
from .resources.smart_shield import SmartShieldResource
525+
526+
return SmartShieldResource(self)
527+
520528
@cached_property
521529
def waiting_rooms(self) -> WaitingRoomsResource:
522530
from .resources.waiting_rooms import WaitingRoomsResource
@@ -1349,6 +1357,12 @@ def rate_limits(self) -> AsyncRateLimitsResource:
13491357

13501358
return AsyncRateLimitsResource(self)
13511359

1360+
@cached_property
1361+
def smart_shield(self) -> AsyncSmartShieldResource:
1362+
from .resources.smart_shield import AsyncSmartShieldResource
1363+
1364+
return AsyncSmartShieldResource(self)
1365+
13521366
@cached_property
13531367
def waiting_rooms(self) -> AsyncWaitingRoomsResource:
13541368
from .resources.waiting_rooms import AsyncWaitingRoomsResource
@@ -2109,6 +2123,12 @@ def rate_limits(self) -> rate_limits.RateLimitsResourceWithRawResponse:
21092123

21102124
return RateLimitsResourceWithRawResponse(self._client.rate_limits)
21112125

2126+
@cached_property
2127+
def smart_shield(self) -> smart_shield.SmartShieldResourceWithRawResponse:
2128+
from .resources.smart_shield import SmartShieldResourceWithRawResponse
2129+
2130+
return SmartShieldResourceWithRawResponse(self._client.smart_shield)
2131+
21122132
@cached_property
21132133
def waiting_rooms(self) -> waiting_rooms.WaitingRoomsResourceWithRawResponse:
21142134
from .resources.waiting_rooms import WaitingRoomsResourceWithRawResponse
@@ -2688,6 +2708,12 @@ def rate_limits(self) -> rate_limits.AsyncRateLimitsResourceWithRawResponse:
26882708

26892709
return AsyncRateLimitsResourceWithRawResponse(self._client.rate_limits)
26902710

2711+
@cached_property
2712+
def smart_shield(self) -> smart_shield.AsyncSmartShieldResourceWithRawResponse:
2713+
from .resources.smart_shield import AsyncSmartShieldResourceWithRawResponse
2714+
2715+
return AsyncSmartShieldResourceWithRawResponse(self._client.smart_shield)
2716+
26912717
@cached_property
26922718
def waiting_rooms(self) -> waiting_rooms.AsyncWaitingRoomsResourceWithRawResponse:
26932719
from .resources.waiting_rooms import AsyncWaitingRoomsResourceWithRawResponse
@@ -3267,6 +3293,12 @@ def rate_limits(self) -> rate_limits.RateLimitsResourceWithStreamingResponse:
32673293

32683294
return RateLimitsResourceWithStreamingResponse(self._client.rate_limits)
32693295

3296+
@cached_property
3297+
def smart_shield(self) -> smart_shield.SmartShieldResourceWithStreamingResponse:
3298+
from .resources.smart_shield import SmartShieldResourceWithStreamingResponse
3299+
3300+
return SmartShieldResourceWithStreamingResponse(self._client.smart_shield)
3301+
32703302
@cached_property
32713303
def waiting_rooms(self) -> waiting_rooms.WaitingRoomsResourceWithStreamingResponse:
32723304
from .resources.waiting_rooms import WaitingRoomsResourceWithStreamingResponse
@@ -3848,6 +3880,12 @@ def rate_limits(self) -> rate_limits.AsyncRateLimitsResourceWithStreamingRespons
38483880

38493881
return AsyncRateLimitsResourceWithStreamingResponse(self._client.rate_limits)
38503882

3883+
@cached_property
3884+
def smart_shield(self) -> smart_shield.AsyncSmartShieldResourceWithStreamingResponse:
3885+
from .resources.smart_shield import AsyncSmartShieldResourceWithStreamingResponse
3886+
3887+
return AsyncSmartShieldResourceWithStreamingResponse(self._client.smart_shield)
3888+
38513889
@cached_property
38523890
def waiting_rooms(self) -> waiting_rooms.AsyncWaitingRoomsResourceWithStreamingResponse:
38533891
from .resources.waiting_rooms import AsyncWaitingRoomsResourceWithStreamingResponse

0 commit comments

Comments
 (0)