@phpsandbox/sdk 0.1.16 → 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.
@@ -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}`);
@@ -19885,6 +19907,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
19885
19907
  constructor(client) {
19886
19908
  this.client = client;
19887
19909
  }
19910
+ async list(options = {}) {
19911
+ return this.client.get(
19912
+ `/notebook${formatQueryString({ page: options.page, per_page: options.perPage })}`
19913
+ );
19914
+ }
19888
19915
  async inspectImport(input) {
19889
19916
  const response = await this.client.post("/notebook/imports/inspect", input);
19890
19917
  return response.data;