@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.
@@ -335,6 +335,8 @@ var PHPSandbox = (() => {
335
335
  NotebookInstance: () => NotebookInstance,
336
336
  NotebookMail: () => NotebookMail,
337
337
  NotebookMailApi: () => NotebookMailApi,
338
+ NotebookPreview: () => NotebookPreview,
339
+ NotebookPreviewApi: () => NotebookPreviewApi,
338
340
  NotebookPreviewAuth: () => NotebookPreviewAuth,
339
341
  NotebookPreviewAuthApi: () => NotebookPreviewAuthApi,
340
342
  NotebookSecretApi: () => NotebookSecretApi,
@@ -5066,6 +5068,7 @@ var PHPSandbox = (() => {
5066
5068
  this.client = client;
5067
5069
  this.secrets = new NotebookSecretApi(client);
5068
5070
  this.previewAuth = new NotebookPreviewAuthApi(client);
5071
+ this.preview = this.previewAuth;
5069
5072
  this.mail = new NotebookMailApi(client);
5070
5073
  }
5071
5074
  async create(template, input = {}, init = true) {
@@ -5173,20 +5176,36 @@ var PHPSandbox = (() => {
5173
5176
  await this.client.delete(`/notebook/${id}/secrets/${encodeURIComponent(name)}`);
5174
5177
  }
5175
5178
  };
5176
- var NotebookPreviewAuthApi = class {
5179
+ var NotebookPreviewApi = class {
5177
5180
  constructor(client) {
5178
5181
  this.client = client;
5179
5182
  }
5180
5183
  async get(id) {
5181
- const response = await this.client.get(`/notebook/${id}/preview-auth`);
5184
+ const response = await this.client.get(`/notebook/${id}/preview`);
5182
5185
  return response.data;
5183
5186
  }
5184
- async set(id, input) {
5185
- const response = await this.client.put(`/notebook/${id}/preview-auth`, input);
5187
+ async setPassword(id, input) {
5188
+ const response = await this.client.put(`/notebook/${id}/preview`, input);
5186
5189
  return response.data;
5187
5190
  }
5188
- async delete(id) {
5189
- await this.client.delete(`/notebook/${id}/preview-auth`);
5191
+ async disable(id) {
5192
+ await this.client.delete(`/notebook/${id}/preview`);
5193
+ }
5194
+ async createSession(id) {
5195
+ const response = await this.client.post(`/notebook/${id}/preview/session`);
5196
+ return response.data;
5197
+ }
5198
+ async createHandoff(id, input) {
5199
+ const response = await this.client.post(`/notebook/${id}/preview/handoff`, input);
5200
+ return response.data;
5201
+ }
5202
+ };
5203
+ var NotebookPreviewAuthApi = class extends NotebookPreviewApi {
5204
+ set(id, input) {
5205
+ return this.setPassword(id, input);
5206
+ }
5207
+ delete(id) {
5208
+ return this.disable(id);
5190
5209
  }
5191
5210
  };
5192
5211
  var NotebookMailApi = class {
@@ -5249,6 +5268,7 @@ var PHPSandbox = (() => {
5249
5268
  this.services = new Services(this);
5250
5269
  this.secrets = new NotebookSecrets(client, this.data.id);
5251
5270
  this.previewAuth = new NotebookPreviewAuth(client, this.data.id);
5271
+ this.preview = this.previewAuth;
5252
5272
  this.mail = new NotebookMail(client, this.data.id);
5253
5273
  }
5254
5274
  async ready() {
@@ -5426,19 +5446,30 @@ var PHPSandbox = (() => {
5426
5446
  return this.client.notebook.secrets.delete(this.notebookId, name);
5427
5447
  }
5428
5448
  };
5429
- var NotebookPreviewAuth = class {
5449
+ var NotebookPreview = class {
5430
5450
  constructor(client, notebookId) {
5431
5451
  this.client = client;
5432
5452
  this.notebookId = notebookId;
5433
5453
  }
5434
5454
  get() {
5435
- return this.client.notebook.previewAuth.get(this.notebookId);
5455
+ return this.client.notebook.preview.get(this.notebookId);
5436
5456
  }
5437
- set(input) {
5438
- return this.client.notebook.previewAuth.set(this.notebookId, input);
5457
+ setPassword(input) {
5458
+ return this.client.notebook.preview.setPassword(this.notebookId, input);
5439
5459
  }
5440
5460
  disable() {
5441
- return this.client.notebook.previewAuth.delete(this.notebookId);
5461
+ return this.client.notebook.preview.disable(this.notebookId);
5462
+ }
5463
+ createSession() {
5464
+ return this.client.notebook.preview.createSession(this.notebookId);
5465
+ }
5466
+ createHandoff(input) {
5467
+ return this.client.notebook.preview.createHandoff(this.notebookId, input);
5468
+ }
5469
+ };
5470
+ var NotebookPreviewAuth = class extends NotebookPreview {
5471
+ set(input) {
5472
+ return this.setPassword(input);
5442
5473
  }
5443
5474
  };
5444
5475
  var NotebookMail = class {