2023-12-21 02:39:11 +01:00
|
|
|
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'roleAssigned', 'achievementEarned'] as const;
|
2023-03-30 02:33:19 +02:00
|
|
|
|
|
|
|
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
|
|
|
|
|
|
|
|
export const mutedNoteReasons = ['word', 'manual', 'spam', 'other'] as const;
|
|
|
|
|
2023-12-18 12:59:20 +01:00
|
|
|
export const followingVisibilities = ['public', 'followers', 'private'] as const;
|
|
|
|
|
|
|
|
export const followersVisibilities = ['public', 'followers', 'private'] as const;
|
2023-03-30 02:33:19 +02:00
|
|
|
|
|
|
|
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-21 06:01:08 +02:00
|
|
|
'read:flash',
|
|
|
|
'write:flash',
|
|
|
|
'read:flash-likes',
|
|
|
|
'write:flash-likes',
|
2023-12-27 07:08:59 +01:00
|
|
|
'read:admin:abuse-user-reports',
|
2023-12-27 20:45:21 +01:00
|
|
|
'read:admin:abuse-report-resolvers',
|
|
|
|
'write:admin:abuse-report-resolvers',
|
2023-12-27 07:08:59 +01:00
|
|
|
'write:admin:delete-account',
|
|
|
|
'write:admin:delete-all-files-of-a-user',
|
|
|
|
'read:admin:index-stats',
|
|
|
|
'read:admin:table-stats',
|
|
|
|
'read:admin:user-ips',
|
|
|
|
'read:admin:meta',
|
|
|
|
'write:admin:reset-password',
|
|
|
|
'write:admin:resolve-abuse-user-report',
|
|
|
|
'write:admin:send-email',
|
|
|
|
'read:admin:server-info',
|
|
|
|
'read:admin:show-moderation-log',
|
|
|
|
'read:admin:show-user',
|
|
|
|
'read:admin:show-users',
|
|
|
|
'write:admin:suspend-user',
|
|
|
|
'write:admin:unset-user-avatar',
|
|
|
|
'write:admin:unset-user-banner',
|
|
|
|
'write:admin:unsuspend-user',
|
|
|
|
'write:admin:meta',
|
|
|
|
'write:admin:user-note',
|
|
|
|
'write:admin:roles',
|
|
|
|
'read:admin:roles',
|
|
|
|
'write:admin:relays',
|
|
|
|
'read:admin:relays',
|
|
|
|
'write:admin:invite-codes',
|
|
|
|
'read:admin:invite-codes',
|
|
|
|
'write:admin:announcements',
|
|
|
|
'read:admin:announcements',
|
|
|
|
'write:admin:avatar-decorations',
|
|
|
|
'read:admin:avatar-decorations',
|
|
|
|
'write:admin:federation',
|
2024-02-12 03:35:19 +01:00
|
|
|
'write:admin:indie-auth',
|
|
|
|
'read:admin:indie-auth',
|
2023-12-27 07:08:59 +01:00
|
|
|
'write:admin:account',
|
|
|
|
'read:admin:account',
|
|
|
|
'write:admin:emoji',
|
|
|
|
'read:admin:emoji',
|
|
|
|
'write:admin:queue',
|
|
|
|
'read:admin:queue',
|
|
|
|
'write:admin:promo',
|
|
|
|
'write:admin:drive',
|
|
|
|
'read:admin:drive',
|
|
|
|
'write:admin:ad',
|
|
|
|
'read:admin:ad',
|
|
|
|
'write:invite-codes',
|
|
|
|
'read:invite-codes',
|
|
|
|
'write:clip-favorite',
|
|
|
|
'read:clip-favorite',
|
|
|
|
'read:federation',
|
|
|
|
'write:report-abuse',
|
|
|
|
] as const;
|
2023-09-23 11:28:16 +02:00
|
|
|
|
|
|
|
export const moderationLogTypes = [
|
|
|
|
'updateServerSettings',
|
|
|
|
'suspend',
|
|
|
|
'unsuspend',
|
|
|
|
'updateUserNote',
|
|
|
|
'addCustomEmoji',
|
2023-09-24 03:57:24 +02:00
|
|
|
'updateCustomEmoji',
|
|
|
|
'deleteCustomEmoji',
|
2023-09-23 11:28:16 +02:00
|
|
|
'assignRole',
|
|
|
|
'unassignRole',
|
2023-09-25 03:29:12 +02:00
|
|
|
'createRole',
|
2023-09-23 11:28:16 +02:00
|
|
|
'updateRole',
|
|
|
|
'deleteRole',
|
|
|
|
'clearQueue',
|
|
|
|
'promoteQueue',
|
|
|
|
'deleteDriveFile',
|
|
|
|
'deleteNote',
|
|
|
|
'createGlobalAnnouncement',
|
|
|
|
'createUserAnnouncement',
|
2023-09-24 03:46:09 +02:00
|
|
|
'updateGlobalAnnouncement',
|
|
|
|
'updateUserAnnouncement',
|
|
|
|
'deleteGlobalAnnouncement',
|
|
|
|
'deleteUserAnnouncement',
|
2023-09-23 13:50:02 +02:00
|
|
|
'resetPassword',
|
|
|
|
'suspendRemoteInstance',
|
|
|
|
'unsuspendRemoteInstance',
|
2024-02-22 12:59:52 +01:00
|
|
|
'updateRemoteInstanceNote',
|
2023-09-24 08:40:38 +02:00
|
|
|
'markSensitiveDriveFile',
|
|
|
|
'unmarkSensitiveDriveFile',
|
2023-09-25 09:03:43 +02:00
|
|
|
'resolveAbuseReport',
|
2023-09-28 03:02:05 +02:00
|
|
|
'createInvitation',
|
2023-09-29 06:26:11 +02:00
|
|
|
'createAd',
|
|
|
|
'updateAd',
|
|
|
|
'deleteAd',
|
2024-02-12 03:35:19 +01:00
|
|
|
'createIndieAuthClient',
|
|
|
|
'updateIndieAuthClient',
|
|
|
|
'deleteIndieAuthClient',
|
2023-10-21 11:38:07 +02:00
|
|
|
'createAvatarDecoration',
|
|
|
|
'updateAvatarDecoration',
|
|
|
|
'deleteAvatarDecoration',
|
2023-11-19 02:18:57 +01:00
|
|
|
'unsetUserAvatar',
|
|
|
|
'unsetUserBanner',
|
2023-09-23 11:28:16 +02:00
|
|
|
] as const;
|
|
|
|
|
|
|
|
export type ModerationLogPayloads = {
|
|
|
|
updateServerSettings: {
|
|
|
|
before: any | null;
|
|
|
|
after: any | null;
|
|
|
|
};
|
|
|
|
suspend: {
|
2023-09-25 03:29:12 +02:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
};
|
|
|
|
unsuspend: {
|
2023-09-25 03:29:12 +02:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
};
|
|
|
|
updateUserNote: {
|
|
|
|
userId: string;
|
2023-09-25 03:29:12 +02:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
before: string | null;
|
|
|
|
after: string | null;
|
|
|
|
};
|
|
|
|
addCustomEmoji: {
|
|
|
|
emojiId: string;
|
2023-09-24 03:57:24 +02:00
|
|
|
emoji: any;
|
|
|
|
};
|
|
|
|
updateCustomEmoji: {
|
|
|
|
emojiId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
deleteCustomEmoji: {
|
|
|
|
emojiId: string;
|
|
|
|
emoji: any;
|
2023-09-23 11:28:16 +02:00
|
|
|
};
|
|
|
|
assignRole: {
|
|
|
|
userId: string;
|
2023-09-25 03:29:12 +02:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
roleId: string;
|
|
|
|
roleName: string;
|
|
|
|
expiresAt: string | null;
|
|
|
|
};
|
|
|
|
unassignRole: {
|
|
|
|
userId: string;
|
2023-09-25 03:29:12 +02:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
roleId: string;
|
|
|
|
roleName: string;
|
|
|
|
};
|
2023-09-25 03:29:12 +02:00
|
|
|
createRole: {
|
|
|
|
roleId: string;
|
|
|
|
role: any;
|
|
|
|
};
|
2023-09-23 11:28:16 +02:00
|
|
|
updateRole: {
|
|
|
|
roleId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
deleteRole: {
|
|
|
|
roleId: string;
|
2023-09-24 03:33:30 +02:00
|
|
|
role: any;
|
2023-09-23 11:28:16 +02:00
|
|
|
};
|
|
|
|
clearQueue: Record<string, never>;
|
|
|
|
promoteQueue: Record<string, never>;
|
|
|
|
deleteDriveFile: {
|
|
|
|
fileId: string;
|
|
|
|
fileUserId: string | null;
|
2023-09-25 03:29:12 +02:00
|
|
|
fileUserUsername: string | null;
|
|
|
|
fileUserHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
};
|
|
|
|
deleteNote: {
|
|
|
|
noteId: string;
|
|
|
|
noteUserId: string;
|
2023-09-25 03:29:12 +02:00
|
|
|
noteUserUsername: string;
|
|
|
|
noteUserHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
note: any;
|
|
|
|
};
|
|
|
|
createGlobalAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
|
|
|
};
|
|
|
|
createUserAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
|
|
|
userId: string;
|
2023-09-25 03:29:12 +02:00
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 11:28:16 +02:00
|
|
|
};
|
2023-09-24 03:46:09 +02:00
|
|
|
updateGlobalAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
updateUserAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
2023-09-25 03:29:12 +02:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-24 03:46:09 +02:00
|
|
|
};
|
|
|
|
deleteGlobalAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
|
|
|
};
|
|
|
|
deleteUserAnnouncement: {
|
|
|
|
announcementId: string;
|
|
|
|
announcement: any;
|
2023-10-04 12:55:35 +02:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-24 03:46:09 +02:00
|
|
|
};
|
2023-09-23 13:50:02 +02:00
|
|
|
resetPassword: {
|
2023-09-25 03:29:12 +02:00
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
2023-09-23 13:50:02 +02:00
|
|
|
};
|
|
|
|
suspendRemoteInstance: {
|
|
|
|
id: string;
|
|
|
|
host: string;
|
|
|
|
};
|
|
|
|
unsuspendRemoteInstance: {
|
|
|
|
id: string;
|
|
|
|
host: string;
|
|
|
|
};
|
2024-02-22 12:59:52 +01:00
|
|
|
updateRemoteInstanceNote: {
|
|
|
|
id: string;
|
|
|
|
host: string;
|
|
|
|
before: string | null;
|
|
|
|
after: string | null;
|
|
|
|
};
|
2023-09-24 08:40:38 +02:00
|
|
|
markSensitiveDriveFile: {
|
|
|
|
fileId: string;
|
|
|
|
fileUserId: string | null;
|
2023-09-25 03:29:12 +02:00
|
|
|
fileUserUsername: string | null;
|
|
|
|
fileUserHost: string | null;
|
2023-09-24 08:40:38 +02:00
|
|
|
};
|
|
|
|
unmarkSensitiveDriveFile: {
|
|
|
|
fileId: string;
|
|
|
|
fileUserId: string | null;
|
2023-09-25 03:29:12 +02:00
|
|
|
fileUserUsername: string | null;
|
|
|
|
fileUserHost: string | null;
|
2023-09-24 08:40:38 +02:00
|
|
|
};
|
2023-09-25 09:03:43 +02:00
|
|
|
resolveAbuseReport: {
|
|
|
|
reportId: string;
|
|
|
|
report: any;
|
|
|
|
forwarded: boolean;
|
|
|
|
};
|
2023-09-28 03:02:05 +02:00
|
|
|
createInvitation: {
|
|
|
|
invitations: any[];
|
|
|
|
};
|
2023-09-29 06:26:11 +02:00
|
|
|
createAd: {
|
|
|
|
adId: string;
|
|
|
|
ad: any;
|
|
|
|
};
|
|
|
|
updateAd: {
|
|
|
|
adId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
deleteAd: {
|
|
|
|
adId: string;
|
|
|
|
ad: any;
|
|
|
|
};
|
2024-02-12 03:35:19 +01:00
|
|
|
createIndieAuthClient: {
|
|
|
|
clientId: string;
|
|
|
|
client: any;
|
|
|
|
};
|
|
|
|
updateIndieAuthClient: {
|
|
|
|
clientId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
deleteIndieAuthClient: {
|
|
|
|
clientId: string;
|
|
|
|
client: any;
|
|
|
|
};
|
2023-10-21 11:38:07 +02:00
|
|
|
createAvatarDecoration: {
|
|
|
|
avatarDecorationId: string;
|
|
|
|
avatarDecoration: any;
|
|
|
|
};
|
|
|
|
updateAvatarDecoration: {
|
|
|
|
avatarDecorationId: string;
|
|
|
|
before: any;
|
|
|
|
after: any;
|
|
|
|
};
|
|
|
|
deleteAvatarDecoration: {
|
|
|
|
avatarDecorationId: string;
|
|
|
|
avatarDecoration: any;
|
|
|
|
};
|
2023-11-19 02:18:57 +01:00
|
|
|
unsetUserAvatar: {
|
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
|
|
|
fileId: string;
|
|
|
|
};
|
|
|
|
unsetUserBanner: {
|
|
|
|
userId: string;
|
|
|
|
userUsername: string;
|
|
|
|
userHost: string | null;
|
|
|
|
fileId: string;
|
|
|
|
};
|
2023-09-23 11:28:16 +02:00
|
|
|
};
|