glitch-javascript-sdk 3.2.31 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +320 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/AdminUsers.d.ts +42 -0
- package/dist/esm/api/Multiplayer.d.ts +418 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +320 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/AdminUsersRoute.d.ts +7 -0
- package/dist/index.d.ts +456 -0
- package/package.json +1 -1
- package/src/api/AdminUsers.ts +54 -0
- package/src/api/Multiplayer.ts +517 -0
- package/src/api/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/routes/AdminUsersRoute.ts +24 -0
- package/src/routes/MultiplayerRoute.ts +25 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
/**
|
|
4
|
+
* Site-administrator user management.
|
|
5
|
+
*
|
|
6
|
+
* These endpoints back the admin dashboard user directory. They require a
|
|
7
|
+
* site-admin auth token (Super Administrator or Administrator), and
|
|
8
|
+
* impersonation additionally requires a Super Administrator token.
|
|
9
|
+
*/
|
|
10
|
+
declare class AdminUsers {
|
|
11
|
+
/**
|
|
12
|
+
* List and search all users in the system.
|
|
13
|
+
*
|
|
14
|
+
* Supported params include `search` (matches name, username, email, or id),
|
|
15
|
+
* `is_site_admin`, `is_verified`, `sort_by`, `sort_order`, `per_page`, and
|
|
16
|
+
* `page`.
|
|
17
|
+
*
|
|
18
|
+
* @param params Optional query parameters.
|
|
19
|
+
* @returns promise
|
|
20
|
+
*/
|
|
21
|
+
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve a comprehensive profile for a single user, including communities,
|
|
24
|
+
* administered titles, games played, roles, billing status, social presence,
|
|
25
|
+
* and activity counts.
|
|
26
|
+
*
|
|
27
|
+
* @param user_id The id of the user to view.
|
|
28
|
+
* @param params Optional query parameters.
|
|
29
|
+
* @returns promise
|
|
30
|
+
*/
|
|
31
|
+
static view<T>(user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
32
|
+
/**
|
|
33
|
+
* Impersonate a user. Issues a JWT for the target account so a Super
|
|
34
|
+
* Administrator can operate as that user. Administrator accounts cannot be
|
|
35
|
+
* impersonated, and every call is written to the impersonation audit log.
|
|
36
|
+
*
|
|
37
|
+
* @param user_id The id of the user to impersonate.
|
|
38
|
+
* @returns promise resolving to an access token and the impersonated user summary.
|
|
39
|
+
*/
|
|
40
|
+
static impersonate<T>(user_id: string): AxiosPromise<Response<T>>;
|
|
41
|
+
}
|
|
42
|
+
export default AdminUsers;
|
|
@@ -433,6 +433,246 @@ export interface MultiplayerVoicePollRequest {
|
|
|
433
433
|
limit?: number;
|
|
434
434
|
exclude_self?: boolean;
|
|
435
435
|
}
|
|
436
|
+
export type MultiplayerRealmStatus = 'active' | 'locked' | 'maintenance' | 'full' | 'offline';
|
|
437
|
+
export type MultiplayerZoneType = 'overworld' | 'city' | 'dungeon' | 'raid' | 'arena' | 'instanced';
|
|
438
|
+
export type MultiplayerInstanceKind = 'persistent' | 'dynamic' | 'dungeon' | 'raid' | 'arena';
|
|
439
|
+
export type MultiplayerInstanceState = 'provisioning' | 'active' | 'draining' | 'closed';
|
|
440
|
+
export type MultiplayerPresenceStatus = 'online' | 'in_queue' | 'in_world' | 'away' | 'offline';
|
|
441
|
+
export type MultiplayerMatchmakingStatus = 'queued' | 'matched' | 'canceled' | 'expired' | 'timed_out';
|
|
442
|
+
export type MultiplayerBanScope = 'title' | 'realm' | 'lobby' | 'server' | 'voice';
|
|
443
|
+
export type MultiplayerBanSource = 'manual' | 'report' | 'anticheat' | 'automated';
|
|
444
|
+
export type MultiplayerRealtimeScopeType = 'lobby' | 'voice' | 'zone' | 'instance';
|
|
445
|
+
/** A persistent world copy (shard). */
|
|
446
|
+
export interface MultiplayerRealm {
|
|
447
|
+
id: string;
|
|
448
|
+
title_id: string;
|
|
449
|
+
name: string;
|
|
450
|
+
slug?: string | null;
|
|
451
|
+
region?: string | null;
|
|
452
|
+
status: MultiplayerRealmStatus;
|
|
453
|
+
population_cap: number;
|
|
454
|
+
current_population: number;
|
|
455
|
+
recommended: boolean;
|
|
456
|
+
ruleset: MultiplayerMetadata;
|
|
457
|
+
metadata: MultiplayerMetadata;
|
|
458
|
+
last_activity_at?: string | null;
|
|
459
|
+
created_at?: string | null;
|
|
460
|
+
updated_at?: string | null;
|
|
461
|
+
}
|
|
462
|
+
/** A named area within a realm (map/continent/dungeon template). */
|
|
463
|
+
export interface MultiplayerZone {
|
|
464
|
+
id: string;
|
|
465
|
+
title_id: string;
|
|
466
|
+
realm_id: string;
|
|
467
|
+
zone_key: string;
|
|
468
|
+
display_name: string;
|
|
469
|
+
zone_type: MultiplayerZoneType;
|
|
470
|
+
is_instanced: boolean;
|
|
471
|
+
max_players_per_instance: number;
|
|
472
|
+
min_instances: number;
|
|
473
|
+
grid_cell_size: number;
|
|
474
|
+
coordinates_bounds: MultiplayerMetadata;
|
|
475
|
+
metadata: MultiplayerMetadata;
|
|
476
|
+
created_at?: string | null;
|
|
477
|
+
updated_at?: string | null;
|
|
478
|
+
}
|
|
479
|
+
/** A runtime copy of a zone, optionally bound to a game server. */
|
|
480
|
+
export interface MultiplayerInstance {
|
|
481
|
+
id: string;
|
|
482
|
+
title_id: string;
|
|
483
|
+
realm_id: string;
|
|
484
|
+
zone_id: string;
|
|
485
|
+
server_id?: string | null;
|
|
486
|
+
instance_kind: MultiplayerInstanceKind;
|
|
487
|
+
state: MultiplayerInstanceState;
|
|
488
|
+
layer: number;
|
|
489
|
+
difficulty?: string | null;
|
|
490
|
+
max_players: number;
|
|
491
|
+
current_players: number;
|
|
492
|
+
metadata: MultiplayerMetadata;
|
|
493
|
+
last_heartbeat_at?: string | null;
|
|
494
|
+
expires_at?: string | null;
|
|
495
|
+
created_at?: string | null;
|
|
496
|
+
updated_at?: string | null;
|
|
497
|
+
server?: MultiplayerServer | null;
|
|
498
|
+
}
|
|
499
|
+
/** Authoritative location of a player. */
|
|
500
|
+
export interface MultiplayerPresence {
|
|
501
|
+
id: string;
|
|
502
|
+
title_id: string;
|
|
503
|
+
player_id: string;
|
|
504
|
+
user_id?: string | null;
|
|
505
|
+
realm_id?: string | null;
|
|
506
|
+
zone_id?: string | null;
|
|
507
|
+
instance_id?: string | null;
|
|
508
|
+
party_id?: string | null;
|
|
509
|
+
display_name?: string | null;
|
|
510
|
+
status: MultiplayerPresenceStatus;
|
|
511
|
+
rich_status?: string | null;
|
|
512
|
+
pos_x?: number | null;
|
|
513
|
+
pos_y?: number | null;
|
|
514
|
+
pos_z?: number | null;
|
|
515
|
+
heading?: number | null;
|
|
516
|
+
grid_cell?: string | null;
|
|
517
|
+
metadata: MultiplayerMetadata;
|
|
518
|
+
last_heartbeat_at?: string | null;
|
|
519
|
+
expires_at?: string | null;
|
|
520
|
+
}
|
|
521
|
+
export interface MultiplayerMatchmakingTicket {
|
|
522
|
+
id: string;
|
|
523
|
+
title_id: string;
|
|
524
|
+
queue: string;
|
|
525
|
+
player_id: string;
|
|
526
|
+
user_id?: string | null;
|
|
527
|
+
party: string[];
|
|
528
|
+
attributes: MultiplayerMetadata;
|
|
529
|
+
skill?: number | null;
|
|
530
|
+
region?: string | null;
|
|
531
|
+
status: MultiplayerMatchmakingStatus;
|
|
532
|
+
match_id?: string | null;
|
|
533
|
+
assignment?: MultiplayerMetadata | null;
|
|
534
|
+
queued_at?: string | null;
|
|
535
|
+
matched_at?: string | null;
|
|
536
|
+
expires_at?: string | null;
|
|
537
|
+
}
|
|
538
|
+
export interface MultiplayerBan {
|
|
539
|
+
id: string;
|
|
540
|
+
title_id: string;
|
|
541
|
+
scope: MultiplayerBanScope;
|
|
542
|
+
scope_id?: string | null;
|
|
543
|
+
player_id: string;
|
|
544
|
+
user_id?: string | null;
|
|
545
|
+
issued_by?: string | null;
|
|
546
|
+
source: MultiplayerBanSource;
|
|
547
|
+
reason?: string | null;
|
|
548
|
+
metadata: MultiplayerMetadata;
|
|
549
|
+
expires_at?: string | null;
|
|
550
|
+
}
|
|
551
|
+
export interface MultiplayerRealmListParams {
|
|
552
|
+
region?: string;
|
|
553
|
+
status?: MultiplayerRealmStatus;
|
|
554
|
+
recommended?: boolean;
|
|
555
|
+
limit?: number;
|
|
556
|
+
}
|
|
557
|
+
export interface MultiplayerCreateRealmRequest {
|
|
558
|
+
name: string;
|
|
559
|
+
slug?: string;
|
|
560
|
+
region?: string;
|
|
561
|
+
status?: MultiplayerRealmStatus;
|
|
562
|
+
population_cap?: number;
|
|
563
|
+
recommended?: boolean;
|
|
564
|
+
ruleset?: MultiplayerMetadata;
|
|
565
|
+
metadata?: MultiplayerMetadata;
|
|
566
|
+
}
|
|
567
|
+
export interface MultiplayerUpdateRealmRequest extends Partial<MultiplayerCreateRealmRequest> {
|
|
568
|
+
}
|
|
569
|
+
export interface MultiplayerZoneListParams {
|
|
570
|
+
zone_type?: MultiplayerZoneType;
|
|
571
|
+
limit?: number;
|
|
572
|
+
}
|
|
573
|
+
export interface MultiplayerCreateZoneRequest {
|
|
574
|
+
zone_key: string;
|
|
575
|
+
display_name: string;
|
|
576
|
+
zone_type?: MultiplayerZoneType;
|
|
577
|
+
is_instanced?: boolean;
|
|
578
|
+
max_players_per_instance?: number;
|
|
579
|
+
min_instances?: number;
|
|
580
|
+
grid_cell_size?: number;
|
|
581
|
+
coordinates_bounds?: MultiplayerMetadata;
|
|
582
|
+
metadata?: MultiplayerMetadata;
|
|
583
|
+
}
|
|
584
|
+
export interface MultiplayerInstanceListParams {
|
|
585
|
+
state?: MultiplayerInstanceState;
|
|
586
|
+
limit?: number;
|
|
587
|
+
}
|
|
588
|
+
export interface MultiplayerEnterZoneRequest {
|
|
589
|
+
player_id?: string;
|
|
590
|
+
realm_id: string;
|
|
591
|
+
zone_id: string;
|
|
592
|
+
server_id?: string;
|
|
593
|
+
party_id?: string;
|
|
594
|
+
instance_kind?: MultiplayerInstanceKind;
|
|
595
|
+
difficulty?: string;
|
|
596
|
+
display_name?: string;
|
|
597
|
+
rich_status?: string;
|
|
598
|
+
pos_x?: number;
|
|
599
|
+
pos_y?: number;
|
|
600
|
+
pos_z?: number;
|
|
601
|
+
heading?: number;
|
|
602
|
+
metadata?: MultiplayerMetadata;
|
|
603
|
+
instance_metadata?: MultiplayerMetadata;
|
|
604
|
+
ttl_minutes?: number;
|
|
605
|
+
}
|
|
606
|
+
export interface MultiplayerEnterZoneResponse {
|
|
607
|
+
instance: MultiplayerInstance;
|
|
608
|
+
presence: MultiplayerPresence;
|
|
609
|
+
}
|
|
610
|
+
export interface MultiplayerUpdatePresenceRequest {
|
|
611
|
+
player_id?: string;
|
|
612
|
+
status?: MultiplayerPresenceStatus;
|
|
613
|
+
rich_status?: string;
|
|
614
|
+
pos_x?: number;
|
|
615
|
+
pos_y?: number;
|
|
616
|
+
pos_z?: number;
|
|
617
|
+
heading?: number;
|
|
618
|
+
ttl_minutes?: number;
|
|
619
|
+
}
|
|
620
|
+
export interface MultiplayerLeaveWorldRequest {
|
|
621
|
+
player_id?: string;
|
|
622
|
+
}
|
|
623
|
+
export interface MultiplayerInstancePresenceParams {
|
|
624
|
+
grid_cell?: string;
|
|
625
|
+
radius?: number;
|
|
626
|
+
limit?: number;
|
|
627
|
+
}
|
|
628
|
+
export interface MultiplayerEnqueueTicketRequest {
|
|
629
|
+
player_id?: string;
|
|
630
|
+
queue: string;
|
|
631
|
+
party?: string[];
|
|
632
|
+
attributes?: MultiplayerMetadata;
|
|
633
|
+
skill?: number;
|
|
634
|
+
region?: string;
|
|
635
|
+
ttl_seconds?: number;
|
|
636
|
+
}
|
|
637
|
+
export interface MultiplayerCancelTicketParams {
|
|
638
|
+
player_id?: string;
|
|
639
|
+
}
|
|
640
|
+
export interface MultiplayerBanListParams {
|
|
641
|
+
scope?: MultiplayerBanScope;
|
|
642
|
+
player_id?: string;
|
|
643
|
+
source?: MultiplayerBanSource;
|
|
644
|
+
active_only?: boolean;
|
|
645
|
+
limit?: number;
|
|
646
|
+
}
|
|
647
|
+
export interface MultiplayerCreateBanRequest {
|
|
648
|
+
player_id: string;
|
|
649
|
+
scope?: MultiplayerBanScope;
|
|
650
|
+
scope_id?: string;
|
|
651
|
+
user_id?: string;
|
|
652
|
+
source?: MultiplayerBanSource;
|
|
653
|
+
reason?: string;
|
|
654
|
+
metadata?: MultiplayerMetadata;
|
|
655
|
+
expires_at?: string;
|
|
656
|
+
}
|
|
657
|
+
export interface MultiplayerDeleteBanResponse {
|
|
658
|
+
deleted: boolean;
|
|
659
|
+
}
|
|
660
|
+
export interface MultiplayerRealtimeScope {
|
|
661
|
+
type: MultiplayerRealtimeScopeType;
|
|
662
|
+
id: string;
|
|
663
|
+
}
|
|
664
|
+
export interface MultiplayerRealtimeNegotiateRequest {
|
|
665
|
+
player_id?: string;
|
|
666
|
+
scopes?: MultiplayerRealtimeScope[];
|
|
667
|
+
}
|
|
668
|
+
export interface MultiplayerRealtimeNegotiateResponse {
|
|
669
|
+
protocol: string;
|
|
670
|
+
url: string | null;
|
|
671
|
+
configured: boolean;
|
|
672
|
+
groups: string[];
|
|
673
|
+
access_token: string | null;
|
|
674
|
+
expires_at: string | null;
|
|
675
|
+
}
|
|
436
676
|
/**
|
|
437
677
|
* Steam-style multiplayer APIs for Glitch titles.
|
|
438
678
|
*
|
|
@@ -867,5 +1107,183 @@ declare class Multiplayer {
|
|
|
867
1107
|
* @param params Optional player_id for title-token clients.
|
|
868
1108
|
*/
|
|
869
1109
|
static deleteFavorite<T = MultiplayerDeleteFavoriteResponse>(title_id: string, favorite_id: string, params?: MultiplayerDeleteFavoriteParams): AxiosPromise<Response<T>>;
|
|
1110
|
+
/**
|
|
1111
|
+
* List realms (persistent world shards) so a player can choose where to log in.
|
|
1112
|
+
*
|
|
1113
|
+
* @param title_id Title UUID.
|
|
1114
|
+
* @param params Optional region/status filters; recommended realms sort first.
|
|
1115
|
+
* @example
|
|
1116
|
+
* Multiplayer.listRealms('title-uuid', { region: 'us-central', status: 'active' });
|
|
1117
|
+
*/
|
|
1118
|
+
static listRealms<T = MultiplayerRealm[]>(title_id: string, params?: MultiplayerRealmListParams): AxiosPromise<Response<T>>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Create a realm. Requires a title administrator JWT.
|
|
1121
|
+
*
|
|
1122
|
+
* @param title_id Title UUID.
|
|
1123
|
+
* @param data Realm configuration.
|
|
1124
|
+
* @example
|
|
1125
|
+
* Multiplayer.createRealm('title-uuid', { name: 'Aurora', region: 'us-central', population_cap: 5000, recommended: true });
|
|
1126
|
+
*/
|
|
1127
|
+
static createRealm<T = MultiplayerRealm>(title_id: string, data: MultiplayerCreateRealmRequest): AxiosPromise<Response<T>>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Retrieve a single realm.
|
|
1130
|
+
*
|
|
1131
|
+
* @param title_id Title UUID.
|
|
1132
|
+
* @param realm_id Realm UUID.
|
|
1133
|
+
*/
|
|
1134
|
+
static showRealm<T = MultiplayerRealm>(title_id: string, realm_id: string): AxiosPromise<Response<T>>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Update a realm (status, population cap, ruleset). Requires a title admin JWT.
|
|
1137
|
+
*
|
|
1138
|
+
* @param title_id Title UUID.
|
|
1139
|
+
* @param realm_id Realm UUID.
|
|
1140
|
+
* @param data Fields to update.
|
|
1141
|
+
*/
|
|
1142
|
+
static updateRealm<T = MultiplayerRealm>(title_id: string, realm_id: string, data: MultiplayerUpdateRealmRequest): AxiosPromise<Response<T>>;
|
|
1143
|
+
/**
|
|
1144
|
+
* List the zones defined for a realm.
|
|
1145
|
+
*
|
|
1146
|
+
* @param title_id Title UUID.
|
|
1147
|
+
* @param realm_id Realm UUID.
|
|
1148
|
+
* @param params Optional zone_type filter.
|
|
1149
|
+
*/
|
|
1150
|
+
static listZones<T = MultiplayerZone[]>(title_id: string, realm_id: string, params?: MultiplayerZoneListParams): AxiosPromise<Response<T>>;
|
|
1151
|
+
/**
|
|
1152
|
+
* Create a zone in a realm. Requires a title administrator JWT.
|
|
1153
|
+
*
|
|
1154
|
+
* @param title_id Title UUID.
|
|
1155
|
+
* @param realm_id Realm UUID.
|
|
1156
|
+
* @param data Zone configuration, including interest-management grid cell size.
|
|
1157
|
+
* @example
|
|
1158
|
+
* Multiplayer.createZone('title-uuid', 'realm-uuid', {
|
|
1159
|
+
* zone_key: 'ashfall_valley',
|
|
1160
|
+
* display_name: 'Ashfall Valley',
|
|
1161
|
+
* zone_type: 'overworld',
|
|
1162
|
+
* max_players_per_instance: 100,
|
|
1163
|
+
* grid_cell_size: 64
|
|
1164
|
+
* });
|
|
1165
|
+
*/
|
|
1166
|
+
static createZone<T = MultiplayerZone>(title_id: string, realm_id: string, data: MultiplayerCreateZoneRequest): AxiosPromise<Response<T>>;
|
|
1167
|
+
/**
|
|
1168
|
+
* List the active/other instances (runtime copies) of a zone.
|
|
1169
|
+
*
|
|
1170
|
+
* @param title_id Title UUID.
|
|
1171
|
+
* @param zone_id Zone UUID.
|
|
1172
|
+
* @param params Optional state filter.
|
|
1173
|
+
*/
|
|
1174
|
+
static listInstances<T = MultiplayerInstance[]>(title_id: string, zone_id: string, params?: MultiplayerInstanceListParams): AxiosPromise<Response<T>>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Retrieve a single instance.
|
|
1177
|
+
*
|
|
1178
|
+
* @param title_id Title UUID.
|
|
1179
|
+
* @param instance_id Instance UUID.
|
|
1180
|
+
*/
|
|
1181
|
+
static showInstance<T = MultiplayerInstance>(title_id: string, instance_id: string): AxiosPromise<Response<T>>;
|
|
1182
|
+
/**
|
|
1183
|
+
* List players present in an instance. Pass grid_cell (and optional radius) to
|
|
1184
|
+
* receive only players in the caller's area of interest — the key to keeping
|
|
1185
|
+
* per-player fan-out bounded regardless of how populated the zone is.
|
|
1186
|
+
*
|
|
1187
|
+
* @param title_id Title UUID.
|
|
1188
|
+
* @param instance_id Instance UUID.
|
|
1189
|
+
* @param params grid_cell "cx:cy" and radius (0-4) to scope the query.
|
|
1190
|
+
* @example
|
|
1191
|
+
* Multiplayer.listInstancePresence('title-uuid', 'instance-uuid', { grid_cell: '12:8', radius: 1 });
|
|
1192
|
+
*/
|
|
1193
|
+
static listInstancePresence<T = MultiplayerPresence[]>(title_id: string, instance_id: string, params?: MultiplayerInstancePresenceParams): AxiosPromise<Response<T>>;
|
|
1194
|
+
/**
|
|
1195
|
+
* Enter a zone. The backend places the player into an active instance with
|
|
1196
|
+
* capacity (creating a new layer if all are full), enforces bans and realm
|
|
1197
|
+
* capacity, and upserts presence. Returns the instance and presence so the
|
|
1198
|
+
* client can connect and subscribe to the instance's real-time group.
|
|
1199
|
+
*
|
|
1200
|
+
* @param title_id Title UUID.
|
|
1201
|
+
* @param data Realm/zone target plus optional spawn position and metadata.
|
|
1202
|
+
* @example
|
|
1203
|
+
* Multiplayer.enterZone('title-uuid', {
|
|
1204
|
+
* player_id: 'steam:765...',
|
|
1205
|
+
* realm_id: 'realm-uuid',
|
|
1206
|
+
* zone_id: 'zone-uuid',
|
|
1207
|
+
* pos_x: 128.0, pos_z: 64.0
|
|
1208
|
+
* });
|
|
1209
|
+
*/
|
|
1210
|
+
static enterZone<T = MultiplayerEnterZoneResponse>(title_id: string, data: MultiplayerEnterZoneRequest): AxiosPromise<Response<T>>;
|
|
1211
|
+
/**
|
|
1212
|
+
* Update presence (position, heading, rich status) and refresh the TTL. Call
|
|
1213
|
+
* on a movement interval and on notable state changes.
|
|
1214
|
+
*
|
|
1215
|
+
* @param title_id Title UUID.
|
|
1216
|
+
* @param data New position/status for the player.
|
|
1217
|
+
*/
|
|
1218
|
+
static updatePresence<T = MultiplayerPresence>(title_id: string, data: MultiplayerUpdatePresenceRequest): AxiosPromise<Response<T>>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Leave the world. Frees the player's instance slot and realm population.
|
|
1221
|
+
*
|
|
1222
|
+
* @param title_id Title UUID.
|
|
1223
|
+
* @param data Optional player_id for title-token clients.
|
|
1224
|
+
*/
|
|
1225
|
+
static leaveWorld<T = MultiplayerPresence>(title_id: string, data?: MultiplayerLeaveWorldRequest): AxiosPromise<Response<T>>;
|
|
1226
|
+
/**
|
|
1227
|
+
* Enqueue a matchmaking ticket. Idempotent per (queue, player): an existing
|
|
1228
|
+
* open ticket is returned rather than duplicated, so retries are safe. Poll
|
|
1229
|
+
* the ticket or subscribe to `matchmaking.matched` for the assignment.
|
|
1230
|
+
*
|
|
1231
|
+
* @param title_id Title UUID.
|
|
1232
|
+
* @param data Queue name plus optional party, skill, region, and attributes.
|
|
1233
|
+
* @example
|
|
1234
|
+
* Multiplayer.enqueueTicket('title-uuid', { player_id: 'steam:765...', queue: 'ranked_2v2', skill: 1840, region: 'us-central' });
|
|
1235
|
+
*/
|
|
1236
|
+
static enqueueTicket<T = MultiplayerMatchmakingTicket>(title_id: string, data: MultiplayerEnqueueTicketRequest): AxiosPromise<Response<T>>;
|
|
1237
|
+
/**
|
|
1238
|
+
* Poll a matchmaking ticket. A queued ticket past its TTL is reported as
|
|
1239
|
+
* `timed_out`; a matched ticket carries the connection `assignment`.
|
|
1240
|
+
*
|
|
1241
|
+
* @param title_id Title UUID.
|
|
1242
|
+
* @param ticket_id Ticket UUID.
|
|
1243
|
+
*/
|
|
1244
|
+
static showTicket<T = MultiplayerMatchmakingTicket>(title_id: string, ticket_id: string): AxiosPromise<Response<T>>;
|
|
1245
|
+
/**
|
|
1246
|
+
* Cancel a queued matchmaking ticket.
|
|
1247
|
+
*
|
|
1248
|
+
* @param title_id Title UUID.
|
|
1249
|
+
* @param ticket_id Ticket UUID.
|
|
1250
|
+
*/
|
|
1251
|
+
static cancelTicket<T = MultiplayerMatchmakingTicket>(title_id: string, ticket_id: string): AxiosPromise<Response<T>>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Negotiate a real-time push connection. Returns the authorized group names
|
|
1254
|
+
* and the push endpoint. When SignalR/Web PubSub is configured, an
|
|
1255
|
+
* access_token scoped to those groups is included; otherwise `configured` is
|
|
1256
|
+
* false and the client should fall back to the polling endpoints.
|
|
1257
|
+
*
|
|
1258
|
+
* @param title_id Title UUID.
|
|
1259
|
+
* @param data Optional player_id and the scopes (lobby/voice/zone/instance) to subscribe to.
|
|
1260
|
+
* @example
|
|
1261
|
+
* Multiplayer.negotiateRealtime('title-uuid', { player_id: 'steam:765...', scopes: [{ type: 'instance', id: 'instance-uuid' }] });
|
|
1262
|
+
*/
|
|
1263
|
+
static negotiateRealtime<T = MultiplayerRealtimeNegotiateResponse>(title_id: string, data?: MultiplayerRealtimeNegotiateRequest): AxiosPromise<Response<T>>;
|
|
1264
|
+
/**
|
|
1265
|
+
* List bans for a title. Requires a title administrator JWT.
|
|
1266
|
+
*
|
|
1267
|
+
* @param title_id Title UUID.
|
|
1268
|
+
* @param params Optional scope/player/source filters and active_only.
|
|
1269
|
+
*/
|
|
1270
|
+
static listBans<T = MultiplayerBan[]>(title_id: string, params?: MultiplayerBanListParams): AxiosPromise<Response<T>>;
|
|
1271
|
+
/**
|
|
1272
|
+
* Ban a player at a scope (title/realm/lobby/server/voice). Requires a title
|
|
1273
|
+
* administrator JWT. Omit expires_at for a permanent ban.
|
|
1274
|
+
*
|
|
1275
|
+
* @param title_id Title UUID.
|
|
1276
|
+
* @param data Ban target and scope.
|
|
1277
|
+
* @example
|
|
1278
|
+
* Multiplayer.createBan('title-uuid', { player_id: 'steam:765...', scope: 'title', reason: 'Cheating: aimbot' });
|
|
1279
|
+
*/
|
|
1280
|
+
static createBan<T = MultiplayerBan>(title_id: string, data: MultiplayerCreateBanRequest): AxiosPromise<Response<T>>;
|
|
1281
|
+
/**
|
|
1282
|
+
* Lift a ban. Requires a title administrator JWT.
|
|
1283
|
+
*
|
|
1284
|
+
* @param title_id Title UUID.
|
|
1285
|
+
* @param ban_id Ban UUID.
|
|
1286
|
+
*/
|
|
1287
|
+
static deleteBan<T = MultiplayerDeleteBanResponse>(title_id: string, ban_id: string): AxiosPromise<Response<T>>;
|
|
870
1288
|
}
|
|
871
1289
|
export default Multiplayer;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ import Agents from "./Agents";
|
|
|
49
49
|
import Mcp from "./Mcp";
|
|
50
50
|
import PrDirectory from "./PrDirectory";
|
|
51
51
|
import AdminReports from "./AdminReports";
|
|
52
|
+
import AdminUsers from "./AdminUsers";
|
|
52
53
|
import MarketResearch from "./MarketResearch";
|
|
53
54
|
export { Ads };
|
|
54
55
|
export { AccessKeys };
|
|
@@ -101,4 +102,5 @@ export { Agents };
|
|
|
101
102
|
export { Mcp };
|
|
102
103
|
export { PrDirectory };
|
|
103
104
|
export { AdminReports };
|
|
105
|
+
export { AdminUsers };
|
|
104
106
|
export { MarketResearch };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ import { Agents } from './api';
|
|
|
49
49
|
import { Mcp } from './api';
|
|
50
50
|
import { PrDirectory } from './api';
|
|
51
51
|
import { AdminReports } from './api';
|
|
52
|
+
import { AdminUsers } from './api';
|
|
52
53
|
import { MarketResearch } from './api';
|
|
53
54
|
import Requests from "./util/Requests";
|
|
54
55
|
import Parser from "./util/Parser";
|
|
@@ -120,6 +121,7 @@ declare class Glitch {
|
|
|
120
121
|
Mcp: typeof Mcp;
|
|
121
122
|
PrDirectory: typeof PrDirectory;
|
|
122
123
|
AdminReports: typeof AdminReports;
|
|
124
|
+
AdminUsers: typeof AdminUsers;
|
|
123
125
|
MarketResearch: typeof MarketResearch;
|
|
124
126
|
};
|
|
125
127
|
static util: {
|