glitch-javascript-sdk 2.9.2 → 2.9.4
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 +55 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Newsletters.d.ts +6 -0
- package/dist/esm/api/Titles.d.ts +27 -1
- package/dist/esm/index.js +55 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +33 -1
- package/package.json +1 -1
- package/src/api/Newsletters.ts +9 -0
- package/src/api/Titles.ts +47 -1
- package/src/routes/NewslettersRoutes.ts +1 -0
- package/src/routes/TitlesRoute.ts +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -4401,7 +4401,33 @@ declare class Titles {
|
|
|
4401
4401
|
* @param title_id The UUID of the game title.
|
|
4402
4402
|
* @returns AxiosPromise containing { signallingServer: string }
|
|
4403
4403
|
*/
|
|
4404
|
-
static getMatchmakerServer<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4404
|
+
static getMatchmakerServer<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4405
|
+
/**
|
|
4406
|
+
* Send a session heartbeat to keep the dedicated instance claimed.
|
|
4407
|
+
* Called every 30s during active gameplay.
|
|
4408
|
+
*/
|
|
4409
|
+
static matchmakerSessionHeartbeat<T>(title_id: string, data: {
|
|
4410
|
+
sessionId: string;
|
|
4411
|
+
}): AxiosPromise<Response<T>>;
|
|
4412
|
+
/**
|
|
4413
|
+
* Release the session (starts reclaim countdown).
|
|
4414
|
+
* Called on beforeunload or explicit navigation away.
|
|
4415
|
+
*/
|
|
4416
|
+
static matchmakerSessionRelease<T>(title_id: string, data: {
|
|
4417
|
+
sessionId: string;
|
|
4418
|
+
}): AxiosPromise<Response<T>>;
|
|
4419
|
+
/**
|
|
4420
|
+
* Initiates a resumable S3 multipart upload for large files.
|
|
4421
|
+
*/
|
|
4422
|
+
static initiateMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4423
|
+
/**
|
|
4424
|
+
* Get presigned URLs for specific chunk parts.
|
|
4425
|
+
*/
|
|
4426
|
+
static getMultipartUrls<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4427
|
+
/**
|
|
4428
|
+
* Stitch together all uploaded chunks to complete the file in S3.
|
|
4429
|
+
*/
|
|
4430
|
+
static completeMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4405
4431
|
}
|
|
4406
4432
|
|
|
4407
4433
|
declare class Campaigns {
|
|
@@ -5796,6 +5822,12 @@ declare class Newsletters {
|
|
|
5796
5822
|
* @returns Promise
|
|
5797
5823
|
*/
|
|
5798
5824
|
static joinDistributionWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5825
|
+
/**
|
|
5826
|
+
* Register for Consumer Early Access to the streaming platform.
|
|
5827
|
+
*
|
|
5828
|
+
* @param data { name, email }
|
|
5829
|
+
*/
|
|
5830
|
+
static joinConsumerWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5799
5831
|
}
|
|
5800
5832
|
|
|
5801
5833
|
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
|
@@ -1100,13 +1100,59 @@ class Titles {
|
|
|
1100
1100
|
* @param title_id The UUID of the game title.
|
|
1101
1101
|
* @returns AxiosPromise containing { signallingServer: string }
|
|
1102
1102
|
*/
|
|
1103
|
-
public static getMatchmakerServer<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
1103
|
+
public static getMatchmakerServer<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1104
1104
|
return Requests.processRoute(
|
|
1105
1105
|
TitlesRoute.routes.getMatchmakerServer,
|
|
1106
1106
|
{},
|
|
1107
|
+
{ title_id },
|
|
1108
|
+
params // ← passes as ?sessionId=xxx via Requests.get()
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Send a session heartbeat to keep the dedicated instance claimed.
|
|
1114
|
+
* Called every 30s during active gameplay.
|
|
1115
|
+
*/
|
|
1116
|
+
public static matchmakerSessionHeartbeat<T>(title_id: string, data: { sessionId: string }): AxiosPromise<Response<T>> {
|
|
1117
|
+
return Requests.processRoute(
|
|
1118
|
+
TitlesRoute.routes.matchmakerSessionHeartbeat,
|
|
1119
|
+
data,
|
|
1120
|
+
{ title_id }
|
|
1121
|
+
);
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Release the session (starts reclaim countdown).
|
|
1126
|
+
* Called on beforeunload or explicit navigation away.
|
|
1127
|
+
*/
|
|
1128
|
+
public static matchmakerSessionRelease<T>(title_id: string, data: { sessionId: string }): AxiosPromise<Response<T>> {
|
|
1129
|
+
return Requests.processRoute(
|
|
1130
|
+
TitlesRoute.routes.matchmakerSessionRelease,
|
|
1131
|
+
data,
|
|
1107
1132
|
{ title_id }
|
|
1108
1133
|
);
|
|
1109
1134
|
}
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* Initiates a resumable S3 multipart upload for large files.
|
|
1138
|
+
*/
|
|
1139
|
+
public static initiateMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
1140
|
+
return Requests.processRoute(TitlesRoute.routes.initiateMultipartUpload, data, { title_id });
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Get presigned URLs for specific chunk parts.
|
|
1145
|
+
*/
|
|
1146
|
+
public static getMultipartUrls<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
1147
|
+
return Requests.processRoute(TitlesRoute.routes.getMultipartUrls, data, { title_id });
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Stitch together all uploaded chunks to complete the file in S3.
|
|
1152
|
+
*/
|
|
1153
|
+
public static completeMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
1154
|
+
return Requests.processRoute(TitlesRoute.routes.completeMultipartUpload, data, { title_id });
|
|
1155
|
+
}
|
|
1110
1156
|
}
|
|
1111
1157
|
|
|
1112
1158
|
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 },
|
|
@@ -239,6 +243,17 @@ class TitlesRoute {
|
|
|
239
243
|
method: HTTP_METHODS.GET
|
|
240
244
|
},
|
|
241
245
|
|
|
246
|
+
matchmakerSessionHeartbeat: {
|
|
247
|
+
url: '/titles/{title_id}/matchmaker/session/heartbeat',
|
|
248
|
+
method: HTTP_METHODS.POST
|
|
249
|
+
},
|
|
250
|
+
matchmakerSessionRelease: {
|
|
251
|
+
url: '/titles/{title_id}/matchmaker/session/release',
|
|
252
|
+
method: HTTP_METHODS.POST
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
242
257
|
};
|
|
243
258
|
|
|
244
259
|
}
|