revolt-api
Advanced tools
Comparing version 0.5.3-alpha.0-patch.0 to 0.5.3-alpha.8-patch.0
{ | ||
"name": "revolt-api", | ||
"version": "0.5.3-alpha.0-patch.0", | ||
"version": "0.5.3-alpha.8-patch.0", | ||
"description": "Revolt API typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -10,3 +10,3 @@ import { body, noContent, parameter, ref, success } from "../openapi/generators.js"; | ||
resource('/account', { | ||
resource('/auth/account', { | ||
get: routeAuthenticated( | ||
@@ -20,3 +20,3 @@ "Fetch Account", | ||
resource('/account/create', { | ||
resource('/auth/account/create', { | ||
post: route( | ||
@@ -56,3 +56,3 @@ "Create Account", | ||
resource('/account/reverify', { | ||
resource('/auth/account/reverify', { | ||
post: route( | ||
@@ -80,3 +80,3 @@ "Resend Verification", | ||
resource('/account/verify/:code', { | ||
resource('/auth/account/verify/:code', { | ||
post: route( | ||
@@ -94,3 +94,3 @@ "Verify Email", | ||
resource('/account/reset_password', { | ||
resource('/auth/account/reset_password', { | ||
post: route( | ||
@@ -140,4 +140,4 @@ "Send Password Reset", | ||
resource('/account/change/password', { | ||
post: routeAuthenticated( | ||
resource('/auth/account/change/password', { | ||
patch: routeAuthenticated( | ||
"Change Password", | ||
@@ -169,4 +169,4 @@ "Change account password.", | ||
resource('/account/change/email', { | ||
post: routeAuthenticated( | ||
resource('/auth/account/change/email', { | ||
patch: routeAuthenticated( | ||
"Change Email", | ||
@@ -200,3 +200,3 @@ "Change account email.", | ||
resource('/session/login', { | ||
resource('/auth/session/login', { | ||
post: route( | ||
@@ -243,3 +243,3 @@ "Login", | ||
resource('/session/logout', { | ||
resource('/auth/session/logout', { | ||
post: routeAuthenticated( | ||
@@ -253,3 +253,3 @@ "Logout", | ||
resource('/session/:session', { | ||
resource('/auth/session/:session', { | ||
patch: routeAuthenticated( | ||
@@ -289,3 +289,3 @@ "Edit Session", | ||
resource('/session/all', { | ||
resource('/auth/session/all', { | ||
get: routeAuthenticated( | ||
@@ -292,0 +292,0 @@ "Fetch Sessions", |
@@ -171,3 +171,4 @@ import { body, noContent, parameter, ref, success } from "../openapi/generators.js"; | ||
...await body("Message to be sent.", schema` | ||
import type { Id, Nonce, AutumnId } from './_common'; | ||
import type { Id, AutumnId } from './_common'; | ||
import type { Masquerade } from './Channels'; | ||
@@ -182,4 +183,2 @@ interface ${'SendMessage'} { | ||
nonce: Nonce; | ||
/** | ||
@@ -204,2 +203,4 @@ * Attachments to include in message. | ||
}[] | ||
masquerade?: Masquerade; | ||
} | ||
@@ -418,3 +419,3 @@ `), | ||
...await body("Group Data", schema` | ||
import { Id, Nonce } from './_common'; | ||
import { Id } from './_common'; | ||
@@ -436,4 +437,2 @@ interface ${'GroupData'} { | ||
nonce: Nonce; | ||
/** | ||
@@ -440,0 +439,0 @@ * Array of user IDs to add to the group. |
@@ -96,3 +96,3 @@ import { body, noContent, parameter, ref, success } from "../openapi/generators.js"; | ||
...await body("Server Data", schema` | ||
import { Id, Nonce } from './_common'; | ||
import { Id } from './_common'; | ||
@@ -118,4 +118,2 @@ interface ${'ServerData'} { | ||
nsfw?: boolean; | ||
nonce: Nonce; | ||
} | ||
@@ -136,3 +134,3 @@ `), | ||
...await body("Channel Data", schema` | ||
import { Id, Nonce } from './_common'; | ||
import { Id } from './_common'; | ||
@@ -163,4 +161,2 @@ interface ${'ChannelData'} { | ||
nsfw?: boolean; | ||
nonce: Nonce; | ||
} | ||
@@ -167,0 +163,0 @@ `), |
@@ -65,2 +65,13 @@ import { body, noContent, parameter, ref, success } from "../openapi/generators.js"; | ||
} | ||
), | ||
get: routeAuthenticated( | ||
"Fetch Self", | ||
"Retrieve your user information.", | ||
{ | ||
...userParams, | ||
...await success( | ||
"User information.", | ||
ref("User") | ||
) | ||
} | ||
) | ||
@@ -137,8 +148,8 @@ }); | ||
get: routeAuthenticated( | ||
"Fetch Mutual Friends", | ||
"Retrieve a list of mutual friends with another user.", | ||
"Fetch Mutual Friends And Servers", | ||
"Retrieve a list of mutual friends and servers with another user.", | ||
{ | ||
...userParams, | ||
...await success( | ||
"Mutual friends.", | ||
"Mutual friends and servers.", | ||
schema` | ||
@@ -150,2 +161,6 @@ interface ${'MutualFriends'} { | ||
users: string[] | ||
/** | ||
* Array of server IDs who both you and the other user are members of. | ||
*/ | ||
servers: string[] | ||
} | ||
@@ -152,0 +167,0 @@ ` |
@@ -6,23 +6,2 @@ import type { Attachment } from "./Autumn" | ||
/** | ||
* Last message sent in channel | ||
*/ | ||
export type LastMessage = { | ||
/** | ||
* Message ID | ||
*/ | ||
_id: Id | ||
/** | ||
* Author ID | ||
*/ | ||
author: Id | ||
/** | ||
* Short content of message | ||
* @maxLength 128 | ||
*/ | ||
short: string | ||
} | ||
/** | ||
* Saved Messages channel has only one participant, the user who created it. | ||
@@ -62,3 +41,6 @@ */ | ||
last_message?: LastMessage | ||
/** | ||
* Id of the last message in this channel | ||
*/ | ||
last_message_id?: Id | ||
} | ||
@@ -94,3 +76,6 @@ | ||
last_message?: LastMessage, | ||
/** | ||
* Id of the last message in this channel | ||
*/ | ||
last_message_id?: Id | ||
@@ -157,3 +142,6 @@ /** | ||
last_message?: string | ||
/** | ||
* Id of the last message in this channel | ||
*/ | ||
last_message_id?: Id | ||
} | ||
@@ -165,4 +153,20 @@ | ||
export type Channel = (SavedMessagesChannel | DirectMessageChannel | GroupChannel | TextChannel | VoiceChannel) & { nonce?: string } | ||
export type Channel = (SavedMessagesChannel | DirectMessageChannel | GroupChannel | TextChannel | VoiceChannel) | ||
/** | ||
* Masquerade displayed for a message. | ||
* Replaces user's name and avatar. | ||
*/ | ||
export type Masquerade = { | ||
/** | ||
* Nickname to display | ||
*/ | ||
name: string | ||
/** | ||
* Avatar URL | ||
*/ | ||
avatar: string | ||
} | ||
export type Message = { | ||
@@ -215,2 +219,4 @@ /** | ||
replies?: Id[] | ||
masquerade?: Masquerade | ||
} | ||
@@ -217,0 +223,0 @@ |
import type { Attachment } from './Autumn'; | ||
import type { Id, Nonce } from './_common'; | ||
import type { Id } from './_common'; | ||
@@ -100,4 +100,2 @@ export type MemberCompositeKey = { | ||
nonce?: Nonce | ||
/** | ||
@@ -161,2 +159,10 @@ * User ID of server owner | ||
nsfw?: boolean | ||
/** | ||
* Server flags | ||
* | ||
* `1`: Official Revolt server | ||
* `2`: Verified community server | ||
*/ | ||
flags?: number | ||
} |
@@ -100,2 +100,9 @@ import type { Attachment } from './Autumn'; | ||
* Bitfield of user's badges | ||
* | ||
* `1`: Developer | ||
* `2`: Translator | ||
* `4`: Supporter | ||
* `8`: Responsible Disclosure | ||
* `16`: Revolt Team | ||
* `256`: Early Adopter | ||
*/ | ||
@@ -119,5 +126,5 @@ badges?: number | ||
* | ||
* `0x1`: Account is suspended | ||
* `0x2`: Account was deleted | ||
* `0x4`: Account is banned | ||
* `1`: Account is suspended | ||
* `2`: Account was deleted | ||
* `4`: Account is banned | ||
*/ | ||
@@ -124,0 +131,0 @@ flags?: number |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
717631
20905