@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
|
@@ -19042,6 +19042,27 @@ var PublishStreamSseEventSchema = external_exports.discriminatedUnion("event", [
|
|
|
19042
19042
|
});
|
|
19043
19043
|
|
|
19044
19044
|
// src/publications.ts
|
|
19045
|
+
var PublicationDomains = class {
|
|
19046
|
+
constructor(client, publicationId) {
|
|
19047
|
+
this.client = client;
|
|
19048
|
+
this.publicationId = publicationId;
|
|
19049
|
+
}
|
|
19050
|
+
async list() {
|
|
19051
|
+
return (await this.client.get(this.path())).data;
|
|
19052
|
+
}
|
|
19053
|
+
async create(hostname3) {
|
|
19054
|
+
return (await this.client.post(this.path(), { hostname: hostname3 })).data;
|
|
19055
|
+
}
|
|
19056
|
+
async refresh(id) {
|
|
19057
|
+
return (await this.client.post(`${this.path()}/${encodeURIComponent(id)}/refresh`)).data;
|
|
19058
|
+
}
|
|
19059
|
+
async delete(id) {
|
|
19060
|
+
await this.client.delete(`${this.path()}/${encodeURIComponent(id)}`);
|
|
19061
|
+
}
|
|
19062
|
+
path() {
|
|
19063
|
+
return `/publications/${encodeURIComponent(this.publicationId)}/domains`;
|
|
19064
|
+
}
|
|
19065
|
+
};
|
|
19045
19066
|
var PublicationApi = class {
|
|
19046
19067
|
constructor(client) {
|
|
19047
19068
|
this.client = client;
|
|
@@ -19163,6 +19184,7 @@ var PublicationInstance = class _PublicationInstance {
|
|
|
19163
19184
|
this.data = data;
|
|
19164
19185
|
this.client = client;
|
|
19165
19186
|
this.notebookId = notebookId;
|
|
19187
|
+
this.domains = new PublicationDomains(client, data.id);
|
|
19166
19188
|
}
|
|
19167
19189
|
async refresh() {
|
|
19168
19190
|
const response = await this.client.get(`/publications/${this.data.id}`);
|