moons-ta-client 1.1.14 → 1.2.0
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/dist/client.d.ts +1 -1
- package/dist/client.js +1 -16
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +2 -2
- package/dist/index.d.ts +272 -178
- package/dist/index.esm.js +884 -504
- package/dist/models/commands.d.ts +33 -36
- package/dist/models/commands.js +47 -51
- package/dist/models/models.d.ts +43 -21
- package/dist/models/models.js +93 -29
- package/dist/models/packets.d.ts +6 -0
- package/dist/models/packets.js +10 -0
- package/dist/models/requests.d.ts +161 -71
- package/dist/models/requests.js +341 -157
- package/dist/models/responses.d.ts +8 -34
- package/dist/models/responses.js +29 -87
- package/dist/tournament-assistant-client.d.ts +17 -14
- package/dist/tournament-assistant-client.js +109 -62
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
|
4
4
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
5
5
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
6
6
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
|
-
import { Channel } from './discord.js';
|
|
8
7
|
import { GameplayParameters } from './models.js';
|
|
9
8
|
/**
|
|
10
9
|
* ---- Commands (DO something!) ---- //
|
|
@@ -12,16 +11,18 @@ import { GameplayParameters } from './models.js';
|
|
|
12
11
|
* @generated from protobuf message proto.packets.Command
|
|
13
12
|
*/
|
|
14
13
|
export interface Command {
|
|
14
|
+
/**
|
|
15
|
+
* @generated from protobuf field: string tournament_id = 11;
|
|
16
|
+
*/
|
|
17
|
+
tournamentId: string;
|
|
18
|
+
/**
|
|
19
|
+
* @generated from protobuf field: repeated string forward_to = 12;
|
|
20
|
+
*/
|
|
21
|
+
forwardTo: string[];
|
|
15
22
|
/**
|
|
16
23
|
* @generated from protobuf oneof: type
|
|
17
24
|
*/
|
|
18
25
|
type: {
|
|
19
|
-
oneofKind: "heartbeat";
|
|
20
|
-
/**
|
|
21
|
-
* @generated from protobuf field: bool heartbeat = 1;
|
|
22
|
-
*/
|
|
23
|
-
heartbeat: boolean;
|
|
24
|
-
} | {
|
|
25
26
|
oneofKind: "returnToMenu";
|
|
26
27
|
/**
|
|
27
28
|
* @generated from protobuf field: bool return_to_menu = 2;
|
|
@@ -45,12 +46,6 @@ export interface Command {
|
|
|
45
46
|
* @generated from protobuf field: proto.packets.Command.PlaySong play_song = 6;
|
|
46
47
|
*/
|
|
47
48
|
playSong: Command_PlaySong;
|
|
48
|
-
} | {
|
|
49
|
-
oneofKind: "sendBotMessage";
|
|
50
|
-
/**
|
|
51
|
-
* @generated from protobuf field: proto.packets.Command.SendBotMessage send_bot_message = 7;
|
|
52
|
-
*/
|
|
53
|
-
sendBotMessage: Command_SendBotMessage;
|
|
54
49
|
} | {
|
|
55
50
|
oneofKind: "discordAuthorize";
|
|
56
51
|
/**
|
|
@@ -63,6 +58,12 @@ export interface Command {
|
|
|
63
58
|
* @generated from protobuf field: proto.packets.Command.ModifyGameplay modify_gameplay = 10;
|
|
64
59
|
*/
|
|
65
60
|
modifyGameplay: Command_ModifyGameplay;
|
|
61
|
+
} | {
|
|
62
|
+
oneofKind: "showColorForStreamSync";
|
|
63
|
+
/**
|
|
64
|
+
* @generated from protobuf field: proto.packets.Command.ShowColorForStreamSync show_color_for_stream_sync = 13;
|
|
65
|
+
*/
|
|
66
|
+
showColorForStreamSync: Command_ShowColorForStreamSync;
|
|
66
67
|
} | {
|
|
67
68
|
oneofKind: undefined;
|
|
68
69
|
};
|
|
@@ -76,19 +77,6 @@ export interface Command_PlaySong {
|
|
|
76
77
|
*/
|
|
77
78
|
gameplayParameters?: GameplayParameters;
|
|
78
79
|
}
|
|
79
|
-
/**
|
|
80
|
-
* @generated from protobuf message proto.packets.Command.SendBotMessage
|
|
81
|
-
*/
|
|
82
|
-
export interface Command_SendBotMessage {
|
|
83
|
-
/**
|
|
84
|
-
* @generated from protobuf field: proto.discord.Channel channel = 1;
|
|
85
|
-
*/
|
|
86
|
-
channel?: Channel;
|
|
87
|
-
/**
|
|
88
|
-
* @generated from protobuf field: string message = 2;
|
|
89
|
-
*/
|
|
90
|
-
message: string;
|
|
91
|
-
}
|
|
92
80
|
/**
|
|
93
81
|
* @generated from protobuf message proto.packets.Command.ModifyGameplay
|
|
94
82
|
*/
|
|
@@ -111,6 +99,15 @@ export declare enum Command_ModifyGameplay_Modifier {
|
|
|
111
99
|
*/
|
|
112
100
|
InvertHandedness = 1
|
|
113
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* @generated from protobuf message proto.packets.Command.ShowColorForStreamSync
|
|
104
|
+
*/
|
|
105
|
+
export interface Command_ShowColorForStreamSync {
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf field: string color = 1;
|
|
108
|
+
*/
|
|
109
|
+
color: string;
|
|
110
|
+
}
|
|
114
111
|
declare class Command$Type extends MessageType<Command> {
|
|
115
112
|
constructor();
|
|
116
113
|
create(value?: PartialMessage<Command>): Command;
|
|
@@ -131,16 +128,6 @@ declare class Command_PlaySong$Type extends MessageType<Command_PlaySong> {
|
|
|
131
128
|
* @generated MessageType for protobuf message proto.packets.Command.PlaySong
|
|
132
129
|
*/
|
|
133
130
|
export declare const Command_PlaySong: Command_PlaySong$Type;
|
|
134
|
-
declare class Command_SendBotMessage$Type extends MessageType<Command_SendBotMessage> {
|
|
135
|
-
constructor();
|
|
136
|
-
create(value?: PartialMessage<Command_SendBotMessage>): Command_SendBotMessage;
|
|
137
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_SendBotMessage): Command_SendBotMessage;
|
|
138
|
-
internalBinaryWrite(message: Command_SendBotMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* @generated MessageType for protobuf message proto.packets.Command.SendBotMessage
|
|
142
|
-
*/
|
|
143
|
-
export declare const Command_SendBotMessage: Command_SendBotMessage$Type;
|
|
144
131
|
declare class Command_ModifyGameplay$Type extends MessageType<Command_ModifyGameplay> {
|
|
145
132
|
constructor();
|
|
146
133
|
create(value?: PartialMessage<Command_ModifyGameplay>): Command_ModifyGameplay;
|
|
@@ -151,4 +138,14 @@ declare class Command_ModifyGameplay$Type extends MessageType<Command_ModifyGame
|
|
|
151
138
|
* @generated MessageType for protobuf message proto.packets.Command.ModifyGameplay
|
|
152
139
|
*/
|
|
153
140
|
export declare const Command_ModifyGameplay: Command_ModifyGameplay$Type;
|
|
141
|
+
declare class Command_ShowColorForStreamSync$Type extends MessageType<Command_ShowColorForStreamSync> {
|
|
142
|
+
constructor();
|
|
143
|
+
create(value?: PartialMessage<Command_ShowColorForStreamSync>): Command_ShowColorForStreamSync;
|
|
144
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_ShowColorForStreamSync): Command_ShowColorForStreamSync;
|
|
145
|
+
internalBinaryWrite(message: Command_ShowColorForStreamSync, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @generated MessageType for protobuf message proto.packets.Command.ShowColorForStreamSync
|
|
149
|
+
*/
|
|
150
|
+
export declare const Command_ShowColorForStreamSync: Command_ShowColorForStreamSync$Type;
|
|
154
151
|
export {};
|
package/dist/models/commands.js
CHANGED
|
@@ -3,7 +3,6 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
3
3
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
4
4
|
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
5
5
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
6
|
-
import { Channel } from './discord.js';
|
|
7
6
|
import { GameplayParameters } from './models.js';
|
|
8
7
|
/**
|
|
9
8
|
* @generated from protobuf enum proto.packets.Command.ModifyGameplay.Modifier
|
|
@@ -23,18 +22,19 @@ export var Command_ModifyGameplay_Modifier;
|
|
|
23
22
|
class Command$Type extends MessageType {
|
|
24
23
|
constructor() {
|
|
25
24
|
super("proto.packets.Command", [
|
|
26
|
-
{ no:
|
|
25
|
+
{ no: 11, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
26
|
+
{ no: 12, name: "forward_to", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
27
27
|
{ no: 2, name: "return_to_menu", kind: "scalar", oneof: "type", T: 8 /*ScalarType.BOOL*/ },
|
|
28
28
|
{ no: 3, name: "delay_test_finish", kind: "scalar", oneof: "type", T: 8 /*ScalarType.BOOL*/ },
|
|
29
29
|
{ no: 4, name: "stream_sync_show_image", kind: "scalar", oneof: "type", T: 8 /*ScalarType.BOOL*/ },
|
|
30
30
|
{ no: 6, name: "play_song", kind: "message", oneof: "type", T: () => Command_PlaySong },
|
|
31
|
-
{ no: 7, name: "send_bot_message", kind: "message", oneof: "type", T: () => Command_SendBotMessage },
|
|
32
31
|
{ no: 9, name: "discord_authorize", kind: "scalar", oneof: "type", T: 9 /*ScalarType.STRING*/ },
|
|
33
|
-
{ no: 10, name: "modify_gameplay", kind: "message", oneof: "type", T: () => Command_ModifyGameplay }
|
|
32
|
+
{ no: 10, name: "modify_gameplay", kind: "message", oneof: "type", T: () => Command_ModifyGameplay },
|
|
33
|
+
{ no: 13, name: "show_color_for_stream_sync", kind: "message", oneof: "type", T: () => Command_ShowColorForStreamSync }
|
|
34
34
|
]);
|
|
35
35
|
}
|
|
36
36
|
create(value) {
|
|
37
|
-
const message = { type: { oneofKind: undefined } };
|
|
37
|
+
const message = { tournamentId: "", forwardTo: [], type: { oneofKind: undefined } };
|
|
38
38
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
39
39
|
if (value !== undefined)
|
|
40
40
|
reflectionMergePartial(this, message, value);
|
|
@@ -45,11 +45,11 @@ class Command$Type extends MessageType {
|
|
|
45
45
|
while (reader.pos < end) {
|
|
46
46
|
let [fieldNo, wireType] = reader.tag();
|
|
47
47
|
switch (fieldNo) {
|
|
48
|
-
case /*
|
|
49
|
-
message.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
case /* string tournament_id */ 11:
|
|
49
|
+
message.tournamentId = reader.string();
|
|
50
|
+
break;
|
|
51
|
+
case /* repeated string forward_to */ 12:
|
|
52
|
+
message.forwardTo.push(reader.string());
|
|
53
53
|
break;
|
|
54
54
|
case /* bool return_to_menu */ 2:
|
|
55
55
|
message.type = {
|
|
@@ -75,12 +75,6 @@ class Command$Type extends MessageType {
|
|
|
75
75
|
playSong: Command_PlaySong.internalBinaryRead(reader, reader.uint32(), options, message.type.playSong)
|
|
76
76
|
};
|
|
77
77
|
break;
|
|
78
|
-
case /* proto.packets.Command.SendBotMessage send_bot_message */ 7:
|
|
79
|
-
message.type = {
|
|
80
|
-
oneofKind: "sendBotMessage",
|
|
81
|
-
sendBotMessage: Command_SendBotMessage.internalBinaryRead(reader, reader.uint32(), options, message.type.sendBotMessage)
|
|
82
|
-
};
|
|
83
|
-
break;
|
|
84
78
|
case /* string discord_authorize */ 9:
|
|
85
79
|
message.type = {
|
|
86
80
|
oneofKind: "discordAuthorize",
|
|
@@ -93,6 +87,12 @@ class Command$Type extends MessageType {
|
|
|
93
87
|
modifyGameplay: Command_ModifyGameplay.internalBinaryRead(reader, reader.uint32(), options, message.type.modifyGameplay)
|
|
94
88
|
};
|
|
95
89
|
break;
|
|
90
|
+
case /* proto.packets.Command.ShowColorForStreamSync show_color_for_stream_sync */ 13:
|
|
91
|
+
message.type = {
|
|
92
|
+
oneofKind: "showColorForStreamSync",
|
|
93
|
+
showColorForStreamSync: Command_ShowColorForStreamSync.internalBinaryRead(reader, reader.uint32(), options, message.type.showColorForStreamSync)
|
|
94
|
+
};
|
|
95
|
+
break;
|
|
96
96
|
default:
|
|
97
97
|
let u = options.readUnknownField;
|
|
98
98
|
if (u === "throw")
|
|
@@ -105,9 +105,12 @@ class Command$Type extends MessageType {
|
|
|
105
105
|
return message;
|
|
106
106
|
}
|
|
107
107
|
internalBinaryWrite(message, writer, options) {
|
|
108
|
-
/*
|
|
109
|
-
if (message.
|
|
110
|
-
writer.tag(
|
|
108
|
+
/* string tournament_id = 11; */
|
|
109
|
+
if (message.tournamentId !== "")
|
|
110
|
+
writer.tag(11, WireType.LengthDelimited).string(message.tournamentId);
|
|
111
|
+
/* repeated string forward_to = 12; */
|
|
112
|
+
for (let i = 0; i < message.forwardTo.length; i++)
|
|
113
|
+
writer.tag(12, WireType.LengthDelimited).string(message.forwardTo[i]);
|
|
111
114
|
/* bool return_to_menu = 2; */
|
|
112
115
|
if (message.type.oneofKind === "returnToMenu")
|
|
113
116
|
writer.tag(2, WireType.Varint).bool(message.type.returnToMenu);
|
|
@@ -120,15 +123,15 @@ class Command$Type extends MessageType {
|
|
|
120
123
|
/* proto.packets.Command.PlaySong play_song = 6; */
|
|
121
124
|
if (message.type.oneofKind === "playSong")
|
|
122
125
|
Command_PlaySong.internalBinaryWrite(message.type.playSong, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
123
|
-
/* proto.packets.Command.SendBotMessage send_bot_message = 7; */
|
|
124
|
-
if (message.type.oneofKind === "sendBotMessage")
|
|
125
|
-
Command_SendBotMessage.internalBinaryWrite(message.type.sendBotMessage, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
126
126
|
/* string discord_authorize = 9; */
|
|
127
127
|
if (message.type.oneofKind === "discordAuthorize")
|
|
128
128
|
writer.tag(9, WireType.LengthDelimited).string(message.type.discordAuthorize);
|
|
129
129
|
/* proto.packets.Command.ModifyGameplay modify_gameplay = 10; */
|
|
130
130
|
if (message.type.oneofKind === "modifyGameplay")
|
|
131
131
|
Command_ModifyGameplay.internalBinaryWrite(message.type.modifyGameplay, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
132
|
+
/* proto.packets.Command.ShowColorForStreamSync show_color_for_stream_sync = 13; */
|
|
133
|
+
if (message.type.oneofKind === "showColorForStreamSync")
|
|
134
|
+
Command_ShowColorForStreamSync.internalBinaryWrite(message.type.showColorForStreamSync, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
132
135
|
let u = options.writeUnknownFields;
|
|
133
136
|
if (u !== false)
|
|
134
137
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -187,15 +190,14 @@ class Command_PlaySong$Type extends MessageType {
|
|
|
187
190
|
*/
|
|
188
191
|
export const Command_PlaySong = new Command_PlaySong$Type();
|
|
189
192
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
190
|
-
class
|
|
193
|
+
class Command_ModifyGameplay$Type extends MessageType {
|
|
191
194
|
constructor() {
|
|
192
|
-
super("proto.packets.Command.
|
|
193
|
-
{ no: 1, name: "
|
|
194
|
-
{ no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
195
|
+
super("proto.packets.Command.ModifyGameplay", [
|
|
196
|
+
{ no: 1, name: "modifier", kind: "enum", T: () => ["proto.packets.Command.ModifyGameplay.Modifier", Command_ModifyGameplay_Modifier] }
|
|
195
197
|
]);
|
|
196
198
|
}
|
|
197
199
|
create(value) {
|
|
198
|
-
const message = {
|
|
200
|
+
const message = { modifier: 0 };
|
|
199
201
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
200
202
|
if (value !== undefined)
|
|
201
203
|
reflectionMergePartial(this, message, value);
|
|
@@ -206,11 +208,8 @@ class Command_SendBotMessage$Type extends MessageType {
|
|
|
206
208
|
while (reader.pos < end) {
|
|
207
209
|
let [fieldNo, wireType] = reader.tag();
|
|
208
210
|
switch (fieldNo) {
|
|
209
|
-
case /* proto.
|
|
210
|
-
message.
|
|
211
|
-
break;
|
|
212
|
-
case /* string message */ 2:
|
|
213
|
-
message.message = reader.string();
|
|
211
|
+
case /* proto.packets.Command.ModifyGameplay.Modifier modifier */ 1:
|
|
212
|
+
message.modifier = reader.int32();
|
|
214
213
|
break;
|
|
215
214
|
default:
|
|
216
215
|
let u = options.readUnknownField;
|
|
@@ -224,12 +223,9 @@ class Command_SendBotMessage$Type extends MessageType {
|
|
|
224
223
|
return message;
|
|
225
224
|
}
|
|
226
225
|
internalBinaryWrite(message, writer, options) {
|
|
227
|
-
/* proto.
|
|
228
|
-
if (message.
|
|
229
|
-
|
|
230
|
-
/* string message = 2; */
|
|
231
|
-
if (message.message !== "")
|
|
232
|
-
writer.tag(2, WireType.LengthDelimited).string(message.message);
|
|
226
|
+
/* proto.packets.Command.ModifyGameplay.Modifier modifier = 1; */
|
|
227
|
+
if (message.modifier !== 0)
|
|
228
|
+
writer.tag(1, WireType.Varint).int32(message.modifier);
|
|
233
229
|
let u = options.writeUnknownFields;
|
|
234
230
|
if (u !== false)
|
|
235
231
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -237,18 +233,18 @@ class Command_SendBotMessage$Type extends MessageType {
|
|
|
237
233
|
}
|
|
238
234
|
}
|
|
239
235
|
/**
|
|
240
|
-
* @generated MessageType for protobuf message proto.packets.Command.
|
|
236
|
+
* @generated MessageType for protobuf message proto.packets.Command.ModifyGameplay
|
|
241
237
|
*/
|
|
242
|
-
export const
|
|
238
|
+
export const Command_ModifyGameplay = new Command_ModifyGameplay$Type();
|
|
243
239
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
244
|
-
class
|
|
240
|
+
class Command_ShowColorForStreamSync$Type extends MessageType {
|
|
245
241
|
constructor() {
|
|
246
|
-
super("proto.packets.Command.
|
|
247
|
-
{ no: 1, name: "
|
|
242
|
+
super("proto.packets.Command.ShowColorForStreamSync", [
|
|
243
|
+
{ no: 1, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
248
244
|
]);
|
|
249
245
|
}
|
|
250
246
|
create(value) {
|
|
251
|
-
const message = {
|
|
247
|
+
const message = { color: "" };
|
|
252
248
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
253
249
|
if (value !== undefined)
|
|
254
250
|
reflectionMergePartial(this, message, value);
|
|
@@ -259,8 +255,8 @@ class Command_ModifyGameplay$Type extends MessageType {
|
|
|
259
255
|
while (reader.pos < end) {
|
|
260
256
|
let [fieldNo, wireType] = reader.tag();
|
|
261
257
|
switch (fieldNo) {
|
|
262
|
-
case /*
|
|
263
|
-
message.
|
|
258
|
+
case /* string color */ 1:
|
|
259
|
+
message.color = reader.string();
|
|
264
260
|
break;
|
|
265
261
|
default:
|
|
266
262
|
let u = options.readUnknownField;
|
|
@@ -274,9 +270,9 @@ class Command_ModifyGameplay$Type extends MessageType {
|
|
|
274
270
|
return message;
|
|
275
271
|
}
|
|
276
272
|
internalBinaryWrite(message, writer, options) {
|
|
277
|
-
/*
|
|
278
|
-
if (message.
|
|
279
|
-
writer.tag(1, WireType.
|
|
273
|
+
/* string color = 1; */
|
|
274
|
+
if (message.color !== "")
|
|
275
|
+
writer.tag(1, WireType.LengthDelimited).string(message.color);
|
|
280
276
|
let u = options.writeUnknownFields;
|
|
281
277
|
if (u !== false)
|
|
282
278
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -284,6 +280,6 @@ class Command_ModifyGameplay$Type extends MessageType {
|
|
|
284
280
|
}
|
|
285
281
|
}
|
|
286
282
|
/**
|
|
287
|
-
* @generated MessageType for protobuf message proto.packets.Command.
|
|
283
|
+
* @generated MessageType for protobuf message proto.packets.Command.ShowColorForStreamSync
|
|
288
284
|
*/
|
|
289
|
-
export const
|
|
285
|
+
export const Command_ShowColorForStreamSync = new Command_ShowColorForStreamSync$Type();
|
package/dist/models/models.d.ts
CHANGED
|
@@ -327,6 +327,31 @@ export interface Map {
|
|
|
327
327
|
*/
|
|
328
328
|
gameplayParameters?: GameplayParameters;
|
|
329
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* @generated from protobuf message proto.models.Role
|
|
332
|
+
*/
|
|
333
|
+
export interface Role {
|
|
334
|
+
/**
|
|
335
|
+
* @generated from protobuf field: string guid = 1;
|
|
336
|
+
*/
|
|
337
|
+
guid: string;
|
|
338
|
+
/**
|
|
339
|
+
* @generated from protobuf field: string name = 2;
|
|
340
|
+
*/
|
|
341
|
+
name: string;
|
|
342
|
+
/**
|
|
343
|
+
* @generated from protobuf field: string role_id = 3;
|
|
344
|
+
*/
|
|
345
|
+
roleId: string;
|
|
346
|
+
/**
|
|
347
|
+
* @generated from protobuf field: string tournament_id = 4;
|
|
348
|
+
*/
|
|
349
|
+
tournamentId: string;
|
|
350
|
+
/**
|
|
351
|
+
* @generated from protobuf field: repeated string permissions = 5;
|
|
352
|
+
*/
|
|
353
|
+
permissions: string[];
|
|
354
|
+
}
|
|
330
355
|
/**
|
|
331
356
|
* @generated from protobuf message proto.models.User
|
|
332
357
|
*/
|
|
@@ -383,10 +408,6 @@ export interface User {
|
|
|
383
408
|
* @generated from protobuf field: bytes user_image = 13;
|
|
384
409
|
*/
|
|
385
410
|
userImage: Uint8Array;
|
|
386
|
-
/**
|
|
387
|
-
* @generated from protobuf field: proto.models.Permissions permissions = 14;
|
|
388
|
-
*/
|
|
389
|
-
permissions: Permissions;
|
|
390
411
|
}
|
|
391
412
|
/**
|
|
392
413
|
* @generated from protobuf message proto.models.User.DiscordInfo
|
|
@@ -715,6 +736,14 @@ export interface Tournament_TournamentSettings {
|
|
|
715
736
|
* @generated from protobuf field: bool allow_unauthorized_view = 11;
|
|
716
737
|
*/
|
|
717
738
|
allowUnauthorizedView: boolean;
|
|
739
|
+
/**
|
|
740
|
+
* @generated from protobuf field: repeated proto.models.Role roles = 12;
|
|
741
|
+
*/
|
|
742
|
+
roles: Role[];
|
|
743
|
+
/**
|
|
744
|
+
* @generated from protobuf field: repeated string my_permissions = 13;
|
|
745
|
+
*/
|
|
746
|
+
myPermissions: string[];
|
|
718
747
|
}
|
|
719
748
|
/**
|
|
720
749
|
* @generated from protobuf message proto.models.Tournament.TournamentSettings.Pool
|
|
@@ -922,23 +951,6 @@ export interface ScoreTrackerHand {
|
|
|
922
951
|
*/
|
|
923
952
|
avgCut: number[];
|
|
924
953
|
}
|
|
925
|
-
/**
|
|
926
|
-
* @generated from protobuf enum proto.models.Permissions
|
|
927
|
-
*/
|
|
928
|
-
export declare enum Permissions {
|
|
929
|
-
/**
|
|
930
|
-
* @generated from protobuf enum value: None = 0;
|
|
931
|
-
*/
|
|
932
|
-
None = 0,
|
|
933
|
-
/**
|
|
934
|
-
* @generated from protobuf enum value: View = 1;
|
|
935
|
-
*/
|
|
936
|
-
View = 1,
|
|
937
|
-
/**
|
|
938
|
-
* @generated from protobuf enum value: Admin = 2;
|
|
939
|
-
*/
|
|
940
|
-
Admin = 2
|
|
941
|
-
}
|
|
942
954
|
declare class Characteristic$Type extends MessageType<Characteristic> {
|
|
943
955
|
constructor();
|
|
944
956
|
create(value?: PartialMessage<Characteristic>): Characteristic;
|
|
@@ -999,6 +1011,16 @@ declare class Map$Type extends MessageType<Map> {
|
|
|
999
1011
|
* @generated MessageType for protobuf message proto.models.Map
|
|
1000
1012
|
*/
|
|
1001
1013
|
export declare const Map: Map$Type;
|
|
1014
|
+
declare class Role$Type extends MessageType<Role> {
|
|
1015
|
+
constructor();
|
|
1016
|
+
create(value?: PartialMessage<Role>): Role;
|
|
1017
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Role): Role;
|
|
1018
|
+
internalBinaryWrite(message: Role, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* @generated MessageType for protobuf message proto.models.Role
|
|
1022
|
+
*/
|
|
1023
|
+
export declare const Role: Role$Type;
|
|
1002
1024
|
declare class User$Type extends MessageType<User> {
|
|
1003
1025
|
constructor();
|
|
1004
1026
|
create(value?: PartialMessage<User>): User;
|
package/dist/models/models.js
CHANGED
|
@@ -338,24 +338,6 @@ export var QualifierEvent_LeaderboardSort;
|
|
|
338
338
|
*/
|
|
339
339
|
QualifierEvent_LeaderboardSort[QualifierEvent_LeaderboardSort["GoodCutsTarget"] = 14] = "GoodCutsTarget";
|
|
340
340
|
})(QualifierEvent_LeaderboardSort = QualifierEvent_LeaderboardSort || (QualifierEvent_LeaderboardSort = {}));
|
|
341
|
-
/**
|
|
342
|
-
* @generated from protobuf enum proto.models.Permissions
|
|
343
|
-
*/
|
|
344
|
-
export var Permissions;
|
|
345
|
-
(function (Permissions) {
|
|
346
|
-
/**
|
|
347
|
-
* @generated from protobuf enum value: None = 0;
|
|
348
|
-
*/
|
|
349
|
-
Permissions[Permissions["None"] = 0] = "None";
|
|
350
|
-
/**
|
|
351
|
-
* @generated from protobuf enum value: View = 1;
|
|
352
|
-
*/
|
|
353
|
-
Permissions[Permissions["View"] = 1] = "View";
|
|
354
|
-
/**
|
|
355
|
-
* @generated from protobuf enum value: Admin = 2;
|
|
356
|
-
*/
|
|
357
|
-
Permissions[Permissions["Admin"] = 2] = "Admin";
|
|
358
|
-
})(Permissions = Permissions || (Permissions = {}));
|
|
359
341
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
360
342
|
class Characteristic$Type extends MessageType {
|
|
361
343
|
constructor() {
|
|
@@ -801,6 +783,81 @@ class Map$Type extends MessageType {
|
|
|
801
783
|
*/
|
|
802
784
|
export const Map = new Map$Type();
|
|
803
785
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
786
|
+
class Role$Type extends MessageType {
|
|
787
|
+
constructor() {
|
|
788
|
+
super("proto.models.Role", [
|
|
789
|
+
{ no: 1, name: "guid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
790
|
+
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
791
|
+
{ no: 3, name: "role_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
792
|
+
{ no: 4, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
793
|
+
{ no: 5, name: "permissions", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
794
|
+
]);
|
|
795
|
+
}
|
|
796
|
+
create(value) {
|
|
797
|
+
const message = { guid: "", name: "", roleId: "", tournamentId: "", permissions: [] };
|
|
798
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
799
|
+
if (value !== undefined)
|
|
800
|
+
reflectionMergePartial(this, message, value);
|
|
801
|
+
return message;
|
|
802
|
+
}
|
|
803
|
+
internalBinaryRead(reader, length, options, target) {
|
|
804
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
805
|
+
while (reader.pos < end) {
|
|
806
|
+
let [fieldNo, wireType] = reader.tag();
|
|
807
|
+
switch (fieldNo) {
|
|
808
|
+
case /* string guid */ 1:
|
|
809
|
+
message.guid = reader.string();
|
|
810
|
+
break;
|
|
811
|
+
case /* string name */ 2:
|
|
812
|
+
message.name = reader.string();
|
|
813
|
+
break;
|
|
814
|
+
case /* string role_id */ 3:
|
|
815
|
+
message.roleId = reader.string();
|
|
816
|
+
break;
|
|
817
|
+
case /* string tournament_id */ 4:
|
|
818
|
+
message.tournamentId = reader.string();
|
|
819
|
+
break;
|
|
820
|
+
case /* repeated string permissions */ 5:
|
|
821
|
+
message.permissions.push(reader.string());
|
|
822
|
+
break;
|
|
823
|
+
default:
|
|
824
|
+
let u = options.readUnknownField;
|
|
825
|
+
if (u === "throw")
|
|
826
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
827
|
+
let d = reader.skip(wireType);
|
|
828
|
+
if (u !== false)
|
|
829
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
return message;
|
|
833
|
+
}
|
|
834
|
+
internalBinaryWrite(message, writer, options) {
|
|
835
|
+
/* string guid = 1; */
|
|
836
|
+
if (message.guid !== "")
|
|
837
|
+
writer.tag(1, WireType.LengthDelimited).string(message.guid);
|
|
838
|
+
/* string name = 2; */
|
|
839
|
+
if (message.name !== "")
|
|
840
|
+
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
|
841
|
+
/* string role_id = 3; */
|
|
842
|
+
if (message.roleId !== "")
|
|
843
|
+
writer.tag(3, WireType.LengthDelimited).string(message.roleId);
|
|
844
|
+
/* string tournament_id = 4; */
|
|
845
|
+
if (message.tournamentId !== "")
|
|
846
|
+
writer.tag(4, WireType.LengthDelimited).string(message.tournamentId);
|
|
847
|
+
/* repeated string permissions = 5; */
|
|
848
|
+
for (let i = 0; i < message.permissions.length; i++)
|
|
849
|
+
writer.tag(5, WireType.LengthDelimited).string(message.permissions[i]);
|
|
850
|
+
let u = options.writeUnknownFields;
|
|
851
|
+
if (u !== false)
|
|
852
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
853
|
+
return writer;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* @generated MessageType for protobuf message proto.models.Role
|
|
858
|
+
*/
|
|
859
|
+
export const Role = new Role$Type();
|
|
860
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
804
861
|
class User$Type extends MessageType {
|
|
805
862
|
constructor() {
|
|
806
863
|
super("proto.models.User", [
|
|
@@ -816,12 +873,11 @@ class User$Type extends MessageType {
|
|
|
816
873
|
{ no: 10, name: "stream_delay_ms", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
817
874
|
{ no: 11, name: "stream_sync_start_ms", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
818
875
|
{ no: 12, name: "discord_info", kind: "message", T: () => User_DiscordInfo },
|
|
819
|
-
{ no: 13, name: "user_image", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
|
820
|
-
{ no: 14, name: "permissions", kind: "enum", T: () => ["proto.models.Permissions", Permissions] }
|
|
876
|
+
{ no: 13, name: "user_image", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
|
821
877
|
]);
|
|
822
878
|
}
|
|
823
879
|
create(value) {
|
|
824
|
-
const message = { guid: "", name: "", platformId: "", clientType: 0, teamId: "", playState: 0, downloadState: 0, modList: [], streamDelayMs: 0n, streamSyncStartMs: 0n, userImage: new Uint8Array(0)
|
|
880
|
+
const message = { guid: "", name: "", platformId: "", clientType: 0, teamId: "", playState: 0, downloadState: 0, modList: [], streamDelayMs: 0n, streamSyncStartMs: 0n, userImage: new Uint8Array(0) };
|
|
825
881
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
826
882
|
if (value !== undefined)
|
|
827
883
|
reflectionMergePartial(this, message, value);
|
|
@@ -871,9 +927,6 @@ class User$Type extends MessageType {
|
|
|
871
927
|
case /* bytes user_image */ 13:
|
|
872
928
|
message.userImage = reader.bytes();
|
|
873
929
|
break;
|
|
874
|
-
case /* proto.models.Permissions permissions */ 14:
|
|
875
|
-
message.permissions = reader.int32();
|
|
876
|
-
break;
|
|
877
930
|
default:
|
|
878
931
|
let u = options.readUnknownField;
|
|
879
932
|
if (u === "throw")
|
|
@@ -925,9 +978,6 @@ class User$Type extends MessageType {
|
|
|
925
978
|
/* bytes user_image = 13; */
|
|
926
979
|
if (message.userImage.length)
|
|
927
980
|
writer.tag(13, WireType.LengthDelimited).bytes(message.userImage);
|
|
928
|
-
/* proto.models.Permissions permissions = 14; */
|
|
929
|
-
if (message.permissions !== 0)
|
|
930
|
-
writer.tag(14, WireType.Varint).int32(message.permissions);
|
|
931
981
|
let u = options.writeUnknownFields;
|
|
932
982
|
if (u !== false)
|
|
933
983
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1374,11 +1424,13 @@ class Tournament_TournamentSettings$Type extends MessageType {
|
|
|
1374
1424
|
{ no: 8, name: "pools", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Tournament_TournamentSettings_Pool },
|
|
1375
1425
|
{ no: 9, name: "show_tournament_button", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1376
1426
|
{ no: 10, name: "show_qualifier_button", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1377
|
-
{ no: 11, name: "allow_unauthorized_view", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1427
|
+
{ no: 11, name: "allow_unauthorized_view", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1428
|
+
{ no: 12, name: "roles", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Role },
|
|
1429
|
+
{ no: 13, name: "my_permissions", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
1378
1430
|
]);
|
|
1379
1431
|
}
|
|
1380
1432
|
create(value) {
|
|
1381
|
-
const message = { tournamentName: "", tournamentImage: new Uint8Array(0), enableTeams: false, enablePools: false, teams: [], scoreUpdateFrequency: 0, bannedMods: [], pools: [], showTournamentButton: false, showQualifierButton: false, allowUnauthorizedView: false };
|
|
1433
|
+
const message = { tournamentName: "", tournamentImage: new Uint8Array(0), enableTeams: false, enablePools: false, teams: [], scoreUpdateFrequency: 0, bannedMods: [], pools: [], showTournamentButton: false, showQualifierButton: false, allowUnauthorizedView: false, roles: [], myPermissions: [] };
|
|
1382
1434
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1383
1435
|
if (value !== undefined)
|
|
1384
1436
|
reflectionMergePartial(this, message, value);
|
|
@@ -1422,6 +1474,12 @@ class Tournament_TournamentSettings$Type extends MessageType {
|
|
|
1422
1474
|
case /* bool allow_unauthorized_view */ 11:
|
|
1423
1475
|
message.allowUnauthorizedView = reader.bool();
|
|
1424
1476
|
break;
|
|
1477
|
+
case /* repeated proto.models.Role roles */ 12:
|
|
1478
|
+
message.roles.push(Role.internalBinaryRead(reader, reader.uint32(), options));
|
|
1479
|
+
break;
|
|
1480
|
+
case /* repeated string my_permissions */ 13:
|
|
1481
|
+
message.myPermissions.push(reader.string());
|
|
1482
|
+
break;
|
|
1425
1483
|
default:
|
|
1426
1484
|
let u = options.readUnknownField;
|
|
1427
1485
|
if (u === "throw")
|
|
@@ -1467,6 +1525,12 @@ class Tournament_TournamentSettings$Type extends MessageType {
|
|
|
1467
1525
|
/* bool allow_unauthorized_view = 11; */
|
|
1468
1526
|
if (message.allowUnauthorizedView !== false)
|
|
1469
1527
|
writer.tag(11, WireType.Varint).bool(message.allowUnauthorizedView);
|
|
1528
|
+
/* repeated proto.models.Role roles = 12; */
|
|
1529
|
+
for (let i = 0; i < message.roles.length; i++)
|
|
1530
|
+
Role.internalBinaryWrite(message.roles[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
1531
|
+
/* repeated string my_permissions = 13; */
|
|
1532
|
+
for (let i = 0; i < message.myPermissions.length; i++)
|
|
1533
|
+
writer.tag(13, WireType.LengthDelimited).string(message.myPermissions[i]);
|
|
1470
1534
|
let u = options.writeUnknownFields;
|
|
1471
1535
|
if (u !== false)
|
|
1472
1536
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
package/dist/models/packets.d.ts
CHANGED
|
@@ -66,6 +66,12 @@ export interface Packet {
|
|
|
66
66
|
* @generated from protobuf oneof: packet
|
|
67
67
|
*/
|
|
68
68
|
packet: {
|
|
69
|
+
oneofKind: "heartbeat";
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: bool heartbeat = 11;
|
|
72
|
+
*/
|
|
73
|
+
heartbeat: boolean;
|
|
74
|
+
} | {
|
|
69
75
|
oneofKind: "acknowledgement";
|
|
70
76
|
/**
|
|
71
77
|
* @generated from protobuf field: proto.packets.Acknowledgement acknowledgement = 4;
|
package/dist/models/packets.js
CHANGED
|
@@ -133,6 +133,7 @@ class Packet$Type extends MessageType {
|
|
|
133
133
|
{ no: 1, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
134
134
|
{ no: 2, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
135
135
|
{ no: 3, name: "from", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
136
|
+
{ no: 11, name: "heartbeat", kind: "scalar", oneof: "packet", T: 8 /*ScalarType.BOOL*/ },
|
|
136
137
|
{ no: 4, name: "acknowledgement", kind: "message", oneof: "packet", T: () => Acknowledgement },
|
|
137
138
|
{ no: 5, name: "forwarding_packet", kind: "message", oneof: "packet", T: () => ForwardingPacket },
|
|
138
139
|
{ no: 6, name: "command", kind: "message", oneof: "packet", T: () => Command },
|
|
@@ -163,6 +164,12 @@ class Packet$Type extends MessageType {
|
|
|
163
164
|
case /* string from */ 3:
|
|
164
165
|
message.from = reader.string();
|
|
165
166
|
break;
|
|
167
|
+
case /* bool heartbeat */ 11:
|
|
168
|
+
message.packet = {
|
|
169
|
+
oneofKind: "heartbeat",
|
|
170
|
+
heartbeat: reader.bool()
|
|
171
|
+
};
|
|
172
|
+
break;
|
|
166
173
|
case /* proto.packets.Acknowledgement acknowledgement */ 4:
|
|
167
174
|
message.packet = {
|
|
168
175
|
oneofKind: "acknowledgement",
|
|
@@ -226,6 +233,9 @@ class Packet$Type extends MessageType {
|
|
|
226
233
|
/* string from = 3; */
|
|
227
234
|
if (message.from !== "")
|
|
228
235
|
writer.tag(3, WireType.LengthDelimited).string(message.from);
|
|
236
|
+
/* bool heartbeat = 11; */
|
|
237
|
+
if (message.packet.oneofKind === "heartbeat")
|
|
238
|
+
writer.tag(11, WireType.Varint).bool(message.packet.heartbeat);
|
|
229
239
|
/* proto.packets.Acknowledgement acknowledgement = 4; */
|
|
230
240
|
if (message.packet.oneofKind === "acknowledgement")
|
|
231
241
|
Acknowledgement.internalBinaryWrite(message.packet.acknowledgement, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|