glitch-javascript-sdk 2.8.6 → 2.8.8
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 +75 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +41 -0
- package/dist/esm/index.js +75 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +41 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +57 -0
- package/src/routes/TitlesRoute.ts +33 -7
package/dist/index.d.ts
CHANGED
|
@@ -4341,6 +4341,47 @@ declare class Titles {
|
|
|
4341
4341
|
* Resolve a conflict.
|
|
4342
4342
|
*/
|
|
4343
4343
|
static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>>;
|
|
4344
|
+
/**
|
|
4345
|
+
* Toggle a game on the current user's wishlist.
|
|
4346
|
+
* If the game is not wishlisted, it will be added. If it is, it will be removed.
|
|
4347
|
+
*
|
|
4348
|
+
* @param title_id The UUID of the title.
|
|
4349
|
+
* @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
|
|
4350
|
+
*/
|
|
4351
|
+
static wishlistToggle<T>(title_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
4352
|
+
/**
|
|
4353
|
+
* Record a self-assigned excitement score (1-5) for a wishlisted game.
|
|
4354
|
+
*
|
|
4355
|
+
* @param title_id The UUID of the title.
|
|
4356
|
+
* @param data { score: number } - Must be between 1 and 5.
|
|
4357
|
+
*/
|
|
4358
|
+
static wishlistUpdateScore<T>(title_id: string, data: {
|
|
4359
|
+
score: number;
|
|
4360
|
+
}): AxiosPromise<Response<T>>;
|
|
4361
|
+
/**
|
|
4362
|
+
* Retrieve the current user's personal wishlist collection.
|
|
4363
|
+
*
|
|
4364
|
+
* @param params Optional pagination parameters (?page=1&per_page=25)
|
|
4365
|
+
*/
|
|
4366
|
+
static myWishlists<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4367
|
+
/**
|
|
4368
|
+
* Get Wishlist Intelligence statistics for a title.
|
|
4369
|
+
* Includes funnel data and predictive revenue forecasting.
|
|
4370
|
+
* Note: Requires Title Administrator permissions.
|
|
4371
|
+
*
|
|
4372
|
+
* @param title_id The UUID of the title.
|
|
4373
|
+
*/
|
|
4374
|
+
static wishlistStats<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4375
|
+
/**
|
|
4376
|
+
* Get the current user's specific wishlist for a title.
|
|
4377
|
+
* @param title_id The UUID of the title.
|
|
4378
|
+
*/
|
|
4379
|
+
static wishlistMe<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4380
|
+
/**
|
|
4381
|
+
* Get the consolidated attribution funnel report.
|
|
4382
|
+
* @param title_id The UUID of the title.
|
|
4383
|
+
*/
|
|
4384
|
+
static attributionFunnel<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4344
4385
|
}
|
|
4345
4386
|
|
|
4346
4387
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -1025,6 +1025,63 @@ class Titles {
|
|
|
1025
1025
|
public static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>> {
|
|
1026
1026
|
return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id, choice }, { title_id, install_id, save_id });
|
|
1027
1027
|
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Toggle a game on the current user's wishlist.
|
|
1031
|
+
* If the game is not wishlisted, it will be added. If it is, it will be removed.
|
|
1032
|
+
*
|
|
1033
|
+
* @param title_id The UUID of the title.
|
|
1034
|
+
* @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
|
|
1035
|
+
*/
|
|
1036
|
+
public static wishlistToggle<T>(title_id: string, data?: object): AxiosPromise<Response<T>> {
|
|
1037
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistToggle, data, { title_id });
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Record a self-assigned excitement score (1-5) for a wishlisted game.
|
|
1042
|
+
*
|
|
1043
|
+
* @param title_id The UUID of the title.
|
|
1044
|
+
* @param data { score: number } - Must be between 1 and 5.
|
|
1045
|
+
*/
|
|
1046
|
+
public static wishlistUpdateScore<T>(title_id: string, data: { score: number }): AxiosPromise<Response<T>> {
|
|
1047
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistUpdateScore, data, { title_id });
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Retrieve the current user's personal wishlist collection.
|
|
1052
|
+
*
|
|
1053
|
+
* @param params Optional pagination parameters (?page=1&per_page=25)
|
|
1054
|
+
*/
|
|
1055
|
+
public static myWishlists<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1056
|
+
return Requests.processRoute(TitlesRoute.routes.myWishlists, undefined, undefined, params);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* Get Wishlist Intelligence statistics for a title.
|
|
1061
|
+
* Includes funnel data and predictive revenue forecasting.
|
|
1062
|
+
* Note: Requires Title Administrator permissions.
|
|
1063
|
+
*
|
|
1064
|
+
* @param title_id The UUID of the title.
|
|
1065
|
+
*/
|
|
1066
|
+
public static wishlistStats<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
1067
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistStats, undefined, { title_id });
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Get the current user's specific wishlist for a title.
|
|
1072
|
+
* @param title_id The UUID of the title.
|
|
1073
|
+
*/
|
|
1074
|
+
public static wishlistMe<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
1075
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistMe, undefined, { title_id });
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Get the consolidated attribution funnel report.
|
|
1080
|
+
* @param title_id The UUID of the title.
|
|
1081
|
+
*/
|
|
1082
|
+
public static attributionFunnel<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1083
|
+
return Requests.processRoute(TitlesRoute.routes.attributionFunnel, undefined, { title_id }, params);
|
|
1084
|
+
}
|
|
1028
1085
|
}
|
|
1029
1086
|
|
|
1030
1087
|
export default Titles;
|
|
@@ -190,13 +190,13 @@ class TitlesRoute {
|
|
|
190
190
|
viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
|
|
191
191
|
developerPayoutSummary: { url: '/titles/{title_id}/payouts/summary', method: HTTP_METHODS.GET },
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
validateInstall: {
|
|
198
|
-
url: '/titles/{title_id}/installs/{install_id}/validate',
|
|
199
|
-
method: HTTP_METHODS.POST
|
|
193
|
+
/**
|
|
194
|
+
* The Aegis Handshake: Validates if a specific install/session is authorized to play.
|
|
195
|
+
* POST /titles/{title_id}/installs/{install_id}/validate
|
|
196
|
+
*/
|
|
197
|
+
validateInstall: {
|
|
198
|
+
url: '/titles/{title_id}/installs/{install_id}/validate',
|
|
199
|
+
method: HTTP_METHODS.POST
|
|
200
200
|
},
|
|
201
201
|
|
|
202
202
|
listBuilds: { url: '/titles/{title_id}/deployments', method: HTTP_METHODS.GET },
|
|
@@ -205,6 +205,32 @@ class TitlesRoute {
|
|
|
205
205
|
storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
|
|
206
206
|
resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
|
|
207
207
|
|
|
208
|
+
wishlistToggle: {
|
|
209
|
+
url: '/titles/{title_id}/wishlist',
|
|
210
|
+
method: HTTP_METHODS.POST
|
|
211
|
+
},
|
|
212
|
+
wishlistUpdateScore: {
|
|
213
|
+
url: '/titles/{title_id}/wishlist/score',
|
|
214
|
+
method: HTTP_METHODS.POST
|
|
215
|
+
},
|
|
216
|
+
wishlistStats: {
|
|
217
|
+
url: '/titles/{title_id}/wishlist/stats',
|
|
218
|
+
method: HTTP_METHODS.GET
|
|
219
|
+
},
|
|
220
|
+
myWishlists: {
|
|
221
|
+
url: '/users/me/wishlists',
|
|
222
|
+
method: HTTP_METHODS.GET
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
wishlistMe: {
|
|
226
|
+
url: '/titles/{title_id}/wishlist/me',
|
|
227
|
+
method: HTTP_METHODS.GET
|
|
228
|
+
},
|
|
229
|
+
attributionFunnel: {
|
|
230
|
+
url: '/titles/{title_id}/reports/attribution-funnel',
|
|
231
|
+
method: HTTP_METHODS.GET
|
|
232
|
+
},
|
|
233
|
+
|
|
208
234
|
|
|
209
235
|
};
|
|
210
236
|
|