@sanity/client 6.21.4-canary.1 → 6.22.0
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/index.browser.cjs +4 -0
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +4 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/data/live.ts +5 -0
- package/umd/sanityClient.js +4 -0
- package/umd/sanityClient.min.js +2 -2
package/dist/index.browser.js
CHANGED
|
@@ -938,6 +938,10 @@ class LiveClient {
|
|
|
938
938
|
throw new Error(
|
|
939
939
|
"The live events API requires a token when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role."
|
|
940
940
|
);
|
|
941
|
+
if (includeDrafts && apiVersion !== "X")
|
|
942
|
+
throw new Error(
|
|
943
|
+
"The live events API requires API version X when 'includeDrafts: true'. This API is experimental and may change or even be removed."
|
|
944
|
+
);
|
|
941
945
|
const path = _getDataUrl(this.#client, "live/events"), url = new URL(this.#client.getUrl(path, !1));
|
|
942
946
|
includeDrafts && url.searchParams.set("includeDrafts", "true");
|
|
943
947
|
const listenFor = ["restart", "message"], esOptions = {};
|