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
|
@@ -92,5 +92,14 @@ declare class Newsletters {
|
|
|
92
92
|
* Permanently delete a subscriber from the system (Admin only).
|
|
93
93
|
*/
|
|
94
94
|
static deleteSubscriber<T>(id: string): AxiosPromise<Response<T>>;
|
|
95
|
+
/**
|
|
96
|
+
* Join the distribution platform waitlist for indie developers.
|
|
97
|
+
*
|
|
98
|
+
* @see https://api.glitch.fun/api/documentation#/Newsletters/joinDistributionWaitlist
|
|
99
|
+
*
|
|
100
|
+
* @param data { name: string, email: string, game: string, team_size: string, revenue_goal: string }
|
|
101
|
+
* @returns Promise
|
|
102
|
+
*/
|
|
103
|
+
static joinDistributionWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
95
104
|
}
|
|
96
105
|
export default Newsletters;
|
|
@@ -81,5 +81,11 @@ declare class Subscriptions {
|
|
|
81
81
|
* @param data { priceId, paymentMethod, custom_name, limits: { posts, enrichments, invites, ads }, metered_prices: [] }
|
|
82
82
|
*/
|
|
83
83
|
static createCustomCommunitySubscription<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
84
|
+
/**
|
|
85
|
+
* Purchase a permanent license or rent a game title.
|
|
86
|
+
* If a rental was active in the last 7 days, the fee is automatically deducted from the premium price.
|
|
87
|
+
* @param data { purchase_type: 'premium' | 'rental', payment_method_id: string }
|
|
88
|
+
*/
|
|
89
|
+
static purchaseLicense<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
84
90
|
}
|
|
85
91
|
export default Subscriptions;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -475,5 +475,31 @@ declare class Titles {
|
|
|
475
475
|
* Delete a saved behavioral funnel definition.
|
|
476
476
|
*/
|
|
477
477
|
static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>>;
|
|
478
|
+
/**
|
|
479
|
+
* Generates a presigned S3 URL for uploading a game build ZIP.
|
|
480
|
+
*/
|
|
481
|
+
static getDeploymentUploadUrl<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
482
|
+
/**
|
|
483
|
+
* Confirms the upload and starts the automated deployment/extraction process.
|
|
484
|
+
* @param data { file_path: string, version_string: string, entry_point?: string }
|
|
485
|
+
*/
|
|
486
|
+
static confirmDeployment<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
487
|
+
/**
|
|
488
|
+
* Initializes a play session. Handles age-gating and license verification.
|
|
489
|
+
* Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
|
|
490
|
+
*/
|
|
491
|
+
static getPlaySession<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
492
|
+
/**
|
|
493
|
+
* List all developer payouts for a title.
|
|
494
|
+
*/
|
|
495
|
+
static listDeveloperPayouts<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
496
|
+
/**
|
|
497
|
+
* View a specific payout record.
|
|
498
|
+
*/
|
|
499
|
+
static viewDeveloperPayout<T>(title_id: string, payout_id: string): AxiosPromise<Response<T>>;
|
|
500
|
+
/**
|
|
501
|
+
* Get the total earnings and playtime summary for a title.
|
|
502
|
+
*/
|
|
503
|
+
static getDeveloperPayoutSummary<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
478
504
|
}
|
|
479
505
|
export default Titles;
|
package/dist/esm/index.js
CHANGED
|
@@ -11693,6 +11693,14 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11693
11693
|
createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
|
|
11694
11694
|
behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
|
|
11695
11695
|
deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
|
|
11696
|
+
// Aegis Deployment
|
|
11697
|
+
getDeploymentUploadUrl: { url: '/titles/{title_id}/deployments/presigned-url', method: HTTP_METHODS.POST },
|
|
11698
|
+
confirmDeployment: { url: '/titles/{title_id}/deployments/confirm', method: HTTP_METHODS.POST },
|
|
11699
|
+
getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.GET },
|
|
11700
|
+
// Aegis Payouts
|
|
11701
|
+
listDeveloperPayouts: { url: '/titles/{title_id}/payouts', method: HTTP_METHODS.GET },
|
|
11702
|
+
viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
|
|
11703
|
+
developerPayoutSummary: { url: '/titles/{title_id}/payouts/summary', method: HTTP_METHODS.GET },
|
|
11696
11704
|
};
|
|
11697
11705
|
return TitlesRoute;
|
|
11698
11706
|
}());
|
|
@@ -12312,6 +12320,44 @@ var Titles = /** @class */ (function () {
|
|
|
12312
12320
|
Titles.deleteBehavioralFunnel = function (title_id, funnel_id) {
|
|
12313
12321
|
return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id: title_id, funnel_id: funnel_id });
|
|
12314
12322
|
};
|
|
12323
|
+
/**
|
|
12324
|
+
* Generates a presigned S3 URL for uploading a game build ZIP.
|
|
12325
|
+
*/
|
|
12326
|
+
Titles.getDeploymentUploadUrl = function (title_id) {
|
|
12327
|
+
return Requests.processRoute(TitlesRoute.routes.getDeploymentUploadUrl, {}, { title_id: title_id });
|
|
12328
|
+
};
|
|
12329
|
+
/**
|
|
12330
|
+
* Confirms the upload and starts the automated deployment/extraction process.
|
|
12331
|
+
* @param data { file_path: string, version_string: string, entry_point?: string }
|
|
12332
|
+
*/
|
|
12333
|
+
Titles.confirmDeployment = function (title_id, data) {
|
|
12334
|
+
return Requests.processRoute(TitlesRoute.routes.confirmDeployment, data, { title_id: title_id });
|
|
12335
|
+
};
|
|
12336
|
+
/**
|
|
12337
|
+
* Initializes a play session. Handles age-gating and license verification.
|
|
12338
|
+
* Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
|
|
12339
|
+
*/
|
|
12340
|
+
Titles.getPlaySession = function (title_id) {
|
|
12341
|
+
return Requests.processRoute(TitlesRoute.routes.getPlaySession, {}, { title_id: title_id });
|
|
12342
|
+
};
|
|
12343
|
+
/**
|
|
12344
|
+
* List all developer payouts for a title.
|
|
12345
|
+
*/
|
|
12346
|
+
Titles.listDeveloperPayouts = function (title_id, params) {
|
|
12347
|
+
return Requests.processRoute(TitlesRoute.routes.listDeveloperPayouts, undefined, { title_id: title_id }, params);
|
|
12348
|
+
};
|
|
12349
|
+
/**
|
|
12350
|
+
* View a specific payout record.
|
|
12351
|
+
*/
|
|
12352
|
+
Titles.viewDeveloperPayout = function (title_id, payout_id) {
|
|
12353
|
+
return Requests.processRoute(TitlesRoute.routes.viewDeveloperPayout, {}, { title_id: title_id, payout_id: payout_id });
|
|
12354
|
+
};
|
|
12355
|
+
/**
|
|
12356
|
+
* Get the total earnings and playtime summary for a title.
|
|
12357
|
+
*/
|
|
12358
|
+
Titles.getDeveloperPayoutSummary = function (title_id) {
|
|
12359
|
+
return Requests.processRoute(TitlesRoute.routes.developerPayoutSummary, {}, { title_id: title_id });
|
|
12360
|
+
};
|
|
12315
12361
|
return Titles;
|
|
12316
12362
|
}());
|
|
12317
12363
|
|
|
@@ -13355,6 +13401,7 @@ var SubscriptionsRoute = /** @class */ (function () {
|
|
|
13355
13401
|
url: '/subscriptions/communities/custom/{community_id}',
|
|
13356
13402
|
method: HTTP_METHODS.POST
|
|
13357
13403
|
},
|
|
13404
|
+
purchaseLicense: { url: '/titles/{title_id}/purchase', method: HTTP_METHODS.POST },
|
|
13358
13405
|
};
|
|
13359
13406
|
return SubscriptionsRoute;
|
|
13360
13407
|
}());
|
|
@@ -13462,6 +13509,14 @@ var Subscriptions = /** @class */ (function () {
|
|
|
13462
13509
|
Subscriptions.createCustomCommunitySubscription = function (community_id, data, params) {
|
|
13463
13510
|
return Requests.processRoute(SubscriptionsRoute.routes.createCustomCommunitySubscription, data, { community_id: community_id }, params);
|
|
13464
13511
|
};
|
|
13512
|
+
/**
|
|
13513
|
+
* Purchase a permanent license or rent a game title.
|
|
13514
|
+
* If a rental was active in the last 7 days, the fee is automatically deducted from the premium price.
|
|
13515
|
+
* @param data { purchase_type: 'premium' | 'rental', payment_method_id: string }
|
|
13516
|
+
*/
|
|
13517
|
+
Subscriptions.purchaseLicense = function (title_id, data) {
|
|
13518
|
+
return Requests.processRoute(SubscriptionsRoute.routes.purchaseLicense, data, { title_id: title_id });
|
|
13519
|
+
};
|
|
13465
13520
|
return Subscriptions;
|
|
13466
13521
|
}());
|
|
13467
13522
|
|
|
@@ -14091,6 +14146,7 @@ var NewslettersRoutes = /** @class */ (function () {
|
|
|
14091
14146
|
viewSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.GET },
|
|
14092
14147
|
updateSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.PUT },
|
|
14093
14148
|
deleteSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.DELETE },
|
|
14149
|
+
joinDistributionWaitlist: { url: '/newsletters/joinDistributionWaitlist', method: HTTP_METHODS.POST },
|
|
14094
14150
|
};
|
|
14095
14151
|
return NewslettersRoutes;
|
|
14096
14152
|
}());
|
|
@@ -14229,6 +14285,17 @@ var Newsletters = /** @class */ (function () {
|
|
|
14229
14285
|
Newsletters.deleteSubscriber = function (id) {
|
|
14230
14286
|
return Requests.processRoute(NewslettersRoutes.routes.deleteSubscriber, undefined, { id: id });
|
|
14231
14287
|
};
|
|
14288
|
+
/**
|
|
14289
|
+
* Join the distribution platform waitlist for indie developers.
|
|
14290
|
+
*
|
|
14291
|
+
* @see https://api.glitch.fun/api/documentation#/Newsletters/joinDistributionWaitlist
|
|
14292
|
+
*
|
|
14293
|
+
* @param data { name: string, email: string, game: string, team_size: string, revenue_goal: string }
|
|
14294
|
+
* @returns Promise
|
|
14295
|
+
*/
|
|
14296
|
+
Newsletters.joinDistributionWaitlist = function (data, params) {
|
|
14297
|
+
return Requests.processRoute(NewslettersRoutes.routes.joinDistributionWaitlist, data, undefined, params);
|
|
14298
|
+
};
|
|
14232
14299
|
return Newsletters;
|
|
14233
14300
|
}());
|
|
14234
14301
|
|