glitch-javascript-sdk 3.9.8 → 3.10.0
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 +31 -0
- package/dist/browser/hosting-runtime.js.map +1 -1
- package/dist/cjs/index.js +31 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Hosting.d.ts +134 -4
- package/dist/esm/index.js +31 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +131 -2
- package/package.json +1 -1
- package/src/api/Hosting.ts +153 -4
- package/src/routes/HostingRoute.ts +6 -0
|
@@ -5677,12 +5677,18 @@
|
|
|
5677
5677
|
checkDomain: { url: '/hosting/domains/check', method: HTTP_METHODS.POST },
|
|
5678
5678
|
purchaseDomain: { url: '/titles/{title_id}/hosting/sites/{site_id}/domains/purchase', method: HTTP_METHODS.POST },
|
|
5679
5679
|
aiInstructions: { url: '/titles/{title_id}/hosting/sites/{site_id}/ai-instructions', method: HTTP_METHODS.POST },
|
|
5680
|
+
services: { url: '/titles/{title_id}/hosting/sites/{site_id}/services', method: HTTP_METHODS.GET },
|
|
5681
|
+
estimateServices: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/estimate', method: HTTP_METHODS.POST },
|
|
5682
|
+
applyServices: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/apply', method: HTTP_METHODS.POST },
|
|
5683
|
+
putServiceSecret: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/{service_id}/secrets/{name}', method: HTTP_METHODS.PUT },
|
|
5684
|
+
deleteServiceSecret: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/{service_id}/secrets/{name}', method: HTTP_METHODS.DELETE },
|
|
5680
5685
|
resolve: { url: '/hosting/resolve', method: HTTP_METHODS.GET },
|
|
5681
5686
|
startPlaySession: { url: '/hosting/play-sessions', method: HTTP_METHODS.POST },
|
|
5682
5687
|
heartbeatPlaySession: { url: '/hosting/play-sessions/{session_id}/heartbeat', method: HTTP_METHODS.POST },
|
|
5683
5688
|
databases: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases', method: HTTP_METHODS.GET },
|
|
5684
5689
|
createDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases', method: HTTP_METHODS.POST },
|
|
5685
5690
|
database: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.GET },
|
|
5691
|
+
databaseCredentials: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}/credentials', method: HTTP_METHODS.POST },
|
|
5686
5692
|
updateDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.PUT },
|
|
5687
5693
|
retryDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}/retry', method: HTTP_METHODS.POST },
|
|
5688
5694
|
deleteDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.DELETE },
|
|
@@ -6251,6 +6257,24 @@
|
|
|
6251
6257
|
static aiInstructions(title_id, site_id, data = {}) {
|
|
6252
6258
|
return Requests.processRoute(HostingRoute.routes.aiInstructions, data, { title_id, site_id });
|
|
6253
6259
|
}
|
|
6260
|
+
static services(title_id, site_id) {
|
|
6261
|
+
return Requests.processRoute(HostingRoute.routes.services, undefined, { title_id, site_id });
|
|
6262
|
+
}
|
|
6263
|
+
/** Calculate the always-on floor without creating resources or charges. */
|
|
6264
|
+
static estimateServices(title_id, site_id, data) {
|
|
6265
|
+
return Requests.processRoute(HostingRoute.routes.estimateServices, data, { title_id, site_id });
|
|
6266
|
+
}
|
|
6267
|
+
/** Queue an immutable multi-service release. Publishing remains a separate operation. */
|
|
6268
|
+
static applyServices(title_id, site_id, data) {
|
|
6269
|
+
return Requests.processRoute(HostingRoute.routes.applyServices, data, { title_id, site_id });
|
|
6270
|
+
}
|
|
6271
|
+
/** Store or rotate a secret. The API never returns the value. Interactive administrators only. */
|
|
6272
|
+
static putServiceSecret(title_id, site_id, service_id, name, value) {
|
|
6273
|
+
return Requests.processRoute(HostingRoute.routes.putServiceSecret, { value }, { title_id, site_id, service_id, name });
|
|
6274
|
+
}
|
|
6275
|
+
static deleteServiceSecret(title_id, site_id, service_id, name) {
|
|
6276
|
+
return Requests.processRoute(HostingRoute.routes.deleteServiceSecret, undefined, { title_id, site_id, service_id, name });
|
|
6277
|
+
}
|
|
6254
6278
|
static resolve(hostname, gatewayToken) {
|
|
6255
6279
|
if (!gatewayToken) {
|
|
6256
6280
|
return Requests.processRoute(HostingRoute.routes.resolve, undefined, undefined, { hostname });
|
|
@@ -6279,6 +6303,13 @@
|
|
|
6279
6303
|
static database(title_id, site_id, database_id) {
|
|
6280
6304
|
return Requests.processRoute(HostingRoute.routes.database, undefined, { title_id, site_id, database_id });
|
|
6281
6305
|
}
|
|
6306
|
+
/**
|
|
6307
|
+
* Reveal credentials to a signed-in business billing administrator after an
|
|
6308
|
+
* exact database-name confirmation. Hosting and MCP tokens are rejected.
|
|
6309
|
+
*/
|
|
6310
|
+
static databaseCredentials(title_id, site_id, database_id, confirmation) {
|
|
6311
|
+
return Requests.processRoute(HostingRoute.routes.databaseCredentials, { confirmation }, { title_id, site_id, database_id });
|
|
6312
|
+
}
|
|
6282
6313
|
static updateDatabase(title_id, site_id, database_id, data) {
|
|
6283
6314
|
return Requests.processRoute(HostingRoute.routes.updateDatabase, data, { title_id, site_id, database_id });
|
|
6284
6315
|
}
|