glitch-javascript-sdk 2.8.3 → 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 +39 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +17 -0
- package/dist/esm/api/Utility.d.ts +7 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +34 -5
- package/src/api/Utility.ts +10 -0
- package/src/routes/TitlesRoute.ts +7 -0
- package/src/routes/UtilityRoutes.ts +1 -0
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -514,5 +514,22 @@ declare class Titles {
|
|
|
514
514
|
* @returns AxiosPromise containing { valid: boolean, user_name: string, license_type: string }
|
|
515
515
|
*/
|
|
516
516
|
static validateInstall<T>(title_id: string, install_id: string): AxiosPromise<Response<T>>;
|
|
517
|
+
/**
|
|
518
|
+
* List all builds/deployments for a specific title.
|
|
519
|
+
* @param title_id The UUID of the title.
|
|
520
|
+
*/
|
|
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>>;
|
|
517
534
|
}
|
|
518
535
|
export default Titles;
|
|
@@ -49,5 +49,12 @@ declare class Utility {
|
|
|
49
49
|
* @returns promise
|
|
50
50
|
*/
|
|
51
51
|
static listTypes<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Get all genres that are associated with at least one game title.
|
|
54
|
+
* Includes the 'titles_count' property.
|
|
55
|
+
*
|
|
56
|
+
* @returns promise
|
|
57
|
+
*/
|
|
58
|
+
static listActiveGenres<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
52
59
|
}
|
|
53
60
|
export default Utility;
|
package/dist/esm/index.js
CHANGED
|
@@ -10745,6 +10745,7 @@ var UtilityRoutes = /** @class */ (function () {
|
|
|
10745
10745
|
genders: { url: '/util/genders', method: HTTP_METHODS.GET },
|
|
10746
10746
|
ethnicities: { url: '/util/ethnicities', method: HTTP_METHODS.GET },
|
|
10747
10747
|
types: { url: '/util/types', method: HTTP_METHODS.GET },
|
|
10748
|
+
genres_active: { url: '/util/genres/active', method: HTTP_METHODS.GET },
|
|
10748
10749
|
};
|
|
10749
10750
|
return UtilityRoutes;
|
|
10750
10751
|
}());
|
|
@@ -10812,6 +10813,15 @@ var Utility = /** @class */ (function () {
|
|
|
10812
10813
|
Utility.listTypes = function (params) {
|
|
10813
10814
|
return Requests.processRoute(UtilityRoutes.routes.types, undefined, undefined, params);
|
|
10814
10815
|
};
|
|
10816
|
+
/**
|
|
10817
|
+
* Get all genres that are associated with at least one game title.
|
|
10818
|
+
* Includes the 'titles_count' property.
|
|
10819
|
+
*
|
|
10820
|
+
* @returns promise
|
|
10821
|
+
*/
|
|
10822
|
+
Utility.listActiveGenres = function (params) {
|
|
10823
|
+
return Requests.processRoute(UtilityRoutes.routes.genres_active, undefined, undefined, params);
|
|
10824
|
+
};
|
|
10815
10825
|
return Utility;
|
|
10816
10826
|
}());
|
|
10817
10827
|
|
|
@@ -11709,6 +11719,10 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11709
11719
|
url: '/titles/{title_id}/installs/{install_id}/validate',
|
|
11710
11720
|
method: HTTP_METHODS.POST
|
|
11711
11721
|
},
|
|
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 },
|
|
11712
11726
|
};
|
|
11713
11727
|
return TitlesRoute;
|
|
11714
11728
|
}());
|
|
@@ -12381,6 +12395,31 @@ var Titles = /** @class */ (function () {
|
|
|
12381
12395
|
Titles.validateInstall = function (title_id, install_id) {
|
|
12382
12396
|
return Requests.processRoute(TitlesRoute.routes.validateInstall, {}, { title_id: title_id, install_id: install_id });
|
|
12383
12397
|
};
|
|
12398
|
+
/**
|
|
12399
|
+
* List all builds/deployments for a specific title.
|
|
12400
|
+
* @param title_id The UUID of the title.
|
|
12401
|
+
*/
|
|
12402
|
+
Titles.listBuilds = function (title_id, params) {
|
|
12403
|
+
return Requests.processRoute(TitlesRoute.routes.listBuilds, {}, { title_id: title_id }, params);
|
|
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
|
+
};
|
|
12384
12423
|
return Titles;
|
|
12385
12424
|
}());
|
|
12386
12425
|
|