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
package/dist/cjs/index.js
CHANGED
|
@@ -39411,12 +39411,18 @@ var HostingRoute = /** @class */ (function () {
|
|
|
39411
39411
|
checkDomain: { url: '/hosting/domains/check', method: HTTP_METHODS.POST },
|
|
39412
39412
|
purchaseDomain: { url: '/titles/{title_id}/hosting/sites/{site_id}/domains/purchase', method: HTTP_METHODS.POST },
|
|
39413
39413
|
aiInstructions: { url: '/titles/{title_id}/hosting/sites/{site_id}/ai-instructions', method: HTTP_METHODS.POST },
|
|
39414
|
+
services: { url: '/titles/{title_id}/hosting/sites/{site_id}/services', method: HTTP_METHODS.GET },
|
|
39415
|
+
estimateServices: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/estimate', method: HTTP_METHODS.POST },
|
|
39416
|
+
applyServices: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/apply', method: HTTP_METHODS.POST },
|
|
39417
|
+
putServiceSecret: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/{service_id}/secrets/{name}', method: HTTP_METHODS.PUT },
|
|
39418
|
+
deleteServiceSecret: { url: '/titles/{title_id}/hosting/sites/{site_id}/services/{service_id}/secrets/{name}', method: HTTP_METHODS.DELETE },
|
|
39414
39419
|
resolve: { url: '/hosting/resolve', method: HTTP_METHODS.GET },
|
|
39415
39420
|
startPlaySession: { url: '/hosting/play-sessions', method: HTTP_METHODS.POST },
|
|
39416
39421
|
heartbeatPlaySession: { url: '/hosting/play-sessions/{session_id}/heartbeat', method: HTTP_METHODS.POST },
|
|
39417
39422
|
databases: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases', method: HTTP_METHODS.GET },
|
|
39418
39423
|
createDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases', method: HTTP_METHODS.POST },
|
|
39419
39424
|
database: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.GET },
|
|
39425
|
+
databaseCredentials: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}/credentials', method: HTTP_METHODS.POST },
|
|
39420
39426
|
updateDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.PUT },
|
|
39421
39427
|
retryDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}/retry', method: HTTP_METHODS.POST },
|
|
39422
39428
|
deleteDatabase: { url: '/titles/{title_id}/hosting/sites/{site_id}/databases/{database_id}', method: HTTP_METHODS.DELETE },
|
|
@@ -39514,6 +39520,24 @@ var Hosting = /** @class */ (function () {
|
|
|
39514
39520
|
if (data === void 0) { data = {}; }
|
|
39515
39521
|
return Requests.processRoute(HostingRoute.routes.aiInstructions, data, { title_id: title_id, site_id: site_id });
|
|
39516
39522
|
};
|
|
39523
|
+
Hosting.services = function (title_id, site_id) {
|
|
39524
|
+
return Requests.processRoute(HostingRoute.routes.services, undefined, { title_id: title_id, site_id: site_id });
|
|
39525
|
+
};
|
|
39526
|
+
/** Calculate the always-on floor without creating resources or charges. */
|
|
39527
|
+
Hosting.estimateServices = function (title_id, site_id, data) {
|
|
39528
|
+
return Requests.processRoute(HostingRoute.routes.estimateServices, data, { title_id: title_id, site_id: site_id });
|
|
39529
|
+
};
|
|
39530
|
+
/** Queue an immutable multi-service release. Publishing remains a separate operation. */
|
|
39531
|
+
Hosting.applyServices = function (title_id, site_id, data) {
|
|
39532
|
+
return Requests.processRoute(HostingRoute.routes.applyServices, data, { title_id: title_id, site_id: site_id });
|
|
39533
|
+
};
|
|
39534
|
+
/** Store or rotate a secret. The API never returns the value. Interactive administrators only. */
|
|
39535
|
+
Hosting.putServiceSecret = function (title_id, site_id, service_id, name, value) {
|
|
39536
|
+
return Requests.processRoute(HostingRoute.routes.putServiceSecret, { value: value }, { title_id: title_id, site_id: site_id, service_id: service_id, name: name });
|
|
39537
|
+
};
|
|
39538
|
+
Hosting.deleteServiceSecret = function (title_id, site_id, service_id, name) {
|
|
39539
|
+
return Requests.processRoute(HostingRoute.routes.deleteServiceSecret, undefined, { title_id: title_id, site_id: site_id, service_id: service_id, name: name });
|
|
39540
|
+
};
|
|
39517
39541
|
Hosting.resolve = function (hostname, gatewayToken) {
|
|
39518
39542
|
if (!gatewayToken) {
|
|
39519
39543
|
return Requests.processRoute(HostingRoute.routes.resolve, undefined, undefined, { hostname: hostname });
|
|
@@ -39542,6 +39566,13 @@ var Hosting = /** @class */ (function () {
|
|
|
39542
39566
|
Hosting.database = function (title_id, site_id, database_id) {
|
|
39543
39567
|
return Requests.processRoute(HostingRoute.routes.database, undefined, { title_id: title_id, site_id: site_id, database_id: database_id });
|
|
39544
39568
|
};
|
|
39569
|
+
/**
|
|
39570
|
+
* Reveal credentials to a signed-in business billing administrator after an
|
|
39571
|
+
* exact database-name confirmation. Hosting and MCP tokens are rejected.
|
|
39572
|
+
*/
|
|
39573
|
+
Hosting.databaseCredentials = function (title_id, site_id, database_id, confirmation) {
|
|
39574
|
+
return Requests.processRoute(HostingRoute.routes.databaseCredentials, { confirmation: confirmation }, { title_id: title_id, site_id: site_id, database_id: database_id });
|
|
39575
|
+
};
|
|
39545
39576
|
Hosting.updateDatabase = function (title_id, site_id, database_id, data) {
|
|
39546
39577
|
return Requests.processRoute(HostingRoute.routes.updateDatabase, data, { title_id: title_id, site_id: site_id, database_id: database_id });
|
|
39547
39578
|
};
|