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

x/revolt_api/schema.ts>components

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

Properties

schemas: { RevoltConfig: { revolt: string; features: components["schemas"]["RevoltFeatures"]; ws: string; app: string; vapid: string; }; RevoltFeatures: { captcha: components["schemas"]["CaptchaFeature"]; email: boolean; invite_only: boolean; autumn: components["schemas"]["Feature"]; january: components["schemas"]["Feature"]; voso: components["schemas"]["VoiceFeature"]; }; CaptchaFeature: { enabled: boolean; key: string; }; Feature: { enabled: boolean; url: string; }; VoiceFeature: { enabled: boolean; url: string; ws: string; }; Permission:
| "ManageChannel"
| "ManageServer"
| "ManagePermissions"
| "ManageRole"
| "KickMembers"
| "BanMembers"
| "TimeoutMembers"
| "AssignRoles"
| "ChangeNickname"
| "ManageNicknames"
| "ChangeAvatar"
| "RemoveAvatars"
| "ViewChannel"
| "ReadMessageHistory"
| "SendMessage"
| "ManageMessages"
| "ManageWebhooks"
| "InviteOthers"
| "SendEmbeds"
| "UploadFiles"
| "Masquerade"
| "Connect"
| "Speak"
| "Video"
| "MuteMembers"
| "DeafenMembers"
| "MoveMembers"
| "GrantAllSafe"
| "GrantAll"
; UserPermission:
| "Access"
| "ViewProfile"
| "SendMessage"
| "Invite"
; Error:
| { type: "LabelMe"; }
| { type: "AlreadyOnboarded"; }
| { type: "UsernameTaken"; }
| { type: "UnknownUser"; }
| { type: "AlreadyFriends"; }
| { type: "AlreadySentRequest"; }
| { type: "Blocked"; }
| { type: "BlockedByOther"; }
| { type: "NotFriends"; }
| { type: "UnknownChannel"; }
| { type: "UnknownAttachment"; }
| { type: "UnknownMessage"; }
| { type: "CannotEditMessage"; }
| { type: "CannotJoinCall"; }
| { type: "TooManyAttachments"; }
| { type: "TooManyReplies"; }
| { type: "EmptyMessage"; }
| { type: "CannotRemoveYourself"; }
| { type: "GroupTooLarge"; max: number; }
| { type: "AlreadyInGroup"; }
| { type: "NotInGroup"; }
| { type: "UnknownServer"; }
| { type: "InvalidRole"; }
| { type: "Banned"; }
| { type: "TooManyServers"; max: number; }
| { type: "ReachedMaximumBots"; }
| { type: "IsBot"; }
| { type: "BotIsPrivate"; }
| { type: "MissingPermission"; permission: components["schemas"]["Permission"]; }
| { type: "MissingUserPermission"; permission: components["schemas"]["UserPermission"]; }
| { type: "NotElevated"; }
| { type: "CannotGiveMissingPermissions"; }
| { type: "DatabaseError"; operation: string; with: string; }
| { type: "InternalError"; }
| { type: "InvalidOperation"; }
| { type: "InvalidCredentials"; }
| { type: "InvalidSession"; }
| { type: "DuplicateNonce"; }
| { type: "VosoUnavailable"; }
| { type: "NotFound"; }
| { type: "NoEffect"; }
| { type: "FailedValidation"; }
; User: { _id: string; username: string; avatar?: components["schemas"]["File"] | null; relations?: components["schemas"]["Relationship"][] | null; badges?: number | null; status?: components["schemas"]["UserStatus"] | null; profile?: components["schemas"]["UserProfile"] | null; flags?: number | null; bot?: components["schemas"]["BotInformation"] | null; relationship?: components["schemas"]["RelationshipStatus"] | null; online?: boolean | null; }; File: { _id: string; tag: string; filename: string; metadata: components["schemas"]["Metadata"]; content_type: string; size: number; deleted?: boolean | null; reported?: boolean | null; message_id?: string | null; user_id?: string | null; server_id?: string | null; object_id?: string | null; }; Metadata:
| { type: "File"; }
| { type: "Text"; }
| { type: "Image"; width: number; height: number; }
| { type: "Video"; width: number; height: number; }
| { type: "Audio"; }
; Relationship: { _id: string; status: components["schemas"]["RelationshipStatus"]; }; RelationshipStatus:
| "None"
| "User"
| "Friend"
| "Outgoing"
| "Incoming"
| "Blocked"
| "BlockedOther"
; UserStatus: { text?: string | null; presence?: components["schemas"]["Presence"] | null; }; Presence:
| "Online"
| "Idle"
| "Busy"
| "Invisible"
; UserProfile: { content?: string | null; background?: components["schemas"]["File"] | null; }; BotInformation: { owner: string; }; Id: string; DataEditUser: { status?: components["schemas"]["UserStatus"] | null; profile?: components["schemas"]["UserProfileData"] | null; avatar?: string | null; remove?: components["schemas"]["FieldsUser"][] | null; }; UserProfileData: { content?: string | null; background?: string | null; }; FieldsUser:
| "Avatar"
| "StatusText"
| "StatusPresence"
| "ProfileContent"
| "ProfileBackground"
; DataChangeUsername: { username: string; password: string; }; Channel:
| { channel_type: "SavedMessages"; _id: string; user: string; }
| { channel_type: "DirectMessage"; _id: string; active: boolean; recipients: string[]; last_message_id?: string | null; }
| { channel_type: "Group"; _id: string; name: string; owner: string; description?: string | null; recipients: string[]; icon?: components["schemas"]["File"] | null; last_message_id?: string | null; permissions?: number | null; nsfw?: boolean; }
| { channel_type: "TextChannel"; _id: string; server: string; name: string; description?: string | null; icon?: components["schemas"]["File"] | null; last_message_id?: string | null; default_permissions?: components["schemas"]["OverrideField"] | null; role_permissions?: { [key: string]: components["schemas"]["OverrideField"]; }; nsfw?: boolean; }
| { channel_type: "VoiceChannel"; _id: string; server: string; name: string; description?: string | null; icon?: components["schemas"]["File"] | null; default_permissions?: components["schemas"]["OverrideField"] | null; role_permissions?: { [key: string]: components["schemas"]["OverrideField"]; }; nsfw?: boolean; }
; OverrideField: { a: number; d: number; r?: number | null; }; MutualResponse: { users: string[]; servers: string[]; }; Bot: { _id: string; owner: string; token: string; public: boolean; analytics?: boolean; discoverable?: boolean; interactions_url?: string | null; }; DataCreateBot: { name: string; }; InviteBotDestination: Partial<{ server: string; }> & Partial<{ group: string; }>; PublicBot: { _id: string; username: string; avatar?: components["schemas"]["File"] | null; description?: string | null; }; BotResponse: { bot: components["schemas"]["Bot"]; user: components["schemas"]["User"]; }; OwnedBotsResponse: { bots: components["schemas"]["Bot"][]; users: components["schemas"]["User"][]; }; DataEditBot: { name?: string | null; public?: boolean | null; analytics?: boolean | null; interactions_url?: string | null; remove?: components["schemas"]["FieldsBot"][] | null; }; FieldsBot: "Token" | "InteractionsURL"; DataEditChannel: { name?: string | null; description?: string | null; icon?: string | null; nsfw?: boolean | null; remove?: components["schemas"]["FieldsChannel"][] | null; }; FieldsChannel: "Description" | "Icon" | "DefaultPermissions"; Invite: { type: "Server"; _id: string; server: string; creator: string; channel: string; } | { type: "Group"; _id: string; creator: string; channel: string; }; Message: { _id: string; nonce?: string | null; channel: string; author: string; content?: string | null; system?: components["schemas"]["SystemMessage"] | null; attachments?: components["schemas"]["File"][] | null; edited?: components["schemas"]["ISO8601 Timestamp"] | null; embeds?: components["schemas"]["Embed"][] | null; mentions?: string[] | null; replies?: string[] | null; masquerade?: components["schemas"]["Masquerade"] | null; }; SystemMessage:
| { type: "text"; content: string; }
| { type: "user_added"; id: string; by: string; }
| { type: "user_remove"; id: string; by: string; }
| { type: "user_joined"; id: string; }
| { type: "user_left"; id: string; }
| { type: "user_kicked"; id: string; }
| { type: "user_banned"; id: string; }
| { type: "channel_renamed"; name: string; by: string; }
| { type: "channel_description_changed"; by: string; }
| { type: "channel_icon_changed"; by: string; }
; ISO8601 Timestamp: string; Embed:
| { type: "Website"; url?: string | null; special?: components["schemas"]["Special"] | null; title?: string | null; description?: string | null; image?: components["schemas"]["Image"] | null; video?: components["schemas"]["Video"] | null; site_name?: string | null; icon_url?: string | null; colour?: string | null; }
| { type: "Image"; url: string; width: number; height: number; size: components["schemas"]["ImageSize"]; }
| { type: "Text"; icon_url?: string | null; url?: string | null; title?: string | null; description?: string | null; media?: components["schemas"]["File"] | null; colour?: string | null; }
| { type: "None"; }
; Special:
| { type: "None"; }
| { type: "YouTube"; id: string; timestamp?: string | null; }
| { type: "Twitch"; content_type: components["schemas"]["TwitchType"]; id: string; }
| { type: "Spotify"; content_type: string; id: string; }
| { type: "Soundcloud"; }
| { type: "Bandcamp"; content_type: components["schemas"]["BandcampType"]; id: string; }
; TwitchType: "Channel" | "Video" | "Clip"; BandcampType: "Album" | "Track"; Image: { url: string; width: number; height: number; size: components["schemas"]["ImageSize"]; }; ImageSize: "Large" | "Preview"; Video: { url: string; width: number; height: number; }; Masquerade: { name?: string | null; avatar?: string | null; }; DataMessageSend: { nonce?: string | null; content?: string | null; attachments?: string[] | null; replies?: components["schemas"]["Reply"][] | null; embeds?: components["schemas"]["SendableEmbed"][] | null; masquerade?: components["schemas"]["Masquerade"] | null; }; Reply: { id: string; mention: boolean; }; SendableEmbed: { icon_url?: string | null; url?: string | null; title?: string | null; description?: string | null; media?: string | null; colour?: string | null; }; BulkMessageResponse: Partial<components["schemas"]["Message"][]> & Partial<{ messages: components["schemas"]["Message"][]; users: components["schemas"]["User"][]; members?: components["schemas"]["Member"][] | null; }>; Member: { _id: components["schemas"]["MemberCompositeKey"]; nickname?: string | null; avatar?: components["schemas"]["File"] | null; roles?: string[] | null; }; MemberCompositeKey: { server: string; user: string; }; MessageSort: "Relevance" | "Latest" | "Oldest"; OptionsMessageSearch: { query: string; limit?: number | null; before?: string | null; after?: string | null; sort?: components["schemas"]["MessageSort"]; include_users?: boolean | null; }; OptionsQueryStale: { ids: string[]; }; DataEditMessage: { content?: string | null; embeds?: components["schemas"]["SendableEmbed"][] | null; }; DataCreateGroup: { name: string; description?: string | null; users: string[]; nsfw?: boolean | null; }; CreateVoiceUserResponse: { token: string; }; Data: { permissions: components["schemas"]["Override"]; }; Override: { allow: number; deny: number; rank?: number | null; }; DataDefaultChannelPermissions: Partial<{ permissions: number; }> & Partial<{ permissions: components["schemas"]["Override"]; }>; CreateServerResponse: { server: components["schemas"]["Server"]; channels: components["schemas"]["Channel"][]; }; Server: { _id: string; owner: string; name: string; description?: string | null; channels: string[]; categories?: components["schemas"]["Category"][] | null; system_messages?: components["schemas"]["SystemMessageChannels"] | null; roles?: { [key: string]: components["schemas"]["Role"]; }; default_permissions: number; icon?: components["schemas"]["File"] | null; banner?: components["schemas"]["File"] | null; flags?: number | null; nsfw?: boolean; analytics?: boolean; discoverable?: boolean; }; Category: { id: string; title: string; channels: string[]; }; SystemMessageChannels: { user_joined?: string | null; user_left?: string | null; user_kicked?: string | null; user_banned?: string | null; }; Role: { name: string; permissions: components["schemas"]["OverrideField"]; colour?: string | null; hoist?: boolean; rank?: number; }; DataCreateServer: { name: string; description?: string | null; nsfw?: boolean | null; }; DataEditServer: { name?: string | null; description?: string | null; icon?: string | null; banner?: string | null; categories?: components["schemas"]["Category"][] | null; system_messages?: components["schemas"]["SystemMessageChannels"] | null; analytics?: boolean | null; remove?: components["schemas"]["FieldsServer"][] | null; }; FieldsServer:
| "Description"
| "Categories"
| "SystemMessages"
| "Icon"
| "Banner"
; DataCreateChannel: { type?: components["schemas"]["ChannelType"]; name: string; description?: string | null; nsfw?: boolean | null; }; ChannelType: "Text" | "Voice"; AllMemberResponse: { members: components["schemas"]["Member"][]; users: components["schemas"]["User"][]; }; DataMemberEdit: { nickname?: string | null; avatar?: string | null; roles?: string[] | null; remove?: components["schemas"]["FieldsMember"][] | null; }; FieldsMember: "Nickname" | "Avatar" | "Roles"; ServerBan: { _id: components["schemas"]["MemberCompositeKey"]; reason?: string | null; }; DataBanCreate: { reason?: string | null; }; BanListResult: { users: components["schemas"]["BannedUser"][]; bans: components["schemas"]["ServerBan"][]; }; BannedUser: { _id: string; username: string; avatar?: components["schemas"]["File"] | null; }; NewRoleResponse: { id: string; role: components["schemas"]["Role"]; }; DataCreateRole: { name: string; rank?: number | null; }; DataEditRole: { name?: string | null; colour?: string | null; hoist?: boolean | null; rank?: number | null; remove?: components["schemas"]["FieldsRole"][] | null; }; FieldsRole: "Colour"; DataSetServerRolePermission: { permissions: components["schemas"]["Override"]; }; DataSetServerDefaultPermission: { permissions: number; }; InviteResponse: { type: "Server"; code: string; server_id: string; server_name: string; server_icon?: components["schemas"]["File"] | null; server_banner?: components["schemas"]["File"] | null; channel_id: string; channel_name: string; channel_description?: string | null; user_name: string; user_avatar?: components["schemas"]["File"] | null; member_count: number; } | { type: "Group"; code: string; channel_id: string; channel_name: string; channel_description?: string | null; user_name: string; user_avatar?: components["schemas"]["File"] | null; }; InviteJoinResponse: { type: "Server"; channels: components["schemas"]["Channel"][]; server: components["schemas"]["Server"]; }; DataCreateAccount: { email: string; password: string; invite?: string | null; captcha?: string | null; }; DataResendVerification: { email: string; captcha?: string | null; }; AccountInfo: { _id: string; email: string; }; DataChangePassword: { password: string; current_password: string; }; DataChangeEmail: { email: string; current_password: string; }; DataPasswordReset: { token: string; password: string; }; DataSendPasswordReset: { email: string; captcha?: string | null; }; ResponseLogin: { result: "Success"; _id?: string | null; user_id: string; token: string; name: string; subscription?: components["schemas"]["WebPushSubscription"] | null; } | { result: "EmailOTP"; } | { result: "MFA"; ticket: string; allowed_methods: string[]; }; WebPushSubscription: { endpoint: string; p256dh: string; auth: string; }; DataLogin: { email: string; password?: string | null; challenge?: string | null; friendly_name?: string | null; captcha?: string | null; }; SessionInfo: { _id: string; name: string; }; Session: { _id?: string | null; user_id: string; token: string; name: string; subscription?: components["schemas"]["WebPushSubscription"] | null; }; DataEditSession: { friendly_name: string; }; DataHello: { onboarding: boolean; }; DataOnboard: { username: string; }; OptionsFetchSettings: { keys: string[]; }; ChannelUnread: { _id: components["schemas"]["ChannelCompositeKey"]; last_id?: string | null; mentions?: string[] | null; }; ChannelCompositeKey: { channel: string; user: string; }; }