@phpsandbox/sdk 0.1.17 → 0.1.18
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 +22 -0
- package/dist/browser/phpsandbox-sdk.esm.min.js +9 -9
- package/dist/browser/phpsandbox-sdk.iife.js +22 -0
- package/dist/browser/phpsandbox-sdk.iife.min.js +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/publications.d.ts +33 -0
- package/dist/publications.js +22 -0
- package/package.json +1 -1
|
@@ -19071,6 +19071,27 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19071
19071
|
});
|
|
19072
19072
|
|
|
19073
19073
|
// src/publications.ts
|
|
19074
|
+
var PublicationDomains = class {
|
|
19075
|
+
constructor(client, publicationId) {
|
|
19076
|
+
this.client = client;
|
|
19077
|
+
this.publicationId = publicationId;
|
|
19078
|
+
}
|
|
19079
|
+
async list() {
|
|
19080
|
+
return (await this.client.get(this.path())).data;
|
|
19081
|
+
}
|
|
19082
|
+
async create(hostname3) {
|
|
19083
|
+
return (await this.client.post(this.path(), { hostname: hostname3 })).data;
|
|
19084
|
+
}
|
|
19085
|
+
async refresh(id) {
|
|
19086
|
+
return (await this.client.post(`${this.path()}/${encodeURIComponent(id)}/refresh`)).data;
|
|
19087
|
+
}
|
|
19088
|
+
async delete(id) {
|
|
19089
|
+
await this.client.delete(`${this.path()}/${encodeURIComponent(id)}`);
|
|
19090
|
+
}
|
|
19091
|
+
path() {
|
|
19092
|
+
return `/publications/${encodeURIComponent(this.publicationId)}/domains`;
|
|
19093
|
+
}
|
|
19094
|
+
};
|
|
19074
19095
|
var PublicationApi = class {
|
|
19075
19096
|
constructor(client) {
|
|
19076
19097
|
this.client = client;
|
|
@@ -19192,6 +19213,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19192
19213
|
this.data = data;
|
|
19193
19214
|
this.client = client;
|
|
19194
19215
|
this.notebookId = notebookId;
|
|
19216
|
+
this.domains = new PublicationDomains(client, data.id);
|
|
19195
19217
|
}
|
|
19196
19218
|
async refresh() {
|
|
19197
19219
|
const response = await this.client.get(`/publications/${this.data.id}`);
|