@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.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 = {};
@@ -1515,7 +1519,7 @@ function defineDeprecatedCreateClient(createClient2) {
1515
1519
  return printNoDefaultExport(), createClient2(config);
1516
1520
  };
1517
1521
  }
1518
- var name = "@sanity/client", version = "6.21.4-canary.1";
1522
+ var name = "@sanity/client", version = "6.22.0";
1519
1523
  const middleware = [
1520
1524
  debug({ verbose: !0, namespace: "sanity:client" }),
1521
1525
  headers({ "User-Agent": `${name} ${version}` }),