matrix-appservice-kakaotalk/matrix_appservice_kakaotalk/kt/types/api/struct/friends/friend_struct.py

72 lines
1.8 KiB
Python

# matrix-appservice-kakaotalk - A Matrix-KakaoTalk puppeting bridge.
# Copyright (C) 2022 Tulir Asokan, Andrew Ferrazzutti
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import Union, Optional
from enum import IntEnum
from attr import dataclass
from mautrix.types import SerializableAttrs
from ....bson import Long
class ApiUserType(IntEnum):
NORMAL = 0
PLUS = 1
@dataclass
class FriendExt(SerializableAttrs):
addible: bool
yellowid: bool
consultable: bool
friendsCount: int
verificationType: str
isAdult: bool
writable: bool
serviceTypeCode: int
isOfficial: bool
@dataclass(kw_only=True)
class FriendStruct(SerializableAttrs):
userId: Union[Long, int]
nickName: str
type: int
phoneNumber: str
statusMessage: str
UUID: str
friendNickName: str
phoneticName: Optional[str] = None
accountId: int
profileImageUrl: str
fullProfileImageUrl: str
originalProfileImageUrl: str
userType: ApiUserType;
ext: Union[FriendExt, str];
hidden: bool
purged: bool
favorite: bool
screenToken: int
suspended: bool = False
directChatId: int
__all__ = [
"ApiUserType",
"FriendExt",
"FriendStruct",
]