glitch-javascript-sdk 3.2.32 → 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 +247 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Multiplayer.d.ts +418 -0
- package/dist/esm/index.js +247 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +415 -0
- package/package.json +1 -1
- package/src/api/Multiplayer.ts +517 -0
- package/src/routes/MultiplayerRoute.ts +25 -0
package/dist/index.d.ts
CHANGED
|
@@ -9009,6 +9009,243 @@ interface MultiplayerVoicePollRequest {
|
|
|
9009
9009
|
limit?: number;
|
|
9010
9010
|
exclude_self?: boolean;
|
|
9011
9011
|
}
|
|
9012
|
+
type MultiplayerRealmStatus = 'active' | 'locked' | 'maintenance' | 'full' | 'offline';
|
|
9013
|
+
type MultiplayerZoneType = 'overworld' | 'city' | 'dungeon' | 'raid' | 'arena' | 'instanced';
|
|
9014
|
+
type MultiplayerInstanceKind = 'persistent' | 'dynamic' | 'dungeon' | 'raid' | 'arena';
|
|
9015
|
+
type MultiplayerInstanceState = 'provisioning' | 'active' | 'draining' | 'closed';
|
|
9016
|
+
type MultiplayerPresenceStatus = 'online' | 'in_queue' | 'in_world' | 'away' | 'offline';
|
|
9017
|
+
type MultiplayerMatchmakingStatus = 'queued' | 'matched' | 'canceled' | 'expired' | 'timed_out';
|
|
9018
|
+
type MultiplayerBanScope = 'title' | 'realm' | 'lobby' | 'server' | 'voice';
|
|
9019
|
+
type MultiplayerBanSource = 'manual' | 'report' | 'anticheat' | 'automated';
|
|
9020
|
+
type MultiplayerRealtimeScopeType = 'lobby' | 'voice' | 'zone' | 'instance';
|
|
9021
|
+
/** A persistent world copy (shard). */
|
|
9022
|
+
interface MultiplayerRealm {
|
|
9023
|
+
id: string;
|
|
9024
|
+
title_id: string;
|
|
9025
|
+
name: string;
|
|
9026
|
+
slug?: string | null;
|
|
9027
|
+
region?: string | null;
|
|
9028
|
+
status: MultiplayerRealmStatus;
|
|
9029
|
+
population_cap: number;
|
|
9030
|
+
current_population: number;
|
|
9031
|
+
recommended: boolean;
|
|
9032
|
+
ruleset: MultiplayerMetadata;
|
|
9033
|
+
metadata: MultiplayerMetadata;
|
|
9034
|
+
last_activity_at?: string | null;
|
|
9035
|
+
created_at?: string | null;
|
|
9036
|
+
updated_at?: string | null;
|
|
9037
|
+
}
|
|
9038
|
+
/** A named area within a realm (map/continent/dungeon template). */
|
|
9039
|
+
interface MultiplayerZone {
|
|
9040
|
+
id: string;
|
|
9041
|
+
title_id: string;
|
|
9042
|
+
realm_id: string;
|
|
9043
|
+
zone_key: string;
|
|
9044
|
+
display_name: string;
|
|
9045
|
+
zone_type: MultiplayerZoneType;
|
|
9046
|
+
is_instanced: boolean;
|
|
9047
|
+
max_players_per_instance: number;
|
|
9048
|
+
min_instances: number;
|
|
9049
|
+
grid_cell_size: number;
|
|
9050
|
+
coordinates_bounds: MultiplayerMetadata;
|
|
9051
|
+
metadata: MultiplayerMetadata;
|
|
9052
|
+
created_at?: string | null;
|
|
9053
|
+
updated_at?: string | null;
|
|
9054
|
+
}
|
|
9055
|
+
/** A runtime copy of a zone, optionally bound to a game server. */
|
|
9056
|
+
interface MultiplayerInstance {
|
|
9057
|
+
id: string;
|
|
9058
|
+
title_id: string;
|
|
9059
|
+
realm_id: string;
|
|
9060
|
+
zone_id: string;
|
|
9061
|
+
server_id?: string | null;
|
|
9062
|
+
instance_kind: MultiplayerInstanceKind;
|
|
9063
|
+
state: MultiplayerInstanceState;
|
|
9064
|
+
layer: number;
|
|
9065
|
+
difficulty?: string | null;
|
|
9066
|
+
max_players: number;
|
|
9067
|
+
current_players: number;
|
|
9068
|
+
metadata: MultiplayerMetadata;
|
|
9069
|
+
last_heartbeat_at?: string | null;
|
|
9070
|
+
expires_at?: string | null;
|
|
9071
|
+
created_at?: string | null;
|
|
9072
|
+
updated_at?: string | null;
|
|
9073
|
+
server?: MultiplayerServer | null;
|
|
9074
|
+
}
|
|
9075
|
+
/** Authoritative location of a player. */
|
|
9076
|
+
interface MultiplayerPresence {
|
|
9077
|
+
id: string;
|
|
9078
|
+
title_id: string;
|
|
9079
|
+
player_id: string;
|
|
9080
|
+
user_id?: string | null;
|
|
9081
|
+
realm_id?: string | null;
|
|
9082
|
+
zone_id?: string | null;
|
|
9083
|
+
instance_id?: string | null;
|
|
9084
|
+
party_id?: string | null;
|
|
9085
|
+
display_name?: string | null;
|
|
9086
|
+
status: MultiplayerPresenceStatus;
|
|
9087
|
+
rich_status?: string | null;
|
|
9088
|
+
pos_x?: number | null;
|
|
9089
|
+
pos_y?: number | null;
|
|
9090
|
+
pos_z?: number | null;
|
|
9091
|
+
heading?: number | null;
|
|
9092
|
+
grid_cell?: string | null;
|
|
9093
|
+
metadata: MultiplayerMetadata;
|
|
9094
|
+
last_heartbeat_at?: string | null;
|
|
9095
|
+
expires_at?: string | null;
|
|
9096
|
+
}
|
|
9097
|
+
interface MultiplayerMatchmakingTicket {
|
|
9098
|
+
id: string;
|
|
9099
|
+
title_id: string;
|
|
9100
|
+
queue: string;
|
|
9101
|
+
player_id: string;
|
|
9102
|
+
user_id?: string | null;
|
|
9103
|
+
party: string[];
|
|
9104
|
+
attributes: MultiplayerMetadata;
|
|
9105
|
+
skill?: number | null;
|
|
9106
|
+
region?: string | null;
|
|
9107
|
+
status: MultiplayerMatchmakingStatus;
|
|
9108
|
+
match_id?: string | null;
|
|
9109
|
+
assignment?: MultiplayerMetadata | null;
|
|
9110
|
+
queued_at?: string | null;
|
|
9111
|
+
matched_at?: string | null;
|
|
9112
|
+
expires_at?: string | null;
|
|
9113
|
+
}
|
|
9114
|
+
interface MultiplayerBan {
|
|
9115
|
+
id: string;
|
|
9116
|
+
title_id: string;
|
|
9117
|
+
scope: MultiplayerBanScope;
|
|
9118
|
+
scope_id?: string | null;
|
|
9119
|
+
player_id: string;
|
|
9120
|
+
user_id?: string | null;
|
|
9121
|
+
issued_by?: string | null;
|
|
9122
|
+
source: MultiplayerBanSource;
|
|
9123
|
+
reason?: string | null;
|
|
9124
|
+
metadata: MultiplayerMetadata;
|
|
9125
|
+
expires_at?: string | null;
|
|
9126
|
+
}
|
|
9127
|
+
interface MultiplayerRealmListParams {
|
|
9128
|
+
region?: string;
|
|
9129
|
+
status?: MultiplayerRealmStatus;
|
|
9130
|
+
recommended?: boolean;
|
|
9131
|
+
limit?: number;
|
|
9132
|
+
}
|
|
9133
|
+
interface MultiplayerCreateRealmRequest {
|
|
9134
|
+
name: string;
|
|
9135
|
+
slug?: string;
|
|
9136
|
+
region?: string;
|
|
9137
|
+
status?: MultiplayerRealmStatus;
|
|
9138
|
+
population_cap?: number;
|
|
9139
|
+
recommended?: boolean;
|
|
9140
|
+
ruleset?: MultiplayerMetadata;
|
|
9141
|
+
metadata?: MultiplayerMetadata;
|
|
9142
|
+
}
|
|
9143
|
+
interface MultiplayerUpdateRealmRequest extends Partial<MultiplayerCreateRealmRequest> {
|
|
9144
|
+
}
|
|
9145
|
+
interface MultiplayerZoneListParams {
|
|
9146
|
+
zone_type?: MultiplayerZoneType;
|
|
9147
|
+
limit?: number;
|
|
9148
|
+
}
|
|
9149
|
+
interface MultiplayerCreateZoneRequest {
|
|
9150
|
+
zone_key: string;
|
|
9151
|
+
display_name: string;
|
|
9152
|
+
zone_type?: MultiplayerZoneType;
|
|
9153
|
+
is_instanced?: boolean;
|
|
9154
|
+
max_players_per_instance?: number;
|
|
9155
|
+
min_instances?: number;
|
|
9156
|
+
grid_cell_size?: number;
|
|
9157
|
+
coordinates_bounds?: MultiplayerMetadata;
|
|
9158
|
+
metadata?: MultiplayerMetadata;
|
|
9159
|
+
}
|
|
9160
|
+
interface MultiplayerInstanceListParams {
|
|
9161
|
+
state?: MultiplayerInstanceState;
|
|
9162
|
+
limit?: number;
|
|
9163
|
+
}
|
|
9164
|
+
interface MultiplayerEnterZoneRequest {
|
|
9165
|
+
player_id?: string;
|
|
9166
|
+
realm_id: string;
|
|
9167
|
+
zone_id: string;
|
|
9168
|
+
server_id?: string;
|
|
9169
|
+
party_id?: string;
|
|
9170
|
+
instance_kind?: MultiplayerInstanceKind;
|
|
9171
|
+
difficulty?: string;
|
|
9172
|
+
display_name?: string;
|
|
9173
|
+
rich_status?: string;
|
|
9174
|
+
pos_x?: number;
|
|
9175
|
+
pos_y?: number;
|
|
9176
|
+
pos_z?: number;
|
|
9177
|
+
heading?: number;
|
|
9178
|
+
metadata?: MultiplayerMetadata;
|
|
9179
|
+
instance_metadata?: MultiplayerMetadata;
|
|
9180
|
+
ttl_minutes?: number;
|
|
9181
|
+
}
|
|
9182
|
+
interface MultiplayerEnterZoneResponse {
|
|
9183
|
+
instance: MultiplayerInstance;
|
|
9184
|
+
presence: MultiplayerPresence;
|
|
9185
|
+
}
|
|
9186
|
+
interface MultiplayerUpdatePresenceRequest {
|
|
9187
|
+
player_id?: string;
|
|
9188
|
+
status?: MultiplayerPresenceStatus;
|
|
9189
|
+
rich_status?: string;
|
|
9190
|
+
pos_x?: number;
|
|
9191
|
+
pos_y?: number;
|
|
9192
|
+
pos_z?: number;
|
|
9193
|
+
heading?: number;
|
|
9194
|
+
ttl_minutes?: number;
|
|
9195
|
+
}
|
|
9196
|
+
interface MultiplayerLeaveWorldRequest {
|
|
9197
|
+
player_id?: string;
|
|
9198
|
+
}
|
|
9199
|
+
interface MultiplayerInstancePresenceParams {
|
|
9200
|
+
grid_cell?: string;
|
|
9201
|
+
radius?: number;
|
|
9202
|
+
limit?: number;
|
|
9203
|
+
}
|
|
9204
|
+
interface MultiplayerEnqueueTicketRequest {
|
|
9205
|
+
player_id?: string;
|
|
9206
|
+
queue: string;
|
|
9207
|
+
party?: string[];
|
|
9208
|
+
attributes?: MultiplayerMetadata;
|
|
9209
|
+
skill?: number;
|
|
9210
|
+
region?: string;
|
|
9211
|
+
ttl_seconds?: number;
|
|
9212
|
+
}
|
|
9213
|
+
interface MultiplayerBanListParams {
|
|
9214
|
+
scope?: MultiplayerBanScope;
|
|
9215
|
+
player_id?: string;
|
|
9216
|
+
source?: MultiplayerBanSource;
|
|
9217
|
+
active_only?: boolean;
|
|
9218
|
+
limit?: number;
|
|
9219
|
+
}
|
|
9220
|
+
interface MultiplayerCreateBanRequest {
|
|
9221
|
+
player_id: string;
|
|
9222
|
+
scope?: MultiplayerBanScope;
|
|
9223
|
+
scope_id?: string;
|
|
9224
|
+
user_id?: string;
|
|
9225
|
+
source?: MultiplayerBanSource;
|
|
9226
|
+
reason?: string;
|
|
9227
|
+
metadata?: MultiplayerMetadata;
|
|
9228
|
+
expires_at?: string;
|
|
9229
|
+
}
|
|
9230
|
+
interface MultiplayerDeleteBanResponse {
|
|
9231
|
+
deleted: boolean;
|
|
9232
|
+
}
|
|
9233
|
+
interface MultiplayerRealtimeScope {
|
|
9234
|
+
type: MultiplayerRealtimeScopeType;
|
|
9235
|
+
id: string;
|
|
9236
|
+
}
|
|
9237
|
+
interface MultiplayerRealtimeNegotiateRequest {
|
|
9238
|
+
player_id?: string;
|
|
9239
|
+
scopes?: MultiplayerRealtimeScope[];
|
|
9240
|
+
}
|
|
9241
|
+
interface MultiplayerRealtimeNegotiateResponse {
|
|
9242
|
+
protocol: string;
|
|
9243
|
+
url: string | null;
|
|
9244
|
+
configured: boolean;
|
|
9245
|
+
groups: string[];
|
|
9246
|
+
access_token: string | null;
|
|
9247
|
+
expires_at: string | null;
|
|
9248
|
+
}
|
|
9012
9249
|
/**
|
|
9013
9250
|
* Steam-style multiplayer APIs for Glitch titles.
|
|
9014
9251
|
*
|
|
@@ -9443,6 +9680,184 @@ declare class Multiplayer {
|
|
|
9443
9680
|
* @param params Optional player_id for title-token clients.
|
|
9444
9681
|
*/
|
|
9445
9682
|
static deleteFavorite<T = MultiplayerDeleteFavoriteResponse>(title_id: string, favorite_id: string, params?: MultiplayerDeleteFavoriteParams): AxiosPromise<Response<T>>;
|
|
9683
|
+
/**
|
|
9684
|
+
* List realms (persistent world shards) so a player can choose where to log in.
|
|
9685
|
+
*
|
|
9686
|
+
* @param title_id Title UUID.
|
|
9687
|
+
* @param params Optional region/status filters; recommended realms sort first.
|
|
9688
|
+
* @example
|
|
9689
|
+
* Multiplayer.listRealms('title-uuid', { region: 'us-central', status: 'active' });
|
|
9690
|
+
*/
|
|
9691
|
+
static listRealms<T = MultiplayerRealm[]>(title_id: string, params?: MultiplayerRealmListParams): AxiosPromise<Response<T>>;
|
|
9692
|
+
/**
|
|
9693
|
+
* Create a realm. Requires a title administrator JWT.
|
|
9694
|
+
*
|
|
9695
|
+
* @param title_id Title UUID.
|
|
9696
|
+
* @param data Realm configuration.
|
|
9697
|
+
* @example
|
|
9698
|
+
* Multiplayer.createRealm('title-uuid', { name: 'Aurora', region: 'us-central', population_cap: 5000, recommended: true });
|
|
9699
|
+
*/
|
|
9700
|
+
static createRealm<T = MultiplayerRealm>(title_id: string, data: MultiplayerCreateRealmRequest): AxiosPromise<Response<T>>;
|
|
9701
|
+
/**
|
|
9702
|
+
* Retrieve a single realm.
|
|
9703
|
+
*
|
|
9704
|
+
* @param title_id Title UUID.
|
|
9705
|
+
* @param realm_id Realm UUID.
|
|
9706
|
+
*/
|
|
9707
|
+
static showRealm<T = MultiplayerRealm>(title_id: string, realm_id: string): AxiosPromise<Response<T>>;
|
|
9708
|
+
/**
|
|
9709
|
+
* Update a realm (status, population cap, ruleset). Requires a title admin JWT.
|
|
9710
|
+
*
|
|
9711
|
+
* @param title_id Title UUID.
|
|
9712
|
+
* @param realm_id Realm UUID.
|
|
9713
|
+
* @param data Fields to update.
|
|
9714
|
+
*/
|
|
9715
|
+
static updateRealm<T = MultiplayerRealm>(title_id: string, realm_id: string, data: MultiplayerUpdateRealmRequest): AxiosPromise<Response<T>>;
|
|
9716
|
+
/**
|
|
9717
|
+
* List the zones defined for a realm.
|
|
9718
|
+
*
|
|
9719
|
+
* @param title_id Title UUID.
|
|
9720
|
+
* @param realm_id Realm UUID.
|
|
9721
|
+
* @param params Optional zone_type filter.
|
|
9722
|
+
*/
|
|
9723
|
+
static listZones<T = MultiplayerZone[]>(title_id: string, realm_id: string, params?: MultiplayerZoneListParams): AxiosPromise<Response<T>>;
|
|
9724
|
+
/**
|
|
9725
|
+
* Create a zone in a realm. Requires a title administrator JWT.
|
|
9726
|
+
*
|
|
9727
|
+
* @param title_id Title UUID.
|
|
9728
|
+
* @param realm_id Realm UUID.
|
|
9729
|
+
* @param data Zone configuration, including interest-management grid cell size.
|
|
9730
|
+
* @example
|
|
9731
|
+
* Multiplayer.createZone('title-uuid', 'realm-uuid', {
|
|
9732
|
+
* zone_key: 'ashfall_valley',
|
|
9733
|
+
* display_name: 'Ashfall Valley',
|
|
9734
|
+
* zone_type: 'overworld',
|
|
9735
|
+
* max_players_per_instance: 100,
|
|
9736
|
+
* grid_cell_size: 64
|
|
9737
|
+
* });
|
|
9738
|
+
*/
|
|
9739
|
+
static createZone<T = MultiplayerZone>(title_id: string, realm_id: string, data: MultiplayerCreateZoneRequest): AxiosPromise<Response<T>>;
|
|
9740
|
+
/**
|
|
9741
|
+
* List the active/other instances (runtime copies) of a zone.
|
|
9742
|
+
*
|
|
9743
|
+
* @param title_id Title UUID.
|
|
9744
|
+
* @param zone_id Zone UUID.
|
|
9745
|
+
* @param params Optional state filter.
|
|
9746
|
+
*/
|
|
9747
|
+
static listInstances<T = MultiplayerInstance[]>(title_id: string, zone_id: string, params?: MultiplayerInstanceListParams): AxiosPromise<Response<T>>;
|
|
9748
|
+
/**
|
|
9749
|
+
* Retrieve a single instance.
|
|
9750
|
+
*
|
|
9751
|
+
* @param title_id Title UUID.
|
|
9752
|
+
* @param instance_id Instance UUID.
|
|
9753
|
+
*/
|
|
9754
|
+
static showInstance<T = MultiplayerInstance>(title_id: string, instance_id: string): AxiosPromise<Response<T>>;
|
|
9755
|
+
/**
|
|
9756
|
+
* List players present in an instance. Pass grid_cell (and optional radius) to
|
|
9757
|
+
* receive only players in the caller's area of interest — the key to keeping
|
|
9758
|
+
* per-player fan-out bounded regardless of how populated the zone is.
|
|
9759
|
+
*
|
|
9760
|
+
* @param title_id Title UUID.
|
|
9761
|
+
* @param instance_id Instance UUID.
|
|
9762
|
+
* @param params grid_cell "cx:cy" and radius (0-4) to scope the query.
|
|
9763
|
+
* @example
|
|
9764
|
+
* Multiplayer.listInstancePresence('title-uuid', 'instance-uuid', { grid_cell: '12:8', radius: 1 });
|
|
9765
|
+
*/
|
|
9766
|
+
static listInstancePresence<T = MultiplayerPresence[]>(title_id: string, instance_id: string, params?: MultiplayerInstancePresenceParams): AxiosPromise<Response<T>>;
|
|
9767
|
+
/**
|
|
9768
|
+
* Enter a zone. The backend places the player into an active instance with
|
|
9769
|
+
* capacity (creating a new layer if all are full), enforces bans and realm
|
|
9770
|
+
* capacity, and upserts presence. Returns the instance and presence so the
|
|
9771
|
+
* client can connect and subscribe to the instance's real-time group.
|
|
9772
|
+
*
|
|
9773
|
+
* @param title_id Title UUID.
|
|
9774
|
+
* @param data Realm/zone target plus optional spawn position and metadata.
|
|
9775
|
+
* @example
|
|
9776
|
+
* Multiplayer.enterZone('title-uuid', {
|
|
9777
|
+
* player_id: 'steam:765...',
|
|
9778
|
+
* realm_id: 'realm-uuid',
|
|
9779
|
+
* zone_id: 'zone-uuid',
|
|
9780
|
+
* pos_x: 128.0, pos_z: 64.0
|
|
9781
|
+
* });
|
|
9782
|
+
*/
|
|
9783
|
+
static enterZone<T = MultiplayerEnterZoneResponse>(title_id: string, data: MultiplayerEnterZoneRequest): AxiosPromise<Response<T>>;
|
|
9784
|
+
/**
|
|
9785
|
+
* Update presence (position, heading, rich status) and refresh the TTL. Call
|
|
9786
|
+
* on a movement interval and on notable state changes.
|
|
9787
|
+
*
|
|
9788
|
+
* @param title_id Title UUID.
|
|
9789
|
+
* @param data New position/status for the player.
|
|
9790
|
+
*/
|
|
9791
|
+
static updatePresence<T = MultiplayerPresence>(title_id: string, data: MultiplayerUpdatePresenceRequest): AxiosPromise<Response<T>>;
|
|
9792
|
+
/**
|
|
9793
|
+
* Leave the world. Frees the player's instance slot and realm population.
|
|
9794
|
+
*
|
|
9795
|
+
* @param title_id Title UUID.
|
|
9796
|
+
* @param data Optional player_id for title-token clients.
|
|
9797
|
+
*/
|
|
9798
|
+
static leaveWorld<T = MultiplayerPresence>(title_id: string, data?: MultiplayerLeaveWorldRequest): AxiosPromise<Response<T>>;
|
|
9799
|
+
/**
|
|
9800
|
+
* Enqueue a matchmaking ticket. Idempotent per (queue, player): an existing
|
|
9801
|
+
* open ticket is returned rather than duplicated, so retries are safe. Poll
|
|
9802
|
+
* the ticket or subscribe to `matchmaking.matched` for the assignment.
|
|
9803
|
+
*
|
|
9804
|
+
* @param title_id Title UUID.
|
|
9805
|
+
* @param data Queue name plus optional party, skill, region, and attributes.
|
|
9806
|
+
* @example
|
|
9807
|
+
* Multiplayer.enqueueTicket('title-uuid', { player_id: 'steam:765...', queue: 'ranked_2v2', skill: 1840, region: 'us-central' });
|
|
9808
|
+
*/
|
|
9809
|
+
static enqueueTicket<T = MultiplayerMatchmakingTicket>(title_id: string, data: MultiplayerEnqueueTicketRequest): AxiosPromise<Response<T>>;
|
|
9810
|
+
/**
|
|
9811
|
+
* Poll a matchmaking ticket. A queued ticket past its TTL is reported as
|
|
9812
|
+
* `timed_out`; a matched ticket carries the connection `assignment`.
|
|
9813
|
+
*
|
|
9814
|
+
* @param title_id Title UUID.
|
|
9815
|
+
* @param ticket_id Ticket UUID.
|
|
9816
|
+
*/
|
|
9817
|
+
static showTicket<T = MultiplayerMatchmakingTicket>(title_id: string, ticket_id: string): AxiosPromise<Response<T>>;
|
|
9818
|
+
/**
|
|
9819
|
+
* Cancel a queued matchmaking ticket.
|
|
9820
|
+
*
|
|
9821
|
+
* @param title_id Title UUID.
|
|
9822
|
+
* @param ticket_id Ticket UUID.
|
|
9823
|
+
*/
|
|
9824
|
+
static cancelTicket<T = MultiplayerMatchmakingTicket>(title_id: string, ticket_id: string): AxiosPromise<Response<T>>;
|
|
9825
|
+
/**
|
|
9826
|
+
* Negotiate a real-time push connection. Returns the authorized group names
|
|
9827
|
+
* and the push endpoint. When SignalR/Web PubSub is configured, an
|
|
9828
|
+
* access_token scoped to those groups is included; otherwise `configured` is
|
|
9829
|
+
* false and the client should fall back to the polling endpoints.
|
|
9830
|
+
*
|
|
9831
|
+
* @param title_id Title UUID.
|
|
9832
|
+
* @param data Optional player_id and the scopes (lobby/voice/zone/instance) to subscribe to.
|
|
9833
|
+
* @example
|
|
9834
|
+
* Multiplayer.negotiateRealtime('title-uuid', { player_id: 'steam:765...', scopes: [{ type: 'instance', id: 'instance-uuid' }] });
|
|
9835
|
+
*/
|
|
9836
|
+
static negotiateRealtime<T = MultiplayerRealtimeNegotiateResponse>(title_id: string, data?: MultiplayerRealtimeNegotiateRequest): AxiosPromise<Response<T>>;
|
|
9837
|
+
/**
|
|
9838
|
+
* List bans for a title. Requires a title administrator JWT.
|
|
9839
|
+
*
|
|
9840
|
+
* @param title_id Title UUID.
|
|
9841
|
+
* @param params Optional scope/player/source filters and active_only.
|
|
9842
|
+
*/
|
|
9843
|
+
static listBans<T = MultiplayerBan[]>(title_id: string, params?: MultiplayerBanListParams): AxiosPromise<Response<T>>;
|
|
9844
|
+
/**
|
|
9845
|
+
* Ban a player at a scope (title/realm/lobby/server/voice). Requires a title
|
|
9846
|
+
* administrator JWT. Omit expires_at for a permanent ban.
|
|
9847
|
+
*
|
|
9848
|
+
* @param title_id Title UUID.
|
|
9849
|
+
* @param data Ban target and scope.
|
|
9850
|
+
* @example
|
|
9851
|
+
* Multiplayer.createBan('title-uuid', { player_id: 'steam:765...', scope: 'title', reason: 'Cheating: aimbot' });
|
|
9852
|
+
*/
|
|
9853
|
+
static createBan<T = MultiplayerBan>(title_id: string, data: MultiplayerCreateBanRequest): AxiosPromise<Response<T>>;
|
|
9854
|
+
/**
|
|
9855
|
+
* Lift a ban. Requires a title administrator JWT.
|
|
9856
|
+
*
|
|
9857
|
+
* @param title_id Title UUID.
|
|
9858
|
+
* @param ban_id Ban UUID.
|
|
9859
|
+
*/
|
|
9860
|
+
static deleteBan<T = MultiplayerDeleteBanResponse>(title_id: string, ban_id: string): AxiosPromise<Response<T>>;
|
|
9446
9861
|
}
|
|
9447
9862
|
|
|
9448
9863
|
declare class ServerOperations {
|