2023-09-21 04:48:15 -05:00
|
|
|
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app'] as const;
|
2023-03-29 19:33:19 -05:00
|
|
|
|
|
|
|
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
|
|
|
|
|
|
|
|
export const mutedNoteReasons = ['word', 'manual', 'spam', 'other'] as const;
|
|
|
|
|
|
|
|
export const ffVisibility = ['public', 'followers', 'private'] as const;
|
|
|
|
|
|
|
|
export const permissions = [
|
|
|
|
'read:account',
|
|
|
|
'write:account',
|
|
|
|
'read:blocks',
|
|
|
|
'write:blocks',
|
|
|
|
'read:drive',
|
|
|
|
'write:drive',
|
|
|
|
'read:favorites',
|
|
|
|
'write:favorites',
|
|
|
|
'read:following',
|
|
|
|
'write:following',
|
|
|
|
'read:messaging',
|
|
|
|
'write:messaging',
|
|
|
|
'read:mutes',
|
|
|
|
'write:mutes',
|
|
|
|
'write:notes',
|
|
|
|
'read:notifications',
|
|
|
|
'write:notifications',
|
|
|
|
'read:reactions',
|
|
|
|
'write:reactions',
|
|
|
|
'write:votes',
|
|
|
|
'read:pages',
|
|
|
|
'write:pages',
|
|
|
|
'write:page-likes',
|
|
|
|
'read:page-likes',
|
|
|
|
'read:user-groups',
|
|
|
|
'write:user-groups',
|
|
|
|
'read:channels',
|
|
|
|
'write:channels',
|
|
|
|
'read:gallery',
|
|
|
|
'write:gallery',
|
|
|
|
'read:gallery-likes',
|
|
|
|
'write:gallery-likes',
|
2023-08-20 23:01:08 -05:00
|
|
|
'read:flash',
|
|
|
|
'write:flash',
|
|
|
|
'read:flash-likes',
|
|
|
|
'write:flash-likes',
|
2023-03-29 19:33:19 -05:00
|
|
|
];
|
2023-09-23 04:28:16 -05:00
|
|
|
|
|
|
|
export const moderationLogTypes = [
|
|
|
|
'updateServerSettings',
|
|
|
|
'suspend',
|
|
|
|
'unsuspend',
|
|
|
|
'updateUserNote',
|
|
|
|
'addCustomEmoji',
|
2023-09-23 20:57:24 -05:00
|
|
|
'updateCustomEmoji',
|
|
|
|
'deleteCustomEmoji',
|
2023-09-23 04:28:16 -05:00
|
|
|
'assignRole',
|
|
|
|
'unassignRole',
|
2023-09-24 20:29:12 -05:00
|
|
|
'createRole',
|
2023-09-23 04:28:16 -05:00
|
|
|
'updateRole',
|
|
|
|
'deleteRole',
|
|
|
|
'clearQueue',
|
|
|
|
'promoteQueue',
|
|
|
|
'deleteDriveFile',
|
|
|
|
'deleteNote',
|
|
|
|
'createGlobalAnnouncement',
|
|
|
|
'createUserAnnouncement',
|
2023-09-23 20:46:09 -05:00
|
|
|
'updateGlobalAnnouncement',
|
|
|
|
'updateUserAnnouncement',
|
|
|
|
'deleteGlobalAnnouncement',
|
|
|
|
'deleteUserAnnouncement',
|
2023-09-23 06:50:02 -05:00
|
|
|
'resetPassword',
|
|
|
|
'suspendRemoteInstance',
|
|
|
|
'unsuspendRemoteInstance',
|
2023-09-24 01:40:38 -05:00
|
|
|
'markSensitiveDriveFile',
|
|
|
|
'unmarkSensitiveDriveFile',
|
2023-09-23 04:28:16 -05:00
|
|
|
] as const;
|
|
|
|
|
|
|
|
export type ModerationLogPayloads = {
|
|
|
|
updateServerSettings: {
|
|
|
|
before: any | null;
|
|
|
|
after: any | null;
|
|
|
|
};
|
|
|
|
suspend: {
|
2023-09-24 20:29:12 -05:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
};
|
|
|
|
unsuspend: {
|
2023-09-24 20:29:12 -05:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
};
|
|
|
|
updateUserNote: {
|
|
|
|
userId: string;
|
2023-09-24 20:29:12 -05:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
before: string | null;
|
|
|
|
after: string | null;
|
|
|
|
};
|
|
|
|
addCustomEmoji: {
|
|
|
|
emojiId: string;
|
2023-09-23 20:57:24 -05:00
|
|
|
emoji: any;
|
|
|
|
};
|
|
|
|
updateCustomEmoji: {
|
|
|
|
emojiId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
deleteCustomEmoji: {
|
|
|
|
emojiId: string;
|
|
|
|
emoji: any;
|
2023-09-23 04:28:16 -05:00
|
|
|
};
|
|
|
|
assignRole: {
|
|
|
|
userId: string;
|
2023-09-24 20:29:12 -05:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
roleId: string;
|
|
|
|
roleName: string;
|
|
|
|
expiresAt: string | null;
|
|
|
|
};
|
|
|
|
unassignRole: {
|
|
|
|
userId: string;
|
2023-09-24 20:29:12 -05:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
roleId: string;
|
|
|
|
roleName: string;
|
|
|
|
};
|
2023-09-24 20:29:12 -05:00
|
|
|
createRole: {
|
|
|
|
roleId: string;
|
|
|
|
role: any;
|
|
|
|
};
|
2023-09-23 04:28:16 -05:00
|
|
|
updateRole: {
|
|
|
|
roleId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
deleteRole: {
|
|
|
|
roleId: string;
|
2023-09-23 20:33:30 -05:00
|
|
|
role: any;
|
2023-09-23 04:28:16 -05:00
|
|
|
};
|
|
|
|
clearQueue: Record<string, never>;
|
|
|
|
promoteQueue: Record<string, never>;
|
|
|
|
deleteDriveFile: {
|
|
|
|
fileId: string;
|
|
|
|
fileUserId: string | null;
|
2023-09-24 20:29:12 -05:00
|
|
|
fileUserUsername: string | null;
|
|
|
|
fileUserHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
};
|
|
|
|
deleteNote: {
|
|
|
|
noteId: string;
|
|
|
|
noteUserId: string;
|
2023-09-24 20:29:12 -05:00
|
|
|
noteUserUsername: string;
|
|
|
|
noteUserHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
note: any;
|
|
|
|
};
|
|
|
|
createGlobalAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
|
|
|
};
|
|
|
|
createUserAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
|
|
|
userId: string;
|
2023-09-24 20:29:12 -05:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 04:28:16 -05:00
|
|
|
};
|
2023-09-23 20:46:09 -05:00
|
|
|
updateGlobalAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
updateUserAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
2023-09-24 20:29:12 -05:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 20:46:09 -05:00
|
|
|
};
|
|
|
|
deleteGlobalAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
|
|
|
};
|
|
|
|
deleteUserAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
|
|
|
};
|
2023-09-23 06:50:02 -05:00
|
|
|
resetPassword: {
|
2023-09-24 20:29:12 -05:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 06:50:02 -05:00
|
|
|
};
|
|
|
|
suspendRemoteInstance: {
|
|
|
|
id: string;
|
|
|
|
host: string;
|
|
|
|
};
|
|
|
|
unsuspendRemoteInstance: {
|
|
|
|
id: string;
|
|
|
|
host: string;
|
|
|
|
};
|
2023-09-24 01:40:38 -05:00
|
|
|
markSensitiveDriveFile: {
|
|
|
|
fileId: string;
|
|
|
|
fileUserId: string | null;
|
2023-09-24 20:29:12 -05:00
|
|
|
fileUserUsername: string | null;
|
|
|
|
fileUserHost: string | null;
|
2023-09-24 01:40:38 -05:00
|
|
|
};
|
|
|
|
unmarkSensitiveDriveFile: {
|
|
|
|
fileId: string;
|
|
|
|
fileUserId: string | null;
|
2023-09-24 20:29:12 -05:00
|
|
|
fileUserUsername: string | null;
|
|
|
|
fileUserHost: string | null;
|
2023-09-24 01:40:38 -05:00
|
|
|
};
|
2023-09-23 04:28:16 -05:00
|
|
|
};
|