diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-24 21:32:46 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 21:32:46 +0900 |
| commit | f1f24e39d2df3135493e2c2087230b428e2d02b7 (patch) | |
| tree | a5ae0e9d2cf810649b2f4e08ef4d00ce7ea91dc9 /packages/misskey-js/src | |
| parent | fix(frontend): fix broken styles (diff) | |
| download | misskey-f1f24e39d2df3135493e2c2087230b428e2d02b7.tar.gz misskey-f1f24e39d2df3135493e2c2087230b428e2d02b7.tar.bz2 misskey-f1f24e39d2df3135493e2c2087230b428e2d02b7.zip | |
Feat: Chat (#15686)
* wip
* wip
* wip
* wip
* wip
* wip
* Update types.ts
* Create 1742203321812-chat.js
* wip
* wip
* Update room.vue
* Update home.vue
* Update home.vue
* Update ja-JP.yml
* Update index.d.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update CHANGELOG.md
* wip
* Update home.vue
* clean up
* Update misskey-js.api.md
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* lint fixes
* lint
* Update UserEntityService.ts
* search
* wip
* 🎨
* wip
* Update home.ownedRooms.vue
* wip
* Update CHANGELOG.md
* Update style.scss
* wip
* improve performance
* improve performance
* Update timeline.test.ts
Diffstat (limited to 'packages/misskey-js/src')
| -rw-r--r-- | packages/misskey-js/src/autogen/apiClientJSDoc.ts | 253 | ||||
| -rw-r--r-- | packages/misskey-js/src/autogen/endpoint.ts | 67 | ||||
| -rw-r--r-- | packages/misskey-js/src/autogen/entities.ts | 44 | ||||
| -rw-r--r-- | packages/misskey-js/src/autogen/models.ts | 5 | ||||
| -rw-r--r-- | packages/misskey-js/src/autogen/types.ts | 1581 | ||||
| -rw-r--r-- | packages/misskey-js/src/consts.ts | 6 | ||||
| -rw-r--r-- | packages/misskey-js/src/streaming.types.ts | 7 |
7 files changed, 1891 insertions, 72 deletions
diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts index a1543952fc..e12ba0d6b2 100644 --- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -1537,6 +1537,248 @@ declare module '../api.js' { /** * No description provided. * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/history', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/messages/create-to-room', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/messages/create-to-user', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/messages/delete', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/messages/react', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/messages/room-timeline', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/messages/search', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/messages/show', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/messages/user-timeline', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/create', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/delete', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/invitations/create', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/invitations/ignore', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/rooms/invitations/inbox', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/join', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/rooms/joining', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/leave', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/members', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/mute', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/rooms/owned', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + request<E extends 'chat/rooms/show', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + request<E extends 'chat/rooms/update', P extends Endpoints[E]['req']>( + endpoint: E, + params: P, + credential?: string | null, + ): Promise<SwitchCaseResponseType<E, P>>; + + /** + * No description provided. + * * **Credential required**: *Yes* / **Permission**: *write:account* */ request<E extends 'clips/add-note', P extends Endpoints[E]['req']>( @@ -2832,17 +3074,6 @@ declare module '../api.js' { * * **Credential required**: *Yes* / **Permission**: *write:account* */ - request<E extends 'i/read-all-unread-notes', P extends Endpoints[E]['req']>( - endpoint: E, - params: P, - credential?: string | null, - ): Promise<SwitchCaseResponseType<E, P>>; - - /** - * No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ request<E extends 'i/read-announcement', P extends Endpoints[E]['req']>( endpoint: E, params: P, diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index 9bb8fb2225..558f4ab514 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -207,6 +207,50 @@ import type { ChartsUserReactionsResponse, ChartsUsersRequest, ChartsUsersResponse, + ChatHistoryRequest, + ChatHistoryResponse, + ChatMessagesCreateToRoomRequest, + ChatMessagesCreateToRoomResponse, + ChatMessagesCreateToUserRequest, + ChatMessagesCreateToUserResponse, + ChatMessagesDeleteRequest, + ChatMessagesDeleteResponse, + ChatMessagesReactRequest, + ChatMessagesReactResponse, + ChatMessagesRoomTimelineRequest, + ChatMessagesRoomTimelineResponse, + ChatMessagesSearchRequest, + ChatMessagesSearchResponse, + ChatMessagesShowRequest, + ChatMessagesShowResponse, + ChatMessagesUserTimelineRequest, + ChatMessagesUserTimelineResponse, + ChatRoomsCreateRequest, + ChatRoomsCreateResponse, + ChatRoomsDeleteRequest, + ChatRoomsDeleteResponse, + ChatRoomsInvitationsCreateRequest, + ChatRoomsInvitationsCreateResponse, + ChatRoomsInvitationsIgnoreRequest, + ChatRoomsInvitationsIgnoreResponse, + ChatRoomsInvitationsInboxRequest, + ChatRoomsInvitationsInboxResponse, + ChatRoomsJoinRequest, + ChatRoomsJoinResponse, + ChatRoomsJoiningRequest, + ChatRoomsJoiningResponse, + ChatRoomsLeaveRequest, + ChatRoomsLeaveResponse, + ChatRoomsMembersRequest, + ChatRoomsMembersResponse, + ChatRoomsMuteRequest, + ChatRoomsMuteResponse, + ChatRoomsOwnedRequest, + ChatRoomsOwnedResponse, + ChatRoomsShowRequest, + ChatRoomsShowResponse, + ChatRoomsUpdateRequest, + ChatRoomsUpdateResponse, ClipsAddNoteRequest, ClipsCreateRequest, ClipsCreateResponse, @@ -726,6 +770,28 @@ export type Endpoints = { 'charts/user/pv': { req: ChartsUserPvRequest; res: ChartsUserPvResponse }; 'charts/user/reactions': { req: ChartsUserReactionsRequest; res: ChartsUserReactionsResponse }; 'charts/users': { req: ChartsUsersRequest; res: ChartsUsersResponse }; + 'chat/history': { req: ChatHistoryRequest; res: ChatHistoryResponse }; + 'chat/messages/create-to-room': { req: ChatMessagesCreateToRoomRequest; res: ChatMessagesCreateToRoomResponse }; + 'chat/messages/create-to-user': { req: ChatMessagesCreateToUserRequest; res: ChatMessagesCreateToUserResponse }; + 'chat/messages/delete': { req: ChatMessagesDeleteRequest; res: ChatMessagesDeleteResponse }; + 'chat/messages/react': { req: ChatMessagesReactRequest; res: ChatMessagesReactResponse }; + 'chat/messages/room-timeline': { req: ChatMessagesRoomTimelineRequest; res: ChatMessagesRoomTimelineResponse }; + 'chat/messages/search': { req: ChatMessagesSearchRequest; res: ChatMessagesSearchResponse }; + 'chat/messages/show': { req: ChatMessagesShowRequest; res: ChatMessagesShowResponse }; + 'chat/messages/user-timeline': { req: ChatMessagesUserTimelineRequest; res: ChatMessagesUserTimelineResponse }; + 'chat/rooms/create': { req: ChatRoomsCreateRequest; res: ChatRoomsCreateResponse }; + 'chat/rooms/delete': { req: ChatRoomsDeleteRequest; res: ChatRoomsDeleteResponse }; + 'chat/rooms/invitations/create': { req: ChatRoomsInvitationsCreateRequest; res: ChatRoomsInvitationsCreateResponse }; + 'chat/rooms/invitations/ignore': { req: ChatRoomsInvitationsIgnoreRequest; res: ChatRoomsInvitationsIgnoreResponse }; + 'chat/rooms/invitations/inbox': { req: ChatRoomsInvitationsInboxRequest; res: ChatRoomsInvitationsInboxResponse }; + 'chat/rooms/join': { req: ChatRoomsJoinRequest; res: ChatRoomsJoinResponse }; + 'chat/rooms/joining': { req: ChatRoomsJoiningRequest; res: ChatRoomsJoiningResponse }; + 'chat/rooms/leave': { req: ChatRoomsLeaveRequest; res: ChatRoomsLeaveResponse }; + 'chat/rooms/members': { req: ChatRoomsMembersRequest; res: ChatRoomsMembersResponse }; + 'chat/rooms/mute': { req: ChatRoomsMuteRequest; res: ChatRoomsMuteResponse }; + 'chat/rooms/owned': { req: ChatRoomsOwnedRequest; res: ChatRoomsOwnedResponse }; + 'chat/rooms/show': { req: ChatRoomsShowRequest; res: ChatRoomsShowResponse }; + 'chat/rooms/update': { req: ChatRoomsUpdateRequest; res: ChatRoomsUpdateResponse }; 'clips/add-note': { req: ClipsAddNoteRequest; res: EmptyResponse }; 'clips/create': { req: ClipsCreateRequest; res: ClipsCreateResponse }; 'clips/delete': { req: ClipsDeleteRequest; res: EmptyResponse }; @@ -841,7 +907,6 @@ export type Endpoints = { 'i/page-likes': { req: IPageLikesRequest; res: IPageLikesResponse }; 'i/pages': { req: IPagesRequest; res: IPagesResponse }; 'i/pin': { req: IPinRequest; res: IPinResponse }; - 'i/read-all-unread-notes': { req: EmptyRequest; res: EmptyResponse }; 'i/read-announcement': { req: IReadAnnouncementRequest; res: EmptyResponse }; 'i/regenerate-token': { req: IRegenerateTokenRequest; res: EmptyResponse }; 'i/registry/get': { req: IRegistryGetRequest; res: IRegistryGetResponse }; diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index f3d26efa69..bb21272e01 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -210,6 +210,50 @@ export type ChartsUserReactionsRequest = operations['charts___user___reactions'] export type ChartsUserReactionsResponse = operations['charts___user___reactions']['responses']['200']['content']['application/json']; export type ChartsUsersRequest = operations['charts___users']['requestBody']['content']['application/json']; export type ChartsUsersResponse = operations['charts___users']['responses']['200']['content']['application/json']; +export type ChatHistoryRequest = operations['chat___history']['requestBody']['content']['application/json']; +export type ChatHistoryResponse = operations['chat___history']['responses']['200']['content']['application/json']; +export type ChatMessagesCreateToRoomRequest = operations['chat___messages___create-to-room']['requestBody']['content']['application/json']; +export type ChatMessagesCreateToRoomResponse = operations['chat___messages___create-to-room']['responses']['200']['content']['application/json']; +export type ChatMessagesCreateToUserRequest = operations['chat___messages___create-to-user']['requestBody']['content']['application/json']; +export type ChatMessagesCreateToUserResponse = operations['chat___messages___create-to-user']['responses']['200']['content']['application/json']; +export type ChatMessagesDeleteRequest = operations['chat___messages___delete']['requestBody']['content']['application/json']; +export type ChatMessagesDeleteResponse = operations['chat___messages___delete']['responses']['200']['content']['application/json']; +export type ChatMessagesReactRequest = operations['chat___messages___react']['requestBody']['content']['application/json']; +export type ChatMessagesReactResponse = operations['chat___messages___react']['responses']['200']['content']['application/json']; +export type ChatMessagesRoomTimelineRequest = operations['chat___messages___room-timeline']['requestBody']['content']['application/json']; +export type ChatMessagesRoomTimelineResponse = operations['chat___messages___room-timeline']['responses']['200']['content']['application/json']; +export type ChatMessagesSearchRequest = operations['chat___messages___search']['requestBody']['content']['application/json']; +export type ChatMessagesSearchResponse = operations['chat___messages___search']['responses']['200']['content']['application/json']; +export type ChatMessagesShowRequest = operations['chat___messages___show']['requestBody']['content']['application/json']; +export type ChatMessagesShowResponse = operations['chat___messages___show']['responses']['200']['content']['application/json']; +export type ChatMessagesUserTimelineRequest = operations['chat___messages___user-timeline']['requestBody']['content']['application/json']; +export type ChatMessagesUserTimelineResponse = operations['chat___messages___user-timeline']['responses']['200']['content']['application/json']; +export type ChatRoomsCreateRequest = operations['chat___rooms___create']['requestBody']['content']['application/json']; +export type ChatRoomsCreateResponse = operations['chat___rooms___create']['responses']['200']['content']['application/json']; +export type ChatRoomsDeleteRequest = operations['chat___rooms___delete']['requestBody']['content']['application/json']; +export type ChatRoomsDeleteResponse = operations['chat___rooms___delete']['responses']['200']['content']['application/json']; +export type ChatRoomsInvitationsCreateRequest = operations['chat___rooms___invitations___create']['requestBody']['content']['application/json']; +export type ChatRoomsInvitationsCreateResponse = operations['chat___rooms___invitations___create']['responses']['200']['content']['application/json']; +export type ChatRoomsInvitationsIgnoreRequest = operations['chat___rooms___invitations___ignore']['requestBody']['content']['application/json']; +export type ChatRoomsInvitationsIgnoreResponse = operations['chat___rooms___invitations___ignore']['responses']['200']['content']['application/json']; +export type ChatRoomsInvitationsInboxRequest = operations['chat___rooms___invitations___inbox']['requestBody']['content']['application/json']; +export type ChatRoomsInvitationsInboxResponse = operations['chat___rooms___invitations___inbox']['responses']['200']['content']['application/json']; +export type ChatRoomsJoinRequest = operations['chat___rooms___join']['requestBody']['content']['application/json']; +export type ChatRoomsJoinResponse = operations['chat___rooms___join']['responses']['200']['content']['application/json']; +export type ChatRoomsJoiningRequest = operations['chat___rooms___joining']['requestBody']['content']['application/json']; +export type ChatRoomsJoiningResponse = operations['chat___rooms___joining']['responses']['200']['content']['application/json']; +export type ChatRoomsLeaveRequest = operations['chat___rooms___leave']['requestBody']['content']['application/json']; +export type ChatRoomsLeaveResponse = operations['chat___rooms___leave']['responses']['200']['content']['application/json']; +export type ChatRoomsMembersRequest = operations['chat___rooms___members']['requestBody']['content']['application/json']; +export type ChatRoomsMembersResponse = operations['chat___rooms___members']['responses']['200']['content']['application/json']; +export type ChatRoomsMuteRequest = operations['chat___rooms___mute']['requestBody']['content']['application/json']; +export type ChatRoomsMuteResponse = operations['chat___rooms___mute']['responses']['200']['content']['application/json']; +export type ChatRoomsOwnedRequest = operations['chat___rooms___owned']['requestBody']['content']['application/json']; +export type ChatRoomsOwnedResponse = operations['chat___rooms___owned']['responses']['200']['content']['application/json']; +export type ChatRoomsShowRequest = operations['chat___rooms___show']['requestBody']['content']['application/json']; +export type ChatRoomsShowResponse = operations['chat___rooms___show']['responses']['200']['content']['application/json']; +export type ChatRoomsUpdateRequest = operations['chat___rooms___update']['requestBody']['content']['application/json']; +export type ChatRoomsUpdateResponse = operations['chat___rooms___update']['responses']['200']['content']['application/json']; export type ClipsAddNoteRequest = operations['clips___add-note']['requestBody']['content']['application/json']; export type ClipsCreateRequest = operations['clips___create']['requestBody']['content']['application/json']; export type ClipsCreateResponse = operations['clips___create']['responses']['200']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index 1a30da4437..0ff9749602 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -54,3 +54,8 @@ export type MetaDetailedOnly = components['schemas']['MetaDetailedOnly']; export type MetaDetailed = components['schemas']['MetaDetailed']; 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 ChatRoom = components['schemas']['ChatRoom']; +export type ChatRoomInvitation = components['schemas']['ChatRoomInvitation']; +export type ChatRoomMembership = components['schemas']['ChatRoomMembership']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 743aaf1608..31bc34e473 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -1358,6 +1358,204 @@ export type paths = { */ post: operations['charts___users']; }; + '/chat/history': { + /** + * chat/history + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___history']; + }; + '/chat/messages/create-to-room': { + /** + * chat/messages/create-to-room + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___messages___create-to-room']; + }; + '/chat/messages/create-to-user': { + /** + * chat/messages/create-to-user + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___messages___create-to-user']; + }; + '/chat/messages/delete': { + /** + * chat/messages/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___messages___delete']; + }; + '/chat/messages/react': { + /** + * chat/messages/react + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___messages___react']; + }; + '/chat/messages/room-timeline': { + /** + * chat/messages/room-timeline + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___messages___room-timeline']; + }; + '/chat/messages/search': { + /** + * chat/messages/search + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___messages___search']; + }; + '/chat/messages/show': { + /** + * chat/messages/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___messages___show']; + }; + '/chat/messages/user-timeline': { + /** + * chat/messages/user-timeline + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___messages___user-timeline']; + }; + '/chat/rooms/create': { + /** + * chat/rooms/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___create']; + }; + '/chat/rooms/delete': { + /** + * chat/rooms/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___delete']; + }; + '/chat/rooms/invitations/create': { + /** + * chat/rooms/invitations/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___invitations___create']; + }; + '/chat/rooms/invitations/ignore': { + /** + * chat/rooms/invitations/ignore + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___invitations___ignore']; + }; + '/chat/rooms/invitations/inbox': { + /** + * chat/rooms/invitations/inbox + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___rooms___invitations___inbox']; + }; + '/chat/rooms/join': { + /** + * chat/rooms/join + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___join']; + }; + '/chat/rooms/joining': { + /** + * chat/rooms/joining + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___rooms___joining']; + }; + '/chat/rooms/leave': { + /** + * chat/rooms/leave + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___leave']; + }; + '/chat/rooms/members': { + /** + * chat/rooms/members + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___members']; + }; + '/chat/rooms/mute': { + /** + * chat/rooms/mute + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___mute']; + }; + '/chat/rooms/owned': { + /** + * chat/rooms/owned + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___rooms___owned']; + }; + '/chat/rooms/show': { + /** + * chat/rooms/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + post: operations['chat___rooms___show']; + }; + '/chat/rooms/update': { + /** + * chat/rooms/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + post: operations['chat___rooms___update']; + }; '/clips/add-note': { /** * clips/add-note @@ -2470,15 +2668,6 @@ export type paths = { */ post: operations['i___pin']; }; - '/i/read-all-unread-notes': { - /** - * i/read-all-unread-notes - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - post: operations['i___read-all-unread-notes']; - }; '/i/read-announcement': { /** * i/read-announcement @@ -3848,6 +4037,8 @@ export type components = { followingVisibility: 'public' | 'followers' | 'private'; /** @enum {string} */ followersVisibility: 'public' | 'followers' | 'private'; + /** @enum {string} */ + chatScope: 'everyone' | 'following' | 'followers' | 'mutual' | 'none'; roles: components['schemas']['RoleLite'][]; followedMessage?: string | null; memo: string | null; @@ -3894,6 +4085,7 @@ export type components = { unreadAnnouncements: components['schemas']['Announcement'][]; hasUnreadAntenna: boolean; hasUnreadChannel: boolean; + hasUnreadChatMessages: boolean; hasUnreadNotification: boolean; hasPendingReceivedFollowRequest: boolean; unreadNotificationsCount: number; @@ -4947,6 +5139,7 @@ export type components = { canImportFollowing: boolean; canImportMuting: boolean; canImportUserLists: boolean; + canChat: boolean; }; ReversiGameLite: { /** Format: id */ @@ -5146,6 +5339,69 @@ export type components = { systemWebhookId?: string; systemWebhook?: components['schemas']['SystemWebhook']; }; + ChatMessage: { + id: string; + /** Format: date-time */ + createdAt: string; + fromUserId: string; + fromUser: components['schemas']['UserLite']; + toUserId?: string | null; + toUser?: components['schemas']['UserLite'] | null; + toRoomId?: string | null; + toRoom?: components['schemas']['ChatRoom'] | null; + text?: string | null; + fileId?: string | null; + file?: components['schemas']['DriveFile'] | null; + isRead?: boolean; + reactions: ({ + reaction: string; + user?: components['schemas']['UserLite'] | null; + })[]; + }; + ChatMessageLite: { + id: string; + /** Format: date-time */ + createdAt: string; + fromUserId: string; + fromUser?: components['schemas']['UserLite']; + toUserId?: string | null; + toRoomId?: string | null; + text?: string | null; + fileId?: string | null; + file?: components['schemas']['DriveFile'] | null; + reactions: ({ + reaction: string; + user?: components['schemas']['UserLite'] | null; + })[]; + }; + ChatRoom: { + id: string; + /** Format: date-time */ + createdAt: string; + ownerId: string; + owner: components['schemas']['UserLite']; + name: string; + description: string; + isMuted?: boolean; + }; + ChatRoomInvitation: { + id: string; + /** Format: date-time */ + createdAt: string; + userId: string; + user: components['schemas']['UserLite']; + roomId: string; + room: components['schemas']['ChatRoom']; + }; + ChatRoomMembership: { + id: string; + /** Format: date-time */ + createdAt: string; + userId: string; + user?: components['schemas']['UserLite']; + roomId: string; + room?: components['schemas']['ChatRoom']; + }; }; responses: never; parameters: never; @@ -13670,6 +13926,1267 @@ export type operations = { }; }; /** + * chat/history + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + chat___history: { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default false */ + room?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatMessage'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/create-to-room + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + 'chat___messages___create-to-room': { + requestBody: { + content: { + 'application/json': { + text?: string | null; + /** Format: misskey:id */ + fileId?: string; + /** Format: misskey:id */ + toRoomId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatMessageLite']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Too many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/create-to-user + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + 'chat___messages___create-to-user': { + requestBody: { + content: { + 'application/json': { + text?: string | null; + /** Format: misskey:id */ + fileId?: string; + /** Format: misskey:id */ + toUserId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatMessageLite']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Too many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___messages___delete: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + messageId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/react + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___messages___react: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + messageId: string; + reaction: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/room-timeline + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + 'chat___messages___room-timeline': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** Format: misskey:id */ + roomId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatMessageLite'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/search + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + chat___messages___search: { + requestBody: { + content: { + 'application/json': { + query: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + userId?: string | null; + /** Format: misskey:id */ + roomId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatMessage'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + chat___messages___show: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + messageId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatMessage']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/messages/user-timeline + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + 'chat___messages___user-timeline': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatMessageLite'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___create: { + requestBody: { + content: { + 'application/json': { + name: string; + description?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoom']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Too many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___delete: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/invitations/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___invitations___create: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoomInvitation']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Too many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/invitations/ignore + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___invitations___ignore: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/invitations/inbox + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + chat___rooms___invitations___inbox: { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoomInvitation'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/join + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___join: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/joining + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + chat___rooms___joining: { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoomMembership'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/leave + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___leave: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/members + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___members: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoomMembership'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/mute + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___mute: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + mute: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/owned + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + chat___rooms___owned: { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoom'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:chat* + */ + chat___rooms___show: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoom']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * chat/rooms/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:chat* + */ + chat___rooms___update: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roomId: string; + name?: string; + description?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['ChatRoom']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** * clips/add-note * @description No description provided. * @@ -20280,50 +21797,6 @@ export type operations = { }; }; /** - * i/read-all-unread-notes - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - 'i___read-all-unread-notes': { - responses: { - /** @description OK (without any results) */ - 204: { - content: never; - }; - /** @description Client error */ - 400: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - /** @description Authentication error */ - 401: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - /** @description Forbidden error */ - 403: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - /** @description I'm Ai */ - 418: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - /** @description Internal server error */ - 500: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - }; - }; - /** * i/read-announcement * @description No description provided. * @@ -21089,6 +22562,8 @@ export type operations = { followingVisibility?: 'public' | 'followers' | 'private'; /** @enum {string} */ followersVisibility?: 'public' | 'followers' | 'private'; + /** @enum {string} */ + chatScope?: 'everyone' | 'followers' | 'following' | 'mutual' | 'none'; /** Format: misskey:id */ pinnedPageId?: string | null; mutedWords?: (string[] | string)[]; diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts index c5911a70eb..9d0fe5e781 100644 --- a/packages/misskey-js/src/consts.ts +++ b/packages/misskey-js/src/consts.ts @@ -37,8 +37,8 @@ export const permissions = [ 'write:favorites', 'read:following', 'write:following', - 'read:messaging', - 'write:messaging', + 'read:messaging', // deprecated + 'write:messaging', // deprecated 'read:mutes', 'write:mutes', 'write:notes', @@ -110,6 +110,8 @@ export const permissions = [ 'read:clip-favorite', 'read:federation', 'write:report-abuse', + 'write:chat', + 'read:chat', ] as const; export const moderationLogTypes = [ diff --git a/packages/misskey-js/src/streaming.types.ts b/packages/misskey-js/src/streaming.types.ts index 26a50f9fa4..8e5438eeb6 100644 --- a/packages/misskey-js/src/streaming.types.ts +++ b/packages/misskey-js/src/streaming.types.ts @@ -1,5 +1,6 @@ import { Antenna, + ChatMessage, DriveFile, DriveFolder, Note, @@ -46,13 +47,9 @@ export type Channels = { urlUploadFinished: (payload: { marker: string; file: DriveFile; }) => void; readAllNotifications: () => void; unreadNotification: (payload: Notification) => void; - unreadMention: (payload: Note['id']) => void; - readAllUnreadMentions: () => void; notificationFlushed: () => void; - unreadSpecifiedNote: (payload: Note['id']) => void; - readAllUnreadSpecifiedNotes: () => void; - readAllAntennas: () => void; unreadAntenna: (payload: Antenna) => void; + newChatMessage: (payload: ChatMessage) => void; readAllAnnouncements: () => void; myTokenRegenerated: () => void; signin: (payload: Signin) => void; |