glitch-javascript-sdk 3.10.5 → 3.10.6
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 +3 -3
- package/dist/browser/hosting-runtime.js.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Hosting.d.ts +30 -6
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +48 -6
- package/package.json +1 -1
- package/src/api/Hosting.ts +32 -6
|
@@ -47,6 +47,9 @@ export interface HostingDomain {
|
|
|
47
47
|
verification_record_name?: string | null;
|
|
48
48
|
verification_record_value?: string | null;
|
|
49
49
|
certificate_status?: string | null;
|
|
50
|
+
error_code?: string | null;
|
|
51
|
+
incident_id?: string | null;
|
|
52
|
+
last_error?: string | null;
|
|
50
53
|
billing_status?: 'active' | 'past_due' | 'unpaid' | 'cancelled' | null;
|
|
51
54
|
annual_price_cents?: number | null;
|
|
52
55
|
auto_renew: boolean;
|
|
@@ -108,6 +111,7 @@ export interface HostingSite {
|
|
|
108
111
|
status: 'draft' | 'provisioning' | 'live' | 'limited' | 'failed' | 'disabled';
|
|
109
112
|
server_mode_enabled: boolean;
|
|
110
113
|
azure_region?: string | null;
|
|
114
|
+
active_release_id?: string | null;
|
|
111
115
|
active_release?: HostingRelease | null;
|
|
112
116
|
domains?: HostingDomain[];
|
|
113
117
|
databases?: HostingDatabase[];
|
|
@@ -239,6 +243,26 @@ export interface CreateHostingReleaseRequest {
|
|
|
239
243
|
source_type: 'upload' | 'cli' | 'game_build';
|
|
240
244
|
blob_path?: string;
|
|
241
245
|
game_build_id?: string;
|
|
246
|
+
/** Proven relative path in the finished artifact. Never guess index.html or package.json. */
|
|
247
|
+
entry_point: string;
|
|
248
|
+
}
|
|
249
|
+
export interface HostingCheckoutResult {
|
|
250
|
+
database?: HostingDatabase;
|
|
251
|
+
action?: string;
|
|
252
|
+
checkout_url?: string | null;
|
|
253
|
+
/** Stripe Embedded Checkout client secret for same-page card collection and 3DS. */
|
|
254
|
+
checkout_client_secret?: string | null;
|
|
255
|
+
checkout_mode?: 'embedded' | 'hosted' | null;
|
|
256
|
+
checkout_session_id?: string | null;
|
|
257
|
+
billing_provider?: HostingBillingProvider;
|
|
258
|
+
message?: string;
|
|
259
|
+
}
|
|
260
|
+
export interface HostingAiInstructionsRequest extends HostingServiceStackRequest {
|
|
261
|
+
framework?: string;
|
|
262
|
+
custom_domain?: string;
|
|
263
|
+
databases?: Array<Pick<HostingDatabase, 'name' | 'engine' | 'plan'>>;
|
|
264
|
+
version?: string;
|
|
265
|
+
/** Candidate only; the generated instructions require proof from the finished artifact. */
|
|
242
266
|
entry_point?: string;
|
|
243
267
|
}
|
|
244
268
|
export interface CreateHostingDatabaseRequest {
|
|
@@ -281,7 +305,7 @@ export interface HostingAwsMarketplaceSubscription {
|
|
|
281
305
|
manage_url: string;
|
|
282
306
|
}
|
|
283
307
|
/**
|
|
284
|
-
* Typed SDK for game website hosting,
|
|
308
|
+
* Typed SDK for game website hosting, managed database add-ons, domains, usage,
|
|
285
309
|
* deployment instructions, and hosted-play attribution.
|
|
286
310
|
*/
|
|
287
311
|
declare class Hosting {
|
|
@@ -290,7 +314,7 @@ declare class Hosting {
|
|
|
290
314
|
static channelAnalytics<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
291
315
|
/** Start or apply a bandwidth-based Hosting plan, separate from Store distribution. */
|
|
292
316
|
static billingCheckout<T>(title_id: string, plan: HostingPlanKey): AxiosPromise<Response<T>>;
|
|
293
|
-
/** Confirm a paid Stripe Checkout session before provisioning its
|
|
317
|
+
/** Confirm a paid Stripe Checkout session before provisioning its add-on. */
|
|
294
318
|
static confirmBillingCheckout<T>(title_id: string, checkout_session_id: string): AxiosPromise<Response<T>>;
|
|
295
319
|
/** Resolve the one-hour purchase token passed to Glitch by Microsoft Marketplace. */
|
|
296
320
|
static resolveMarketplacePurchase<T>(token: string): AxiosPromise<Response<T>>;
|
|
@@ -307,7 +331,7 @@ declare class Hosting {
|
|
|
307
331
|
static createSite<T>(title_id: string, data: CreateHostingSiteRequest): AxiosPromise<Response<T>>;
|
|
308
332
|
static updateSite<T>(title_id: string, site_id: string, data: Partial<CreateHostingSiteRequest> & Record<string, any>): AxiosPromise<Response<T>>;
|
|
309
333
|
static createUploadUrl<T>(title_id: string, site_id: string): AxiosPromise<Response<T>>;
|
|
310
|
-
/** Upload directly to the short-lived
|
|
334
|
+
/** Upload directly to the short-lived signed URL returned by createUploadUrl. */
|
|
311
335
|
static uploadBuild(uploadUrl: string, file: Blob, requiredHeaders?: Record<string, string>, onUploadProgress?: (event: AxiosProgressEvent) => void): AxiosPromise<void>;
|
|
312
336
|
static releases<T>(title_id: string, site_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
313
337
|
static createRelease<T>(title_id: string, site_id: string, data: CreateHostingReleaseRequest): AxiosPromise<Response<T>>;
|
|
@@ -316,7 +340,7 @@ declare class Hosting {
|
|
|
316
340
|
static verifyDomain<T>(title_id: string, site_id: string, domain_id: string): AxiosPromise<Response<T>>;
|
|
317
341
|
static checkDomain<T>(hostname: string): AxiosPromise<Response<T>>;
|
|
318
342
|
static purchaseDomain<T>(title_id: string, site_id: string, data: Record<string, any>): AxiosPromise<Response<T>>;
|
|
319
|
-
static aiInstructions<T>(title_id: string, site_id: string, data?:
|
|
343
|
+
static aiInstructions<T>(title_id: string, site_id: string, data?: HostingAiInstructionsRequest): AxiosPromise<Response<T>>;
|
|
320
344
|
static services<T = HostingService[]>(title_id: string, site_id: string): AxiosPromise<Response<T>>;
|
|
321
345
|
/** Calculate the always-on floor without creating resources or charges. */
|
|
322
346
|
static estimateServices<T = HostingServiceEstimate>(title_id: string, site_id: string, data: HostingServiceStackRequest): AxiosPromise<Response<T>>;
|
|
@@ -329,7 +353,7 @@ declare class Hosting {
|
|
|
329
353
|
static startPlaySession<T>(data: Record<string, any>): AxiosPromise<Response<T>>;
|
|
330
354
|
static heartbeatPlaySession<T>(session_id: string, sessionToken: string): AxiosPromise<Response<T>>;
|
|
331
355
|
static databases<T>(title_id: string, site_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
332
|
-
static createDatabase<T>(title_id: string, site_id: string, data: CreateHostingDatabaseRequest): AxiosPromise<Response<T>>;
|
|
356
|
+
static createDatabase<T = HostingCheckoutResult>(title_id: string, site_id: string, data: CreateHostingDatabaseRequest): AxiosPromise<Response<T>>;
|
|
333
357
|
static database<T>(title_id: string, site_id: string, database_id: string): AxiosPromise<Response<T>>;
|
|
334
358
|
/**
|
|
335
359
|
* Reveal credentials to a signed-in business billing administrator after an
|
|
@@ -337,7 +361,7 @@ declare class Hosting {
|
|
|
337
361
|
*/
|
|
338
362
|
static databaseCredentials<T = HostingDatabaseCredentials>(title_id: string, site_id: string, database_id: string, confirmation: string): AxiosPromise<Response<T>>;
|
|
339
363
|
static updateDatabase<T>(title_id: string, site_id: string, database_id: string, data: Record<string, any>): AxiosPromise<Response<T>>;
|
|
340
|
-
static retryDatabase<T>(title_id: string, site_id: string, database_id: string): AxiosPromise<Response<T>>;
|
|
364
|
+
static retryDatabase<T = HostingCheckoutResult>(title_id: string, site_id: string, database_id: string): AxiosPromise<Response<T>>;
|
|
341
365
|
static deleteDatabase<T>(title_id: string, site_id: string, database_id: string, confirmation: string): AxiosPromise<Response<T>>;
|
|
342
366
|
}
|
|
343
367
|
export default Hosting;
|
package/dist/esm/index.js
CHANGED
|
@@ -21359,7 +21359,7 @@ HostingRoute.routes = {
|
|
|
21359
21359
|
};
|
|
21360
21360
|
|
|
21361
21361
|
/**
|
|
21362
|
-
* Typed SDK for game website hosting,
|
|
21362
|
+
* Typed SDK for game website hosting, managed database add-ons, domains, usage,
|
|
21363
21363
|
* deployment instructions, and hosted-play attribution.
|
|
21364
21364
|
*/
|
|
21365
21365
|
class Hosting {
|
|
@@ -21376,7 +21376,7 @@ class Hosting {
|
|
|
21376
21376
|
static billingCheckout(title_id, plan) {
|
|
21377
21377
|
return Requests.processRoute(HostingRoute.routes.billingCheckout, { plan }, { title_id });
|
|
21378
21378
|
}
|
|
21379
|
-
/** Confirm a paid Stripe Checkout session before provisioning its
|
|
21379
|
+
/** Confirm a paid Stripe Checkout session before provisioning its add-on. */
|
|
21380
21380
|
static confirmBillingCheckout(title_id, checkout_session_id) {
|
|
21381
21381
|
return Requests.processRoute(HostingRoute.routes.confirmBillingCheckout, { checkout_session_id }, { title_id });
|
|
21382
21382
|
}
|
|
@@ -21413,7 +21413,7 @@ class Hosting {
|
|
|
21413
21413
|
static createUploadUrl(title_id, site_id) {
|
|
21414
21414
|
return Requests.processRoute(HostingRoute.routes.uploadUrl, {}, { title_id, site_id });
|
|
21415
21415
|
}
|
|
21416
|
-
/** Upload directly to the short-lived
|
|
21416
|
+
/** Upload directly to the short-lived signed URL returned by createUploadUrl. */
|
|
21417
21417
|
static uploadBuild(uploadUrl, file, requiredHeaders = {}, onUploadProgress) {
|
|
21418
21418
|
return axios.put(uploadUrl, file, {
|
|
21419
21419
|
headers: Object.assign({ 'x-ms-blob-type': 'BlockBlob', 'Content-Type': 'application/zip' }, requiredHeaders),
|