glitch-javascript-sdk 2.8.9 → 2.9.1
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 +32 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Subscriptions.d.ts +8 -0
- package/dist/esm/api/Titles.d.ts +7 -0
- package/dist/esm/api/Users.d.ts +5 -0
- package/dist/esm/index.js +32 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +20 -0
- package/package.json +1 -1
- package/src/api/Subscriptions.ts +14 -0
- package/src/api/Titles.ts +10 -0
- package/src/api/Users.ts +7 -0
- package/src/routes/SubscriptionsRoute.ts +8 -6
- package/src/routes/TitlesRoute.ts +2 -0
- package/src/routes/UserRoutes.ts +2 -0
package/dist/cjs/index.js
CHANGED
|
@@ -21985,6 +21985,7 @@ var UserRoutes = /** @class */ (function () {
|
|
|
21985
21985
|
resendVerificationEmail: { url: '/users/resendVerificationEmail', method: HTTP_METHODS.POST },
|
|
21986
21986
|
clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
|
|
21987
21987
|
getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
|
|
21988
|
+
playedGames: { url: '/users/me/played-games', method: HTTP_METHODS.GET },
|
|
21988
21989
|
};
|
|
21989
21990
|
return UserRoutes;
|
|
21990
21991
|
}());
|
|
@@ -22468,6 +22469,13 @@ var Users = /** @class */ (function () {
|
|
|
22468
22469
|
Users.getSubredditRules = function (subreddit, params) {
|
|
22469
22470
|
return Requests.processRoute(UserRoutes.routes.getSubredditRules, undefined, { subreddit: subreddit }, params);
|
|
22470
22471
|
};
|
|
22472
|
+
/**
|
|
22473
|
+
* Get a list of games the current user has played.
|
|
22474
|
+
* Includes playtime and last played timestamps.
|
|
22475
|
+
*/
|
|
22476
|
+
Users.playedGames = function (params) {
|
|
22477
|
+
return Requests.processRoute(UserRoutes.routes.playedGames, undefined, undefined, params);
|
|
22478
|
+
};
|
|
22471
22479
|
return Users;
|
|
22472
22480
|
}());
|
|
22473
22481
|
|
|
@@ -24952,6 +24960,7 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
24952
24960
|
url: '/titles/{title_id}/reports/attribution-funnel',
|
|
24953
24961
|
method: HTTP_METHODS.GET
|
|
24954
24962
|
},
|
|
24963
|
+
updateBuildStatus: { url: '/titles/{title_id}/deployments/{build_id}/status', method: HTTP_METHODS.PUT },
|
|
24955
24964
|
};
|
|
24956
24965
|
return TitlesRoute;
|
|
24957
24966
|
}());
|
|
@@ -25700,6 +25709,15 @@ var Titles = /** @class */ (function () {
|
|
|
25700
25709
|
Titles.attributionFunnel = function (title_id, params) {
|
|
25701
25710
|
return Requests.processRoute(TitlesRoute.routes.attributionFunnel, undefined, { title_id: title_id }, params);
|
|
25702
25711
|
};
|
|
25712
|
+
/**
|
|
25713
|
+
* Update the status of a specific deployment build.
|
|
25714
|
+
* @param title_id The UUID of the title.
|
|
25715
|
+
* @param build_id The UUID of the build.
|
|
25716
|
+
* @param status The new status ('ready', 'inactive', or 'failed').
|
|
25717
|
+
*/
|
|
25718
|
+
Titles.updateBuildStatus = function (title_id, build_id, status) {
|
|
25719
|
+
return Requests.processRoute(TitlesRoute.routes.updateBuildStatus, { status: status }, { title_id: title_id, build_id: build_id });
|
|
25720
|
+
};
|
|
25703
25721
|
return Titles;
|
|
25704
25722
|
}());
|
|
25705
25723
|
|
|
@@ -26744,6 +26762,8 @@ var SubscriptionsRoute = /** @class */ (function () {
|
|
|
26744
26762
|
method: HTTP_METHODS.POST
|
|
26745
26763
|
},
|
|
26746
26764
|
purchaseLicense: { url: '/titles/{title_id}/purchase', method: HTTP_METHODS.POST },
|
|
26765
|
+
listMyLicenses: { url: '/subscriptions/my-licenses', method: HTTP_METHODS.GET },
|
|
26766
|
+
refundLicense: { url: '/subscriptions/licenses/{license_id}/refund', method: HTTP_METHODS.POST },
|
|
26747
26767
|
};
|
|
26748
26768
|
return SubscriptionsRoute;
|
|
26749
26769
|
}());
|
|
@@ -26859,6 +26879,18 @@ var Subscriptions = /** @class */ (function () {
|
|
|
26859
26879
|
Subscriptions.purchaseLicense = function (title_id, data) {
|
|
26860
26880
|
return Requests.processRoute(SubscriptionsRoute.routes.purchaseLicense, data, { title_id: title_id });
|
|
26861
26881
|
};
|
|
26882
|
+
/**
|
|
26883
|
+
* List all game licenses (Premium/Rental) owned by the current user.
|
|
26884
|
+
*/
|
|
26885
|
+
Subscriptions.listMyLicenses = function (params) {
|
|
26886
|
+
return Requests.processRoute(SubscriptionsRoute.routes.listMyLicenses, undefined, undefined, params);
|
|
26887
|
+
};
|
|
26888
|
+
/**
|
|
26889
|
+
* Request a refund for a premium purchase.
|
|
26890
|
+
*/
|
|
26891
|
+
Subscriptions.refundLicense = function (license_id) {
|
|
26892
|
+
return Requests.processRoute(SubscriptionsRoute.routes.refundLicense, {}, { license_id: license_id });
|
|
26893
|
+
};
|
|
26862
26894
|
return Subscriptions;
|
|
26863
26895
|
}());
|
|
26864
26896
|
|