[Re] refactor(misskey-js): 警告をすべて解決 (#14277)
* chore(misskey-js): Unchanged files with check annotationsで紛らわしい部分の警告を抑制 ロジック面は後で直す * dummy change to see if the feature do not report them (to be reverted after the check) * refactor: 型合わせ * refactor: fix warnings fromc22dd6358b
* lint * 型合わせ * キャスト * pnpm build-misskey-js-with-types * Revert "dummy change to see if the feature do not report them (to be reverted after the check)" This reverts commit67072e3ca6
. * eliminate reversiGame any * move reversiGame types * lint * Update packages/misskey-js/src/streaming.ts Co-authored-by: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com> * Update acct.ts * run api extractor * re-run api extractor --------- Co-authored-by: Kisaragi Marine <kisaragi.effective@gmail.com> Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
import type { operations } from './autogen/types.js';
|
||||
import type {
|
||||
AbuseReportNotificationRecipient, Ad,
|
||||
Announcement,
|
||||
EmojiDetailed, InviteCode,
|
||||
MetaDetailed,
|
||||
Note,
|
||||
Role, SystemWebhook, UserLite,
|
||||
} from './autogen/models.js';
|
||||
|
||||
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'roleAssigned', 'achievementEarned'] as const;
|
||||
|
||||
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
|
||||
@@ -135,10 +145,30 @@ export const moderationLogTypes = [
|
||||
'unsetUserBanner',
|
||||
] as const;
|
||||
|
||||
// See: packages/backend/src/core/ReversiService.ts@L410
|
||||
export const reversiUpdateKeys = [
|
||||
'map',
|
||||
'bw',
|
||||
'isLlotheo',
|
||||
'canPutEverywhere',
|
||||
'loopedBoard',
|
||||
'timeLimitForEachTurn',
|
||||
] as const;
|
||||
|
||||
export type ReversiUpdateKey = typeof reversiUpdateKeys[number];
|
||||
|
||||
type AvatarDecoration = UserLite['avatarDecorations'][number];
|
||||
|
||||
type ReceivedAbuseReport = {
|
||||
reportId: AbuseReportNotificationRecipient['id'];
|
||||
report: operations['admin___abuse-user-reports']['responses'][200]['content']['application/json'];
|
||||
forwarded: boolean;
|
||||
};
|
||||
|
||||
export type ModerationLogPayloads = {
|
||||
updateServerSettings: {
|
||||
before: any | null;
|
||||
after: any | null;
|
||||
before: MetaDetailed | null;
|
||||
after: MetaDetailed | null;
|
||||
};
|
||||
suspend: {
|
||||
userId: string;
|
||||
@@ -159,16 +189,16 @@ export type ModerationLogPayloads = {
|
||||
};
|
||||
addCustomEmoji: {
|
||||
emojiId: string;
|
||||
emoji: any;
|
||||
emoji: EmojiDetailed;
|
||||
};
|
||||
updateCustomEmoji: {
|
||||
emojiId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: EmojiDetailed;
|
||||
after: EmojiDetailed;
|
||||
};
|
||||
deleteCustomEmoji: {
|
||||
emojiId: string;
|
||||
emoji: any;
|
||||
emoji: EmojiDetailed;
|
||||
};
|
||||
assignRole: {
|
||||
userId: string;
|
||||
@@ -187,16 +217,16 @@ export type ModerationLogPayloads = {
|
||||
};
|
||||
createRole: {
|
||||
roleId: string;
|
||||
role: any;
|
||||
role: Role;
|
||||
};
|
||||
updateRole: {
|
||||
roleId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: Role;
|
||||
after: Role;
|
||||
};
|
||||
deleteRole: {
|
||||
roleId: string;
|
||||
role: any;
|
||||
role: Role;
|
||||
};
|
||||
clearQueue: Record<string, never>;
|
||||
promoteQueue: Record<string, never>;
|
||||
@@ -211,39 +241,39 @@ export type ModerationLogPayloads = {
|
||||
noteUserId: string;
|
||||
noteUserUsername: string;
|
||||
noteUserHost: string | null;
|
||||
note: any;
|
||||
note: Note;
|
||||
};
|
||||
createGlobalAnnouncement: {
|
||||
announcementId: string;
|
||||
announcement: any;
|
||||
announcement: Announcement;
|
||||
};
|
||||
createUserAnnouncement: {
|
||||
announcementId: string;
|
||||
announcement: any;
|
||||
announcement: Announcement;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
updateGlobalAnnouncement: {
|
||||
announcementId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: Announcement;
|
||||
after: Announcement;
|
||||
};
|
||||
updateUserAnnouncement: {
|
||||
announcementId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: Announcement;
|
||||
after: Announcement;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
deleteGlobalAnnouncement: {
|
||||
announcementId: string;
|
||||
announcement: any;
|
||||
announcement: Announcement;
|
||||
};
|
||||
deleteUserAnnouncement: {
|
||||
announcementId: string;
|
||||
announcement: any;
|
||||
announcement: Announcement;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
@@ -281,37 +311,37 @@ export type ModerationLogPayloads = {
|
||||
};
|
||||
resolveAbuseReport: {
|
||||
reportId: string;
|
||||
report: any;
|
||||
report: ReceivedAbuseReport;
|
||||
forwarded: boolean;
|
||||
};
|
||||
createInvitation: {
|
||||
invitations: any[];
|
||||
invitations: InviteCode[];
|
||||
};
|
||||
createAd: {
|
||||
adId: string;
|
||||
ad: any;
|
||||
ad: Ad;
|
||||
};
|
||||
updateAd: {
|
||||
adId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: Ad;
|
||||
after: Ad;
|
||||
};
|
||||
deleteAd: {
|
||||
adId: string;
|
||||
ad: any;
|
||||
ad: Ad;
|
||||
};
|
||||
createAvatarDecoration: {
|
||||
avatarDecorationId: string;
|
||||
avatarDecoration: any;
|
||||
avatarDecoration: AvatarDecoration;
|
||||
};
|
||||
updateAvatarDecoration: {
|
||||
avatarDecorationId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: AvatarDecoration;
|
||||
after: AvatarDecoration;
|
||||
};
|
||||
deleteAvatarDecoration: {
|
||||
avatarDecorationId: string;
|
||||
avatarDecoration: any;
|
||||
avatarDecoration: AvatarDecoration;
|
||||
};
|
||||
unsetUserAvatar: {
|
||||
userId: string;
|
||||
@@ -327,28 +357,28 @@ export type ModerationLogPayloads = {
|
||||
};
|
||||
createSystemWebhook: {
|
||||
systemWebhookId: string;
|
||||
webhook: any;
|
||||
webhook: SystemWebhook;
|
||||
};
|
||||
updateSystemWebhook: {
|
||||
systemWebhookId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: SystemWebhook;
|
||||
after: SystemWebhook;
|
||||
};
|
||||
deleteSystemWebhook: {
|
||||
systemWebhookId: string;
|
||||
webhook: any;
|
||||
webhook: SystemWebhook;
|
||||
};
|
||||
createAbuseReportNotificationRecipient: {
|
||||
recipientId: string;
|
||||
recipient: any;
|
||||
recipient: AbuseReportNotificationRecipient;
|
||||
};
|
||||
updateAbuseReportNotificationRecipient: {
|
||||
recipientId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
before: AbuseReportNotificationRecipient;
|
||||
after: AbuseReportNotificationRecipient;
|
||||
};
|
||||
deleteAbuseReportNotificationRecipient: {
|
||||
recipientId: string;
|
||||
recipient: any;
|
||||
recipient: AbuseReportNotificationRecipient;
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user