glitch-javascript-sdk 2.8.6 → 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 +53 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +31 -0
- package/dist/esm/index.js +53 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +31 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +41 -0
- package/src/routes/TitlesRoute.ts +24 -7
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -531,5 +531,36 @@ declare class Titles {
|
|
|
531
531
|
* Resolve a conflict.
|
|
532
532
|
*/
|
|
533
533
|
static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>>;
|
|
534
|
+
/**
|
|
535
|
+
* Toggle a game on the current user's wishlist.
|
|
536
|
+
* If the game is not wishlisted, it will be added. If it is, it will be removed.
|
|
537
|
+
*
|
|
538
|
+
* @param title_id The UUID of the title.
|
|
539
|
+
* @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
|
|
540
|
+
*/
|
|
541
|
+
static wishlistToggle<T>(title_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
542
|
+
/**
|
|
543
|
+
* Record a self-assigned excitement score (1-5) for a wishlisted game.
|
|
544
|
+
*
|
|
545
|
+
* @param title_id The UUID of the title.
|
|
546
|
+
* @param data { score: number } - Must be between 1 and 5.
|
|
547
|
+
*/
|
|
548
|
+
static wishlistUpdateScore<T>(title_id: string, data: {
|
|
549
|
+
score: number;
|
|
550
|
+
}): AxiosPromise<Response<T>>;
|
|
551
|
+
/**
|
|
552
|
+
* Retrieve the current user's personal wishlist collection.
|
|
553
|
+
*
|
|
554
|
+
* @param params Optional pagination parameters (?page=1&per_page=25)
|
|
555
|
+
*/
|
|
556
|
+
static myWishlists<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
557
|
+
/**
|
|
558
|
+
* Get Wishlist Intelligence statistics for a title.
|
|
559
|
+
* Includes funnel data and predictive revenue forecasting.
|
|
560
|
+
* Note: Requires Title Administrator permissions.
|
|
561
|
+
*
|
|
562
|
+
* @param title_id The UUID of the title.
|
|
563
|
+
*/
|
|
564
|
+
static wishlistStats<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
534
565
|
}
|
|
535
566
|
export default Titles;
|
package/dist/esm/index.js
CHANGED
|
@@ -11744,6 +11744,22 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11744
11744
|
listSaves: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.GET },
|
|
11745
11745
|
storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
|
|
11746
11746
|
resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
|
|
11747
|
+
wishlistToggle: {
|
|
11748
|
+
url: '/titles/{title_id}/wishlist',
|
|
11749
|
+
method: HTTP_METHODS.POST
|
|
11750
|
+
},
|
|
11751
|
+
wishlistUpdateScore: {
|
|
11752
|
+
url: '/titles/{title_id}/wishlist/score',
|
|
11753
|
+
method: HTTP_METHODS.POST
|
|
11754
|
+
},
|
|
11755
|
+
wishlistStats: {
|
|
11756
|
+
url: '/titles/{title_id}/wishlist/stats',
|
|
11757
|
+
method: HTTP_METHODS.GET
|
|
11758
|
+
},
|
|
11759
|
+
myWishlists: {
|
|
11760
|
+
url: '/users/me/wishlists',
|
|
11761
|
+
method: HTTP_METHODS.GET
|
|
11762
|
+
},
|
|
11747
11763
|
};
|
|
11748
11764
|
return TitlesRoute;
|
|
11749
11765
|
}());
|
|
@@ -12441,6 +12457,43 @@ var Titles = /** @class */ (function () {
|
|
|
12441
12457
|
Titles.resolveSaveConflict = function (title_id, install_id, save_id, conflict_id, choice) {
|
|
12442
12458
|
return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id: conflict_id, choice: choice }, { title_id: title_id, install_id: install_id, save_id: save_id });
|
|
12443
12459
|
};
|
|
12460
|
+
/**
|
|
12461
|
+
* Toggle a game on the current user's wishlist.
|
|
12462
|
+
* If the game is not wishlisted, it will be added. If it is, it will be removed.
|
|
12463
|
+
*
|
|
12464
|
+
* @param title_id The UUID of the title.
|
|
12465
|
+
* @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
|
|
12466
|
+
*/
|
|
12467
|
+
Titles.wishlistToggle = function (title_id, data) {
|
|
12468
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistToggle, data, { title_id: title_id });
|
|
12469
|
+
};
|
|
12470
|
+
/**
|
|
12471
|
+
* Record a self-assigned excitement score (1-5) for a wishlisted game.
|
|
12472
|
+
*
|
|
12473
|
+
* @param title_id The UUID of the title.
|
|
12474
|
+
* @param data { score: number } - Must be between 1 and 5.
|
|
12475
|
+
*/
|
|
12476
|
+
Titles.wishlistUpdateScore = function (title_id, data) {
|
|
12477
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistUpdateScore, data, { title_id: title_id });
|
|
12478
|
+
};
|
|
12479
|
+
/**
|
|
12480
|
+
* Retrieve the current user's personal wishlist collection.
|
|
12481
|
+
*
|
|
12482
|
+
* @param params Optional pagination parameters (?page=1&per_page=25)
|
|
12483
|
+
*/
|
|
12484
|
+
Titles.myWishlists = function (params) {
|
|
12485
|
+
return Requests.processRoute(TitlesRoute.routes.myWishlists, undefined, undefined, params);
|
|
12486
|
+
};
|
|
12487
|
+
/**
|
|
12488
|
+
* Get Wishlist Intelligence statistics for a title.
|
|
12489
|
+
* Includes funnel data and predictive revenue forecasting.
|
|
12490
|
+
* Note: Requires Title Administrator permissions.
|
|
12491
|
+
*
|
|
12492
|
+
* @param title_id The UUID of the title.
|
|
12493
|
+
*/
|
|
12494
|
+
Titles.wishlistStats = function (title_id) {
|
|
12495
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistStats, undefined, { title_id: title_id });
|
|
12496
|
+
};
|
|
12444
12497
|
return Titles;
|
|
12445
12498
|
}());
|
|
12446
12499
|
|