Skip to content

Commit

Permalink
feat: update via SDK Studio (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 12, 2024
1 parent 53a9d5b commit 074cbd4
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 31 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Methods:
Types:

```python
from cloudflare.types.accounts import Role, RoleWithID, RoleListResponse, RoleGetResponse
from cloudflare.types.accounts import RoleListResponse, RoleGetResponse
```

Methods:
Expand Down
1 change: 0 additions & 1 deletion src/cloudflare/types/accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

from .role import Role as Role
from .account_member import AccountMember as AccountMember
from .role_get_response import RoleGetResponse as RoleGetResponse
from .member_list_params import MemberListParams as MemberListParams
Expand Down
17 changes: 15 additions & 2 deletions src/cloudflare/types/accounts/member_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@
from typing import List, Optional
from typing_extensions import Literal

from .role import Role
from ..._models import BaseModel

__all__ = ["MemberListResponse"]
__all__ = ["MemberListResponse", "Role"]


class Role(BaseModel):
id: str
"""Role identifier tag."""

description: str
"""Description of role's permissions."""

name: str
"""Role Name."""

permissions: List[str]
"""Access permissions for this User."""


class MemberListResponse(BaseModel):
Expand Down
21 changes: 0 additions & 21 deletions src/cloudflare/types/accounts/role.py

This file was deleted.

21 changes: 18 additions & 3 deletions src/cloudflare/types/accounts/role_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,23 @@

from typing import List

from .role import Role
from ..._models import BaseModel

__all__ = ["RoleListResponse"]
__all__ = ["RoleListResponse", "RoleListResponseItem"]

RoleListResponse = List[Role]

class RoleListResponseItem(BaseModel):
id: str
"""Role identifier tag."""

description: str
"""Description of role's permissions."""

name: str
"""Role Name."""

permissions: List[str]
"""Access permissions for this User."""


RoleListResponse = List[RoleListResponseItem]
19 changes: 16 additions & 3 deletions src/cloudflare/types/user/invite_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@
from typing_extensions import Literal

from ..._models import BaseModel
from ..accounts import Role

__all__ = ["InviteListResponse", "InviteListResponseItem"]
__all__ = ["InviteListResponse", "InviteListResponseItem", "InviteListResponseItemRole"]


class InviteListResponseItemRole(BaseModel):
id: str
"""Role identifier tag."""

description: str
"""Description of role's permissions."""

name: str
"""Role Name."""

permissions: List[str]
"""Access permissions for this User."""


class InviteListResponseItem(BaseModel):
Expand Down Expand Up @@ -35,7 +48,7 @@ class InviteListResponseItem(BaseModel):
organization_name: Optional[str] = None
"""Organization name."""

roles: Optional[List[Role]] = None
roles: Optional[List[InviteListResponseItemRole]] = None
"""Roles to be assigned to this user."""

status: Optional[Literal["pending", "accepted", "rejected", "expired"]] = None
Expand Down

0 comments on commit 074cbd4

Please sign in to comment.