glitch-javascript-sdk 2.8.4 → 2.8.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
@@ -4314,6 +4314,18 @@ declare class Titles {
4314
4314
  * @param title_id The UUID of the title.
4315
4315
  */
4316
4316
  static listBuilds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4317
+ /**
4318
+ * List all cloud save slots for the player associated with this install.
4319
+ */
4320
+ static listSaves<T>(title_id: string, install_id: string): AxiosPromise<Response<T>>;
4321
+ /**
4322
+ * Upload game progress. The user is identified by the install_id.
4323
+ */
4324
+ static storeSave<T>(title_id: string, install_id: string, data: object): AxiosPromise<Response<T>>;
4325
+ /**
4326
+ * Resolve a conflict.
4327
+ */
4328
+ static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>>;
4317
4329
  }
4318
4330
 
4319
4331
  declare class Campaigns {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.8.4",
3
+ "version": "2.8.5",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Titles.ts CHANGED
@@ -1001,9 +1001,30 @@ class Titles {
1001
1001
  * List all builds/deployments for a specific title.
1002
1002
  * @param title_id The UUID of the title.
1003
1003
  */
1004
- public static listBuilds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
1005
- return Requests.processRoute(TitlesRoute.routes.listBuilds, {}, { title_id }, params);
1006
- }
1004
+ public static listBuilds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
1005
+ return Requests.processRoute(TitlesRoute.routes.listBuilds, {}, { title_id }, params);
1006
+ }
1007
+
1008
+ /**
1009
+ * List all cloud save slots for the player associated with this install.
1010
+ */
1011
+ public static listSaves<T>(title_id: string, install_id: string): AxiosPromise<Response<T>> {
1012
+ return Requests.processRoute(TitlesRoute.routes.listSaves, {}, { title_id, install_id });
1013
+ }
1014
+
1015
+ /**
1016
+ * Upload game progress. The user is identified by the install_id.
1017
+ */
1018
+ public static storeSave<T>(title_id: string, install_id: string, data: object): AxiosPromise<Response<T>> {
1019
+ return Requests.processRoute(TitlesRoute.routes.storeSave, data, { title_id, install_id });
1020
+ }
1021
+
1022
+ /**
1023
+ * Resolve a conflict.
1024
+ */
1025
+ public static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>> {
1026
+ return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id, choice }, { title_id, install_id, save_id });
1027
+ }
1007
1028
  }
1008
1029
 
1009
1030
  export default Titles;
@@ -201,6 +201,10 @@ class TitlesRoute {
201
201
 
202
202
  listBuilds: { url: '/titles/{title_id}/deployments', method: HTTP_METHODS.GET },
203
203
 
204
+ listSaves: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.GET },
205
+ storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
206
+ resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
207
+
204
208
 
205
209
  };
206
210