@overlayed/app 0.3.0 → 0.4.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/index.d.ts CHANGED
@@ -2,11 +2,9 @@
2
2
  /// <reference types="node" />
3
3
 
4
4
  import { Module } from 'arktype';
5
- import { NumberType } from 'arktype/internal/methods/number.ts';
6
5
  import { ObjectType } from 'arktype/internal/methods/object.ts';
7
6
  import { Out } from 'arktype/internal/attributes.ts';
8
7
  import { Process } from '@overlayed-gg/native-interface';
9
- import { StringType } from 'arktype/internal/methods/string.ts';
10
8
 
11
9
  export const enum AccessLevel {
12
10
  Default = 0,
@@ -30,806 +28,54 @@ creation_time: number;
30
28
 
31
29
  declare type BaseEvent = typeof BaseEvent.infer;
32
30
 
33
- declare const BOT_ID = "00000000-0000-0000-0000-000000000000";
34
-
35
31
  declare type CustomLoggerScope = ReturnType<typeof Logger.scope>;
36
32
 
37
- declare const DAMAGE_TEAM_TYPES: readonly ["unknown", "enemy", "friendly", "invalid"];
38
-
39
- declare const DAMAGE_TYPES: readonly ["bullet", "melee", "explosive", "falling", "regeneration", "unknown", "debris", "projectile", "downed", "gas", "thermal_explosion", "melee_gadget", "barbed_wire", "electric", "reinforcement", "frag", "paralyzed", "emp", "break", "cleanup", "interrogation", "melee-finisher", "toxic", "toxic-explosion", "pneumatic", "body-contact", "contact-explosion", "flash", "parasite-spike", "laser", "concussion", "blowtorch", "taser-shield", "reverse-friendly-fire", "self-destroyed", "area-control", "fire", "breach-kick", "break-wall", "blade-mine", "invalid"];
40
-
41
- declare type DamageTeamType = typeof DamageTeamTypeSchema.infer;
42
-
43
- declare const DamageTeamTypeSchema: StringType<"unknown" | "invalid" | "enemy" | "friendly", {}>;
44
-
45
- declare type DamageType = typeof DamageTypeSchema.infer;
46
-
47
- declare const DamageTypeSchema: StringType<"unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine", {}>;
48
-
49
- declare const DefuserDropped: ObjectType< {
50
- game: "siege";
51
- type: "defuser_dropped";
52
- creation_time: number;
53
- content: {
54
- player_id: number;
55
- };
56
- }, {}>;
57
-
58
- declare type DefuserDroppedEvent = typeof DefuserDropped.infer;
59
-
60
- declare const DefuserPickedUp: ObjectType< {
61
- game: "siege";
62
- type: "defuser_picked_up";
63
- creation_time: number;
64
- content: {
65
- player_id: number;
66
- initial: boolean;
67
- };
68
- }, {}>;
33
+ declare type ErrorEvents = ErrorPipeServerError | ErrorInvalidConfigFile;
69
34
 
70
- declare type DefuserPickedUpEvent = typeof DefuserPickedUp.infer;
35
+ declare interface ErrorInvalidConfigFile extends ErrorManagerEvent {
36
+ code: "INVALID_CONFIG_FILE";
37
+ data: {
38
+ issues: string[];
39
+ filePath: string;
40
+ data: unknown;
41
+ };
42
+ }
71
43
 
72
- declare const DefuserPlanted: ObjectType< {
73
- game: "siege";
74
- type: "defuser_planted";
75
- creation_time: number;
76
- content: {
77
- player_id: number;
44
+ declare type ErrorManagerEvent = {
45
+ code: string;
46
+ message: string;
47
+ data: Record<string, any>;
48
+ timestamp: number;
78
49
  };
79
- }, {}>;
80
50
 
81
- declare type DefuserPlantedEvent = typeof DefuserPlanted.infer;
82
-
83
- declare const DefuserSabotaged: ObjectType< {
84
- game: "siege";
85
- type: "defuser_sabotaged";
86
- creation_time: number;
87
- content: {
88
- player_id: number;
51
+ declare type ErrorManagerEvents = {
52
+ fatal: FatalEvents;
53
+ error: ErrorEvents;
54
+ warning: WarningEvents;
89
55
  };
90
- }, {}>;
91
56
 
92
- declare type DefuserSabotagedEvent = typeof DefuserSabotaged.infer;
93
-
94
- declare interface ErrorEvent_2 {
95
- message: string;
96
- code: ErrorEventCode;
97
- data?: Record<string, any>;
98
- timestamp: number;
99
- }
100
-
101
- declare type ErrorEventCode = "ELEVATION_MISMATCH";
102
-
103
- declare interface ErrorManagerEvents {
104
- error: ErrorEvent_2;
105
- warning: WarningEvent;
57
+ declare interface ErrorPipeServerError extends ErrorManagerEvent {
58
+ code: "PIPE_SERVER_ERROR";
59
+ data: {
60
+ error: unknown;
61
+ };
106
62
  }
107
63
 
108
64
  declare type EventCallback<TEvent extends BaseEvent, TEventType extends EventType<TEvent>> = (event: Extract<TEvent, {
109
65
  type: TEventType;
110
66
  }>) => void;
111
67
 
112
- declare const events: Module< {
113
- event: {
114
- game: "siege";
115
- type: "local_player";
116
- creation_time: number;
117
- content: {
118
- profile_id: string;
119
- };
120
- } | {
121
- game: "siege";
122
- type: "match_started";
123
- creation_time: number;
124
- content: {
125
- game_mode: string;
126
- game_type: {
127
- id: number;
128
- value: string;
129
- };
130
- match_type: string;
131
- match_id: string;
132
- map: {
133
- id: number;
134
- name: {
135
- id: number;
136
- value: string;
137
- };
138
- time_of_day: {
139
- id: number;
140
- value: string;
141
- };
142
- };
143
- is_round_based: boolean;
144
- current_round_index: number;
145
- rounds: {
146
- index: number;
147
- rounds_until_next_segment: number;
148
- segment_size: number;
149
- segment_index: number;
150
- team_0: {
151
- role: "invalid" | "attacker" | "defender" | "both";
152
- state: number;
153
- };
154
- team_1: {
155
- role: "invalid" | "attacker" | "defender" | "both";
156
- state: number;
157
- };
158
- }[];
159
- };
160
- } | {
161
- game: "siege";
162
- type: "module_loaded";
163
- creation_time: number;
164
- } | {
165
- game: "siege";
166
- type: "module_unloaded";
167
- creation_time: number;
168
- } | {
169
- game: "siege";
170
- type: "started_queuing";
171
- creation_time: number;
172
- content: {
173
- game_mode: string;
174
- game_type: {
175
- id: number;
176
- value: string;
177
- };
178
- match_type: string;
179
- };
180
- } | {
181
- game: "siege";
182
- type: "stopped_queuing";
183
- creation_time: number;
184
- } | {
185
- game: "siege";
186
- type: "unsupported_game_version";
187
- creation_time: number;
188
- content: {
189
- hash: string | null;
190
- version: string | null;
191
- };
192
- } | {
193
- game: "siege";
194
- type: "match_ended";
195
- creation_time: number;
196
- } | {
197
- game: "siege";
198
- type: "map_changed";
199
- creation_time: number;
200
- content: {
201
- map: {
202
- id: number;
203
- name: {
204
- id: number;
205
- value: string;
206
- };
207
- time_of_day: {
208
- id: number;
209
- value: string;
210
- };
211
- };
212
- };
213
- } | {
214
- game: "siege";
215
- type: "operator_banned";
216
- creation_time: number;
217
- content: {
218
- index: number;
219
- team: 0 | 1;
220
- side: "invalid" | "attacker" | "defender" | "both";
221
- operator_name: {
222
- id: number;
223
- value: string;
224
- } | null;
225
- };
226
- } | {
227
- game: "siege";
228
- type: "round_ended";
229
- creation_time: number;
230
- content: {
231
- round_data: {
232
- index: number;
233
- rounds_until_next_segment: number;
234
- segment_size: number;
235
- segment_index: number;
236
- team_0: {
237
- role: "invalid" | "attacker" | "defender" | "both";
238
- state: number;
239
- };
240
- team_1: {
241
- role: "invalid" | "attacker" | "defender" | "both";
242
- state: number;
243
- };
244
- };
245
- damage_events: {
246
- instigator_player_id: number;
247
- receiver_player_id: number;
248
- damage_amount: number;
249
- remaining_health: number;
250
- pre_damage_health: number;
251
- max_health: number;
252
- damage_type: "unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine";
253
- damage_team_type: "unknown" | "invalid" | "enemy" | "friendly";
254
- damage_item_id: number | null;
255
- damage_time: number;
256
- }[];
257
- players: {
258
- player_id: number;
259
- final_health: number;
260
- final_life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
261
- operator_name: {
262
- id: number;
263
- value: string;
264
- } | null;
265
- }[];
266
- };
267
- } | {
268
- game: "siege";
269
- type: "phase_changed";
270
- creation_time: number;
271
- content: {
272
- phase: "intro" | "planning" | "prep" | "action" | "results" | "invalid";
273
- };
274
- } | ((In: {
275
- game: "siege";
276
- type: "player_joined";
277
- creation_time: number;
278
- content: {
279
- player_id: number;
280
- profile_id: string;
281
- is_bot: boolean;
282
- is_enemy: boolean;
283
- is_squad_member: boolean;
284
- is_local_player: boolean;
285
- username: string;
286
- side: "invalid" | "attacker" | "defender" | "both";
287
- team: 0 | 1;
288
- is_privacy_username: boolean;
289
- has_avatar_hidden: boolean;
290
- has_commend_streak: boolean;
291
- ping_id: number;
292
- match_stats: {
293
- kills: number;
294
- deaths: number;
295
- assists: number;
296
- plants: number;
297
- score: number;
298
- };
299
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
300
- ping: number;
301
- };
302
- }) => Out< {
303
- content: {
304
- starting_side: "invalid" | "attacker" | "defender" | "both";
305
- player_id: number;
306
- profile_id: string;
307
- is_bot: boolean;
308
- is_enemy: boolean;
309
- is_squad_member: boolean;
310
- is_local_player: boolean;
311
- username: string;
312
- side: "invalid" | "attacker" | "defender" | "both";
313
- team: 0 | 1;
314
- is_privacy_username: boolean;
315
- has_avatar_hidden: boolean;
316
- has_commend_streak: boolean;
317
- ping_id: number;
318
- match_stats: {
319
- kills: number;
320
- deaths: number;
321
- assists: number;
322
- plants: number;
323
- score: number;
324
- };
325
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
326
- ping: number;
327
- };
328
- game: "siege";
329
- type: "player_joined";
330
- creation_time: number;
331
- }>) | {
332
- game: "siege";
333
- type: "player_left";
334
- creation_time: number;
335
- content: {
336
- player_id: number;
337
- };
338
- } | {
339
- game: "siege";
340
- type: "player_operator_changed";
341
- creation_time: number;
342
- content: {
343
- player_id: number;
344
- operator_name: {
345
- id: number;
346
- value: string;
347
- } | null;
348
- };
349
- } | {
350
- game: "siege";
351
- type: "player_location_changed";
352
- creation_time: number;
353
- content: {
354
- player_id: number;
355
- location_name: string;
356
- };
357
- } | {
358
- game: "siege";
359
- type: "player_side_changed";
360
- creation_time: number;
361
- content: {
362
- player_id: number;
363
- side: "invalid" | "attacker" | "defender" | "both";
364
- };
365
- } | {
366
- game: "siege";
367
- type: "player_stats_changed";
368
- creation_time: number;
369
- content: {
370
- player_id: number;
371
- match_stats: {
372
- kills: number;
373
- deaths: number;
374
- assists: number;
375
- plants: number;
376
- score: number;
377
- };
378
- };
379
- } | {
380
- game: "siege";
381
- type: "player_ping_updated";
382
- creation_time: number;
383
- content: {
384
- player_id: number;
385
- ping: number;
386
- };
387
- } | {
388
- game: "siege";
389
- type: "defuser_planted";
390
- creation_time: number;
391
- content: {
392
- player_id: number;
393
- };
394
- } | {
395
- game: "siege";
396
- type: "defuser_sabotaged";
397
- creation_time: number;
398
- content: {
399
- player_id: number;
400
- };
401
- } | {
402
- game: "siege";
403
- type: "defuser_picked_up";
404
- creation_time: number;
405
- content: {
406
- player_id: number;
407
- initial: boolean;
408
- };
409
- } | {
410
- game: "siege";
411
- type: "defuser_dropped";
412
- creation_time: number;
413
- content: {
414
- player_id: number;
415
- };
416
- } | {
417
- game: "siege";
418
- type: "player_life_state_changed";
419
- creation_time: number;
420
- content: {
421
- player_id: number;
422
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
423
- };
424
- } | {
425
- game: "siege";
426
- type: "player_died";
427
- creation_time: number;
428
- content: {
429
- player_id: number;
430
- instigator_player_id: number;
431
- };
432
- } | {
433
- game: "siege";
434
- type: "player_downed";
435
- creation_time: number;
436
- content: {
437
- player_id: number;
438
- instigator_player_id: number;
439
- };
440
- } | {
441
- game: "siege";
442
- type: "player_ping_id_changed";
443
- creation_time: number;
444
- content: {
445
- player_id: number;
446
- ping_id: number;
447
- };
448
- } | {
449
- game: "siege";
450
- type: "player_team_changed";
451
- creation_time: number;
452
- content: {
453
- player_id: number;
454
- team: 0 | 1;
455
- };
456
- };
457
- local_player: {
458
- game: "siege";
459
- type: "local_player";
460
- creation_time: number;
461
- content: {
462
- profile_id: string;
463
- };
464
- };
465
- match_started: {
466
- game: "siege";
467
- type: "match_started";
468
- creation_time: number;
469
- content: {
470
- game_mode: string;
471
- game_type: {
472
- id: number;
473
- value: string;
474
- };
475
- match_type: string;
476
- match_id: string;
477
- map: {
478
- id: number;
479
- name: {
480
- id: number;
481
- value: string;
482
- };
483
- time_of_day: {
484
- id: number;
485
- value: string;
486
- };
487
- };
488
- is_round_based: boolean;
489
- current_round_index: number;
490
- rounds: {
491
- index: number;
492
- rounds_until_next_segment: number;
493
- segment_size: number;
494
- segment_index: number;
495
- team_0: {
496
- role: "invalid" | "attacker" | "defender" | "both";
497
- state: number;
498
- };
499
- team_1: {
500
- role: "invalid" | "attacker" | "defender" | "both";
501
- state: number;
502
- };
503
- }[];
504
- };
505
- };
506
- module_loaded: {
507
- game: "siege";
508
- type: "module_loaded";
509
- creation_time: number;
510
- };
511
- module_unloaded: {
512
- game: "siege";
513
- type: "module_unloaded";
514
- creation_time: number;
515
- };
516
- started_queuing: {
517
- game: "siege";
518
- type: "started_queuing";
519
- creation_time: number;
520
- content: {
521
- game_mode: string;
522
- game_type: {
523
- id: number;
524
- value: string;
525
- };
526
- match_type: string;
527
- };
528
- };
529
- stopped_queuing: {
530
- game: "siege";
531
- type: "stopped_queuing";
532
- creation_time: number;
533
- };
534
- unsupported_game_version: {
535
- game: "siege";
536
- type: "unsupported_game_version";
537
- creation_time: number;
538
- content: {
539
- hash: string | null;
540
- version: string | null;
541
- };
542
- };
543
- match_ended: {
544
- game: "siege";
545
- type: "match_ended";
546
- creation_time: number;
547
- };
548
- map_changed: {
549
- game: "siege";
550
- type: "map_changed";
551
- creation_time: number;
552
- content: {
553
- map: {
554
- id: number;
555
- name: {
556
- id: number;
557
- value: string;
558
- };
559
- time_of_day: {
560
- id: number;
561
- value: string;
562
- };
563
- };
564
- };
565
- };
566
- operator_banned: {
567
- game: "siege";
568
- type: "operator_banned";
569
- creation_time: number;
570
- content: {
571
- index: number;
572
- team: 0 | 1;
573
- side: "invalid" | "attacker" | "defender" | "both";
574
- operator_name: {
575
- id: number;
576
- value: string;
577
- } | null;
578
- };
579
- };
580
- round_ended: {
581
- game: "siege";
582
- type: "round_ended";
583
- creation_time: number;
584
- content: {
585
- round_data: {
586
- index: number;
587
- rounds_until_next_segment: number;
588
- segment_size: number;
589
- segment_index: number;
590
- team_0: {
591
- role: "invalid" | "attacker" | "defender" | "both";
592
- state: number;
593
- };
594
- team_1: {
595
- role: "invalid" | "attacker" | "defender" | "both";
596
- state: number;
597
- };
598
- };
599
- damage_events: {
600
- instigator_player_id: number;
601
- receiver_player_id: number;
602
- damage_amount: number;
603
- remaining_health: number;
604
- pre_damage_health: number;
605
- max_health: number;
606
- damage_type: "unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine";
607
- damage_team_type: "unknown" | "invalid" | "enemy" | "friendly";
608
- damage_item_id: number | null;
609
- damage_time: number;
610
- }[];
611
- players: {
612
- player_id: number;
613
- final_health: number;
614
- final_life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
615
- operator_name: {
616
- id: number;
617
- value: string;
618
- } | null;
619
- }[];
620
- };
621
- };
622
- phase_changed: {
623
- game: "siege";
624
- type: "phase_changed";
625
- creation_time: number;
626
- content: {
627
- phase: "intro" | "planning" | "prep" | "action" | "results" | "invalid";
628
- };
629
- };
630
- player_joined: (In: {
631
- game: "siege";
632
- type: "player_joined";
633
- creation_time: number;
634
- content: {
635
- player_id: number;
636
- profile_id: string;
637
- is_bot: boolean;
638
- is_enemy: boolean;
639
- is_squad_member: boolean;
640
- is_local_player: boolean;
641
- username: string;
642
- side: "invalid" | "attacker" | "defender" | "both";
643
- team: 0 | 1;
644
- is_privacy_username: boolean;
645
- has_avatar_hidden: boolean;
646
- has_commend_streak: boolean;
647
- ping_id: number;
648
- match_stats: {
649
- kills: number;
650
- deaths: number;
651
- assists: number;
652
- plants: number;
653
- score: number;
654
- };
655
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
656
- ping: number;
657
- };
658
- }) => Out< {
659
- content: {
660
- starting_side: "invalid" | "attacker" | "defender" | "both";
661
- player_id: number;
662
- profile_id: string;
663
- is_bot: boolean;
664
- is_enemy: boolean;
665
- is_squad_member: boolean;
666
- is_local_player: boolean;
667
- username: string;
668
- side: "invalid" | "attacker" | "defender" | "both";
669
- team: 0 | 1;
670
- is_privacy_username: boolean;
671
- has_avatar_hidden: boolean;
672
- has_commend_streak: boolean;
673
- ping_id: number;
674
- match_stats: {
675
- kills: number;
676
- deaths: number;
677
- assists: number;
678
- plants: number;
679
- score: number;
680
- };
681
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
682
- ping: number;
683
- };
684
- game: "siege";
685
- type: "player_joined";
686
- creation_time: number;
687
- }>;
688
- player_left: {
689
- game: "siege";
690
- type: "player_left";
691
- creation_time: number;
692
- content: {
693
- player_id: number;
694
- };
695
- };
696
- player_operator_changed: {
697
- game: "siege";
698
- type: "player_operator_changed";
699
- creation_time: number;
700
- content: {
701
- player_id: number;
702
- operator_name: {
703
- id: number;
704
- value: string;
705
- } | null;
706
- };
707
- };
708
- player_location_changed: {
709
- game: "siege";
710
- type: "player_location_changed";
711
- creation_time: number;
712
- content: {
713
- player_id: number;
714
- location_name: string;
715
- };
716
- };
717
- player_side_changed: {
718
- game: "siege";
719
- type: "player_side_changed";
720
- creation_time: number;
721
- content: {
722
- player_id: number;
723
- side: "invalid" | "attacker" | "defender" | "both";
724
- };
725
- };
726
- player_stats_changed: {
727
- game: "siege";
728
- type: "player_stats_changed";
729
- creation_time: number;
730
- content: {
731
- player_id: number;
732
- match_stats: {
733
- kills: number;
734
- deaths: number;
735
- assists: number;
736
- plants: number;
737
- score: number;
738
- };
739
- };
740
- };
741
- player_ping_updated: {
742
- game: "siege";
743
- type: "player_ping_updated";
744
- creation_time: number;
745
- content: {
746
- player_id: number;
747
- ping: number;
748
- };
749
- };
750
- defuser_planted: {
751
- game: "siege";
752
- type: "defuser_planted";
753
- creation_time: number;
754
- content: {
755
- player_id: number;
756
- };
757
- };
758
- defuser_sabotaged: {
759
- game: "siege";
760
- type: "defuser_sabotaged";
761
- creation_time: number;
762
- content: {
763
- player_id: number;
764
- };
765
- };
766
- defuser_picked_up: {
767
- game: "siege";
768
- type: "defuser_picked_up";
769
- creation_time: number;
770
- content: {
771
- player_id: number;
772
- initial: boolean;
773
- };
774
- };
775
- defuser_dropped: {
776
- game: "siege";
777
- type: "defuser_dropped";
778
- creation_time: number;
779
- content: {
780
- player_id: number;
781
- };
782
- };
783
- player_life_state_changed: {
784
- game: "siege";
785
- type: "player_life_state_changed";
786
- creation_time: number;
787
- content: {
788
- player_id: number;
789
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
790
- };
791
- };
792
- player_died: {
793
- game: "siege";
794
- type: "player_died";
795
- creation_time: number;
796
- content: {
797
- player_id: number;
798
- instigator_player_id: number;
799
- };
800
- };
801
- player_downed: {
802
- game: "siege";
803
- type: "player_downed";
804
- creation_time: number;
805
- content: {
806
- player_id: number;
807
- instigator_player_id: number;
808
- };
809
- };
810
- player_ping_id_changed: {
811
- game: "siege";
812
- type: "player_ping_id_changed";
813
- creation_time: number;
814
- content: {
815
- player_id: number;
816
- ping_id: number;
817
- };
818
- };
819
- player_team_changed: {
820
- game: "siege";
821
- type: "player_team_changed";
822
- creation_time: number;
823
- content: {
824
- player_id: number;
825
- team: 0 | 1;
826
- };
827
- };
828
- }>;
829
-
830
68
  declare type EventType<TEvent extends BaseEvent> = TEvent["type"];
831
69
 
832
- declare const GAME_MODE_PHASES: readonly ["intro", "planning", "prep", "action", "results", "invalid"];
70
+ declare interface FatalElevationMismatch extends ErrorManagerEvent {
71
+ code: "ELEVATION_MISMATCH";
72
+ data: {
73
+ appElevated: boolean;
74
+ gameElevated: boolean;
75
+ };
76
+ }
77
+
78
+ declare type FatalEvents = FatalElevationMismatch;
833
79
 
834
80
  export declare type GameLaunchManagerEvents = {
835
81
  gameLaunchInternal: {
@@ -848,958 +94,111 @@ export declare type GameLaunchManagerEvents = {
848
94
  };
849
95
  };
850
96
 
851
- declare type GameModePhase = typeof GameModePhaseSchema.infer;
852
-
853
- declare const GameModePhaseSchema: StringType<"intro" | "planning" | "prep" | "action" | "results" | "invalid", {}>;
854
-
855
97
  declare interface GameModule<TEvents extends Record<string, BaseEvent> = Record<string, BaseEvent>, TKey extends string = string> {
856
98
  key: TKey;
857
99
  events: Module<GameModuleEvent<TEvents>>;
858
100
  }
859
101
 
860
- declare type GameModuleEvent<TEvents extends Record<string, BaseEvent>> = TEvents & {
861
- event: BaseEvent;
862
- };
863
-
864
- declare type GameModuleEventInfer<TModule extends GameModule> = TModule["events"]["event"]["infer"];
865
-
866
- declare type KeybindCallbacks = {
867
- toggle?: KeybindPressedCallback;
868
- down?: KeybindDownCallback;
869
- up?: KeybindUpCallback;
870
- };
871
-
872
- declare type KeybindDownCallback = () => string | void;
873
-
874
- declare type KeybindPressedCallback = () => string | void;
875
-
876
- declare type KeybindUpCallback = () => void;
877
-
878
- export interface KeyboardKeyEvent extends WindowEvent {
879
- key: VirtualKey;
880
- }
881
-
882
- declare const LocalPlayer: ObjectType< {
883
- game: "siege";
884
- type: "local_player";
885
- creation_time: number;
886
- content: {
887
- profile_id: string;
888
- };
889
- }, {}>;
890
-
891
- declare type LocalPlayerEvent = typeof LocalPlayer.infer;
892
-
893
- declare const Logger = {
894
- scope: (name: string) => {
895
- return {
896
- log: (...args: any[]) => {
897
- console.log(name, ...args);
898
- },
899
- error: (...args: any[]) => {
900
- console.error(name, ...args);
901
- },
902
- warn: (...args: any[]) => {
903
- console.warn(name, ...args);
904
- },
905
- info: (...args: any[]) => {
906
- console.info(name, ...args);
907
- },
908
- debug: (...args: any[]) => {
909
- console.debug(name, ...args);
910
- },
911
- captureSentryException: (...args: any[]) => {
912
- console.error(name, ...args);
913
- },
914
- sentryError: (...args: any[]) => {
915
- console.error(name, ...args);
916
- },
917
- sentryLog: (...args: any[]) => {
918
- console.log(name, ...args);
919
- },
920
- sentryWarn: (...args: any[]) => {
921
- console.warn(name, ...args);
922
- },
923
- };
924
- },
925
- error: (...args: any[]) => {
926
- console.error(name, ...args);
927
- },
928
- warn: (...args: any[]) => {
929
- console.warn(name, ...args);
930
- },
931
- info: (...args: any[]) => {
932
- console.info(name, ...args);
933
- },
934
- debug: (...args: any[]) => {
935
- console.debug(name, ...args);
936
- },
937
- captureSentryException: (...args: any[]) => {
938
- console.error(name, ...args);
939
- },
940
- sentryError: (...args: any[]) => {
941
- console.error(name, ...args);
942
- },
943
- sentryLog: (...args: any[]) => {
944
- console.log(name, ...args);
945
- },
946
- sentryWarn: (...args: any[]) => {
947
- console.warn(name, ...args);
948
- },
949
- sentryInfo: (...args: any[]) => {
950
- console.info(name, ...args);
951
- },
952
- };
953
-
954
- /** This should be kept in sync with EventEmitterManager */
955
- declare class Manager {
956
- protected logger: CustomLoggerScope;
957
- initialized: boolean;
958
- constructor(name: string);
959
- init(): void;
960
- destroy(): void;
961
- }
962
-
963
- declare const MapChanged: ObjectType< {
964
- game: "siege";
965
- type: "map_changed";
966
- creation_time: number;
967
- content: {
968
- map: {
969
- id: number;
970
- name: {
971
- id: number;
972
- value: string;
973
- };
974
- time_of_day: {
975
- id: number;
976
- value: string;
977
- };
978
- };
979
- };
980
- }, {}>;
981
-
982
- declare type MapChangedEvent = typeof MapChanged.infer;
983
-
984
- declare type MapData = typeof MapDataSchema.infer;
985
-
986
- declare const MapDataSchema: ObjectType< {
987
- id: number;
988
- name: {
989
- id: number;
990
- value: string;
991
- };
992
- time_of_day: {
993
- id: number;
994
- value: string;
995
- };
996
- }, {}>;
997
-
998
- declare const MatchEnded: ObjectType< {
999
- game: "siege";
1000
- type: "match_ended";
1001
- creation_time: number;
1002
- }, {}>;
1003
-
1004
- declare type MatchEndedEvent = typeof MatchEnded.infer;
1005
-
1006
- declare type MatchRoundData = typeof MatchRoundDataSchema.infer;
1007
-
1008
- declare const MatchRoundDataSchema: ObjectType< {
1009
- index: number;
1010
- rounds_until_next_segment: number;
1011
- segment_size: number;
1012
- segment_index: number;
1013
- team_0: {
1014
- role: "invalid" | "attacker" | "defender" | "both";
1015
- state: number;
1016
- };
1017
- team_1: {
1018
- role: "invalid" | "attacker" | "defender" | "both";
1019
- state: number;
1020
- };
1021
- }, {}>;
1022
-
1023
- declare const MatchStarted: ObjectType< {
1024
- game: "siege";
1025
- type: "match_started";
1026
- creation_time: number;
1027
- content: {
1028
- game_mode: string;
1029
- game_type: {
1030
- id: number;
1031
- value: string;
1032
- };
1033
- match_type: string;
1034
- match_id: string;
1035
- map: {
1036
- id: number;
1037
- name: {
1038
- id: number;
1039
- value: string;
1040
- };
1041
- time_of_day: {
1042
- id: number;
1043
- value: string;
1044
- };
1045
- };
1046
- is_round_based: boolean;
1047
- current_round_index: number;
1048
- rounds: {
1049
- index: number;
1050
- rounds_until_next_segment: number;
1051
- segment_size: number;
1052
- segment_index: number;
1053
- team_0: {
1054
- role: "invalid" | "attacker" | "defender" | "both";
1055
- state: number;
1056
- };
1057
- team_1: {
1058
- role: "invalid" | "attacker" | "defender" | "both";
1059
- state: number;
1060
- };
1061
- }[];
1062
- };
1063
- }, {}>;
1064
-
1065
- declare type MatchStartedEvent = typeof MatchStarted.infer;
1066
-
1067
- declare function module_2(): {
1068
- readonly key: "siege";
1069
- readonly events: Module< {
1070
- event: {
1071
- game: "siege";
1072
- type: "local_player";
1073
- creation_time: number;
1074
- content: {
1075
- profile_id: string;
1076
- };
1077
- } | {
1078
- game: "siege";
1079
- type: "match_started";
1080
- creation_time: number;
1081
- content: {
1082
- game_mode: string;
1083
- game_type: {
1084
- id: number;
1085
- value: string;
1086
- };
1087
- match_type: string;
1088
- match_id: string;
1089
- map: {
1090
- id: number;
1091
- name: {
1092
- id: number;
1093
- value: string;
1094
- };
1095
- time_of_day: {
1096
- id: number;
1097
- value: string;
1098
- };
1099
- };
1100
- is_round_based: boolean;
1101
- current_round_index: number;
1102
- rounds: {
1103
- index: number;
1104
- rounds_until_next_segment: number;
1105
- segment_size: number;
1106
- segment_index: number;
1107
- team_0: {
1108
- role: "invalid" | "attacker" | "defender" | "both";
1109
- state: number;
1110
- };
1111
- team_1: {
1112
- role: "invalid" | "attacker" | "defender" | "both";
1113
- state: number;
1114
- };
1115
- }[];
1116
- };
1117
- } | {
1118
- game: "siege";
1119
- type: "module_loaded";
1120
- creation_time: number;
1121
- } | {
1122
- game: "siege";
1123
- type: "module_unloaded";
1124
- creation_time: number;
1125
- } | {
1126
- game: "siege";
1127
- type: "started_queuing";
1128
- creation_time: number;
1129
- content: {
1130
- game_mode: string;
1131
- game_type: {
1132
- id: number;
1133
- value: string;
1134
- };
1135
- match_type: string;
1136
- };
1137
- } | {
1138
- game: "siege";
1139
- type: "stopped_queuing";
1140
- creation_time: number;
1141
- } | {
1142
- game: "siege";
1143
- type: "unsupported_game_version";
1144
- creation_time: number;
1145
- content: {
1146
- hash: string | null;
1147
- version: string | null;
1148
- };
1149
- } | {
1150
- game: "siege";
1151
- type: "match_ended";
1152
- creation_time: number;
1153
- } | {
1154
- game: "siege";
1155
- type: "map_changed";
1156
- creation_time: number;
1157
- content: {
1158
- map: {
1159
- id: number;
1160
- name: {
1161
- id: number;
1162
- value: string;
1163
- };
1164
- time_of_day: {
1165
- id: number;
1166
- value: string;
1167
- };
1168
- };
1169
- };
1170
- } | {
1171
- game: "siege";
1172
- type: "operator_banned";
1173
- creation_time: number;
1174
- content: {
1175
- index: number;
1176
- team: 0 | 1;
1177
- side: "invalid" | "attacker" | "defender" | "both";
1178
- operator_name: {
1179
- id: number;
1180
- value: string;
1181
- } | null;
1182
- };
1183
- } | {
1184
- game: "siege";
1185
- type: "round_ended";
1186
- creation_time: number;
1187
- content: {
1188
- round_data: {
1189
- index: number;
1190
- rounds_until_next_segment: number;
1191
- segment_size: number;
1192
- segment_index: number;
1193
- team_0: {
1194
- role: "invalid" | "attacker" | "defender" | "both";
1195
- state: number;
1196
- };
1197
- team_1: {
1198
- role: "invalid" | "attacker" | "defender" | "both";
1199
- state: number;
1200
- };
1201
- };
1202
- damage_events: {
1203
- instigator_player_id: number;
1204
- receiver_player_id: number;
1205
- damage_amount: number;
1206
- remaining_health: number;
1207
- pre_damage_health: number;
1208
- max_health: number;
1209
- damage_type: "unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine";
1210
- damage_team_type: "unknown" | "invalid" | "enemy" | "friendly";
1211
- damage_item_id: number | null;
1212
- damage_time: number;
1213
- }[];
1214
- players: {
1215
- player_id: number;
1216
- final_health: number;
1217
- final_life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1218
- operator_name: {
1219
- id: number;
1220
- value: string;
1221
- } | null;
1222
- }[];
1223
- };
1224
- } | {
1225
- game: "siege";
1226
- type: "phase_changed";
1227
- creation_time: number;
1228
- content: {
1229
- phase: "intro" | "planning" | "prep" | "action" | "results" | "invalid";
1230
- };
1231
- } | ((In: {
1232
- game: "siege";
1233
- type: "player_joined";
1234
- creation_time: number;
1235
- content: {
1236
- player_id: number;
1237
- profile_id: string;
1238
- is_bot: boolean;
1239
- is_enemy: boolean;
1240
- is_squad_member: boolean;
1241
- is_local_player: boolean;
1242
- username: string;
1243
- side: "invalid" | "attacker" | "defender" | "both";
1244
- team: 0 | 1;
1245
- is_privacy_username: boolean;
1246
- has_avatar_hidden: boolean;
1247
- has_commend_streak: boolean;
1248
- ping_id: number;
1249
- match_stats: {
1250
- kills: number;
1251
- deaths: number;
1252
- assists: number;
1253
- plants: number;
1254
- score: number;
1255
- };
1256
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1257
- ping: number;
1258
- };
1259
- }) => Out< {
1260
- content: {
1261
- starting_side: "invalid" | "attacker" | "defender" | "both";
1262
- player_id: number;
1263
- profile_id: string;
1264
- is_bot: boolean;
1265
- is_enemy: boolean;
1266
- is_squad_member: boolean;
1267
- is_local_player: boolean;
1268
- username: string;
1269
- side: "invalid" | "attacker" | "defender" | "both";
1270
- team: 0 | 1;
1271
- is_privacy_username: boolean;
1272
- has_avatar_hidden: boolean;
1273
- has_commend_streak: boolean;
1274
- ping_id: number;
1275
- match_stats: {
1276
- kills: number;
1277
- deaths: number;
1278
- assists: number;
1279
- plants: number;
1280
- score: number;
1281
- };
1282
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1283
- ping: number;
1284
- };
1285
- game: "siege";
1286
- type: "player_joined";
1287
- creation_time: number;
1288
- }>) | {
1289
- game: "siege";
1290
- type: "player_left";
1291
- creation_time: number;
1292
- content: {
1293
- player_id: number;
1294
- };
1295
- } | {
1296
- game: "siege";
1297
- type: "player_operator_changed";
1298
- creation_time: number;
1299
- content: {
1300
- player_id: number;
1301
- operator_name: {
1302
- id: number;
1303
- value: string;
1304
- } | null;
1305
- };
1306
- } | {
1307
- game: "siege";
1308
- type: "player_location_changed";
1309
- creation_time: number;
1310
- content: {
1311
- player_id: number;
1312
- location_name: string;
1313
- };
1314
- } | {
1315
- game: "siege";
1316
- type: "player_side_changed";
1317
- creation_time: number;
1318
- content: {
1319
- player_id: number;
1320
- side: "invalid" | "attacker" | "defender" | "both";
1321
- };
1322
- } | {
1323
- game: "siege";
1324
- type: "player_stats_changed";
1325
- creation_time: number;
1326
- content: {
1327
- player_id: number;
1328
- match_stats: {
1329
- kills: number;
1330
- deaths: number;
1331
- assists: number;
1332
- plants: number;
1333
- score: number;
1334
- };
1335
- };
1336
- } | {
1337
- game: "siege";
1338
- type: "player_ping_updated";
1339
- creation_time: number;
1340
- content: {
1341
- player_id: number;
1342
- ping: number;
1343
- };
1344
- } | {
1345
- game: "siege";
1346
- type: "defuser_planted";
1347
- creation_time: number;
1348
- content: {
1349
- player_id: number;
1350
- };
1351
- } | {
1352
- game: "siege";
1353
- type: "defuser_sabotaged";
1354
- creation_time: number;
1355
- content: {
1356
- player_id: number;
1357
- };
1358
- } | {
1359
- game: "siege";
1360
- type: "defuser_picked_up";
1361
- creation_time: number;
1362
- content: {
1363
- player_id: number;
1364
- initial: boolean;
1365
- };
1366
- } | {
1367
- game: "siege";
1368
- type: "defuser_dropped";
1369
- creation_time: number;
1370
- content: {
1371
- player_id: number;
1372
- };
1373
- } | {
1374
- game: "siege";
1375
- type: "player_life_state_changed";
1376
- creation_time: number;
1377
- content: {
1378
- player_id: number;
1379
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1380
- };
1381
- } | {
1382
- game: "siege";
1383
- type: "player_died";
1384
- creation_time: number;
1385
- content: {
1386
- player_id: number;
1387
- instigator_player_id: number;
1388
- };
1389
- } | {
1390
- game: "siege";
1391
- type: "player_downed";
1392
- creation_time: number;
1393
- content: {
1394
- player_id: number;
1395
- instigator_player_id: number;
1396
- };
1397
- } | {
1398
- game: "siege";
1399
- type: "player_ping_id_changed";
1400
- creation_time: number;
1401
- content: {
1402
- player_id: number;
1403
- ping_id: number;
1404
- };
1405
- } | {
1406
- game: "siege";
1407
- type: "player_team_changed";
1408
- creation_time: number;
1409
- content: {
1410
- player_id: number;
1411
- team: 0 | 1;
1412
- };
1413
- };
1414
- local_player: {
1415
- game: "siege";
1416
- type: "local_player";
1417
- creation_time: number;
1418
- content: {
1419
- profile_id: string;
1420
- };
1421
- };
1422
- match_started: {
1423
- game: "siege";
1424
- type: "match_started";
1425
- creation_time: number;
1426
- content: {
1427
- game_mode: string;
1428
- game_type: {
1429
- id: number;
1430
- value: string;
1431
- };
1432
- match_type: string;
1433
- match_id: string;
1434
- map: {
1435
- id: number;
1436
- name: {
1437
- id: number;
1438
- value: string;
1439
- };
1440
- time_of_day: {
1441
- id: number;
1442
- value: string;
1443
- };
1444
- };
1445
- is_round_based: boolean;
1446
- current_round_index: number;
1447
- rounds: {
1448
- index: number;
1449
- rounds_until_next_segment: number;
1450
- segment_size: number;
1451
- segment_index: number;
1452
- team_0: {
1453
- role: "invalid" | "attacker" | "defender" | "both";
1454
- state: number;
1455
- };
1456
- team_1: {
1457
- role: "invalid" | "attacker" | "defender" | "both";
1458
- state: number;
1459
- };
1460
- }[];
1461
- };
1462
- };
1463
- module_loaded: {
1464
- game: "siege";
1465
- type: "module_loaded";
1466
- creation_time: number;
1467
- };
1468
- module_unloaded: {
1469
- game: "siege";
1470
- type: "module_unloaded";
1471
- creation_time: number;
1472
- };
1473
- started_queuing: {
1474
- game: "siege";
1475
- type: "started_queuing";
1476
- creation_time: number;
1477
- content: {
1478
- game_mode: string;
1479
- game_type: {
1480
- id: number;
1481
- value: string;
1482
- };
1483
- match_type: string;
1484
- };
1485
- };
1486
- stopped_queuing: {
1487
- game: "siege";
1488
- type: "stopped_queuing";
1489
- creation_time: number;
1490
- };
1491
- unsupported_game_version: {
1492
- game: "siege";
1493
- type: "unsupported_game_version";
1494
- creation_time: number;
1495
- content: {
1496
- hash: string | null;
1497
- version: string | null;
1498
- };
1499
- };
1500
- match_ended: {
1501
- game: "siege";
1502
- type: "match_ended";
1503
- creation_time: number;
1504
- };
1505
- map_changed: {
1506
- game: "siege";
1507
- type: "map_changed";
1508
- creation_time: number;
1509
- content: {
1510
- map: {
1511
- id: number;
1512
- name: {
1513
- id: number;
1514
- value: string;
1515
- };
1516
- time_of_day: {
1517
- id: number;
1518
- value: string;
1519
- };
1520
- };
1521
- };
1522
- };
1523
- operator_banned: {
1524
- game: "siege";
1525
- type: "operator_banned";
1526
- creation_time: number;
1527
- content: {
1528
- index: number;
1529
- team: 0 | 1;
1530
- side: "invalid" | "attacker" | "defender" | "both";
1531
- operator_name: {
1532
- id: number;
1533
- value: string;
1534
- } | null;
1535
- };
1536
- };
1537
- round_ended: {
1538
- game: "siege";
1539
- type: "round_ended";
1540
- creation_time: number;
1541
- content: {
1542
- round_data: {
1543
- index: number;
1544
- rounds_until_next_segment: number;
1545
- segment_size: number;
1546
- segment_index: number;
1547
- team_0: {
1548
- role: "invalid" | "attacker" | "defender" | "both";
1549
- state: number;
1550
- };
1551
- team_1: {
1552
- role: "invalid" | "attacker" | "defender" | "both";
1553
- state: number;
1554
- };
1555
- };
1556
- damage_events: {
1557
- instigator_player_id: number;
1558
- receiver_player_id: number;
1559
- damage_amount: number;
1560
- remaining_health: number;
1561
- pre_damage_health: number;
1562
- max_health: number;
1563
- damage_type: "unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine";
1564
- damage_team_type: "unknown" | "invalid" | "enemy" | "friendly";
1565
- damage_item_id: number | null;
1566
- damage_time: number;
1567
- }[];
1568
- players: {
1569
- player_id: number;
1570
- final_health: number;
1571
- final_life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1572
- operator_name: {
1573
- id: number;
1574
- value: string;
1575
- } | null;
1576
- }[];
1577
- };
1578
- };
1579
- phase_changed: {
1580
- game: "siege";
1581
- type: "phase_changed";
1582
- creation_time: number;
1583
- content: {
1584
- phase: "intro" | "planning" | "prep" | "action" | "results" | "invalid";
1585
- };
1586
- };
1587
- player_joined: (In: {
1588
- game: "siege";
1589
- type: "player_joined";
1590
- creation_time: number;
1591
- content: {
1592
- player_id: number;
1593
- profile_id: string;
1594
- is_bot: boolean;
1595
- is_enemy: boolean;
1596
- is_squad_member: boolean;
1597
- is_local_player: boolean;
1598
- username: string;
1599
- side: "invalid" | "attacker" | "defender" | "both";
1600
- team: 0 | 1;
1601
- is_privacy_username: boolean;
1602
- has_avatar_hidden: boolean;
1603
- has_commend_streak: boolean;
1604
- ping_id: number;
1605
- match_stats: {
1606
- kills: number;
1607
- deaths: number;
1608
- assists: number;
1609
- plants: number;
1610
- score: number;
1611
- };
1612
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1613
- ping: number;
1614
- };
1615
- }) => Out< {
1616
- content: {
1617
- starting_side: "invalid" | "attacker" | "defender" | "both";
1618
- player_id: number;
1619
- profile_id: string;
1620
- is_bot: boolean;
1621
- is_enemy: boolean;
1622
- is_squad_member: boolean;
1623
- is_local_player: boolean;
1624
- username: string;
1625
- side: "invalid" | "attacker" | "defender" | "both";
1626
- team: 0 | 1;
1627
- is_privacy_username: boolean;
1628
- has_avatar_hidden: boolean;
1629
- has_commend_streak: boolean;
1630
- ping_id: number;
1631
- match_stats: {
1632
- kills: number;
1633
- deaths: number;
1634
- assists: number;
1635
- plants: number;
1636
- score: number;
1637
- };
1638
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1639
- ping: number;
1640
- };
1641
- game: "siege";
1642
- type: "player_joined";
1643
- creation_time: number;
1644
- }>;
1645
- player_left: {
1646
- game: "siege";
1647
- type: "player_left";
1648
- creation_time: number;
1649
- content: {
1650
- player_id: number;
1651
- };
1652
- };
1653
- player_operator_changed: {
1654
- game: "siege";
1655
- type: "player_operator_changed";
1656
- creation_time: number;
1657
- content: {
1658
- player_id: number;
1659
- operator_name: {
1660
- id: number;
1661
- value: string;
1662
- } | null;
1663
- };
1664
- };
1665
- player_location_changed: {
1666
- game: "siege";
1667
- type: "player_location_changed";
1668
- creation_time: number;
1669
- content: {
1670
- player_id: number;
1671
- location_name: string;
1672
- };
1673
- };
1674
- player_side_changed: {
1675
- game: "siege";
1676
- type: "player_side_changed";
1677
- creation_time: number;
1678
- content: {
1679
- player_id: number;
1680
- side: "invalid" | "attacker" | "defender" | "both";
1681
- };
1682
- };
1683
- player_stats_changed: {
1684
- game: "siege";
1685
- type: "player_stats_changed";
1686
- creation_time: number;
1687
- content: {
1688
- player_id: number;
1689
- match_stats: {
1690
- kills: number;
1691
- deaths: number;
1692
- assists: number;
1693
- plants: number;
1694
- score: number;
1695
- };
1696
- };
1697
- };
1698
- player_ping_updated: {
1699
- game: "siege";
1700
- type: "player_ping_updated";
1701
- creation_time: number;
1702
- content: {
1703
- player_id: number;
1704
- ping: number;
1705
- };
1706
- };
1707
- defuser_planted: {
1708
- game: "siege";
1709
- type: "defuser_planted";
1710
- creation_time: number;
1711
- content: {
1712
- player_id: number;
1713
- };
1714
- };
1715
- defuser_sabotaged: {
1716
- game: "siege";
1717
- type: "defuser_sabotaged";
1718
- creation_time: number;
1719
- content: {
1720
- player_id: number;
1721
- };
1722
- };
1723
- defuser_picked_up: {
1724
- game: "siege";
1725
- type: "defuser_picked_up";
1726
- creation_time: number;
1727
- content: {
1728
- player_id: number;
1729
- initial: boolean;
1730
- };
1731
- };
1732
- defuser_dropped: {
1733
- game: "siege";
1734
- type: "defuser_dropped";
1735
- creation_time: number;
1736
- content: {
1737
- player_id: number;
1738
- };
1739
- };
1740
- player_life_state_changed: {
1741
- game: "siege";
1742
- type: "player_life_state_changed";
1743
- creation_time: number;
1744
- content: {
1745
- player_id: number;
1746
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
1747
- };
1748
- };
1749
- player_died: {
1750
- game: "siege";
1751
- type: "player_died";
1752
- creation_time: number;
1753
- content: {
1754
- player_id: number;
1755
- instigator_player_id: number;
1756
- };
1757
- };
1758
- player_downed: {
1759
- game: "siege";
1760
- type: "player_downed";
1761
- creation_time: number;
1762
- content: {
1763
- player_id: number;
1764
- instigator_player_id: number;
1765
- };
1766
- };
1767
- player_ping_id_changed: {
1768
- game: "siege";
1769
- type: "player_ping_id_changed";
1770
- creation_time: number;
1771
- content: {
1772
- player_id: number;
1773
- ping_id: number;
1774
- };
1775
- };
1776
- player_team_changed: {
1777
- game: "siege";
1778
- type: "player_team_changed";
1779
- creation_time: number;
1780
- content: {
1781
- player_id: number;
1782
- team: 0 | 1;
1783
- };
1784
- };
1785
- }>;
102
+ declare type GameModuleEvent<TEvents extends Record<string, BaseEvent>> = TEvents & {
103
+ event: BaseEvent;
1786
104
  };
1787
105
 
1788
- declare const ModuleLoaded: ObjectType< {
1789
- game: "siege";
1790
- type: "module_loaded";
1791
- creation_time: number;
1792
- }, {}>;
106
+ declare type GameModuleEventInfer<TModule extends GameModule> = TModule["events"]["event"]["infer"];
107
+
108
+ declare type KeybindCallbacks = {
109
+ toggle?: KeybindPressedCallback;
110
+ down?: KeybindDownCallback;
111
+ up?: KeybindUpCallback;
112
+ };
1793
113
 
1794
- declare type ModuleLoadedEvent = typeof ModuleLoaded.infer;
114
+ export declare type KeybindConfig = (typeof KeybindSchema.infer)[string];
1795
115
 
1796
- declare const ModuleUnloaded: ObjectType< {
1797
- game: "siege";
1798
- type: "module_unloaded";
1799
- creation_time: number;
116
+ declare type KeybindDownCallback = () => string | void;
117
+
118
+ declare type KeybindPressedCallback = () => string | void;
119
+
120
+ declare const KeybindSchema: ObjectType< {
121
+ [x: string]: {
122
+ keys: string[];
123
+ mode: (In: "toggle" | "hold") => Out<"toggle" | "hold">;
124
+ };
1800
125
  }, {}>;
1801
126
 
1802
- declare type ModuleUnloadedEvent = typeof ModuleUnloaded.infer;
127
+ declare type KeybindUpCallback = () => void;
128
+
129
+ export interface KeyboardKeyEvent extends WindowEvent {
130
+ key: VirtualKey;
131
+ }
132
+
133
+ declare const Logger = {
134
+ scope: (name: string) => {
135
+ return {
136
+ log: (...args: any[]) => {
137
+ console.log(name, ...args);
138
+ },
139
+ error: (...args: any[]) => {
140
+ console.error(name, ...args);
141
+ },
142
+ warn: (...args: any[]) => {
143
+ console.warn(name, ...args);
144
+ },
145
+ info: (...args: any[]) => {
146
+ console.info(name, ...args);
147
+ },
148
+ debug: (...args: any[]) => {
149
+ console.debug(name, ...args);
150
+ },
151
+ captureSentryException: (...args: any[]) => {
152
+ console.error(name, ...args);
153
+ },
154
+ sentryError: (...args: any[]) => {
155
+ console.error(name, ...args);
156
+ },
157
+ sentryLog: (...args: any[]) => {
158
+ console.log(name, ...args);
159
+ },
160
+ sentryWarn: (...args: any[]) => {
161
+ console.warn(name, ...args);
162
+ },
163
+ };
164
+ },
165
+ error: (...args: any[]) => {
166
+ console.error(name, ...args);
167
+ },
168
+ warn: (...args: any[]) => {
169
+ console.warn(name, ...args);
170
+ },
171
+ info: (...args: any[]) => {
172
+ console.info(name, ...args);
173
+ },
174
+ debug: (...args: any[]) => {
175
+ console.debug(name, ...args);
176
+ },
177
+ captureSentryException: (...args: any[]) => {
178
+ console.error(name, ...args);
179
+ },
180
+ sentryError: (...args: any[]) => {
181
+ console.error(name, ...args);
182
+ },
183
+ sentryLog: (...args: any[]) => {
184
+ console.log(name, ...args);
185
+ },
186
+ sentryWarn: (...args: any[]) => {
187
+ console.warn(name, ...args);
188
+ },
189
+ sentryInfo: (...args: any[]) => {
190
+ console.info(name, ...args);
191
+ },
192
+ };
193
+
194
+ /** This should be kept in sync with EventEmitterManager */
195
+ declare class Manager {
196
+ protected logger: CustomLoggerScope;
197
+ initialized: boolean;
198
+ constructor(name: string);
199
+ init(): void;
200
+ destroy(): void;
201
+ }
1803
202
 
1804
203
  export interface MouseButtonEvent extends WindowEvent {
1805
204
  x: number;
@@ -1811,27 +210,10 @@ export interface MouseButtonEvent extends WindowEvent {
1811
210
  key: VirtualKey;
1812
211
  }
1813
212
 
1814
- declare const OperatorBanned: ObjectType< {
1815
- game: "siege";
1816
- type: "operator_banned";
1817
- creation_time: number;
1818
- content: {
1819
- index: number;
1820
- team: 0 | 1;
1821
- side: "invalid" | "attacker" | "defender" | "both";
1822
- operator_name: {
1823
- id: number;
1824
- value: string;
1825
- } | null;
1826
- };
1827
- }, {}>;
1828
-
1829
- declare type OperatorBannedEvent = typeof OperatorBanned.infer;
1830
-
1831
213
  export declare function overlayed<TModule extends GameModule, TShortcut extends string>(data: OverlayedData<TModule, TShortcut>): OverlayedApp<TModule, TShortcut>;
1832
214
 
1833
215
  export declare type OverlayedApp<TModule extends GameModule, TKeybind extends string> = OverlayedAppGameModules<TModule> & OverlayedAppHandlers & {
1834
- keybinds: OverlayedAppKeybindHandlers<TKeybind>;
216
+ keybinds: OverlayedAppKeybindModule<TKeybind>;
1835
217
  windows: OverlayedAppWindowsModule;
1836
218
  input: OverlayedAppInputModule;
1837
219
  /**
@@ -1878,6 +260,7 @@ declare type OverlayedAppHandlers = {
1878
260
  declare type OverlayedAppHandlersMapping = {
1879
261
  error: (data: ErrorManagerEvents["error"]) => void;
1880
262
  warning: (data: ErrorManagerEvents["warning"]) => void;
263
+ fatal: (data: ErrorManagerEvents["fatal"]) => void;
1881
264
  gameLaunch: (data: GameLaunchManagerEvents["gameLaunch"]) => void;
1882
265
  gameClose: (data: GameLaunchManagerEvents["gameClose"]) => void;
1883
266
  };
@@ -1887,16 +270,93 @@ declare interface OverlayedAppInputModule {
1887
270
  raw: OverlayedAppInputModuleRaw;
1888
271
  }
1889
272
 
1890
- declare type OverlayedAppInputModuleRaw = Pick<RenderInterface, "getGlobalMouseBlock" | "getGlobalKeyboardBlock" | "getGlobalCursorOverride" | "getKeyInputBlock" | "setGlobalMouseBlock" | "setGlobalKeyboardBlock" | "setGlobalCursorOverride" | "setKeyInputBlock">;
273
+ declare type OverlayedAppInputModuleRaw = {
274
+ /**
275
+ * Block the game from receiving mouse input.
276
+ *
277
+ * @param block Whether to block mouse input.
278
+ */
279
+ setGlobalMouseBlock(block: boolean): void;
280
+ /**
281
+ * Block the game from receiving keyboard input.
282
+ *
283
+ * @param block Whether to block keyboard input.
284
+ */
285
+ setGlobalKeyboardBlock(block: boolean): void;
286
+ /**
287
+ * Show or hide the cursor.
288
+ *
289
+ * @param show Whether to show or hide the cursor.
290
+ */
291
+ setGlobalCursorOverride(show: boolean): void;
292
+ /**
293
+ * Block the game from receiving input for a specific key.
294
+ *
295
+ * @param key The key to block input for.
296
+ * @param block Whether to block input for the key.
297
+ */
298
+ setKeyInputBlock(key: VirtualKey, block: boolean): void;
299
+ /**
300
+ * Get the current state of the global mouse block.
301
+ */
302
+ getGlobalMouseBlock(): boolean;
303
+ /**
304
+ * Get the current state of the global keyboard block.
305
+ */
306
+ getGlobalKeyboardBlock(): boolean;
307
+ /**
308
+ * Get the current state of the global cursor override.
309
+ */
310
+ getGlobalCursorOverride(): boolean;
311
+ /**
312
+ * Get the current state of the key input block for a specific key.
313
+ * @param key The key to block input for.
314
+ */
315
+ getKeyInputBlock(key: VirtualKey): boolean;
316
+ };
1891
317
 
1892
- declare type OverlayedAppKeybindHandlers<TKeybind extends string> = Record<TKeybind, {
318
+ declare type OverlayedAppKeybindModule<TKeybind extends string> = Record<TKeybind, {
1893
319
  on: <TEvent extends "down" | "up" | "toggle">(event: TEvent, cb: KeybindCallbacks[TEvent]) => void;
1894
320
  }> & {
1895
- toggleRecording: (override?: boolean) => void;
321
+ /**
322
+ * Get the current user keybinds.
323
+ */
324
+ getConfig: () => OverlayedAppKeybindsConfig<TKeybind>;
325
+ /**
326
+ * Pause keybind listening. Essential for pausing keybind listening when recording new keybinds.
327
+ */
328
+ pauseKeybindListening: () => void;
329
+ /**
330
+ * Resume keybind listening. Essential for resuming keybind listening after recording new keybinds.
331
+ */
332
+ resumeKeybindListening: () => void;
333
+ /**
334
+ * Update a single keybind.
335
+ *
336
+ * @param keybind The keybind to update.
337
+ * @param keybindConfig The new keybind config.
338
+ */
339
+ updateKeybind: (keybind: TKeybind, keybindConfig: OverlayedAppKeybindsConfig<TKeybind>[TKeybind]) => void;
340
+ /**
341
+ * Bulk update keybinds.
342
+ *
343
+ * @param keybinds The keybinds to update. Keybind keys not provided will not be updated.
344
+ */
345
+ updateKeybinds: (keybinds: Partial<OverlayedAppKeybindsConfig<TKeybind>>) => void;
1896
346
  };
1897
347
 
1898
348
  declare type OverlayedAppKeybindsConfig<TKeybind extends string> = Record<TKeybind, {
349
+ /**
350
+ * - An array of [KeyboardEvent#code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
351
+ * - Whatever you configure will be the default value
352
+ * - [Here](https://www.toptal.com/developers/keycode) is a good tool to easily find the codes for a given hotkey
353
+ */
1899
354
  keys: Array<OverlayedAppKeybindsConfigKey>;
355
+ /**
356
+ * - `toggle` will trigger the callback when the key is toggled on and off
357
+ * - `hold` will trigger the callback when the key is held down
358
+ * - This can be updated at runtime
359
+ */
1900
360
  mode: OverlayedAppKeybindsConfigMode;
1901
361
  }>;
1902
362
 
@@ -1952,251 +412,6 @@ export declare interface OverridesManagerScope {
1952
412
  setKeyInputBlock: (key: number, block: boolean) => void;
1953
413
  }
1954
414
 
1955
- declare const PhaseChanged: ObjectType< {
1956
- game: "siege";
1957
- type: "phase_changed";
1958
- creation_time: number;
1959
- content: {
1960
- phase: "intro" | "planning" | "prep" | "action" | "results" | "invalid";
1961
- };
1962
- }, {}>;
1963
-
1964
- declare type PhaseChangedEvent = typeof PhaseChanged.infer;
1965
-
1966
- declare const PLAYER_LIFE_STATES: readonly ["normal", "overhealed", "low_health", "downed", "dead", "respawning"];
1967
-
1968
- declare type PlayerDamageData = typeof PlayerDamageDataSchema.infer;
1969
-
1970
- declare const PlayerDamageDataSchema: ObjectType< {
1971
- instigator_player_id: number;
1972
- receiver_player_id: number;
1973
- damage_amount: number;
1974
- remaining_health: number;
1975
- pre_damage_health: number;
1976
- max_health: number;
1977
- damage_type: "unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine";
1978
- damage_team_type: "unknown" | "invalid" | "enemy" | "friendly";
1979
- damage_item_id: number | null;
1980
- damage_time: number;
1981
- }, {}>;
1982
-
1983
- declare const PlayerDied: ObjectType< {
1984
- game: "siege";
1985
- type: "player_died";
1986
- creation_time: number;
1987
- content: {
1988
- player_id: number;
1989
- instigator_player_id: number;
1990
- };
1991
- }, {}>;
1992
-
1993
- declare type PlayerDiedEvent = typeof PlayerDied.infer;
1994
-
1995
- declare const PlayerDowned: ObjectType< {
1996
- game: "siege";
1997
- type: "player_downed";
1998
- creation_time: number;
1999
- content: {
2000
- player_id: number;
2001
- instigator_player_id: number;
2002
- };
2003
- }, {}>;
2004
-
2005
- declare type PlayerDownedEvent = typeof PlayerDowned.infer;
2006
-
2007
- declare const PlayerJoined: ObjectType<(In: {
2008
- game: "siege";
2009
- type: "player_joined";
2010
- creation_time: number;
2011
- content: {
2012
- player_id: number;
2013
- profile_id: string;
2014
- is_bot: boolean;
2015
- is_enemy: boolean;
2016
- is_squad_member: boolean;
2017
- is_local_player: boolean;
2018
- username: string;
2019
- side: "invalid" | "attacker" | "defender" | "both";
2020
- team: 0 | 1;
2021
- is_privacy_username: boolean;
2022
- has_avatar_hidden: boolean;
2023
- has_commend_streak: boolean;
2024
- ping_id: number;
2025
- match_stats: {
2026
- kills: number;
2027
- deaths: number;
2028
- assists: number;
2029
- plants: number;
2030
- score: number;
2031
- };
2032
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
2033
- ping: number;
2034
- };
2035
- }) => Out< {
2036
- content: {
2037
- starting_side: "invalid" | "attacker" | "defender" | "both";
2038
- player_id: number;
2039
- profile_id: string;
2040
- is_bot: boolean;
2041
- is_enemy: boolean;
2042
- is_squad_member: boolean;
2043
- is_local_player: boolean;
2044
- username: string;
2045
- side: "invalid" | "attacker" | "defender" | "both";
2046
- team: 0 | 1;
2047
- is_privacy_username: boolean;
2048
- has_avatar_hidden: boolean;
2049
- has_commend_streak: boolean;
2050
- ping_id: number;
2051
- match_stats: {
2052
- kills: number;
2053
- deaths: number;
2054
- assists: number;
2055
- plants: number;
2056
- score: number;
2057
- };
2058
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
2059
- ping: number;
2060
- };
2061
- game: "siege";
2062
- type: "player_joined";
2063
- creation_time: number;
2064
- }>, {}>;
2065
-
2066
- declare type PlayerJoinedEvent = typeof PlayerJoined.infer;
2067
-
2068
- declare const PlayerLeft: ObjectType< {
2069
- game: "siege";
2070
- type: "player_left";
2071
- creation_time: number;
2072
- content: {
2073
- player_id: number;
2074
- };
2075
- }, {}>;
2076
-
2077
- declare type PlayerLeftEvent = typeof PlayerLeft.infer;
2078
-
2079
- declare type PlayerLifeState = typeof PlayerLifeStateSchema.infer;
2080
-
2081
- declare const PlayerLifeStateChanged: ObjectType< {
2082
- game: "siege";
2083
- type: "player_life_state_changed";
2084
- creation_time: number;
2085
- content: {
2086
- player_id: number;
2087
- life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
2088
- };
2089
- }, {}>;
2090
-
2091
- declare type PlayerLifeStateChangedEvent = typeof PlayerLifeStateChanged.infer;
2092
-
2093
- declare const PlayerLifeStateSchema: StringType<"normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning", {}>;
2094
-
2095
- declare const PlayerLocationChanged: ObjectType< {
2096
- game: "siege";
2097
- type: "player_location_changed";
2098
- creation_time: number;
2099
- content: {
2100
- player_id: number;
2101
- location_name: string;
2102
- };
2103
- }, {}>;
2104
-
2105
- declare type PlayerLocationChangedEvent = typeof PlayerLocationChanged.infer;
2106
-
2107
- declare type PlayerMatchStatsData = typeof PlayerMatchStatsDataSchema.infer;
2108
-
2109
- declare const PlayerMatchStatsDataSchema: ObjectType< {
2110
- kills: number;
2111
- deaths: number;
2112
- assists: number;
2113
- plants: number;
2114
- score: number;
2115
- }, {}>;
2116
-
2117
- declare const PlayerOperatorChanged: ObjectType< {
2118
- game: "siege";
2119
- type: "player_operator_changed";
2120
- creation_time: number;
2121
- content: {
2122
- player_id: number;
2123
- operator_name: {
2124
- id: number;
2125
- value: string;
2126
- } | null;
2127
- };
2128
- }, {}>;
2129
-
2130
- declare type PlayerOperatorChangedEvent = typeof PlayerOperatorChanged.infer;
2131
-
2132
- declare const PlayerPingIdChanged: ObjectType< {
2133
- game: "siege";
2134
- type: "player_ping_id_changed";
2135
- creation_time: number;
2136
- content: {
2137
- player_id: number;
2138
- ping_id: number;
2139
- };
2140
- }, {}>;
2141
-
2142
- declare type PlayerPingIdChangedEvent = typeof PlayerPingIdChanged.infer;
2143
-
2144
- declare const PlayerPingUpdated: ObjectType< {
2145
- game: "siege";
2146
- type: "player_ping_updated";
2147
- creation_time: number;
2148
- content: {
2149
- player_id: number;
2150
- ping: number;
2151
- };
2152
- }, {}>;
2153
-
2154
- declare type PlayerPingUpdatedEvent = typeof PlayerPingUpdated.infer;
2155
-
2156
- declare const PlayerSideChanged: ObjectType< {
2157
- game: "siege";
2158
- type: "player_side_changed";
2159
- creation_time: number;
2160
- content: {
2161
- player_id: number;
2162
- side: "invalid" | "attacker" | "defender" | "both";
2163
- };
2164
- }, {}>;
2165
-
2166
- declare type PlayerSideChangedEvent = typeof PlayerSideChanged.infer;
2167
-
2168
- declare const PlayerStatsChanged: ObjectType< {
2169
- game: "siege";
2170
- type: "player_stats_changed";
2171
- creation_time: number;
2172
- content: {
2173
- player_id: number;
2174
- match_stats: {
2175
- kills: number;
2176
- deaths: number;
2177
- assists: number;
2178
- plants: number;
2179
- score: number;
2180
- };
2181
- };
2182
- }, {}>;
2183
-
2184
- declare type PlayerStatsChangedEvent = typeof PlayerStatsChanged.infer;
2185
-
2186
- declare const PlayerTeamChanged: ObjectType< {
2187
- game: "siege";
2188
- type: "player_team_changed";
2189
- creation_time: number;
2190
- content: {
2191
- player_id: number;
2192
- team: 0 | 1;
2193
- };
2194
- }, {}>;
2195
-
2196
- declare type PlayerTeamChangedEvent = typeof PlayerTeamChanged.infer;
2197
-
2198
- declare const ProfileId: StringType<string, {}>;
2199
-
2200
415
  declare interface RavenGame {
2201
416
  name: string;
2202
417
  identifier: RavenGameIdentifier;
@@ -2210,7 +425,7 @@ declare type RavenGameIdentifier = "siege";
2210
425
  export class RenderInterface {
2211
426
  constructor(name: String, options?: { maxWindowCount?: number; eventQueueSize?: number; access?: AccessLevel }); // default: { maxWindowCount: 10, eventQueueSize: 200, access: AccessLevel.Default }
2212
427
 
2213
- newWindow(options?: RenderWindowConstructorOptions): RenderWindow;
428
+ newWindowInternal(browserWindow: Electron.BrowserWindow, options?: RenderWindowConstructorOptions): RenderWindow;
2214
429
 
2215
430
  getGlobalMouseBlock(): boolean;
2216
431
  getGlobalKeyboardBlock(): boolean;
@@ -2311,7 +526,7 @@ export class RenderInterface {
2311
526
  removeAllListeners(eventName: "keyboardFocus"): this;
2312
527
  }
2313
528
 
2314
- declare type RenderInterfaceName = "SCC_RAINBOW";
529
+ declare type RenderInterfaceName = "OGG_SIEGE";
2315
530
 
2316
531
  export interface RenderWindow extends Electron.BrowserWindow {
2317
532
  getLayer(): number;
@@ -2335,233 +550,6 @@ export interface RenderWindowConstructorOptions extends Electron.BrowserWindowCo
2335
550
  hasCursorOverride?: boolean; // default: true
2336
551
  }
2337
552
 
2338
- declare type RoundEndData = typeof RoundEndDataSchema.infer;
2339
-
2340
- declare const RoundEndDataSchema: ObjectType< {
2341
- round_data: {
2342
- index: number;
2343
- rounds_until_next_segment: number;
2344
- segment_size: number;
2345
- segment_index: number;
2346
- team_0: {
2347
- role: "invalid" | "attacker" | "defender" | "both";
2348
- state: number;
2349
- };
2350
- team_1: {
2351
- role: "invalid" | "attacker" | "defender" | "both";
2352
- state: number;
2353
- };
2354
- };
2355
- damage_events: {
2356
- instigator_player_id: number;
2357
- receiver_player_id: number;
2358
- damage_amount: number;
2359
- remaining_health: number;
2360
- pre_damage_health: number;
2361
- max_health: number;
2362
- damage_type: "unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine";
2363
- damage_team_type: "unknown" | "invalid" | "enemy" | "friendly";
2364
- damage_item_id: number | null;
2365
- damage_time: number;
2366
- }[];
2367
- players: {
2368
- player_id: number;
2369
- final_health: number;
2370
- final_life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
2371
- operator_name: {
2372
- id: number;
2373
- value: string;
2374
- } | null;
2375
- }[];
2376
- }, {}>;
2377
-
2378
- declare const RoundEnded: ObjectType< {
2379
- game: "siege";
2380
- type: "round_ended";
2381
- creation_time: number;
2382
- content: {
2383
- round_data: {
2384
- index: number;
2385
- rounds_until_next_segment: number;
2386
- segment_size: number;
2387
- segment_index: number;
2388
- team_0: {
2389
- role: "invalid" | "attacker" | "defender" | "both";
2390
- state: number;
2391
- };
2392
- team_1: {
2393
- role: "invalid" | "attacker" | "defender" | "both";
2394
- state: number;
2395
- };
2396
- };
2397
- damage_events: {
2398
- instigator_player_id: number;
2399
- receiver_player_id: number;
2400
- damage_amount: number;
2401
- remaining_health: number;
2402
- pre_damage_health: number;
2403
- max_health: number;
2404
- damage_type: "unknown" | "invalid" | "downed" | "bullet" | "melee" | "explosive" | "falling" | "regeneration" | "debris" | "projectile" | "gas" | "thermal_explosion" | "melee_gadget" | "barbed_wire" | "electric" | "reinforcement" | "frag" | "paralyzed" | "emp" | "break" | "cleanup" | "interrogation" | "melee-finisher" | "toxic" | "toxic-explosion" | "pneumatic" | "body-contact" | "contact-explosion" | "flash" | "parasite-spike" | "laser" | "concussion" | "blowtorch" | "taser-shield" | "reverse-friendly-fire" | "self-destroyed" | "area-control" | "fire" | "breach-kick" | "break-wall" | "blade-mine";
2405
- damage_team_type: "unknown" | "invalid" | "enemy" | "friendly";
2406
- damage_item_id: number | null;
2407
- damage_time: number;
2408
- }[];
2409
- players: {
2410
- player_id: number;
2411
- final_health: number;
2412
- final_life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
2413
- operator_name: {
2414
- id: number;
2415
- value: string;
2416
- } | null;
2417
- }[];
2418
- };
2419
- }, {}>;
2420
-
2421
- declare type RoundEndedEvent = typeof RoundEnded.infer;
2422
-
2423
- declare type RoundEndPlayerData = typeof RoundEndPlayerDataSchema.infer;
2424
-
2425
- declare const RoundEndPlayerDataSchema: ObjectType< {
2426
- player_id: number;
2427
- final_health: number;
2428
- final_life_state: "normal" | "overhealed" | "low_health" | "downed" | "dead" | "respawning";
2429
- operator_name: {
2430
- id: number;
2431
- value: string;
2432
- } | null;
2433
- }, {}>;
2434
-
2435
- declare type Side = typeof SideSchema.infer;
2436
-
2437
- declare const SIDES: readonly ["attacker", "defender", "both", "invalid"];
2438
-
2439
- declare const SideSchema: StringType<"invalid" | "attacker" | "defender" | "both", {}>;
2440
-
2441
- export declare namespace Siege {
2442
- export {
2443
- BOT_ID,
2444
- ProfileId,
2445
- GAME_MODE_PHASES,
2446
- GameModePhaseSchema,
2447
- GameModePhase,
2448
- TEAMS,
2449
- TeamSchema,
2450
- Team,
2451
- SIDES,
2452
- SideSchema,
2453
- Side,
2454
- PLAYER_LIFE_STATES,
2455
- PlayerLifeStateSchema,
2456
- PlayerLifeState,
2457
- DAMAGE_TYPES,
2458
- DamageTypeSchema,
2459
- DamageType,
2460
- DAMAGE_TEAM_TYPES,
2461
- DamageTeamTypeSchema,
2462
- DamageTeamType,
2463
- TranslationSchema,
2464
- Translation,
2465
- PlayerMatchStatsDataSchema,
2466
- PlayerMatchStatsData,
2467
- PlayerDamageDataSchema,
2468
- PlayerDamageData,
2469
- MatchRoundDataSchema,
2470
- MatchRoundData,
2471
- MapDataSchema,
2472
- MapData,
2473
- RoundEndPlayerDataSchema,
2474
- RoundEndPlayerData,
2475
- RoundEndDataSchema,
2476
- RoundEndData,
2477
- LocalPlayerEvent,
2478
- MatchStartedEvent,
2479
- ModuleLoadedEvent,
2480
- ModuleUnloadedEvent,
2481
- StartedQueuingEvent,
2482
- StoppedQueueingEvent,
2483
- UnsupportedGameVersionEvent,
2484
- MatchEndedEvent,
2485
- MapChangedEvent,
2486
- OperatorBannedEvent,
2487
- RoundEndedEvent,
2488
- PhaseChangedEvent,
2489
- PlayerJoinedEvent,
2490
- PlayerLeftEvent,
2491
- PlayerOperatorChangedEvent,
2492
- PlayerLocationChangedEvent,
2493
- PlayerSideChangedEvent,
2494
- PlayerStatsChangedEvent,
2495
- PlayerPingUpdatedEvent,
2496
- DefuserPlantedEvent,
2497
- DefuserSabotagedEvent,
2498
- DefuserPickedUpEvent,
2499
- DefuserDroppedEvent,
2500
- PlayerLifeStateChangedEvent,
2501
- PlayerDiedEvent,
2502
- PlayerDownedEvent,
2503
- PlayerPingIdChangedEvent,
2504
- PlayerTeamChangedEvent,
2505
- events,
2506
- SiegeEvent,
2507
- SiegeEventType,
2508
- module_2 as module
2509
- }
2510
- }
2511
-
2512
- declare type SiegeEvent = typeof events.event.infer;
2513
-
2514
- declare type SiegeEventType = SiegeEvent["type"];
2515
-
2516
- declare const StartedQueuing: ObjectType< {
2517
- game: "siege";
2518
- type: "started_queuing";
2519
- creation_time: number;
2520
- content: {
2521
- game_mode: string;
2522
- game_type: {
2523
- id: number;
2524
- value: string;
2525
- };
2526
- match_type: string;
2527
- };
2528
- }, {}>;
2529
-
2530
- declare type StartedQueuingEvent = typeof StartedQueuing.infer;
2531
-
2532
- declare const StoppedQueueing: ObjectType< {
2533
- game: "siege";
2534
- type: "stopped_queuing";
2535
- creation_time: number;
2536
- }, {}>;
2537
-
2538
- declare type StoppedQueueingEvent = typeof StoppedQueueing.infer;
2539
-
2540
- declare type Team = typeof TeamSchema.infer;
2541
-
2542
- declare const TEAMS: readonly [0, 1];
2543
-
2544
- declare const TeamSchema: NumberType<0 | 1, {}>;
2545
-
2546
- declare type Translation = typeof TranslationSchema.infer;
2547
-
2548
- declare const TranslationSchema: ObjectType< {
2549
- id: number;
2550
- value: string;
2551
- }, {}>;
2552
-
2553
- declare const UnsupportedGameVersion: ObjectType< {
2554
- game: "siege";
2555
- type: "unsupported_game_version";
2556
- creation_time: number;
2557
- content: {
2558
- hash: string | null;
2559
- version: string | null;
2560
- };
2561
- }, {}>;
2562
-
2563
- declare type UnsupportedGameVersionEvent = typeof UnsupportedGameVersion.infer;
2564
-
2565
553
  export const enum VirtualKey {
2566
554
  LeftButton = 0x01,
2567
555
  RightButton = 0x02,
@@ -2761,14 +749,14 @@ export const enum VirtualKey {
2761
749
  OEMClear = 0xfe,
2762
750
  }
2763
751
 
2764
- declare interface WarningEvent {
2765
- message: string;
2766
- code: WarningEventCode;
2767
- data?: Record<string, any>;
2768
- timestamp: number;
2769
- }
752
+ declare type WarningEvents = WarningInvalidEvent;
2770
753
 
2771
- declare type WarningEventCode = "INVALID_EVENT";
754
+ declare interface WarningInvalidEvent extends ErrorManagerEvent {
755
+ code: "INVALID_EVENT";
756
+ data: {
757
+ summary: string;
758
+ };
759
+ }
2772
760
 
2773
761
  export interface WindowEvent {
2774
762
  window?: RenderWindow;