merge: upstream

This commit is contained in:
Mar0xy 2023-10-03 15:20:49 +02:00
commit 38e35e1472
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
185 changed files with 4442 additions and 2501 deletions

View file

@ -1381,10 +1381,6 @@ export type Endpoints = {
req: TODO;
res: TODO;
};
'i/get-word-muted-notes-count': {
req: TODO;
res: TODO;
};
'i/import-following': {
req: TODO;
res: TODO;
@ -1545,7 +1541,7 @@ export type Endpoints = {
receiveAnnouncementEmail?: boolean;
alwaysMarkNsfw?: boolean;
mutedWords?: string[][];
mutingNotificationTypes?: Notification_2['type'][];
notificationRecieveConfig?: any;
emailNotificationTypes?: string[];
alsoKnownAs?: string[];
};
@ -2475,7 +2471,22 @@ type MeDetailed = UserDetailed & {
isDeleted: boolean;
isExplorable: boolean;
mutedWords: string[][];
mutingNotificationTypes: string[];
notificationRecieveConfig: {
[notificationType in typeof notificationTypes_2[number]]?: {
type: 'all';
} | {
type: 'never';
} | {
type: 'following';
} | {
type: 'follower';
} | {
type: 'mutualFollow';
} | {
type: 'list';
userListId: string;
};
};
noCrawle: boolean;
receiveAnnouncementEmail: boolean;
usePasswordLessLogin: boolean;
@ -2607,10 +2618,19 @@ type ModerationLog = {
} | {
type: 'createInvitation';
info: ModerationLogPayloads['createInvitation'];
} | {
type: 'createAd';
info: ModerationLogPayloads['createAd'];
} | {
type: 'updateAd';
info: ModerationLogPayloads['updateAd'];
} | {
type: 'deleteAd';
info: ModerationLogPayloads['deleteAd'];
});
// @public (undocumented)
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation"];
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation", "createAd", "updateAd", "deleteAd"];
// @public (undocumented)
export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];
@ -2619,6 +2639,7 @@ export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];
type Note = {
id: ID;
createdAt: DateString;
updatedAt?: DateString | null;
text: string | null;
cw: string | null;
user: User;
@ -2956,8 +2977,9 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u
//
// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts
// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts
// src/api.types.ts:631:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/entities.ts:579:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/api.types.ts:630:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/entities.ts:107:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts
// src/entities.ts:595:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)

View file

@ -20,12 +20,12 @@
"url": "git+https://github.com/misskey-dev/misskey.js.git"
},
"devDependencies": {
"@microsoft/api-extractor": "7.37.0",
"@microsoft/api-extractor": "7.37.2",
"@swc/jest": "0.2.29",
"@types/jest": "29.5.5",
"@types/node": "20.6.4",
"@typescript-eslint/eslint-plugin": "6.7.2",
"@typescript-eslint/parser": "6.7.2",
"@types/node": "20.7.1",
"@typescript-eslint/eslint-plugin": "6.7.3",
"@typescript-eslint/parser": "6.7.3",
"eslint": "8.50.0",
"jest": "29.7.0",
"jest-fetch-mock": "3.0.3",
@ -39,7 +39,7 @@
],
"dependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "1.3.87",
"@swc/core": "1.3.90",
"eventemitter3": "5.0.1",
"reconnecting-websocket": "4.4.0"
}

View file

@ -371,7 +371,6 @@ export type Endpoints = {
'i/favorites': { req: { limit?: number; sinceId?: NoteFavorite['id']; untilId?: NoteFavorite['id']; }; res: NoteFavorite[]; };
'i/gallery/likes': { req: TODO; res: TODO; };
'i/gallery/posts': { req: TODO; res: TODO; };
'i/get-word-muted-notes-count': { req: TODO; res: TODO; };
'i/import-following': { req: TODO; res: TODO; };
'i/import-user-lists': { req: TODO; res: TODO; };
'i/move': { req: TODO; res: TODO; };
@ -430,7 +429,7 @@ export type Endpoints = {
receiveAnnouncementEmail?: boolean;
alwaysMarkNsfw?: boolean;
mutedWords?: string[][];
mutingNotificationTypes?: Notification['type'][];
notificationRecieveConfig?: any;
emailNotificationTypes?: string[];
alsoKnownAs?: string[];
}; res: MeDetailed; };

View file

@ -220,4 +220,17 @@ export type ModerationLogPayloads = {
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;
@ -104,7 +104,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;
@ -162,6 +177,7 @@ export type GalleryPost = {
export type Note = {
id: ID;
createdAt: DateString;
updatedAt?: DateString | null;
text: string | null;
cw: string | null;
user: User;
@ -196,7 +212,6 @@ export type Note = {
uri?: string;
url?: string;
isHidden?: boolean;
updatedAt?: DateString;
};
export type NoteReaction = {
@ -669,4 +684,13 @@ export type ModerationLog = {
} | {
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';