@sanity/client 6.28.0 → 6.28.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
@@ -339,9 +339,18 @@ export declare interface ClientConfig {
339
339
  /** @defaultValue true */
340
340
  useCdn?: boolean
341
341
  token?: string
342
- /** @defaultValue 'raw' */
342
+ /**
343
+ * What perspective to use for the client. See {@link https://www.sanity.io/docs/perspectives|perspective documentation}
344
+ * @remarks
345
+ * As of API version `v2025-02-19`, the default perspective has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog}
346
+ * @defaultValue 'published'
347
+ */
343
348
  perspective?: ClientPerspective
344
349
  apiHost?: string
350
+ /**
351
+ @remarks
352
+ * As of API version `v2025-02-19`, the default perspective has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog}
353
+ */
345
354
  apiVersion?: string
346
355
  proxy?: string
347
356
  /**
@@ -562,7 +571,11 @@ export declare type CreateAction = {
562
571
  ifExists: 'fail' | 'ignore'
563
572
  }
564
573
 
565
- /** @public */
574
+ /**
575
+ * @remarks
576
+ * As of API version `v2025-02-19`, the default perspective used by the client has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog}
577
+ * @public
578
+ */
566
579
  export declare const createClient: (config: ClientConfig) => SanityClient
567
580
 
568
581
  /** @internal */
@@ -954,7 +967,12 @@ export declare interface ListenOptions {
954
967
  */
955
968
  includePreviousRevision?: boolean
956
969
  /**
957
- * @internal
970
+ * Whether to include events for drafts and versions. As of API Version >= v2025-02-19, only events
971
+ * for published documents will be included by default (see {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog})
972
+ * If you need events from drafts and versions, set this to `true`.
973
+ * Note: Keep in mind that additional document variants may be introduced in the future, so it's
974
+ * recommended to respond to events in a way that's tolerant of potential future variants, e.g. by
975
+ * explicitly checking whether the event is for a draft or a version.
958
976
  * @defaultValue `false`
959
977
  */
960
978
  includeAllVersions?: boolean
package/dist/index.d.ts CHANGED
@@ -339,9 +339,18 @@ export declare interface ClientConfig {
339
339
  /** @defaultValue true */
340
340
  useCdn?: boolean
341
341
  token?: string
342
- /** @defaultValue 'raw' */
342
+ /**
343
+ * What perspective to use for the client. See {@link https://www.sanity.io/docs/perspectives|perspective documentation}
344
+ * @remarks
345
+ * As of API version `v2025-02-19`, the default perspective has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog}
346
+ * @defaultValue 'published'
347
+ */
343
348
  perspective?: ClientPerspective
344
349
  apiHost?: string
350
+ /**
351
+ @remarks
352
+ * As of API version `v2025-02-19`, the default perspective has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog}
353
+ */
345
354
  apiVersion?: string
346
355
  proxy?: string
347
356
  /**
@@ -562,7 +571,11 @@ export declare type CreateAction = {
562
571
  ifExists: 'fail' | 'ignore'
563
572
  }
564
573
 
565
- /** @public */
574
+ /**
575
+ * @remarks
576
+ * As of API version `v2025-02-19`, the default perspective used by the client has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog}
577
+ * @public
578
+ */
566
579
  export declare const createClient: (config: ClientConfig) => SanityClient
567
580
 
568
581
  /** @internal */
@@ -954,7 +967,12 @@ export declare interface ListenOptions {
954
967
  */
955
968
  includePreviousRevision?: boolean
956
969
  /**
957
- * @internal
970
+ * Whether to include events for drafts and versions. As of API Version >= v2025-02-19, only events
971
+ * for published documents will be included by default (see {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog})
972
+ * If you need events from drafts and versions, set this to `true`.
973
+ * Note: Keep in mind that additional document variants may be introduced in the future, so it's
974
+ * recommended to respond to events in a way that's tolerant of potential future variants, e.g. by
975
+ * explicitly checking whether the event is for a draft or a version.
958
976
  * @defaultValue `false`
959
977
  */
960
978
  includeAllVersions?: boolean
package/dist/index.js CHANGED
@@ -1508,7 +1508,7 @@ function defineDeprecatedCreateClient(createClient2) {
1508
1508
  return printNoDefaultExport(), createClient2(config);
1509
1509
  };
1510
1510
  }
1511
- var name = "@sanity/client", version = "6.28.0";
1511
+ var name = "@sanity/client", version = "6.28.1";
1512
1512
  const middleware = [
1513
1513
  debug({ verbose: !0, namespace: "sanity:client" }),
1514
1514
  headers({ "User-Agent": `${name} ${version}` }),