@phpsandbox/sdk 0.0.35 → 0.0.36
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/phpsandbox-sdk.esm.js +35 -0
- package/dist/browser/phpsandbox-sdk.esm.js.map +2 -2
- package/dist/browser/phpsandbox-sdk.esm.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.esm.min.js.map +3 -3
- package/dist/browser/phpsandbox-sdk.iife.js +35 -0
- package/dist/browser/phpsandbox-sdk.iife.js.map +2 -2
- package/dist/browser/phpsandbox-sdk.iife.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.iife.min.js.map +3 -3
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -333,6 +333,8 @@ var PHPSandbox = (() => {
|
|
|
333
333
|
NotebookApi: () => NotebookApi,
|
|
334
334
|
NotebookInitError: () => NotebookInitError,
|
|
335
335
|
NotebookInstance: () => NotebookInstance,
|
|
336
|
+
NotebookPreviewAuth: () => NotebookPreviewAuth,
|
|
337
|
+
NotebookPreviewAuthApi: () => NotebookPreviewAuthApi,
|
|
336
338
|
NotebookSecretApi: () => NotebookSecretApi,
|
|
337
339
|
NotebookSecrets: () => NotebookSecrets,
|
|
338
340
|
NotebookState: () => NotebookState,
|
|
@@ -5016,6 +5018,7 @@ var PHPSandbox = (() => {
|
|
|
5016
5018
|
constructor(client) {
|
|
5017
5019
|
this.client = client;
|
|
5018
5020
|
this.secrets = new NotebookSecretApi(client);
|
|
5021
|
+
this.previewAuth = new NotebookPreviewAuthApi(client);
|
|
5019
5022
|
}
|
|
5020
5023
|
async create(template, input = {}, init = true) {
|
|
5021
5024
|
const response = await this.client.post("/notebook", { template, ...input });
|
|
@@ -5122,6 +5125,22 @@ var PHPSandbox = (() => {
|
|
|
5122
5125
|
await this.client.delete(`/notebook/${id}/secrets/${encodeURIComponent(name)}`);
|
|
5123
5126
|
}
|
|
5124
5127
|
};
|
|
5128
|
+
var NotebookPreviewAuthApi = class {
|
|
5129
|
+
constructor(client) {
|
|
5130
|
+
this.client = client;
|
|
5131
|
+
}
|
|
5132
|
+
async get(id) {
|
|
5133
|
+
const response = await this.client.get(`/notebook/${id}/preview-auth`);
|
|
5134
|
+
return response.data;
|
|
5135
|
+
}
|
|
5136
|
+
async set(id, input) {
|
|
5137
|
+
const response = await this.client.put(`/notebook/${id}/preview-auth`, input);
|
|
5138
|
+
return response.data;
|
|
5139
|
+
}
|
|
5140
|
+
async delete(id) {
|
|
5141
|
+
await this.client.delete(`/notebook/${id}/preview-auth`);
|
|
5142
|
+
}
|
|
5143
|
+
};
|
|
5125
5144
|
var _initPromise, _NotebookInstance_instances, init_fn;
|
|
5126
5145
|
var NotebookInstance = class {
|
|
5127
5146
|
constructor(data, client) {
|
|
@@ -5152,6 +5171,7 @@ var PHPSandbox = (() => {
|
|
|
5152
5171
|
this.git = new Git(this);
|
|
5153
5172
|
this.services = new Services(this);
|
|
5154
5173
|
this.secrets = new NotebookSecrets(client, this.data.id);
|
|
5174
|
+
this.previewAuth = new NotebookPreviewAuth(client, this.data.id);
|
|
5155
5175
|
}
|
|
5156
5176
|
async ready() {
|
|
5157
5177
|
const terminalError = this.socket.getTerminalError();
|
|
@@ -5325,6 +5345,21 @@ var PHPSandbox = (() => {
|
|
|
5325
5345
|
return this.client.notebook.secrets.delete(this.notebookId, name);
|
|
5326
5346
|
}
|
|
5327
5347
|
};
|
|
5348
|
+
var NotebookPreviewAuth = class {
|
|
5349
|
+
constructor(client, notebookId) {
|
|
5350
|
+
this.client = client;
|
|
5351
|
+
this.notebookId = notebookId;
|
|
5352
|
+
}
|
|
5353
|
+
get() {
|
|
5354
|
+
return this.client.notebook.previewAuth.get(this.notebookId);
|
|
5355
|
+
}
|
|
5356
|
+
set(input) {
|
|
5357
|
+
return this.client.notebook.previewAuth.set(this.notebookId, input);
|
|
5358
|
+
}
|
|
5359
|
+
disable() {
|
|
5360
|
+
return this.client.notebook.previewAuth.delete(this.notebookId);
|
|
5361
|
+
}
|
|
5362
|
+
};
|
|
5328
5363
|
return __toCommonJS(index_exports);
|
|
5329
5364
|
})();
|
|
5330
5365
|
/*! Bundled license information:
|