@sanity/client 6.21.0 → 6.21.1

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
@@ -609,13 +609,13 @@ const encodeQueryString = ({
609
609
  params = {},
610
610
  options = {}
611
611
  }) => {
612
- const searchParams = new URLSearchParams(), { tag, returnQuery, ...opts } = options;
612
+ const searchParams = new URLSearchParams(), { tag, includeMutations, returnQuery, ...opts } = options;
613
613
  tag && searchParams.append("tag", tag), searchParams.append("query", query);
614
614
  for (const [key, value] of Object.entries(params))
615
615
  searchParams.append(`$${key}`, JSON.stringify(value));
616
616
  for (const [key, value] of Object.entries(opts))
617
617
  value && searchParams.append(key, `${value}`);
618
- return returnQuery === !1 && searchParams.append("returnQuery", "false"), `?${searchParams}`;
618
+ return returnQuery === !1 && searchParams.append("returnQuery", "false"), includeMutations === !1 && searchParams.append("includeMutations", "false"), `?${searchParams}`;
619
619
  }, excludeFalsey = (param, defValue) => param === !1 ? void 0 : typeof param > "u" ? defValue : param, getMutationQuery = (options = {}) => ({
620
620
  dryRun: options.dryRun,
621
621
  returnIds: !0,
@@ -876,6 +876,7 @@ var defaults = (obj, defaults2) => Object.keys(defaults2).concat(Object.keys(obj
876
876
  const pick = (obj, props) => props.reduce((selection, prop) => (typeof obj[prop] > "u" || (selection[prop] = obj[prop]), selection), {}), MAX_URL_LENGTH = 14800, possibleOptions = [
877
877
  "includePreviousRevision",
878
878
  "includeResult",
879
+ "includeMutations",
879
880
  "visibility",
880
881
  "effectFormat",
881
882
  "tag"
@@ -1547,7 +1548,7 @@ function defineDeprecatedCreateClient(createClient2) {
1547
1548
  return printNoDefaultExport(), createClient2(config);
1548
1549
  };
1549
1550
  }
1550
- var name = "@sanity/client", version = "6.21.0";
1551
+ var name = "@sanity/client", version = "6.21.1";
1551
1552
  const middleware = [
1552
1553
  middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
1553
1554
  middleware$1.headers({ "User-Agent": `${name} ${version}` }),