235 lines
7.6 KiB
JavaScript
235 lines
7.6 KiB
JavaScript
// Metro module 13536 (f13537).
|
|
import { RPCCommand, joiEnum } from "./Module13537";
|
|
import { OAuth2Scopes } from "./Module8174";
|
|
let Activity, User, ActionRowComponent, ButtonComponent;
|
|
const r11 = {};
|
|
r11[RPCCommand.INITIATE_IMAGE_UPLOAD] = {
|
|
request: void 0,
|
|
response: (a0) => ({
|
|
image_url: a0.string().required()
|
|
})
|
|
};
|
|
r11[RPCCommand.OPEN_SHARE_MOMENT_DIALOG] = {
|
|
response: void 0,
|
|
request: (a0) => ({
|
|
mediaUrl: a0.string().required().max(1024)
|
|
})
|
|
};
|
|
r11[RPCCommand.AUTHENTICATE] = {
|
|
request: (a0) => ({
|
|
access_token: a0.string().allow(null).optional()
|
|
}),
|
|
response: (a0) => {
|
|
const r3 = {
|
|
access_token: a0.string().required(),
|
|
user: a0.object({
|
|
username: a0.string().required(),
|
|
discriminator: a0.string().required(),
|
|
id: a0.string().required(),
|
|
avatar: a0.string().allow(null),
|
|
public_flags: a0.number().required(),
|
|
global_name: a0.string().allow(null)
|
|
}).required(),
|
|
scopes: null,
|
|
expires: null,
|
|
application: null
|
|
};
|
|
const r46 = a0.array();
|
|
const r49 = a0.string();
|
|
r3.scopes = r46.items(r49.valid.apply(r49, [...joiEnum(OAuth2Scopes)])).required();
|
|
r3.expires = a0.string().required();
|
|
r3.application = a0.object({
|
|
description: a0.string().required(),
|
|
icon: a0.string().allow(null),
|
|
id: a0.string().required(),
|
|
rpc_origins: a0.array().items(a0.string()).optional(),
|
|
name: a0.string().required()
|
|
}).required();
|
|
return r3;
|
|
}
|
|
};
|
|
r11[RPCCommand.GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS] = {
|
|
request: void 0,
|
|
response: (a0) => ({
|
|
participants: a0.array().items(User(a0).keys({
|
|
nickname: a0.string().description("Server nickname. Not unique.")
|
|
}).required()).required()
|
|
})
|
|
};
|
|
r11[RPCCommand.SHARE_INTERACTION] = {
|
|
request: (a0) => {
|
|
const r3 = {
|
|
command: a0.string().required(),
|
|
options: a0.array().items(a0.object({
|
|
name: a0.string().required(),
|
|
value: a0.string().required()
|
|
})),
|
|
content: a0.string().max(2000),
|
|
require_launch_channel: a0.boolean(),
|
|
preview_image: a0.object({
|
|
height: a0.number().required(),
|
|
url: a0.string().required(),
|
|
width: a0.number().required()
|
|
}),
|
|
components: null,
|
|
pid: null
|
|
};
|
|
const r52 = a0.array();
|
|
r3.components = r52.items(a0.object.call(a0, {
|
|
type: a0.number().valid(1).required(),
|
|
components: a0.array().max(5).items(a0.object({
|
|
type: a0.number().valid(2).required(),
|
|
style: a0.number().min(1).max(5).required(),
|
|
label: a0.string().max(80).description("Text that appears on the button"),
|
|
custom_id: a0.string().max(100).description("Developer-defined identifier for the button; max 100 characters")
|
|
}))
|
|
}));
|
|
r3.pid = a0.number();
|
|
return r3;
|
|
},
|
|
response: (a0) => ({
|
|
success: a0.boolean().required()
|
|
})
|
|
};
|
|
r11[RPCCommand.SHARE_LINK] = {
|
|
request: (a0) => ({
|
|
custom_id: a0.string().max(64),
|
|
message: a0.string().max(1000).required(),
|
|
link_id: a0.string().max(64)
|
|
}),
|
|
response: (a0) => ({
|
|
success: a0.boolean().required(),
|
|
didCopyLink: a0.boolean().required(),
|
|
didSendMessage: a0.boolean().required()
|
|
})
|
|
};
|
|
r11[RPCCommand.GET_RELATIONSHIPS] = {
|
|
request: void 0,
|
|
response: (a0) => {
|
|
const r5 = a0.array().required();
|
|
const object = a0.object;
|
|
const r22 = {
|
|
type: a0.number().required(),
|
|
user: User(a0).required(),
|
|
presence: a0.object.call(a0, {
|
|
status: a0.string().required(),
|
|
activity: a0.object.call(a0, {
|
|
session_id: a0.string().optional(),
|
|
type: a0.number().optional(),
|
|
name: a0.string().required(),
|
|
url: a0.string().allow(null).optional(),
|
|
application_id: a0.string().optional(),
|
|
status_display_type: a0.number().optional(),
|
|
state: a0.string().optional(),
|
|
state_url: a0.string().optional(),
|
|
details: a0.string().optional(),
|
|
details_url: a0.string().optional(),
|
|
emoji: a0.object({
|
|
name: a0.string().required(),
|
|
id: a0.string().allow(null).optional(),
|
|
animated: a0.bool().optional().allow(null)
|
|
}).allow(null).optional(),
|
|
assets: a0.object({
|
|
large_image: a0.string().optional(),
|
|
large_text: a0.string().optional(),
|
|
large_url: a0.string().optional(),
|
|
small_image: a0.string().optional(),
|
|
small_text: a0.string().optional(),
|
|
small_url: a0.string().optional()
|
|
}).optional(),
|
|
timestamps: a0.object({
|
|
start: a0.number().optional(),
|
|
end: a0.number().optional()
|
|
}).optional(),
|
|
party: a0.object({
|
|
id: a0.string().optional(),
|
|
size: a0.array().items(a0.number()).length(2).optional(),
|
|
privacy: a0.number().optional()
|
|
}).optional(),
|
|
secrets: a0.object({
|
|
match: a0.string().optional(),
|
|
join: a0.string().optional()
|
|
}).optional(),
|
|
sync_id: a0.string().optional(),
|
|
created_at: a0.number().optional(),
|
|
instance: a0.bool().optional(),
|
|
flags: a0.number().optional(),
|
|
metadata: a0.object().optional(),
|
|
platform: a0.string().optional(),
|
|
supported_platforms: a0.array().items(a0.string()).optional(),
|
|
buttons: a0.array().items(a0.string()).optional(),
|
|
hangStatus: a0.string().optional()
|
|
}).allow(null)
|
|
})
|
|
};
|
|
return {
|
|
relationships: r5.items(object.call(a0, r22))
|
|
};
|
|
}
|
|
};
|
|
r11[RPCCommand.INVITE_USER_EMBEDDED] = {
|
|
request: (a0) => ({
|
|
user_id: a0.string().required(),
|
|
content: a0.string().min(0).max(1024)
|
|
}),
|
|
response: void 0
|
|
};
|
|
r11[RPCCommand.GET_USER] = {
|
|
request: (a0) => ({
|
|
id: a0.string().max(64).required()
|
|
}),
|
|
response: (a0) => User(a0).allow(null)
|
|
};
|
|
r11[RPCCommand.GET_QUEST_ENROLLMENT_STATUS] = {
|
|
request: (a0) => ({
|
|
quest_id: a0.string().required()
|
|
}),
|
|
response: (a0) => ({
|
|
quest_id: a0.string().required(),
|
|
is_enrolled: a0.boolean().required(),
|
|
enrolled_at: a0.string().allow(null).optional()
|
|
})
|
|
};
|
|
r11[RPCCommand.QUEST_START_TIMER] = {
|
|
request: (a0) => ({
|
|
quest_id: a0.string().required()
|
|
}),
|
|
response: (a0) => ({
|
|
success: a0.boolean().required()
|
|
})
|
|
};
|
|
r11[RPCCommand.GET_QUEST] = {
|
|
request: void 0,
|
|
response: (a0) => ({
|
|
quest_id: a0.string().required(),
|
|
enrolled_at: a0.string().allow(null).optional(),
|
|
completed_at: a0.string().allow(null).optional(),
|
|
external_cta_url: a0.string().required()
|
|
})
|
|
};
|
|
r11[RPCCommand.REQUEST_PROXY_TICKET_REFRESH] = {
|
|
request: void 0,
|
|
response: (a0) => ({
|
|
ticket: a0.string().required()
|
|
})
|
|
};
|
|
Activity = (a0) => {};
|
|
User = (a0) => a0.object({
|
|
id: a0.string().required().description("User ID"),
|
|
username: a0.string().required(),
|
|
global_name: a0.string().allow(null).description("Global Discord name. Not unique."),
|
|
discriminator: a0.string().required().description("Global name discriminator. Will be 0 if a unique username"),
|
|
avatar: a0.string().allow(null).description("User Avatar ID"),
|
|
flags: a0.number().required().description("Public user flags"),
|
|
bot: a0.bool().required().description("If a bot user."),
|
|
avatar_decoration_data: a0.object({
|
|
asset: a0.string().allow(null),
|
|
skuId: a0.string(),
|
|
expiresAt: a0.number()
|
|
}).allow(null).description("Details about avatar decoration"),
|
|
premium_type: a0.number().allow(null).description("Nitro premium type")
|
|
}).description("Discord User");
|
|
ActionRowComponent = (a0) => {};
|
|
ButtonComponent = (a0) => {};
|
|
export { r11 as RPCCommandSchemas };
|