|
|
@ -5,7 +5,6 @@ |
|
|
|
import type { components, operations } from './openapi/openapi-full.ts' |
|
|
|
|
|
|
|
// General
|
|
|
|
type ApiOptions<T> = { params: T } |
|
|
|
type ApiResponse<T> = Promise<{ data: T }> |
|
|
|
type ApiResponseHeaders<T extends { headers: object }> = { |
|
|
|
[K in keyof T['headers'] as Lowercase<string & K>]: T['headers'][K]; |
|
|
@ -67,25 +66,25 @@ export type File = RichObject<'size'|'path'|'link'|'mimetype'|'preview-available |
|
|
|
'height': string, |
|
|
|
} |
|
|
|
export type ChatMessage = components['schemas']['ChatMessageWithParent'] |
|
|
|
export type receiveMessagesParams = ApiOptions<operations['chat-receive-messages']['parameters']['query']>['params'] |
|
|
|
export type receiveMessagesParams = Required<operations['chat-receive-messages']>['requestBody']['content']['application/json'] |
|
|
|
export type receiveMessagesResponse = ApiResponse<operations['chat-receive-messages']['responses'][200]['content']['application/json']> |
|
|
|
export type getMessageContextParams = ApiOptions<operations['chat-get-message-context']['parameters']['query']>['params'] |
|
|
|
export type getMessageContextParams = Required<operations['chat-get-message-context']>['requestBody']['content']['application/json'] |
|
|
|
export type getMessageContextResponse = ApiResponse<operations['chat-get-message-context']['responses'][200]['content']['application/json']> |
|
|
|
export type postNewMessageParams = ApiOptions<operations['chat-send-message']['parameters']['query']>['params'] |
|
|
|
export type postNewMessageParams = Required<operations['chat-send-message']>['requestBody']['content']['application/json'] |
|
|
|
export type postNewMessageResponse = ApiResponse<operations['chat-send-message']['responses'][201]['content']['application/json']> |
|
|
|
export type clearHistoryResponse = ApiResponse<operations['chat-clear-history']['responses'][200]['content']['application/json']> |
|
|
|
export type deleteMessageResponse = ApiResponse<operations['chat-delete-message']['responses'][200]['content']['application/json']> |
|
|
|
export type editMessageParams = ApiOptions<operations['chat-edit-message']['parameters']['query']>['params'] |
|
|
|
export type editMessageParams = Required<operations['chat-edit-message']>['requestBody']['content']['application/json'] |
|
|
|
export type editMessageResponse = ApiResponse<operations['chat-edit-message']['responses'][200]['content']['application/json']> |
|
|
|
export type postRichObjectParams = ApiOptions<operations['chat-share-object-to-chat']['parameters']['query']>['params'] |
|
|
|
export type postRichObjectParams = Required<operations['chat-share-object-to-chat']>['requestBody']['content']['application/json'] |
|
|
|
export type postRichObjectResponse = ApiResponse<operations['chat-share-object-to-chat']['responses'][201]['content']['application/json']> |
|
|
|
export type setReadMarkerParams = ApiOptions<operations['chat-set-read-marker']['parameters']['query']>['params'] |
|
|
|
export type setReadMarkerParams = Required<operations['chat-set-read-marker']>['requestBody']['content']['application/json'] |
|
|
|
export type setReadMarkerResponse = ApiResponse<operations['chat-set-read-marker']['responses'][200]['content']['application/json']> |
|
|
|
export type markUnreadResponse = ApiResponse<operations['chat-mark-unread']['responses'][200]['content']['application/json']> |
|
|
|
|
|
|
|
// Avatars
|
|
|
|
export type setFileAvatarResponse = ApiResponse<operations['avatar-upload-avatar']['responses'][200]['content']['application/json']> |
|
|
|
export type setEmojiAvatarParams = ApiOptions<operations['avatar-emoji-avatar']['parameters']['query']>['params'] |
|
|
|
export type setEmojiAvatarParams = Required<operations['avatar-emoji-avatar']>['requestBody']['content']['application/json'] |
|
|
|
export type setEmojiAvatarResponse = ApiResponse<operations['avatar-emoji-avatar']['responses'][200]['content']['application/json']> |
|
|
|
export type deleteAvatarResponse = ApiResponse<operations['avatar-delete-avatar']['responses'][200]['content']['application/json']> |
|
|
|
|
|
|
@ -93,9 +92,8 @@ export type deleteAvatarResponse = ApiResponse<operations['avatar-delete-avatar' |
|
|
|
export type Ban = components['schemas']['Ban'] |
|
|
|
|
|
|
|
export type getBansResponse = ApiResponse<operations['ban-list-bans']['responses'][200]['content']['application/json']> |
|
|
|
export type banActorParams = ApiOptions<operations['ban-ban-actor']['parameters']['query']>['params'] |
|
|
|
export type banActorParams = Required<operations['ban-ban-actor']>['requestBody']['content']['application/json'] |
|
|
|
export type banActorResponse = ApiResponse<operations['ban-ban-actor']['responses'][200]['content']['application/json']> |
|
|
|
export type unbanActorParams = ApiOptions<operations['ban-unban-actor']['parameters']['query']>['params'] |
|
|
|
export type unbanActorResponse = ApiResponse<operations['ban-unban-actor']['responses'][200]['content']['application/json']> |
|
|
|
|
|
|
|
// Bots
|
|
|
@ -121,11 +119,10 @@ export type acceptShareResponse = ApiResponse<operations['federation-accept-shar |
|
|
|
export type rejectShareResponse = ApiResponse<operations['federation-reject-share']['responses'][200]['content']['application/json']> |
|
|
|
|
|
|
|
// Reactions
|
|
|
|
export type getReactionsParams = ApiOptions<operations['reaction-get-reactions']['parameters']['query']>['params'] |
|
|
|
export type getReactionsResponse = ApiResponse<operations['reaction-get-reactions']['responses'][200]['content']['application/json']> |
|
|
|
export type addReactionParams = ApiOptions<operations['reaction-react']['parameters']['query']>['params'] |
|
|
|
export type addReactionParams = Required<operations['reaction-react']>['requestBody']['content']['application/json'] |
|
|
|
export type addReactionResponse = ApiResponse<operations['reaction-react']['responses'][200]['content']['application/json']> |
|
|
|
export type deleteReactionParams = ApiOptions<operations['reaction-delete']['parameters']['query']>['params'] |
|
|
|
export type deleteReactionParams = Required<operations['reaction-delete']>['requestBody']['content']['application/json'] |
|
|
|
export type deleteReactionResponse = ApiResponse<operations['reaction-delete']['responses'][200]['content']['application/json']> |
|
|
|
|
|
|
|
// Breakout rooms
|
|
|
@ -133,18 +130,18 @@ export type BreakoutRoom = components['schemas']['Room'] & { |
|
|
|
objectType: 'room', |
|
|
|
} |
|
|
|
|
|
|
|
export type configureBreakoutRoomsParams = ApiOptions<operations['breakout_room-configure-breakout-rooms']['parameters']['query']>['params'] |
|
|
|
export type configureBreakoutRoomsParams = Required<operations['breakout_room-configure-breakout-rooms']>['requestBody']['content']['application/json'] |
|
|
|
export type configureBreakoutRoomsResponse = ApiResponse<operations['breakout_room-configure-breakout-rooms']['responses'][200]['content']['application/json']> |
|
|
|
export type deleteBreakoutRoomsResponse = ApiResponse<operations['breakout_room-remove-breakout-rooms']['responses'][200]['content']['application/json']> |
|
|
|
export type reorganizeAttendeesParams = ApiOptions<operations['breakout_room-apply-attendee-map']['parameters']['query']>['params'] |
|
|
|
export type reorganizeAttendeesParams = Required<operations['breakout_room-apply-attendee-map']>['requestBody']['content']['application/json'] |
|
|
|
export type reorganizeAttendeesResponse = ApiResponse<operations['breakout_room-apply-attendee-map']['responses'][200]['content']['application/json']> |
|
|
|
export type getBreakoutRoomsResponse = ApiResponse<operations['room-get-breakout-rooms']['responses'][200]['content']['application/json']> |
|
|
|
export type startBreakoutRoomsResponse = ApiResponse<operations['breakout_room-start-breakout-rooms']['responses'][200]['content']['application/json']> |
|
|
|
export type stopBreakoutRoomsResponse = ApiResponse<operations['breakout_room-stop-breakout-rooms']['responses'][200]['content']['application/json']> |
|
|
|
export type broadcastChatMessageParams = ApiOptions<operations['breakout_room-broadcast-chat-message']['parameters']['query']>['params'] |
|
|
|
export type broadcastChatMessageParams = Required<operations['breakout_room-broadcast-chat-message']>['requestBody']['content']['application/json'] |
|
|
|
export type broadcastChatMessageResponse = ApiResponse<operations['breakout_room-broadcast-chat-message']['responses'][201]['content']['application/json']> |
|
|
|
export type getBreakoutRoomsParticipantsResponse = ApiResponse<operations['room-get-breakout-room-participants']['responses'][200]['content']['application/json']> |
|
|
|
export type requestAssistanceResponse = ApiResponse<operations['breakout_room-request-assistance']['responses'][200]['content']['application/json']> |
|
|
|
export type resetRequestAssistanceResponse = ApiResponse<operations['breakout_room-reset-request-for-assistance']['responses'][200]['content']['application/json']> |
|
|
|
export type switchToBreakoutRoomParams = ApiOptions<operations['breakout_room-switch-breakout-room']['parameters']['query']>['params'] |
|
|
|
export type switchToBreakoutRoomParams = Required<operations['breakout_room-switch-breakout-room']>['requestBody']['content']['application/json'] |
|
|
|
export type switchToBreakoutRoomResponse = ApiResponse<operations['breakout_room-switch-breakout-room']['responses'][200]['content']['application/json']> |