@magiclabs.ai/magicbook-client 0.6.6 → 0.6.8

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/index.js CHANGED
@@ -4125,8 +4125,8 @@ var designOptionsServerSchema = z.object({
4125
4125
  });
4126
4126
 
4127
4127
  // ../../core/config.ts
4128
- var defaultApiHost = "https://api.dev-sls.magicbook.io";
4129
- var defaultWebSocketHost = "wss://socket.dev-sls.magicbook.io";
4128
+ var defaultApiHost = "https://api.sfly-sls.magicbook.io";
4129
+ var defaultWebSocketHost = "wss://socket.sfly-sls.magicbook.io";
4130
4130
  var designRequestTimeout = parseInt("30000"?.toString() || "3000");
4131
4131
 
4132
4132
  // ../../core/models/design-request/index.ts
@@ -4203,13 +4203,15 @@ var DesignRequest = class {
4203
4203
  }
4204
4204
  }
4205
4205
  async setGuid(guid) {
4206
- this.guid = guid;
4207
- if (isDesignRequestSubmitted(this.state)) {
4206
+ if (!isDesignRequestSubmitted(this.state)) {
4207
+ throw new Error("Design request not submitted");
4208
+ } else {
4209
+ this.guid = guid;
4208
4210
  this.updateDesignRequest(
4209
4211
  (await this.client.engineAPI.books.update(this.parentId, this.toBook())).toDesignRequestProps()
4210
4212
  );
4213
+ return this.guid;
4211
4214
  }
4212
- return this.guid;
4213
4215
  }
4214
4216
  async cancel() {
4215
4217
  if (this.state === "cancelled") {
@@ -4249,7 +4251,7 @@ var DesignRequest = class {
4249
4251
  this.state = detail.slug;
4250
4252
  }
4251
4253
  timeoutHandler() {
4252
- return setTimeout(async () => {
4254
+ return setTimeout(() => {
4253
4255
  this.eventHandler(timeoutMessage);
4254
4256
  }, designRequestTimeout);
4255
4257
  }