8000 feat(api): api update (#2202) · cloudflare/cloudflare-python@ace26df · GitHub
[go: up one dir, main page]

Skip to content

Commit ace26df

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#2202)
1 parent dc752c1 commit ace26df

File tree

12 files changed

+148
-1056
lines changed

12 files changed

+148
-1056
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: 1449
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c6fe7515b7879a7cd51bbe9433aeee5d3d30feaf519f42d0d81c64b19f45875.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f3bf5786ed274253519d4c0cf9abb19fb072872380a2c0bf90917f78f16cfaa6.yml

src/cloudflare/resources/zero_trust/access/applications/applications.py

Lines changed: 36 additions & 128 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/zero_trust/organizations/organizations.py

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,6 @@ def revoke_users(
335335
email: str,
336336
account_id: str | NotGiven = NOT_GIVEN,
337337
zone_id: str | NotGiven = NOT_GIVEN,
338-
query_devices: bool | NotGiven = NOT_GIVEN,
339-
body_devices: bool | NotGiven = NOT_GIVEN,
340-
user_uid: str | NotGiven = NOT_GIVEN,
341-
warp_session_reauth: bool | NotGiven = NOT_GIVEN,
342338
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
343339
# The extra values given here take precedence over values defined on the client or passed to this method.
344340
extra_headers: Headers | None = None,
@@ -356,16 +352,6 @@ def revoke_users(
356352
357353
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
358354
359-
query_devices: When set to `true`, all devices associated with the user will be revoked.
360-
361-
body_devices: When set to `true`, all devices associated with the user will be revoked.
362-
363-
user_uid: The uuid of the user to revoke.
364-
365-
warp_session_reauth: When set to `true`, the user will be required to re-authenticate to WARP for all
366-
Gateway policies that enforce a WARP client session duration. When `false`, the
367-
user’s WARP session will remain active
368-
369355
extra_headers: Send extra headers
370356
371357
extra_query: Add additional query parameters to the request
@@ -388,23 +374,12 @@ def revoke_users(
388374
account_or_zone_id = zone_id
389375
return self._post(
390376
f"/{account_or_zone}/{account_or_zone_id}/access/organizations/revoke_user",
391-
body=maybe_transform(
392-
{
393-
"email": email,
394-
"body_devices": body_devices,
395-
"user_uid": user_uid,
396-
"warp_session_reauth": warp_session_reauth,
397-
},
398-
organization_revoke_users_params.OrganizationRevokeUsersParams,
399-
),
377+
body=maybe_transform({"email": email}, organization_revoke_users_params.OrganizationRevokeUsersParams),
400378
options=make_request_options(
401379
extra_headers=extra_headers,
402380
extra_query=extra_query,
403381
extra_body=extra_body,
404382
timeout=timeout,
405-
query=maybe_transform(
406-
{"query_devices": query_devices}, organization_revoke_users_params.OrganizationRevokeUsersParams
407-
),
408383
post_parser=ResultWrapper[Optional[OrganizationRevokeUsersResponse]]._unwrapper,
409384
),
410385
cast_to=cast(
@@ -707,10 +682,6 @@ async def revoke_users(
707682
email: str,
708683
account_id: str | NotGiven = NOT_GIVEN,
709684
zone_id: str | NotGiven = NOT_GIVEN,
710-
query_devices: bool | NotGiven = NOT_GIVEN,
711-
body_devices: bool | NotGiven = NOT_GIVEN,
712-
user_uid: str | NotGiven = NOT_GIVEN,
713-
warp_session_reauth: bool | NotGiven = NOT_GIVEN,
714685
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
715686
# The extra values given here take precedence over values defined on the client or passed to this method.
716687
extra_headers: Headers | None = None,
@@ -728,16 +699,6 @@ async def revoke_users(
728699
729700
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
730701
731-
query_devices: When set to `true`, all devices associated with the user will be revoked.
732-
733-
body_devices: When set to `true`, all devices associated with the user will be revoked.
734-
735-
user_uid: The uuid of the user to revoke.
736-
737-
warp_session_reauth: When set to `true`, the user will be required to re-authenticate to WARP for all
738-
Gateway policies that enforce a WARP client session duration. When `false`, the
739-
user’s WARP session will remain active
740-
741702
extra_headers: Send extra headers
742703
743704
extra_query: Add additional query parameters to the request
@@ -761,22 +722,13 @@ async def revoke_users(
761722
return await self._post(
762723
f"/{account_or_zone}/{account_or_zone_id}/access/organizations/revoke_user",
763724
body=await async_maybe_transform(
764-
{
765-
"email": email,
766-
"body_devices": body_devices,
767-
"user_uid": user_uid,
768-
"warp_session_reauth": warp_session_reauth,
769-
},
770-
organization_revoke_users_params.OrganizationRevokeUsersParams,
725+
{"email": email}, organization_revoke_users_params.OrganizationRevokeUsersParams
771726
),
772727
options=make_request_options(
773728
extra_headers=extra_headers,
774729
extra_query=extra_query,
775730
extra_body=extra_body,
776731
timeout=timeout,
777-
query=await async_maybe_transform(
778-
{"query_devices": query_devices}, organization_revoke_users_params.OrganizationRevokeUsersParams
779-
),
780732
post_parser=ResultWrapper[Optional[OrganizationRevokeUsersResponse]]._unwrapper,
781733
),
782734
cast_to=cast(

src/cloudflare/types/zero_trust/access/application_create_params.py

Lines changed: 12 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
__all__ = [
2323
"ApplicationCreateParams",
2424
"SelfHostedApplication",
25-
"SelfHostedApplicationDestination",
2625
"SelfHostedApplicationPolicy",
2726
"SelfHostedApplicationPolicyAccessAppPolicyLink",
2827
"SelfHostedApplicationPolicyUnionMember2",
@@ -36,14 +35,12 @@
3635
"SaaSApplicationSCIMConfig",
3736
"SaaSApplicationSCIMConfigAuthentication",
3837
"BrowserSSHApplication",
39-
"BrowserSSHApplicationDestination",
4038
"BrowserSSHApplicationPolicy",
4139
"BrowserSSHApplicationPolicyAccessAppPolicyLink",
4240
"BrowserSSHApplicationPolicyUnionMember2",
4341
"BrowserSSHApplicationSCIMConfig",
4442
"BrowserSSHApplicationSCIMConfigAuthentication",
4543
"BrowserVNCApplication",
46-
"BrowserVNCApplicationDestination",
4744
"BrowserVNCApplicationPolicy",
4845
"BrowserVNCApplicationPolicyAccessAppPolicyLink",
4946
"BrowserVNCApplicationPolicyUnionMember2",
@@ -84,9 +81,10 @@
8481

8582
class SelfHostedApplication(TypedDict, total=False):
8683
domain: Required[str]
87-
"""The primary hostname and path secured by Access.
84+
"""The primary hostname and path that Access will secure.
8885
89-
This domain will be displayed if the app is visible in the App Launcher.
86+
If the app is visible in the App Launcher dashboard, this is the domain that
87+
will be displayed.
9088
"""
9189

9290
type: Required[str]
@@ -146,14 +144,6 @@ class SelfHostedApplication(TypedDict, total=False):
146144
custom_pages: List[str]
147145
"""The custom pages that will be displayed when applicable for this application"""
148146

149-
destinations: Iterable[SelfHostedApplicationDestination]
150-
"""List of destinations secured by Access.
151-
152-
This supersedes `self_hosted_domains` to allow for more flexibility in defining
153-
different types of domains. If `destinations` are provided, then
154-
`self_hosted_domains` will be ignored.
155-
"""
156-
157147
enable_binding_cookie: bool
158148
"""
159149
Enables the binding cookie, which increases security against compromised
@@ -204,12 +194,7 @@ class SelfHostedApplication(TypedDict, total=False):
204194
"""
205195

206196
self_hosted_domains: List[SelfHostedDomains]
207-
"""List of public domains that Access will secure.
208-
209-
This field is deprecated in favor of `destinations` and will be supported until
210-
**November 21, 2025.** If `destinations` are provided, then
211-
`self_hosted_domains` will be ignored.
212-
"""
197+
"""List of domains that Access will secure."""
213198

214199
service_auth_401_redirect: bool
215200
"""Returns a 401 status code when the request is blocked by a Service Auth policy."""
@@ -231,20 +216,6 @@ class SelfHostedApplication(TypedDict, total=False):
231216
"""
232217

233218

234-
class SelfHostedApplicationDestination(TypedDict, total=False):
235-
type: Literal["public", "private"]
236-
237-
uri: str
238-
"""The URI of the destination.
239-
240-
Public destinations can include a domain and path with
241-
[wildcards](https://developers.cloudflare.com/cloudflare-one/policies/access/app-paths/).
242-
Private destinations are an early access feature and gated behind a feature
243-
flag. Private destinations support private IPv4, IPv6, and Server Name
244-
Indications (SNI) with optional port ranges.
245-
"""
246-
247-
248219
class SelfHostedApplicationPolicyAccessAppPolicyLink(TypedDict, total=False):
249220
id: str
250221
"""The UUID of the policy"""
@@ -497,9 +468,10 @@ class SaaSApplicationSCIMConfig(TypedDict, total=False):
497468

498469
class BrowserSSHApplication(TypedDict, total=False):
499470
domain: Required[str]
500-
"""The primary hostname and path secured by Access.
471+
"""The primary hostname and path that Access will secure.
501472
502-
This domain will be displayed if the app is visible in the App Launcher.
473+
If the app is visible in the App Launcher dashboard, this is the domain that
474+
will be displayed.
503475
"""
504476

505477
type: Required[str]
@@ -559,14 +531,6 @@ class BrowserSSHApplication(TypedDict, total=False):
559531
custom_pages: List[str]
560532
"""The custom pages that will be displayed when applicable for this application"""
561533

562-
destinations: Iterable[BrowserSSHApplicationDestination]
563-
"""List of destinations secured by Access.
564-
565-
This supersedes `self_hosted_domains` to allow for more flexibility in defining
566-
different types of domains. If `destinations` are provided, then
567-
`self_hosted_domains` will be ignored.
568-
"""
569-
570534
enable_binding_cookie: bool
571535
"""
572536
Enables the binding cookie, which increases security against compromised
@@ -617,12 +581,7 @@ class BrowserSSHApplication(TypedDict, total=False):
617581
"""
618582

619583
self_hosted_domains: List[SelfHostedDomains]
620-
"""List of public domains that Access will secure.
621-
622-
This field is deprecated in favor of `destinations` and will be supported until
623-
**November 21, 2025.** If `destinations` are provided, then
624-
`self_hosted_domains` will be ignored.
625-
"""
584+
"""List of domains that Access will secure."""
626585

627586
service_auth_401_redirect: bool
628587
"""Returns a 401 status code when the request is blocked by a Service Auth policy."""
@@ -644,20 +603,6 @@ class BrowserSSHApplication(TypedDict, total=False):
644603
"""
645604

646605

647-
class BrowserSSHApplicationDestination(TypedDict, total=False):
648-
type: Literal["public", "private"]
649-
650-
uri: str
651-
"""The URI of the destination.
652-
653-
Public destinations can include a domain and path with
654-
[wildcards](https://developers.cloudflare.com/cloudflare-one/policies/access/app-paths/).
655-
Private destinations are an early access feature and gated behind a feature
656-
flag. Private destinations support private IPv4, IPv6, and Server Name
657-
Indications (SNI) with optional port ranges.
658-
"""
659-
660-
661606
class BrowserSSHApplicationPolicyAccessAppPolicyLink(TypedDict, total=False):
662607
id: str
663608
"""The UUID of the policy"""
@@ -755,9 +700,10 @@ class BrowserSSHApplicationSCIMConfig(TypedDict, total=False):
755700

756701
class BrowserVNCApplication(TypedDict, total=False):
757702
domain: Required[str]
758-
"""The primary hostname and path secured by Access.
703+
"""The primary hostname and path that Access will secure.
759704
760-
This domain will be displayed if the app is visible in the App Launcher.
705+
If the app is visible in the App Launcher dashboard, this is the domain that
706+
will be displayed.
761707
"""
762708

763709
type: Required[str]
@@ -817,14 +763,6 @@ class BrowserVNCApplication(TypedDict, total=False):
817763
custom_pages: List[str]
818764
"""The custom pages that will be displayed when applicable for this application"""
819765

820-
destinations: Iterable[BrowserVNCApplicationDestination]
821-
"""List of destinations secured by Access.
822-
823-
This supersedes `self_hosted_domains` to allow for more flexibility in defining
824-
different types of domains. If `destinations` are provided, then
825-
`self_hosted_domains` will be ignored.
826-
"""
827-
828766
enable_binding_cookie: bool
829767
"""
830768
Enables the binding cookie, which increases security against compromised
@@ -875,12 +813,7 @@ class BrowserVNCApplication(TypedDict, total=False):
875813
"""
876814

877815
self_hosted_domains: List[SelfHostedDomains]
878-
"""List of public domains that Access will secure.
879-
880-
This field is deprecated in favor of `destinations` and will be supported until
881-
**November 21, 2025.** If `destinations` are provided, then
882-
`self_hosted_domains` will be ignored.
883-
"""
816+
"""List of domains that Access will secure."""
884817

885818
service_auth_401_redirect: bool
886819
"""Returns a 401 status code when the request is blocked by a Service Auth policy."""
@@ -902,20 +835,6 @@ class BrowserVNCApplication(TypedDict, total=False):
902835
"""
903836

904837

905-
class BrowserVNCApplicationDestination(TypedDict, total=False):
906-
type: Literal["public", "private"]
907-
908-
uri: str
909-
"""The URI of the destination.
910-
911-
Public destinations can include a domain and path with
912-
[wildcards](https://developers.cloudflare.com/cloudflare-one/policies/access/app-paths/).
913-
Private destinations are an early access feature and gated behind a feature
914-
flag. Private destinations support private IPv4, IPv6, and Server Name
915-
Indications (SNI) with optional port ranges.
916-
"""
917-
918-
919838
class BrowserVNCApplicationPolicyAccessAppPolicyLink(TypedDict, total=False):
920839
id: str
921840
"""The UUID of the policy"""

0 commit comments

Comments
 (0)
0