141 lines
3.9 KiB
Python
141 lines
3.9 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 Optional, Union
|
||
|
|
||
|
from attr import dataclass
|
||
|
|
||
|
from mautrix.types import SerializableAttrs
|
||
|
|
||
|
from ...bson import Long
|
||
|
|
||
|
|
||
|
@dataclass
|
||
|
class OpenChatSettingsStruct(SerializableAttrs):
|
||
|
chatMemberMaxJoin: int
|
||
|
chatRoomMaxJoin: int
|
||
|
createLinkLimit: 10;
|
||
|
createCardLinkLimit: 3;
|
||
|
numOfStaffLimit: 5;
|
||
|
rewritable: bool
|
||
|
handoverEnabled: bool
|
||
|
|
||
|
|
||
|
@dataclass(kw_only=True)
|
||
|
class MoreSettingsStruct(SerializableAttrs):
|
||
|
since: int
|
||
|
|
||
|
@dataclass
|
||
|
class ClientConf(SerializableAttrs):
|
||
|
osVersion: str
|
||
|
clientConf: ClientConf
|
||
|
|
||
|
available: int
|
||
|
available2: int
|
||
|
friendsPollingInterval: Optional[int] = None # NOTE Made optional
|
||
|
settingsPollingInterval: Optional[int] = None # NOTE Made optional
|
||
|
profilePollingInterval: Optional[int] = None # NOTE Made optional
|
||
|
moreListPollingInterval: Optional[int] = None # NOTE Made optional
|
||
|
morePayPollingInterval: Optional[int] = None # NOTE Made optional
|
||
|
daumMediaPollingInterval: Optional[int] = None # NOTE Made optional
|
||
|
lessSettingsPollingInterval: Optional[int] = None # NOTE Made optional
|
||
|
|
||
|
@dataclass
|
||
|
class MoreApps(SerializableAttrs):
|
||
|
recommend: Optional[list[str]] = None # NOTE From unknown[]
|
||
|
all: Optional[list[str]] = None # NOTE From unknown[]
|
||
|
moreApps: MoreApps
|
||
|
|
||
|
shortcuts: Optional[dict[str, int]] = None # NOTE Made optional
|
||
|
seasonProfileRev: int
|
||
|
seasonNoticeRev: int
|
||
|
serviceUserId: Union[Long, int]
|
||
|
accountId: int
|
||
|
accountDisplayId: str
|
||
|
hashedAccountId: str
|
||
|
pstnNumber: str
|
||
|
formattedPstnNumber: str
|
||
|
nsnNumber: str
|
||
|
formattedNsnNumber: str
|
||
|
contactNameSync: int
|
||
|
allowMigration: bool
|
||
|
emailStatus: int
|
||
|
emailAddress: str
|
||
|
emailVerified: bool
|
||
|
uuid: str
|
||
|
uuidSearchable: bool
|
||
|
nickName: str
|
||
|
openChat: OpenChatSettingsStruct
|
||
|
profileImageUrl: str
|
||
|
fullProfileImageUrl: str
|
||
|
originalProfileImageUrl: str
|
||
|
statusMessage: str
|
||
|
|
||
|
|
||
|
@dataclass(kw_only=True)
|
||
|
class LessSettingsStruct(SerializableAttrs):
|
||
|
kakaoAutoLoginDomain: list[str]
|
||
|
daumSsoDomain: list[str]
|
||
|
|
||
|
@dataclass
|
||
|
class GoogleMapsApi(SerializableAttrs):
|
||
|
key: str
|
||
|
signature: str
|
||
|
googleMapsApi: GoogleMapsApi
|
||
|
|
||
|
@dataclass
|
||
|
class ChatReportLimit(SerializableAttrs):
|
||
|
chat: int
|
||
|
open_chat: int
|
||
|
plus_chat: int
|
||
|
chat_report_limit: ChatReportLimit
|
||
|
|
||
|
externalApiList: str # NOTE From unknown
|
||
|
|
||
|
@dataclass
|
||
|
class BirthdayFriends(SerializableAttrs):
|
||
|
landing_url: str
|
||
|
birthday_friends: BirthdayFriends
|
||
|
|
||
|
messageDeleteTime: Optional[int] = None # NOTE Made optional
|
||
|
|
||
|
@dataclass
|
||
|
class VoiceTalk(SerializableAttrs):
|
||
|
groupCallMaxParticipants: int
|
||
|
voiceTalk: VoiceTalk
|
||
|
|
||
|
profileActions: bool
|
||
|
|
||
|
@dataclass
|
||
|
class PostExpirationSetting(SerializableAttrs):
|
||
|
flagOn: bool
|
||
|
newPostTerm: int
|
||
|
postExpirationSetting: PostExpirationSetting
|
||
|
|
||
|
kakaoAlertIds: list[int]
|
||
|
|
||
|
|
||
|
@dataclass
|
||
|
class LoginTokenStruct(SerializableAttrs):
|
||
|
token: str
|
||
|
expires: int
|
||
|
|
||
|
|
||
|
___all___ = [
|
||
|
"OpenChatSettingsStruct",
|
||
|
"MoreSettingsStruct",
|
||
|
"LessSettingsStruct",
|
||
|
"LoginTokenStruct",
|
||
|
]
|