glitch-javascript-sdk 2.8.3 → 2.8.5
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 +39 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +17 -0
- package/dist/esm/api/Utility.d.ts +7 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +34 -5
- package/src/api/Utility.ts +10 -0
- package/src/routes/TitlesRoute.ts +7 -0
- package/src/routes/UtilityRoutes.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -3291,6 +3291,13 @@ declare class Utility {
|
|
|
3291
3291
|
* @returns promise
|
|
3292
3292
|
*/
|
|
3293
3293
|
static listTypes<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3294
|
+
/**
|
|
3295
|
+
* Get all genres that are associated with at least one game title.
|
|
3296
|
+
* Includes the 'titles_count' property.
|
|
3297
|
+
*
|
|
3298
|
+
* @returns promise
|
|
3299
|
+
*/
|
|
3300
|
+
static listActiveGenres<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3294
3301
|
}
|
|
3295
3302
|
|
|
3296
3303
|
declare class Tips {
|
|
@@ -4302,6 +4309,23 @@ declare class Titles {
|
|
|
4302
4309
|
* @returns AxiosPromise containing { valid: boolean, user_name: string, license_type: string }
|
|
4303
4310
|
*/
|
|
4304
4311
|
static validateInstall<T>(title_id: string, install_id: string): AxiosPromise<Response<T>>;
|
|
4312
|
+
/**
|
|
4313
|
+
* List all builds/deployments for a specific title.
|
|
4314
|
+
* @param title_id The UUID of the title.
|
|
4315
|
+
*/
|
|
4316
|
+
static listBuilds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4317
|
+
/**
|
|
4318
|
+
* List all cloud save slots for the player associated with this install.
|
|
4319
|
+
*/
|
|
4320
|
+
static listSaves<T>(title_id: string, install_id: string): AxiosPromise<Response<T>>;
|
|
4321
|
+
/**
|
|
4322
|
+
* Upload game progress. The user is identified by the install_id.
|
|
4323
|
+
*/
|
|
4324
|
+
static storeSave<T>(title_id: string, install_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4325
|
+
/**
|
|
4326
|
+
* Resolve a conflict.
|
|
4327
|
+
*/
|
|
4328
|
+
static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>>;
|
|
4305
4329
|
}
|
|
4306
4330
|
|
|
4307
4331
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -933,9 +933,9 @@ class Titles {
|
|
|
933
933
|
return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id, funnel_id });
|
|
934
934
|
}
|
|
935
935
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
936
|
+
/**
|
|
937
|
+
* Generates a presigned S3 URL for uploading a game build ZIP.
|
|
938
|
+
*/
|
|
939
939
|
public static getDeploymentUploadUrl<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
940
940
|
return Requests.processRoute(TitlesRoute.routes.getDeploymentUploadUrl, {}, { title_id });
|
|
941
941
|
}
|
|
@@ -991,11 +991,40 @@ class Titles {
|
|
|
991
991
|
*/
|
|
992
992
|
public static validateInstall<T>(title_id: string, install_id: string): AxiosPromise<Response<T>> {
|
|
993
993
|
return Requests.processRoute(
|
|
994
|
-
TitlesRoute.routes.validateInstall,
|
|
995
|
-
{},
|
|
994
|
+
TitlesRoute.routes.validateInstall,
|
|
995
|
+
{},
|
|
996
996
|
{ title_id: title_id, install_id: install_id }
|
|
997
997
|
);
|
|
998
998
|
}
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* List all builds/deployments for a specific title.
|
|
1002
|
+
* @param title_id The UUID of the title.
|
|
1003
|
+
*/
|
|
1004
|
+
public static listBuilds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1005
|
+
return Requests.processRoute(TitlesRoute.routes.listBuilds, {}, { title_id }, params);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* List all cloud save slots for the player associated with this install.
|
|
1010
|
+
*/
|
|
1011
|
+
public static listSaves<T>(title_id: string, install_id: string): AxiosPromise<Response<T>> {
|
|
1012
|
+
return Requests.processRoute(TitlesRoute.routes.listSaves, {}, { title_id, install_id });
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Upload game progress. The user is identified by the install_id.
|
|
1017
|
+
*/
|
|
1018
|
+
public static storeSave<T>(title_id: string, install_id: string, data: object): AxiosPromise<Response<T>> {
|
|
1019
|
+
return Requests.processRoute(TitlesRoute.routes.storeSave, data, { title_id, install_id });
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Resolve a conflict.
|
|
1024
|
+
*/
|
|
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
|
+
return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id, choice }, { title_id, install_id, save_id });
|
|
1027
|
+
}
|
|
999
1028
|
}
|
|
1000
1029
|
|
|
1001
1030
|
export default Titles;
|
package/src/api/Utility.ts
CHANGED
|
@@ -71,6 +71,16 @@ class Utility {
|
|
|
71
71
|
return Requests.processRoute(UtilityRoutes.routes.types, undefined, undefined, params);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Get all genres that are associated with at least one game title.
|
|
76
|
+
* Includes the 'titles_count' property.
|
|
77
|
+
*
|
|
78
|
+
* @returns promise
|
|
79
|
+
*/
|
|
80
|
+
public static listActiveGenres<T>(params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
81
|
+
return Requests.processRoute(UtilityRoutes.routes.genres_active, undefined, undefined, params);
|
|
82
|
+
}
|
|
83
|
+
|
|
74
84
|
}
|
|
75
85
|
|
|
76
86
|
export default Utility;
|
|
@@ -199,6 +199,13 @@ class TitlesRoute {
|
|
|
199
199
|
method: HTTP_METHODS.POST
|
|
200
200
|
},
|
|
201
201
|
|
|
202
|
+
listBuilds: { url: '/titles/{title_id}/deployments', method: HTTP_METHODS.GET },
|
|
203
|
+
|
|
204
|
+
listSaves: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.GET },
|
|
205
|
+
storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
|
|
206
|
+
resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
|
|
207
|
+
|
|
208
|
+
|
|
202
209
|
};
|
|
203
210
|
|
|
204
211
|
}
|
|
@@ -10,6 +10,7 @@ class UtilityRoutes {
|
|
|
10
10
|
genders: { url: '/util/genders', method: HTTP_METHODS.GET },
|
|
11
11
|
ethnicities : { url: '/util/ethnicities', method: HTTP_METHODS.GET },
|
|
12
12
|
types : { url: '/util/types', method: HTTP_METHODS.GET },
|
|
13
|
+
genres_active: { url: '/util/genres/active', method: HTTP_METHODS.GET },
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
}
|