glitch-javascript-sdk 2.9.1 → 2.9.2
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 +15 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +8 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +15 -0
- package/src/routes/TitlesRoute.ts +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -4394,6 +4394,14 @@ declare class Titles {
|
|
|
4394
4394
|
* @param status The new status ('ready', 'inactive', or 'failed').
|
|
4395
4395
|
*/
|
|
4396
4396
|
static updateBuildStatus<T>(title_id: string, build_id: string, status: string): AxiosPromise<Response<T>>;
|
|
4397
|
+
/**
|
|
4398
|
+
* Proxies a request through the backend to the matchmaker.
|
|
4399
|
+
* This avoids HTTPS -> HTTP mixed content blocks.
|
|
4400
|
+
*
|
|
4401
|
+
* @param title_id The UUID of the game title.
|
|
4402
|
+
* @returns AxiosPromise containing { signallingServer: string }
|
|
4403
|
+
*/
|
|
4404
|
+
static getMatchmakerServer<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4397
4405
|
}
|
|
4398
4406
|
|
|
4399
4407
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -1092,6 +1092,21 @@ class Titles {
|
|
|
1092
1092
|
public static updateBuildStatus<T>(title_id: string, build_id: string, status: string): AxiosPromise<Response<T>> {
|
|
1093
1093
|
return Requests.processRoute(TitlesRoute.routes.updateBuildStatus, { status }, { title_id, build_id });
|
|
1094
1094
|
}
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Proxies a request through the backend to the matchmaker.
|
|
1098
|
+
* This avoids HTTPS -> HTTP mixed content blocks.
|
|
1099
|
+
*
|
|
1100
|
+
* @param title_id The UUID of the game title.
|
|
1101
|
+
* @returns AxiosPromise containing { signallingServer: string }
|
|
1102
|
+
*/
|
|
1103
|
+
public static getMatchmakerServer<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
1104
|
+
return Requests.processRoute(
|
|
1105
|
+
TitlesRoute.routes.getMatchmakerServer,
|
|
1106
|
+
{},
|
|
1107
|
+
{ title_id }
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1095
1110
|
}
|
|
1096
1111
|
|
|
1097
1112
|
export default Titles;
|
|
@@ -233,6 +233,11 @@ class TitlesRoute {
|
|
|
233
233
|
|
|
234
234
|
updateBuildStatus: { url: '/titles/{title_id}/deployments/{build_id}/status', method: HTTP_METHODS.PUT },
|
|
235
235
|
|
|
236
|
+
// Inside the routes object in TitlesRoute.ts
|
|
237
|
+
getMatchmakerServer: {
|
|
238
|
+
url: '/titles/{title_id}/matchmaker/server',
|
|
239
|
+
method: HTTP_METHODS.GET
|
|
240
|
+
},
|
|
236
241
|
|
|
237
242
|
};
|
|
238
243
|
|