glitch-javascript-sdk 3.9.7 → 3.9.9

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.
@@ -69,6 +69,27 @@ export interface HostingDatabase {
69
69
  billing_active: boolean;
70
70
  last_error?: string | null;
71
71
  }
72
+ export interface HostingDatabaseCredentials {
73
+ database_id: string;
74
+ name: string;
75
+ engine: HostingDatabaseEngine;
76
+ binding_name: string;
77
+ connection_string: string;
78
+ connection: {
79
+ driver?: string;
80
+ host?: string;
81
+ endpoint?: string;
82
+ port?: number;
83
+ database?: string;
84
+ username?: string;
85
+ password?: string;
86
+ key?: string;
87
+ tls: boolean;
88
+ };
89
+ revealed_at: string;
90
+ /** UI safety timer only; the database credential itself does not expire after this interval. */
91
+ hide_after_seconds: number;
92
+ }
72
93
  export interface HostingSite {
73
94
  id: string;
74
95
  hosting_account_id: string;
@@ -128,8 +149,6 @@ export interface HostingMarketplaceSubscription {
128
149
  export interface HostingAwsMarketplaceSubscription {
129
150
  id: string;
130
151
  customer_aws_account_id?: string | null;
131
- license_arn: string;
132
- product_code: string;
133
152
  plan_dimension?: string | null;
134
153
  plan_key?: Exclude<HostingPlanKey, 'free'> | null;
135
154
  status: 'PendingRegistration' | 'PendingEntitlement' | 'Subscribed' | 'Unsubscribed';
@@ -184,6 +203,11 @@ declare class Hosting {
184
203
  static databases<T>(title_id: string, site_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
185
204
  static createDatabase<T>(title_id: string, site_id: string, data: CreateHostingDatabaseRequest): AxiosPromise<Response<T>>;
186
205
  static database<T>(title_id: string, site_id: string, database_id: string): AxiosPromise<Response<T>>;
206
+ /**
207
+ * Reveal credentials to a signed-in business billing administrator after an
208
+ * exact database-name confirmation. Hosting and MCP tokens are rejected.
209
+ */
210
+ static databaseCredentials<T = HostingDatabaseCredentials>(title_id: string, site_id: string, database_id: string, confirmation: string): AxiosPromise<Response<T>>;
187
211
  static updateDatabase<T>(title_id: string, site_id: string, database_id: string, data: Record<string, any>): AxiosPromise<Response<T>>;
188
212
  static retryDatabase<T>(title_id: string, site_id: string, database_id: string): AxiosPromise<Response<T>>;
189
213
  static deleteDatabase<T>(title_id: string, site_id: string, database_id: string, confirmation: string): AxiosPromise<Response<T>>;
package/dist/esm/index.js CHANGED
@@ -21347,6 +21347,7 @@ HostingRoute.routes = {
21347
21347
  databases: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases', method: HTTP_METHODS.GET },
21348
21348
  createDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases', method: HTTP_METHODS.POST },
21349
21349
  database: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.GET },
21350
+ databaseCredentials: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}/credentials', method: HTTP_METHODS.POST },
21350
21351
  updateDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.PUT },
21351
21352
  retryDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}/retry', method: HTTP_METHODS.POST },
21352
21353
  deleteDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.DELETE },
@@ -21466,6 +21467,13 @@ class Hosting {
21466
21467
  static database(title_id, site_id, database_id) {
21467
21468
  return Requests.processRoute(HostingRoute.routes.database, undefined, { title_id, site_id, database_id });
21468
21469
  }
21470
+ /**
21471
+ * Reveal credentials to a signed-in business billing administrator after an
21472
+ * exact database-name confirmation. Hosting and MCP tokens are rejected.
21473
+ */
21474
+ static databaseCredentials(title_id, site_id, database_id, confirmation) {
21475
+ return Requests.processRoute(HostingRoute.routes.databaseCredentials, { confirmation }, { title_id, site_id, database_id });
21476
+ }
21469
21477
  static updateDatabase(title_id, site_id, database_id, data) {
21470
21478
  return Requests.processRoute(HostingRoute.routes.updateDatabase, data, { title_id, site_id, database_id });
21471
21479
  }