2023-09-28 19:29:54 -07:00
|
|
|
import { ModerationLogPayloads, notificationTypes } from './consts.js';
|
2023-12-02 04:00:05 -08:00
|
|
|
import { Page, User, UserDetailed } from './autogen/models';
|
|
|
|
export * from './autogen/entities';
|
|
|
|
export * from './autogen/models';
|
2023-09-23 02:28:16 -07:00
|
|
|
|
2023-03-29 17:33:19 -07:00
|
|
|
export type ID = string;
|
|
|
|
export type DateString = string;
|
|
|
|
|
|
|
|
export type PageEvent = {
|
|
|
|
pageId: Page['id'];
|
|
|
|
event: string;
|
|
|
|
var: any;
|
|
|
|
userId: User['id'];
|
|
|
|
user: User;
|
|
|
|
};
|
|
|
|
|
2023-09-23 02:28:16 -07:00
|
|
|
export type ModerationLog = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
userId: User['id'];
|
|
|
|
user: UserDetailed | null;
|
|
|
|
} & ({
|
|
|
|
type: 'updateServerSettings';
|
|
|
|
info: ModerationLogPayloads['updateServerSettings'];
|
|
|
|
} | {
|
|
|
|
type: 'suspend';
|
|
|
|
info: ModerationLogPayloads['suspend'];
|
|
|
|
} | {
|
|
|
|
type: 'unsuspend';
|
|
|
|
info: ModerationLogPayloads['unsuspend'];
|
|
|
|
} | {
|
|
|
|
type: 'updateUserNote';
|
|
|
|
info: ModerationLogPayloads['updateUserNote'];
|
|
|
|
} | {
|
|
|
|
type: 'addCustomEmoji';
|
|
|
|
info: ModerationLogPayloads['addCustomEmoji'];
|
2023-09-23 18:57:24 -07:00
|
|
|
} | {
|
|
|
|
type: 'updateCustomEmoji';
|
|
|
|
info: ModerationLogPayloads['updateCustomEmoji'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteCustomEmoji';
|
|
|
|
info: ModerationLogPayloads['deleteCustomEmoji'];
|
2023-09-23 02:28:16 -07:00
|
|
|
} | {
|
|
|
|
type: 'assignRole';
|
|
|
|
info: ModerationLogPayloads['assignRole'];
|
|
|
|
} | {
|
|
|
|
type: 'unassignRole';
|
|
|
|
info: ModerationLogPayloads['unassignRole'];
|
2023-09-24 18:29:12 -07:00
|
|
|
} | {
|
|
|
|
type: 'createRole';
|
|
|
|
info: ModerationLogPayloads['createRole'];
|
2023-09-23 02:28:16 -07:00
|
|
|
} | {
|
|
|
|
type: 'updateRole';
|
|
|
|
info: ModerationLogPayloads['updateRole'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteRole';
|
|
|
|
info: ModerationLogPayloads['deleteRole'];
|
|
|
|
} | {
|
|
|
|
type: 'clearQueue';
|
|
|
|
info: ModerationLogPayloads['clearQueue'];
|
|
|
|
} | {
|
|
|
|
type: 'promoteQueue';
|
|
|
|
info: ModerationLogPayloads['promoteQueue'];
|
2023-09-23 18:46:09 -07:00
|
|
|
} | {
|
|
|
|
type: 'deleteDriveFile';
|
|
|
|
info: ModerationLogPayloads['deleteDriveFile'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteNote';
|
|
|
|
info: ModerationLogPayloads['deleteNote'];
|
|
|
|
} | {
|
|
|
|
type: 'createGlobalAnnouncement';
|
|
|
|
info: ModerationLogPayloads['createGlobalAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'createUserAnnouncement';
|
|
|
|
info: ModerationLogPayloads['createUserAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'updateGlobalAnnouncement';
|
|
|
|
info: ModerationLogPayloads['updateGlobalAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'updateUserAnnouncement';
|
|
|
|
info: ModerationLogPayloads['updateUserAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteGlobalAnnouncement';
|
|
|
|
info: ModerationLogPayloads['deleteGlobalAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteUserAnnouncement';
|
|
|
|
info: ModerationLogPayloads['deleteUserAnnouncement'];
|
2023-09-23 04:50:02 -07:00
|
|
|
} | {
|
|
|
|
type: 'resetPassword';
|
|
|
|
info: ModerationLogPayloads['resetPassword'];
|
|
|
|
} | {
|
|
|
|
type: 'suspendRemoteInstance';
|
|
|
|
info: ModerationLogPayloads['suspendRemoteInstance'];
|
|
|
|
} | {
|
|
|
|
type: 'unsuspendRemoteInstance';
|
|
|
|
info: ModerationLogPayloads['unsuspendRemoteInstance'];
|
2023-09-23 23:40:38 -07:00
|
|
|
} | {
|
|
|
|
type: 'markSensitiveDriveFile';
|
|
|
|
info: ModerationLogPayloads['markSensitiveDriveFile'];
|
|
|
|
} | {
|
|
|
|
type: 'unmarkSensitiveDriveFile';
|
|
|
|
info: ModerationLogPayloads['unmarkSensitiveDriveFile'];
|
2023-09-27 18:02:05 -07:00
|
|
|
} | {
|
|
|
|
type: 'createInvitation';
|
|
|
|
info: ModerationLogPayloads['createInvitation'];
|
2023-09-28 23:01:13 -07:00
|
|
|
} | {
|
|
|
|
type: 'createAd';
|
|
|
|
info: ModerationLogPayloads['createAd'];
|
|
|
|
} | {
|
|
|
|
type: 'updateAd';
|
|
|
|
info: ModerationLogPayloads['updateAd'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteAd';
|
|
|
|
info: ModerationLogPayloads['deleteAd'];
|
2023-10-21 02:38:07 -07:00
|
|
|
} | {
|
|
|
|
type: 'createAvatarDecoration';
|
|
|
|
info: ModerationLogPayloads['createAvatarDecoration'];
|
|
|
|
} | {
|
|
|
|
type: 'updateAvatarDecoration';
|
|
|
|
info: ModerationLogPayloads['updateAvatarDecoration'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteAvatarDecoration';
|
|
|
|
info: ModerationLogPayloads['deleteAvatarDecoration'];
|
|
|
|
} | {
|
|
|
|
type: 'resolveAbuseReport';
|
|
|
|
info: ModerationLogPayloads['resolveAbuseReport'];
|
2023-11-18 17:18:57 -08:00
|
|
|
} | {
|
|
|
|
type: 'unsetUserAvatar';
|
|
|
|
info: ModerationLogPayloads['unsetUserAvatar'];
|
|
|
|
} | {
|
|
|
|
type: 'unsetUserBanner';
|
|
|
|
info: ModerationLogPayloads['unsetUserBanner'];
|
2023-09-23 02:28:16 -07:00
|
|
|
});
|