Files
javascript-client-api/src/schema.ts
T
2023-03-03 08:27:10 +00:00

4807 lines
130 KiB
TypeScript

/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/": {
/** Fetch the server configuration for this Revolt instance. */
get: operations["root_root"];
};
"/users/@me": {
/** Retrieve your user information. */
get: operations["fetch_self_req"];
/** Edit currently authenticated user. */
patch: operations["edit_user_req"];
};
"/users/{target}": {
/** Retrieve a user's information. */
get: operations["fetch_user_req"];
};
"/users/{target}/flags": {
/** Retrieve a user's flags. */
get: operations["fetch_user_flags_fetch_user_flags"];
};
"/users/@me/username": {
/** Change your username. */
patch: operations["change_username_req"];
};
"/users/{target}/default_avatar": {
/** This returns a default avatar based on the given id. */
get: operations["get_default_avatar_req"];
};
"/users/{target}/profile": {
/**
* Retrieve a user's profile data.
*
* Will fail if you do not have permission to access the other user's profile.
*/
get: operations["fetch_profile_req"];
};
"/users/dms": {
/** This fetches your direct messages, including any DM and group DM conversations. */
get: operations["fetch_dms_req"];
};
"/users/{target}/dm": {
/**
* Open a DM with another user.
*
* If the target is oneself, a saved messages channel is returned.
*/
get: operations["open_dm_req"];
};
"/users/{target}/mutual": {
/** Retrieve a list of mutual friends and servers with another user. */
get: operations["find_mutual_req"];
};
"/users/{target}/friend": {
/** Accept another user's friend request. */
put: operations["add_friend_req"];
/** Denies another user's friend request or removes an existing friend. */
delete: operations["remove_friend_req"];
};
"/users/{target}/block": {
/** Block another user by their id. */
put: operations["block_user_req"];
/** Unblock another user by their id. */
delete: operations["unblock_user_req"];
};
"/users/friend": {
/** Send a friend request to another user. */
post: operations["send_friend_request_req"];
};
"/bots/create": {
/** Create a new Revolt bot. */
post: operations["create_create_bot"];
};
"/bots/{target}/invite": {
/** Fetch details of a public (or owned) bot by its id. */
get: operations["fetch_public_fetch_public_bot"];
/** Invite a bot to a server or group by its id.` */
post: operations["invite_invite_bot"];
};
"/bots/{target}": {
/** Fetch details of a bot you own by its id. */
get: operations["fetch_fetch_bot"];
/** Delete a bot by its id. */
delete: operations["delete_delete_bot"];
/** Edit bot details by its id. */
patch: operations["edit_edit_bot"];
};
"/bots/@me": {
/** Fetch all of the bots that you have control over. */
get: operations["fetch_owned_fetch_owned_bots"];
};
"/channels/{target}/ack/{message}": {
/** Lets the server and all other clients know that we've seen this message id in this channel. */
put: operations["channel_ack_req"];
};
"/channels/{target}": {
/** Fetch channel by its id. */
get: operations["channel_fetch_req"];
/** Deletes a server channel, leaves a group or closes a group. */
delete: operations["channel_delete_req"];
/** Edit a channel object by its id. */
patch: operations["channel_edit_req"];
};
"/channels/{target}/members": {
/** Retrieves all users who are part of this group. */
get: operations["members_fetch_req"];
};
"/channels/{target}/invites": {
/**
* Creates an invite to this channel.
*
* Channel must be a `TextChannel`.
*/
post: operations["invite_create_req"];
};
"/channels/{target}/messages": {
/** Fetch multiple messages. */
get: operations["message_query_req"];
/** Sends a message to the given channel. */
post: operations["message_send_message_send"];
};
"/channels/{target}/search": {
/** This route searches for messages within the given parameters. */
post: operations["message_search_req"];
};
"/channels/{_target}/messages/stale": {
/**
* 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**
*/
post: operations["message_query_stale_req"];
};
"/channels/{target}/messages/{msg}": {
/** Retrieves a message by its id. */
get: operations["message_fetch_req"];
/** Delete a message you've sent or one you have permission to delete. */
delete: operations["message_delete_req"];
/** Edits a message that you've previously sent. */
patch: operations["message_edit_req"];
};
"/channels/{target}/messages/bulk": {
/**
* Delete multiple messages you've sent or one you have permission to delete.
*
* This will always require `ManageMessages` permission regardless of whether you own the message or not.
*
* Messages must have been sent within the past 1 week.
*/
delete: operations["message_bulk_delete_req"];
};
"/channels/create": {
/** Create a new group channel. */
post: operations["group_create_req"];
};
"/channels/{target}/recipients/{member}": {
/** Adds another user to the group. */
put: operations["group_add_member_req"];
/** Removes a user from the group. */
delete: operations["group_remove_member_req"];
};
"/channels/{target}/join_call": {
/** Asks the voice server for a token to join the call. */
post: operations["voice_join_req"];
};
"/channels/{target}/permissions/{role_id}": {
/**
* Sets permissions for the specified role in this channel.
*
* Channel must be a `TextChannel` or `VoiceChannel`.
*/
put: operations["permissions_set_req"];
};
"/channels/{target}/permissions/default": {
/**
* Sets permissions for the default role in this channel.
*
* Channel must be a `Group`, `TextChannel` or `VoiceChannel`.
*/
put: operations["permissions_set_default_req"];
};
"/channels/{target}/messages/{msg}/reactions/{emoji}": {
/** React to a given message. */
put: operations["message_react_react_message"];
/**
* Remove your own, someone else's or all of a given reaction.
*
* Requires `ManageMessages` if changing others' reactions.
*/
delete: operations["message_unreact_unreact_message"];
};
"/channels/{target}/messages/{msg}/reactions": {
/**
* Remove your own, someone else's or all of a given reaction.
*
* Requires `ManageMessages` permission.
*/
delete: operations["message_clear_reactions_clear_reactions"];
};
"/servers/create": {
/** Create a new server. */
post: operations["server_create_req"];
};
"/servers/{target}": {
/** Fetch a server by its id. */
get: operations["server_fetch_req"];
/** Deletes a server if owner otherwise leaves. */
delete: operations["server_delete_req"];
/** Edit a server by its id. */
patch: operations["server_edit_req"];
};
"/servers/{target}/ack": {
/** Mark all channels in a server as read. */
put: operations["server_ack_req"];
};
"/servers/{target}/channels": {
/** Create a new Text or Voice channel. */
post: operations["channel_create_req"];
};
"/servers/{target}/members": {
/** Fetch all server members. */
get: operations["member_fetch_all_req"];
};
"/servers/{target}/members/{member}": {
/** Retrieve a member. */
get: operations["member_fetch_req"];
/** Removes a member from the server. */
delete: operations["member_remove_req"];
};
"/servers/{server}/members/{target}": {
/** Edit a member by their id. */
patch: operations["member_edit_req"];
};
"/servers/{server}/bans/{target}": {
/** Ban a user by their id. */
put: operations["ban_create_req"];
/** Remove a user's ban. */
delete: operations["ban_remove_req"];
};
"/servers/{target}/bans": {
/** Fetch all bans on a server. */
get: operations["ban_list_req"];
};
"/servers/{target}/invites": {
/** Fetch all server invites. */
get: operations["invites_fetch_req"];
};
"/servers/{target}/roles": {
/** Creates a new server role. */
post: operations["roles_create_req"];
};
"/servers/{target}/roles/{role_id}": {
/** Delete a server role by its id. */
delete: operations["roles_delete_req"];
/** Edit a role by its id. */
patch: operations["roles_edit_req"];
};
"/servers/{target}/permissions/{role_id}": {
/** Sets permissions for the specified role in the server. */
put: operations["permissions_set_req"];
};
"/servers/{target}/permissions/default": {
/** Sets permissions for the default role in this server. */
put: operations["permissions_set_default_req"];
};
"/servers/{target}/emojis": {
/** Fetch all emoji on a server. */
get: operations["emoji_list_list_emoji"];
};
"/invites/{target}": {
/** Fetch an invite by its id. */
get: operations["invite_fetch_req"];
/** Join an invite by its ID. */
post: operations["invite_join_req"];
/** Delete an invite by its id. */
delete: operations["invite_delete_req"];
};
"/custom/emoji/{id}": {
/** Fetch an emoji by its id. */
get: operations["emoji_fetch_fetch_emoji"];
/** Create an emoji by its Autumn upload id. */
put: operations["emoji_create_create_emoji"];
/** Delete an emoji by its id. */
delete: operations["emoji_delete_delete_emoji"];
};
"/safety/reports/{report}": {
/** Edit a report. */
patch: operations["edit_report_edit_report"];
};
"/safety/report/{id}": {
/** Fetch a report by its ID */
get: operations["fetch_report_fetch_report"];
};
"/safety/reports": {
/** Fetch all available reports */
get: operations["fetch_reports_fetch_reports"];
};
"/safety/report": {
/** Report a piece of content to the moderation team. */
post: operations["report_content_report_content"];
};
"/safety/snapshot/{report_id}": {
/** Fetch a snapshot for a given report */
get: operations["fetch_snapshot_fetch_snapshot"];
};
"/auth/account/create": {
/** Create a new account. */
post: operations["create_account_create_account"];
};
"/auth/account/reverify": {
/** Resend account creation verification email. */
post: operations["resend_verification_resend_verification"];
};
"/auth/account/delete": {
/** Schedule an account for deletion by confirming the received token. */
put: operations["confirm_deletion_confirm_deletion"];
/** Request to have an account deleted. */
post: operations["delete_account_delete_account"];
};
"/auth/account/": {
/** Fetch account information from the current session. */
get: operations["fetch_account_fetch_account"];
};
"/auth/account/disable": {
/** Disable an account. */
post: operations["disable_account_disable_account"];
};
"/auth/account/change/password": {
/** Change the current account password. */
patch: operations["change_password_change_password"];
};
"/auth/account/change/email": {
/** Change the associated account email. */
patch: operations["change_email_change_email"];
};
"/auth/account/verify/{code}": {
/** Verify an email address. */
post: operations["verify_email_verify_email"];
};
"/auth/account/reset_password": {
/** Send an email to reset account password. */
post: operations["send_password_reset_send_password_reset"];
/** Confirm password reset and change the password. */
patch: operations["password_reset_password_reset"];
};
"/auth/session/login": {
/** Login to an account. */
post: operations["login_login"];
};
"/auth/session/logout": {
/** Delete current session. */
post: operations["logout_logout"];
};
"/auth/session/all": {
/** Fetch all sessions associated with this account. */
get: operations["fetch_all_fetch_all"];
/** Delete all active sessions, optionally including current one. */
delete: operations["revoke_all_revoke_all"];
};
"/auth/session/{id}": {
/** Delete a specific active session. */
delete: operations["revoke_revoke"];
/** Edit current session information. */
patch: operations["edit_edit"];
};
"/auth/mfa/ticket": {
/** Create a new MFA ticket or validate an existing one. */
put: operations["create_ticket_create_ticket"];
};
"/auth/mfa/": {
/** Fetch MFA status of an account. */
get: operations["fetch_status_fetch_status"];
};
"/auth/mfa/recovery": {
/** Fetch recovery codes for an account. */
post: operations["fetch_recovery_fetch_recovery"];
/** Re-generate recovery codes for an account. */
patch: operations["generate_recovery_generate_recovery"];
};
"/auth/mfa/methods": {
/** Fetch available MFA methods. */
get: operations["get_mfa_methods_get_mfa_methods"];
};
"/auth/mfa/totp": {
/** Generate a new secret for TOTP. */
put: operations["totp_enable_totp_enable"];
/** Generate a new secret for TOTP. */
post: operations["totp_generate_secret_totp_generate_secret"];
/** Disable TOTP 2FA for an account. */
delete: operations["totp_disable_totp_disable"];
};
"/onboard/hello": {
/** 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. */
get: operations["hello_req"];
};
"/onboard/complete": {
/** This sets a new username, completes onboarding and allows a user to start using Revolt. */
post: operations["complete_req"];
};
"/push/subscribe": {
/**
* Create a new Web Push subscription.
*
* If an existing subscription exists on this session, it will be removed.
*/
post: operations["subscribe_req"];
};
"/push/unsubscribe": {
/** Remove the Web Push subscription associated with the current session. */
post: operations["unsubscribe_req"];
};
"/sync/settings/fetch": {
/**
* 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.
*/
post: operations["get_settings_req"];
};
"/sync/settings/set": {
/** Upload data to save to settings. */
post: operations["set_settings_req"];
};
"/sync/unreads": {
/** Fetch information about unread state on channels. */
get: operations["get_unreads_req"];
};
}
export interface components {
schemas: {
/** Server Configuration */
RevoltConfig: {
/** @description Revolt API Version */
revolt: string;
/** @description Features enabled on this Revolt node */
features: components["schemas"]["RevoltFeatures"];
/** @description WebSocket URL */
ws: string;
/** @description URL pointing to the client serving this node */
app: string;
/** @description Web Push VAPID public key */
vapid: string;
/** @description Build information */
build: components["schemas"]["BuildInformation"];
};
/** Feature Configuration */
RevoltFeatures: {
/** @description hCaptcha configuration */
captcha: components["schemas"]["CaptchaFeature"];
/** @description Whether email verification is enabled */
email: boolean;
/** @description Whether this server is invite only */
invite_only: boolean;
/** @description File server service configuration */
autumn: components["schemas"]["Feature"];
/** @description Proxy service configuration */
january: components["schemas"]["Feature"];
/** @description Voice server configuration */
voso: components["schemas"]["VoiceFeature"];
};
/** hCaptcha Configuration */
CaptchaFeature: {
/** @description Whether captcha is enabled */
enabled: boolean;
/** @description Client key used for solving captcha */
key: string;
};
/** Generic Service Configuration */
Feature: {
/** @description Whether the service is enabled */
enabled: boolean;
/** @description URL pointing to the service */
url: string;
};
/** Voice Server Configuration */
VoiceFeature: {
/** @description Whether voice is enabled */
enabled: boolean;
/** @description URL pointing to the voice API */
url: string;
/** @description URL pointing to the voice WebSocket server */
ws: string;
};
/** Build Information */
BuildInformation: {
/** @description Commit Hash */
commit_sha: string;
/** @description Commit Timestamp */
commit_timestamp: string;
/** @description Git Semver */
semver: string;
/** @description Git Origin URL */
origin_url: string;
/** @description Build Timestamp */
timestamp: string;
};
/**
* @description Permission value on Revolt
*
* This should be restricted to the lower 52 bits to prevent any potential issues with Javascript. Also leave empty spaces for future permission flags to be added.
* @enum {string}
*/
Permission:
| "ManageChannel"
| "ManageServer"
| "ManagePermissions"
| "ManageRole"
| "ManageCustomisation"
| "KickMembers"
| "BanMembers"
| "TimeoutMembers"
| "AssignRoles"
| "ChangeNickname"
| "ManageNicknames"
| "ChangeAvatar"
| "RemoveAvatars"
| "ViewChannel"
| "ReadMessageHistory"
| "SendMessage"
| "ManageMessages"
| "ManageWebhooks"
| "InviteOthers"
| "SendEmbeds"
| "UploadFiles"
| "Masquerade"
| "React"
| "Connect"
| "Speak"
| "Video"
| "MuteMembers"
| "DeafenMembers"
| "MoveMembers"
| "GrantAllSafe"
| "GrantAll";
/**
* @description User permission definitions
* @enum {string}
*/
UserPermission: "Access" | "ViewProfile" | "SendMessage" | "Invite";
/**
* Error
* @description Possible API Errors
*/
Error:
| {
/** @enum {string} */
type: "LabelMe";
}
| {
/** @enum {string} */
type: "AlreadyOnboarded";
}
| {
/** @enum {string} */
type: "UsernameTaken";
}
| {
/** @enum {string} */
type: "InvalidUsername";
}
| {
/** @enum {string} */
type: "UnknownUser";
}
| {
/** @enum {string} */
type: "AlreadyFriends";
}
| {
/** @enum {string} */
type: "AlreadySentRequest";
}
| {
/** @enum {string} */
type: "Blocked";
}
| {
/** @enum {string} */
type: "BlockedByOther";
}
| {
/** @enum {string} */
type: "NotFriends";
}
| {
/** @enum {string} */
type: "UnknownChannel";
}
| {
/** @enum {string} */
type: "UnknownAttachment";
}
| {
/** @enum {string} */
type: "UnknownMessage";
}
| {
/** @enum {string} */
type: "CannotEditMessage";
}
| {
/** @enum {string} */
type: "CannotJoinCall";
}
| {
/** @enum {string} */
type: "TooManyAttachments";
}
| {
/** @enum {string} */
type: "TooManyReplies";
}
| {
/** @enum {string} */
type: "EmptyMessage";
}
| {
/** @enum {string} */
type: "PayloadTooLarge";
}
| {
/** @enum {string} */
type: "CannotRemoveYourself";
}
| {
/** @enum {string} */
type: "GroupTooLarge";
/** Format: uint */
max: number;
}
| {
/** @enum {string} */
type: "AlreadyInGroup";
}
| {
/** @enum {string} */
type: "NotInGroup";
}
| {
/** @enum {string} */
type: "UnknownServer";
}
| {
/** @enum {string} */
type: "InvalidRole";
}
| {
/** @enum {string} */
type: "Banned";
}
| {
/** @enum {string} */
type: "TooManyServers";
/** Format: uint */
max: number;
}
| {
/** @enum {string} */
type: "TooManyEmoji";
}
| {
/** @enum {string} */
type: "ReachedMaximumBots";
}
| {
/** @enum {string} */
type: "IsBot";
}
| {
/** @enum {string} */
type: "BotIsPrivate";
}
| {
/** @enum {string} */
type: "CannotReportYourself";
}
| {
/** @enum {string} */
type: "MissingPermission";
permission: components["schemas"]["Permission"];
}
| {
/** @enum {string} */
type: "MissingUserPermission";
permission: components["schemas"]["UserPermission"];
}
| {
/** @enum {string} */
type: "NotElevated";
}
| {
/** @enum {string} */
type: "NotPrivileged";
}
| {
/** @enum {string} */
type: "CannotGiveMissingPermissions";
}
| {
/** @enum {string} */
type: "NotOwner";
}
| {
/** @enum {string} */
type: "DatabaseError";
operation: string;
with: string;
}
| {
/** @enum {string} */
type: "InternalError";
}
| {
/** @enum {string} */
type: "InvalidOperation";
}
| {
/** @enum {string} */
type: "InvalidCredentials";
}
| {
/** @enum {string} */
type: "InvalidProperty";
}
| {
/** @enum {string} */
type: "InvalidSession";
}
| {
/** @enum {string} */
type: "DuplicateNonce";
}
| {
/** @enum {string} */
type: "VosoUnavailable";
}
| {
/** @enum {string} */
type: "NotFound";
}
| {
/** @enum {string} */
type: "NoEffect";
}
| {
/** @enum {string} */
type: "FailedValidation";
};
/** @description Representiation of a User on Revolt. */
User: {
/** @description Unique Id */
_id: string;
/** @description Username */
username: string;
/** @description Avatar attachment */
avatar?: components["schemas"]["File"] | null;
/** @description Relationships with other users */
relations?: components["schemas"]["Relationship"][] | null;
/**
* Format: int32
* @description Bitfield of user badges
*/
badges?: number | null;
/** @description User's current status */
status?: components["schemas"]["UserStatus"] | null;
/** @description User's profile page */
profile?: components["schemas"]["UserProfile"] | null;
/**
* Format: int32
* @description Enum of user flags
*/
flags?: number | null;
/** @description Whether this user is privileged */
privileged?: boolean;
/** @description Bot information */
bot?: components["schemas"]["BotInformation"] | null;
/** @description Current session user's relationship with this user */
relationship?: components["schemas"]["RelationshipStatus"] | null;
/** @description Whether this user is currently online */
online?: boolean | null;
};
/** @description Representation of a File on Revolt Generated by Autumn */
File: {
/** @description Unique Id */
_id: string;
/** @description Tag / bucket this file was uploaded to */
tag: string;
/** @description Original filename */
filename: string;
/** @description Parsed metadata of this file */
metadata: components["schemas"]["Metadata"];
/** @description Raw content type of this file */
content_type: string;
/**
* Format: int
* @description Size of this file (in bytes)
*/
size: number;
/** @description Whether this file was deleted */
deleted?: boolean | null;
/** @description Whether this file was reported */
reported?: boolean | null;
message_id?: string | null;
user_id?: string | null;
server_id?: string | null;
/** @description Id of the object this file is associated with */
object_id?: string | null;
};
/** @description Metadata associated with file */
Metadata:
| {
/** @enum {string} */
type: "File";
}
| {
/** @enum {string} */
type: "Text";
}
| {
/** @enum {string} */
type: "Image";
/** Format: int */
width: number;
/** Format: int */
height: number;
}
| {
/** @enum {string} */
type: "Video";
/** Format: int */
width: number;
/** Format: int */
height: number;
}
| {
/** @enum {string} */
type: "Audio";
};
/** @description Relationship entry indicating current status with other user */
Relationship: {
_id: string;
status: components["schemas"]["RelationshipStatus"];
};
/**
* @description User's relationship with another user (or themselves)
* @enum {string}
*/
RelationshipStatus:
| "None"
| "User"
| "Friend"
| "Outgoing"
| "Incoming"
| "Blocked"
| "BlockedOther";
/** @description User's active status */
UserStatus: {
/** @description Custom status text */
text?: string | null;
/** @description Current presence option */
presence?: components["schemas"]["Presence"] | null;
};
/**
* @description Presence status
* @enum {string}
*/
Presence: "Online" | "Idle" | "Focus" | "Busy" | "Invisible";
/** @description User's profile */
UserProfile: {
/** @description Text content on user's profile */
content?: string | null;
/** @description Background visible on user's profile */
background?: components["schemas"]["File"] | null;
};
/** @description Bot information for if the user is a bot */
BotInformation: {
/** @description Id of the owner of this bot */
owner: string;
};
Id: string;
/** Flag Response */
FlagResponse: {
/**
* Format: int32
* @description Flags
*/
flags: number;
};
/** User Data */
DataEditUser: {
/** @description New user status */
status?: components["schemas"]["UserStatus"] | null;
/**
* @description New user profile data
*
* This is applied as a partial.
*/
profile?: components["schemas"]["UserProfileData"] | null;
/** @description Attachment Id for avatar */
avatar?: string | null;
/** @description Fields to remove from user object */
remove?: components["schemas"]["FieldsUser"][] | null;
};
/** Profile Data */
UserProfileData: {
/** @description Text to set as user profile description */
content?: string | null;
/** @description Attachment Id for background */
background?: string | null;
};
/**
* @description Optional fields on user object
* @enum {string}
*/
FieldsUser:
| "Avatar"
| "StatusText"
| "StatusPresence"
| "ProfileContent"
| "ProfileBackground";
/** Username Information */
DataChangeUsername: {
/** @description New username */
username: string;
/** @description Current account password */
password: string;
};
/** @description Representation of a channel on Revolt */
Channel:
| {
/** @enum {string} */
channel_type: "SavedMessages";
/** @description Unique Id */
_id: string;
/** @description Id of the user this channel belongs to */
user: string;
}
| {
/** @enum {string} */
channel_type: "DirectMessage";
/** @description Unique Id */
_id: string;
/** @description Whether this direct message channel is currently open on both sides */
active: boolean;
/** @description 2-tuple of user ids participating in direct message */
recipients: string[];
/** @description Id of the last message sent in this channel */
last_message_id?: string | null;
}
| {
/** @enum {string} */
channel_type: "Group";
/** @description Unique Id */
_id: string;
/** @description Display name of the channel */
name: string;
/** @description User id of the owner of the group */
owner: string;
/** @description Channel description */
description?: string | null;
/** @description Array of user ids participating in channel */
recipients: string[];
/** @description Custom icon attachment */
icon?: components["schemas"]["File"] | null;
/** @description Id of the last message sent in this channel */
last_message_id?: string | null;
/**
* Format: int64
* @description Permissions assigned to members of this group (does not apply to the owner of the group)
*/
permissions?: number | null;
/** @description Whether this group is marked as not safe for work */
nsfw?: boolean;
}
| {
/** @enum {string} */
channel_type: "TextChannel";
/** @description Unique Id */
_id: string;
/** @description Id of the server this channel belongs to */
server: string;
/** @description Display name of the channel */
name: string;
/** @description Channel description */
description?: string | null;
/** @description Custom icon attachment */
icon?: components["schemas"]["File"] | null;
/** @description Id of the last message sent in this channel */
last_message_id?: string | null;
/** @description Default permissions assigned to users in this channel */
default_permissions?: components["schemas"]["OverrideField"] | null;
/** @description Permissions assigned based on role to this channel */
role_permissions?: {
[key: string]: components["schemas"]["OverrideField"];
};
/** @description Whether this channel is marked as not safe for work */
nsfw?: boolean;
}
| {
/** @enum {string} */
channel_type: "VoiceChannel";
/** @description Unique Id */
_id: string;
/** @description Id of the server this channel belongs to */
server: string;
/** @description Display name of the channel */
name: string;
/** @description Channel description */
description?: string | null;
/** @description Custom icon attachment */
icon?: components["schemas"]["File"] | null;
/** @description Default permissions assigned to users in this channel */
default_permissions?: components["schemas"]["OverrideField"] | null;
/** @description Permissions assigned based on role to this channel */
role_permissions?: {
[key: string]: components["schemas"]["OverrideField"];
};
/** @description Whether this channel is marked as not safe for work */
nsfw?: boolean;
};
/** @description Representation of a single permission override as it appears on models and in the database */
OverrideField: {
/**
* Format: int64
* @description Allow bit flags
*/
a: number;
/**
* Format: int64
* @description Disallow bit flags
*/
d: number;
};
/** Mutual Friends and Servers Response */
MutualResponse: {
/** @description Array of mutual user IDs that both users are friends with */
users: string[];
/** @description Array of mutual server IDs that both users are in */
servers: string[];
};
/** User Lookup Information */
DataSendFriendRequest: {
username: string;
};
/** @description Representation of a bot on Revolt */
Bot: {
/**
* @description Bot Id
*
* This equals the associated bot user's id.
*/
_id: string;
/** @description User Id of the bot owner */
owner: string;
/** @description Token used to authenticate requests for this bot */
token: string;
/** @description Whether the bot is public (may be invited by anyone) */
public: boolean;
/** @description Whether to enable analytics */
analytics?: boolean;
/** @description Whether this bot should be publicly discoverable */
discoverable?: boolean;
/** @description Reserved; URL for handling interactions */
interactions_url?: string | null;
/** @description URL for terms of service */
terms_of_service_url?: string | null;
/** @description URL for privacy policy */
privacy_policy_url?: string | null;
/**
* Format: int32
* @description Enum of bot flags
*/
flags?: number | null;
};
/** Bot Details */
DataCreateBot: {
/** @description Bot username */
name: string;
};
/** Invite Destination */
InviteBotDestination:
| {
/** @description Server Id */
server: string;
}
| {
/** @description Group Id */
group: string;
};
/** Public Bot */
PublicBot: {
/** @description Bot Id */
_id: string;
/** @description Bot Username */
username: string;
/** @description Profile Avatar */
avatar?: components["schemas"]["File"] | null;
/** @description Profile Description */
description?: string | null;
};
/** Bot Response */
BotResponse: {
/** @description Bot object */
bot: components["schemas"]["Bot"];
/** @description User object */
user: components["schemas"]["User"];
};
/**
* Owned Bots Response
* @description Both lists are sorted by their IDs.
*/
OwnedBotsResponse: {
/** @description Bot objects */
bots: components["schemas"]["Bot"][];
/** @description User objects */
users: components["schemas"]["User"][];
};
/** Bot Details */
DataEditBot: {
/** @description Bot username */
name?: string | null;
/** @description Whether the bot can be added by anyone */
public?: boolean | null;
/**
* @description Whether analytics should be gathered for this bot
*
* Must be enabled in order to show up on [Revolt Discover](https://rvlt.gg).
*/
analytics?: boolean | null;
/** @description Interactions URL */
interactions_url?: string | null;
/** @description Fields to remove from bot object */
remove?: components["schemas"]["FieldsBot"][] | null;
};
/**
* @description Optional fields on bot object
* @enum {string}
*/
FieldsBot: "Token" | "InteractionsURL";
/** Channel Details */
DataEditChannel: {
/** @description Channel name */
name?: string | null;
/** @description Channel description */
description?: string | null;
/** @description Group owner */
owner?: string | null;
/**
* @description Icon
*
* Provide an Autumn attachment Id.
*/
icon?: string | null;
/** @description Whether this channel is age-restricted */
nsfw?: boolean | null;
/** @description Whether this channel is archived */
archived?: boolean | null;
remove?: components["schemas"]["FieldsChannel"][] | null;
};
/**
* @description Optional fields on channel object
* @enum {string}
*/
FieldsChannel: "Description" | "Icon" | "DefaultPermissions";
/** @description Representation of an invite to a channel on Revolt */
Invite:
| {
/** @enum {string} */
type: "Server";
/** @description Invite code */
_id: string;
/** @description Id of the server this invite points to */
server: string;
/** @description Id of user who created this invite */
creator: string;
/** @description Id of the server channel this invite points to */
channel: string;
}
| {
/** @enum {string} */
type: "Group";
/** @description Invite code */
_id: string;
/** @description Id of user who created this invite */
creator: string;
/** @description Id of the group channel this invite points to */
channel: string;
};
/** @description Representation of a Message on Revolt */
Message: {
/** @description Unique Id */
_id: string;
/** @description Unique value generated by client sending this message */
nonce?: string | null;
/** @description Id of the channel this message was sent in */
channel: string;
/** @description Id of the user that sent this message */
author: string;
/** @description Message content */
content?: string | null;
/** @description System message */
system?: components["schemas"]["SystemMessage"] | null;
/** @description Array of attachments */
attachments?: components["schemas"]["File"][] | null;
/** @description Time at which this message was last edited */
edited?: components["schemas"]["ISO8601 Timestamp"] | null;
/** @description Attached embeds to this message */
embeds?: components["schemas"]["Embed"][] | null;
/** @description Array of user ids mentioned in this message */
mentions?: string[] | null;
/** @description Array of message ids this message is replying to */
replies?: string[] | null;
/** @description Hashmap of emoji IDs to array of user IDs */
reactions?: { [key: string]: string[] };
/** @description Information about how this message should be interacted with */
interactions?: components["schemas"]["Interactions"];
/** @description Name and / or avatar overrides for this message */
masquerade?: components["schemas"]["Masquerade"] | null;
};
/** @description Representation of a system event message */
SystemMessage:
| {
/** @enum {string} */
type: "text";
content: string;
}
| {
/** @enum {string} */
type: "user_added";
id: string;
by: string;
}
| {
/** @enum {string} */
type: "user_remove";
id: string;
by: string;
}
| {
/** @enum {string} */
type: "user_joined";
id: string;
}
| {
/** @enum {string} */
type: "user_left";
id: string;
}
| {
/** @enum {string} */
type: "user_kicked";
id: string;
}
| {
/** @enum {string} */
type: "user_banned";
id: string;
}
| {
/** @enum {string} */
type: "channel_renamed";
name: string;
by: string;
}
| {
/** @enum {string} */
type: "channel_description_changed";
by: string;
}
| {
/** @enum {string} */
type: "channel_icon_changed";
by: string;
}
| {
/** @enum {string} */
type: "channel_ownership_changed";
from: string;
to: string;
};
/**
* Format: date-time
* @description ISO8601 formatted timestamp
* @example 1970-01-01T00:00:00Z
*/
"ISO8601 Timestamp": string;
/** @description Embed */
Embed:
| {
/** @enum {string} */
type: "Website";
/** @description Direct URL to web page */
url?: string | null;
/** @description Original direct URL */
original_url?: string | null;
/** @description Remote content */
special?: components["schemas"]["Special"] | null;
/** @description Title of website */
title?: string | null;
/** @description Description of website */
description?: string | null;
/** @description Embedded image */
image?: components["schemas"]["Image"] | null;
/** @description Embedded video */
video?: components["schemas"]["Video"] | null;
/** @description Site name */
site_name?: string | null;
/** @description URL to site icon */
icon_url?: string | null;
/** @description CSS Colour */
colour?: string | null;
}
| {
/** @enum {string} */
type: "Image";
/** @description URL to the original image */
url: string;
/**
* Format: int
* @description Width of the image
*/
width: number;
/**
* Format: int
* @description Height of the image
*/
height: number;
/** @description Positioning and size */
size: components["schemas"]["ImageSize"];
}
| {
/** @enum {string} */
type: "Video";
/** @description URL to the original video */
url: string;
/**
* Format: int
* @description Width of the video
*/
width: number;
/**
* Format: int
* @description Height of the video
*/
height: number;
}
| {
/** @enum {string} */
type: "Text";
/** @description URL to icon */
icon_url?: string | null;
/** @description URL for title */
url?: string | null;
/** @description Title of text embed */
title?: string | null;
/** @description Description of text embed */
description?: string | null;
/** @description ID of uploaded autumn file */
media?: components["schemas"]["File"] | null;
/** @description CSS Colour */
colour?: string | null;
}
| {
/** @enum {string} */
type: "None";
};
/** @description Information about special remote content */
Special:
| {
/** @enum {string} */
type: "None";
}
| {
/** @enum {string} */
type: "GIF";
}
| {
/** @enum {string} */
type: "YouTube";
id: string;
timestamp?: string | null;
}
| {
/** @enum {string} */
type: "Lightspeed";
content_type: components["schemas"]["LightspeedType"];
id: string;
}
| {
/** @enum {string} */
type: "Twitch";
content_type: components["schemas"]["TwitchType"];
id: string;
}
| {
/** @enum {string} */
type: "Spotify";
content_type: string;
id: string;
}
| {
/** @enum {string} */
type: "Soundcloud";
}
| {
/** @enum {string} */
type: "Bandcamp";
content_type: components["schemas"]["BandcampType"];
id: string;
}
| {
/** @enum {string} */
type: "Streamable";
id: string;
};
/**
* @description Type of remote Lightspeed.tv content
* @enum {string}
*/
LightspeedType: "Channel";
/**
* @description Type of remote Twitch content
* @enum {string}
*/
TwitchType: "Channel" | "Video" | "Clip";
/**
* @description Type of remote Bandcamp content
* @enum {string}
*/
BandcampType: "Album" | "Track";
/** @description Image */
Image: {
/** @description URL to the original image */
url: string;
/**
* Format: int
* @description Width of the image
*/
width: number;
/**
* Format: int
* @description Height of the image
*/
height: number;
/** @description Positioning and size */
size: components["schemas"]["ImageSize"];
};
/**
* @description Image positioning and size
* @enum {string}
*/
ImageSize: "Large" | "Preview";
/** @description Video */
Video: {
/** @description URL to the original video */
url: string;
/**
* Format: int
* @description Width of the video
*/
width: number;
/**
* Format: int
* @description Height of the video
*/
height: number;
};
/** @description Information to guide interactions on this message */
Interactions: {
/** @description Reactions which should always appear and be distinct */
reactions?: string[] | null;
/**
* @description Whether reactions should be restricted to the given list
*
* Can only be set to true if reactions list is of at least length 1
*/
restrict_reactions?: boolean;
};
/** @description Name and / or avatar override information */
Masquerade: {
/** @description Replace the display name shown on this message */
name?: string | null;
/** @description Replace the avatar shown on this message (URL to image file) */
avatar?: string | null;
/**
* @description Replace the display role colour shown on this message
*
* Must have `ManageRole` permission to use
*/
colour?: string | null;
};
DataMessageSend: {
/**
* @description Unique token to prevent duplicate message sending
*
* **This is deprecated and replaced by `Idempotency-Key`!**
*/
nonce?: string | null;
/** @description Message content to send */
content?: string | null;
/** @description Attachments to include in message */
attachments?: string[] | null;
/** @description Messages to reply to */
replies?: components["schemas"]["Reply"][] | null;
/**
* @description Embeds to include in message
*
* Text embed content contributes to the content length cap
*/
embeds?: components["schemas"]["SendableEmbed"][] | null;
/** @description Masquerade to apply to this message */
masquerade?: components["schemas"]["Masquerade"] | null;
/** @description Information about how this message should be interacted with */
interactions?: components["schemas"]["Interactions"] | null;
};
/**
* Reply
* @description Representation of a message reply before it is sent.
*/
Reply: {
/** @description Message Id */
id: string;
/** @description Whether this reply should mention the message's author */
mention: boolean;
};
/** @description Representation of a text embed before it is sent. */
SendableEmbed: {
icon_url?: string | null;
url?: string | null;
title?: string | null;
description?: string | null;
media?: string | null;
colour?: string | null;
};
/**
* Bulk Message Response
* @description Response used when multiple messages are fetched
*/
BulkMessageResponse:
| components["schemas"]["Message"][]
| {
/** @description List of messages */
messages: components["schemas"]["Message"][];
/** @description List of users */
users: components["schemas"]["User"][];
/** @description List of members */
members?: components["schemas"]["Member"][] | null;
};
/** @description Representation of a member of a server on Revolt */
Member: {
/** @description Unique member id */
_id: components["schemas"]["MemberCompositeKey"];
/** @description Time at which this user joined the server */
joined_at: components["schemas"]["ISO8601 Timestamp"];
/** @description Member's nickname */
nickname?: string | null;
/** @description Avatar attachment */
avatar?: components["schemas"]["File"] | null;
/** @description Member's roles */
roles?: string[];
/** @description Timestamp this member is timed out until */
timeout?: components["schemas"]["ISO8601 Timestamp"] | null;
};
/** @description Composite primary key consisting of server and user id */
MemberCompositeKey: {
/** @description Server Id */
server: string;
/** @description User Id */
user: string;
};
/**
* Message Sort
* @description Sort used for retrieving messages
* @enum {string}
*/
MessageSort: "Relevance" | "Latest" | "Oldest";
/** Search Parameters */
OptionsMessageSearch: {
/**
* @description Full-text search query
*
* See [MongoDB documentation](https://docs.mongodb.com/manual/text-search/#-text-operator) for more information.
*/
query: string;
/**
* Format: int64
* @description Maximum number of messages to fetch
*/
limit?: number | null;
/** @description Message id before which messages should be fetched */
before?: string | null;
/** @description Message id after which messages should be fetched */
after?: string | null;
/**
* @description Message sort direction
*
* By default, it will be sorted by relevance.
* @default Relevance
*/
sort?: components["schemas"]["MessageSort"];
/** @description Whether to include user (and member, if server channel) objects */
include_users?: boolean | null;
};
/** Query Parameters */
OptionsQueryStale: {
/** @description Array of message IDs */
ids: string[];
};
/** Message Details */
DataEditMessage: {
/** @description New message content */
content?: string | null;
/** @description Embeds to include in the message */
embeds?: components["schemas"]["SendableEmbed"][] | null;
};
/** Search Parameters */
OptionsBulkDelete: {
/** @description Message IDs */
ids: string[];
};
/** Group Data */
DataCreateGroup: {
/** @description Group name */
name: string;
/** @description Group description */
description?: string | null;
/**
* @description Array of user IDs to add to the group
*
* Must be friends with these users.
*/
users: string[];
/** @description Whether this group is age-restricted */
nsfw?: boolean | null;
};
/** Voice Server Token Response */
CreateVoiceUserResponse: {
/** @description Token for authenticating with the voice server */
token: string;
};
/** Permission Value */
Data: {
/** @description Allow / deny values to set for this role */
permissions: components["schemas"]["Override"];
};
/** @description Representation of a single permission override */
Override: {
/**
* Format: uint64
* @description Allow bit flags
*/
allow: number;
/**
* Format: uint64
* @description Disallow bit flags
*/
deny: number;
};
/** Permission Value */
DataDefaultChannelPermissions:
| {
/**
* Format: uint64
* @description Permission values to set for members in a `Group`
*/
permissions: number;
}
| {
/** @description Allow / deny values to set for members in this `TextChannel` or `VoiceChannel` */
permissions: components["schemas"]["Override"];
};
/** Create Server Response */
CreateServerResponse: {
/** @description Server object */
server: components["schemas"]["Server"];
/** @description Default channels */
channels: components["schemas"]["Channel"][];
};
/** @description Representation of a server on Revolt */
Server: {
/** @description Unique Id */
_id: string;
/** @description User id of the owner */
owner: string;
/** @description Name of the server */
name: string;
/** @description Description for the server */
description?: string | null;
/** @description Channels within this server */
channels: string[];
/** @description Categories for this server */
categories?: components["schemas"]["Category"][] | null;
/** @description Configuration for sending system event messages */
system_messages?: components["schemas"]["SystemMessageChannels"] | null;
/** @description Roles for this server */
roles?: { [key: string]: components["schemas"]["Role"] };
/**
* Format: int64
* @description Default set of server and channel permissions
*/
default_permissions: number;
/** @description Icon attachment */
icon?: components["schemas"]["File"] | null;
/** @description Banner attachment */
banner?: components["schemas"]["File"] | null;
/**
* Format: int32
* @description Enum of server flags
*/
flags?: number | null;
/** @description Whether this server is flagged as not safe for work */
nsfw?: boolean;
/** @description Whether to enable analytics */
analytics?: boolean;
/** @description Whether this server should be publicly discoverable */
discoverable?: boolean;
};
/** @description Channel category */
Category: {
/** @description Unique ID for this category */
id: string;
/** @description Title for this category */
title: string;
/** @description Channels in this category */
channels: string[];
};
/** @description System message channel assignments */
SystemMessageChannels: {
/** @description ID of channel to send user join messages in */
user_joined?: string | null;
/** @description ID of channel to send user left messages in */
user_left?: string | null;
/** @description ID of channel to send user kicked messages in */
user_kicked?: string | null;
/** @description ID of channel to send user banned messages in */
user_banned?: string | null;
};
/** @description Representation of a server role */
Role: {
/** @description Role name */
name: string;
/** @description Permissions available to this role */
permissions: components["schemas"]["OverrideField"];
/**
* @description Colour used for this role
*
* This can be any valid CSS colour
*/
colour?: string | null;
/** @description Whether this role should be shown separately on the member sidebar */
hoist?: boolean;
/**
* Format: int64
* @description Ranking of this role
*/
rank?: number;
};
/** Server Data */
DataCreateServer: {
/** @description Server name */
name: string;
/** @description Server description */
description?: string | null;
/** @description Whether this server is age-restricted */
nsfw?: boolean | null;
};
/** Server Data */
DataEditServer: {
/** @description Server name */
name?: string | null;
/** @description Server description */
description?: string | null;
/** @description Attachment Id for icon */
icon?: string | null;
/** @description Attachment Id for banner */
banner?: string | null;
/** @description Category structure for server */
categories?: components["schemas"]["Category"][] | null;
/** @description System message configuration */
system_messages?: components["schemas"]["SystemMessageChannels"] | null;
/** @description Whether this server is public and should show up on [Revolt Discover](https://rvlt.gg) */
discoverable?: boolean | null;
/**
* @description Whether analytics should be collected for this server
*
* Must be enabled in order to show up on [Revolt Discover](https://rvlt.gg).
*/
analytics?: boolean | null;
/** @description Fields to remove from server object */
remove?: components["schemas"]["FieldsServer"][] | null;
};
/**
* @description Optional fields on server object
* @enum {string}
*/
FieldsServer:
| "Description"
| "Categories"
| "SystemMessages"
| "Icon"
| "Banner";
/** Channel Data */
DataCreateChannel: {
/**
* @description Channel type
* @default Text
*/
type?: components["schemas"]["ChannelType"];
/** @description Channel name */
name: string;
/** @description Channel description */
description?: string | null;
/** @description Whether this channel is age restricted */
nsfw?: boolean | null;
};
/**
* Channel Type
* @enum {string}
*/
ChannelType: "Text" | "Voice";
/**
* Member List
* @description Both lists are sorted by ID.
*/
AllMemberResponse: {
/** @description List of members */
members: components["schemas"]["Member"][];
/** @description List of users */
users: components["schemas"]["User"][];
};
/** Member Data */
DataMemberEdit: {
/** @description Member nickname */
nickname?: string | null;
/** @description Attachment Id to set for avatar */
avatar?: string | null;
/** @description Array of role ids */
roles?: string[] | null;
/** @description Timestamp this member is timed out until */
timeout?: components["schemas"]["ISO8601 Timestamp"] | null;
/** @description Fields to remove from channel object */
remove?: components["schemas"]["FieldsMember"][] | null;
};
/**
* @description Optional fields on server member object
* @enum {string}
*/
FieldsMember: "Nickname" | "Avatar" | "Roles" | "Timeout";
/** @description Representation of a server ban on Revolt */
ServerBan: {
/** @description Unique member id */
_id: components["schemas"]["MemberCompositeKey"];
/** @description Reason for ban creation */
reason?: string | null;
};
/** Ban Information */
DataBanCreate: {
/** @description Ban reason */
reason?: string | null;
};
/** Ban List Result */
BanListResult: {
/** @description Users objects */
users: components["schemas"]["BannedUser"][];
/** @description Ban objects */
bans: components["schemas"]["ServerBan"][];
};
/**
* Banned User
* @description Just enoguh user information to list bans.
*/
BannedUser: {
/** @description Id of the banned user */
_id: string;
/** @description Username of the banned user */
username: string;
/** @description Avatar of the banned user */
avatar?: components["schemas"]["File"] | null;
};
/** New Role Response */
NewRoleResponse: {
/** @description Id of the role */
id: string;
/** @description New role */
role: components["schemas"]["Role"];
};
/** Role Data */
DataCreateRole: {
/** @description Role name */
name: string;
/**
* Format: int64
* @description Ranking position
*
* Smaller values take priority.
*/
rank?: number | null;
};
/** Role Data */
DataEditRole: {
/** @description Role name */
name?: string | null;
/** @description Role colour */
colour?: string | null;
/** @description Whether this role should be displayed separately */
hoist?: boolean | null;
/**
* Format: int64
* @description Ranking position
*
* Smaller values take priority.
*/
rank?: number | null;
/** @description Fields to remove from role object */
remove?: components["schemas"]["FieldsRole"][] | null;
};
/**
* @description Optional fields on server object
* @enum {string}
*/
FieldsRole: "Colour";
/** Permission Value */
DataSetServerRolePermission: {
/** @description Allow / deny values for the role in this server. */
permissions: components["schemas"]["Override"];
};
/** Permission Value */
DataSetServerDefaultPermission: {
/**
* Format: uint64
* @description Default member permission value
*/
permissions: number;
};
/** @description Representation of an Emoji on Revolt */
Emoji: {
/** @description Unique Id */
_id: string;
/** @description What owns this emoji */
parent: components["schemas"]["EmojiParent"];
/** @description Uploader user id */
creator_id: string;
/** @description Emoji name */
name: string;
/** @description Whether the emoji is animated */
animated?: boolean;
/** @description Whether the emoji is marked as nsfw */
nsfw?: boolean;
};
/** @description Information about what owns this emoji */
EmojiParent:
| {
/** @enum {string} */
type: "Server";
id: string;
}
| {
/** @enum {string} */
type: "Detached";
};
/** Invite */
InviteResponse:
| {
/** @enum {string} */
type: "Server";
/** @description Invite code */
code: string;
/** @description Id of the server */
server_id: string;
/** @description Name of the server */
server_name: string;
/** @description Attachment for server icon */
server_icon?: components["schemas"]["File"] | null;
/** @description Attachment for server banner */
server_banner?: components["schemas"]["File"] | null;
/**
* Format: int32
* @description Enum of server flags
*/
server_flags?: number | null;
/** @description Id of server channel */
channel_id: string;
/** @description Name of server channel */
channel_name: string;
/** @description Description of server channel */
channel_description?: string | null;
/** @description Name of user who created the invite */
user_name: string;
/** @description Avatar of the user who created the invite */
user_avatar?: components["schemas"]["File"] | null;
/**
* Format: int64
* @description Number of members in this server
*/
member_count: number;
}
| {
/** @enum {string} */
type: "Group";
/** @description Invite code */
code: string;
/** @description Id of group channel */
channel_id: string;
/** @description Name of group channel */
channel_name: string;
/** @description Description of group channel */
channel_description?: string | null;
/** @description Name of user who created the invite */
user_name: string;
/** @description Avatar of the user who created the invite */
user_avatar?: components["schemas"]["File"] | null;
};
/** Join Response */
InviteJoinResponse: {
/** @enum {string} */
type: "Server";
/** @description Channels in the server */
channels: components["schemas"]["Channel"][];
/** @description Server we are joining */
server: components["schemas"]["Server"];
};
/** Emoji Data */
DataCreateEmoji: {
/** @description Server name */
name: string;
/** @description Parent information */
parent: components["schemas"]["EmojiParent"];
/** @description Whether the emoji is mature */
nsfw?: boolean;
};
/** @description User-generated platform moderation report. */
Report: (
| {
/** @enum {string} */
status: "Created";
}
| {
/** @enum {string} */
status: "Rejected";
rejection_reason: string;
}
| {
/** @enum {string} */
status: "Resolved";
}
) & {
/** @description Unique Id */
_id: string;
/** @description Id of the user creating this report */
author_id: string;
/** @description Reported content */
content: components["schemas"]["ReportedContent"];
/** @description Additional report context */
additional_context: string;
/** @description Additional notes included on the report */
notes?: string;
};
/** @description The content being reported */
ReportedContent:
| {
/** @enum {string} */
type: "Message";
/** @description ID of the message */
id: string;
/** @description Reason for reporting message */
report_reason: components["schemas"]["ContentReportReason"];
}
| {
/** @enum {string} */
type: "Server";
/** @description ID of the server */
id: string;
/** @description Reason for reporting server */
report_reason: components["schemas"]["ContentReportReason"];
}
| {
/** @enum {string} */
type: "User";
/** @description ID of the user */
id: string;
/** @description Reason for reporting a user */
report_reason: components["schemas"]["UserReportReason"];
};
/**
* @description Reason for reporting content (message or server)
* @enum {string}
*/
ContentReportReason:
| "NoneSpecified"
| "Illegal"
| "PromotesHarm"
| "SpamAbuse"
| "Malware"
| "Harassment";
/**
* @description Reason for reporting a user
* @enum {string}
*/
UserReportReason:
| "NoneSpecified"
| "SpamAbuse"
| "InappropriateProfile"
| "Impersonation"
| "BanEvasion"
| "Underage";
/** Report Data */
DataEditReport: {
/** @description New report status */
status?: components["schemas"]["ReportStatus"] | null;
/** @description Report notes */
notes?: string | null;
};
/** @description Status of the report */
ReportStatus:
| {
/** @enum {string} */
status: "Created";
}
| {
/** @enum {string} */
status: "Rejected";
rejection_reason: string;
}
| {
/** @enum {string} */
status: "Resolved";
};
/** Report Data */
DataReportContent: {
/** @description Content being reported */
content: components["schemas"]["ReportedContent"];
/** @description Additional report description */
additional_context?: string;
};
/** @description Snapshot of some content with required data to render */
SnapshotWithContext: {
/** @description Users involved in snapshot */
_users: components["schemas"]["User"][];
/** @description Channels involved in snapshot */
_channels: components["schemas"]["Channel"][];
/** @description Server involved in snapshot */
_server?: components["schemas"]["Server"] | null;
/** @description Unique Id */
_id: string;
/** @description Report parent Id */
report_id: string;
/** @description Snapshot of content */
content: components["schemas"]["SnapshotContent"];
};
/** @description Enum to map into different models that can be saved in a snapshot */
SnapshotContent:
| {
/** @enum {string} */
_type: "Message";
/**
* @description Context before the message
* @default
*/
_prior_context?: components["schemas"]["Message"][];
/**
* @description Context after the message
* @default
*/
_leading_context?: components["schemas"]["Message"][];
/** @description Unique Id */
_id: string;
/** @description Unique value generated by client sending this message */
nonce?: string | null;
/** @description Id of the channel this message was sent in */
channel: string;
/** @description Id of the user that sent this message */
author: string;
/** @description Message content */
content?: string | null;
/** @description System message */
system?: components["schemas"]["SystemMessage"] | null;
/** @description Array of attachments */
attachments?: components["schemas"]["File"][] | null;
/** @description Time at which this message was last edited */
edited?: components["schemas"]["ISO8601 Timestamp"] | null;
/** @description Attached embeds to this message */
embeds?: components["schemas"]["Embed"][] | null;
/** @description Array of user ids mentioned in this message */
mentions?: string[] | null;
/** @description Array of message ids this message is replying to */
replies?: string[] | null;
/** @description Hashmap of emoji IDs to array of user IDs */
reactions?: { [key: string]: string[] };
/** @description Information about how this message should be interacted with */
interactions?: components["schemas"]["Interactions"];
/** @description Name and / or avatar overrides for this message */
masquerade?: components["schemas"]["Masquerade"] | null;
}
| {
/** @enum {string} */
_type: "Server";
/** @description Unique Id */
_id: string;
/** @description User id of the owner */
owner: string;
/** @description Name of the server */
name: string;
/** @description Description for the server */
description?: string | null;
/** @description Channels within this server */
channels: string[];
/** @description Categories for this server */
categories?: components["schemas"]["Category"][] | null;
/** @description Configuration for sending system event messages */
system_messages?:
| components["schemas"]["SystemMessageChannels"]
| null;
/** @description Roles for this server */
roles?: { [key: string]: components["schemas"]["Role"] };
/**
* Format: int64
* @description Default set of server and channel permissions
*/
default_permissions: number;
/** @description Icon attachment */
icon?: components["schemas"]["File"] | null;
/** @description Banner attachment */
banner?: components["schemas"]["File"] | null;
/**
* Format: int32
* @description Enum of server flags
*/
flags?: number | null;
/** @description Whether this server is flagged as not safe for work */
nsfw?: boolean;
/** @description Whether to enable analytics */
analytics?: boolean;
/** @description Whether this server should be publicly discoverable */
discoverable?: boolean;
}
| {
/** @enum {string} */
_type: "User";
/** @description Unique Id */
_id: string;
/** @description Username */
username: string;
/** @description Avatar attachment */
avatar?: components["schemas"]["File"] | null;
/** @description Relationships with other users */
relations?: components["schemas"]["Relationship"][] | null;
/**
* Format: int32
* @description Bitfield of user badges
*/
badges?: number | null;
/** @description User's current status */
status?: components["schemas"]["UserStatus"] | null;
/** @description User's profile page */
profile?: components["schemas"]["UserProfile"] | null;
/**
* Format: int32
* @description Enum of user flags
*/
flags?: number | null;
/** @description Whether this user is privileged */
privileged?: boolean;
/** @description Bot information */
bot?: components["schemas"]["BotInformation"] | null;
/** @description Current session user's relationship with this user */
relationship?: components["schemas"]["RelationshipStatus"] | null;
/** @description Whether this user is currently online */
online?: boolean | null;
};
/** Error */
"Authifier Error":
| {
/** @enum {string} */
type: "IncorrectData";
with: string;
}
| {
/** @enum {string} */
type: "DatabaseError";
operation: string;
with: string;
}
| {
/** @enum {string} */
type: "InternalError";
}
| {
/** @enum {string} */
type: "OperationFailed";
}
| {
/** @enum {string} */
type: "RenderFail";
}
| {
/** @enum {string} */
type: "MissingHeaders";
}
| {
/** @enum {string} */
type: "CaptchaFailed";
}
| {
/** @enum {string} */
type: "BlockedByShield";
}
| {
/** @enum {string} */
type: "InvalidSession";
}
| {
/** @enum {string} */
type: "UnverifiedAccount";
}
| {
/** @enum {string} */
type: "UnknownUser";
}
| {
/** @enum {string} */
type: "EmailFailed";
}
| {
/** @enum {string} */
type: "InvalidToken";
}
| {
/** @enum {string} */
type: "MissingInvite";
}
| {
/** @enum {string} */
type: "InvalidInvite";
}
| {
/** @enum {string} */
type: "InvalidCredentials";
}
| {
/** @enum {string} */
type: "CompromisedPassword";
}
| {
/** @enum {string} */
type: "ShortPassword";
}
| {
/** @enum {string} */
type: "Blacklisted";
}
| {
/** @enum {string} */
type: "LockedOut";
}
| {
/** @enum {string} */
type: "TotpAlreadyEnabled";
}
| {
/** @enum {string} */
type: "DisallowedMFAMethod";
};
/** Account Data */
DataCreateAccount: {
/** @description Valid email address */
email: string;
/** @description Password */
password: string;
/** @description Invite code */
invite?: string | null;
/** @description Captcha verification code */
captcha?: string | null;
};
/** Resend Information */
DataResendVerification: {
/** @description Email associated with the account */
email: string;
/** @description Captcha verification code */
captcha?: string | null;
};
/** Account Deletion Token */
DataAccountDeletion: {
/** @description Deletion token */
token: string;
};
AccountInfo: {
_id: string;
email: string;
};
/** Change Data */
DataChangePassword: {
/** @description New password */
password: string;
/** @description Current password */
current_password: string;
};
/** Change Data */
DataChangeEmail: {
/** @description Valid email address */
email: string;
/** @description Current password */
current_password: string;
};
ResponseVerify:
| unknown
| {
/** @description Authorised MFA ticket, can be used to log in */
ticket: components["schemas"]["MFATicket"];
};
/** @description Multi-factor auth ticket */
MFATicket: {
/** @description Unique Id */
_id: string;
/** @description Account Id */
account_id: string;
/** @description Unique Token */
token: string;
/** @description Whether this ticket has been validated (can be used for account actions) */
validated: boolean;
/** @description Whether this ticket is authorised (can be used to log a user in) */
authorised: boolean;
/** @description TOTP code at time of ticket creation */
last_totp_code?: string | null;
};
/** Password Reset */
DataPasswordReset: {
/** @description Reset token */
token: string;
/** @description New password */
password: string;
/** @description Whether to logout all sessions */
remove_sessions?: boolean;
};
/** Reset Information */
DataSendPasswordReset: {
/** @description Email associated with the account */
email: string;
/** @description Captcha verification code */
captcha?: string | null;
};
ResponseLogin:
| {
/** @enum {string} */
result: "Success";
/** @description Unique Id */
_id: string;
/** @description User Id */
user_id: string;
/** @description Session token */
token: string;
/** @description Display name */
name: string;
/** @description Web Push subscription */
subscription?: components["schemas"]["WebPushSubscription"] | null;
}
| {
/** @enum {string} */
result: "MFA";
ticket: string;
allowed_methods: components["schemas"]["MFAMethod"][];
}
| {
/** @enum {string} */
result: "Disabled";
user_id: string;
};
/** @description Web Push subscription */
WebPushSubscription: {
endpoint: string;
p256dh: string;
auth: string;
};
/**
* @description MFA method
* @enum {string}
*/
MFAMethod: "Password" | "Recovery" | "Totp";
/** Login Data */
DataLogin:
| {
/** @description Email */
email: string;
/** @description Password */
password: string;
/** @description Friendly name used for the session */
friendly_name?: string | null;
}
| {
/**
* @description Unvalidated or authorised MFA ticket
*
* Used to resolve the correct account
*/
mfa_ticket: string;
/**
* @description Valid MFA response
*
* This will take precedence over the `password` field where applicable
*/
mfa_response?: components["schemas"]["MFAResponse"] | null;
/** @description Friendly name used for the session */
friendly_name?: string | null;
};
/** @description MFA response */
MFAResponse:
| {
password: string;
}
| {
recovery_code: string;
}
| {
totp_code: string;
};
SessionInfo: {
_id: string;
name: string;
};
/** Edit Data */
DataEditSession: {
/** @description Session friendly name */
friendly_name: string;
};
MultiFactorStatus: {
email_otp: boolean;
trusted_handover: boolean;
email_mfa: boolean;
totp_mfa: boolean;
security_key_mfa: boolean;
recovery_active: boolean;
};
/** Totp Secret */
ResponseTotpSecret: {
secret: string;
};
/** Onboarding Status */
DataHello: {
/** @description Whether onboarding is required */
onboarding: boolean;
};
/** New User Data */
DataOnboard: {
/** @description New username which will be used to identify the user on the platform */
username: string;
};
/** Fetch Options */
OptionsFetchSettings: {
/** @description Keys to fetch */
keys: string[];
};
/** @description Representation of the state of a channel from the perspective of a user */
ChannelUnread: {
/** @description Composite key pointing to a user's view of a channel */
_id: components["schemas"]["ChannelCompositeKey"];
/** @description Id of the last message read in this channel by a user */
last_id?: string | null;
/** @description Array of message ids that mention the user */
mentions?: string[] | null;
};
/** @description Composite primary key consisting of channel and user id */
ChannelCompositeKey: {
/** @description Channel Id */
channel: string;
/** @description User Id */
user: string;
};
};
}
export interface operations {
/** Fetch the server configuration for this Revolt instance. */
root_root: {
responses: {
200: {
content: {
"application/json": components["schemas"]["RevoltConfig"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Retrieve your user information. */
fetch_self_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit currently authenticated user. */
edit_user_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditUser"];
};
};
};
/** Retrieve a user's information. */
fetch_user_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Retrieve a user's flags. */
fetch_user_flags_fetch_user_flags: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["FlagResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Change your username. */
change_username_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataChangeUsername"];
};
};
};
/** This returns a default avatar based on the given id. */
get_default_avatar_req: {
parameters: {
path: {
target: string;
};
};
responses: {
/** Default Avatar Picture */
200: {
content: {
"image/png": string;
};
};
};
};
/**
* Retrieve a user's profile data.
*
* Will fail if you do not have permission to access the other user's profile.
*/
fetch_profile_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["UserProfile"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** This fetches your direct messages, including any DM and group DM conversations. */
fetch_dms_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["Channel"][];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/**
* Open a DM with another user.
*
* If the target is oneself, a saved messages channel is returned.
*/
open_dm_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Channel"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Retrieve a list of mutual friends and servers with another user. */
find_mutual_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["MutualResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Accept another user's friend request. */
add_friend_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Denies another user's friend request or removes an existing friend. */
remove_friend_req: {
parameters: {
path: {
target: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Block another user by their id. */
block_user_req: {
parameters: {
path: {
target: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Unblock another user by their id. */
unblock_user_req: {
parameters: {
path: {
target: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Send a friend request to another user. */
send_friend_request_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["User"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataSendFriendRequest"];
};
};
};
/** Create a new Revolt bot. */
create_create_bot: {
responses: {
200: {
content: {
"application/json": components["schemas"]["Bot"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataCreateBot"];
};
};
};
/** Fetch details of a public (or owned) bot by its id. */
fetch_public_fetch_public_bot: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["PublicBot"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Invite a bot to a server or group by its id.` */
invite_invite_bot: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["InviteBotDestination"];
};
};
};
/** Fetch details of a bot you own by its id. */
fetch_fetch_bot: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["BotResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Delete a bot by its id. */
delete_delete_bot: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit bot details by its id. */
edit_edit_bot: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Bot"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditBot"];
};
};
};
/** Fetch all of the bots that you have control over. */
fetch_owned_fetch_owned_bots: {
responses: {
200: {
content: {
"application/json": components["schemas"]["OwnedBotsResponse"];
};
};
/** An error occurred. */
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_ack_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
message: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch channel by its id. */
channel_fetch_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Channel"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Deletes a server channel, leaves a group or closes a group. */
channel_delete_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
query: {
/** Whether to not send a leave message */
leave_silently?: boolean | null;
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit a channel object by its id. */
channel_edit_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Channel"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditChannel"];
};
};
};
/** Retrieves all users who are part of this group. */
members_fetch_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["User"][];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/**
* Creates an invite to this channel.
*
* Channel must be a `TextChannel`.
*/
invite_create_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Invite"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch multiple messages. */
message_query_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
query: {
/**
* Maximum number of messages to fetch
*
* For fetching nearby messages, this is \`(limit + 1)\`.
*/
limit?: number | null;
/** Message id before which messages should be fetched */
before?: string | null;
/** Message id after which messages should be fetched */
after?: string | null;
/** Message sort direction */
sort?: components["schemas"]["MessageSort"] | null;
/**
* Message id to search around
*
* Specifying 'nearby' ignores 'before', 'after' and 'sort'. It will also take half of limit rounded as the limits to each side. It also fetches the message ID specified.
*/
nearby?: string | null;
/** Whether to include user (and member, if server channel) objects */
include_users?: boolean | null;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["BulkMessageResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Sends a message to the given channel. */
message_send_message_send: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
header: {
/** Unique key to prevent duplicate requests */
"Idempotency-Key"?: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Message"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataMessageSend"];
};
};
};
/** This route searches for messages within the given parameters. */
message_search_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["BulkMessageResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["OptionsMessageSearch"];
};
};
};
/**
* 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_query_stale_req: {
parameters: {
path: {
_target: components["schemas"]["Id"];
};
};
responses: {
200: unknown;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["OptionsQueryStale"];
};
};
};
/** Retrieves a message by its id. */
message_fetch_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
msg: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Message"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Delete a message you've sent or one you have permission to delete. */
message_delete_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
msg: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edits a message that you've previously sent. */
message_edit_req: {
parameters: {
path: {
target: string;
msg: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Message"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditMessage"];
};
};
};
/**
* Delete multiple messages you've sent or one you have permission to delete.
*
* This will always require `ManageMessages` permission regardless of whether you own the message or not.
*
* Messages must have been sent within the past 1 week.
*/
message_bulk_delete_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["OptionsBulkDelete"];
};
};
};
/** Create a new group channel. */
group_create_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["Channel"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataCreateGroup"];
};
};
};
/** Adds another user to the group. */
group_add_member_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
member: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Removes a user from the group. */
group_remove_member_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
member: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Asks the voice server for a token to join the call. */
voice_join_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["CreateVoiceUserResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Sets permissions for the specified role in the server. */
permissions_set_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
role_id: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Server"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataSetServerRolePermission"];
};
};
};
/** Sets permissions for the default role in this server. */
permissions_set_default_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Server"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataSetServerDefaultPermission"];
};
};
};
/** React to a given message. */
message_react_react_message: {
parameters: {
path: {
target: components["schemas"]["Id"];
msg: components["schemas"]["Id"];
emoji: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/**
* Remove your own, someone else's or all of a given reaction.
*
* Requires `ManageMessages` if changing others' reactions.
*/
message_unreact_unreact_message: {
parameters: {
path: {
target: components["schemas"]["Id"];
msg: components["schemas"]["Id"];
emoji: components["schemas"]["Id"];
};
query: {
/** Remove a specific user's reaction */
user_id?: string | null;
/** Remove all reactions */
remove_all?: boolean | null;
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/**
* Remove your own, someone else's or all of a given reaction.
*
* Requires `ManageMessages` permission.
*/
message_clear_reactions_clear_reactions: {
parameters: {
path: {
target: components["schemas"]["Id"];
msg: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Create a new server. */
server_create_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["CreateServerResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataCreateServer"];
};
};
};
/** Fetch a server by its id. */
server_fetch_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Server"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Deletes a server if owner otherwise leaves. */
server_delete_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
query: {
/** Whether to not send a leave message */
leave_silently?: boolean | null;
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit a server by its id. */
server_edit_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Server"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditServer"];
};
};
};
/** Mark all channels in a server as read. */
server_ack_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Create a new Text or Voice channel. */
channel_create_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Channel"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataCreateChannel"];
};
};
};
/** Fetch all server members. */
member_fetch_all_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
query: {
/** Whether to exclude offline users */
exclude_offline?: boolean | null;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["AllMemberResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Retrieve a member. */
member_fetch_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
member: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Member"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Removes a member from the server. */
member_remove_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
member: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit a member by their id. */
member_edit_req: {
parameters: {
path: {
server: components["schemas"]["Id"];
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Member"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataMemberEdit"];
};
};
};
/** Ban a user by their id. */
ban_create_req: {
parameters: {
path: {
server: components["schemas"]["Id"];
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["ServerBan"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataBanCreate"];
};
};
};
/** Remove a user's ban. */
ban_remove_req: {
parameters: {
path: {
server: components["schemas"]["Id"];
target: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch all bans on a server. */
ban_list_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["BanListResult"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch all server invites. */
invites_fetch_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Invite"][];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Creates a new server role. */
roles_create_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["NewRoleResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataCreateRole"];
};
};
};
/** Delete a server role by its id. */
roles_delete_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
role_id: string;
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit a role by its id. */
roles_edit_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
role_id: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Role"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditRole"];
};
};
};
/** Fetch all emoji on a server. */
emoji_list_list_emoji: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Emoji"][];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch an invite by its id. */
invite_fetch_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["InviteResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Join an invite by its ID. */
invite_join_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["InviteJoinResponse"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Delete an invite by its id. */
invite_delete_req: {
parameters: {
path: {
target: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch an emoji by its id. */
emoji_fetch_fetch_emoji: {
parameters: {
path: {
id: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Emoji"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Create an emoji by its Autumn upload id. */
emoji_create_create_emoji: {
parameters: {
path: {
id: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Emoji"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataCreateEmoji"];
};
};
};
/** Delete an emoji by its id. */
emoji_delete_delete_emoji: {
parameters: {
path: {
id: components["schemas"]["Id"];
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit a report. */
edit_report_edit_report: {
parameters: {
path: {
report: components["schemas"]["Id"];
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Report"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditReport"];
};
};
};
/** Fetch a report by its ID */
fetch_report_fetch_report: {
parameters: {
path: {
id: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["Report"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch all available reports */
fetch_reports_fetch_reports: {
responses: {
200: {
content: {
"application/json": components["schemas"]["Report"][];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Report a piece of content to the moderation team. */
report_content_report_content: {
responses: {
200: unknown;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataReportContent"];
};
};
};
/** Fetch a snapshot for a given report */
fetch_snapshot_fetch_snapshot: {
parameters: {
path: {
report_id: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["SnapshotWithContext"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Create a new account. */
create_account_create_account: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataCreateAccount"];
};
};
};
/** Resend account creation verification email. */
resend_verification_resend_verification: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataResendVerification"];
};
};
};
/** Schedule an account for deletion by confirming the received token. */
confirm_deletion_confirm_deletion: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataAccountDeletion"];
};
};
};
/** Request to have an account deleted. */
delete_account_delete_account: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch account information from the current session. */
fetch_account_fetch_account: {
responses: {
200: {
content: {
"application/json": components["schemas"]["AccountInfo"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Disable an account. */
disable_account_disable_account: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Change the current account password. */
change_password_change_password: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataChangePassword"];
};
};
};
/** Change the associated account email. */
change_email_change_email: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataChangeEmail"];
};
};
};
/** Verify an email address. */
verify_email_verify_email: {
parameters: {
path: {
code: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["ResponseVerify"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Send an email to reset account password. */
send_password_reset_send_password_reset: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataSendPasswordReset"];
};
};
};
/** Confirm password reset and change the password. */
password_reset_password_reset: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataPasswordReset"];
};
};
};
/** Login to an account. */
login_login: {
responses: {
200: {
content: {
"application/json": components["schemas"]["ResponseLogin"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataLogin"];
};
};
};
/** Delete current session. */
logout_logout: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch all sessions associated with this account. */
fetch_all_fetch_all: {
responses: {
200: {
content: {
"application/json": components["schemas"]["SessionInfo"][];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Delete all active sessions, optionally including current one. */
revoke_all_revoke_all: {
parameters: {
query: {
revoke_self?: boolean | null;
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Delete a specific active session. */
revoke_revoke: {
parameters: {
path: {
id: string;
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Edit current session information. */
edit_edit: {
parameters: {
path: {
id: string;
};
};
responses: {
200: {
content: {
"application/json": components["schemas"]["SessionInfo"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataEditSession"];
};
};
};
/** Create a new MFA ticket or validate an existing one. */
create_ticket_create_ticket: {
responses: {
200: {
content: {
"application/json": components["schemas"]["MFATicket"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["MFAResponse"];
};
};
};
/** Fetch MFA status of an account. */
fetch_status_fetch_status: {
responses: {
200: {
content: {
"application/json": components["schemas"]["MultiFactorStatus"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch recovery codes for an account. */
fetch_recovery_fetch_recovery: {
responses: {
200: {
content: {
"application/json": string[];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Re-generate recovery codes for an account. */
generate_recovery_generate_recovery: {
responses: {
200: {
content: {
"application/json": string[];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Fetch available MFA methods. */
get_mfa_methods_get_mfa_methods: {
responses: {
200: {
content: {
"application/json": components["schemas"]["MFAMethod"][];
};
};
};
};
/** Generate a new secret for TOTP. */
totp_enable_totp_enable: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["MFAResponse"];
};
};
};
/** Generate a new secret for TOTP. */
totp_generate_secret_totp_generate_secret: {
responses: {
200: {
content: {
"application/json": components["schemas"]["ResponseTotpSecret"];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** Disable TOTP 2FA for an account. */
totp_disable_totp_disable: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/** 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. */
hello_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["DataHello"];
};
};
};
};
/** This sets a new username, completes onboarding and allows a user to start using Revolt. */
complete_req: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["DataOnboard"];
};
};
};
/**
* Create a new Web Push subscription.
*
* If an existing subscription exists on this session, it will be removed.
*/
subscribe_req: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["WebPushSubscription"];
};
};
};
/** Remove the Web Push subscription associated with the current session. */
unsubscribe_req: {
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
/**
* 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.
*/
get_settings_req: {
responses: {
200: {
content: {
"application/json": { [key: string]: [number, string] };
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["OptionsFetchSettings"];
};
};
};
/** Upload data to save to settings. */
set_settings_req: {
parameters: {
query: {
/**
* Timestamp of settings change.
*
* Used to avoid feedback loops.
*/
timestamp?: number | null;
};
};
responses: {
/** Success */
204: never;
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
requestBody: {
content: {
"application/json": { [key: string]: string };
};
};
};
/** Fetch information about unread state on channels. */
get_unreads_req: {
responses: {
200: {
content: {
"application/json": components["schemas"]["ChannelUnread"][];
};
};
/** An error occurred. */
default: {
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
}
export interface external {}