Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/revolt_api/schema.ts>operations

a typed revolt api client
Latest
interface operations
import { type operations } from "https://deno.land/x/revolt_api@0.4.0/schema.ts";

Properties

root_root: { responses: { 200: { content: { application/json: components["schemas"]["RevoltConfig"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch the server configuration for this Revolt instance.

fetch_self_req: { responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Retrieve your user information.

edit_user_req: { responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataEditUser"]; }; }; }

Edit currently authenticated user.

fetch_user_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Retrieve a user's information.

change_username_req: { responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataChangeUsername"]; }; }; }

Change your username.

get_default_avatar_req: { parameters: { path: { target: string; }; }; responses: { 200: { content: { image/png: string; }; }; }; }

This returns a default avatar based on the given id.

fetch_profile_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["UserProfile"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Retrieve a user's profile data.

Will fail if you do not have permission to access the other user's profile.

fetch_dms_req: { responses: { 200: { content: { application/json: components["schemas"]["Channel"][]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

This fetches your direct messages, including any DM and group DM conversations.

open_dm_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Channel"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Open a DM with another user.

If the target is oneself, a saved messages channel is returned.

find_mutual_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["MutualResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Retrieve a list of mutual friends and servers with another user.

add_friend_req: { parameters: { path: { username: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Send a friend request to another user or accept another user's friend request.

remove_friend_req: { parameters: { path: { target: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Denies another user's friend request or removes an existing friend.

block_user_req: { parameters: { path: { target: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Block another user by their id.

unblock_user_req: { parameters: { path: { target: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["User"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Unblock another user by their id.

create_create_bot: { responses: { 200: { content: { application/json: components["schemas"]["Bot"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataCreateBot"]; }; }; }

Create a new Revolt bot.

fetch_public_fetch_public_bot: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["PublicBot"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch details of a public (or owned) bot by its id.

invite_invite_bot: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["InviteBotDestination"]; }; }; }

Invite a bot to a server or group by its id.`

fetch_fetch_bot: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["BotResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch details of a bot you own by its id.

delete_delete_bot: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Delete a bot by its id.

edit_edit_bot: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Bot"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataEditBot"]; }; }; }

Edit bot details by its id.

fetch_owned_fetch_owned_bots: { responses: { 200: { content: { application/json: components["schemas"]["OwnedBotsResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch all of the bots that you have control over.

channel_ack_req: { parameters: { path: { target: components["schemas"]["Id"]; message: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Lets the server and all other clients know that we've seen this message id in this channel.

channel_fetch_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Channel"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch channel by its id.

channel_delete_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Deletes a server channel, leaves a group or closes a group.

channel_edit_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Channel"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataEditChannel"]; }; }; }

Edit a channel object by its id.

members_fetch_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["User"][]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Retrieves all users who are part of this group.

invite_create_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Invite"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Creates an invite to this channel.

Channel must be a TextChannel.

message_query_req: { parameters: { path: { target: components["schemas"]["Id"]; }; query: { limit?: number | null; before?: string | null; after?: string | null; sort?: components["schemas"]["MessageSort"] | null; nearby?: string | null; include_users?: boolean | null; }; }; responses: { 200: { content: { application/json: components["schemas"]["BulkMessageResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch multiple messages.

message_send_message_send: { parameters: { path: { target: components["schemas"]["Id"]; }; header: { Idempotency-Key?: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["Message"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataMessageSend"]; }; }; }

Sends a message to the given channel.

message_search_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["BulkMessageResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["OptionsMessageSearch"]; }; }; }

This route searches for messages within the given parameters.

message_query_stale_req: { parameters: { path: { _target: components["schemas"]["Id"]; }; }; responses: { 200: unknown; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["OptionsQueryStale"]; }; }; }

This route returns any changed message objects and tells you if any have been deleted.

Don't actually poll this route, instead use this to update your local database.

DEPRECATED

message_fetch_req: { parameters: { path: { target: components["schemas"]["Id"]; msg: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Message"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Retrieves a message by its id.

message_delete_req: { parameters: { path: { target: components["schemas"]["Id"]; msg: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Delete a message you've sent or one you have permission to delete.

message_edit_req: { parameters: { path: { target: string; msg: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Message"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataEditMessage"]; }; }; }

Edits a message that you've previously sent.

group_create_req: { responses: { 200: { content: { application/json: components["schemas"]["Channel"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataCreateGroup"]; }; }; }

Create a new group channel.

group_add_member_req: { parameters: { path: { target: components["schemas"]["Id"]; member: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Adds another user to the group.

group_remove_member_req: { parameters: { path: { target: components["schemas"]["Id"]; member: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Removes a user from the group.

voice_join_req: { parameters: { path: { _target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["CreateVoiceUserResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Asks the voice server for a token to join the call.

permissions_set_req: { parameters: { path: { target: components["schemas"]["Id"]; role_id: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["Server"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataSetServerRolePermission"]; }; }; }

Sets permissions for the specified role in the server.

permissions_set_default_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Server"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataSetServerDefaultPermission"]; }; }; }

Sets permissions for the default role in this server.

server_create_req: { responses: { 200: { content: { application/json: components["schemas"]["CreateServerResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataCreateServer"]; }; }; }

Create a new server.

server_fetch_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Server"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch a server by its id.

server_delete_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Deletes a server if owner otherwise leaves.

server_edit_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Server"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataEditServer"]; }; }; }

Edit a server by its id.

server_ack_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Mark all channels in a server as read.

channel_create_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Channel"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataCreateChannel"]; }; }; }

Create a new Text or Voice channel.

member_fetch_all_req: { parameters: { path: { target: components["schemas"]["Id"]; }; query: { exclude_offline?: boolean | null; }; }; responses: { 200: { content: { application/json: components["schemas"]["AllMemberResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch all server members.

member_fetch_req: { parameters: { path: { target: components["schemas"]["Id"]; member: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Member"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Retrieve a member.

member_remove_req: { parameters: { path: { target: components["schemas"]["Id"]; member: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Removes a member from the server.

member_edit_req: { parameters: { path: { server: components["schemas"]["Id"]; target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Member"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataMemberEdit"]; }; }; }

Edit a member by their id.

ban_create_req: { parameters: { path: { server: components["schemas"]["Id"]; target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["ServerBan"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataBanCreate"]; }; }; }

Ban a user by their id.

ban_remove_req: { parameters: { path: { server: components["schemas"]["Id"]; target: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Remove a user's ban.

ban_list_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["BanListResult"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch all bans on a server.

invites_fetch_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["Invite"][]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch all server invites.

roles_create_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["NewRoleResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataCreateRole"]; }; }; }

Creates a new server role.

roles_delete_req: { parameters: { path: { target: components["schemas"]["Id"]; role_id: string; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Delete a server role by its id.

roles_edit_req: { parameters: { path: { target: components["schemas"]["Id"]; role_id: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["Role"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataEditRole"]; }; }; }

Edit a role by its id.

invite_fetch_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["InviteResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch an invite by its id.

invite_join_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 200: { content: { application/json: components["schemas"]["InviteJoinResponse"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Join an invite by its ID.

invite_delete_req: { parameters: { path: { target: components["schemas"]["Id"]; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Delete an invite by its id.

create_account_create_account: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataCreateAccount"]; }; }; }

Create a new account.

resend_verification_resend_verification: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataResendVerification"]; }; }; }

Resend account creation verification email.

fetch_account_fetch_account: { responses: { 200: { content: { application/json: components["schemas"]["AccountInfo"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch account information from the current session.

change_password_change_password: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataChangePassword"]; }; }; }

Change the current account password.

change_email_change_email: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataChangeEmail"]; }; }; }

Change the associated account email.

verify_email_verify_email: { parameters: { path: { code: string; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Verify an email address.

send_password_reset_send_password_reset: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataSendPasswordReset"]; }; }; }

Send an email to reset account password.

password_reset_password_reset: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataPasswordReset"]; }; }; }

Confirm password reset and change the password.

login_login: { responses: { 200: { content: { application/json: components["schemas"]["ResponseLogin"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataLogin"]; }; }; }

Login to an account.

logout_logout: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Delete current session.

fetch_all_fetch_all: { responses: { 200: { content: { application/json: components["schemas"]["SessionInfo"][]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch all sessions associated with this account.

revoke_all_revoke_all: { parameters: { query: { revoke_self?: boolean | null; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Delete all active sessions, optionally including current one.

revoke_revoke: { parameters: { path: { id: string; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Delete a specific active session.

edit_edit: { parameters: { path: { id: string; }; }; responses: { 200: { content: { application/json: components["schemas"]["Session"]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataEditSession"]; }; }; }

Edit current session information.

hello_req: { responses: { 200: { content: { application/json: components["schemas"]["DataHello"]; }; }; }; }

This will tell you whether the current account requires onboarding or whether you can continue to send requests as usual. You may skip calling this if you're restoring an existing session.

complete_req: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["DataOnboard"]; }; }; }

This sets a new username, completes onboarding and allows a user to start using Revolt.

subscribe_req: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["WebPushSubscription"]; }; }; }

Create a new Web Push subscription.

If an existing subscription exists on this session, it will be removed.

unsubscribe_req: { responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Remove the Web Push subscription associated with the current session.

get_settings_req: { responses: { 200: { content: { application/json: { [key: string]: [number, string]; }; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: components["schemas"]["OptionsFetchSettings"]; }; }; }

Fetch settings from server filtered by keys.

This will return an object with the requested keys, each value is a tuple of (timestamp, value), the value is the previously uploaded data.

set_settings_req: { parameters: { query: { timestamp?: number | null; }; }; responses: { 204: never; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; requestBody: { content: { application/json: { [key: string]: string; }; }; }; }

Upload data to save to settings.

get_unreads_req: { responses: { 200: { content: { application/json: components["schemas"]["ChannelUnread"][]; }; }; default: { content: { application/json: components["schemas"]["Error"]; }; }; }; }

Fetch information about unread state on channels.