From a0f259129a07a73fdcb37681ecb2a3fc570a42be Mon Sep 17 00:00:00 2001 From: yupix Date: Sat, 11 Mar 2023 16:12:56 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=83=AD=E3=83=BC=E3=83=AB=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=99=E3=82=8B=E5=9E=8B=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=20#53?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mipac/types/roles.py | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 mipac/types/roles.py diff --git a/mipac/types/roles.py b/mipac/types/roles.py new file mode 100644 index 0000000..9479c04 --- /dev/null +++ b/mipac/types/roles.py @@ -0,0 +1,45 @@ +from typing import NotRequired, TypedDict + + +class IRolePolicieValue(TypedDict): + value: int + use_default: bool + priority: NotRequired[int] + + +class IRolePolicies(TypedDict): + antenna_limit: IRolePolicieValue + gtl_available: IRolePolicieValue + ltl_available: IRolePolicieValue + can_public_note: IRolePolicieValue + drive_capacity_mb: IRolePolicieValue + can_invite: IRolePolicieValue + can_manage_custom_emojis: IRolePolicieValue + can_hide_ads: IRolePolicieValue + pin_limit: IRolePolicieValue + word_mute_limit: IRolePolicieValue + webhook_limit: IRolePolicieValue + clip_limit: IRolePolicieValue + note_each_clips_limit: IRolePolicieValue + user_list_limit: IRolePolicieValue + user_each_user_lists_limit: IRolePolicieValue + rate_limit_factor: IRolePolicieValue + + +class IRole(TypedDict): + id: str + created_at: str + updated_at: str + name: str + description: str + color: str | None + icon_url: str | None + target: str + cond_formula: dict + is_public: bool + is_administrator: bool + is_moderator: bool + as_badge: bool + can_edit_members_by_moderator: bool + policies: IRolePolicies + users_count: int