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.
package/dist/index.d.ts CHANGED
@@ -4298,7 +4298,13 @@ declare class Titles {
4298
4298
  */
4299
4299
  static viewInstall<T>(title_id: string, install_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4300
4300
  /**
4301
- * Create a new game install record.
4301
+ * Create or update a game install record.
4302
+ *
4303
+ * `user_install_id` is required. `game_build_id` is optional: send the
4304
+ * exact Glitch build UUID returned as `build_id` by a play session when it
4305
+ * is available, and omit it for external/legacy/unknown builds. Do not
4306
+ * guess a build id. `game_version`, `build_type`, `device_id`, platform,
4307
+ * device type, and operating system may be sent independently.
4302
4308
  */
4303
4309
  static createInstall<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
4304
4310
  /**
@@ -4309,17 +4315,23 @@ declare class Titles {
4309
4315
  * Get a summary report of retention events for a specific title.
4310
4316
  */
4311
4317
  static retentionSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4318
+ /** Filter/group by platform, device_type, operating_system, game_version, optional game_build_id, or optional device_id. */
4312
4319
  static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4313
4320
  static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4321
+ /** Returns string dimensions plus labeled `builds` and `devices` options for report filters. */
4314
4322
  static distinctDimensions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4315
4323
  /**
4316
4324
  * List sessions for a specific title, with optional filters and pagination.
4317
- * Returns a paginated list of sessions with start/end times, session_length, user info, etc.
4325
+ * Returns a paginated list of sessions with start/end times, session_length,
4326
+ * build/version/device snapshots, and user info. `game_build_id` and
4327
+ * `device_id` filters are optional; unattributed/unknown options are exposed
4328
+ * by distinctDimensions.
4318
4329
  */
4319
4330
  static listSessions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4320
4331
  /**
4321
4332
  * Get aggregated average session length data (daily/weekly/monthly) for a title.
4322
- * Optionally filter by platform/device_type/OS/version and group by one dimension.
4333
+ * Optionally filter/group by platform, device type, OS, version, exact
4334
+ * build id, or device id.
4323
4335
  */
4324
4336
  static sessionsAverage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4325
4337
  static sessionsHistogram<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
@@ -4530,11 +4542,15 @@ declare class Titles {
4530
4542
  static listEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4531
4543
  /**
4532
4544
  * Record a single in-game action.
4545
+ *
4546
+ * Keep step_key and action_key stable. Optional step_label,
4547
+ * step_description, event_label, and event_description fields are
4548
+ * canonical display text for those keys within the title.
4533
4549
  */
4534
4550
  static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
4535
4551
  /**
4536
4552
  * Record multiple events in one request (Batching).
4537
- * @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
4553
+ * @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?}> }
4538
4554
  */
4539
4555
  static bulkCreateEvents<T>(title_id: string, data: {
4540
4556
  events: object[];
@@ -7066,6 +7082,14 @@ interface DiscordUserCommandStatus {
7066
7082
  command_name: string;
7067
7083
  setup_path: string;
7068
7084
  configured: boolean;
7085
+ command_ready: boolean;
7086
+ credentials_configured: boolean;
7087
+ user_install_enabled: boolean;
7088
+ interactions_endpoint_configured: boolean;
7089
+ command_registered: boolean;
7090
+ command_id?: string | null;
7091
+ configuration_error?: string | null;
7092
+ checked_at?: string | null;
7069
7093
  }
7070
7094
  type DiscordMediaCaptureStatus = 'processing' | 'ready' | 'complete' | 'failed' | 'expired';
7071
7095
  type DiscordMediaCaptureAttachmentStatus = 'processing' | 'ready' | 'duplicate' | 'unsupported' | 'failed' | 'imported';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.8.2",
3
+ "version": "3.8.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -112,6 +112,14 @@ export interface DiscordUserCommandStatus {
112
112
  command_name: string;
113
113
  setup_path: string;
114
114
  configured: boolean;
115
+ command_ready: boolean;
116
+ credentials_configured: boolean;
117
+ user_install_enabled: boolean;
118
+ interactions_endpoint_configured: boolean;
119
+ command_registered: boolean;
120
+ command_id?: string | null;
121
+ configuration_error?: string | null;
122
+ checked_at?: string | null;
115
123
  }
116
124
 
117
125
  export type DiscordMediaCaptureStatus = 'processing' | 'ready' | 'complete' | 'failed' | 'expired';
package/src/api/Titles.ts CHANGED
@@ -372,7 +372,13 @@ class Titles {
372
372
  }
373
373
 
374
374
  /**
375
- * Create a new game install record.
375
+ * Create or update a game install record.
376
+ *
377
+ * `user_install_id` is required. `game_build_id` is optional: send the
378
+ * exact Glitch build UUID returned as `build_id` by a play session when it
379
+ * is available, and omit it for external/legacy/unknown builds. Do not
380
+ * guess a build id. `game_version`, `build_type`, `device_id`, platform,
381
+ * device type, and operating system may be sent independently.
376
382
  */
377
383
  public static createInstall<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
378
384
  return Requests.processRoute(TitlesRoute.routes.createInstall, data, { title_id: title_id }, params);
@@ -392,6 +398,7 @@ class Titles {
392
398
  return Requests.processRoute(TitlesRoute.routes.retentionSummary, {}, { title_id: title_id }, params);
393
399
  }
394
400
 
401
+ /** Filter/group by platform, device_type, operating_system, game_version, optional game_build_id, or optional device_id. */
395
402
  public static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
396
403
  return Requests.processRoute(TitlesRoute.routes.activeRetentions, {}, { title_id }, params);
397
404
  }
@@ -400,13 +407,17 @@ class Titles {
400
407
  return Requests.processRoute(TitlesRoute.routes.retentionAnalysis, {}, { title_id }, params);
401
408
  }
402
409
 
410
+ /** Returns string dimensions plus labeled `builds` and `devices` options for report filters. */
403
411
  public static distinctDimensions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
404
412
  return Requests.processRoute(TitlesRoute.routes.distinctDimensions, {}, { title_id }, params);
405
413
  }
406
414
 
407
415
  /**
408
416
  * List sessions for a specific title, with optional filters and pagination.
409
- * Returns a paginated list of sessions with start/end times, session_length, user info, etc.
417
+ * Returns a paginated list of sessions with start/end times, session_length,
418
+ * build/version/device snapshots, and user info. `game_build_id` and
419
+ * `device_id` filters are optional; unattributed/unknown options are exposed
420
+ * by distinctDimensions.
410
421
  */
411
422
  public static listSessions<T>(
412
423
  title_id: string,
@@ -422,7 +433,8 @@ class Titles {
422
433
 
423
434
  /**
424
435
  * Get aggregated average session length data (daily/weekly/monthly) for a title.
425
- * Optionally filter by platform/device_type/OS/version and group by one dimension.
436
+ * Optionally filter/group by platform, device type, OS, version, exact
437
+ * build id, or device id.
426
438
  */
427
439
  public static sessionsAverage<T>(
428
440
  title_id: string,
@@ -915,6 +927,10 @@ class Titles {
915
927
 
916
928
  /**
917
929
  * Record a single in-game action.
930
+ *
931
+ * Keep step_key and action_key stable. Optional step_label,
932
+ * step_description, event_label, and event_description fields are
933
+ * canonical display text for those keys within the title.
918
934
  */
919
935
  public static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
920
936
  return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id });
@@ -922,7 +938,7 @@ class Titles {
922
938
 
923
939
  /**
924
940
  * Record multiple events in one request (Batching).
925
- * @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
941
+ * @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?}> }
926
942
  */
927
943
  public static bulkCreateEvents<T>(title_id: string, data: { events: object[] }): AxiosPromise<Response<T>> {
928
944
  return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id });