glitch-javascript-sdk 3.1.3 → 3.1.5

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
@@ -3968,6 +3968,41 @@ declare class SocialPosts {
3968
3968
  }): AxiosPromise<Response<T>>;
3969
3969
  }
3970
3970
 
3971
+ type GameReviewRecommendation = 'recommended' | 'not_recommended' | 'neutral';
3972
+ type GameReviewSentiment = 'positive' | 'mixed' | 'negative';
3973
+ type GameReviewVoteType = 'helpful' | 'funny' | 'detailed' | 'not_helpful';
3974
+ type GameReviewReportReason = 'abuse' | 'spam' | 'off_topic' | 'manipulation' | 'hate' | 'personal_info' | 'other';
3975
+ interface GameReviewRatings {
3976
+ gameplay?: GameReviewSentiment;
3977
+ performance?: GameReviewSentiment;
3978
+ value?: GameReviewSentiment;
3979
+ content?: GameReviewSentiment;
3980
+ multiplayer?: GameReviewSentiment;
3981
+ monetization?: GameReviewSentiment;
3982
+ stability?: GameReviewSentiment;
3983
+ localization?: GameReviewSentiment;
3984
+ accessibility?: GameReviewSentiment;
3985
+ }
3986
+ interface CreateGameReviewRequest {
3987
+ recommendation: GameReviewRecommendation;
3988
+ title: string;
3989
+ body: string;
3990
+ review_type?: 'first_impression' | 'full_review' | 'bug_performance_warning' | 'early_access_feedback' | 'multiplayer_community_feedback' | 'monetization_pricing_feedback' | 'changed_opinion_after_update';
3991
+ liked?: string;
3992
+ needs_work?: string;
3993
+ audience?: string;
3994
+ language?: string;
3995
+ game_version?: string;
3996
+ platform?: string;
3997
+ acquisition_type?: 'purchased' | 'free_to_play' | 'free_copy' | 'promotional_key' | 'beta_key' | 'demo' | 'external_verified';
3998
+ received_for_free?: boolean;
3999
+ early_access?: boolean;
4000
+ current_version_review?: boolean;
4001
+ main_negative_reason?: 'bugs_crashes' | 'bad_performance' | 'not_enough_content' | 'misleading_marketing' | 'price_value' | 'monetization' | 'community_toxicity' | 'developer_business_decision' | 'localization' | 'server_network' | 'gameplay_design' | 'not_my_type' | 'other';
4002
+ change_reason?: string;
4003
+ ratings?: GameReviewRatings;
4004
+ }
4005
+ type UpdateGameReviewRequest = Partial<CreateGameReviewRequest>;
3971
4006
  declare class Titles {
3972
4007
  /**
3973
4008
  * List all the Titles.
@@ -4609,10 +4644,12 @@ declare class Titles {
4609
4644
  * @param params
4610
4645
  * - window: number (hours, default 24)
4611
4646
  * - limit: number (default 10)
4647
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
4612
4648
  */
4613
4649
  static getCommunityActivity<T>(params?: {
4614
4650
  window?: number;
4615
4651
  limit?: number;
4652
+ is_nsfw?: number | boolean;
4616
4653
  }): AxiosPromise<Response<T>>;
4617
4654
  /**
4618
4655
  * Get games trending on social media.
@@ -4621,11 +4658,13 @@ declare class Titles {
4621
4658
  * - type: 'influencer' (campaigns) or 'organic' (non-paid)
4622
4659
  * - window: number (hours, default 168)
4623
4660
  * - limit: number (default 10)
4661
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
4624
4662
  */
4625
4663
  static getSocialTrending<T>(params: {
4626
4664
  type: 'influencer' | 'organic';
4627
4665
  window?: number;
4628
4666
  limit?: number;
4667
+ is_nsfw?: number | boolean;
4629
4668
  }): AxiosPromise<Response<T>>;
4630
4669
  /**
4631
4670
  * Get a personalized discovery queue of games.
@@ -4633,10 +4672,12 @@ declare class Titles {
4633
4672
  * @param params
4634
4673
  * - limit: number (default 12)
4635
4674
  * - device_id: string (highly recommended for guest tracking)
4675
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
4636
4676
  */
4637
4677
  static getDiscoveryQueue<T>(params?: {
4638
4678
  limit?: number;
4639
4679
  device_id?: string;
4680
+ is_nsfw?: number | boolean;
4640
4681
  }): AxiosPromise<Response<T>>;
4641
4682
  /**
4642
4683
  * Get a curated, playable feed for the Swipe interface.
@@ -4648,6 +4689,7 @@ declare class Titles {
4648
4689
  * - seed?: number (For consistent randomization)
4649
4690
  * - genres?: string[] (Filter by genre names)
4650
4691
  * - models?: string[] (premium, rental, subscription, free)
4692
+ * - is_nsfw?: 1 | 0 (1 for adult titles only, 0 for safe titles only)
4651
4693
  * - excluded_ids?: string[] (UUIDs to skip)
4652
4694
  * - page?: number
4653
4695
  * - per_page?: number
@@ -4668,6 +4710,55 @@ declare class Titles {
4668
4710
  static wishlistConversions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4669
4711
  static wishlistGeo<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4670
4712
  static wishlistDevices<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4713
+ /**
4714
+ * List public reviews for a title.
4715
+ *
4716
+ * @param title_id The UUID of the title.
4717
+ * @param params Optional filters: recommendation, language, current_version_only,
4718
+ * verified_only, platform, acquisition_type, complaint, playtime, sort, per_page.
4719
+ */
4720
+ static listReviews<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4721
+ /**
4722
+ * Get aggregate review scores and structured praise/complaint summaries.
4723
+ */
4724
+ static reviewSummary<T>(title_id: string, params?: {
4725
+ language?: string;
4726
+ }): AxiosPromise<Response<T>>;
4727
+ /**
4728
+ * Create the current user's review for a title. The backend verifies play/purchase eligibility.
4729
+ */
4730
+ static createReview<T>(title_id: string, data: CreateGameReviewRequest): AxiosPromise<Response<T>>;
4731
+ /**
4732
+ * View a single review, including revision history when the backend includes it.
4733
+ */
4734
+ static viewReview<T>(review_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4735
+ /**
4736
+ * Update the current user's review and preserve a backend revision trail.
4737
+ */
4738
+ static updateReview<T>(review_id: string, data: UpdateGameReviewRequest): AxiosPromise<Response<T>>;
4739
+ /**
4740
+ * Delete the current user's review, or a title admin's moderated review.
4741
+ */
4742
+ static deleteReview<T>(review_id: string): AxiosPromise<Response<T>>;
4743
+ /**
4744
+ * Vote on a review as helpful, funny, detailed, or not helpful.
4745
+ */
4746
+ static voteReview<T>(review_id: string, vote_type: GameReviewVoteType): AxiosPromise<Response<T>>;
4747
+ /**
4748
+ * Report a review for moderation.
4749
+ */
4750
+ static reportReview<T>(review_id: string, data: {
4751
+ reason: GameReviewReportReason;
4752
+ notes?: string;
4753
+ }): AxiosPromise<Response<T>>;
4754
+ /**
4755
+ * Create or update the title developer's official response to a review.
4756
+ */
4757
+ static respondToReview<T>(review_id: string, data: {
4758
+ body: string;
4759
+ linked_patch_note_id?: string;
4760
+ issue_marked_fixed?: boolean;
4761
+ }): AxiosPromise<Response<T>>;
4671
4762
  }
4672
4763
 
4673
4764
  declare class Campaigns {
@@ -7074,6 +7165,11 @@ declare class Scheduler {
7074
7165
  * @param params { is_personalized: boolean }
7075
7166
  */
7076
7167
  static getTikTokTrendingKeywords<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
7168
+ /**
7169
+ * Get recommended search keywords on TikTok.
7170
+ * @param params { is_personalized: boolean }
7171
+ */
7172
+ static getTikTokRecommendedKeywords<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
7077
7173
  }
7078
7174
 
7079
7175
  declare class Funnel {
@@ -8079,6 +8175,880 @@ declare class Crm {
8079
8175
  static deleteContact<T>(contact_id: string): AxiosPromise<Response<T>>;
8080
8176
  }
8081
8177
 
8178
+ type MultiplayerLobbyType = 'public' | 'invisible' | 'friends_only' | 'private';
8179
+ type MultiplayerLobbyState = 'waiting' | 'ready' | 'in_game' | 'closed';
8180
+ type MultiplayerLobbyMemberStatus = 'joined' | 'left' | 'disconnected' | 'kicked' | 'banned';
8181
+ type MultiplayerLobbyMessageType = 'chat' | 'binary' | 'system' | 'ready' | 'invite' | 'kick' | 'voice';
8182
+ type MultiplayerServerType = 'dedicated' | 'listen' | 'relay';
8183
+ type MultiplayerServerStatus = 'active' | 'available' | 'draining' | 'offline';
8184
+ type MultiplayerTransport = 'udp' | 'tcp' | 'webrtc' | 'relay';
8185
+ type MultiplayerSessionState = 'reserved' | 'active' | 'released' | 'expired';
8186
+ type MultiplayerAuthTicketStatus = 'active' | 'consumed' | 'revoked' | 'expired';
8187
+ type MultiplayerFavoriteKind = 'favorite' | 'history';
8188
+ type MultiplayerVoiceProvider = 'glitch_relay' | 'external';
8189
+ type MultiplayerVoiceTopology = 'lobby' | 'server' | 'party' | 'proximity';
8190
+ type MultiplayerVoiceState = 'active' | 'closed';
8191
+ type MultiplayerVoiceCodec = 'opus' | 'pcm16' | 'aac';
8192
+ type MultiplayerVoiceParticipantStatus = 'joined' | 'left' | 'muted' | 'kicked';
8193
+ type MultiplayerVoicePacketType = 'audio' | 'speaking' | 'mute_state' | 'offer' | 'answer' | 'ice' | 'control';
8194
+ type MultiplayerMetadata = Record<string, any>;
8195
+ interface MultiplayerLobbyMember {
8196
+ id: string;
8197
+ lobby_id: string;
8198
+ player_id: string;
8199
+ user_id?: string | null;
8200
+ display_name?: string | null;
8201
+ status: MultiplayerLobbyMemberStatus;
8202
+ ready: boolean;
8203
+ member_data: MultiplayerMetadata;
8204
+ joined_at?: string | null;
8205
+ last_seen_at?: string | null;
8206
+ left_at?: string | null;
8207
+ }
8208
+ interface MultiplayerServer {
8209
+ id: string;
8210
+ title_id: string;
8211
+ name: string;
8212
+ server_type: MultiplayerServerType;
8213
+ status: MultiplayerServerStatus;
8214
+ region?: string | null;
8215
+ build_version?: string | null;
8216
+ host?: string | null;
8217
+ game_port?: number | null;
8218
+ query_port?: number | null;
8219
+ transport: MultiplayerTransport;
8220
+ connection_uri?: string | null;
8221
+ max_players: number;
8222
+ current_players: number;
8223
+ bot_players: number;
8224
+ secure: boolean;
8225
+ password_protected: boolean;
8226
+ private: boolean;
8227
+ tags: string[];
8228
+ rules: MultiplayerMetadata;
8229
+ metadata: MultiplayerMetadata;
8230
+ last_heartbeat_at?: string | null;
8231
+ expires_at?: string | null;
8232
+ created_at?: string | null;
8233
+ updated_at?: string | null;
8234
+ }
8235
+ interface MultiplayerLobby {
8236
+ id: string;
8237
+ title_id: string;
8238
+ server_id?: string | null;
8239
+ owner_player_id: string;
8240
+ owner_user_id?: string | null;
8241
+ lobby_type: MultiplayerLobbyType;
8242
+ state: MultiplayerLobbyState;
8243
+ joinable: boolean;
8244
+ max_members: number;
8245
+ member_count: number;
8246
+ region?: string | null;
8247
+ game_mode?: string | null;
8248
+ map_name?: string | null;
8249
+ skill_band?: number | null;
8250
+ metadata: MultiplayerMetadata;
8251
+ last_activity_at?: string | null;
8252
+ expires_at?: string | null;
8253
+ created_at?: string | null;
8254
+ updated_at?: string | null;
8255
+ members?: MultiplayerLobbyMember[];
8256
+ server?: MultiplayerServer | null;
8257
+ }
8258
+ interface MultiplayerLobbyMessage {
8259
+ id: string;
8260
+ lobby_id: string;
8261
+ player_id: string;
8262
+ user_id?: string | null;
8263
+ message_type: MultiplayerLobbyMessageType;
8264
+ payload: MultiplayerMetadata;
8265
+ sequence: number;
8266
+ created_at?: string | null;
8267
+ updated_at?: string | null;
8268
+ }
8269
+ interface MultiplayerSession {
8270
+ id: string;
8271
+ title_id: string;
8272
+ server_id?: string | null;
8273
+ lobby_id?: string | null;
8274
+ player_id: string;
8275
+ user_id?: string | null;
8276
+ state: MultiplayerSessionState;
8277
+ connection_payload: MultiplayerMetadata;
8278
+ last_heartbeat_at?: string | null;
8279
+ expires_at?: string | null;
8280
+ started_at?: string | null;
8281
+ ended_at?: string | null;
8282
+ created_at?: string | null;
8283
+ updated_at?: string | null;
8284
+ }
8285
+ interface MultiplayerAuthTicket {
8286
+ id: string;
8287
+ title_id: string;
8288
+ player_id: string;
8289
+ user_id?: string | null;
8290
+ remote_identity?: string | null;
8291
+ status: MultiplayerAuthTicketStatus;
8292
+ issued_at?: string | null;
8293
+ expires_at?: string | null;
8294
+ consumed_at?: string | null;
8295
+ created_at?: string | null;
8296
+ updated_at?: string | null;
8297
+ }
8298
+ interface MultiplayerServerFavorite {
8299
+ id: string;
8300
+ title_id: string;
8301
+ server_id?: string | null;
8302
+ user_id?: string | null;
8303
+ player_id: string;
8304
+ kind: MultiplayerFavoriteKind;
8305
+ name?: string | null;
8306
+ host?: string | null;
8307
+ game_port?: number | null;
8308
+ query_port?: number | null;
8309
+ metadata: MultiplayerMetadata;
8310
+ last_played_at?: string | null;
8311
+ created_at?: string | null;
8312
+ updated_at?: string | null;
8313
+ }
8314
+ interface MultiplayerVoiceParticipant {
8315
+ id: string;
8316
+ voice_room_id: string;
8317
+ player_id: string;
8318
+ user_id?: string | null;
8319
+ display_name?: string | null;
8320
+ status: MultiplayerVoiceParticipantStatus;
8321
+ muted: boolean;
8322
+ deafened: boolean;
8323
+ speaking: boolean;
8324
+ last_sequence: number;
8325
+ metadata: MultiplayerMetadata;
8326
+ joined_at?: string | null;
8327
+ last_heartbeat_at?: string | null;
8328
+ left_at?: string | null;
8329
+ expires_at?: string | null;
8330
+ created_at?: string | null;
8331
+ updated_at?: string | null;
8332
+ }
8333
+ interface MultiplayerVoiceRoom {
8334
+ id: string;
8335
+ title_id: string;
8336
+ lobby_id?: string | null;
8337
+ server_id?: string | null;
8338
+ owner_player_id: string;
8339
+ owner_user_id?: string | null;
8340
+ provider: MultiplayerVoiceProvider;
8341
+ topology: MultiplayerVoiceTopology;
8342
+ state: MultiplayerVoiceState;
8343
+ region?: string | null;
8344
+ codec: MultiplayerVoiceCodec;
8345
+ sample_rate: number;
8346
+ bitrate: number;
8347
+ frame_duration_ms: 10 | 20 | 40 | 60;
8348
+ channels: 1 | 2;
8349
+ max_participants: number;
8350
+ participant_count: number;
8351
+ recording_allowed: boolean;
8352
+ moderation_enabled: boolean;
8353
+ connection_config: MultiplayerMetadata;
8354
+ metadata: MultiplayerMetadata;
8355
+ last_activity_at?: string | null;
8356
+ expires_at?: string | null;
8357
+ created_at?: string | null;
8358
+ updated_at?: string | null;
8359
+ participants?: MultiplayerVoiceParticipant[];
8360
+ }
8361
+ interface MultiplayerVoicePacket {
8362
+ id: string;
8363
+ voice_room_id: string;
8364
+ participant_id?: string | null;
8365
+ player_id: string;
8366
+ packet_type: MultiplayerVoicePacketType;
8367
+ payload: string;
8368
+ sequence: number;
8369
+ duration_ms?: number | null;
8370
+ sent_at?: string | null;
8371
+ created_at?: string | null;
8372
+ updated_at?: string | null;
8373
+ }
8374
+ interface MultiplayerLobbySearchParams {
8375
+ region?: string;
8376
+ game_mode?: string;
8377
+ map_name?: string;
8378
+ lobby_type?: MultiplayerLobbyType;
8379
+ skill_band?: number;
8380
+ limit?: number;
8381
+ }
8382
+ interface MultiplayerCreateLobbyRequest {
8383
+ player_id?: string;
8384
+ display_name?: string;
8385
+ member_data?: MultiplayerMetadata;
8386
+ lobby_type?: MultiplayerLobbyType;
8387
+ state?: MultiplayerLobbyState;
8388
+ joinable?: boolean;
8389
+ max_members?: number;
8390
+ region?: string;
8391
+ game_mode?: string;
8392
+ map_name?: string;
8393
+ skill_band?: number;
8394
+ metadata?: MultiplayerMetadata;
8395
+ expires_at?: string;
8396
+ }
8397
+ interface MultiplayerJoinLobbyRequest {
8398
+ player_id?: string;
8399
+ display_name?: string;
8400
+ ready?: boolean;
8401
+ member_data?: MultiplayerMetadata;
8402
+ }
8403
+ interface MultiplayerLeaveLobbyRequest {
8404
+ player_id?: string;
8405
+ }
8406
+ interface MultiplayerUpdateLobbyRequest {
8407
+ player_id?: string;
8408
+ lobby_type?: MultiplayerLobbyType;
8409
+ state?: MultiplayerLobbyState;
8410
+ joinable?: boolean;
8411
+ max_members?: number;
8412
+ region?: string;
8413
+ game_mode?: string;
8414
+ map_name?: string;
8415
+ skill_band?: number;
8416
+ metadata?: MultiplayerMetadata;
8417
+ expires_at?: string;
8418
+ }
8419
+ interface MultiplayerSetLobbyServerRequest {
8420
+ player_id?: string;
8421
+ server_id: string;
8422
+ state?: MultiplayerLobbyState;
8423
+ joinable?: boolean;
8424
+ }
8425
+ interface MultiplayerLobbyMessagesParams {
8426
+ after_sequence?: number;
8427
+ limit?: number;
8428
+ }
8429
+ interface MultiplayerSendLobbyMessageRequest {
8430
+ player_id?: string;
8431
+ message_type?: MultiplayerLobbyMessageType;
8432
+ payload: MultiplayerMetadata;
8433
+ }
8434
+ interface MultiplayerServerBrowserParams {
8435
+ region?: string;
8436
+ build_version?: string;
8437
+ transport?: MultiplayerTransport;
8438
+ status?: MultiplayerServerStatus;
8439
+ secure?: boolean;
8440
+ include_private?: boolean;
8441
+ limit?: number;
8442
+ }
8443
+ interface MultiplayerRegisterServerRequest {
8444
+ name: string;
8445
+ server_type?: MultiplayerServerType;
8446
+ status?: MultiplayerServerStatus;
8447
+ region?: string;
8448
+ build_version?: string;
8449
+ host?: string;
8450
+ game_port?: number;
8451
+ query_port?: number;
8452
+ transport?: MultiplayerTransport;
8453
+ connection_uri?: string;
8454
+ max_players?: number;
8455
+ current_players?: number;
8456
+ bot_players?: number;
8457
+ secure?: boolean;
8458
+ password_protected?: boolean;
8459
+ private?: boolean;
8460
+ tags?: string[];
8461
+ rules?: MultiplayerMetadata;
8462
+ metadata?: MultiplayerMetadata;
8463
+ expires_at?: string;
8464
+ }
8465
+ interface MultiplayerRegisterServerResponse {
8466
+ server: MultiplayerServer;
8467
+ server_token: string;
8468
+ }
8469
+ interface MultiplayerServerHeartbeatRequest {
8470
+ server_token: string;
8471
+ status?: MultiplayerServerStatus;
8472
+ current_players?: number;
8473
+ bot_players?: number;
8474
+ rules?: MultiplayerMetadata;
8475
+ metadata?: MultiplayerMetadata;
8476
+ }
8477
+ interface MultiplayerReserveServerRequest {
8478
+ player_id?: string;
8479
+ lobby_id?: string;
8480
+ ttl_minutes?: number;
8481
+ }
8482
+ interface MultiplayerReserveServerResponse {
8483
+ session: MultiplayerSession;
8484
+ reservation_token: string;
8485
+ }
8486
+ interface MultiplayerSessionHeartbeatRequest {
8487
+ reservation_token: string;
8488
+ state?: Extract<MultiplayerSessionState, 'reserved' | 'active'>;
8489
+ ttl_minutes?: number;
8490
+ }
8491
+ interface MultiplayerSessionReleaseRequest {
8492
+ reservation_token: string;
8493
+ }
8494
+ interface MultiplayerIssueAuthTicketRequest {
8495
+ player_id?: string;
8496
+ remote_identity?: string;
8497
+ ttl_minutes?: number;
8498
+ }
8499
+ interface MultiplayerIssueAuthTicketResponse {
8500
+ ticket: MultiplayerAuthTicket;
8501
+ auth_ticket: string;
8502
+ }
8503
+ interface MultiplayerValidateAuthTicketRequest {
8504
+ auth_ticket: string;
8505
+ remote_identity?: string;
8506
+ consume?: boolean;
8507
+ }
8508
+ interface MultiplayerValidateAuthTicketForServerRequest extends MultiplayerValidateAuthTicketRequest {
8509
+ server_token: string;
8510
+ }
8511
+ interface MultiplayerValidateAuthTicketResponse {
8512
+ valid: boolean;
8513
+ ticket: MultiplayerAuthTicket;
8514
+ }
8515
+ interface MultiplayerFavoritesParams {
8516
+ player_id?: string;
8517
+ kind?: MultiplayerFavoriteKind;
8518
+ }
8519
+ interface MultiplayerFavoriteRequest {
8520
+ player_id?: string;
8521
+ server_id?: string;
8522
+ kind?: MultiplayerFavoriteKind;
8523
+ name?: string;
8524
+ host?: string;
8525
+ game_port?: number;
8526
+ query_port?: number;
8527
+ metadata?: MultiplayerMetadata;
8528
+ last_played_at?: string;
8529
+ }
8530
+ interface MultiplayerDeleteFavoriteParams {
8531
+ player_id?: string;
8532
+ }
8533
+ interface MultiplayerDeleteFavoriteResponse {
8534
+ deleted: boolean;
8535
+ }
8536
+ interface MultiplayerVoiceRoomListParams {
8537
+ lobby_id?: string;
8538
+ server_id?: string;
8539
+ provider?: MultiplayerVoiceProvider;
8540
+ topology?: MultiplayerVoiceTopology;
8541
+ state?: MultiplayerVoiceState;
8542
+ region?: string;
8543
+ limit?: number;
8544
+ }
8545
+ interface MultiplayerCreateVoiceRoomRequest {
8546
+ player_id?: string;
8547
+ display_name?: string;
8548
+ lobby_id?: string;
8549
+ server_id?: string;
8550
+ provider?: MultiplayerVoiceProvider;
8551
+ topology?: MultiplayerVoiceTopology;
8552
+ state?: MultiplayerVoiceState;
8553
+ region?: string;
8554
+ codec?: MultiplayerVoiceCodec;
8555
+ sample_rate?: number;
8556
+ bitrate?: number;
8557
+ frame_duration_ms?: 10 | 20 | 40 | 60;
8558
+ channels?: 1 | 2;
8559
+ max_participants?: number;
8560
+ recording_allowed?: boolean;
8561
+ moderation_enabled?: boolean;
8562
+ connection_config?: MultiplayerMetadata;
8563
+ metadata?: MultiplayerMetadata;
8564
+ ttl_minutes?: number;
8565
+ expires_at?: string;
8566
+ }
8567
+ interface MultiplayerUpdateVoiceRoomRequest {
8568
+ player_id?: string;
8569
+ state?: MultiplayerVoiceState;
8570
+ max_participants?: number;
8571
+ recording_allowed?: boolean;
8572
+ moderation_enabled?: boolean;
8573
+ connection_config?: MultiplayerMetadata;
8574
+ metadata?: MultiplayerMetadata;
8575
+ expires_at?: string;
8576
+ }
8577
+ interface MultiplayerJoinVoiceRoomRequest {
8578
+ player_id?: string;
8579
+ display_name?: string;
8580
+ metadata?: MultiplayerMetadata;
8581
+ ttl_minutes?: number;
8582
+ }
8583
+ interface MultiplayerVoiceRoomTokenResponse {
8584
+ voice_room: MultiplayerVoiceRoom;
8585
+ participant: MultiplayerVoiceParticipant;
8586
+ voice_token: string;
8587
+ }
8588
+ interface MultiplayerVoiceHeartbeatRequest {
8589
+ voice_token: string;
8590
+ muted?: boolean;
8591
+ deafened?: boolean;
8592
+ speaking?: boolean;
8593
+ last_sequence?: number;
8594
+ ttl_minutes?: number;
8595
+ }
8596
+ interface MultiplayerVoiceLeaveRequest {
8597
+ voice_token: string;
8598
+ }
8599
+ interface MultiplayerVoicePacketRequest {
8600
+ voice_token: string;
8601
+ packet_type?: MultiplayerVoicePacketType;
8602
+ payload: string;
8603
+ duration_ms?: number;
8604
+ }
8605
+ interface MultiplayerVoicePollRequest {
8606
+ voice_token: string;
8607
+ after_sequence?: number;
8608
+ limit?: number;
8609
+ exclude_self?: boolean;
8610
+ }
8611
+ /**
8612
+ * Steam-style multiplayer APIs for Glitch titles.
8613
+ *
8614
+ * The multiplayer surface is split into three groups:
8615
+ * lobby coordination, voice coordination, server browser/reservations, and short-lived auth tickets.
8616
+ * User JWTs can infer the player from the authenticated user. Title-token clients
8617
+ * and game clients without a Glitch user session should pass a stable `player_id`.
8618
+ * Dedicated servers use `server_token` on heartbeat and server-side ticket validation
8619
+ * so they do not need to hold a user JWT or title token.
8620
+ *
8621
+ * These endpoints are intentionally database-agnostic from the SDK's point of view:
8622
+ * callers work with public identifiers, metadata objects, and lifecycle events,
8623
+ * while the backend owns how those records are stored.
8624
+ */
8625
+ declare class Multiplayer {
8626
+ /**
8627
+ * Search joinable, non-expired lobbies for a title.
8628
+ *
8629
+ * Filters are exact-match except `skill_band`, which the backend can use for
8630
+ * near sorting. Default results exclude full, closed, unjoinable, and expired
8631
+ * lobbies. Lifecycle context: clients usually call this before `joinLobby`;
8632
+ * joins create a `lobby.joined` event on the backend.
8633
+ *
8634
+ * @param title_id Title UUID.
8635
+ * @param params Optional filters such as region, game mode, map, lobby type, skill band, and limit.
8636
+ * @example
8637
+ * Multiplayer.searchLobbies('title-uuid', {
8638
+ * region: 'us-central',
8639
+ * game_mode: 'ranked_duos',
8640
+ * skill_band: 1840,
8641
+ * limit: 25
8642
+ * });
8643
+ */
8644
+ static searchLobbies<T = MultiplayerLobby[]>(title_id: string, params?: MultiplayerLobbySearchParams): AxiosPromise<Response<T>>;
8645
+ /**
8646
+ * Create a lobby and insert the owner as the first joined member.
8647
+ *
8648
+ * Use this when matchmaking has no suitable lobby, when a player invites
8649
+ * friends, or when a party needs pre-game setup before server assignment.
8650
+ * Lifecycle events: `lobby.created`, then `lobby.joined` for the owner.
8651
+ *
8652
+ * @param title_id Title UUID.
8653
+ * @param data Lobby configuration and optional owner/member metadata.
8654
+ * @example
8655
+ * Multiplayer.createLobby('title-uuid', {
8656
+ * player_id: 'steam:76561198000000000',
8657
+ * display_name: 'CinderAce',
8658
+ * lobby_type: 'public',
8659
+ * max_members: 4,
8660
+ * region: 'us-central',
8661
+ * game_mode: 'ranked_duos',
8662
+ * metadata: { playlist: 'ranked', allow_voice: true }
8663
+ * });
8664
+ */
8665
+ static createLobby<T = MultiplayerLobby>(title_id: string, data: MultiplayerCreateLobbyRequest): AxiosPromise<Response<T>>;
8666
+ /**
8667
+ * Retrieve a lobby with members and assigned server information when present.
8668
+ *
8669
+ * Call this after lobby lifecycle notifications such as `lobby.joined`,
8670
+ * `lobby.updated`, `lobby.owner_transferred`, or `lobby.server_assigned`.
8671
+ *
8672
+ * @param title_id Title UUID.
8673
+ * @param lobby_id Lobby UUID.
8674
+ */
8675
+ static showLobby<T = MultiplayerLobby>(title_id: string, lobby_id: string): AxiosPromise<Response<T>>;
8676
+ /**
8677
+ * Join a lobby or refresh an existing membership.
8678
+ *
8679
+ * This call is idempotent for a player already in the lobby and can update
8680
+ * display name, ready state, or member metadata. It returns 409 when the lobby
8681
+ * is full, closed, expired, or not joinable. Lifecycle event: `lobby.joined`.
8682
+ *
8683
+ * @param title_id Title UUID.
8684
+ * @param lobby_id Lobby UUID.
8685
+ * @param data Player identity and optional member metadata.
8686
+ * @example
8687
+ * Multiplayer.joinLobby('title-uuid', 'lobby-uuid', {
8688
+ * player_id: 'steam:76561198000000001',
8689
+ * display_name: 'Nova',
8690
+ * ready: false,
8691
+ * member_data: { character: 'Ash', rank: 1799 }
8692
+ * });
8693
+ */
8694
+ static joinLobby<T = MultiplayerLobbyMember>(title_id: string, lobby_id: string, data: MultiplayerJoinLobbyRequest): AxiosPromise<Response<T>>;
8695
+ /**
8696
+ * Leave a lobby.
8697
+ *
8698
+ * If the owner leaves, ownership transfers to the oldest remaining joined
8699
+ * member. If no members remain, the lobby closes. Lifecycle events:
8700
+ * `lobby.left`, optionally `lobby.owner_transferred` or `lobby.updated`.
8701
+ *
8702
+ * @param title_id Title UUID.
8703
+ * @param lobby_id Lobby UUID.
8704
+ * @param data Optional player_id for title-token clients.
8705
+ */
8706
+ static leaveLobby<T = MultiplayerLobbyMember | null>(title_id: string, lobby_id: string, data?: MultiplayerLeaveLobbyRequest): AxiosPromise<Response<T>>;
8707
+ /**
8708
+ * Update lobby metadata, visibility, joinability, limits, or state.
8709
+ *
8710
+ * This is owner-only. `max_members` cannot be lower than the current member
8711
+ * count. Keep metadata low-frequency and mostly search/display oriented.
8712
+ * Lifecycle event: `lobby.updated`.
8713
+ *
8714
+ * @param title_id Title UUID.
8715
+ * @param lobby_id Lobby UUID.
8716
+ * @param data Owner identity plus fields to update.
8717
+ */
8718
+ static updateLobby<T = MultiplayerLobby>(title_id: string, lobby_id: string, data: MultiplayerUpdateLobbyRequest): AxiosPromise<Response<T>>;
8719
+ /**
8720
+ * Assign a registered game server to a lobby.
8721
+ *
8722
+ * This owner-only handoff mirrors Steam's SetLobbyGameServer flow. Clients
8723
+ * should react by reserving or connecting to the assigned server, then
8724
+ * optionally leaving the lobby. Lifecycle event: `lobby.server_assigned`.
8725
+ *
8726
+ * @param title_id Title UUID.
8727
+ * @param lobby_id Lobby UUID.
8728
+ * @param data Server UUID and optional lobby state/joinability updates.
8729
+ */
8730
+ static setLobbyServer<T = MultiplayerLobby>(title_id: string, lobby_id: string, data: MultiplayerSetLobbyServerRequest): AxiosPromise<Response<T>>;
8731
+ /**
8732
+ * List ordered low-bandwidth lobby messages.
8733
+ *
8734
+ * Use `after_sequence` to poll for messages missed during reconnects or after
8735
+ * a realtime `lobby.message_sent` event. This channel is for chat and control
8736
+ * messages, not gameplay, positional data, or voice streaming.
8737
+ *
8738
+ * @param title_id Title UUID.
8739
+ * @param lobby_id Lobby UUID.
8740
+ * @param params Optional sequence cursor and limit.
8741
+ */
8742
+ static listLobbyMessages<T = MultiplayerLobbyMessage[]>(title_id: string, lobby_id: string, params?: MultiplayerLobbyMessagesParams): AxiosPromise<Response<T>>;
8743
+ /**
8744
+ * Send a low-bandwidth message to all lobby members.
8745
+ *
8746
+ * Payloads are capped at 4KB by the backend. Use this for chat, ready signals,
8747
+ * invite/kick control messages, and owner-arbitrated choices. Lifecycle event:
8748
+ * `lobby.message_sent`.
8749
+ *
8750
+ * @param title_id Title UUID.
8751
+ * @param lobby_id Lobby UUID.
8752
+ * @param data Message type, sender identity, and JSON payload.
8753
+ * @example
8754
+ * Multiplayer.sendLobbyMessage('title-uuid', 'lobby-uuid', {
8755
+ * player_id: 'steam:76561198000000000',
8756
+ * message_type: 'ready',
8757
+ * payload: { ready: true }
8758
+ * });
8759
+ */
8760
+ static sendLobbyMessage<T = MultiplayerLobbyMessage>(title_id: string, lobby_id: string, data: MultiplayerSendLobbyMessageRequest): AxiosPromise<Response<T>>;
8761
+ /**
8762
+ * List active/non-expired voice rooms for a title.
8763
+ *
8764
+ * Rooms can be attached to a lobby, a server, a party, or a proximity group.
8765
+ * Use this to discover existing voice state before joining. Lifecycle context:
8766
+ * realtime transports should mirror `voice.room_created`, `voice.room_updated`,
8767
+ * `voice.joined`, and `voice.left`.
8768
+ *
8769
+ * @param title_id Title UUID.
8770
+ * @param params Optional room filters such as lobby_id, server_id, provider, topology, state, region, and limit.
8771
+ */
8772
+ static listVoiceRooms<T = MultiplayerVoiceRoom[]>(title_id: string, params?: MultiplayerVoiceRoomListParams): AxiosPromise<Response<T>>;
8773
+ /**
8774
+ * Create a voice room and join the creator as the first participant.
8775
+ *
8776
+ * The backend returns `voice_token` once. Keep it client-side and use it for
8777
+ * voice heartbeat, packet send, packet polling, and leave calls. `glitch_relay`
8778
+ * can carry base64 Opus frames for prototypes, small-party fallback, or
8779
+ * signaling. For production-scale audio, set `provider: 'external'` and reuse
8780
+ * the room/token contract with WebRTC, an SFU, Vivox, Steam Networking, or an
8781
+ * engine-native transport. Lifecycle events: `voice.room_created`,
8782
+ * `voice.joined`.
8783
+ *
8784
+ * @param title_id Title UUID.
8785
+ * @param data Voice codec, topology, linked lobby/server, and owner metadata.
8786
+ * @example
8787
+ * const { data } = await Multiplayer.createVoiceRoom('title-uuid', {
8788
+ * player_id: 'steam:76561198000000000',
8789
+ * display_name: 'CinderAce',
8790
+ * lobby_id: 'lobby-uuid',
8791
+ * provider: 'glitch_relay',
8792
+ * topology: 'lobby',
8793
+ * codec: 'opus',
8794
+ * sample_rate: 48000,
8795
+ * frame_duration_ms: 20,
8796
+ * channels: 1,
8797
+ * metadata: { push_to_talk: true }
8798
+ * });
8799
+ */
8800
+ static createVoiceRoom<T = MultiplayerVoiceRoomTokenResponse>(title_id: string, data: MultiplayerCreateVoiceRoomRequest): AxiosPromise<Response<T>>;
8801
+ /**
8802
+ * Retrieve a voice room with participant media states.
8803
+ *
8804
+ * Use this after `voice.joined`, `voice.heartbeat`, `voice.left`, or
8805
+ * `voice.room_updated` to refresh in-game UI such as speaker lists, mute
8806
+ * icons, or team voice controls.
8807
+ *
8808
+ * @param title_id Title UUID.
8809
+ * @param voice_room_id Voice room UUID.
8810
+ */
8811
+ static showVoiceRoom<T = MultiplayerVoiceRoom>(title_id: string, voice_room_id: string): AxiosPromise<Response<T>>;
8812
+ /**
8813
+ * Update owner-controlled voice room state.
8814
+ *
8815
+ * Owner-only. Use this to close a room, adjust capacity, update moderation
8816
+ * flags, or provide external provider connection details. The backend rejects
8817
+ * lowering `max_participants` below the current participant count. Lifecycle
8818
+ * event: `voice.room_updated`.
8819
+ *
8820
+ * @param title_id Title UUID.
8821
+ * @param voice_room_id Voice room UUID.
8822
+ * @param data Owner player identity and room fields to update.
8823
+ */
8824
+ static updateVoiceRoom<T = MultiplayerVoiceRoom>(title_id: string, voice_room_id: string, data: MultiplayerUpdateVoiceRoomRequest): AxiosPromise<Response<T>>;
8825
+ /**
8826
+ * Join a voice room and receive a participant-scoped token.
8827
+ *
8828
+ * Rejoining with the same player is idempotent and rotates the token. The
8829
+ * token is used by participant endpoints instead of requiring a user JWT or
8830
+ * title token on every media request. Returns 409 when the room is closed,
8831
+ * expired, or full. Lifecycle event: `voice.joined`.
8832
+ *
8833
+ * @param title_id Title UUID.
8834
+ * @param voice_room_id Voice room UUID.
8835
+ * @param data Player identity, display name, metadata, and token TTL.
8836
+ */
8837
+ static joinVoiceRoom<T = MultiplayerVoiceRoomTokenResponse>(title_id: string, voice_room_id: string, data: MultiplayerJoinVoiceRoomRequest): AxiosPromise<Response<T>>;
8838
+ /**
8839
+ * Heartbeat voice participant state.
8840
+ *
8841
+ * Call every 10-30 seconds and whenever mute/deafen/speaking state changes.
8842
+ * `last_sequence` tells the backend how far this participant has processed
8843
+ * ordered packets. Expired participants are rejected with 409. Lifecycle event:
8844
+ * `voice.heartbeat`.
8845
+ *
8846
+ * @param data Participant voice token and mutable media state.
8847
+ */
8848
+ static heartbeatVoice<T = MultiplayerVoiceParticipant>(data: MultiplayerVoiceHeartbeatRequest): AxiosPromise<Response<T>>;
8849
+ /**
8850
+ * Leave the current voice room for a participant token.
8851
+ *
8852
+ * This is idempotent for disconnect cleanup: room participant count is
8853
+ * decremented once, room ownership is transferred when possible, and an
8854
+ * empty room closes. The token remains valid only for retrying this leave
8855
+ * call; heartbeat, send, and poll calls reject left participants. Lifecycle
8856
+ * event: `voice.left`.
8857
+ *
8858
+ * @param data Participant voice token.
8859
+ */
8860
+ static leaveVoice<T = MultiplayerVoiceParticipant>(data: MultiplayerVoiceLeaveRequest): AxiosPromise<Response<T>>;
8861
+ /**
8862
+ * Send one ordered voice-room packet.
8863
+ *
8864
+ * `audio` packets should contain compact compressed frames such as base64 Opus
8865
+ * at 48kHz mono/20ms. `offer`, `answer`, and `ice` packets support WebRTC
8866
+ * signaling. `control`, `speaking`, and `mute_state` packets are for custom
8867
+ * engine state. Audio payloads are capped at 16KB; non-audio packets at 4KB.
8868
+ * Muted participants cannot send audio. Lifecycle event: `voice.packet_sent`.
8869
+ *
8870
+ * @param data Participant token, packet type, payload, and optional duration.
8871
+ * @example
8872
+ * await Multiplayer.sendVoicePacket({
8873
+ * voice_token: voiceToken,
8874
+ * packet_type: 'audio',
8875
+ * payload: base64OpusFrame,
8876
+ * duration_ms: 20
8877
+ * });
8878
+ */
8879
+ static sendVoicePacket<T = MultiplayerVoicePacket>(data: MultiplayerVoicePacketRequest): AxiosPromise<Response<T>>;
8880
+ /**
8881
+ * Poll ordered voice-room packets after a known sequence.
8882
+ *
8883
+ * Defaults to excluding packets sent by the caller. Use the highest returned
8884
+ * sequence as the next `after_sequence` cursor. This is useful for fallback
8885
+ * relay, WebRTC signaling, reconnect recovery, and small-party prototypes.
8886
+ * Lifecycle event: `voice.packet_polled`.
8887
+ *
8888
+ * @param data Participant token, optional sequence cursor, limit, and self-exclusion flag.
8889
+ */
8890
+ static pollVoicePackets<T = MultiplayerVoicePacket[]>(data: MultiplayerVoicePollRequest): AxiosPromise<Response<T>>;
8891
+ /**
8892
+ * Browse public, joinable multiplayer servers for a title.
8893
+ *
8894
+ * Default results exclude private, draining, offline, stale, expired, and full
8895
+ * servers. Title administrators can pass `include_private` to inspect servers
8896
+ * that normal clients cannot join.
8897
+ *
8898
+ * @param title_id Title UUID.
8899
+ * @param params Optional server browser filters.
8900
+ */
8901
+ static browseServers<T = MultiplayerServer[]>(title_id: string, params?: MultiplayerServerBrowserParams): AxiosPromise<Response<T>>;
8902
+ /**
8903
+ * Register or refresh a multiplayer server and receive a one-time server token.
8904
+ *
8905
+ * Store `server_token` only on the server process. The backend stores only a
8906
+ * hash and will not return the plain token again. Counts are validated so
8907
+ * `current_players + bot_players` cannot exceed `max_players`. Lifecycle event:
8908
+ * `server.registered`.
8909
+ *
8910
+ * @param title_id Title UUID.
8911
+ * @param data Server browser, connection, rule, and capacity metadata.
8912
+ * @example
8913
+ * Multiplayer.registerServer('title-uuid', {
8914
+ * name: 'Ranked US Central 01',
8915
+ * server_type: 'dedicated',
8916
+ * status: 'active',
8917
+ * host: '203.0.113.42',
8918
+ * game_port: 7777,
8919
+ * query_port: 27015,
8920
+ * transport: 'udp',
8921
+ * max_players: 16,
8922
+ * secure: true,
8923
+ * tags: ['ranked', 'duos']
8924
+ * });
8925
+ */
8926
+ static registerServer<T = MultiplayerRegisterServerResponse>(title_id: string, data: MultiplayerRegisterServerRequest): AxiosPromise<Response<T>>;
8927
+ /**
8928
+ * Heartbeat a multiplayer server with its dedicated `server_token`.
8929
+ *
8930
+ * Call every 30-60 seconds and whenever player counts, rules, or metadata
8931
+ * change. Stale servers are hidden from default browsing and reservation.
8932
+ * This endpoint is for dedicated/listen server processes and does not require
8933
+ * a user JWT. Lifecycle event: `server.heartbeat`.
8934
+ *
8935
+ * @param title_id Title UUID.
8936
+ * @param server_id Server UUID.
8937
+ * @param data Server token and optional mutable server state.
8938
+ */
8939
+ static heartbeatServer<T = MultiplayerServer>(title_id: string, server_id: string, data: MultiplayerServerHeartbeatRequest): AxiosPromise<Response<T>>;
8940
+ /**
8941
+ * Reserve a short-lived slot on a multiplayer server before connecting.
8942
+ *
8943
+ * Reservations protect capacity during game handoff. The backend rejects stale,
8944
+ * private, full, draining, offline, expired, or duplicate open reservations.
8945
+ * The plain `reservation_token` is returned once and is used for session
8946
+ * heartbeat/release calls. Lifecycle event: `server.reserved`.
8947
+ *
8948
+ * @param title_id Title UUID.
8949
+ * @param server_id Server UUID.
8950
+ * @param data Optional player/lobby identity and reservation TTL.
8951
+ */
8952
+ static reserveServer<T = MultiplayerReserveServerResponse>(title_id: string, server_id: string, data?: MultiplayerReserveServerRequest): AxiosPromise<Response<T>>;
8953
+ /**
8954
+ * Heartbeat an open multiplayer session reservation.
8955
+ *
8956
+ * Use this after a successful reservation while the client is connecting or
8957
+ * playing. Expired sessions are marked expired and capacity is recovered before
8958
+ * the backend returns 409. Lifecycle events: `session.heartbeat` or
8959
+ * `session.expired`.
8960
+ *
8961
+ * @param data Reservation token and optional state/TTL.
8962
+ */
8963
+ static heartbeatSession<T = MultiplayerSession>(data: MultiplayerSessionHeartbeatRequest): AxiosPromise<Response<T>>;
8964
+ /**
8965
+ * Release an open multiplayer session reservation.
8966
+ *
8967
+ * Call this on normal disconnect, failed connection attempts, or shutdown so
8968
+ * server capacity is decremented promptly. The backend makes release safe to
8969
+ * call more than once for an already closed reservation. Lifecycle event:
8970
+ * `session.released`.
8971
+ *
8972
+ * @param data Reservation token returned by `reserveServer`.
8973
+ */
8974
+ static releaseSession<T = MultiplayerSession>(data: MultiplayerSessionReleaseRequest): AxiosPromise<Response<T>>;
8975
+ /**
8976
+ * Issue a short-lived multiplayer auth ticket for a player.
8977
+ *
8978
+ * The plain `auth_ticket` is returned once and only a hash is stored by the
8979
+ * backend. Use this for P2P or dedicated-server admission before game traffic
8980
+ * begins. `remote_identity` can bind the ticket to a server or validator.
8981
+ * Lifecycle event: `auth_ticket.issued`.
8982
+ *
8983
+ * @param title_id Title UUID.
8984
+ * @param data Player identity, optional remote identity, and TTL.
8985
+ */
8986
+ static issueAuthTicket<T = MultiplayerIssueAuthTicketResponse>(title_id: string, data?: MultiplayerIssueAuthTicketRequest): AxiosPromise<Response<T>>;
8987
+ /**
8988
+ * Validate a multiplayer auth ticket from a trusted title/user context.
8989
+ *
8990
+ * Pass `consume: true` for one-time tickets to prevent replay. Dedicated
8991
+ * servers should usually call `validateAuthTicketForServer` so they can use
8992
+ * `server_token` instead of a title token or user JWT. Lifecycle event:
8993
+ * `auth_ticket.validated`.
8994
+ *
8995
+ * @param title_id Title UUID.
8996
+ * @param data Ticket, optional remote identity check, and consume flag.
8997
+ */
8998
+ static validateAuthTicket<T = MultiplayerValidateAuthTicketResponse>(title_id: string, data: MultiplayerValidateAuthTicketRequest): AxiosPromise<Response<T>>;
8999
+ /**
9000
+ * Validate an auth ticket as a dedicated server.
9001
+ *
9002
+ * This server-token endpoint lets a dedicated server admit players without
9003
+ * holding a user JWT or title token. Pass `consume: true` to prevent replay.
9004
+ * Lifecycle event: `auth_ticket.validated`.
9005
+ *
9006
+ * @param title_id Title UUID.
9007
+ * @param server_id Server UUID.
9008
+ * @param data Server token, player auth ticket, optional remote identity, and consume flag.
9009
+ */
9010
+ static validateAuthTicketForServer<T = MultiplayerValidateAuthTicketResponse>(title_id: string, server_id: string, data: MultiplayerValidateAuthTicketForServerRequest): AxiosPromise<Response<T>>;
9011
+ /**
9012
+ * List a player's server favorites or history entries.
9013
+ *
9014
+ * Use this for Steam-like favorites and recent servers tabs. Title-token
9015
+ * clients should pass `player_id`; user JWT clients default to the user UUID.
9016
+ *
9017
+ * @param title_id Title UUID.
9018
+ * @param params Optional player and favorite/history filter.
9019
+ */
9020
+ static listFavorites<T = MultiplayerServerFavorite[]>(title_id: string, params?: MultiplayerFavoritesParams): AxiosPromise<Response<T>>;
9021
+ /**
9022
+ * Add or update a favorite/history server entry for a player.
9023
+ *
9024
+ * Provide `server_id` for a registered Glitch server, or `host` plus
9025
+ * `game_port` for a direct/community server. Lifecycle event:
9026
+ * `favorite.upserted`.
9027
+ *
9028
+ * @param title_id Title UUID.
9029
+ * @param data Favorite/history target and optional metadata.
9030
+ */
9031
+ static addFavorite<T = MultiplayerServerFavorite>(title_id: string, data: MultiplayerFavoriteRequest): AxiosPromise<Response<T>>;
9032
+ /**
9033
+ * Delete a player's favorite/history server entry.
9034
+ *
9035
+ * The SDK sends optional `player_id` as a query parameter because the shared
9036
+ * request helper treats DELETE payloads as query params. This maps cleanly to
9037
+ * the backend's optional player identity validation for title-token clients.
9038
+ * Lifecycle event: `favorite.deleted`.
9039
+ *
9040
+ * @param title_id Title UUID.
9041
+ * @param favorite_id Favorite/history UUID.
9042
+ * @param params Optional player_id for title-token clients.
9043
+ */
9044
+ static deleteFavorite<T = MultiplayerDeleteFavoriteResponse>(title_id: string, favorite_id: string, params?: MultiplayerDeleteFavoriteParams): AxiosPromise<Response<T>>;
9045
+ }
9046
+
9047
+ declare class ServerOperations {
9048
+ static listDeployments<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
9049
+ static updatePolicy<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>>;
9050
+ }
9051
+
8082
9052
  interface Route {
8083
9053
  url: string;
8084
9054
  method: string;
@@ -8097,6 +9067,7 @@ declare class Requests {
8097
9067
  static get<T>(url: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
8098
9068
  static post<T>(url: string, data: any, params?: Record<string, any>): AxiosPromise<Response<T>>;
8099
9069
  static put<T>(url: string, data: any, params?: Record<string, any>): AxiosPromise<Response<T>>;
9070
+ static patch<T>(url: string, data: any, params?: Record<string, any>): AxiosPromise<Response<T>>;
8100
9071
  static delete<T>(url: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
8101
9072
  static uploadFile<T>(url: string, filename: string, file: File | Blob, data?: any, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
8102
9073
  static uploadBlob<T>(url: string, filename: string, blob: Blob, data?: any, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
@@ -8430,6 +9401,8 @@ declare class Glitch {
8430
9401
  DiscordMarketplace: typeof DiscordMarketplace;
8431
9402
  Education: typeof Education;
8432
9403
  Crm: typeof Crm;
9404
+ Multiplayer: typeof Multiplayer;
9405
+ ServerOperations: typeof ServerOperations;
8433
9406
  };
8434
9407
  static util: {
8435
9408
  Requests: typeof Requests;