mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 05:27:30 +08:00
✨ implement calendar acl event
This commit is contained in:
parent
b0f4b8ffa1
commit
919e3ebf8c
@ -18,6 +18,7 @@ class EventHeader(BaseModel):
|
||||
token: str
|
||||
app_id: str
|
||||
tenant_key: str
|
||||
user_list: Optional[List[dict]]
|
||||
|
||||
|
||||
class Event(BaseEvent):
|
||||
@ -535,6 +536,33 @@ class ContactDepartmentCreatedEvent(NoticeEvent):
|
||||
event: ContactDepartmentCreatedEventDetail
|
||||
|
||||
|
||||
class CalendarAclScope(BaseModel):
|
||||
type: str
|
||||
user_id: str
|
||||
|
||||
|
||||
class CalendarAclCreatedEventDetail(BaseModel):
|
||||
acl_id: str
|
||||
role: str
|
||||
scope: CalendarAclScope
|
||||
|
||||
|
||||
class CalendarAclCreatedEvent(NoticeEvent):
|
||||
__event__ = "calendar.calendar.acl.created_v4"
|
||||
event: CalendarAclCreatedEventDetail
|
||||
|
||||
|
||||
class CalendarAclDeletedEventDetail(BaseModel):
|
||||
acl_id: str
|
||||
role: str
|
||||
scope: CalendarAclScope
|
||||
|
||||
|
||||
class CalendarAclDeletedEvent(NoticeEvent):
|
||||
__event__ = "calendar.calendar.acl.deleted_v4"
|
||||
event: CalendarAclDeletedEventDetail
|
||||
|
||||
|
||||
_t = StringTrie(separator=".")
|
||||
|
||||
# define `model` first to avoid globals changing while `for`
|
||||
|
Loading…
Reference in New Issue
Block a user