@phpsandbox/sdk 0.2.0 → 0.2.1
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.min.js +8 -8
- package/dist/browser/phpsandbox-sdk.iife.js +35 -0
- package/dist/browser/phpsandbox-sdk.iife.min.js +8 -8
- package/dist/publication/notebook.d.ts +12 -1
- package/dist/publication/notebook.js +30 -0
- package/dist/publication/types.d.ts +122 -0
- package/package.json +1 -1
|
@@ -15287,6 +15287,41 @@ var NotebookPublication = class {
|
|
|
15287
15287
|
async prepare(input) {
|
|
15288
15288
|
return (await this.client.post(`${this.path}/publication/plan`, input)).data;
|
|
15289
15289
|
}
|
|
15290
|
+
/** Review a multi-component publishing plan without creating resources or starting releases. */
|
|
15291
|
+
async prepareApplication(input) {
|
|
15292
|
+
return (await this.client.post(`${this.path}/publication/application-plan`, input)).data;
|
|
15293
|
+
}
|
|
15294
|
+
/** Publish every component in a reviewed application plan. */
|
|
15295
|
+
async publishApplication(input) {
|
|
15296
|
+
const application = (await this.client.post(`${this.path}/publication/application`, input)).data;
|
|
15297
|
+
this.startApplicationRuns(application);
|
|
15298
|
+
return application;
|
|
15299
|
+
}
|
|
15300
|
+
async application(applicationId) {
|
|
15301
|
+
return (await this.client.get(`${this.path}/publication/application/${encodeURIComponent(applicationId)}`)).data;
|
|
15302
|
+
}
|
|
15303
|
+
/** Retry only failed components while leaving healthy components untouched. */
|
|
15304
|
+
async retryApplication(applicationId) {
|
|
15305
|
+
const application = (await this.client.post(
|
|
15306
|
+
`${this.path}/publication/application/${encodeURIComponent(applicationId)}/retry`,
|
|
15307
|
+
{}
|
|
15308
|
+
)).data;
|
|
15309
|
+
this.startApplicationRuns(application);
|
|
15310
|
+
return application;
|
|
15311
|
+
}
|
|
15312
|
+
async destroyApplication(applicationId, options = {}) {
|
|
15313
|
+
const query = options.deleteResources ? "?deleteResources=1" : "";
|
|
15314
|
+
await this.client.delete(`${this.path}/publication/application/${encodeURIComponent(applicationId)}${query}`);
|
|
15315
|
+
}
|
|
15316
|
+
startApplicationRuns(application) {
|
|
15317
|
+
for (const component of application.components) {
|
|
15318
|
+
if (!["pending", "queued", "building", "deploying"].includes(component.publication.status)) continue;
|
|
15319
|
+
new PublicationRun(
|
|
15320
|
+
new PublicationInstance(component.publication, this.client, this.notebookId),
|
|
15321
|
+
this.client
|
|
15322
|
+
).start();
|
|
15323
|
+
}
|
|
15324
|
+
}
|
|
15290
15325
|
async catalog(provider, serverId) {
|
|
15291
15326
|
const query = new URLSearchParams({ provider });
|
|
15292
15327
|
if (serverId !== void 0) {
|