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.
package/dist/index.d.ts CHANGED
@@ -11591,6 +11591,12 @@ declare class Hosting {
11591
11591
  static activateMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>>;
11592
11592
  /** Retrieve safe Microsoft Marketplace entitlement and lifecycle status. */
11593
11593
  static marketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>>;
11594
+ /** Claim the one-time Glitch code created after AWS ResolveCustomer succeeds. */
11595
+ static resolveAwsMarketplacePurchase<T>(activation_code: string): AxiosPromise<Response<T>>;
11596
+ /** Connect a paid AWS Marketplace contract to one Glitch business account. */
11597
+ static activateAwsMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>>;
11598
+ /** Refresh and retrieve the safe AWS Marketplace entitlement state. */
11599
+ static awsMarketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>>;
11594
11600
  static createSite<T>(title_id: string, data: CreateHostingSiteRequest): AxiosPromise<Response<T>>;
11595
11601
  static updateSite<T>(title_id: string, site_id: string, data: Partial<CreateHostingSiteRequest> & Record<string, any>): AxiosPromise<Response<T>>;
11596
11602
  static createUploadUrl<T>(title_id: string, site_id: string): AxiosPromise<Response<T>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.9.6",
3
+ "version": "3.9.8",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,7 +9,7 @@ export type HostingMode = 'static' | 'server';
9
9
  export type HostingDatabaseEngine = 'postgresql' | 'mysql' | 'azure_sql' | 'cosmos_nosql';
10
10
  export type HostingDatabasePlan = 'sandbox' | 'launch' | 'growth' | 'scale' | 'dedicated';
11
11
  export type HostingDeliveryChannel = 'glitch_store' | 'glitch_hosted_subdomain' | 'glitch_hosted_custom_domain' | 'external';
12
- export type HostingBillingProvider = 'direct' | 'microsoft_marketplace';
12
+ export type HostingBillingProvider = 'direct' | 'microsoft_marketplace' | 'aws_marketplace';
13
13
 
14
14
  export interface HostingAccount {
15
15
  id: string;
@@ -19,6 +19,7 @@ export interface HostingAccount {
19
19
  status: string;
20
20
  billing_provider: HostingBillingProvider;
21
21
  microsoft_marketplace_subscription_id?: string | null;
22
+ aws_marketplace_subscription_id?: string | null;
22
23
  included_bandwidth_bytes: number;
23
24
  used_bandwidth_bytes: number;
24
25
  remaining_bandwidth_bytes: number;
@@ -138,6 +139,21 @@ export interface HostingMarketplaceSubscription {
138
139
  activated_at?: string | null;
139
140
  }
140
141
 
142
+ export interface HostingAwsMarketplaceSubscription {
143
+ id: string;
144
+ customer_aws_account_id?: string | null;
145
+ plan_dimension?: string | null;
146
+ plan_key?: Exclude<HostingPlanKey, 'free'> | null;
147
+ status: 'PendingRegistration' | 'PendingEntitlement' | 'Subscribed' | 'Unsubscribed';
148
+ entitlement_value: number;
149
+ entitlement_expires_at?: string | null;
150
+ community_id?: string | null;
151
+ hosting_account_id?: string | null;
152
+ activated_at?: string | null;
153
+ last_synced_at?: string | null;
154
+ manage_url: string;
155
+ }
156
+
141
157
  /**
142
158
  * Typed SDK for game website hosting, Azure database add-ons, domains, usage,
143
159
  * deployment instructions, and hosted-play attribution.
@@ -180,6 +196,21 @@ class Hosting {
180
196
  return Requests.processRoute(HostingRoute.routes.marketplaceSubscription, undefined, { subscription_id });
181
197
  }
182
198
 
199
+ /** Claim the one-time Glitch code created after AWS ResolveCustomer succeeds. */
200
+ public static resolveAwsMarketplacePurchase<T>(activation_code: string): AxiosPromise<Response<T>> {
201
+ return Requests.processRoute(HostingRoute.routes.resolveAwsMarketplacePurchase, { activation_code });
202
+ }
203
+
204
+ /** Connect a paid AWS Marketplace contract to one Glitch business account. */
205
+ public static activateAwsMarketplaceSubscription<T>(subscription_id: string, community_id: string): AxiosPromise<Response<T>> {
206
+ return Requests.processRoute(HostingRoute.routes.activateAwsMarketplaceSubscription, { community_id }, { subscription_id });
207
+ }
208
+
209
+ /** Refresh and retrieve the safe AWS Marketplace entitlement state. */
210
+ public static awsMarketplaceSubscription<T>(subscription_id: string): AxiosPromise<Response<T>> {
211
+ return Requests.processRoute(HostingRoute.routes.awsMarketplaceSubscription, undefined, { subscription_id });
212
+ }
213
+
183
214
  public static createSite<T>(title_id: string, data: CreateHostingSiteRequest): AxiosPromise<Response<T>> {
184
215
  return Requests.processRoute(HostingRoute.routes.createSite, data, { title_id });
185
216
  }
@@ -12,6 +12,9 @@ class HostingRoute {
12
12
  resolveMarketplacePurchase: { url: '/hosting/marketplace/resolve', method: HTTP_METHODS.POST },
13
13
  activateMarketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}/activate', method: HTTP_METHODS.POST },
14
14
  marketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}', method: HTTP_METHODS.GET },
15
+ resolveAwsMarketplacePurchase: { url: '/hosting/aws-marketplace/resolve', method: HTTP_METHODS.POST },
16
+ activateAwsMarketplaceSubscription: { url: '/hosting/aws-marketplace/subscriptions/{subscription_id}/activate', method: HTTP_METHODS.POST },
17
+ awsMarketplaceSubscription: { url: '/hosting/aws-marketplace/subscriptions/{subscription_id}', method: HTTP_METHODS.GET },
15
18
  createSite: { url: '/titles/{title_id}/hosting/sites', method: HTTP_METHODS.POST },
16
19
  updateSite: { url: '/titles/{title_id}/hosting/sites/{site_id}', method: HTTP_METHODS.PUT },
17
20
  uploadUrl: { url: '/titles/{title_id}/hosting/sites/{site_id}/upload-url', method: HTTP_METHODS.POST },