@sanity/client 6.24.0 → 6.24.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.d.cts CHANGED
@@ -3143,7 +3143,9 @@ export declare class UsersClient {
3143
3143
  /**
3144
3144
  * @internal - it may have breaking changes in any release
3145
3145
  */
3146
- export declare const validateApiPerspective: (perspective: unknown) => void
3146
+ export declare function validateApiPerspective(
3147
+ perspective: unknown,
3148
+ ): asserts perspective is ClientPerspective
3147
3149
 
3148
3150
  /**
3149
3151
  * The listener has been established, and will start receiving events.
package/dist/index.d.ts CHANGED
@@ -3143,7 +3143,9 @@ export declare class UsersClient {
3143
3143
  /**
3144
3144
  * @internal - it may have breaking changes in any release
3145
3145
  */
3146
- export declare const validateApiPerspective: (perspective: unknown) => void
3146
+ export declare function validateApiPerspective(
3147
+ perspective: unknown,
3148
+ ): asserts perspective is ClientPerspective
3147
3149
 
3148
3150
  /**
3149
3151
  * The listener has been established, and will start receiving events.
package/dist/index.js CHANGED
@@ -191,7 +191,7 @@ function validateApiVersion(apiVersion) {
191
191
  if (!(/^\d{4}-\d{2}-\d{2}$/.test(apiVersion) && apiDate instanceof Date && apiDate.getTime() > 0))
192
192
  throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`");
193
193
  }
194
- const validateApiPerspective = function(perspective) {
194
+ function validateApiPerspective(perspective) {
195
195
  if (Array.isArray(perspective)) {
196
196
  for (const perspectiveValue of perspective)
197
197
  if (perspectiveValue !== "published" && perspectiveValue !== "drafts" && !(typeof perspectiveValue == "string" && perspectiveValue.startsWith("r") && perspectiveValue !== "raw"))
@@ -211,7 +211,8 @@ const validateApiPerspective = function(perspective) {
211
211
  "Invalid API perspective string, expected `published`, `previewDrafts` or `raw`"
212
212
  );
213
213
  }
214
- }, initConfig = (config, prevConfig) => {
214
+ }
215
+ const initConfig = (config, prevConfig) => {
215
216
  const specifiedConfig = {
216
217
  ...prevConfig,
217
218
  ...config,
@@ -1564,7 +1565,7 @@ function defineDeprecatedCreateClient(createClient2) {
1564
1565
  return printNoDefaultExport(), createClient2(config);
1565
1566
  };
1566
1567
  }
1567
- var name = "@sanity/client", version = "6.24.0";
1568
+ var name = "@sanity/client", version = "6.24.1";
1568
1569
  const middleware = [
1569
1570
  debug({ verbose: !0, namespace: "sanity:client" }),
1570
1571
  headers({ "User-Agent": `${name} ${version}` }),