@phpsandbox/sdk 0.0.39 → 0.0.40
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 +42 -11
- 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 +42 -11
- 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 +37 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5017,6 +5017,7 @@ var NotebookApi = class {
|
|
|
5017
5017
|
this.client = client;
|
|
5018
5018
|
this.secrets = new NotebookSecretApi(client);
|
|
5019
5019
|
this.previewAuth = new NotebookPreviewAuthApi(client);
|
|
5020
|
+
this.preview = this.previewAuth;
|
|
5020
5021
|
this.mail = new NotebookMailApi(client);
|
|
5021
5022
|
}
|
|
5022
5023
|
async create(template, input = {}, init = true) {
|
|
@@ -5124,20 +5125,36 @@ var NotebookSecretApi = class {
|
|
|
5124
5125
|
await this.client.delete(`/notebook/${id}/secrets/${encodeURIComponent(name)}`);
|
|
5125
5126
|
}
|
|
5126
5127
|
};
|
|
5127
|
-
var
|
|
5128
|
+
var NotebookPreviewApi = class {
|
|
5128
5129
|
constructor(client) {
|
|
5129
5130
|
this.client = client;
|
|
5130
5131
|
}
|
|
5131
5132
|
async get(id) {
|
|
5132
|
-
const response = await this.client.get(`/notebook/${id}/preview
|
|
5133
|
+
const response = await this.client.get(`/notebook/${id}/preview`);
|
|
5133
5134
|
return response.data;
|
|
5134
5135
|
}
|
|
5135
|
-
async
|
|
5136
|
-
const response = await this.client.put(`/notebook/${id}/preview
|
|
5136
|
+
async setPassword(id, input) {
|
|
5137
|
+
const response = await this.client.put(`/notebook/${id}/preview`, input);
|
|
5137
5138
|
return response.data;
|
|
5138
5139
|
}
|
|
5139
|
-
async
|
|
5140
|
-
await this.client.delete(`/notebook/${id}/preview
|
|
5140
|
+
async disable(id) {
|
|
5141
|
+
await this.client.delete(`/notebook/${id}/preview`);
|
|
5142
|
+
}
|
|
5143
|
+
async createSession(id) {
|
|
5144
|
+
const response = await this.client.post(`/notebook/${id}/preview/session`);
|
|
5145
|
+
return response.data;
|
|
5146
|
+
}
|
|
5147
|
+
async createHandoff(id, input) {
|
|
5148
|
+
const response = await this.client.post(`/notebook/${id}/preview/handoff`, input);
|
|
5149
|
+
return response.data;
|
|
5150
|
+
}
|
|
5151
|
+
};
|
|
5152
|
+
var NotebookPreviewAuthApi = class extends NotebookPreviewApi {
|
|
5153
|
+
set(id, input) {
|
|
5154
|
+
return this.setPassword(id, input);
|
|
5155
|
+
}
|
|
5156
|
+
delete(id) {
|
|
5157
|
+
return this.disable(id);
|
|
5141
5158
|
}
|
|
5142
5159
|
};
|
|
5143
5160
|
var NotebookMailApi = class {
|
|
@@ -5200,6 +5217,7 @@ var NotebookInstance = class {
|
|
|
5200
5217
|
this.services = new Services(this);
|
|
5201
5218
|
this.secrets = new NotebookSecrets(client, this.data.id);
|
|
5202
5219
|
this.previewAuth = new NotebookPreviewAuth(client, this.data.id);
|
|
5220
|
+
this.preview = this.previewAuth;
|
|
5203
5221
|
this.mail = new NotebookMail(client, this.data.id);
|
|
5204
5222
|
}
|
|
5205
5223
|
async ready() {
|
|
@@ -5377,19 +5395,30 @@ var NotebookSecrets = class {
|
|
|
5377
5395
|
return this.client.notebook.secrets.delete(this.notebookId, name);
|
|
5378
5396
|
}
|
|
5379
5397
|
};
|
|
5380
|
-
var
|
|
5398
|
+
var NotebookPreview = class {
|
|
5381
5399
|
constructor(client, notebookId) {
|
|
5382
5400
|
this.client = client;
|
|
5383
5401
|
this.notebookId = notebookId;
|
|
5384
5402
|
}
|
|
5385
5403
|
get() {
|
|
5386
|
-
return this.client.notebook.
|
|
5404
|
+
return this.client.notebook.preview.get(this.notebookId);
|
|
5387
5405
|
}
|
|
5388
|
-
|
|
5389
|
-
return this.client.notebook.
|
|
5406
|
+
setPassword(input) {
|
|
5407
|
+
return this.client.notebook.preview.setPassword(this.notebookId, input);
|
|
5390
5408
|
}
|
|
5391
5409
|
disable() {
|
|
5392
|
-
return this.client.notebook.
|
|
5410
|
+
return this.client.notebook.preview.disable(this.notebookId);
|
|
5411
|
+
}
|
|
5412
|
+
createSession() {
|
|
5413
|
+
return this.client.notebook.preview.createSession(this.notebookId);
|
|
5414
|
+
}
|
|
5415
|
+
createHandoff(input) {
|
|
5416
|
+
return this.client.notebook.preview.createHandoff(this.notebookId, input);
|
|
5417
|
+
}
|
|
5418
|
+
};
|
|
5419
|
+
var NotebookPreviewAuth = class extends NotebookPreview {
|
|
5420
|
+
set(input) {
|
|
5421
|
+
return this.setPassword(input);
|
|
5393
5422
|
}
|
|
5394
5423
|
};
|
|
5395
5424
|
var NotebookMail = class {
|
|
@@ -5447,6 +5476,8 @@ export {
|
|
|
5447
5476
|
NotebookInstance,
|
|
5448
5477
|
NotebookMail,
|
|
5449
5478
|
NotebookMailApi,
|
|
5479
|
+
NotebookPreview,
|
|
5480
|
+
NotebookPreviewApi,
|
|
5450
5481
|
NotebookPreviewAuth,
|
|
5451
5482
|
NotebookPreviewAuthApi,
|
|
5452
5483
|
NotebookSecretApi,
|