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
|
@@ -87,5 +87,13 @@ declare class Subscriptions {
|
|
|
87
87
|
* @param data { purchase_type: 'premium' | 'rental', payment_method_id: string }
|
|
88
88
|
*/
|
|
89
89
|
static purchaseLicense<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
90
|
+
/**
|
|
91
|
+
* List all game licenses (Premium/Rental) owned by the current user.
|
|
92
|
+
*/
|
|
93
|
+
static listMyLicenses<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
94
|
+
/**
|
|
95
|
+
* Request a refund for a premium purchase.
|
|
96
|
+
*/
|
|
97
|
+
static refundLicense<T>(license_id: string): AxiosPromise<Response<T>>;
|
|
90
98
|
}
|
|
91
99
|
export default Subscriptions;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -572,5 +572,12 @@ declare class Titles {
|
|
|
572
572
|
* @param title_id The UUID of the title.
|
|
573
573
|
*/
|
|
574
574
|
static attributionFunnel<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
575
|
+
/**
|
|
576
|
+
* Update the status of a specific deployment build.
|
|
577
|
+
* @param title_id The UUID of the title.
|
|
578
|
+
* @param build_id The UUID of the build.
|
|
579
|
+
* @param status The new status ('ready', 'inactive', or 'failed').
|
|
580
|
+
*/
|
|
581
|
+
static updateBuildStatus<T>(title_id: string, build_id: string, status: string): AxiosPromise<Response<T>>;
|
|
575
582
|
}
|
|
576
583
|
export default Titles;
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -391,5 +391,10 @@ declare class Users {
|
|
|
391
391
|
* @returns Promise resolving to the list of rules
|
|
392
392
|
*/
|
|
393
393
|
static getSubredditRules<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
394
|
+
/**
|
|
395
|
+
* Get a list of games the current user has played.
|
|
396
|
+
* Includes playtime and last played timestamps.
|
|
397
|
+
*/
|
|
398
|
+
static playedGames<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
394
399
|
}
|
|
395
400
|
export default Users;
|
package/dist/esm/index.js
CHANGED
|
@@ -8801,6 +8801,7 @@ var UserRoutes = /** @class */ (function () {
|
|
|
8801
8801
|
resendVerificationEmail: { url: '/users/resendVerificationEmail', method: HTTP_METHODS.POST },
|
|
8802
8802
|
clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
|
|
8803
8803
|
getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
|
|
8804
|
+
playedGames: { url: '/users/me/played-games', method: HTTP_METHODS.GET },
|
|
8804
8805
|
};
|
|
8805
8806
|
return UserRoutes;
|
|
8806
8807
|
}());
|
|
@@ -9284,6 +9285,13 @@ var Users = /** @class */ (function () {
|
|
|
9284
9285
|
Users.getSubredditRules = function (subreddit, params) {
|
|
9285
9286
|
return Requests.processRoute(UserRoutes.routes.getSubredditRules, undefined, { subreddit: subreddit }, params);
|
|
9286
9287
|
};
|
|
9288
|
+
/**
|
|
9289
|
+
* Get a list of games the current user has played.
|
|
9290
|
+
* Includes playtime and last played timestamps.
|
|
9291
|
+
*/
|
|
9292
|
+
Users.playedGames = function (params) {
|
|
9293
|
+
return Requests.processRoute(UserRoutes.routes.playedGames, undefined, undefined, params);
|
|
9294
|
+
};
|
|
9287
9295
|
return Users;
|
|
9288
9296
|
}());
|
|
9289
9297
|
|
|
@@ -11768,6 +11776,7 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11768
11776
|
url: '/titles/{title_id}/reports/attribution-funnel',
|
|
11769
11777
|
method: HTTP_METHODS.GET
|
|
11770
11778
|
},
|
|
11779
|
+
updateBuildStatus: { url: '/titles/{title_id}/deployments/{build_id}/status', method: HTTP_METHODS.PUT },
|
|
11771
11780
|
};
|
|
11772
11781
|
return TitlesRoute;
|
|
11773
11782
|
}());
|
|
@@ -12516,6 +12525,15 @@ var Titles = /** @class */ (function () {
|
|
|
12516
12525
|
Titles.attributionFunnel = function (title_id, params) {
|
|
12517
12526
|
return Requests.processRoute(TitlesRoute.routes.attributionFunnel, undefined, { title_id: title_id }, params);
|
|
12518
12527
|
};
|
|
12528
|
+
/**
|
|
12529
|
+
* Update the status of a specific deployment build.
|
|
12530
|
+
* @param title_id The UUID of the title.
|
|
12531
|
+
* @param build_id The UUID of the build.
|
|
12532
|
+
* @param status The new status ('ready', 'inactive', or 'failed').
|
|
12533
|
+
*/
|
|
12534
|
+
Titles.updateBuildStatus = function (title_id, build_id, status) {
|
|
12535
|
+
return Requests.processRoute(TitlesRoute.routes.updateBuildStatus, { status: status }, { title_id: title_id, build_id: build_id });
|
|
12536
|
+
};
|
|
12519
12537
|
return Titles;
|
|
12520
12538
|
}());
|
|
12521
12539
|
|
|
@@ -13560,6 +13578,8 @@ var SubscriptionsRoute = /** @class */ (function () {
|
|
|
13560
13578
|
method: HTTP_METHODS.POST
|
|
13561
13579
|
},
|
|
13562
13580
|
purchaseLicense: { url: '/titles/{title_id}/purchase', method: HTTP_METHODS.POST },
|
|
13581
|
+
listMyLicenses: { url: '/subscriptions/my-licenses', method: HTTP_METHODS.GET },
|
|
13582
|
+
refundLicense: { url: '/subscriptions/licenses/{license_id}/refund', method: HTTP_METHODS.POST },
|
|
13563
13583
|
};
|
|
13564
13584
|
return SubscriptionsRoute;
|
|
13565
13585
|
}());
|
|
@@ -13675,6 +13695,18 @@ var Subscriptions = /** @class */ (function () {
|
|
|
13675
13695
|
Subscriptions.purchaseLicense = function (title_id, data) {
|
|
13676
13696
|
return Requests.processRoute(SubscriptionsRoute.routes.purchaseLicense, data, { title_id: title_id });
|
|
13677
13697
|
};
|
|
13698
|
+
/**
|
|
13699
|
+
* List all game licenses (Premium/Rental) owned by the current user.
|
|
13700
|
+
*/
|
|
13701
|
+
Subscriptions.listMyLicenses = function (params) {
|
|
13702
|
+
return Requests.processRoute(SubscriptionsRoute.routes.listMyLicenses, undefined, undefined, params);
|
|
13703
|
+
};
|
|
13704
|
+
/**
|
|
13705
|
+
* Request a refund for a premium purchase.
|
|
13706
|
+
*/
|
|
13707
|
+
Subscriptions.refundLicense = function (license_id) {
|
|
13708
|
+
return Requests.processRoute(SubscriptionsRoute.routes.refundLicense, {}, { license_id: license_id });
|
|
13709
|
+
};
|
|
13678
13710
|
return Subscriptions;
|
|
13679
13711
|
}());
|
|
13680
13712
|
|