glitch-javascript-sdk 3.8.2 → 3.8.4

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.
@@ -100,6 +100,14 @@ export interface DiscordUserCommandStatus {
100
100
  command_name: string;
101
101
  setup_path: string;
102
102
  configured: boolean;
103
+ command_ready: boolean;
104
+ credentials_configured: boolean;
105
+ user_install_enabled: boolean;
106
+ interactions_endpoint_configured: boolean;
107
+ command_registered: boolean;
108
+ command_id?: string | null;
109
+ configuration_error?: string | null;
110
+ checked_at?: string | null;
103
111
  }
104
112
  export type DiscordMediaCaptureStatus = 'processing' | 'ready' | 'complete' | 'failed' | 'expired';
105
113
  export type DiscordMediaCaptureAttachmentStatus = 'processing' | 'ready' | 'duplicate' | 'unsupported' | 'failed' | 'imported';
@@ -243,7 +243,13 @@ declare class Titles {
243
243
  */
244
244
  static viewInstall<T>(title_id: string, install_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
245
245
  /**
246
- * Create a new game install record.
246
+ * Create or update a game install record.
247
+ *
248
+ * `user_install_id` is required. `game_build_id` is optional: send the
249
+ * exact Glitch build UUID returned as `build_id` by a play session when it
250
+ * is available, and omit it for external/legacy/unknown builds. Do not
251
+ * guess a build id. `game_version`, `build_type`, `device_id`, platform,
252
+ * device type, and operating system may be sent independently.
247
253
  */
248
254
  static createInstall<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
249
255
  /**
@@ -254,17 +260,23 @@ declare class Titles {
254
260
  * Get a summary report of retention events for a specific title.
255
261
  */
256
262
  static retentionSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
263
+ /** Filter/group by platform, device_type, operating_system, game_version, optional game_build_id, or optional device_id. */
257
264
  static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
258
265
  static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
266
+ /** Returns string dimensions plus labeled `builds` and `devices` options for report filters. */
259
267
  static distinctDimensions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
260
268
  /**
261
269
  * List sessions for a specific title, with optional filters and pagination.
262
- * Returns a paginated list of sessions with start/end times, session_length, user info, etc.
270
+ * Returns a paginated list of sessions with start/end times, session_length,
271
+ * build/version/device snapshots, and user info. `game_build_id` and
272
+ * `device_id` filters are optional; unattributed/unknown options are exposed
273
+ * by distinctDimensions.
263
274
  */
264
275
  static listSessions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
265
276
  /**
266
277
  * Get aggregated average session length data (daily/weekly/monthly) for a title.
267
- * Optionally filter by platform/device_type/OS/version and group by one dimension.
278
+ * Optionally filter/group by platform, device type, OS, version, exact
279
+ * build id, or device id.
268
280
  */
269
281
  static sessionsAverage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
270
282
  static sessionsHistogram<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
@@ -475,11 +487,15 @@ declare class Titles {
475
487
  static listEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
476
488
  /**
477
489
  * Record a single in-game action.
490
+ *
491
+ * Keep step_key and action_key stable. Optional step_label,
492
+ * step_description, event_label, and event_description fields are
493
+ * canonical display text for those keys within the title.
478
494
  */
479
495
  static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
480
496
  /**
481
497
  * Record multiple events in one request (Batching).
482
- * @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
498
+ * @param data { events: Array<{game_install_id, step_key, step_label?, step_description?, action_key, event_label?, event_description?, previous_step_key?, metadata?, event_timestamp?}> }
483
499
  */
484
500
  static bulkCreateEvents<T>(title_id: string, data: {
485
501
  events: object[];
package/dist/esm/index.js CHANGED
@@ -12483,7 +12483,13 @@ var Titles = /** @class */ (function () {
12483
12483
  return Requests.processRoute(TitlesRoute.routes.viewInstall, {}, { title_id: title_id, install_id: install_id }, params);
12484
12484
  };
12485
12485
  /**
12486
- * Create a new game install record.
12486
+ * Create or update a game install record.
12487
+ *
12488
+ * `user_install_id` is required. `game_build_id` is optional: send the
12489
+ * exact Glitch build UUID returned as `build_id` by a play session when it
12490
+ * is available, and omit it for external/legacy/unknown builds. Do not
12491
+ * guess a build id. `game_version`, `build_type`, `device_id`, platform,
12492
+ * device type, and operating system may be sent independently.
12487
12493
  */
12488
12494
  Titles.createInstall = function (title_id, data, params) {
12489
12495
  return Requests.processRoute(TitlesRoute.routes.createInstall, data, { title_id: title_id }, params);
@@ -12500,25 +12506,31 @@ var Titles = /** @class */ (function () {
12500
12506
  Titles.retentionSummary = function (title_id, params) {
12501
12507
  return Requests.processRoute(TitlesRoute.routes.retentionSummary, {}, { title_id: title_id }, params);
12502
12508
  };
12509
+ /** Filter/group by platform, device_type, operating_system, game_version, optional game_build_id, or optional device_id. */
12503
12510
  Titles.activeRetentions = function (title_id, params) {
12504
12511
  return Requests.processRoute(TitlesRoute.routes.activeRetentions, {}, { title_id: title_id }, params);
12505
12512
  };
12506
12513
  Titles.retentionAnalysis = function (title_id, params) {
12507
12514
  return Requests.processRoute(TitlesRoute.routes.retentionAnalysis, {}, { title_id: title_id }, params);
12508
12515
  };
12516
+ /** Returns string dimensions plus labeled `builds` and `devices` options for report filters. */
12509
12517
  Titles.distinctDimensions = function (title_id, params) {
12510
12518
  return Requests.processRoute(TitlesRoute.routes.distinctDimensions, {}, { title_id: title_id }, params);
12511
12519
  };
12512
12520
  /**
12513
12521
  * List sessions for a specific title, with optional filters and pagination.
12514
- * Returns a paginated list of sessions with start/end times, session_length, user info, etc.
12522
+ * Returns a paginated list of sessions with start/end times, session_length,
12523
+ * build/version/device snapshots, and user info. `game_build_id` and
12524
+ * `device_id` filters are optional; unattributed/unknown options are exposed
12525
+ * by distinctDimensions.
12515
12526
  */
12516
12527
  Titles.listSessions = function (title_id, params) {
12517
12528
  return Requests.processRoute(TitlesRoute.routes.listSessions, {}, { title_id: title_id }, params);
12518
12529
  };
12519
12530
  /**
12520
12531
  * Get aggregated average session length data (daily/weekly/monthly) for a title.
12521
- * Optionally filter by platform/device_type/OS/version and group by one dimension.
12532
+ * Optionally filter/group by platform, device type, OS, version, exact
12533
+ * build id, or device id.
12522
12534
  */
12523
12535
  Titles.sessionsAverage = function (title_id, params) {
12524
12536
  return Requests.processRoute(TitlesRoute.routes.sessionsAverage, {}, { title_id: title_id }, params);
@@ -12790,13 +12802,17 @@ var Titles = /** @class */ (function () {
12790
12802
  };
12791
12803
  /**
12792
12804
  * Record a single in-game action.
12805
+ *
12806
+ * Keep step_key and action_key stable. Optional step_label,
12807
+ * step_description, event_label, and event_description fields are
12808
+ * canonical display text for those keys within the title.
12793
12809
  */
12794
12810
  Titles.createEvent = function (title_id, data) {
12795
12811
  return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id: title_id });
12796
12812
  };
12797
12813
  /**
12798
12814
  * Record multiple events in one request (Batching).
12799
- * @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
12815
+ * @param data { events: Array<{game_install_id, step_key, step_label?, step_description?, action_key, event_label?, event_description?, previous_step_key?, metadata?, event_timestamp?}> }
12800
12816
  */
12801
12817
  Titles.bulkCreateEvents = function (title_id, data) {
12802
12818
  return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id: title_id });