@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
|
@@ -15324,6 +15324,41 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15324
15324
|
async prepare(input) {
|
|
15325
15325
|
return (await this.client.post(`${this.path}/publication/plan`, input)).data;
|
|
15326
15326
|
}
|
|
15327
|
+
/** Review a multi-component publishing plan without creating resources or starting releases. */
|
|
15328
|
+
async prepareApplication(input) {
|
|
15329
|
+
return (await this.client.post(`${this.path}/publication/application-plan`, input)).data;
|
|
15330
|
+
}
|
|
15331
|
+
/** Publish every component in a reviewed application plan. */
|
|
15332
|
+
async publishApplication(input) {
|
|
15333
|
+
const application = (await this.client.post(`${this.path}/publication/application`, input)).data;
|
|
15334
|
+
this.startApplicationRuns(application);
|
|
15335
|
+
return application;
|
|
15336
|
+
}
|
|
15337
|
+
async application(applicationId) {
|
|
15338
|
+
return (await this.client.get(`${this.path}/publication/application/${encodeURIComponent(applicationId)}`)).data;
|
|
15339
|
+
}
|
|
15340
|
+
/** Retry only failed components while leaving healthy components untouched. */
|
|
15341
|
+
async retryApplication(applicationId) {
|
|
15342
|
+
const application = (await this.client.post(
|
|
15343
|
+
`${this.path}/publication/application/${encodeURIComponent(applicationId)}/retry`,
|
|
15344
|
+
{}
|
|
15345
|
+
)).data;
|
|
15346
|
+
this.startApplicationRuns(application);
|
|
15347
|
+
return application;
|
|
15348
|
+
}
|
|
15349
|
+
async destroyApplication(applicationId, options = {}) {
|
|
15350
|
+
const query = options.deleteResources ? "?deleteResources=1" : "";
|
|
15351
|
+
await this.client.delete(`${this.path}/publication/application/${encodeURIComponent(applicationId)}${query}`);
|
|
15352
|
+
}
|
|
15353
|
+
startApplicationRuns(application) {
|
|
15354
|
+
for (const component of application.components) {
|
|
15355
|
+
if (!["pending", "queued", "building", "deploying"].includes(component.publication.status)) continue;
|
|
15356
|
+
new PublicationRun(
|
|
15357
|
+
new PublicationInstance(component.publication, this.client, this.notebookId),
|
|
15358
|
+
this.client
|
|
15359
|
+
).start();
|
|
15360
|
+
}
|
|
15361
|
+
}
|
|
15327
15362
|
async catalog(provider, serverId) {
|
|
15328
15363
|
const query = new URLSearchParams({ provider });
|
|
15329
15364
|
if (serverId !== void 0) {
|