@duque.edits/sdk 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{v1/index.ts → dist/index.d.ts} +27 -30
- package/dist/index.js +43 -0
- package/dist/managers/bet/GuildBetManager.d.ts +32 -0
- package/dist/managers/bet/GuildBetManager.js +107 -0
- package/dist/managers/betuser/GuildBetUserManager.d.ts +30 -0
- package/dist/managers/betuser/GuildBetUserManager.js +94 -0
- package/dist/managers/channel/ChannelManager.d.ts +39 -0
- package/dist/managers/channel/ChannelManager.js +147 -0
- package/dist/managers/groupedchannel/GroupedChannelManager.d.ts +34 -0
- package/dist/managers/groupedchannel/GroupedChannelManager.js +92 -0
- package/dist/managers/guild/GuildManager.d.ts +24 -0
- package/dist/managers/guild/GuildManager.js +75 -0
- package/dist/managers/match/GuildMatchManager.d.ts +32 -0
- package/dist/managers/match/GuildMatchManager.js +103 -0
- package/dist/managers/mediator/GuildMediatorManager.d.ts +32 -0
- package/dist/managers/mediator/GuildMediatorManager.js +97 -0
- package/dist/managers/messages/MessagesManager.d.ts +32 -0
- package/dist/managers/messages/MessagesManager.js +82 -0
- package/dist/managers/permission/GuildPermissionManager.d.ts +26 -0
- package/dist/managers/permission/GuildPermissionManager.js +70 -0
- package/dist/managers/product/GuildProductManager.d.ts +32 -0
- package/dist/managers/product/GuildProductManager.js +102 -0
- package/dist/managers/ticket/GuildTicketManager.d.ts +32 -0
- package/dist/managers/ticket/GuildTicketManager.js +99 -0
- package/dist/managers/user/GuildUserManager.d.ts +32 -0
- package/dist/managers/user/GuildUserManager.js +106 -0
- package/dist/rest/APIEndpoints.d.ts +11 -0
- package/dist/rest/APIEndpoints.js +12 -0
- package/dist/rest/REST.d.ts +51 -0
- package/dist/rest/REST.js +96 -0
- package/dist/rest/Routes.d.ts +84 -0
- package/dist/rest/Routes.js +89 -0
- package/dist/structures/Collection.d.ts +17 -0
- package/dist/structures/Collection.js +87 -0
- package/dist/structures/bet/GuildBet.d.ts +86 -0
- package/dist/structures/bet/GuildBet.js +276 -0
- package/dist/structures/betuser/GuildBetUser.d.ts +82 -0
- package/dist/structures/betuser/GuildBetUser.js +194 -0
- package/dist/structures/channel/Channel.d.ts +31 -0
- package/dist/structures/channel/Channel.js +57 -0
- package/dist/structures/groupedchannel/GroupedChannel.d.ts +34 -0
- package/dist/structures/groupedchannel/GroupedChannel.js +121 -0
- package/dist/structures/guild/Guild.d.ts +90 -0
- package/dist/structures/guild/Guild.js +254 -0
- package/dist/structures/match/GuildMatch.d.ts +84 -0
- package/dist/structures/match/GuildMatch.js +327 -0
- package/dist/structures/mediator/GuildMediator.d.ts +41 -0
- package/dist/structures/mediator/GuildMediator.js +131 -0
- package/dist/structures/product/GuildProduct.d.ts +52 -0
- package/dist/structures/product/GuildProduct.js +175 -0
- package/dist/structures/shop/GuildShop.d.ts +34 -0
- package/dist/structures/shop/GuildShop.js +80 -0
- package/dist/structures/ticket/GuildTicket.d.ts +51 -0
- package/dist/structures/ticket/GuildTicket.js +170 -0
- package/dist/structures/user/GuildUser.d.ts +82 -0
- package/dist/structures/user/GuildUser.js +208 -0
- package/dist/types/api/APIBaseChannel.d.ts +10 -0
- package/dist/types/api/APIBaseChannel.js +2 -0
- package/dist/types/api/APIBetChannel.d.ts +10 -0
- package/dist/types/api/APIBetChannel.js +2 -0
- package/dist/types/api/APIBetMessage.d.ts +10 -0
- package/dist/types/api/APIBetMessage.js +2 -0
- package/dist/types/api/APIGuild.d.ts +93 -0
- package/dist/types/api/APIGuild.js +2 -0
- package/dist/types/api/APIGuildBet.d.ts +48 -0
- package/dist/types/api/APIGuildBet.js +2 -0
- package/dist/types/api/APIGuildBetUser.d.ts +32 -0
- package/dist/types/api/APIGuildBetUser.js +2 -0
- package/dist/types/api/APIGuildChannel.d.ts +10 -0
- package/dist/types/api/APIGuildChannel.js +2 -0
- package/dist/types/api/APIGuildEmoji.d.ts +12 -0
- package/dist/types/api/APIGuildEmoji.js +2 -0
- package/dist/types/api/APIGuildGroupedChannel.d.ts +10 -0
- package/dist/types/api/APIGuildGroupedChannel.js +2 -0
- package/dist/types/api/APIGuildMatch.d.ts +46 -0
- package/dist/types/api/APIGuildMatch.js +2 -0
- package/dist/types/api/APIGuildMediator.d.ts +13 -0
- package/dist/types/api/APIGuildMediator.js +3 -0
- package/dist/types/api/APIGuildMessage.d.ts +10 -0
- package/dist/types/api/APIGuildMessage.js +2 -0
- package/dist/types/api/APIGuildPermissions.d.ts +6 -0
- package/dist/types/api/APIGuildPermissions.js +2 -0
- package/dist/types/api/APIGuildRole.d.ts +10 -0
- package/dist/types/api/APIGuildRole.js +2 -0
- package/dist/types/api/APIGuildShop.d.ts +11 -0
- package/dist/types/api/APIGuildShop.js +2 -0
- package/dist/types/api/APIGuildTicket.d.ts +25 -0
- package/dist/types/api/APIGuildTicket.js +3 -0
- package/dist/types/api/APIGuildUser.d.ts +31 -0
- package/dist/types/api/APIGuildUser.js +2 -0
- package/dist/types/api/APIMessage.d.ts +12 -0
- package/dist/types/api/APIMessage.js +2 -0
- package/dist/types/api/APIPlayer.d.ts +10 -0
- package/dist/types/api/APIPlayer.js +2 -0
- package/dist/types/api/APIProduct.d.ts +19 -0
- package/dist/types/api/APIProduct.js +3 -0
- package/dist/types/api/index.d.ts +130 -0
- package/dist/types/api/index.js +35 -0
- package/{v1/types/index.ts → dist/types/index.d.ts} +21 -24
- package/dist/types/index.js +37 -0
- package/dist/utils/Assertion.d.ts +32 -0
- package/dist/utils/Assertion.js +60 -0
- package/package.json +15 -1
- package/.gitattributes +0 -2
- package/tests/index.ts +0 -86
- package/tsconfig.json +0 -15
- package/v1/managers/bet/GuildBetManager.ts +0 -117
- package/v1/managers/betuser/GuildBetUserManager.ts +0 -103
- package/v1/managers/channel/ChannelManager.ts +0 -168
- package/v1/managers/groupedchannel/GroupedChannelManager.ts +0 -117
- package/v1/managers/guild/GuildManager.ts +0 -84
- package/v1/managers/match/GuildMatchManager.ts +0 -115
- package/v1/managers/mediator/GuildMediatorManager.ts +0 -111
- package/v1/managers/messages/MessagesManager.ts +0 -95
- package/v1/managers/permission/GuildPermissionManager.ts +0 -88
- package/v1/managers/product/GuildProductManager.ts +0 -115
- package/v1/managers/ticket/GuildTicketManager.ts +0 -112
- package/v1/managers/user/GuildUserManager.ts +0 -116
- package/v1/rest/APIEndpoints.ts +0 -11
- package/v1/rest/REST.ts +0 -126
- package/v1/rest/Routes.ts +0 -143
- package/v1/structures/Collection.ts +0 -85
- package/v1/structures/bet/GuildBet.ts +0 -332
- package/v1/structures/betuser/GuildBetUser.ts +0 -247
- package/v1/structures/channel/Channel.ts +0 -78
- package/v1/structures/groupedchannel/GroupedChannel.ts +0 -165
- package/v1/structures/guild/Guild.ts +0 -302
- package/v1/structures/match/GuildMatch.ts +0 -385
- package/v1/structures/mediator/GuildMediator.ts +0 -175
- package/v1/structures/product/GuildProduct.ts +0 -217
- package/v1/structures/shop/GuildShop.ts +0 -98
- package/v1/structures/ticket/GuildTicket.ts +0 -227
- package/v1/structures/user/GuildUser.ts +0 -248
- package/v1/types/api/APIBaseChannel.ts +0 -13
- package/v1/types/api/APIBetChannel.ts +0 -13
- package/v1/types/api/APIBetMessage.ts +0 -13
- package/v1/types/api/APIGuild.ts +0 -123
- package/v1/types/api/APIGuildBet.ts +0 -69
- package/v1/types/api/APIGuildBetUser.ts +0 -46
- package/v1/types/api/APIGuildChannel.ts +0 -13
- package/v1/types/api/APIGuildEmoji.ts +0 -16
- package/v1/types/api/APIGuildGroupedChannel.ts +0 -13
- package/v1/types/api/APIGuildMatch.ts +0 -67
- package/v1/types/api/APIGuildMediator.ts +0 -18
- package/v1/types/api/APIGuildMessage.ts +0 -13
- package/v1/types/api/APIGuildPermissions.ts +0 -7
- package/v1/types/api/APIGuildRole.ts +0 -13
- package/v1/types/api/APIGuildShop.ts +0 -15
- package/v1/types/api/APIGuildTicket.ts +0 -36
- package/v1/types/api/APIGuildUser.ts +0 -45
- package/v1/types/api/APIMessage.ts +0 -16
- package/v1/types/api/APIPlayer.ts +0 -13
- package/v1/types/api/APIProduct.ts +0 -27
- package/v1/types/api/index.ts +0 -180
- package/v1/utils/Assertion.ts +0 -56
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BaseMatchModes, BaseMatchStatus, Confirm } from ".";
|
|
2
|
+
import { APIBaseChannel } from "./APIBaseChannel";
|
|
3
|
+
import { APIMessage } from "./APIMessage";
|
|
4
|
+
import { APIPlayer } from "./APIPlayer";
|
|
5
|
+
export interface APIGuildMatch {
|
|
6
|
+
/** Match's type */
|
|
7
|
+
type: BaseMatchModes;
|
|
8
|
+
/** Match's status */
|
|
9
|
+
status: BaseMatchStatus;
|
|
10
|
+
/** Match's challenge */
|
|
11
|
+
challenge: boolean;
|
|
12
|
+
/** Match's players */
|
|
13
|
+
players: APIPlayer[];
|
|
14
|
+
/** Match's winners */
|
|
15
|
+
winners: APIPlayer[];
|
|
16
|
+
/** Match's losers */
|
|
17
|
+
losers: APIPlayer[];
|
|
18
|
+
/** Match;s messages */
|
|
19
|
+
messages: APIMessage[];
|
|
20
|
+
/** Matches channels */
|
|
21
|
+
channels: APIBaseChannel[];
|
|
22
|
+
/** Match's maximum size */
|
|
23
|
+
maximumSize: number;
|
|
24
|
+
/** Match's kicked out */
|
|
25
|
+
kickedOut: APIPlayer[];
|
|
26
|
+
/** Match's team a */
|
|
27
|
+
teamA: APIPlayer[];
|
|
28
|
+
/** Match's team b */
|
|
29
|
+
teamB: APIPlayer[];
|
|
30
|
+
/** Match's confirmed */
|
|
31
|
+
confirmed: Confirm[];
|
|
32
|
+
/** Match's leaders */
|
|
33
|
+
leaders: APIPlayer[];
|
|
34
|
+
/** Match's mvp */
|
|
35
|
+
mvpId: string;
|
|
36
|
+
/** Match's creator id */
|
|
37
|
+
creatorId: string;
|
|
38
|
+
/** Match's room creator id */
|
|
39
|
+
roomCreatorId: string;
|
|
40
|
+
/** Creation Date */
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
/** Updated Date */
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
/** Match's id */
|
|
45
|
+
_id: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { APIPlayer } from "./APIPlayer";
|
|
2
|
+
export interface APIGuildMediator extends APIPlayer {
|
|
3
|
+
/** Mediator's id */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Mediator's name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Mediator's links */
|
|
8
|
+
paymentLinks: string[];
|
|
9
|
+
/** Creation Date */
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
/** Updated Date */
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { APIProduct } from "./APIProduct";
|
|
2
|
+
export interface APIGuildShop {
|
|
3
|
+
/** Shop's product */
|
|
4
|
+
products: APIProduct[];
|
|
5
|
+
/** Bought count */
|
|
6
|
+
boughtCount: number;
|
|
7
|
+
/** Creation Date */
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
/** Updated Date */
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { APIMessage } from "./APIMessage";
|
|
2
|
+
export interface APIGuildTicket {
|
|
3
|
+
/** Ticket's id */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Ticket's creator id */
|
|
6
|
+
creatorId: string;
|
|
7
|
+
/** Ticket's admin id */
|
|
8
|
+
adminId: string;
|
|
9
|
+
/** Ticket's rating that customer gave */
|
|
10
|
+
customerRating: number;
|
|
11
|
+
/** Ticket's channel id */
|
|
12
|
+
channelId: string;
|
|
13
|
+
/** Ticket's closed by who */
|
|
14
|
+
closedById: string;
|
|
15
|
+
/** Ticket's type */
|
|
16
|
+
type: string;
|
|
17
|
+
/** Ticket's status */
|
|
18
|
+
status: "on" | "off";
|
|
19
|
+
/** Ticket's messages */
|
|
20
|
+
messages: APIMessage[];
|
|
21
|
+
/** Creation Date */
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
/** Updated Date */
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Accessory, Daily, Items, OriginalChannels } from ".";
|
|
2
|
+
export interface APIGuildUser {
|
|
3
|
+
/** User's id */
|
|
4
|
+
id: string;
|
|
5
|
+
/** User name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** User's daily */
|
|
8
|
+
daily: Omit<Daily, "credit">;
|
|
9
|
+
/** User's points */
|
|
10
|
+
points: number;
|
|
11
|
+
/** User's wins */
|
|
12
|
+
wins: number;
|
|
13
|
+
/** User's mvps */
|
|
14
|
+
mvps: number;
|
|
15
|
+
/** User's losses */
|
|
16
|
+
losses: number;
|
|
17
|
+
/** User's games */
|
|
18
|
+
games: number;
|
|
19
|
+
/** If user is blacklisted */
|
|
20
|
+
blacklist: boolean;
|
|
21
|
+
/** User's accessories such as double point */
|
|
22
|
+
accessories: Accessory[];
|
|
23
|
+
/** User's original channels */
|
|
24
|
+
originalChannels: OriginalChannels;
|
|
25
|
+
/** User's items */
|
|
26
|
+
items: Items;
|
|
27
|
+
/** Creation Date */
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
/** Updated Date */
|
|
30
|
+
updatedAt: Date;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface APIMessage {
|
|
2
|
+
/** Message's content */
|
|
3
|
+
content: string | object;
|
|
4
|
+
/** Message's creator id */
|
|
5
|
+
userId: string;
|
|
6
|
+
/** Message's type */
|
|
7
|
+
type: "text" | "img" | ".png" | ".gif" | ".jpg";
|
|
8
|
+
/** Creation Date */
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
/** Updated Date */
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { APIPlayer } from "./APIPlayer";
|
|
2
|
+
export interface APIProduct {
|
|
3
|
+
/** Product's name */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Product's description */
|
|
6
|
+
description: string;
|
|
7
|
+
/** Product's id */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Product's price */
|
|
10
|
+
price: number;
|
|
11
|
+
/** Product's buyers */
|
|
12
|
+
buyers: APIPlayer[];
|
|
13
|
+
/** Product's emoji */
|
|
14
|
+
emoji: string;
|
|
15
|
+
/** Creation Date */
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
/** Updated Date */
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export interface APITicketCategory {
|
|
2
|
+
/** Category's type */
|
|
3
|
+
type: string;
|
|
4
|
+
/** Category's emoji */
|
|
5
|
+
emoji: string;
|
|
6
|
+
/** Category's description */
|
|
7
|
+
description: string;
|
|
8
|
+
/** Category's alias */
|
|
9
|
+
alias: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Blacklisted {
|
|
12
|
+
/** Blacklist's id */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Blacklist added by */
|
|
15
|
+
addedBy: string;
|
|
16
|
+
/** Guild Creation Date */
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
/** Guild Updated Date */
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
}
|
|
21
|
+
export type GuildBlacklist = Blacklisted[];
|
|
22
|
+
export interface LogMessage {
|
|
23
|
+
/** The message's content */
|
|
24
|
+
content: string | Buffer<any>;
|
|
25
|
+
/** The message's sender */
|
|
26
|
+
userId: string;
|
|
27
|
+
/** The message's type */
|
|
28
|
+
type: string;
|
|
29
|
+
}
|
|
30
|
+
/** Base match modes */
|
|
31
|
+
export type BaseMatchModes = "1x1" | "2x2" | "3x3" | "4x4" | "5x5" | "6x6" | "1v1" | "2v2" | "3v3" | "4v4" | "5v5" | "6v6";
|
|
32
|
+
/** Base match status */
|
|
33
|
+
export type BaseMatchStatus = "on" | "created" | "off" | "shutted";
|
|
34
|
+
/** The logs of the structure */
|
|
35
|
+
export interface Logs {
|
|
36
|
+
/** The messages of the structure */
|
|
37
|
+
messages: LogMessage[];
|
|
38
|
+
}
|
|
39
|
+
/** Original Channel */
|
|
40
|
+
export type OriginalChannel = {
|
|
41
|
+
/** Channel id */
|
|
42
|
+
channelId: string;
|
|
43
|
+
/** Match id */
|
|
44
|
+
matchId: string;
|
|
45
|
+
};
|
|
46
|
+
/** Items */
|
|
47
|
+
export type Items = string[];
|
|
48
|
+
/** Original Channels */
|
|
49
|
+
export type OriginalChannels = OriginalChannel[];
|
|
50
|
+
/** Accessories */
|
|
51
|
+
export type Accessory = {
|
|
52
|
+
/** Accessory type */
|
|
53
|
+
type: "point_protect" | "immunity" | "double_points";
|
|
54
|
+
/** Accessory longevity */
|
|
55
|
+
longevity: string;
|
|
56
|
+
/** Accessory adder */
|
|
57
|
+
addedBy: string;
|
|
58
|
+
/** When accessory added */
|
|
59
|
+
when: Date;
|
|
60
|
+
/** If accessory has expired */
|
|
61
|
+
expired: boolean;
|
|
62
|
+
};
|
|
63
|
+
/** Daily information */
|
|
64
|
+
export type Daily = {
|
|
65
|
+
/** Wins */
|
|
66
|
+
wins: number;
|
|
67
|
+
/** Coins */
|
|
68
|
+
coins: number;
|
|
69
|
+
/** Points */
|
|
70
|
+
points: number;
|
|
71
|
+
/** Credit */
|
|
72
|
+
credit: number;
|
|
73
|
+
/** Losses */
|
|
74
|
+
losses: number;
|
|
75
|
+
/** Mvps */
|
|
76
|
+
mvps: number;
|
|
77
|
+
/** Date of the daily */
|
|
78
|
+
date: Date;
|
|
79
|
+
};
|
|
80
|
+
export interface Banner {
|
|
81
|
+
/** Equipped banner */
|
|
82
|
+
equipped: number;
|
|
83
|
+
/** Bought banners */
|
|
84
|
+
allowed: number[];
|
|
85
|
+
}
|
|
86
|
+
export interface ProfileCard {
|
|
87
|
+
/** Profile's description */
|
|
88
|
+
description: string;
|
|
89
|
+
/** Profile's banner */
|
|
90
|
+
banner: Banner;
|
|
91
|
+
}
|
|
92
|
+
export interface Confirm {
|
|
93
|
+
/** Confirm's type */
|
|
94
|
+
type: string;
|
|
95
|
+
/** Confirm's id */
|
|
96
|
+
ids: string[];
|
|
97
|
+
/** Confirm's counts */
|
|
98
|
+
count: number;
|
|
99
|
+
}
|
|
100
|
+
export type Optional<T> = {
|
|
101
|
+
[K in keyof T]?: T[K];
|
|
102
|
+
};
|
|
103
|
+
export declare enum MATCHTYPES {
|
|
104
|
+
OneVOne = "1v1",
|
|
105
|
+
TwoVTwo = "2v2",
|
|
106
|
+
ThreeVThree = "3v3",
|
|
107
|
+
FourVFour = "4v4",
|
|
108
|
+
FiveVFive = "5v5",
|
|
109
|
+
SixVSix = "6v6"
|
|
110
|
+
}
|
|
111
|
+
export declare enum MATCHSTATUS {
|
|
112
|
+
ON = "on",
|
|
113
|
+
OFF = "off",
|
|
114
|
+
CREATED = "created",
|
|
115
|
+
SHUTTED = "shutted"
|
|
116
|
+
}
|
|
117
|
+
export declare enum BETSTATUS {
|
|
118
|
+
ON = "on",
|
|
119
|
+
OFF = "off",
|
|
120
|
+
CREATED = "created",
|
|
121
|
+
SHUTTED = "shutted",
|
|
122
|
+
WAITING = "waiting"
|
|
123
|
+
}
|
|
124
|
+
export declare enum STATES {
|
|
125
|
+
ON = "on",
|
|
126
|
+
OFF = "off",
|
|
127
|
+
CREATED = "created",
|
|
128
|
+
SHUTTED = "shutted",
|
|
129
|
+
WAITING = "waiting"
|
|
130
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STATES = exports.BETSTATUS = exports.MATCHSTATUS = exports.MATCHTYPES = void 0;
|
|
4
|
+
var MATCHTYPES;
|
|
5
|
+
(function (MATCHTYPES) {
|
|
6
|
+
MATCHTYPES["OneVOne"] = "1v1";
|
|
7
|
+
MATCHTYPES["TwoVTwo"] = "2v2";
|
|
8
|
+
MATCHTYPES["ThreeVThree"] = "3v3";
|
|
9
|
+
MATCHTYPES["FourVFour"] = "4v4";
|
|
10
|
+
MATCHTYPES["FiveVFive"] = "5v5";
|
|
11
|
+
MATCHTYPES["SixVSix"] = "6v6";
|
|
12
|
+
})(MATCHTYPES || (exports.MATCHTYPES = MATCHTYPES = {}));
|
|
13
|
+
var MATCHSTATUS;
|
|
14
|
+
(function (MATCHSTATUS) {
|
|
15
|
+
MATCHSTATUS["ON"] = "on";
|
|
16
|
+
MATCHSTATUS["OFF"] = "off";
|
|
17
|
+
MATCHSTATUS["CREATED"] = "created";
|
|
18
|
+
MATCHSTATUS["SHUTTED"] = "shutted";
|
|
19
|
+
})(MATCHSTATUS || (exports.MATCHSTATUS = MATCHSTATUS = {}));
|
|
20
|
+
var BETSTATUS;
|
|
21
|
+
(function (BETSTATUS) {
|
|
22
|
+
BETSTATUS["ON"] = "on";
|
|
23
|
+
BETSTATUS["OFF"] = "off";
|
|
24
|
+
BETSTATUS["CREATED"] = "created";
|
|
25
|
+
BETSTATUS["SHUTTED"] = "shutted";
|
|
26
|
+
BETSTATUS["WAITING"] = "waiting";
|
|
27
|
+
})(BETSTATUS || (exports.BETSTATUS = BETSTATUS = {}));
|
|
28
|
+
var STATES;
|
|
29
|
+
(function (STATES) {
|
|
30
|
+
STATES["ON"] = "on";
|
|
31
|
+
STATES["OFF"] = "off";
|
|
32
|
+
STATES["CREATED"] = "created";
|
|
33
|
+
STATES["SHUTTED"] = "shutted";
|
|
34
|
+
STATES["WAITING"] = "waiting";
|
|
35
|
+
})(STATES || (exports.STATES = STATES = {}));
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
export * from "./api/APIBaseChannel";
|
|
2
|
-
export * from "./api/APIBetChannel";
|
|
3
|
-
export * from "./api/APIBetMessage";
|
|
4
|
-
export * from "./api/APIGuild";
|
|
5
|
-
export * from "./api/APIGuildBet";
|
|
6
|
-
export * from "./api/APIGuildBetUser";
|
|
7
|
-
export * from "./api/APIGuildChannel";
|
|
8
|
-
export * from "./api/APIGuildEmoji";
|
|
9
|
-
export * from "./api/APIGuildGroupedChannel";
|
|
10
|
-
export * from "./api/APIGuildMatch";
|
|
11
|
-
export * from "./api/APIGuildMediator";
|
|
12
|
-
export * from "./api/APIGuildMessage";
|
|
13
|
-
export * from "./api/APIGuildPermissions";
|
|
14
|
-
export * from "./api/APIGuildRole";
|
|
15
|
-
export * from "./api/APIGuildShop";
|
|
16
|
-
export * from "./api/APIGuildTicket";
|
|
17
|
-
export * from "./api/APIGuildUser";
|
|
18
|
-
export * from "./api/APIMessage";
|
|
19
|
-
export * from "./api/APIPlayer";
|
|
20
|
-
export * from "./api/APIProduct";
|
|
21
|
-
|
|
22
|
-
export * from "./api/index";
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
export * from "./api/APIBaseChannel";
|
|
2
|
+
export * from "./api/APIBetChannel";
|
|
3
|
+
export * from "./api/APIBetMessage";
|
|
4
|
+
export * from "./api/APIGuild";
|
|
5
|
+
export * from "./api/APIGuildBet";
|
|
6
|
+
export * from "./api/APIGuildBetUser";
|
|
7
|
+
export * from "./api/APIGuildChannel";
|
|
8
|
+
export * from "./api/APIGuildEmoji";
|
|
9
|
+
export * from "./api/APIGuildGroupedChannel";
|
|
10
|
+
export * from "./api/APIGuildMatch";
|
|
11
|
+
export * from "./api/APIGuildMediator";
|
|
12
|
+
export * from "./api/APIGuildMessage";
|
|
13
|
+
export * from "./api/APIGuildPermissions";
|
|
14
|
+
export * from "./api/APIGuildRole";
|
|
15
|
+
export * from "./api/APIGuildShop";
|
|
16
|
+
export * from "./api/APIGuildTicket";
|
|
17
|
+
export * from "./api/APIGuildUser";
|
|
18
|
+
export * from "./api/APIMessage";
|
|
19
|
+
export * from "./api/APIPlayer";
|
|
20
|
+
export * from "./api/APIProduct";
|
|
21
|
+
export * from "./api/index";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./api/APIBaseChannel"), exports);
|
|
18
|
+
__exportStar(require("./api/APIBetChannel"), exports);
|
|
19
|
+
__exportStar(require("./api/APIBetMessage"), exports);
|
|
20
|
+
__exportStar(require("./api/APIGuild"), exports);
|
|
21
|
+
__exportStar(require("./api/APIGuildBet"), exports);
|
|
22
|
+
__exportStar(require("./api/APIGuildBetUser"), exports);
|
|
23
|
+
__exportStar(require("./api/APIGuildChannel"), exports);
|
|
24
|
+
__exportStar(require("./api/APIGuildEmoji"), exports);
|
|
25
|
+
__exportStar(require("./api/APIGuildGroupedChannel"), exports);
|
|
26
|
+
__exportStar(require("./api/APIGuildMatch"), exports);
|
|
27
|
+
__exportStar(require("./api/APIGuildMediator"), exports);
|
|
28
|
+
__exportStar(require("./api/APIGuildMessage"), exports);
|
|
29
|
+
__exportStar(require("./api/APIGuildPermissions"), exports);
|
|
30
|
+
__exportStar(require("./api/APIGuildRole"), exports);
|
|
31
|
+
__exportStar(require("./api/APIGuildShop"), exports);
|
|
32
|
+
__exportStar(require("./api/APIGuildTicket"), exports);
|
|
33
|
+
__exportStar(require("./api/APIGuildUser"), exports);
|
|
34
|
+
__exportStar(require("./api/APIMessage"), exports);
|
|
35
|
+
__exportStar(require("./api/APIPlayer"), exports);
|
|
36
|
+
__exportStar(require("./api/APIProduct"), exports);
|
|
37
|
+
__exportStar(require("./api/index"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class used to assert types in the sdk
|
|
3
|
+
*/
|
|
4
|
+
export declare class Assertion {
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Tests if given key is a string
|
|
8
|
+
* @param key Key to test
|
|
9
|
+
*/
|
|
10
|
+
static assertString(key: unknown): key is string;
|
|
11
|
+
/**
|
|
12
|
+
* Tests if given key is a number
|
|
13
|
+
* @param key Key to test
|
|
14
|
+
*/
|
|
15
|
+
static assertNumber(key: unknown): key is number;
|
|
16
|
+
/**
|
|
17
|
+
* Tests if given key is a boolean
|
|
18
|
+
* @param key Key to test
|
|
19
|
+
*/
|
|
20
|
+
static assertBoolean(key: unknown): key is boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Tests if given key is an array
|
|
23
|
+
* @param key Key to test
|
|
24
|
+
*/
|
|
25
|
+
static assertArray(key: unknown): key is object;
|
|
26
|
+
/**
|
|
27
|
+
* Tests if given key is an object
|
|
28
|
+
* @param key Key to test
|
|
29
|
+
*/
|
|
30
|
+
static assertObject(key: unknown): key is object;
|
|
31
|
+
toString(): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Assertion = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Class used to assert types in the sdk
|
|
6
|
+
*/
|
|
7
|
+
class Assertion {
|
|
8
|
+
constructor() { }
|
|
9
|
+
/**
|
|
10
|
+
* Tests if given key is a string
|
|
11
|
+
* @param key Key to test
|
|
12
|
+
*/
|
|
13
|
+
static assertString(key) {
|
|
14
|
+
if (typeof key !== "string")
|
|
15
|
+
throw new Error(`${key} must be a string`);
|
|
16
|
+
if (!key || key === "")
|
|
17
|
+
throw new Error(`${key} must be a string`);
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Tests if given key is a number
|
|
22
|
+
* @param key Key to test
|
|
23
|
+
*/
|
|
24
|
+
static assertNumber(key) {
|
|
25
|
+
if (typeof key !== "number")
|
|
26
|
+
throw new Error(`${key} must be a number`);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Tests if given key is a boolean
|
|
31
|
+
* @param key Key to test
|
|
32
|
+
*/
|
|
33
|
+
static assertBoolean(key) {
|
|
34
|
+
if (typeof key !== "boolean")
|
|
35
|
+
throw new Error(`${key} must be a boolean`);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Tests if given key is an array
|
|
40
|
+
* @param key Key to test
|
|
41
|
+
*/
|
|
42
|
+
static assertArray(key) {
|
|
43
|
+
if (!Array.isArray(key))
|
|
44
|
+
throw new Error(`${key} must be an array`);
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Tests if given key is an object
|
|
49
|
+
* @param key Key to test
|
|
50
|
+
*/
|
|
51
|
+
static assertObject(key) {
|
|
52
|
+
if (typeof key !== "object")
|
|
53
|
+
throw new Error(`${key} must be an object`);
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
toString() {
|
|
57
|
+
return 'string, number, boolean, array, object';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.Assertion = Assertion;
|