enhance: improve moderation log
This commit is contained in:
@@ -2550,6 +2550,9 @@ type ModerationLog = {
|
||||
} | {
|
||||
type: 'unassignRole';
|
||||
info: ModerationLogPayloads['unassignRole'];
|
||||
} | {
|
||||
type: 'createRole';
|
||||
info: ModerationLogPayloads['createRole'];
|
||||
} | {
|
||||
type: 'updateRole';
|
||||
info: ModerationLogPayloads['updateRole'];
|
||||
@@ -2604,7 +2607,7 @@ type ModerationLog = {
|
||||
});
|
||||
|
||||
// @public (undocumented)
|
||||
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile"];
|
||||
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile"];
|
||||
|
||||
// @public (undocumented)
|
||||
export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];
|
||||
|
@@ -55,6 +55,7 @@ export const moderationLogTypes = [
|
||||
'deleteCustomEmoji',
|
||||
'assignRole',
|
||||
'unassignRole',
|
||||
'createRole',
|
||||
'updateRole',
|
||||
'deleteRole',
|
||||
'clearQueue',
|
||||
@@ -80,13 +81,19 @@ export type ModerationLogPayloads = {
|
||||
after: any | null;
|
||||
};
|
||||
suspend: {
|
||||
targetId: string;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
unsuspend: {
|
||||
targetId: string;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
updateUserNote: {
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
before: string | null;
|
||||
after: string | null;
|
||||
};
|
||||
@@ -105,15 +112,23 @@ export type ModerationLogPayloads = {
|
||||
};
|
||||
assignRole: {
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
roleId: string;
|
||||
roleName: string;
|
||||
expiresAt: string | null;
|
||||
};
|
||||
unassignRole: {
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
roleId: string;
|
||||
roleName: string;
|
||||
};
|
||||
createRole: {
|
||||
roleId: string;
|
||||
role: any;
|
||||
};
|
||||
updateRole: {
|
||||
roleId: string;
|
||||
before: any;
|
||||
@@ -128,10 +143,14 @@ export type ModerationLogPayloads = {
|
||||
deleteDriveFile: {
|
||||
fileId: string;
|
||||
fileUserId: string | null;
|
||||
fileUserUsername: string | null;
|
||||
fileUserHost: string | null;
|
||||
};
|
||||
deleteNote: {
|
||||
noteId: string;
|
||||
noteUserId: string;
|
||||
noteUserUsername: string;
|
||||
noteUserHost: string | null;
|
||||
note: any;
|
||||
};
|
||||
createGlobalAnnouncement: {
|
||||
@@ -142,6 +161,8 @@ export type ModerationLogPayloads = {
|
||||
announcementId: string;
|
||||
announcement: any;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
updateGlobalAnnouncement: {
|
||||
announcementId: string;
|
||||
@@ -152,6 +173,9 @@ export type ModerationLogPayloads = {
|
||||
announcementId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
deleteGlobalAnnouncement: {
|
||||
announcementId: string;
|
||||
@@ -162,7 +186,9 @@ export type ModerationLogPayloads = {
|
||||
announcement: any;
|
||||
};
|
||||
resetPassword: {
|
||||
targetId: string;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
suspendRemoteInstance: {
|
||||
id: string;
|
||||
@@ -175,9 +201,13 @@ export type ModerationLogPayloads = {
|
||||
markSensitiveDriveFile: {
|
||||
fileId: string;
|
||||
fileUserId: string | null;
|
||||
fileUserUsername: string | null;
|
||||
fileUserHost: string | null;
|
||||
};
|
||||
unmarkSensitiveDriveFile: {
|
||||
fileId: string;
|
||||
fileUserId: string | null;
|
||||
fileUserUsername: string | null;
|
||||
fileUserHost: string | null;
|
||||
};
|
||||
};
|
||||
|
@@ -601,6 +601,9 @@ export type ModerationLog = {
|
||||
} | {
|
||||
type: 'unassignRole';
|
||||
info: ModerationLogPayloads['unassignRole'];
|
||||
} | {
|
||||
type: 'createRole';
|
||||
info: ModerationLogPayloads['createRole'];
|
||||
} | {
|
||||
type: 'updateRole';
|
||||
info: ModerationLogPayloads['updateRole'];
|
||||
|
Reference in New Issue
Block a user