glitch-javascript-sdk 2.7.8 → 2.8.1
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 +67 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Newsletters.d.ts +9 -0
- package/dist/esm/api/Subscriptions.d.ts +6 -0
- package/dist/esm/api/Titles.d.ts +26 -0
- package/dist/esm/index.js +67 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +41 -0
- package/package.json +1 -1
- package/src/api/Newsletters.ts +11 -1
- package/src/api/Subscriptions.ts +9 -0
- package/src/api/Titles.ts +44 -0
- package/src/routes/NewslettersRoutes.ts +2 -0
- package/src/routes/SubscriptionsRoute.ts +3 -0
- package/src/routes/TitlesRoute.ts +10 -0
package/dist/cjs/index.js
CHANGED
|
@@ -24877,6 +24877,14 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
24877
24877
|
createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
|
|
24878
24878
|
behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
|
|
24879
24879
|
deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
|
|
24880
|
+
// Aegis Deployment
|
|
24881
|
+
getDeploymentUploadUrl: { url: '/titles/{title_id}/deployments/presigned-url', method: HTTP_METHODS.POST },
|
|
24882
|
+
confirmDeployment: { url: '/titles/{title_id}/deployments/confirm', method: HTTP_METHODS.POST },
|
|
24883
|
+
getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.GET },
|
|
24884
|
+
// Aegis Payouts
|
|
24885
|
+
listDeveloperPayouts: { url: '/titles/{title_id}/payouts', method: HTTP_METHODS.GET },
|
|
24886
|
+
viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
|
|
24887
|
+
developerPayoutSummary: { url: '/titles/{title_id}/payouts/summary', method: HTTP_METHODS.GET },
|
|
24880
24888
|
};
|
|
24881
24889
|
return TitlesRoute;
|
|
24882
24890
|
}());
|
|
@@ -25496,6 +25504,44 @@ var Titles = /** @class */ (function () {
|
|
|
25496
25504
|
Titles.deleteBehavioralFunnel = function (title_id, funnel_id) {
|
|
25497
25505
|
return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id: title_id, funnel_id: funnel_id });
|
|
25498
25506
|
};
|
|
25507
|
+
/**
|
|
25508
|
+
* Generates a presigned S3 URL for uploading a game build ZIP.
|
|
25509
|
+
*/
|
|
25510
|
+
Titles.getDeploymentUploadUrl = function (title_id) {
|
|
25511
|
+
return Requests.processRoute(TitlesRoute.routes.getDeploymentUploadUrl, {}, { title_id: title_id });
|
|
25512
|
+
};
|
|
25513
|
+
/**
|
|
25514
|
+
* Confirms the upload and starts the automated deployment/extraction process.
|
|
25515
|
+
* @param data { file_path: string, version_string: string, entry_point?: string }
|
|
25516
|
+
*/
|
|
25517
|
+
Titles.confirmDeployment = function (title_id, data) {
|
|
25518
|
+
return Requests.processRoute(TitlesRoute.routes.confirmDeployment, data, { title_id: title_id });
|
|
25519
|
+
};
|
|
25520
|
+
/**
|
|
25521
|
+
* Initializes a play session. Handles age-gating and license verification.
|
|
25522
|
+
* Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
|
|
25523
|
+
*/
|
|
25524
|
+
Titles.getPlaySession = function (title_id) {
|
|
25525
|
+
return Requests.processRoute(TitlesRoute.routes.getPlaySession, {}, { title_id: title_id });
|
|
25526
|
+
};
|
|
25527
|
+
/**
|
|
25528
|
+
* List all developer payouts for a title.
|
|
25529
|
+
*/
|
|
25530
|
+
Titles.listDeveloperPayouts = function (title_id, params) {
|
|
25531
|
+
return Requests.processRoute(TitlesRoute.routes.listDeveloperPayouts, undefined, { title_id: title_id }, params);
|
|
25532
|
+
};
|
|
25533
|
+
/**
|
|
25534
|
+
* View a specific payout record.
|
|
25535
|
+
*/
|
|
25536
|
+
Titles.viewDeveloperPayout = function (title_id, payout_id) {
|
|
25537
|
+
return Requests.processRoute(TitlesRoute.routes.viewDeveloperPayout, {}, { title_id: title_id, payout_id: payout_id });
|
|
25538
|
+
};
|
|
25539
|
+
/**
|
|
25540
|
+
* Get the total earnings and playtime summary for a title.
|
|
25541
|
+
*/
|
|
25542
|
+
Titles.getDeveloperPayoutSummary = function (title_id) {
|
|
25543
|
+
return Requests.processRoute(TitlesRoute.routes.developerPayoutSummary, {}, { title_id: title_id });
|
|
25544
|
+
};
|
|
25499
25545
|
return Titles;
|
|
25500
25546
|
}());
|
|
25501
25547
|
|
|
@@ -26539,6 +26585,7 @@ var SubscriptionsRoute = /** @class */ (function () {
|
|
|
26539
26585
|
url: '/subscriptions/communities/custom/{community_id}',
|
|
26540
26586
|
method: HTTP_METHODS.POST
|
|
26541
26587
|
},
|
|
26588
|
+
purchaseLicense: { url: '/titles/{title_id}/purchase', method: HTTP_METHODS.POST },
|
|
26542
26589
|
};
|
|
26543
26590
|
return SubscriptionsRoute;
|
|
26544
26591
|
}());
|
|
@@ -26646,6 +26693,14 @@ var Subscriptions = /** @class */ (function () {
|
|
|
26646
26693
|
Subscriptions.createCustomCommunitySubscription = function (community_id, data, params) {
|
|
26647
26694
|
return Requests.processRoute(SubscriptionsRoute.routes.createCustomCommunitySubscription, data, { community_id: community_id }, params);
|
|
26648
26695
|
};
|
|
26696
|
+
/**
|
|
26697
|
+
* Purchase a permanent license or rent a game title.
|
|
26698
|
+
* If a rental was active in the last 7 days, the fee is automatically deducted from the premium price.
|
|
26699
|
+
* @param data { purchase_type: 'premium' | 'rental', payment_method_id: string }
|
|
26700
|
+
*/
|
|
26701
|
+
Subscriptions.purchaseLicense = function (title_id, data) {
|
|
26702
|
+
return Requests.processRoute(SubscriptionsRoute.routes.purchaseLicense, data, { title_id: title_id });
|
|
26703
|
+
};
|
|
26649
26704
|
return Subscriptions;
|
|
26650
26705
|
}());
|
|
26651
26706
|
|
|
@@ -27275,6 +27330,7 @@ var NewslettersRoutes = /** @class */ (function () {
|
|
|
27275
27330
|
viewSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.GET },
|
|
27276
27331
|
updateSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.PUT },
|
|
27277
27332
|
deleteSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.DELETE },
|
|
27333
|
+
joinDistributionWaitlist: { url: '/newsletters/joinDistributionWaitlist', method: HTTP_METHODS.POST },
|
|
27278
27334
|
};
|
|
27279
27335
|
return NewslettersRoutes;
|
|
27280
27336
|
}());
|
|
@@ -27413,6 +27469,17 @@ var Newsletters = /** @class */ (function () {
|
|
|
27413
27469
|
Newsletters.deleteSubscriber = function (id) {
|
|
27414
27470
|
return Requests.processRoute(NewslettersRoutes.routes.deleteSubscriber, undefined, { id: id });
|
|
27415
27471
|
};
|
|
27472
|
+
/**
|
|
27473
|
+
* Join the distribution platform waitlist for indie developers.
|
|
27474
|
+
*
|
|
27475
|
+
* @see https://api.glitch.fun/api/documentation#/Newsletters/joinDistributionWaitlist
|
|
27476
|
+
*
|
|
27477
|
+
* @param data { name: string, email: string, game: string, team_size: string, revenue_goal: string }
|
|
27478
|
+
* @returns Promise
|
|
27479
|
+
*/
|
|
27480
|
+
Newsletters.joinDistributionWaitlist = function (data, params) {
|
|
27481
|
+
return Requests.processRoute(NewslettersRoutes.routes.joinDistributionWaitlist, data, undefined, params);
|
|
27482
|
+
};
|
|
27416
27483
|
return Newsletters;
|
|
27417
27484
|
}());
|
|
27418
27485
|
|