@magiclabs.ai/magicbook-client 0.7.16-canary → 0.7.17-canary
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.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.iife.js +2 -2
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.iife.js
CHANGED
|
@@ -93,7 +93,7 @@ var MagicLabs = (() => {
|
|
|
93
93
|
];
|
|
94
94
|
var statesToReport = ["error", "timeout"];
|
|
95
95
|
var isDesignRequestSubmitted = (state) => !["new", "ingesting"].includes(state);
|
|
96
|
-
var canSubmitDesignRequest = (state) => ["new", "ingesting", "ready"].includes(state);
|
|
96
|
+
var canSubmitDesignRequest = (state) => ["new", "ingesting", "ready", "error"].includes(state);
|
|
97
97
|
var occasions = [
|
|
98
98
|
"baby",
|
|
99
99
|
"birthday",
|
|
@@ -5842,7 +5842,7 @@ var MagicLabs = (() => {
|
|
|
5842
5842
|
}
|
|
5843
5843
|
async submit(submitDesignRequestProps) {
|
|
5844
5844
|
if (!canSubmitDesignRequest(this.state)) {
|
|
5845
|
-
throw new Error("You need to wait for the current design request to be
|
|
5845
|
+
throw new Error("You need to wait for the current design request to be completed before submitting a new one.");
|
|
5846
5846
|
} else {
|
|
5847
5847
|
submitDesignRequestProps && this.updateDesignRequest(submitDesignRequestProps);
|
|
5848
5848
|
this.webSocket = new WebSocket(`${this.client.webSocketHost}/?book_id=${this.parentId}`);
|
package/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var statesToCloseWS = [
|
|
|
23
23
|
];
|
|
24
24
|
var statesToReport = ["error", "timeout"];
|
|
25
25
|
var isDesignRequestSubmitted = (state) => !["new", "ingesting"].includes(state);
|
|
26
|
-
var canSubmitDesignRequest = (state) => ["new", "ingesting", "ready"].includes(state);
|
|
26
|
+
var canSubmitDesignRequest = (state) => ["new", "ingesting", "ready", "error"].includes(state);
|
|
27
27
|
var occasions = [
|
|
28
28
|
"baby",
|
|
29
29
|
"birthday",
|
|
@@ -5784,7 +5784,7 @@ var DesignRequest = class {
|
|
|
5784
5784
|
}
|
|
5785
5785
|
async submit(submitDesignRequestProps) {
|
|
5786
5786
|
if (!canSubmitDesignRequest(this.state)) {
|
|
5787
|
-
throw new Error("You need to wait for the current design request to be
|
|
5787
|
+
throw new Error("You need to wait for the current design request to be completed before submitting a new one.");
|
|
5788
5788
|
} else {
|
|
5789
5789
|
submitDesignRequestProps && this.updateDesignRequest(submitDesignRequestProps);
|
|
5790
5790
|
this.webSocket = new WebSocket(`${this.client.webSocketHost}/?book_id=${this.parentId}`);
|