glitch-javascript-sdk 3.9.6 → 3.9.7
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 +15 -0
- package/dist/browser/hosting-runtime.js.map +1 -1
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Hosting.d.ts +24 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/package.json +1 -1
- package/src/api/Hosting.ts +34 -1
- package/src/routes/HostingRoute.ts +3 -0
|
@@ -5,7 +5,7 @@ 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
|
+
export type HostingBillingProvider = 'direct' | 'microsoft_marketplace' | 'aws_marketplace';
|
|
9
9
|
export interface HostingAccount {
|
|
10
10
|
id: string;
|
|
11
11
|
community_id: string;
|
|
@@ -14,6 +14,7 @@ export interface HostingAccount {
|
|
|
14
14
|
status: string;
|
|
15
15
|
billing_provider: HostingBillingProvider;
|
|
16
16
|
microsoft_marketplace_subscription_id?: string | null;
|
|
17
|
+
aws_marketplace_subscription_id?: string | null;
|
|
17
18
|
included_bandwidth_bytes: number;
|
|
18
19
|
used_bandwidth_bytes: number;
|
|
19
20
|
remaining_bandwidth_bytes: number;
|
|
@@ -124,6 +125,22 @@ export interface HostingMarketplaceSubscription {
|
|
|
124
125
|
term_ends_at?: string | null;
|
|
125
126
|
activated_at?: string | null;
|
|
126
127
|
}
|
|
128
|
+
export interface HostingAwsMarketplaceSubscription {
|
|
129
|
+
id: string;
|
|
130
|
+
customer_aws_account_id?: string | null;
|
|
131
|
+
license_arn: string;
|
|
132
|
+
product_code: string;
|
|
133
|
+
plan_dimension?: string | null;
|
|
134
|
+
plan_key?: Exclude<HostingPlanKey, 'free'> | null;
|
|
135
|
+
status: 'PendingRegistration' | 'PendingEntitlement' | 'Subscribed' | 'Unsubscribed';
|
|
136
|
+
entitlement_value: number;
|
|
137
|
+
entitlement_expires_at?: string | null;
|
|
138
|
+
community_id?: string | null;
|
|
139
|
+
hosting_account_id?: string | null;
|
|
140
|
+
activated_at?: string | null;
|
|
141
|
+
last_synced_at?: string | null;
|
|
142
|
+
manage_url: string;
|
|
143
|
+
}
|
|
127
144
|
/**
|
|
128
145
|
* Typed SDK for game website hosting, Azure database add-ons, domains, usage,
|
|
129
146
|
* deployment instructions, and hosted-play attribution.
|
|
@@ -142,6 +159,12 @@ declare class Hosting {
|
|
|
142
159
|
static activateMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>>;
|
|
143
160
|
/** Retrieve safe Microsoft Marketplace entitlement and lifecycle status. */
|
|
144
161
|
static marketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>>;
|
|
162
|
+
/** Claim the one-time Glitch code created after AWS ResolveCustomer succeeds. */
|
|
163
|
+
static resolveAwsMarketplacePurchase<T>(activation_code: string): AxiosPromise<Response<T>>;
|
|
164
|
+
/** Connect a paid AWS Marketplace contract to one Glitch business account. */
|
|
165
|
+
static activateAwsMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>>;
|
|
166
|
+
/** Refresh and retrieve the safe AWS Marketplace entitlement state. */
|
|
167
|
+
static awsMarketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>>;
|
|
145
168
|
static createSite<T>(title_id: string, data: CreateHostingSiteRequest): AxiosPromise<Response<T>>;
|
|
146
169
|
static updateSite<T>(title_id: string, site_id: string, data: Partial<CreateHostingSiteRequest> & Record<string, any>): AxiosPromise<Response<T>>;
|
|
147
170
|
static createUploadUrl<T>(title_id: string, site_id: string): AxiosPromise<Response<T>>;
|
package/dist/esm/index.js
CHANGED
|
@@ -21327,6 +21327,9 @@ HostingRoute.routes = {
|
|
|
21327
21327
|
resolveMarketplacePurchase: { url: '/hosting/marketplace/resolve', method: HTTP_METHODS.POST },
|
|
21328
21328
|
activateMarketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}/activate', method: HTTP_METHODS.POST },
|
|
21329
21329
|
marketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}', method: HTTP_METHODS.GET },
|
|
21330
|
+
resolveAwsMarketplacePurchase: { url: '/hosting/aws-marketplace/resolve', method: HTTP_METHODS.POST },
|
|
21331
|
+
activateAwsMarketplaceSubscription: { url: '/hosting/aws-marketplace/subscriptions/{subscription_id}/activate', method: HTTP_METHODS.POST },
|
|
21332
|
+
awsMarketplaceSubscription: { url: '/hosting/aws-marketplace/subscriptions/{subscription_id}', method: HTTP_METHODS.GET },
|
|
21330
21333
|
createSite: { url: '/titles/{title_id}/hosting/sites', method: HTTP_METHODS.POST },
|
|
21331
21334
|
updateSite: { url: '/titles/{title_id}/hosting/sites/{site_id}', method: HTTP_METHODS.PUT },
|
|
21332
21335
|
uploadUrl: { url: '/titles/{title_id}/hosting/sites/{site_id}/upload-url', method: HTTP_METHODS.POST },
|
|
@@ -21383,6 +21386,18 @@ class Hosting {
|
|
|
21383
21386
|
static marketplaceSubscription(subscription_id) {
|
|
21384
21387
|
return Requests.processRoute(HostingRoute.routes.marketplaceSubscription, undefined, { subscription_id });
|
|
21385
21388
|
}
|
|
21389
|
+
/** Claim the one-time Glitch code created after AWS ResolveCustomer succeeds. */
|
|
21390
|
+
static resolveAwsMarketplacePurchase(activation_code) {
|
|
21391
|
+
return Requests.processRoute(HostingRoute.routes.resolveAwsMarketplacePurchase, { activation_code });
|
|
21392
|
+
}
|
|
21393
|
+
/** Connect a paid AWS Marketplace contract to one Glitch business account. */
|
|
21394
|
+
static activateAwsMarketplaceSubscription(subscription_id, community_id) {
|
|
21395
|
+
return Requests.processRoute(HostingRoute.routes.activateAwsMarketplaceSubscription, { community_id }, { subscription_id });
|
|
21396
|
+
}
|
|
21397
|
+
/** Refresh and retrieve the safe AWS Marketplace entitlement state. */
|
|
21398
|
+
static awsMarketplaceSubscription(subscription_id) {
|
|
21399
|
+
return Requests.processRoute(HostingRoute.routes.awsMarketplaceSubscription, undefined, { subscription_id });
|
|
21400
|
+
}
|
|
21386
21401
|
static createSite(title_id, data) {
|
|
21387
21402
|
return Requests.processRoute(HostingRoute.routes.createSite, data, { title_id });
|
|
21388
21403
|
}
|