glitch-javascript-sdk 3.9.6 → 3.9.8

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.
@@ -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,20 @@ 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
+ plan_dimension?: string | null;
132
+ plan_key?: Exclude<HostingPlanKey, 'free'> | null;
133
+ status: 'PendingRegistration' | 'PendingEntitlement' | 'Subscribed' | 'Unsubscribed';
134
+ entitlement_value: number;
135
+ entitlement_expires_at?: string | null;
136
+ community_id?: string | null;
137
+ hosting_account_id?: string | null;
138
+ activated_at?: string | null;
139
+ last_synced_at?: string | null;
140
+ manage_url: string;
141
+ }
127
142
  /**
128
143
  * Typed SDK for game website hosting, Azure database add-ons, domains, usage,
129
144
  * deployment instructions, and hosted-play attribution.
@@ -142,6 +157,12 @@ declare class Hosting {
142
157
  static activateMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>>;
143
158
  /** Retrieve safe Microsoft Marketplace entitlement and lifecycle status. */
144
159
  static marketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>>;
160
+ /** Claim the one-time Glitch code created after AWS ResolveCustomer succeeds. */
161
+ static resolveAwsMarketplacePurchase<T>(activation_code: string): AxiosPromise<Response<T>>;
162
+ /** Connect a paid AWS Marketplace contract to one Glitch business account. */
163
+ static activateAwsMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>>;
164
+ /** Refresh and retrieve the safe AWS Marketplace entitlement state. */
165
+ static awsMarketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>>;
145
166
  static createSite<T>(title_id: string, data: CreateHostingSiteRequest): AxiosPromise<Response<T>>;
146
167
  static updateSite<T>(title_id: string, site_id: string, data: Partial<CreateHostingSiteRequest> & Record<string, any>): AxiosPromise<Response<T>>;
147
168
  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
  }