inbox/validators/inbox.py

33 lines
561 B
Python
Raw Normal View History

2023-10-14 12:59:43 +00:00
from typing import TypedDict, Optional, List
2023-10-13 16:45:30 +00:00
2023-10-14 12:59:43 +00:00
class Message(TypedDict):
2023-10-13 16:45:30 +00:00
id: int
2023-10-14 06:38:12 +00:00
chat: str
2023-10-13 16:45:30 +00:00
author: int
body: str
createdAt: int
replyTo: Optional[int]
2023-10-14 06:38:12 +00:00
createdAt: int
updatedAt: Optional[int]
2023-10-14 12:59:43 +00:00
class Chat(TypedDict):
2023-10-14 06:38:12 +00:00
id: str
members: List[int]
admins: List[int]
title: str
2023-10-14 12:59:43 +00:00
updatedAt: Optional[int]
2023-10-14 06:38:12 +00:00
createdAt: int
createdBy: int
description: Optional[str]
2023-10-14 12:59:43 +00:00
class ChatMember(TypedDict):
2023-10-14 06:38:12 +00:00
id: int
slug: str
name: str
userpic: Optional[str]
lastSeen: int
2023-10-14 12:59:43 +00:00
online: Optional[bool]