From e3e13b47726063619636b40ee9bdb4e8198044ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 20:18:29 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#203) --- api.md | 1 + src/cloudflare/types/accounts/__init__.py | 2 + .../types/accounts/account_member.py | 116 +++--------------- .../types/accounts/account_member_with_id.py | 116 +++--------------- .../types/accounts/role_permission_grants.py | 13 ++ .../accounts/role_permission_grants_param.py | 13 ++ src/cloudflare/types/membership.py | 114 +++-------------- 7 files changed, 71 insertions(+), 304 deletions(-) create mode 100644 src/cloudflare/types/accounts/role_permission_grants.py create mode 100644 src/cloudflare/types/accounts/role_permission_grants_param.py diff --git a/api.md b/api.md index 9256a3dcbc61..f0a75e59afa6 100644 --- a/api.md +++ b/api.md @@ -26,6 +26,7 @@ Types: from cloudflare.types.accounts import ( AccountMember, AccountMemberWithID, + RolePermissionGrants, MemberListResponse, MemberDeleteResponse, ) diff --git a/src/cloudflare/types/accounts/__init__.py b/src/cloudflare/types/accounts/__init__.py index c004560aa23d..1483100b3aba 100644 --- a/src/cloudflare/types/accounts/__init__.py +++ b/src/cloudflare/types/accounts/__init__.py @@ -11,3 +11,5 @@ from .member_update_params import MemberUpdateParams as MemberUpdateParams from .account_member_with_id import AccountMemberWithID as AccountMemberWithID from .member_delete_response import MemberDeleteResponse as MemberDeleteResponse +from .role_permission_grants import RolePermissionGrants as RolePermissionGrants +from .role_permission_grants_param import RolePermissionGrantsParam as RolePermissionGrantsParam diff --git a/src/cloudflare/types/accounts/account_member.py b/src/cloudflare/types/accounts/account_member.py index b81ba646d840..04341a152a77 100644 --- a/src/cloudflare/types/accounts/account_member.py +++ b/src/cloudflare/types/accounts/account_member.py @@ -3,123 +3,35 @@ from typing import List, Optional from ..._models import BaseModel +from .role_permission_grants import RolePermissionGrants -__all__ = [ - "AccountMember", - "Role", - "RolePermissions", - "RolePermissionsAnalytics", - "RolePermissionsBilling", - "RolePermissionsCachePurge", - "RolePermissionsDNS", - "RolePermissionsDNSRecords", - "RolePermissionsLb", - "RolePermissionsLogs", - "RolePermissionsOrganization", - "RolePermissionsSSL", - "RolePermissionsWAF", - "RolePermissionsZoneSettings", - "RolePermissionsZones", - "User", -] - - -class RolePermissionsAnalytics(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsBilling(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsCachePurge(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsDNS(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsDNSRecords(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsLb(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsLogs(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsOrganization(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsSSL(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsWAF(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsZoneSettings(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsZones(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None +__all__ = ["AccountMember", "Role", "RolePermissions", "User"] class RolePermissions(BaseModel): - analytics: Optional[RolePermissionsAnalytics] = None + analytics: Optional[RolePermissionGrants] = None - billing: Optional[RolePermissionsBilling] = None + billing: Optional[RolePermissionGrants] = None - cache_purge: Optional[RolePermissionsCachePurge] = None + cache_purge: Optional[RolePermissionGrants] = None - dns: Optional[RolePermissionsDNS] = None + dns: Optional[RolePermissionGrants] = None - dns_records: Optional[RolePermissionsDNSRecords] = None + dns_records: Optional[RolePermissionGrants] = None - lb: Optional[RolePermissionsLb] = None + lb: Optional[RolePermissionGrants] = None - logs: Optional[RolePermissionsLogs] = None + logs: Optional[RolePermissionGrants] = None - organization: Optional[RolePermissionsOrganization] = None + organization: Optional[RolePermissionGrants] = None - ssl: Optional[RolePermissionsSSL] = None + ssl: Optional[RolePermissionGrants] = None - waf: Optional[RolePermissionsWAF] = None + waf: Optional[RolePermissionGrants] = None - zone_settings: Optional[RolePermissionsZoneSettings] = None + zone_settings: Optional[RolePermissionGrants] = None - zones: Optional[RolePermissionsZones] = None + zones: Optional[RolePermissionGrants] = None class Role(BaseModel): diff --git a/src/cloudflare/types/accounts/account_member_with_id.py b/src/cloudflare/types/accounts/account_member_with_id.py index 6064ba5ab3ab..44fe04f3761f 100644 --- a/src/cloudflare/types/accounts/account_member_with_id.py +++ b/src/cloudflare/types/accounts/account_member_with_id.py @@ -3,123 +3,35 @@ from typing import List, Optional from ..._models import BaseModel +from .role_permission_grants import RolePermissionGrants -__all__ = [ - "AccountMemberWithID", - "Role", - "RolePermissions", - "RolePermissionsAnalytics", - "RolePermissionsBilling", - "RolePermissionsCachePurge", - "RolePermissionsDNS", - "RolePermissionsDNSRecords", - "RolePermissionsLb", - "RolePermissionsLogs", - "RolePermissionsOrganization", - "RolePermissionsSSL", - "RolePermissionsWAF", - "RolePermissionsZoneSettings", - "RolePermissionsZones", - "User", -] - - -class RolePermissionsAnalytics(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsBilling(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsCachePurge(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsDNS(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsDNSRecords(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsLb(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsLogs(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsOrganization(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsSSL(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsWAF(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsZoneSettings(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class RolePermissionsZones(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None +__all__ = ["AccountMemberWithID", "Role", "RolePermissions", "User"] class RolePermissions(BaseModel): - analytics: Optional[RolePermissionsAnalytics] = None + analytics: Optional[RolePermissionGrants] = None - billing: Optional[RolePermissionsBilling] = None + billing: Optional[RolePermissionGrants] = None - cache_purge: Optional[RolePermissionsCachePurge] = None + cache_purge: Optional[RolePermissionGrants] = None - dns: Optional[RolePermissionsDNS] = None + dns: Optional[RolePermissionGrants] = None - dns_records: Optional[RolePermissionsDNSRecords] = None + dns_records: Optional[RolePermissionGrants] = None - lb: Optional[RolePermissionsLb] = None + lb: Optional[RolePermissionGrants] = None - logs: Optional[RolePermissionsLogs] = None + logs: Optional[RolePermissionGrants] = None - organization: Optional[RolePermissionsOrganization] = None + organization: Optional[RolePermissionGrants] = None - ssl: Optional[RolePermissionsSSL] = None + ssl: Optional[RolePermissionGrants] = None - waf: Optional[RolePermissionsWAF] = None + waf: Optional[RolePermissionGrants] = None - zone_settings: Optional[RolePermissionsZoneSettings] = None + zone_settings: Optional[RolePermissionGrants] = None - zones: Optional[RolePermissionsZones] = None + zones: Optional[RolePermissionGrants] = None class Role(BaseModel): diff --git a/src/cloudflare/types/accounts/role_permission_grants.py b/src/cloudflare/types/accounts/role_permission_grants.py new file mode 100644 index 000000000000..72bc4e1e3fb8 --- /dev/null +++ b/src/cloudflare/types/accounts/role_permission_grants.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["RolePermissionGrants"] + + +class RolePermissionGrants(BaseModel): + read: Optional[bool] = None + + write: Optional[bool] = None diff --git a/src/cloudflare/types/accounts/role_permission_grants_param.py b/src/cloudflare/types/accounts/role_permission_grants_param.py new file mode 100644 index 000000000000..3073f03161bc --- /dev/null +++ b/src/cloudflare/types/accounts/role_permission_grants_param.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["RolePermissionGrantsParam"] + + +class RolePermissionGrantsParam(TypedDict, total=False): + read: bool + + write: bool diff --git a/src/cloudflare/types/membership.py b/src/cloudflare/types/membership.py index 6f5957af979a..2f0a9ec3fef8 100644 --- a/src/cloudflare/types/membership.py +++ b/src/cloudflare/types/membership.py @@ -5,121 +5,35 @@ from .account import Account from .._models import BaseModel +from .accounts import RolePermissionGrants -__all__ = [ - "Membership", - "Permissions", - "PermissionsAnalytics", - "PermissionsBilling", - "PermissionsCachePurge", - "PermissionsDNS", - "PermissionsDNSRecords", - "PermissionsLb", - "PermissionsLogs", - "PermissionsOrganization", - "PermissionsSSL", - "PermissionsWAF", - "PermissionsZoneSettings", - "PermissionsZones", -] - - -class PermissionsAnalytics(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsBilling(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsCachePurge(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsDNS(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsDNSRecords(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsLb(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsLogs(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsOrganization(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsSSL(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsWAF(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsZoneSettings(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None - - -class PermissionsZones(BaseModel): - read: Optional[bool] = None - - write: Optional[bool] = None +__all__ = ["Membership", "Permissions"] class Permissions(BaseModel): - analytics: Optional[PermissionsAnalytics] = None + analytics: Optional[RolePermissionGrants] = None - billing: Optional[PermissionsBilling] = None + billing: Optional[RolePermissionGrants] = None - cache_purge: Optional[PermissionsCachePurge] = None + cache_purge: Optional[RolePermissionGrants] = None - dns: Optional[PermissionsDNS] = None + dns: Optional[RolePermissionGrants] = None - dns_records: Optional[PermissionsDNSRecords] = None + dns_records: Optional[RolePermissionGrants] = None - lb: Optional[PermissionsLb] = None + lb: Optional[RolePermissionGrants] = None - logs: Optional[PermissionsLogs] = None + logs: Optional[RolePermissionGrants] = None - organization: Optional[PermissionsOrganization] = None + organization: Optional[RolePermissionGrants] = None - ssl: Optional[PermissionsSSL] = None + ssl: Optional[RolePermissionGrants] = None - waf: Optional[PermissionsWAF] = None + waf: Optional[RolePermissionGrants] = None - zone_settings: Optional[PermissionsZoneSettings] = None + zone_settings: Optional[RolePermissionGrants] = None - zones: Optional[PermissionsZones] = None + zones: Optional[RolePermissionGrants] = None class Membership(BaseModel):