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/cjs/index.js +21 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +12 -0
- package/dist/esm/index.js +21 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +24 -3
- package/src/routes/TitlesRoute.ts +4 -0
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -519,5 +519,17 @@ declare class Titles {
|
|
|
519
519
|
* @param title_id The UUID of the title.
|
|
520
520
|
*/
|
|
521
521
|
static listBuilds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
522
|
+
/**
|
|
523
|
+
* List all cloud save slots for the player associated with this install.
|
|
524
|
+
*/
|
|
525
|
+
static listSaves<T>(title_id: string, install_id: string): AxiosPromise<Response<T>>;
|
|
526
|
+
/**
|
|
527
|
+
* Upload game progress. The user is identified by the install_id.
|
|
528
|
+
*/
|
|
529
|
+
static storeSave<T>(title_id: string, install_id: string, data: object): AxiosPromise<Response<T>>;
|
|
530
|
+
/**
|
|
531
|
+
* Resolve a conflict.
|
|
532
|
+
*/
|
|
533
|
+
static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>>;
|
|
522
534
|
}
|
|
523
535
|
export default Titles;
|
package/dist/esm/index.js
CHANGED
|
@@ -11720,6 +11720,9 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11720
11720
|
method: HTTP_METHODS.POST
|
|
11721
11721
|
},
|
|
11722
11722
|
listBuilds: { url: '/titles/{title_id}/deployments', method: HTTP_METHODS.GET },
|
|
11723
|
+
listSaves: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.GET },
|
|
11724
|
+
storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
|
|
11725
|
+
resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
|
|
11723
11726
|
};
|
|
11724
11727
|
return TitlesRoute;
|
|
11725
11728
|
}());
|
|
@@ -12399,6 +12402,24 @@ var Titles = /** @class */ (function () {
|
|
|
12399
12402
|
Titles.listBuilds = function (title_id, params) {
|
|
12400
12403
|
return Requests.processRoute(TitlesRoute.routes.listBuilds, {}, { title_id: title_id }, params);
|
|
12401
12404
|
};
|
|
12405
|
+
/**
|
|
12406
|
+
* List all cloud save slots for the player associated with this install.
|
|
12407
|
+
*/
|
|
12408
|
+
Titles.listSaves = function (title_id, install_id) {
|
|
12409
|
+
return Requests.processRoute(TitlesRoute.routes.listSaves, {}, { title_id: title_id, install_id: install_id });
|
|
12410
|
+
};
|
|
12411
|
+
/**
|
|
12412
|
+
* Upload game progress. The user is identified by the install_id.
|
|
12413
|
+
*/
|
|
12414
|
+
Titles.storeSave = function (title_id, install_id, data) {
|
|
12415
|
+
return Requests.processRoute(TitlesRoute.routes.storeSave, data, { title_id: title_id, install_id: install_id });
|
|
12416
|
+
};
|
|
12417
|
+
/**
|
|
12418
|
+
* Resolve a conflict.
|
|
12419
|
+
*/
|
|
12420
|
+
Titles.resolveSaveConflict = function (title_id, install_id, save_id, conflict_id, choice) {
|
|
12421
|
+
return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id: conflict_id, choice: choice }, { title_id: title_id, install_id: install_id, save_id: save_id });
|
|
12422
|
+
};
|
|
12402
12423
|
return Titles;
|
|
12403
12424
|
}());
|
|
12404
12425
|
|