glitch-javascript-sdk 3.9.3 → 3.9.5
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 +3797 -3348
- package/dist/browser/hosting-runtime.js.map +1 -1
- package/dist/cjs/index.js +9195 -3145
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Hosting.d.ts +27 -0
- package/dist/esm/index.js +3842 -3393
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/HostingRoute.d.ts +1 -1
- package/dist/index.d.ts +6 -0
- package/package.json +1 -1
- package/src/api/Hosting.ts +37 -0
- package/src/routes/HostingRoute.ts +4 -1
|
@@ -5,12 +5,15 @@ export type HostingMode = 'static' | 'server';
|
|
|
5
5
|
export type HostingDatabaseEngine = 'postgresql' | 'mysql' | 'azure_sql' | 'cosmos_nosql';
|
|
6
6
|
export type HostingDatabasePlan = 'sandbox' | 'launch' | 'growth' | 'scale' | 'dedicated';
|
|
7
7
|
export type HostingDeliveryChannel = 'glitch_store' | 'glitch_hosted_subdomain' | 'glitch_hosted_custom_domain' | 'external';
|
|
8
|
+
export type HostingBillingProvider = 'direct' | 'microsoft_marketplace';
|
|
8
9
|
export interface HostingAccount {
|
|
9
10
|
id: string;
|
|
10
11
|
community_id: string;
|
|
11
12
|
plan: HostingPlanKey;
|
|
12
13
|
pending_plan?: HostingPlanKey | null;
|
|
13
14
|
status: string;
|
|
15
|
+
billing_provider: HostingBillingProvider;
|
|
16
|
+
microsoft_marketplace_subscription_id?: string | null;
|
|
14
17
|
included_bandwidth_bytes: number;
|
|
15
18
|
used_bandwidth_bytes: number;
|
|
16
19
|
remaining_bandwidth_bytes: number;
|
|
@@ -61,6 +64,7 @@ export interface HostingDatabase {
|
|
|
61
64
|
port?: number | null;
|
|
62
65
|
binding_name: string;
|
|
63
66
|
billing_status: 'awaiting_payment' | 'active' | 'past_due' | 'unpaid' | 'cancelled' | 'expired' | 'failed';
|
|
67
|
+
billing_provider: HostingBillingProvider;
|
|
64
68
|
billing_active: boolean;
|
|
65
69
|
last_error?: string | null;
|
|
66
70
|
}
|
|
@@ -103,6 +107,23 @@ export interface CreateHostingDatabaseRequest {
|
|
|
103
107
|
auto_grow_enabled?: boolean;
|
|
104
108
|
high_availability_enabled?: boolean;
|
|
105
109
|
}
|
|
110
|
+
export interface HostingMarketplaceSubscription {
|
|
111
|
+
id: string;
|
|
112
|
+
marketplace_subscription_id: string;
|
|
113
|
+
subscription_name?: string | null;
|
|
114
|
+
offer_id: string;
|
|
115
|
+
plan_id: string;
|
|
116
|
+
plan_key: HostingPlanKey;
|
|
117
|
+
status: 'PendingFulfillmentStart' | 'Subscribed' | 'Suspended' | 'Unsubscribed';
|
|
118
|
+
quantity: number;
|
|
119
|
+
community_id?: string | null;
|
|
120
|
+
is_test: boolean;
|
|
121
|
+
is_free_trial: boolean;
|
|
122
|
+
auto_renew: boolean;
|
|
123
|
+
term_starts_at?: string | null;
|
|
124
|
+
term_ends_at?: string | null;
|
|
125
|
+
activated_at?: string | null;
|
|
126
|
+
}
|
|
106
127
|
/**
|
|
107
128
|
* Typed SDK for game website hosting, Azure database add-ons, domains, usage,
|
|
108
129
|
* deployment instructions, and hosted-play attribution.
|
|
@@ -115,6 +136,12 @@ declare class Hosting {
|
|
|
115
136
|
static billingCheckout<T>(title_id: string, plan: HostingPlanKey): AxiosPromise<Response<T>>;
|
|
116
137
|
/** Confirm a paid Stripe Checkout session before provisioning its Azure resource. */
|
|
117
138
|
static confirmBillingCheckout<T>(title_id: string, checkout_session_id: string): AxiosPromise<Response<T>>;
|
|
139
|
+
/** Resolve the one-hour purchase token passed to Glitch by Microsoft Marketplace. */
|
|
140
|
+
static resolveMarketplacePurchase<T>(token: string): AxiosPromise<Response<T>>;
|
|
141
|
+
/** Link a resolved Microsoft Marketplace subscription to a billable Glitch business account. */
|
|
142
|
+
static activateMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>>;
|
|
143
|
+
/** Retrieve safe Microsoft Marketplace entitlement and lifecycle status. */
|
|
144
|
+
static marketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>>;
|
|
118
145
|
static createSite<T>(title_id: string, data: CreateHostingSiteRequest): AxiosPromise<Response<T>>;
|
|
119
146
|
static updateSite<T>(title_id: string, site_id: string, data: Partial<CreateHostingSiteRequest> & Record<string, any>): AxiosPromise<Response<T>>;
|
|
120
147
|
static createUploadUrl<T>(title_id: string, site_id: string): AxiosPromise<Response<T>>;
|