fix: チャット周りの修正 (#15741)
* fix(misskey-js): チャットのChannel型定義を追加 * fix(backend); canChatで塞いでいない書き込み系のAPIを塞ぐ * fix(frontend): チャット周りのフロントエンド型修正 * lint fix * fix broken lockfile * fix * refactor * wip * wip * wip * clean up --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
parent
7cecaa5c54
commit
e07bb1dcbc
29 changed files with 453 additions and 153 deletions
|
|
@ -813,6 +813,54 @@ export type Channels = {
|
|||
claimTimeIsUp: null | Record<string, never>;
|
||||
};
|
||||
};
|
||||
chatUser: {
|
||||
params: {
|
||||
otherId: string;
|
||||
};
|
||||
events: {
|
||||
message: (payload: ChatMessageLite) => void;
|
||||
deleted: (payload: ChatMessageLite['id']) => void;
|
||||
react: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
unreact: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
};
|
||||
receives: {
|
||||
read: {
|
||||
id: ChatMessageLite['id'];
|
||||
};
|
||||
};
|
||||
};
|
||||
chatRoom: {
|
||||
params: {
|
||||
roomId: string;
|
||||
};
|
||||
events: {
|
||||
message: (payload: ChatMessageLite) => void;
|
||||
deleted: (payload: ChatMessageLite['id']) => void;
|
||||
react: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
unreact: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
};
|
||||
receives: {
|
||||
read: {
|
||||
id: ChatMessageLite['id'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
|
|
@ -959,6 +1007,12 @@ type ChatMessage = components['schemas']['ChatMessage'];
|
|||
// @public (undocumented)
|
||||
type ChatMessageLite = components['schemas']['ChatMessageLite'];
|
||||
|
||||
// @public (undocumented)
|
||||
type ChatMessageLiteFor1on1 = components['schemas']['ChatMessageLiteFor1on1'];
|
||||
|
||||
// @public (undocumented)
|
||||
type ChatMessageLiteForRoom = components['schemas']['ChatMessageLiteForRoom'];
|
||||
|
||||
// @public (undocumented)
|
||||
type ChatMessagesCreateToRoomRequest = operations['chat___messages___create-to-room']['requestBody']['content']['application/json'];
|
||||
|
||||
|
|
@ -2086,6 +2140,8 @@ declare namespace entities {
|
|||
AbuseReportNotificationRecipient,
|
||||
ChatMessage,
|
||||
ChatMessageLite,
|
||||
ChatMessageLiteFor1on1,
|
||||
ChatMessageLiteForRoom,
|
||||
ChatRoom,
|
||||
ChatRoomInvitation,
|
||||
ChatRoomMembership
|
||||
|
|
@ -3655,8 +3711,8 @@ type V2AdminEmojiListResponse = operations['v2___admin___emoji___list']['respons
|
|||
//
|
||||
// src/entities.ts:50:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
|
||||
// src/streaming.ts:57:3 - (ae-forgotten-export) The symbol "ReconnectingWebSocket" needs to be exported by the entry point index.d.ts
|
||||
// src/streaming.types.ts:217:4 - (ae-forgotten-export) The symbol "ReversiUpdateKey" needs to be exported by the entry point index.d.ts
|
||||
// src/streaming.types.ts:227:4 - (ae-forgotten-export) The symbol "ReversiUpdateSettings" needs to be exported by the entry point index.d.ts
|
||||
// src/streaming.types.ts:218:4 - (ae-forgotten-export) The symbol "ReversiUpdateKey" needs to be exported by the entry point index.d.ts
|
||||
// src/streaming.types.ts:228:4 - (ae-forgotten-export) The symbol "ReversiUpdateSettings" needs to be exported by the entry point index.d.ts
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ export type SystemWebhook = components['schemas']['SystemWebhook'];
|
|||
export type AbuseReportNotificationRecipient = components['schemas']['AbuseReportNotificationRecipient'];
|
||||
export type ChatMessage = components['schemas']['ChatMessage'];
|
||||
export type ChatMessageLite = components['schemas']['ChatMessageLite'];
|
||||
export type ChatMessageLiteFor1on1 = components['schemas']['ChatMessageLiteFor1on1'];
|
||||
export type ChatMessageLiteForRoom = components['schemas']['ChatMessageLiteForRoom'];
|
||||
export type ChatRoom = components['schemas']['ChatRoom'];
|
||||
export type ChatRoomInvitation = components['schemas']['ChatRoomInvitation'];
|
||||
export type ChatRoomMembership = components['schemas']['ChatRoomMembership'];
|
||||
|
|
|
|||
|
|
@ -5406,10 +5406,10 @@ export type components = {
|
|||
fileId?: string | null;
|
||||
file?: components['schemas']['DriveFile'] | null;
|
||||
isRead?: boolean;
|
||||
reactions: ({
|
||||
reactions: {
|
||||
reaction: string;
|
||||
user?: components['schemas']['UserLite'] | null;
|
||||
})[];
|
||||
user: components['schemas']['UserLite'];
|
||||
}[];
|
||||
};
|
||||
ChatMessageLite: {
|
||||
id: string;
|
||||
|
|
@ -5427,6 +5427,34 @@ export type components = {
|
|||
user?: components['schemas']['UserLite'] | null;
|
||||
})[];
|
||||
};
|
||||
ChatMessageLiteFor1on1: {
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
createdAt: string;
|
||||
fromUserId: string;
|
||||
toUserId: string;
|
||||
text?: string | null;
|
||||
fileId?: string | null;
|
||||
file?: components['schemas']['DriveFile'] | null;
|
||||
reactions: {
|
||||
reaction: string;
|
||||
}[];
|
||||
};
|
||||
ChatMessageLiteForRoom: {
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
createdAt: string;
|
||||
fromUserId: string;
|
||||
fromUser: components['schemas']['UserLite'];
|
||||
toRoomId: string;
|
||||
text?: string | null;
|
||||
fileId?: string | null;
|
||||
file?: components['schemas']['DriveFile'] | null;
|
||||
reactions: {
|
||||
reaction: string;
|
||||
user: components['schemas']['UserLite'];
|
||||
}[];
|
||||
};
|
||||
ChatRoom: {
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
|
|
@ -14067,7 +14095,7 @@ export type operations = {
|
|||
/** @description OK (with results) */
|
||||
200: {
|
||||
content: {
|
||||
'application/json': components['schemas']['ChatMessageLite'];
|
||||
'application/json': components['schemas']['ChatMessageLiteForRoom'];
|
||||
};
|
||||
};
|
||||
/** @description Client error */
|
||||
|
|
@ -14130,7 +14158,7 @@ export type operations = {
|
|||
/** @description OK (with results) */
|
||||
200: {
|
||||
content: {
|
||||
'application/json': components['schemas']['ChatMessageLite'];
|
||||
'application/json': components['schemas']['ChatMessageLiteFor1on1'];
|
||||
};
|
||||
};
|
||||
/** @description Client error */
|
||||
|
|
@ -14305,7 +14333,7 @@ export type operations = {
|
|||
/** @description OK (with results) */
|
||||
200: {
|
||||
content: {
|
||||
'application/json': components['schemas']['ChatMessageLite'][];
|
||||
'application/json': components['schemas']['ChatMessageLiteForRoom'][];
|
||||
};
|
||||
};
|
||||
/** @description Client error */
|
||||
|
|
@ -14533,7 +14561,7 @@ export type operations = {
|
|||
/** @description OK (with results) */
|
||||
200: {
|
||||
content: {
|
||||
'application/json': components['schemas']['ChatMessageLite'][];
|
||||
'application/json': components['schemas']['ChatMessageLiteFor1on1'][];
|
||||
};
|
||||
};
|
||||
/** @description Client error */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import {
|
||||
Antenna,
|
||||
ChatMessage,
|
||||
ChatMessageLite,
|
||||
DriveFile,
|
||||
DriveFolder,
|
||||
Note,
|
||||
|
|
@ -227,7 +228,55 @@ export type Channels = {
|
|||
updateSettings: ReversiUpdateSettings<ReversiUpdateKey>;
|
||||
claimTimeIsUp: null | Record<string, never>;
|
||||
}
|
||||
}
|
||||
};
|
||||
chatUser: {
|
||||
params: {
|
||||
otherId: string;
|
||||
};
|
||||
events: {
|
||||
message: (payload: ChatMessageLite) => void;
|
||||
deleted: (payload: ChatMessageLite['id']) => void;
|
||||
react: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
unreact: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
};
|
||||
receives: {
|
||||
read: {
|
||||
id: ChatMessageLite['id'];
|
||||
};
|
||||
};
|
||||
};
|
||||
chatRoom: {
|
||||
params: {
|
||||
roomId: string;
|
||||
};
|
||||
events: {
|
||||
message: (payload: ChatMessageLite) => void;
|
||||
deleted: (payload: ChatMessageLite['id']) => void;
|
||||
react: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
unreact: (payload: {
|
||||
reaction: string;
|
||||
user?: UserLite;
|
||||
messageId: ChatMessageLite['id'];
|
||||
}) => void;
|
||||
};
|
||||
receives: {
|
||||
read: {
|
||||
id: ChatMessageLite['id'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type NoteUpdatedEvent = { id: Note['id'] } & ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue