moons-ta-client 1.1.14 → 1.2.1
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 +3 -2
- package/dist/constants.js +3 -2
- package/dist/index.d.ts +351 -202
- package/dist/index.esm.js +1289 -678
- package/dist/models/commands.d.ts +42 -37
- package/dist/models/commands.js +55 -51
- package/dist/models/models.d.ts +52 -34
- package/dist/models/models.js +125 -68
- package/dist/models/packets.d.ts +6 -0
- package/dist/models/packets.js +10 -0
- package/dist/models/pushes.d.ts +8 -0
- package/dist/models/pushes.js +16 -2
- package/dist/models/requests.d.ts +200 -77
- package/dist/models/requests.js +433 -178
- package/dist/models/responses.d.ts +12 -34
- package/dist/models/responses.js +38 -89
- package/dist/tournament-assistant-client.d.ts +26 -18
- package/dist/tournament-assistant-client.js +234 -75
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ import { LeaderboardEntry } from './models.js';
|
|
|
8
8
|
import { State } from './models.js';
|
|
9
9
|
import { CoreServer } from './models.js';
|
|
10
10
|
import { Tournament } from './models.js';
|
|
11
|
-
import { Permissions } from './models.js';
|
|
12
11
|
import { QualifierEvent } from './models.js';
|
|
13
12
|
import { Match } from './models.js';
|
|
14
13
|
import { User } from './models.js';
|
|
@@ -191,12 +190,6 @@ export interface Response {
|
|
|
191
190
|
* @generated from protobuf field: proto.packets.Response.RefundAttempts refund_attempts = 29;
|
|
192
191
|
*/
|
|
193
192
|
refundAttempts: Response_RefundAttempts;
|
|
194
|
-
} | {
|
|
195
|
-
oneofKind: "showColorForStreamSync";
|
|
196
|
-
/**
|
|
197
|
-
* @generated from protobuf field: proto.packets.Response.ShowColorForStreamSync show_color_for_stream_sync = 30;
|
|
198
|
-
*/
|
|
199
|
-
showColorForStreamSync: Response_ShowColorForStreamSync;
|
|
200
193
|
} | {
|
|
201
194
|
oneofKind: undefined;
|
|
202
195
|
};
|
|
@@ -307,9 +300,9 @@ export interface Response_AddAuthorizedUser {
|
|
|
307
300
|
*/
|
|
308
301
|
discordId: string;
|
|
309
302
|
/**
|
|
310
|
-
* @generated from protobuf field:
|
|
303
|
+
* @generated from protobuf field: repeated string roles = 3;
|
|
311
304
|
*/
|
|
312
|
-
|
|
305
|
+
roles: string[];
|
|
313
306
|
}
|
|
314
307
|
/**
|
|
315
308
|
* @generated from protobuf message proto.packets.Response.UpdateAuthorizedUser
|
|
@@ -324,9 +317,9 @@ export interface Response_UpdateAuthorizedUser {
|
|
|
324
317
|
*/
|
|
325
318
|
discordId: string;
|
|
326
319
|
/**
|
|
327
|
-
* @generated from protobuf field:
|
|
320
|
+
* @generated from protobuf field: repeated string roles = 3;
|
|
328
321
|
*/
|
|
329
|
-
|
|
322
|
+
roles: string[];
|
|
330
323
|
}
|
|
331
324
|
/**
|
|
332
325
|
* @generated from protobuf message proto.packets.Response.RemoveAuthorizedUser
|
|
@@ -341,9 +334,9 @@ export interface Response_RemoveAuthorizedUser {
|
|
|
341
334
|
*/
|
|
342
335
|
discordId: string;
|
|
343
336
|
/**
|
|
344
|
-
* @generated from protobuf field:
|
|
337
|
+
* @generated from protobuf field: repeated string roles = 3;
|
|
345
338
|
*/
|
|
346
|
-
|
|
339
|
+
roles: string[];
|
|
347
340
|
}
|
|
348
341
|
/**
|
|
349
342
|
* @generated from protobuf message proto.packets.Response.GetAuthorizedUsers
|
|
@@ -375,9 +368,9 @@ export interface Response_GetAuthorizedUsers_AuthroizedUser {
|
|
|
375
368
|
*/
|
|
376
369
|
discordAvatarUrl: string;
|
|
377
370
|
/**
|
|
378
|
-
* @generated from protobuf field:
|
|
371
|
+
* @generated from protobuf field: repeated string roles = 4;
|
|
379
372
|
*/
|
|
380
|
-
|
|
373
|
+
roles: string[];
|
|
381
374
|
}
|
|
382
375
|
/**
|
|
383
376
|
* @generated from protobuf message proto.packets.Response.GetDiscordInfo
|
|
@@ -531,6 +524,10 @@ export interface Response_LoadSong {
|
|
|
531
524
|
* @generated from protobuf field: string level_id = 1;
|
|
532
525
|
*/
|
|
533
526
|
levelId: string;
|
|
527
|
+
/**
|
|
528
|
+
* @generated from protobuf field: string message = 2;
|
|
529
|
+
*/
|
|
530
|
+
message: string;
|
|
534
531
|
}
|
|
535
532
|
/**
|
|
536
533
|
* @generated from protobuf message proto.packets.Response.PreloadImageForStreamSync
|
|
@@ -612,15 +609,6 @@ export interface Response_RefundAttempts {
|
|
|
612
609
|
*/
|
|
613
610
|
message: string;
|
|
614
611
|
}
|
|
615
|
-
/**
|
|
616
|
-
* @generated from protobuf message proto.packets.Response.ShowColorForStreamSync
|
|
617
|
-
*/
|
|
618
|
-
export interface Response_ShowColorForStreamSync {
|
|
619
|
-
/**
|
|
620
|
-
* @generated from protobuf field: string message = 1;
|
|
621
|
-
*/
|
|
622
|
-
message: string;
|
|
623
|
-
}
|
|
624
612
|
/**
|
|
625
613
|
* @generated from protobuf enum proto.packets.Response.ResponseType
|
|
626
614
|
*/
|
|
@@ -934,14 +922,4 @@ declare class Response_RefundAttempts$Type extends MessageType<Response_RefundAt
|
|
|
934
922
|
* @generated MessageType for protobuf message proto.packets.Response.RefundAttempts
|
|
935
923
|
*/
|
|
936
924
|
export declare const Response_RefundAttempts: Response_RefundAttempts$Type;
|
|
937
|
-
declare class Response_ShowColorForStreamSync$Type extends MessageType<Response_ShowColorForStreamSync> {
|
|
938
|
-
constructor();
|
|
939
|
-
create(value?: PartialMessage<Response_ShowColorForStreamSync>): Response_ShowColorForStreamSync;
|
|
940
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_ShowColorForStreamSync): Response_ShowColorForStreamSync;
|
|
941
|
-
internalBinaryWrite(message: Response_ShowColorForStreamSync, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
942
|
-
}
|
|
943
|
-
/**
|
|
944
|
-
* @generated MessageType for protobuf message proto.packets.Response.ShowColorForStreamSync
|
|
945
|
-
*/
|
|
946
|
-
export declare const Response_ShowColorForStreamSync: Response_ShowColorForStreamSync$Type;
|
|
947
925
|
export {};
|
package/dist/models/responses.js
CHANGED
|
@@ -7,7 +7,6 @@ import { LeaderboardEntry } from './models.js';
|
|
|
7
7
|
import { State } from './models.js';
|
|
8
8
|
import { CoreServer } from './models.js';
|
|
9
9
|
import { Tournament } from './models.js';
|
|
10
|
-
import { Permissions } from './models.js';
|
|
11
10
|
import { QualifierEvent } from './models.js';
|
|
12
11
|
import { Match } from './models.js';
|
|
13
12
|
import { User } from './models.js';
|
|
@@ -77,8 +76,7 @@ class Response$Type extends MessageType {
|
|
|
77
76
|
{ no: 26, name: "get_bot_tokens_for_user", kind: "message", oneof: "details", T: () => Response_GetBotTokensForUser },
|
|
78
77
|
{ no: 27, name: "generate_bot_token", kind: "message", oneof: "details", T: () => Response_GenerateBotToken },
|
|
79
78
|
{ no: 28, name: "revoke_bot_token", kind: "message", oneof: "details", T: () => Response_RevokeBotToken },
|
|
80
|
-
{ no: 29, name: "refund_attempts", kind: "message", oneof: "details", T: () => Response_RefundAttempts }
|
|
81
|
-
{ no: 30, name: "show_color_for_stream_sync", kind: "message", oneof: "details", T: () => Response_ShowColorForStreamSync }
|
|
79
|
+
{ no: 29, name: "refund_attempts", kind: "message", oneof: "details", T: () => Response_RefundAttempts }
|
|
82
80
|
]);
|
|
83
81
|
}
|
|
84
82
|
create(value) {
|
|
@@ -261,12 +259,6 @@ class Response$Type extends MessageType {
|
|
|
261
259
|
refundAttempts: Response_RefundAttempts.internalBinaryRead(reader, reader.uint32(), options, message.details.refundAttempts)
|
|
262
260
|
};
|
|
263
261
|
break;
|
|
264
|
-
case /* proto.packets.Response.ShowColorForStreamSync show_color_for_stream_sync */ 30:
|
|
265
|
-
message.details = {
|
|
266
|
-
oneofKind: "showColorForStreamSync",
|
|
267
|
-
showColorForStreamSync: Response_ShowColorForStreamSync.internalBinaryRead(reader, reader.uint32(), options, message.details.showColorForStreamSync)
|
|
268
|
-
};
|
|
269
|
-
break;
|
|
270
262
|
default:
|
|
271
263
|
let u = options.readUnknownField;
|
|
272
264
|
if (u === "throw")
|
|
@@ -366,9 +358,6 @@ class Response$Type extends MessageType {
|
|
|
366
358
|
/* proto.packets.Response.RefundAttempts refund_attempts = 29; */
|
|
367
359
|
if (message.details.oneofKind === "refundAttempts")
|
|
368
360
|
Response_RefundAttempts.internalBinaryWrite(message.details.refundAttempts, writer.tag(29, WireType.LengthDelimited).fork(), options).join();
|
|
369
|
-
/* proto.packets.Response.ShowColorForStreamSync show_color_for_stream_sync = 30; */
|
|
370
|
-
if (message.details.oneofKind === "showColorForStreamSync")
|
|
371
|
-
Response_ShowColorForStreamSync.internalBinaryWrite(message.details.showColorForStreamSync, writer.tag(30, WireType.LengthDelimited).fork(), options).join();
|
|
372
361
|
let u = options.writeUnknownFields;
|
|
373
362
|
if (u !== false)
|
|
374
363
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -763,11 +752,11 @@ class Response_AddAuthorizedUser$Type extends MessageType {
|
|
|
763
752
|
super("proto.packets.Response.AddAuthorizedUser", [
|
|
764
753
|
{ no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
765
754
|
{ no: 2, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
766
|
-
{ no: 3, name: "
|
|
755
|
+
{ no: 3, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
767
756
|
]);
|
|
768
757
|
}
|
|
769
758
|
create(value) {
|
|
770
|
-
const message = { tournamentId: "", discordId: "",
|
|
759
|
+
const message = { tournamentId: "", discordId: "", roles: [] };
|
|
771
760
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
772
761
|
if (value !== undefined)
|
|
773
762
|
reflectionMergePartial(this, message, value);
|
|
@@ -784,8 +773,8 @@ class Response_AddAuthorizedUser$Type extends MessageType {
|
|
|
784
773
|
case /* string discord_id */ 2:
|
|
785
774
|
message.discordId = reader.string();
|
|
786
775
|
break;
|
|
787
|
-
case /*
|
|
788
|
-
message.
|
|
776
|
+
case /* repeated string roles */ 3:
|
|
777
|
+
message.roles.push(reader.string());
|
|
789
778
|
break;
|
|
790
779
|
default:
|
|
791
780
|
let u = options.readUnknownField;
|
|
@@ -805,9 +794,9 @@ class Response_AddAuthorizedUser$Type extends MessageType {
|
|
|
805
794
|
/* string discord_id = 2; */
|
|
806
795
|
if (message.discordId !== "")
|
|
807
796
|
writer.tag(2, WireType.LengthDelimited).string(message.discordId);
|
|
808
|
-
/*
|
|
809
|
-
|
|
810
|
-
writer.tag(3, WireType.
|
|
797
|
+
/* repeated string roles = 3; */
|
|
798
|
+
for (let i = 0; i < message.roles.length; i++)
|
|
799
|
+
writer.tag(3, WireType.LengthDelimited).string(message.roles[i]);
|
|
811
800
|
let u = options.writeUnknownFields;
|
|
812
801
|
if (u !== false)
|
|
813
802
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -824,11 +813,11 @@ class Response_UpdateAuthorizedUser$Type extends MessageType {
|
|
|
824
813
|
super("proto.packets.Response.UpdateAuthorizedUser", [
|
|
825
814
|
{ no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
826
815
|
{ no: 2, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
827
|
-
{ no: 3, name: "
|
|
816
|
+
{ no: 3, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
828
817
|
]);
|
|
829
818
|
}
|
|
830
819
|
create(value) {
|
|
831
|
-
const message = { tournamentId: "", discordId: "",
|
|
820
|
+
const message = { tournamentId: "", discordId: "", roles: [] };
|
|
832
821
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
833
822
|
if (value !== undefined)
|
|
834
823
|
reflectionMergePartial(this, message, value);
|
|
@@ -845,8 +834,8 @@ class Response_UpdateAuthorizedUser$Type extends MessageType {
|
|
|
845
834
|
case /* string discord_id */ 2:
|
|
846
835
|
message.discordId = reader.string();
|
|
847
836
|
break;
|
|
848
|
-
case /*
|
|
849
|
-
message.
|
|
837
|
+
case /* repeated string roles */ 3:
|
|
838
|
+
message.roles.push(reader.string());
|
|
850
839
|
break;
|
|
851
840
|
default:
|
|
852
841
|
let u = options.readUnknownField;
|
|
@@ -866,9 +855,9 @@ class Response_UpdateAuthorizedUser$Type extends MessageType {
|
|
|
866
855
|
/* string discord_id = 2; */
|
|
867
856
|
if (message.discordId !== "")
|
|
868
857
|
writer.tag(2, WireType.LengthDelimited).string(message.discordId);
|
|
869
|
-
/*
|
|
870
|
-
|
|
871
|
-
writer.tag(3, WireType.
|
|
858
|
+
/* repeated string roles = 3; */
|
|
859
|
+
for (let i = 0; i < message.roles.length; i++)
|
|
860
|
+
writer.tag(3, WireType.LengthDelimited).string(message.roles[i]);
|
|
872
861
|
let u = options.writeUnknownFields;
|
|
873
862
|
if (u !== false)
|
|
874
863
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -885,11 +874,11 @@ class Response_RemoveAuthorizedUser$Type extends MessageType {
|
|
|
885
874
|
super("proto.packets.Response.RemoveAuthorizedUser", [
|
|
886
875
|
{ no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
887
876
|
{ no: 2, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
888
|
-
{ no: 3, name: "
|
|
877
|
+
{ no: 3, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
889
878
|
]);
|
|
890
879
|
}
|
|
891
880
|
create(value) {
|
|
892
|
-
const message = { tournamentId: "", discordId: "",
|
|
881
|
+
const message = { tournamentId: "", discordId: "", roles: [] };
|
|
893
882
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
894
883
|
if (value !== undefined)
|
|
895
884
|
reflectionMergePartial(this, message, value);
|
|
@@ -906,8 +895,8 @@ class Response_RemoveAuthorizedUser$Type extends MessageType {
|
|
|
906
895
|
case /* string discord_id */ 2:
|
|
907
896
|
message.discordId = reader.string();
|
|
908
897
|
break;
|
|
909
|
-
case /*
|
|
910
|
-
message.
|
|
898
|
+
case /* repeated string roles */ 3:
|
|
899
|
+
message.roles.push(reader.string());
|
|
911
900
|
break;
|
|
912
901
|
default:
|
|
913
902
|
let u = options.readUnknownField;
|
|
@@ -927,9 +916,9 @@ class Response_RemoveAuthorizedUser$Type extends MessageType {
|
|
|
927
916
|
/* string discord_id = 2; */
|
|
928
917
|
if (message.discordId !== "")
|
|
929
918
|
writer.tag(2, WireType.LengthDelimited).string(message.discordId);
|
|
930
|
-
/*
|
|
931
|
-
|
|
932
|
-
writer.tag(3, WireType.
|
|
919
|
+
/* repeated string roles = 3; */
|
|
920
|
+
for (let i = 0; i < message.roles.length; i++)
|
|
921
|
+
writer.tag(3, WireType.LengthDelimited).string(message.roles[i]);
|
|
933
922
|
let u = options.writeUnknownFields;
|
|
934
923
|
if (u !== false)
|
|
935
924
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1001,11 +990,11 @@ class Response_GetAuthorizedUsers_AuthroizedUser$Type extends MessageType {
|
|
|
1001
990
|
{ no: 1, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1002
991
|
{ no: 2, name: "discord_username", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1003
992
|
{ no: 3, name: "discord_avatar_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1004
|
-
{ no: 4, name: "
|
|
993
|
+
{ no: 4, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
1005
994
|
]);
|
|
1006
995
|
}
|
|
1007
996
|
create(value) {
|
|
1008
|
-
const message = { discordId: "", discordUsername: "", discordAvatarUrl: "",
|
|
997
|
+
const message = { discordId: "", discordUsername: "", discordAvatarUrl: "", roles: [] };
|
|
1009
998
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1010
999
|
if (value !== undefined)
|
|
1011
1000
|
reflectionMergePartial(this, message, value);
|
|
@@ -1025,8 +1014,8 @@ class Response_GetAuthorizedUsers_AuthroizedUser$Type extends MessageType {
|
|
|
1025
1014
|
case /* string discord_avatar_url */ 3:
|
|
1026
1015
|
message.discordAvatarUrl = reader.string();
|
|
1027
1016
|
break;
|
|
1028
|
-
case /*
|
|
1029
|
-
message.
|
|
1017
|
+
case /* repeated string roles */ 4:
|
|
1018
|
+
message.roles.push(reader.string());
|
|
1030
1019
|
break;
|
|
1031
1020
|
default:
|
|
1032
1021
|
let u = options.readUnknownField;
|
|
@@ -1049,9 +1038,9 @@ class Response_GetAuthorizedUsers_AuthroizedUser$Type extends MessageType {
|
|
|
1049
1038
|
/* string discord_avatar_url = 3; */
|
|
1050
1039
|
if (message.discordAvatarUrl !== "")
|
|
1051
1040
|
writer.tag(3, WireType.LengthDelimited).string(message.discordAvatarUrl);
|
|
1052
|
-
/*
|
|
1053
|
-
|
|
1054
|
-
writer.tag(4, WireType.
|
|
1041
|
+
/* repeated string roles = 4; */
|
|
1042
|
+
for (let i = 0; i < message.roles.length; i++)
|
|
1043
|
+
writer.tag(4, WireType.LengthDelimited).string(message.roles[i]);
|
|
1055
1044
|
let u = options.writeUnknownFields;
|
|
1056
1045
|
if (u !== false)
|
|
1057
1046
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1533,11 +1522,12 @@ export const Response_LeaderboardEntries = new Response_LeaderboardEntries$Type(
|
|
|
1533
1522
|
class Response_LoadSong$Type extends MessageType {
|
|
1534
1523
|
constructor() {
|
|
1535
1524
|
super("proto.packets.Response.LoadSong", [
|
|
1536
|
-
{ no: 1, name: "level_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1525
|
+
{ no: 1, name: "level_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1526
|
+
{ no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1537
1527
|
]);
|
|
1538
1528
|
}
|
|
1539
1529
|
create(value) {
|
|
1540
|
-
const message = { levelId: "" };
|
|
1530
|
+
const message = { levelId: "", message: "" };
|
|
1541
1531
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1542
1532
|
if (value !== undefined)
|
|
1543
1533
|
reflectionMergePartial(this, message, value);
|
|
@@ -1551,6 +1541,9 @@ class Response_LoadSong$Type extends MessageType {
|
|
|
1551
1541
|
case /* string level_id */ 1:
|
|
1552
1542
|
message.levelId = reader.string();
|
|
1553
1543
|
break;
|
|
1544
|
+
case /* string message */ 2:
|
|
1545
|
+
message.message = reader.string();
|
|
1546
|
+
break;
|
|
1554
1547
|
default:
|
|
1555
1548
|
let u = options.readUnknownField;
|
|
1556
1549
|
if (u === "throw")
|
|
@@ -1566,6 +1559,9 @@ class Response_LoadSong$Type extends MessageType {
|
|
|
1566
1559
|
/* string level_id = 1; */
|
|
1567
1560
|
if (message.levelId !== "")
|
|
1568
1561
|
writer.tag(1, WireType.LengthDelimited).string(message.levelId);
|
|
1562
|
+
/* string message = 2; */
|
|
1563
|
+
if (message.message !== "")
|
|
1564
|
+
writer.tag(2, WireType.LengthDelimited).string(message.message);
|
|
1569
1565
|
let u = options.writeUnknownFields;
|
|
1570
1566
|
if (u !== false)
|
|
1571
1567
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1966,50 +1962,3 @@ class Response_RefundAttempts$Type extends MessageType {
|
|
|
1966
1962
|
* @generated MessageType for protobuf message proto.packets.Response.RefundAttempts
|
|
1967
1963
|
*/
|
|
1968
1964
|
export const Response_RefundAttempts = new Response_RefundAttempts$Type();
|
|
1969
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
1970
|
-
class Response_ShowColorForStreamSync$Type extends MessageType {
|
|
1971
|
-
constructor() {
|
|
1972
|
-
super("proto.packets.Response.ShowColorForStreamSync", [
|
|
1973
|
-
{ no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1974
|
-
]);
|
|
1975
|
-
}
|
|
1976
|
-
create(value) {
|
|
1977
|
-
const message = { message: "" };
|
|
1978
|
-
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1979
|
-
if (value !== undefined)
|
|
1980
|
-
reflectionMergePartial(this, message, value);
|
|
1981
|
-
return message;
|
|
1982
|
-
}
|
|
1983
|
-
internalBinaryRead(reader, length, options, target) {
|
|
1984
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
1985
|
-
while (reader.pos < end) {
|
|
1986
|
-
let [fieldNo, wireType] = reader.tag();
|
|
1987
|
-
switch (fieldNo) {
|
|
1988
|
-
case /* string message */ 1:
|
|
1989
|
-
message.message = reader.string();
|
|
1990
|
-
break;
|
|
1991
|
-
default:
|
|
1992
|
-
let u = options.readUnknownField;
|
|
1993
|
-
if (u === "throw")
|
|
1994
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1995
|
-
let d = reader.skip(wireType);
|
|
1996
|
-
if (u !== false)
|
|
1997
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
return message;
|
|
2001
|
-
}
|
|
2002
|
-
internalBinaryWrite(message, writer, options) {
|
|
2003
|
-
/* string message = 1; */
|
|
2004
|
-
if (message.message !== "")
|
|
2005
|
-
writer.tag(1, WireType.LengthDelimited).string(message.message);
|
|
2006
|
-
let u = options.writeUnknownFields;
|
|
2007
|
-
if (u !== false)
|
|
2008
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2009
|
-
return writer;
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
/**
|
|
2013
|
-
* @generated MessageType for protobuf message proto.packets.Response.ShowColorForStreamSync
|
|
2014
|
-
*/
|
|
2015
|
-
export const Response_ShowColorForStreamSync = new Response_ShowColorForStreamSync$Type();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CustomEventEmitter } from "./custom-event-emitter.js";
|
|
2
|
-
import { User, Match,
|
|
2
|
+
import { User, Match, CoreServer, GameplayParameters, Map, QualifierEvent_EventSettings, QualifierEvent_LeaderboardSort, Tournament_TournamentSettings_Team, Tournament_TournamentSettings_Pool, RealtimeScore, Role } from "./models/models.js";
|
|
3
3
|
import { StateManager } from "./state-manager.js";
|
|
4
4
|
import { Response, Response_Connect } from "./models/responses.js";
|
|
5
5
|
import { Request_LoadSong, Request_ShowPrompt_PromptOption } from "./models/requests.js";
|
|
@@ -43,6 +43,7 @@ type TAClientEvents = {
|
|
|
43
43
|
failedToDeleteQualifier: {};
|
|
44
44
|
};
|
|
45
45
|
export declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
46
|
+
private _imageServer;
|
|
46
47
|
stateManager: StateManager;
|
|
47
48
|
private uiVersion;
|
|
48
49
|
private client?;
|
|
@@ -55,22 +56,24 @@ export declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
55
56
|
connect(serverAddress: string, port: string): Promise<Response>;
|
|
56
57
|
disconnect(): void;
|
|
57
58
|
setAuthToken(token: string): void;
|
|
58
|
-
private
|
|
59
|
+
private uploadImage;
|
|
59
60
|
private sendCommand;
|
|
60
61
|
private sendRequest;
|
|
61
|
-
sendResponse(response: Response
|
|
62
|
-
playSong: (gameplayParameters: GameplayParameters, userIds: string[]) => void;
|
|
63
|
-
returnToMenu: (userIds: string[]) => void;
|
|
64
|
-
flipColors: (userIds: string[]) => void;
|
|
65
|
-
flipHands: (userIds: string[]) => void;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
sendResponse(response: Response): Promise<void>;
|
|
63
|
+
playSong: (tournamentId: string, gameplayParameters: GameplayParameters, userIds: string[]) => void;
|
|
64
|
+
returnToMenu: (tournamentId: string, userIds: string[]) => void;
|
|
65
|
+
flipColors: (tournamentId: string, userIds: string[]) => void;
|
|
66
|
+
flipHands: (tournamentId: string, userIds: string[]) => void;
|
|
67
|
+
disableBlueNotes: (tournamentId: string, userIds: string[]) => void;
|
|
68
|
+
disableRedNotes: (tournamentId: string, userIds: string[]) => void;
|
|
69
|
+
showLoadedImage: (tournamentId: string, userIds: string[], show?: boolean) => void;
|
|
70
|
+
showColor: (tournamentId: string, color: string, userIds: string[]) => void;
|
|
71
|
+
delayTestFinished: (tournamentId: string, userIds: string[]) => void;
|
|
69
72
|
joinTournament: (tournamentId: string) => Promise<Response>;
|
|
70
73
|
getLeaderboard: (tournamentId: string, qualifierId: string, mapId: string) => Promise<Response>;
|
|
71
|
-
loadSong: (levelId: string, userIds: string[], timeout?: number) => Promise<ResponseFromUser[]>;
|
|
72
|
-
loadImage: (bitmap: Uint8Array, userIds: string[]) => Promise<ResponseFromUser[]>;
|
|
73
|
-
showPrompt: (userIds: string[], titleText: string, bodyText: string, canClose: boolean, options: Request_ShowPrompt_PromptOption[], timer?: number) => Promise<ResponseFromUser[]>;
|
|
74
|
+
loadSong: (tournamentId: string, levelId: string, userIds: string[], timeout?: number) => Promise<ResponseFromUser[]>;
|
|
75
|
+
loadImage: (tournamentId: string, bitmap: Uint8Array, userIds: string[]) => Promise<ResponseFromUser[]>;
|
|
76
|
+
showPrompt: (tournamentId: string, userIds: string[], titleText: string, bodyText: string, canClose: boolean, options: Request_ShowPrompt_PromptOption[], timer?: number) => Promise<ResponseFromUser[]>;
|
|
74
77
|
refundAttempts: (tournamentId: string, qualifierId: string, mapId: string, platformId: string, count: number) => Promise<ResponseFromUser[]>;
|
|
75
78
|
private handlePacket;
|
|
76
79
|
updateUser: (tournamentId: string, user: User) => Promise<Response>;
|
|
@@ -80,7 +83,7 @@ export declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
80
83
|
setMatchLeader: (tournamentId: string, matchId: string, userId: string) => Promise<Response>;
|
|
81
84
|
setMatchMap: (tournamentId: string, matchId: string, map: Map) => Promise<Response>;
|
|
82
85
|
deleteMatch: (tournamentId: string, matchId: string) => Promise<Response>;
|
|
83
|
-
createQualifierEvent: (tournamentId: string,
|
|
86
|
+
createQualifierEvent: (tournamentId: string, name: string, infoChannelId: string, maps: Map[], flags: QualifierEvent_EventSettings, sort: QualifierEvent_LeaderboardSort, qualifierImage: Uint8Array) => Promise<Response>;
|
|
84
87
|
setQualifierName: (tournamentId: string, qualifierId: string, qualifierName: string) => Promise<Response>;
|
|
85
88
|
setQualifierImage: (tournamentId: string, qualifierId: string, qualifierImage: Uint8Array) => Promise<Response>;
|
|
86
89
|
setQualifierInfoChannel: (tournamentId: string, qualifierId: string, infoChannel: Channel) => Promise<Response>;
|
|
@@ -90,14 +93,14 @@ export declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
90
93
|
updateQualifierMap: (tournamentId: string, qualifierId: string, map: Map) => Promise<Response>;
|
|
91
94
|
removeQualifierMap: (tournamentId: string, qualifierId: string, mapId: string) => Promise<Response>;
|
|
92
95
|
deleteQualifierEvent: (tournamentId: string, qualifierId: string) => Promise<Response>;
|
|
93
|
-
addAuthorizedUser: (tournamentId: string, discordId: string,
|
|
96
|
+
addAuthorizedUser: (tournamentId: string, discordId: string, roleIds: string[]) => Promise<Response>;
|
|
94
97
|
removeAuthorizedUser: (tournamentId: string, discordId: string) => Promise<Response>;
|
|
95
98
|
getAuthorizedUsers: (tournamentId: string) => Promise<Response>;
|
|
96
99
|
getDiscordInfo: (tournamentId: string, discordId: string) => Promise<Response>;
|
|
97
100
|
getBotTokensForUser: (ownerDiscordId: string) => Promise<Response>;
|
|
98
101
|
generateBotToken: (username: string) => Promise<Response>;
|
|
99
102
|
revokeBotToken: (botTokenGuid: string) => Promise<Response>;
|
|
100
|
-
createTournament: (
|
|
103
|
+
createTournament: (serverAddress: string, serverName: string, serverPort: string, serverWebsocketPort: string, name: string, tournamentImage?: Uint8Array, enableTeams?: boolean, enablePools?: boolean, showTournamentButton?: boolean, showQualifierButton?: boolean, roles?: Role[], teams?: Tournament_TournamentSettings_Team[], scoreUpdateFrequency?: number, bannedMods?: string[], pools?: Tournament_TournamentSettings_Pool[], allowUnauthorizedView?: boolean) => Promise<Response>;
|
|
101
104
|
setTournamentName: (tournamentId: string, tournamentName: string) => Promise<Response>;
|
|
102
105
|
setTournamentImage: (tournamentId: string, tournamentImage: Uint8Array) => Promise<Response>;
|
|
103
106
|
setTournamentEnableTeams: (tournamentId: string, enableTeams: boolean) => Promise<Response>;
|
|
@@ -107,12 +110,17 @@ export declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
107
110
|
setTournamentAllowUnauthorizedView: (tournamentId: string, allowUnauthorizedView: boolean) => Promise<Response>;
|
|
108
111
|
setTournamentScoreUpdateFrequency: (tournamentId: string, scoreUpdateFrequency: number) => Promise<Response>;
|
|
109
112
|
setTournamentBannedMods: (tournamentId: string, bannedMods: string[]) => Promise<Response>;
|
|
110
|
-
|
|
113
|
+
addTournamentRole: (tournamentId: string, role: Role) => Promise<Response>;
|
|
114
|
+
setTournamentRoleName: (tournamentId: string, roleId: string, roleName: string) => Promise<Response>;
|
|
115
|
+
setTournamentRolePermissions: (tournamentId: string, roleId: string, permissions: string[]) => Promise<Response>;
|
|
116
|
+
removeTournamentRole: (tournamentId: string, roleId: string) => Promise<Response>;
|
|
117
|
+
addTournamentTeam: (tournamentId: string, name: string, image: Uint8Array) => Promise<Response>;
|
|
111
118
|
setTournamentTeamName: (tournamentId: string, teamId: string, teamName: string) => Promise<Response>;
|
|
112
119
|
setTournamentTeamImage: (tournamentId: string, teamId: string, teamImage: Uint8Array) => Promise<Response>;
|
|
113
120
|
removeTournamentTeam: (tournamentId: string, teamId: string) => Promise<Response>;
|
|
114
|
-
addTournamentPool: (tournamentId: string,
|
|
121
|
+
addTournamentPool: (tournamentId: string, name: string, image: Uint8Array, maps: Map[]) => Promise<Response>;
|
|
115
122
|
setTournamentPoolName: (tournamentId: string, poolId: string, poolName: string) => Promise<Response>;
|
|
123
|
+
setTournamentPoolImage: (tournamentId: string, poolId: string, image: Uint8Array) => Promise<Response>;
|
|
116
124
|
addTournamentPoolMaps: (tournamentId: string, poolId: string, maps: Map[]) => Promise<Response>;
|
|
117
125
|
updateTournamentPoolMap: (tournamentId: string, poolId: string, map: Map) => Promise<Response>;
|
|
118
126
|
removeTournamentPoolMap: (tournamentId: string, poolId: string, mapId: string) => Promise<Response>;
|