glitch-javascript-sdk 2.8.5 → 2.8.7
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 +74 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +31 -0
- package/dist/esm/config/Config.d.ts +15 -0
- package/dist/esm/index.js +74 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +46 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +41 -0
- package/src/config/Config.ts +30 -2
- package/src/routes/TitlesRoute.ts +24 -7
package/dist/cjs/index.js
CHANGED
|
@@ -18944,6 +18944,12 @@ var Config = /** @class */ (function () {
|
|
|
18944
18944
|
this._baseUrlLocked = true;
|
|
18945
18945
|
}
|
|
18946
18946
|
};
|
|
18947
|
+
/**
|
|
18948
|
+
* Gets the base URL
|
|
18949
|
+
*/
|
|
18950
|
+
Config.getBaseUrl = function () {
|
|
18951
|
+
return Config._baseUrl;
|
|
18952
|
+
};
|
|
18947
18953
|
/**
|
|
18948
18954
|
* Set the JSON Web Token (JWT) that will be passed to the API
|
|
18949
18955
|
*
|
|
@@ -18953,6 +18959,12 @@ var Config = /** @class */ (function () {
|
|
|
18953
18959
|
Config._authToken = authToken;
|
|
18954
18960
|
Requests.setAuthToken(authToken);
|
|
18955
18961
|
};
|
|
18962
|
+
/**
|
|
18963
|
+
* Gets the auth token
|
|
18964
|
+
*/
|
|
18965
|
+
Config.getAuthToken = function () {
|
|
18966
|
+
return Config._authToken;
|
|
18967
|
+
};
|
|
18956
18968
|
/**
|
|
18957
18969
|
* Set the community to be associated with this config through
|
|
18958
18970
|
*
|
|
@@ -18982,6 +18994,9 @@ var Config = /** @class */ (function () {
|
|
|
18982
18994
|
this._rootDomain = formattedDomain;
|
|
18983
18995
|
Storage.setRootDomain(formattedDomain);
|
|
18984
18996
|
};
|
|
18997
|
+
/**
|
|
18998
|
+
* Gets the root domain
|
|
18999
|
+
*/
|
|
18985
19000
|
Config.getRootDomain = function () {
|
|
18986
19001
|
return this._rootDomain;
|
|
18987
19002
|
};
|
|
@@ -19015,6 +19030,12 @@ var Config = /** @class */ (function () {
|
|
|
19015
19030
|
enumerable: false,
|
|
19016
19031
|
configurable: true
|
|
19017
19032
|
});
|
|
19033
|
+
/**
|
|
19034
|
+
* Checks if the base URL is locked
|
|
19035
|
+
*/
|
|
19036
|
+
Config.isBaseUrlLocked = function () {
|
|
19037
|
+
return this._baseUrlLocked;
|
|
19038
|
+
};
|
|
19018
19039
|
Config._baseUrlLocked = false;
|
|
19019
19040
|
return Config;
|
|
19020
19041
|
}());
|
|
@@ -24907,6 +24928,22 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
24907
24928
|
listSaves: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.GET },
|
|
24908
24929
|
storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
|
|
24909
24930
|
resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
|
|
24931
|
+
wishlistToggle: {
|
|
24932
|
+
url: '/titles/{title_id}/wishlist',
|
|
24933
|
+
method: HTTP_METHODS.POST
|
|
24934
|
+
},
|
|
24935
|
+
wishlistUpdateScore: {
|
|
24936
|
+
url: '/titles/{title_id}/wishlist/score',
|
|
24937
|
+
method: HTTP_METHODS.POST
|
|
24938
|
+
},
|
|
24939
|
+
wishlistStats: {
|
|
24940
|
+
url: '/titles/{title_id}/wishlist/stats',
|
|
24941
|
+
method: HTTP_METHODS.GET
|
|
24942
|
+
},
|
|
24943
|
+
myWishlists: {
|
|
24944
|
+
url: '/users/me/wishlists',
|
|
24945
|
+
method: HTTP_METHODS.GET
|
|
24946
|
+
},
|
|
24910
24947
|
};
|
|
24911
24948
|
return TitlesRoute;
|
|
24912
24949
|
}());
|
|
@@ -25604,6 +25641,43 @@ var Titles = /** @class */ (function () {
|
|
|
25604
25641
|
Titles.resolveSaveConflict = function (title_id, install_id, save_id, conflict_id, choice) {
|
|
25605
25642
|
return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id: conflict_id, choice: choice }, { title_id: title_id, install_id: install_id, save_id: save_id });
|
|
25606
25643
|
};
|
|
25644
|
+
/**
|
|
25645
|
+
* Toggle a game on the current user's wishlist.
|
|
25646
|
+
* If the game is not wishlisted, it will be added. If it is, it will be removed.
|
|
25647
|
+
*
|
|
25648
|
+
* @param title_id The UUID of the title.
|
|
25649
|
+
* @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
|
|
25650
|
+
*/
|
|
25651
|
+
Titles.wishlistToggle = function (title_id, data) {
|
|
25652
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistToggle, data, { title_id: title_id });
|
|
25653
|
+
};
|
|
25654
|
+
/**
|
|
25655
|
+
* Record a self-assigned excitement score (1-5) for a wishlisted game.
|
|
25656
|
+
*
|
|
25657
|
+
* @param title_id The UUID of the title.
|
|
25658
|
+
* @param data { score: number } - Must be between 1 and 5.
|
|
25659
|
+
*/
|
|
25660
|
+
Titles.wishlistUpdateScore = function (title_id, data) {
|
|
25661
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistUpdateScore, data, { title_id: title_id });
|
|
25662
|
+
};
|
|
25663
|
+
/**
|
|
25664
|
+
* Retrieve the current user's personal wishlist collection.
|
|
25665
|
+
*
|
|
25666
|
+
* @param params Optional pagination parameters (?page=1&per_page=25)
|
|
25667
|
+
*/
|
|
25668
|
+
Titles.myWishlists = function (params) {
|
|
25669
|
+
return Requests.processRoute(TitlesRoute.routes.myWishlists, undefined, undefined, params);
|
|
25670
|
+
};
|
|
25671
|
+
/**
|
|
25672
|
+
* Get Wishlist Intelligence statistics for a title.
|
|
25673
|
+
* Includes funnel data and predictive revenue forecasting.
|
|
25674
|
+
* Note: Requires Title Administrator permissions.
|
|
25675
|
+
*
|
|
25676
|
+
* @param title_id The UUID of the title.
|
|
25677
|
+
*/
|
|
25678
|
+
Titles.wishlistStats = function (title_id) {
|
|
25679
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistStats, undefined, { title_id: title_id });
|
|
25680
|
+
};
|
|
25607
25681
|
return Titles;
|
|
25608
25682
|
}());
|
|
25609
25683
|
|