glitch-javascript-sdk 4.1.0 → 4.2.0
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/browser/hosting-runtime.js +5840 -5627
- package/dist/browser/hosting-runtime.js.map +1 -1
- package/dist/cjs/index.js +200 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +5 -0
- package/dist/esm/api/Mcp.d.ts +8 -0
- package/dist/esm/api/Preorders.d.ts +79 -2
- package/dist/esm/api/Scheduler.d.ts +3 -1
- package/dist/esm/api/Titles.d.ts +127 -2
- package/dist/esm/hosting-runtime.d.ts +13 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +186 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +223 -6
- package/guides/game-license-validation.md +54 -0
- package/package.json +2 -2
- package/src/api/Campaigns.ts +8 -0
- package/src/api/Mcp.ts +23 -0
- package/src/api/Preorders.ts +110 -2
- package/src/api/Scheduler.ts +3 -1
- package/src/api/Titles.ts +246 -99
- package/src/hosting-runtime.ts +277 -2
- package/src/index.ts +1 -0
- package/src/routes/CampaignsRoute.ts +1 -0
- package/src/routes/McpRoute.ts +5 -0
- package/src/routes/PreordersRoute.ts +12 -0
- package/src/routes/TitlesRoute.ts +13 -0
package/dist/cjs/index.js
CHANGED
|
@@ -17324,19 +17324,14 @@ function requireNode () {
|
|
|
17324
17324
|
* treat as a browser.
|
|
17325
17325
|
*/
|
|
17326
17326
|
|
|
17327
|
-
|
|
17328
|
-
|
|
17329
|
-
|
|
17330
|
-
|
|
17331
|
-
hasRequiredSrc = 1;
|
|
17332
|
-
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
17333
|
-
src$1.exports = requireBrowser();
|
|
17334
|
-
} else {
|
|
17335
|
-
src$1.exports = requireNode();
|
|
17336
|
-
}
|
|
17337
|
-
return src$1.exports;
|
|
17327
|
+
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
17328
|
+
src$1.exports = requireBrowser();
|
|
17329
|
+
} else {
|
|
17330
|
+
src$1.exports = requireNode();
|
|
17338
17331
|
}
|
|
17339
17332
|
|
|
17333
|
+
var srcExports = src$1.exports;
|
|
17334
|
+
|
|
17340
17335
|
var promisify$1 = {};
|
|
17341
17336
|
|
|
17342
17337
|
Object.defineProperty(promisify$1, "__esModule", { value: true });
|
|
@@ -17360,7 +17355,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
|
|
|
17360
17355
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17361
17356
|
};
|
|
17362
17357
|
const events_1 = require$$0$3;
|
|
17363
|
-
const debug_1$3 = __importDefault$3(
|
|
17358
|
+
const debug_1$3 = __importDefault$3(srcExports);
|
|
17364
17359
|
const promisify_1 = __importDefault$3(promisify$1);
|
|
17365
17360
|
const debug$4 = debug_1$3.default('agent-base');
|
|
17366
17361
|
function isAgent(v) {
|
|
@@ -17564,7 +17559,7 @@ var __importDefault$2 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
|
|
|
17564
17559
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17565
17560
|
};
|
|
17566
17561
|
Object.defineProperty(parseProxyResponse$1, "__esModule", { value: true });
|
|
17567
|
-
const debug_1$2 = __importDefault$2(
|
|
17562
|
+
const debug_1$2 = __importDefault$2(srcExports);
|
|
17568
17563
|
const debug$3 = debug_1$2.default('https-proxy-agent:parse-proxy-response');
|
|
17569
17564
|
function parseProxyResponse(socket) {
|
|
17570
17565
|
return new Promise((resolve, reject) => {
|
|
@@ -17642,7 +17637,7 @@ const net_1 = __importDefault$1(require$$0$4);
|
|
|
17642
17637
|
const tls_1 = __importDefault$1(require$$1$2);
|
|
17643
17638
|
const url_1 = __importDefault$1(require$$5);
|
|
17644
17639
|
const assert_1 = __importDefault$1(require$$3);
|
|
17645
|
-
const debug_1$1 = __importDefault$1(
|
|
17640
|
+
const debug_1$1 = __importDefault$1(srcExports);
|
|
17646
17641
|
const agent_base_1 = src;
|
|
17647
17642
|
const parse_proxy_response_1 = __importDefault$1(parseProxyResponse$1);
|
|
17648
17643
|
const debug$2 = debug_1$1.default('https-proxy-agent:agent');
|
|
@@ -17825,7 +17820,7 @@ var debug_1 = function () {
|
|
|
17825
17820
|
if (!debug$1) {
|
|
17826
17821
|
try {
|
|
17827
17822
|
/* eslint global-require: off */
|
|
17828
|
-
debug$1 =
|
|
17823
|
+
debug$1 = srcExports("follow-redirects");
|
|
17829
17824
|
}
|
|
17830
17825
|
catch (error) { /* */ }
|
|
17831
17826
|
if (typeof debug$1 !== "function") {
|
|
@@ -30304,6 +30299,19 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
30304
30299
|
reviewsVote: { url: '/reviews/{review_id}/vote', method: HTTP_METHODS.POST },
|
|
30305
30300
|
reviewsReport: { url: '/reviews/{review_id}/report', method: HTTP_METHODS.POST },
|
|
30306
30301
|
reviewsDeveloperResponse: { url: '/reviews/{review_id}/developer-response', method: HTTP_METHODS.POST },
|
|
30302
|
+
// Steamworks Financial API (IPartnerFinancialsService): key, sync, stored data, live read-through.
|
|
30303
|
+
steamFinancialsStatus: { url: '/titles/{title_id}/steam/financials', method: HTTP_METHODS.GET },
|
|
30304
|
+
steamFinancialsConnect: { url: '/titles/{title_id}/steam/financials/key', method: HTTP_METHODS.PUT },
|
|
30305
|
+
steamFinancialsTestKey: { url: '/titles/{title_id}/steam/financials/key/test', method: HTTP_METHODS.POST },
|
|
30306
|
+
steamFinancialsDisconnect: { url: '/titles/{title_id}/steam/financials/key', method: HTTP_METHODS.DELETE },
|
|
30307
|
+
steamFinancialsSync: { url: '/titles/{title_id}/steam/financials/sync', method: HTTP_METHODS.POST },
|
|
30308
|
+
steamFinancialsReports: { url: '/titles/{title_id}/steam/financials/reports', method: HTTP_METHODS.GET },
|
|
30309
|
+
steamFinancialsSales: { url: '/titles/{title_id}/steam/financials/sales', method: HTTP_METHODS.GET },
|
|
30310
|
+
steamFinancialsWishlists: { url: '/titles/{title_id}/steam/financials/wishlists', method: HTTP_METHODS.GET },
|
|
30311
|
+
steamFinancialsLookups: { url: '/titles/{title_id}/steam/financials/lookups', method: HTTP_METHODS.GET },
|
|
30312
|
+
steamFinancialsLiveChangedDates: { url: '/titles/{title_id}/steam/financials/live/changed-dates', method: HTTP_METHODS.GET },
|
|
30313
|
+
steamFinancialsLiveDetailedSales: { url: '/titles/{title_id}/steam/financials/live/detailed-sales', method: HTTP_METHODS.GET },
|
|
30314
|
+
steamFinancialsLiveWishlist: { url: '/titles/{title_id}/steam/financials/live/wishlist', method: HTTP_METHODS.GET },
|
|
30307
30315
|
};
|
|
30308
30316
|
return TitlesRoute;
|
|
30309
30317
|
}());
|
|
@@ -30346,6 +30354,17 @@ var Titles = /** @class */ (function () {
|
|
|
30346
30354
|
Titles.update = function (title_id, data, params) {
|
|
30347
30355
|
return Requests.processRoute(TitlesRoute.routes.update, data, { title_id: title_id }, params);
|
|
30348
30356
|
};
|
|
30357
|
+
/** View public title monetization settings. For mutation use authenticated title admin. */
|
|
30358
|
+
Titles.getGameMonetization = function (title_id) {
|
|
30359
|
+
return Titles.view(title_id);
|
|
30360
|
+
};
|
|
30361
|
+
/**
|
|
30362
|
+
* Update publisher monetization including premium_purchase_required_for_full_game.
|
|
30363
|
+
* Requires a title administrator JWT; backend validates premium/subscription/rental compatibility.
|
|
30364
|
+
*/
|
|
30365
|
+
Titles.updateGameMonetization = function (title_id, settings) {
|
|
30366
|
+
return Titles.update(title_id, settings);
|
|
30367
|
+
};
|
|
30349
30368
|
/**
|
|
30350
30369
|
* Retrieve the information for a single title.
|
|
30351
30370
|
*
|
|
@@ -30987,7 +31006,11 @@ var Titles = /** @class */ (function () {
|
|
|
30987
31006
|
*
|
|
30988
31007
|
* @param title_id The UUID of the game title.
|
|
30989
31008
|
* @param install_id The UUID of the specific install/session.
|
|
30990
|
-
* @returns
|
|
31009
|
+
* @returns Access result with a backward-compatible license_type and exact license
|
|
31010
|
+
* metadata: type, status, source, acquired_at, purchased_at, expires_at and
|
|
31011
|
+
* verified price_paid (null when no authoritative historical price exists).
|
|
31012
|
+
* Production requests may return PREMIUM_PURCHASE_REQUIRED (403).
|
|
31013
|
+
* The caller must block gameplay when valid is false.
|
|
30991
31014
|
*/
|
|
30992
31015
|
Titles.validateInstall = function (title_id, install_id) {
|
|
30993
31016
|
return Requests.processRoute(TitlesRoute.routes.validateInstall, {}, { title_id: title_id, install_id: install_id });
|
|
@@ -31320,6 +31343,82 @@ var Titles = /** @class */ (function () {
|
|
|
31320
31343
|
Titles.respondToReview = function (review_id, data) {
|
|
31321
31344
|
return Requests.processRoute(TitlesRoute.routes.reviewsDeveloperResponse, data, { review_id: review_id });
|
|
31322
31345
|
};
|
|
31346
|
+
// ----- Steamworks Financial API -----------------------------------------------------
|
|
31347
|
+
/**
|
|
31348
|
+
* Steam Financial API connection and sync status for a title: masked key, partner,
|
|
31349
|
+
* last sync times, stored sales/wishlist date ranges and pending dates.
|
|
31350
|
+
*/
|
|
31351
|
+
Titles.steamFinancialsStatus = function (title_id) {
|
|
31352
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsStatus, undefined, { title_id: title_id });
|
|
31353
|
+
};
|
|
31354
|
+
/**
|
|
31355
|
+
* Verify a Steamworks Financial API Group key with Steam and store it (encrypted) on the title.
|
|
31356
|
+
* Queues a full sync unless `sync: false` is passed.
|
|
31357
|
+
*
|
|
31358
|
+
* @param data { api_key: string, sync?: boolean }
|
|
31359
|
+
*/
|
|
31360
|
+
Titles.steamFinancialsConnect = function (title_id, data) {
|
|
31361
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsConnect, data, { title_id: title_id });
|
|
31362
|
+
};
|
|
31363
|
+
/** Check a key (or the stored key when api_key is omitted) with Steam without saving anything. */
|
|
31364
|
+
Titles.steamFinancialsTestKey = function (title_id, data) {
|
|
31365
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsTestKey, data || {}, { title_id: title_id });
|
|
31366
|
+
};
|
|
31367
|
+
/** Remove the stored key. Pass { purge_data: true } to also delete synced Steam financial data. */
|
|
31368
|
+
Titles.steamFinancialsDisconnect = function (title_id, params) {
|
|
31369
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsDisconnect, undefined, { title_id: title_id }, params);
|
|
31370
|
+
};
|
|
31371
|
+
/**
|
|
31372
|
+
* Sync sales and/or wishlists from Steam. Queued by default; pass `wait: true` for a short inline run.
|
|
31373
|
+
*
|
|
31374
|
+
* @param data { datasets?: ('sales'|'wishlists')[], full?: boolean, wait?: boolean, max_dates?: number, max_days?: number, from?: string, to?: string, include_view_grants?: boolean }
|
|
31375
|
+
*/
|
|
31376
|
+
Titles.steamFinancialsSync = function (title_id, data) {
|
|
31377
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsSync, data || {}, { title_id: title_id });
|
|
31378
|
+
};
|
|
31379
|
+
/**
|
|
31380
|
+
* Report bundle built from synced Steam data: summary, sales over time and by country, region,
|
|
31381
|
+
* product, platform, sale type, discount and price point, key activations, revenue-share tiers,
|
|
31382
|
+
* wishlists over time and by country, region, language and platform, and the wishlist-to-sales funnel.
|
|
31383
|
+
*
|
|
31384
|
+
* @param params { from?: 'YYYY-MM-DD', to?: 'YYYY-MM-DD', report_keys?: string (comma separated), app_scope?: 'title'|'partner', app_id?: number, limit?: number }
|
|
31385
|
+
*/
|
|
31386
|
+
Titles.steamFinancialsReports = function (title_id, params) {
|
|
31387
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsReports, undefined, { title_id: title_id }, params);
|
|
31388
|
+
};
|
|
31389
|
+
/**
|
|
31390
|
+
* Paginated Steam sales line items (every GetDetailedSales field) with product, country,
|
|
31391
|
+
* discount and key-request names attached.
|
|
31392
|
+
*
|
|
31393
|
+
* @param params { from?, to?, app_scope?, app_id?, page?, per_page?, country_code?, platform?, line_item_type?, package_sale_type?, currency?, packageid?, bundleid?, key_request_id?, combined_discount_id? }
|
|
31394
|
+
*/
|
|
31395
|
+
Titles.steamFinancialsSales = function (title_id, params) {
|
|
31396
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsSales, undefined, { title_id: title_id }, params);
|
|
31397
|
+
};
|
|
31398
|
+
/**
|
|
31399
|
+
* Daily Steam wishlist rows; pass dimension 'country' or 'language' for the breakdown rows.
|
|
31400
|
+
*
|
|
31401
|
+
* @param params { from?, to?, app_id?, dimension?: 'country'|'language' }
|
|
31402
|
+
*/
|
|
31403
|
+
Titles.steamFinancialsWishlists = function (title_id, params) {
|
|
31404
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsWishlists, undefined, { title_id: title_id }, params);
|
|
31405
|
+
};
|
|
31406
|
+
/** Names Steam returned with sales: package, app, bundle, discount, combined_discount, key_request, game_item, country, partner. */
|
|
31407
|
+
Titles.steamFinancialsLookups = function (title_id, params) {
|
|
31408
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsLookups, undefined, { title_id: title_id }, params);
|
|
31409
|
+
};
|
|
31410
|
+
/** Live GetChangedDatesForPartner (nothing stored). */
|
|
31411
|
+
Titles.steamFinancialsLiveChangedDates = function (title_id, params) {
|
|
31412
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsLiveChangedDates, undefined, { title_id: title_id }, params);
|
|
31413
|
+
};
|
|
31414
|
+
/** Live GetDetailedSales for one date and page (nothing stored). */
|
|
31415
|
+
Titles.steamFinancialsLiveDetailedSales = function (title_id, params) {
|
|
31416
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsLiveDetailedSales, undefined, { title_id: title_id }, params);
|
|
31417
|
+
};
|
|
31418
|
+
/** Live GetAppWishlistReporting for one date (nothing stored). */
|
|
31419
|
+
Titles.steamFinancialsLiveWishlist = function (title_id, params) {
|
|
31420
|
+
return Requests.processRoute(TitlesRoute.routes.steamFinancialsLiveWishlist, undefined, { title_id: title_id }, params);
|
|
31421
|
+
};
|
|
31323
31422
|
return Titles;
|
|
31324
31423
|
}());
|
|
31325
31424
|
|
|
@@ -31394,6 +31493,7 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
31394
31493
|
sendCampaignContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
31395
31494
|
sourcingSearchIgdbForCampaignGame: { url: '/campaigns/{campaign_id}/sourcing/search-game', method: HTTP_METHODS.GET },
|
|
31396
31495
|
sourcingGetSimilarIgdbGames: { url: '/campaigns/{campaign_id}/sourcing/similar-games', method: HTTP_METHODS.GET },
|
|
31496
|
+
sourcingGetActiveStreamLookalikes: { url: '/campaigns/{campaign_id}/sourcing/active-stream-lookalikes', method: HTTP_METHODS.POST },
|
|
31397
31497
|
sourcingFindCreators: { url: '/campaigns/{campaign_id}/sourcing/find-creators', method: HTTP_METHODS.POST },
|
|
31398
31498
|
updateSourcingSettings: { url: '/campaigns/{campaign_id}/sourcing/settings', method: HTTP_METHODS.PUT },
|
|
31399
31499
|
sourcingFindAndSaveCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-creators', method: HTTP_METHODS.POST },
|
|
@@ -32184,6 +32284,14 @@ var Campaigns = /** @class */ (function () {
|
|
|
32184
32284
|
Campaigns.sourcingGetSimilarIgdbGames = function (campaign_id, params) {
|
|
32185
32285
|
return Requests.processRoute(CampaignsRoute.routes.sourcingGetSimilarIgdbGames, undefined, { campaign_id: campaign_id }, params);
|
|
32186
32286
|
};
|
|
32287
|
+
/**
|
|
32288
|
+
* Discover recently streamed look-alikes for Easy Create (minimum five).
|
|
32289
|
+
* Never treat older Twitch activity as currently streaming.
|
|
32290
|
+
*/
|
|
32291
|
+
Campaigns.sourcingGetActiveStreamLookalikes = function (campaign_id, params) {
|
|
32292
|
+
if (params === void 0) { params = {}; }
|
|
32293
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingGetActiveStreamLookalikes, params, { campaign_id: campaign_id });
|
|
32294
|
+
};
|
|
32187
32295
|
/**
|
|
32188
32296
|
* Find content creators for selected games. This does not save them to the database.
|
|
32189
32297
|
* @param campaign_id The UUID of the campaign.
|
|
@@ -35227,7 +35335,9 @@ var Scheduler = /** @class */ (function () {
|
|
|
35227
35335
|
return Requests.processRoute(SchedulerRoute.routes.getCampaignFundingInstruments, undefined, { scheduler_id: scheduler_id }, params);
|
|
35228
35336
|
};
|
|
35229
35337
|
/**
|
|
35230
|
-
* List
|
|
35338
|
+
* List provider conversion actions (Google), Pixel sources (Meta, TikTok, Reddit), or X website-event tags
|
|
35339
|
+
* for the scheduler's connected advertising account. The Reddit result
|
|
35340
|
+
* does not establish delivery of conversion events.
|
|
35231
35341
|
* GET /schedulers/{scheduler_id}/conversion-actions
|
|
35232
35342
|
*/
|
|
35233
35343
|
Scheduler.listConversionActions = function (scheduler_id, params) {
|
|
@@ -38920,6 +39030,11 @@ var McpRoute = /** @class */ (function () {
|
|
|
38920
39030
|
listTitles: { url: "/mcp/v1/titles", method: HTTP_METHODS.GET },
|
|
38921
39031
|
titleContext: { url: "/mcp/v1/titles/{title_id}/context", method: HTTP_METHODS.GET },
|
|
38922
39032
|
billing: { url: "/mcp/v1/titles/{title_id}/billing", method: HTTP_METHODS.GET },
|
|
39033
|
+
socialCapabilities: { url: "/mcp/v1/titles/{title_id}/social/capabilities", method: HTTP_METHODS.GET },
|
|
39034
|
+
socialOperation: { url: "/mcp/v1/titles/{title_id}/social/operations/{operation}", method: HTTP_METHODS.POST },
|
|
39035
|
+
marketingCapabilities: { url: "/mcp/v1/titles/{title_id}/marketing/capabilities", method: HTTP_METHODS.GET },
|
|
39036
|
+
marketingOperation: { url: "/mcp/v1/titles/{title_id}/marketing/operations/{operation}", method: HTTP_METHODS.POST },
|
|
39037
|
+
influencerCampaignOperation: { url: "/mcp/v1/titles/{title_id}/influencer-campaigns/{operation}", method: HTTP_METHODS.POST },
|
|
38923
39038
|
startRun: { url: "/mcp/v1/titles/{title_id}/runs", method: HTTP_METHODS.POST },
|
|
38924
39039
|
viewRun: { url: "/mcp/v1/titles/{title_id}/runs/{run_id}", method: HTTP_METHODS.GET },
|
|
38925
39040
|
runEvents: { url: "/mcp/v1/titles/{title_id}/runs/{run_id}/events", method: HTTP_METHODS.GET },
|
|
@@ -38967,6 +39082,27 @@ var Mcp = /** @class */ (function () {
|
|
|
38967
39082
|
Mcp.billing = function (title_id, params) {
|
|
38968
39083
|
return Requests.processRoute(McpRoute.routes.billing, {}, { title_id: title_id }, params);
|
|
38969
39084
|
};
|
|
39085
|
+
/** Discover title-scoped social operations for ordinary and eligible Agent subscriptions. */
|
|
39086
|
+
Mcp.socialCapabilities = function (title_id, params) {
|
|
39087
|
+
return Requests.processRoute(McpRoute.routes.socialCapabilities, {}, { title_id: title_id }, params);
|
|
39088
|
+
};
|
|
39089
|
+
Mcp.socialOperation = function (title_id, operation, args, confirm, params) {
|
|
39090
|
+
if (confirm === void 0) { confirm = false; }
|
|
39091
|
+
return Requests.processRoute(McpRoute.routes.socialOperation, { arguments: args, confirm: confirm }, { title_id: title_id, operation: operation }, params);
|
|
39092
|
+
};
|
|
39093
|
+
/** Discover full advertising and conversion tracking operations. */
|
|
39094
|
+
Mcp.marketingCapabilities = function (title_id, params) {
|
|
39095
|
+
return Requests.processRoute(McpRoute.routes.marketingCapabilities, {}, { title_id: title_id }, params);
|
|
39096
|
+
};
|
|
39097
|
+
/** Run a title-scoped advertising or conversion operation; mutations require confirmation. */
|
|
39098
|
+
Mcp.marketingOperation = function (title_id, operation, args, confirm, params) {
|
|
39099
|
+
if (confirm === void 0) { confirm = false; }
|
|
39100
|
+
return Requests.processRoute(McpRoute.routes.marketingOperation, { arguments: args, confirm: confirm }, { title_id: title_id, operation: operation }, params);
|
|
39101
|
+
};
|
|
39102
|
+
Mcp.influencerCampaignOperation = function (title_id, operation, fields, campaign_id, confirm, params) {
|
|
39103
|
+
if (confirm === void 0) { confirm = false; }
|
|
39104
|
+
return Requests.processRoute(McpRoute.routes.influencerCampaignOperation, { fields: fields, campaign_id: campaign_id, confirm: confirm }, { title_id: title_id, operation: operation }, params);
|
|
39105
|
+
};
|
|
38970
39106
|
/** Start a paid Glitch Agent run for a title. */
|
|
38971
39107
|
Mcp.startRun = function (title_id, data, params) {
|
|
38972
39108
|
return Requests.processRoute(McpRoute.routes.startRun, data !== null && data !== void 0 ? data : {}, { title_id: title_id }, params);
|
|
@@ -40048,6 +40184,17 @@ var PreordersRoute = /** @class */ (function () {
|
|
|
40048
40184
|
function PreordersRoute() {
|
|
40049
40185
|
}
|
|
40050
40186
|
PreordersRoute.routes = {
|
|
40187
|
+
hostedCatalog: { url: '/hosting/preorders/catalog', method: HTTP_METHODS.GET },
|
|
40188
|
+
createHostedSession: { url: '/hosting/preorders/checkout-sessions', method: HTTP_METHODS.POST },
|
|
40189
|
+
createHostedRestoreSession: { url: '/hosting/preorders/restore-sessions', method: HTTP_METHODS.POST },
|
|
40190
|
+
hostedSession: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}', method: HTTP_METHODS.GET },
|
|
40191
|
+
hostedMine: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}/me', method: HTTP_METHODS.GET },
|
|
40192
|
+
hostedAuthenticate: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}/authenticate', method: HTTP_METHODS.POST },
|
|
40193
|
+
hostedCheckout: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}/checkout', method: HTTP_METHODS.POST },
|
|
40194
|
+
hostedReconcile: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}/reconcile', method: HTTP_METHODS.POST },
|
|
40195
|
+
hostedRetry: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}/retry', method: HTTP_METHODS.POST },
|
|
40196
|
+
hostedRefund: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}/refund', method: HTTP_METHODS.POST },
|
|
40197
|
+
hostedResendAccess: { url: '/titles/{title_id}/preorders/hosted/checkout-sessions/{session_id}/resend-access', method: HTTP_METHODS.POST },
|
|
40051
40198
|
catalog: { url: '/titles/{title_id}/preorders', method: HTTP_METHODS.GET },
|
|
40052
40199
|
purchase: { url: '/titles/{title_id}/preorders/{offer_id}/purchase', method: HTTP_METHODS.POST },
|
|
40053
40200
|
myOrders: { url: '/titles/{title_id}/preorders/me/orders', method: HTTP_METHODS.GET },
|
|
@@ -40078,6 +40225,42 @@ var PreordersRoute = /** @class */ (function () {
|
|
|
40078
40225
|
var Preorders = /** @class */ (function () {
|
|
40079
40226
|
function Preorders() {
|
|
40080
40227
|
}
|
|
40228
|
+
Preorders.hostedOptions = function (checkoutToken, options) {
|
|
40229
|
+
return __assign(__assign({}, options), { headers: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.headers) || {})), { 'X-Checkout-Token': checkoutToken }) });
|
|
40230
|
+
};
|
|
40231
|
+
Preorders.hostedCatalog = function (options) {
|
|
40232
|
+
return Requests.processRoute(PreordersRoute.routes.hostedCatalog, undefined, undefined, undefined, options);
|
|
40233
|
+
};
|
|
40234
|
+
Preorders.createHostedSession = function (data, options) {
|
|
40235
|
+
return Requests.processRoute(PreordersRoute.routes.createHostedSession, data, undefined, undefined, options);
|
|
40236
|
+
};
|
|
40237
|
+
Preorders.createHostedRestoreSession = function (data, options) {
|
|
40238
|
+
return Requests.processRoute(PreordersRoute.routes.createHostedRestoreSession, data, undefined, undefined, options);
|
|
40239
|
+
};
|
|
40240
|
+
Preorders.hostedSession = function (title_id, session_id, checkoutToken, options) {
|
|
40241
|
+
return Requests.processRoute(PreordersRoute.routes.hostedSession, undefined, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40242
|
+
};
|
|
40243
|
+
Preorders.hostedMine = function (title_id, session_id, checkoutToken, options) {
|
|
40244
|
+
return Requests.processRoute(PreordersRoute.routes.hostedMine, undefined, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40245
|
+
};
|
|
40246
|
+
Preorders.authenticateHostedSession = function (title_id, session_id, checkoutToken, options) {
|
|
40247
|
+
return Requests.processRoute(PreordersRoute.routes.hostedAuthenticate, {}, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40248
|
+
};
|
|
40249
|
+
Preorders.checkoutHostedSession = function (title_id, session_id, checkoutToken, data, options) {
|
|
40250
|
+
return Requests.processRoute(PreordersRoute.routes.hostedCheckout, data, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40251
|
+
};
|
|
40252
|
+
Preorders.reconcileHostedSession = function (title_id, session_id, checkoutToken, options) {
|
|
40253
|
+
return Requests.processRoute(PreordersRoute.routes.hostedReconcile, {}, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40254
|
+
};
|
|
40255
|
+
Preorders.retryHostedSession = function (title_id, session_id, checkoutToken, options) {
|
|
40256
|
+
return Requests.processRoute(PreordersRoute.routes.hostedRetry, {}, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40257
|
+
};
|
|
40258
|
+
Preorders.refundHostedOrder = function (title_id, session_id, checkoutToken, order_id, options) {
|
|
40259
|
+
return Requests.processRoute(PreordersRoute.routes.hostedRefund, { order_id: order_id }, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40260
|
+
};
|
|
40261
|
+
Preorders.resendHostedAccess = function (title_id, session_id, checkoutToken, order_id, options) {
|
|
40262
|
+
return Requests.processRoute(PreordersRoute.routes.hostedResendAccess, { order_id: order_id }, { title_id: title_id, session_id: session_id }, undefined, this.hostedOptions(checkoutToken, options));
|
|
40263
|
+
};
|
|
40081
40264
|
Preorders.catalog = function (title_id, options) {
|
|
40082
40265
|
return Requests.processRoute(PreordersRoute.routes.catalog, undefined, { title_id: title_id }, undefined, options);
|
|
40083
40266
|
};
|