@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.cjs CHANGED
@@ -956,6 +956,10 @@ class LiveClient {
956
956
  throw new Error(
957
957
  "The live events API requires a token when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role."
958
958
  );
959
+ if (includeDrafts && apiVersion !== "X")
960
+ throw new Error(
961
+ "The live events API requires API version X when 'includeDrafts: true'. This API is experimental and may change or even be removed."
962
+ );
959
963
  const path = _getDataUrl(this.#client, "live/events"), url = new URL(this.#client.getUrl(path, !1));
960
964
  includeDrafts && url.searchParams.set("includeDrafts", "true");
961
965
  const listenFor = ["restart", "message"], esOptions = {};
@@ -1533,7 +1537,7 @@ function defineDeprecatedCreateClient(createClient2) {
1533
1537
  return printNoDefaultExport(), createClient2(config);
1534
1538
  };
1535
1539
  }
1536
- var name = "@sanity/client", version = "6.21.4-canary.1";
1540
+ var name = "@sanity/client", version = "6.22.0";
1537
1541
  const middleware = [
1538
1542
  middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
1539
1543
  middleware$1.headers({ "User-Agent": `${name} ${version}` }),