✨ Schema interfaces

This commit is contained in:
Flam3rboy
2021-02-06 15:35:02 +01:00
parent 81b59c4012
commit 84d714324a
11 changed files with 206 additions and 88 deletions
+40 -1
View File
@@ -1,3 +1,4 @@
import { EmojiSchema } from "./Emoji";
export declare const ActivitySchema: {
afk: BooleanConstructor;
status: StringConstructor;
@@ -15,7 +16,7 @@ export declare const ActivitySchema: {
$State: StringConstructor;
$emoji: {
name: StringConstructor;
id: BigIntConstructor;
$id: BigIntConstructor;
animated: BooleanConstructor;
};
$party: {
@@ -38,3 +39,41 @@ export declare const ActivitySchema: {
}[];
$since: NumberConstructor;
};
export interface ActivitySchema {
afk: boolean;
status: string;
activities?: [
{
name: string;
type: number;
url?: string;
created_at?: number;
timestamps?: {
start: number;
end: number;
};
application_id?: bigint;
details?: string;
State?: string;
emoji?: EmojiSchema;
party?: {
id?: string;
size?: [number];
};
assets?: {
large_image?: string;
large_text?: string;
small_image?: string;
small_text?: string;
};
secrets?: {
join?: string;
spectate?: string;
match?: string;
};
instance?: boolean;
flags: bigint;
}
];
since?: number;
}
+6 -1
View File
@@ -1,5 +1,10 @@
export declare const EmojiSchema: {
name: StringConstructor;
id: BigIntConstructor;
$id: BigIntConstructor;
animated: BooleanConstructor;
};
export interface EmojiSchema {
name: string;
id?: bigint;
animated: Boolean;
}
+1 -1
View File
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.EmojiSchema = void 0;
exports.EmojiSchema = {
name: String,
id: BigInt,
$id: BigInt,
animated: Boolean,
};
//# sourceMappingURL=Emoji.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../src/Schema/Emoji.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,MAAM;IACV,QAAQ,EAAE,OAAO;CACjB,CAAC"}
{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../src/Schema/Emoji.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;IACX,QAAQ,EAAE,OAAO;CACjB,CAAC"}
+16 -1
View File
@@ -1,3 +1,4 @@
import { ActivitySchema } from "./Activity";
export declare const IdentifySchema: {
token: StringConstructor;
properties: {
@@ -23,7 +24,7 @@ export declare const IdentifySchema: {
$State: StringConstructor;
$emoji: {
name: StringConstructor;
id: BigIntConstructor;
$id: BigIntConstructor;
animated: BooleanConstructor;
};
$party: {
@@ -51,3 +52,17 @@ export declare const IdentifySchema: {
$shard: NumberConstructor[];
$guild_subscriptions: BooleanConstructor;
};
export interface IdentifySchema {
token: string;
properties: {
$$os: string;
$$browser: string;
$$device: string;
};
intents: bigint;
presence?: ActivitySchema;
compress?: boolean;
large_threshold?: number;
shard?: [number];
guild_subscriptions?: boolean;
}
+39 -40
View File
@@ -3,50 +3,49 @@ import { Emoji } from "./Emoji";
import { Member } from "./Member";
import { Role } from "./Role";
export interface Guild {
id: bigint;
name: string;
icon: string;
icon_hash: string;
splash: string;
discovery_splash: string;
owner: boolean;
owner_id: bigint;
permissions: string;
region: string;
afk_channel_id: bigint;
afk_timeout: number;
widget_enabled: boolean;
widget_channel_id: bigint;
verification_level: number;
default_message_notifications: number;
explicit_content_filter: number;
roles: Role[];
emojis: Emoji[];
features: [];
mfa_level: number;
application_id: bigint;
system_channel_id: bigint;
system_channel_flags: number;
rules_channel_id: bigint;
joined_at: number;
large: boolean;
unavailable: boolean;
member_count: number;
voice_states: [];
members: Member[];
channels: Channel[];
presences: [];
max_presences: number;
max_members: number;
vanity_url_code: string;
description: string;
banner: string;
premium_tier: number;
premium_subscription_count: number;
preferred_locale: string;
public_updates_channel_id: bigint;
max_video_channel_users: number;
approximate_member_count: number;
approximate_presence_count: number;
banner: string;
channels: Channel[];
default_message_notifications: number;
description: string;
discovery_splash: string;
emojis: Emoji[];
explicit_content_filter: number;
features: [];
icon: string;
id: bigint;
joined_at: number;
large: boolean;
max_members: number;
max_presences: number;
max_video_channel_users: number;
member_count: number;
members: Member[];
mfa_level: number;
name: string;
owner_id: bigint;
owner: boolean;
permissions: string;
preferred_locale: string;
premium_subscription_count: number;
premium_tier: number;
presences: [];
public_updates_channel_id: bigint;
region: string;
roles: Role[];
rules_channel_id: bigint;
splash: string;
system_channel_flags: number;
system_channel_id: bigint;
unavailable: boolean;
vanity_url_code: string;
verification_level: number;
voice_states: [];
welcome_screen: [];
widget_channel_id: bigint;
widget_enabled: boolean;
}