Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8e20edf

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#1020)
1 parent 9367d59 commit 8e20edf

File tree

14 files changed

+29
-183
lines changed

14 files changed

+29
-183
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1348
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a4ad69b707d0e14c7a716a22c876ab03c40d8aefa59eec101c5c52260cb860f3.yml

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6079,7 +6079,7 @@ Methods:
60796079

60806080
- <code title="post /accounts/{account_id}/gateway/lists">client.zero_trust.gateway.lists.<a href="./src/cloudflare/resources/zero_trust/gateway/lists/lists.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/gateway/list_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/gateway/list_create_response.py">Optional</a></code>
60816081
- <code title="put /accounts/{account_id}/gateway/lists/{list_id}">client.zero_trust.gateway.lists.<a href="./src/cloudflare/resources/zero_trust/gateway/lists/lists.py">update</a>(list_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/gateway/list_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/gateway/gateway_list.py">Optional</a></code>
6082-
- <code title="get /accounts/{account_id}/gateway/lists">client.zero_trust.gateway.lists.<a href="./src/cloudflare/resources/zero_trust/gateway/lists/lists.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/gateway/list_list_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/gateway/gateway_list.py">SyncSinglePage[GatewayList]</a></code>
6082+
- <code title="get /accounts/{account_id}/gateway/lists">client.zero_trust.gateway.lists.<a href="./src/cloudflare/resources/zero_trust/gateway/lists/lists.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/gateway/gateway_list.py">SyncSinglePage[GatewayList]</a></code>
60836083
- <code title="delete /accounts/{account_id}/gateway/lists/{list_id}">client.zero_trust.gateway.lists.<a href="./src/cloudflare/resources/zero_trust/gateway/lists/lists.py">delete</a>(list_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/gateway/list_delete_response.py">Optional</a></code>
60846084
- <code title="patch /accounts/{account_id}/gateway/lists/{list_id}">client.zero_trust.gateway.lists.<a href="./src/cloudflare/resources/zero_trust/gateway/lists/lists.py">edit</a>(list_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/gateway/list_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/gateway/gateway_list.py">Optional</a></code>
60856085
- <code title="get /accounts/{account_id}/gateway/lists/{list_id}">client.zero_trust.gateway.lists.<a href="./src/cloudflare/resources/zero_trust/gateway/lists/lists.py">get</a>(list_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/gateway/gateway_list.py">Optional</a></code>

src/cloudflare/resources/zero_trust/gateway/configurations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def edit(
102102
This endpoint can update a
103103
single subcollection of settings such as `antivirus`, `tls_decrypt`,
104104
`activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or
105-
`certificate`, without updating the entire configuration object. Returns an
106-
error if any collection of settings is not properly configured.
105+
`custom_certificate`, without updating the entire configuration object. Returns
106+
an error if any collection of settings is not properly configured.
107107
108108
Args:
109109
settings: account settings.
@@ -238,8 +238,8 @@ async def edit(
238238
This endpoint can update a
239239
single subcollection of settings such as `antivirus`, `tls_decrypt`,
240240
`activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or
241-
`certificate`, without updating the entire configuration object. Returns an
242-
error if any collection of settings is not properly configured.
241+
`custom_certificate`, without updating the entire configuration object. Returns
242+
an error if any collection of settings is not properly configured.
243243
244244
Args:
245245
settings: account settings.

src/cloudflare/resources/zero_trust/gateway/lists/lists.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
AsyncPaginator,
3535
make_request_options,
3636
)
37-
from .....types.zero_trust.gateway import list_edit_params, list_list_params, list_create_params, list_update_params
37+
from .....types.zero_trust.gateway import list_edit_params, list_create_params, list_update_params
3838
from .....types.zero_trust.gateway.gateway_list import GatewayList
3939
from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam
4040
from .....types.zero_trust.gateway.list_create_response import ListCreateResponse
@@ -173,7 +173,6 @@ def list(
173173
self,
174174
*,
175175
account_id: str,
176-
type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN,
177176
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
178177
# The extra values given here take precedence over values defined on the client or passed to this method.
179178
extra_headers: Headers | None = None,
@@ -185,8 +184,6 @@ def list(
185184
Fetches all Zero Trust lists for an account.
186185
187186
Args:
188-
type: The type of list.
189-
190187
extra_headers: Send extra headers
191188
192189
extra_query: Add additional query parameters to the request
@@ -201,11 +198,7 @@ def list(
201198
f"/accounts/{account_id}/gateway/lists",
202199
page=SyncSinglePage[GatewayList],
203200
options=make_request_options(
204-
extra_headers=extra_headers,
205-
extra_query=extra_query,
206-
extra_body=extra_body,
207-
timeout=timeout,
208-
query=maybe_transform({"type": type}, list_list_params.ListListParams),
201+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
209202
),
210203
model=GatewayList,
211204
)
@@ -485,7 +478,6 @@ def list(
485478
self,
486479
*,
487480
account_id: str,
488-
type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN,
489481
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
490482
# The extra values given here take precedence over values defined on the client or passed to this method.
491483
extra_headers: Headers | None = None,
@@ -497,8 +489,6 @@ def list(
497489
Fetches all Zero Trust lists for an account.
498490
499491
Args:
500-
type: The type of list.
501-
502492
extra_headers: Send extra headers
503493
504494
extra_query: Add additional query parameters to the request
@@ -513,11 +503,7 @@ def list(
513503
f"/accounts/{account_id}/gateway/lists",
514504
page=AsyncSinglePage[GatewayList],
515505
options=make_request_options(
516-
extra_headers=extra_headers,
517-
extra_query=extra_query,
518-
extra_body=extra_body,
519-
timeout=timeout,
520-
query=maybe_transform({"type": type}, list_list_params.ListListParams),
506+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
521507
),
522508
model=GatewayList,
523509
)

src/cloudflare/types/zero_trust/gateway/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from .logging_setting import LoggingSetting as LoggingSetting
2020
from .gateway_settings import GatewaySettings as GatewaySettings
2121
from .list_edit_params import ListEditParams as ListEditParams
22-
from .list_list_params import ListListParams as ListListParams
2322
from .location_network import LocationNetwork as LocationNetwork
2423
from .gateway_item_param import GatewayItemParam as GatewayItemParam
2524
from .list_create_params import ListCreateParams as ListCreateParams

src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414
from .browser_isolation_settings import BrowserIsolationSettings
1515
from .custom_certificate_settings import CustomCertificateSettings
1616

17-
__all__ = ["GatewayConfigurationSettings", "Certificate"]
18-
19-
20-
class Certificate(BaseModel):
21-
id: str
22-
"""UUID of certificate to be used for interception."""
17+
__all__ = ["GatewayConfigurationSettings"]
2318

2419

2520
class GatewayConfigurationSettings(BaseModel):
@@ -38,17 +33,8 @@ class GatewayConfigurationSettings(BaseModel):
3833
browser_isolation: Optional[BrowserIsolationSettings] = None
3934
"""Browser isolation settings."""
4035

41-
certificate: Optional[Certificate] = None
42-
"""Certificate settings for Gateway TLS interception.
43-
44-
If not specified, the Cloudflare Root CA will be used.
45-
"""
46-
4736
custom_certificate: Optional[CustomCertificateSettings] = None
48-
"""Custom certificate settings for BYO-PKI.
49-
50-
(deprecated and replaced by `certificate`)
51-
"""
37+
"""Custom certificate settings for BYO-PKI."""
5238

5339
extended_email_matching: Optional[ExtendedEmailMatching] = None
5440
"""Extended e-mail matching settings."""

src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing_extensions import TypedDict
66

77
from .tls_settings_param import TLSSettingsParam
88
from .fips_settings_param import FipsSettingsParam
@@ -15,12 +15,7 @@
1515
from .browser_isolation_settings_param import BrowserIsolationSettingsParam
1616
from .custom_certificate_settings_param import CustomCertificateSettingsParam
1717

18-
__all__ = ["GatewayConfigurationSettingsParam", "Certificate"]
19-
20-
21-
class Certificate(TypedDict, total=False):
22-
id: Required[str]
23-
"""UUID of certificate to be used for interception."""
18+
__all__ = ["GatewayConfigurationSettingsParam"]
2419

2520

2621
class GatewayConfigurationSettingsParam(TypedDict, total=False):
@@ -39,17 +34,8 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False):
3934
browser_isolation: BrowserIsolationSettingsParam
4035
"""Browser isolation settings."""
4136

42-
certificate: Certificate
43-
"""Certificate settings for Gateway TLS interception.
44-
45-
If not specified, the Cloudflare Root CA will be used.
46-
"""
47-
4837
custom_certificate: CustomCertificateSettingsParam
49-
"""Custom certificate settings for BYO-PKI.
50-
51-
(deprecated and replaced by `certificate`)
52-
"""
38+
"""Custom certificate settings for BYO-PKI."""
5339

5440
extended_email_matching: ExtendedEmailMatchingParam
5541
"""Extended e-mail matching settings."""

src/cloudflare/types/zero_trust/gateway/gateway_item_param.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
6-
from datetime import datetime
7-
from typing_extensions import Annotated, TypedDict
8-
9-
from ...._utils import PropertyInfo
5+
from typing_extensions import TypedDict
106

117
__all__ = ["GatewayItemParam"]
128

139

1410
class GatewayItemParam(TypedDict, total=False):
15-
created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
16-
1711
value: str
1812
"""The value of the item in a list."""

src/cloudflare/types/zero_trust/gateway/list_list_params.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/cloudflare/types/zero_trust/gateway/rule_setting.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ class AuditSSH(BaseModel):
2828

2929
class BisoAdminControls(BaseModel):
3030
dcp: Optional[bool] = None
31-
"""Set to false to enable copy-pasting."""
31+
"""Set to true to enable copy-pasting."""
3232

3333
dd: Optional[bool] = None
34-
"""Set to false to enable downloading."""
34+
"""Set to true to enable downloading."""
3535

3636
dk: Optional[bool] = None
37-
"""Set to false to enable keyboard usage."""
37+
"""Set to true to enable keyboard usage."""
3838

3939
dp: Optional[bool] = None
40-
"""Set to false to enable printing."""
40+
"""Set to true to enable printing."""
4141

4242
du: Optional[bool] = None
43-
"""Set to false to enable uploading."""
43+
"""Set to true to enable uploading."""
4444

4545

4646
class CheckSession(BaseModel):
@@ -153,13 +153,6 @@ class RuleSetting(BaseModel):
153153
it to indicate local egress via WARP IPs.
154154
"""
155155

156-
ignore_cname_category_matches: Optional[bool] = None
157-
"""Set to true, to ignore the category matches at CNAME domains in a response.
158-
159-
If unchecked, the categories in this rule will be checked against all the CNAME
160-
domain categories in a response.
161-
"""
162-
163156
insecure_disable_dnssec_validation: Optional[bool] = None
164157
"""INSECURE - disable DNSSEC validation (for Allow actions)."""
165158

0 commit comments

Comments
 (0)