glitch-javascript-sdk 2.9.1 → 2.9.3
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 +45 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Newsletters.d.ts +6 -0
- package/dist/esm/api/Titles.d.ts +20 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +26 -0
- package/package.json +1 -1
- package/src/api/Newsletters.ts +9 -0
- package/src/api/Titles.ts +36 -0
- package/src/routes/NewslettersRoutes.ts +1 -0
- package/src/routes/TitlesRoute.ts +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -4394,6 +4394,26 @@ 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>>;
|
|
4405
|
+
/**
|
|
4406
|
+
* Initiates a resumable S3 multipart upload for large files.
|
|
4407
|
+
*/
|
|
4408
|
+
static initiateMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4409
|
+
/**
|
|
4410
|
+
* Get presigned URLs for specific chunk parts.
|
|
4411
|
+
*/
|
|
4412
|
+
static getMultipartUrls<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4413
|
+
/**
|
|
4414
|
+
* Stitch together all uploaded chunks to complete the file in S3.
|
|
4415
|
+
*/
|
|
4416
|
+
static completeMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4397
4417
|
}
|
|
4398
4418
|
|
|
4399
4419
|
declare class Campaigns {
|
|
@@ -5788,6 +5808,12 @@ declare class Newsletters {
|
|
|
5788
5808
|
* @returns Promise
|
|
5789
5809
|
*/
|
|
5790
5810
|
static joinDistributionWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5811
|
+
/**
|
|
5812
|
+
* Register for Consumer Early Access to the streaming platform.
|
|
5813
|
+
*
|
|
5814
|
+
* @param data { name, email }
|
|
5815
|
+
*/
|
|
5816
|
+
static joinConsumerWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5791
5817
|
}
|
|
5792
5818
|
|
|
5793
5819
|
declare class PlayTests {
|
package/package.json
CHANGED
package/src/api/Newsletters.ts
CHANGED
|
@@ -173,6 +173,15 @@ class Newsletters {
|
|
|
173
173
|
return Requests.processRoute(NewslettersRoutes.routes.joinDistributionWaitlist, data, undefined, params);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Register for Consumer Early Access to the streaming platform.
|
|
178
|
+
*
|
|
179
|
+
* @param data { name, email }
|
|
180
|
+
*/
|
|
181
|
+
public static joinConsumerWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
182
|
+
return Requests.processRoute(NewslettersRoutes.routes.joinConsumerWaitlist, data, undefined, params);
|
|
183
|
+
}
|
|
184
|
+
|
|
176
185
|
}
|
|
177
186
|
|
|
178
187
|
export default Newsletters;
|
package/src/api/Titles.ts
CHANGED
|
@@ -1092,6 +1092,42 @@ 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
|
+
}
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Initiates a resumable S3 multipart upload for large files.
|
|
1113
|
+
*/
|
|
1114
|
+
public static initiateMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
1115
|
+
return Requests.processRoute(TitlesRoute.routes.initiateMultipartUpload, data, { title_id });
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Get presigned URLs for specific chunk parts.
|
|
1120
|
+
*/
|
|
1121
|
+
public static getMultipartUrls<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
1122
|
+
return Requests.processRoute(TitlesRoute.routes.getMultipartUrls, data, { title_id });
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Stitch together all uploaded chunks to complete the file in S3.
|
|
1127
|
+
*/
|
|
1128
|
+
public static completeMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
1129
|
+
return Requests.processRoute(TitlesRoute.routes.completeMultipartUpload, data, { title_id });
|
|
1130
|
+
}
|
|
1095
1131
|
}
|
|
1096
1132
|
|
|
1097
1133
|
export default Titles;
|
|
@@ -30,6 +30,7 @@ class NewslettersRoutes {
|
|
|
30
30
|
updateSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.PUT },
|
|
31
31
|
deleteSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.DELETE },
|
|
32
32
|
joinDistributionWaitlist: { url: '/newsletters/joinDistributionWaitlist', method: HTTP_METHODS.POST },
|
|
33
|
+
joinConsumerWaitlist: { url: '/newsletters/joinConsumerWaitlist', method: HTTP_METHODS.POST },
|
|
33
34
|
|
|
34
35
|
};
|
|
35
36
|
|
|
@@ -185,6 +185,10 @@ class TitlesRoute {
|
|
|
185
185
|
confirmDeployment: { url: '/titles/{title_id}/deployments/confirm', method: HTTP_METHODS.POST },
|
|
186
186
|
getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.GET },
|
|
187
187
|
|
|
188
|
+
initiateMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/initiate', method: HTTP_METHODS.POST },
|
|
189
|
+
getMultipartUrls: { url: '/titles/{title_id}/deployments/multipart/urls', method: HTTP_METHODS.POST },
|
|
190
|
+
completeMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/complete', method: HTTP_METHODS.POST },
|
|
191
|
+
|
|
188
192
|
// Aegis Payouts
|
|
189
193
|
listDeveloperPayouts: { url: '/titles/{title_id}/payouts', method: HTTP_METHODS.GET },
|
|
190
194
|
viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
|
|
@@ -233,6 +237,13 @@ class TitlesRoute {
|
|
|
233
237
|
|
|
234
238
|
updateBuildStatus: { url: '/titles/{title_id}/deployments/{build_id}/status', method: HTTP_METHODS.PUT },
|
|
235
239
|
|
|
240
|
+
// Inside the routes object in TitlesRoute.ts
|
|
241
|
+
getMatchmakerServer: {
|
|
242
|
+
url: '/titles/{title_id}/matchmaker/server',
|
|
243
|
+
method: HTTP_METHODS.GET
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
|
|
236
247
|
|
|
237
248
|
};
|
|
238
249
|
|