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
|
@@ -101,5 +101,11 @@ declare class Newsletters {
|
|
|
101
101
|
* @returns Promise
|
|
102
102
|
*/
|
|
103
103
|
static joinDistributionWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
104
|
+
/**
|
|
105
|
+
* Register for Consumer Early Access to the streaming platform.
|
|
106
|
+
*
|
|
107
|
+
* @param data { name, email }
|
|
108
|
+
*/
|
|
109
|
+
static joinConsumerWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
104
110
|
}
|
|
105
111
|
export default Newsletters;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -586,6 +586,32 @@ declare class Titles {
|
|
|
586
586
|
* @param title_id The UUID of the game title.
|
|
587
587
|
* @returns AxiosPromise containing { signallingServer: string }
|
|
588
588
|
*/
|
|
589
|
-
static getMatchmakerServer<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
589
|
+
static getMatchmakerServer<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
590
|
+
/**
|
|
591
|
+
* Send a session heartbeat to keep the dedicated instance claimed.
|
|
592
|
+
* Called every 30s during active gameplay.
|
|
593
|
+
*/
|
|
594
|
+
static matchmakerSessionHeartbeat<T>(title_id: string, data: {
|
|
595
|
+
sessionId: string;
|
|
596
|
+
}): AxiosPromise<Response<T>>;
|
|
597
|
+
/**
|
|
598
|
+
* Release the session (starts reclaim countdown).
|
|
599
|
+
* Called on beforeunload or explicit navigation away.
|
|
600
|
+
*/
|
|
601
|
+
static matchmakerSessionRelease<T>(title_id: string, data: {
|
|
602
|
+
sessionId: string;
|
|
603
|
+
}): AxiosPromise<Response<T>>;
|
|
604
|
+
/**
|
|
605
|
+
* Initiates a resumable S3 multipart upload for large files.
|
|
606
|
+
*/
|
|
607
|
+
static initiateMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
608
|
+
/**
|
|
609
|
+
* Get presigned URLs for specific chunk parts.
|
|
610
|
+
*/
|
|
611
|
+
static getMultipartUrls<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
612
|
+
/**
|
|
613
|
+
* Stitch together all uploaded chunks to complete the file in S3.
|
|
614
|
+
*/
|
|
615
|
+
static completeMultipartUpload<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
590
616
|
}
|
|
591
617
|
export default Titles;
|
package/dist/esm/index.js
CHANGED
|
@@ -11736,6 +11736,9 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11736
11736
|
getDeploymentUploadUrl: { url: '/titles/{title_id}/deployments/presigned-url', method: HTTP_METHODS.POST },
|
|
11737
11737
|
confirmDeployment: { url: '/titles/{title_id}/deployments/confirm', method: HTTP_METHODS.POST },
|
|
11738
11738
|
getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.GET },
|
|
11739
|
+
initiateMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/initiate', method: HTTP_METHODS.POST },
|
|
11740
|
+
getMultipartUrls: { url: '/titles/{title_id}/deployments/multipart/urls', method: HTTP_METHODS.POST },
|
|
11741
|
+
completeMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/complete', method: HTTP_METHODS.POST },
|
|
11739
11742
|
// Aegis Payouts
|
|
11740
11743
|
listDeveloperPayouts: { url: '/titles/{title_id}/payouts', method: HTTP_METHODS.GET },
|
|
11741
11744
|
viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
|
|
@@ -11782,6 +11785,14 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11782
11785
|
url: '/titles/{title_id}/matchmaker/server',
|
|
11783
11786
|
method: HTTP_METHODS.GET
|
|
11784
11787
|
},
|
|
11788
|
+
matchmakerSessionHeartbeat: {
|
|
11789
|
+
url: '/titles/{title_id}/matchmaker/session/heartbeat',
|
|
11790
|
+
method: HTTP_METHODS.POST
|
|
11791
|
+
},
|
|
11792
|
+
matchmakerSessionRelease: {
|
|
11793
|
+
url: '/titles/{title_id}/matchmaker/session/release',
|
|
11794
|
+
method: HTTP_METHODS.POST
|
|
11795
|
+
},
|
|
11785
11796
|
};
|
|
11786
11797
|
return TitlesRoute;
|
|
11787
11798
|
}());
|
|
@@ -12546,8 +12557,41 @@ var Titles = /** @class */ (function () {
|
|
|
12546
12557
|
* @param title_id The UUID of the game title.
|
|
12547
12558
|
* @returns AxiosPromise containing { signallingServer: string }
|
|
12548
12559
|
*/
|
|
12549
|
-
Titles.getMatchmakerServer = function (title_id) {
|
|
12550
|
-
return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id })
|
|
12560
|
+
Titles.getMatchmakerServer = function (title_id, params) {
|
|
12561
|
+
return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id }, params // ← passes as ?sessionId=xxx via Requests.get()
|
|
12562
|
+
);
|
|
12563
|
+
};
|
|
12564
|
+
/**
|
|
12565
|
+
* Send a session heartbeat to keep the dedicated instance claimed.
|
|
12566
|
+
* Called every 30s during active gameplay.
|
|
12567
|
+
*/
|
|
12568
|
+
Titles.matchmakerSessionHeartbeat = function (title_id, data) {
|
|
12569
|
+
return Requests.processRoute(TitlesRoute.routes.matchmakerSessionHeartbeat, data, { title_id: title_id });
|
|
12570
|
+
};
|
|
12571
|
+
/**
|
|
12572
|
+
* Release the session (starts reclaim countdown).
|
|
12573
|
+
* Called on beforeunload or explicit navigation away.
|
|
12574
|
+
*/
|
|
12575
|
+
Titles.matchmakerSessionRelease = function (title_id, data) {
|
|
12576
|
+
return Requests.processRoute(TitlesRoute.routes.matchmakerSessionRelease, data, { title_id: title_id });
|
|
12577
|
+
};
|
|
12578
|
+
/**
|
|
12579
|
+
* Initiates a resumable S3 multipart upload for large files.
|
|
12580
|
+
*/
|
|
12581
|
+
Titles.initiateMultipartUpload = function (title_id, data) {
|
|
12582
|
+
return Requests.processRoute(TitlesRoute.routes.initiateMultipartUpload, data, { title_id: title_id });
|
|
12583
|
+
};
|
|
12584
|
+
/**
|
|
12585
|
+
* Get presigned URLs for specific chunk parts.
|
|
12586
|
+
*/
|
|
12587
|
+
Titles.getMultipartUrls = function (title_id, data) {
|
|
12588
|
+
return Requests.processRoute(TitlesRoute.routes.getMultipartUrls, data, { title_id: title_id });
|
|
12589
|
+
};
|
|
12590
|
+
/**
|
|
12591
|
+
* Stitch together all uploaded chunks to complete the file in S3.
|
|
12592
|
+
*/
|
|
12593
|
+
Titles.completeMultipartUpload = function (title_id, data) {
|
|
12594
|
+
return Requests.processRoute(TitlesRoute.routes.completeMultipartUpload, data, { title_id: title_id });
|
|
12551
12595
|
};
|
|
12552
12596
|
return Titles;
|
|
12553
12597
|
}());
|
|
@@ -14352,6 +14396,7 @@ var NewslettersRoutes = /** @class */ (function () {
|
|
|
14352
14396
|
updateSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.PUT },
|
|
14353
14397
|
deleteSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.DELETE },
|
|
14354
14398
|
joinDistributionWaitlist: { url: '/newsletters/joinDistributionWaitlist', method: HTTP_METHODS.POST },
|
|
14399
|
+
joinConsumerWaitlist: { url: '/newsletters/joinConsumerWaitlist', method: HTTP_METHODS.POST },
|
|
14355
14400
|
};
|
|
14356
14401
|
return NewslettersRoutes;
|
|
14357
14402
|
}());
|
|
@@ -14501,6 +14546,14 @@ var Newsletters = /** @class */ (function () {
|
|
|
14501
14546
|
Newsletters.joinDistributionWaitlist = function (data, params) {
|
|
14502
14547
|
return Requests.processRoute(NewslettersRoutes.routes.joinDistributionWaitlist, data, undefined, params);
|
|
14503
14548
|
};
|
|
14549
|
+
/**
|
|
14550
|
+
* Register for Consumer Early Access to the streaming platform.
|
|
14551
|
+
*
|
|
14552
|
+
* @param data { name, email }
|
|
14553
|
+
*/
|
|
14554
|
+
Newsletters.joinConsumerWaitlist = function (data, params) {
|
|
14555
|
+
return Requests.processRoute(NewslettersRoutes.routes.joinConsumerWaitlist, data, undefined, params);
|
|
14556
|
+
};
|
|
14504
14557
|
return Newsletters;
|
|
14505
14558
|
}());
|
|
14506
14559
|
|