improve moderation log

This commit is contained in:
syuilo 2023-09-24 10:57:24 +09:00
parent ed983a5baf
commit 8e5a90589d
11 changed files with 81 additions and 16 deletions

View file

@ -2538,6 +2538,12 @@ type ModerationLog = {
} | {
type: 'addCustomEmoji';
info: ModerationLogPayloads['addCustomEmoji'];
} | {
type: 'updateCustomEmoji';
info: ModerationLogPayloads['updateCustomEmoji'];
} | {
type: 'deleteCustomEmoji';
info: ModerationLogPayloads['deleteCustomEmoji'];
} | {
type: 'assignRole';
info: ModerationLogPayloads['assignRole'];
@ -2592,7 +2598,7 @@ type ModerationLog = {
});
// @public (undocumented)
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "assignRole", "unassignRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance"];
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"];
// @public (undocumented)
export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];

View file

@ -51,6 +51,8 @@ export const moderationLogTypes = [
'unsuspend',
'updateUserNote',
'addCustomEmoji',
'updateCustomEmoji',
'deleteCustomEmoji',
'assignRole',
'unassignRole',
'updateRole',
@ -88,6 +90,16 @@ export type ModerationLogPayloads = {
};
addCustomEmoji: {
emojiId: string;
emoji: any;
};
updateCustomEmoji: {
emojiId: string;
before: any;
after: any;
};
deleteCustomEmoji: {
emojiId: string;
emoji: any;
};
assignRole: {
userId: string;

View file

@ -589,6 +589,12 @@ export type ModerationLog = {
} | {
type: 'addCustomEmoji';
info: ModerationLogPayloads['addCustomEmoji'];
} | {
type: 'updateCustomEmoji';
info: ModerationLogPayloads['updateCustomEmoji'];
} | {
type: 'deleteCustomEmoji';
info: ModerationLogPayloads['deleteCustomEmoji'];
} | {
type: 'assignRole';
info: ModerationLogPayloads['assignRole'];