Merge tag '2023.9.2' into merge-upstream

This commit is contained in:
riku6460
2023-09-29 22:16:04 +09:00
144 changed files with 2519 additions and 1660 deletions

View File

@@ -434,7 +434,7 @@ export type Endpoints = {
receiveAnnouncementEmail?: boolean;
alwaysMarkNsfw?: boolean;
mutedWords?: string[][];
mutingNotificationTypes?: Notification['type'][];
notificationRecieveConfig?: any;
emailNotificationTypes?: string[];
alsoKnownAs?: string[];
}; res: MeDetailed; };

View File

@@ -74,6 +74,10 @@ export const moderationLogTypes = [
'markSensitiveDriveFile',
'unmarkSensitiveDriveFile',
'resolveAbuseReport',
'createInvitation',
'createAd',
'updateAd',
'deleteAd',
] as const;
export type ModerationLogPayloads = {
@@ -216,4 +220,20 @@ export type ModerationLogPayloads = {
report: any;
forwarded: boolean;
};
createInvitation: {
invitations: any[];
};
createAd: {
adId: string;
ad: any;
};
updateAd: {
adId: string;
before: any;
after: any;
};
deleteAd: {
adId: string;
ad: any;
};
};

View File

@@ -1,4 +1,4 @@
import { ModerationLogPayloads } from './consts.js';
import { ModerationLogPayloads, notificationTypes } from './consts.js';
export type ID = string;
export type DateString = string;
@@ -107,7 +107,22 @@ export type MeDetailed = UserDetailed & {
isDeleted: boolean;
isExplorable: boolean;
mutedWords: string[][];
mutingNotificationTypes: string[];
notificationRecieveConfig: {
[notificationType in typeof notificationTypes[number]]?: {
type: 'all';
} | {
type: 'never';
} | {
type: 'following';
} | {
type: 'follower';
} | {
type: 'mutualFollow';
} | {
type: 'list';
userListId: string;
};
};
noCrawle: boolean;
receiveAnnouncementEmail: boolean;
usePasswordLessLogin: boolean;
@@ -165,6 +180,7 @@ export type GalleryPost = {
export type Note = {
id: ID;
createdAt: DateString;
updatedAt?: DateString | null;
text: string | null;
cw: string | null;
user: User;
@@ -663,4 +679,16 @@ export type ModerationLog = {
} | {
type: 'unmarkSensitiveDriveFile';
info: ModerationLogPayloads['unmarkSensitiveDriveFile'];
} | {
type: 'createInvitation';
info: ModerationLogPayloads['createInvitation'];
} | {
type: 'createAd';
info: ModerationLogPayloads['createAd'];
} | {
type: 'updateAd';
info: ModerationLogPayloads['updateAd'];
} | {
type: 'deleteAd';
info: ModerationLogPayloads['deleteAd'];
});

View File

@@ -133,6 +133,13 @@ export type NoteUpdatedEvent = {
body: {
deletedAt: string;
};
} | {
id: Note['id'];
type: 'updated';
body: {
cw: string | null;
text: string;
};
} | {
id: Note['id'];
type: 'pollVoted';