@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/README.md +5 -3
- package/dist/index.browser.d.cts +16 -2
- package/dist/index.browser.d.ts +16 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +16 -2
- package/dist/stega.browser.d.ts +16 -2
- package/dist/stega.d.cts +16 -2
- package/dist/stega.d.ts +16 -2
- package/package.json +1 -1
- package/src/index.ts +5 -1
- package/src/types.ts +18 -2
package/dist/stega.browser.d.cts
CHANGED
|
@@ -333,9 +333,18 @@ export declare interface ClientConfig {
|
|
|
333
333
|
/** @defaultValue true */
|
|
334
334
|
useCdn?: boolean
|
|
335
335
|
token?: string
|
|
336
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* What perspective to use for the client. See {@link https://www.sanity.io/docs/perspectives|perspective documentation}
|
|
338
|
+
* @remarks
|
|
339
|
+
* 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}
|
|
340
|
+
* @defaultValue 'published'
|
|
341
|
+
*/
|
|
337
342
|
perspective?: ClientPerspective
|
|
338
343
|
apiHost?: string
|
|
344
|
+
/**
|
|
345
|
+
@remarks
|
|
346
|
+
* 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}
|
|
347
|
+
*/
|
|
339
348
|
apiVersion?: string
|
|
340
349
|
proxy?: string
|
|
341
350
|
/**
|
|
@@ -1124,7 +1133,12 @@ export declare interface ListenOptions {
|
|
|
1124
1133
|
*/
|
|
1125
1134
|
includePreviousRevision?: boolean
|
|
1126
1135
|
/**
|
|
1127
|
-
*
|
|
1136
|
+
* Whether to include events for drafts and versions. As of API Version >= v2025-02-19, only events
|
|
1137
|
+
* for published documents will be included by default (see {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog})
|
|
1138
|
+
* If you need events from drafts and versions, set this to `true`.
|
|
1139
|
+
* Note: Keep in mind that additional document variants may be introduced in the future, so it's
|
|
1140
|
+
* recommended to respond to events in a way that's tolerant of potential future variants, e.g. by
|
|
1141
|
+
* explicitly checking whether the event is for a draft or a version.
|
|
1128
1142
|
* @defaultValue `false`
|
|
1129
1143
|
*/
|
|
1130
1144
|
includeAllVersions?: boolean
|
package/dist/stega.browser.d.ts
CHANGED
|
@@ -333,9 +333,18 @@ export declare interface ClientConfig {
|
|
|
333
333
|
/** @defaultValue true */
|
|
334
334
|
useCdn?: boolean
|
|
335
335
|
token?: string
|
|
336
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* What perspective to use for the client. See {@link https://www.sanity.io/docs/perspectives|perspective documentation}
|
|
338
|
+
* @remarks
|
|
339
|
+
* 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}
|
|
340
|
+
* @defaultValue 'published'
|
|
341
|
+
*/
|
|
337
342
|
perspective?: ClientPerspective
|
|
338
343
|
apiHost?: string
|
|
344
|
+
/**
|
|
345
|
+
@remarks
|
|
346
|
+
* 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}
|
|
347
|
+
*/
|
|
339
348
|
apiVersion?: string
|
|
340
349
|
proxy?: string
|
|
341
350
|
/**
|
|
@@ -1124,7 +1133,12 @@ export declare interface ListenOptions {
|
|
|
1124
1133
|
*/
|
|
1125
1134
|
includePreviousRevision?: boolean
|
|
1126
1135
|
/**
|
|
1127
|
-
*
|
|
1136
|
+
* Whether to include events for drafts and versions. As of API Version >= v2025-02-19, only events
|
|
1137
|
+
* for published documents will be included by default (see {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog})
|
|
1138
|
+
* If you need events from drafts and versions, set this to `true`.
|
|
1139
|
+
* Note: Keep in mind that additional document variants may be introduced in the future, so it's
|
|
1140
|
+
* recommended to respond to events in a way that's tolerant of potential future variants, e.g. by
|
|
1141
|
+
* explicitly checking whether the event is for a draft or a version.
|
|
1128
1142
|
* @defaultValue `false`
|
|
1129
1143
|
*/
|
|
1130
1144
|
includeAllVersions?: boolean
|
package/dist/stega.d.cts
CHANGED
|
@@ -333,9 +333,18 @@ export declare interface ClientConfig {
|
|
|
333
333
|
/** @defaultValue true */
|
|
334
334
|
useCdn?: boolean
|
|
335
335
|
token?: string
|
|
336
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* What perspective to use for the client. See {@link https://www.sanity.io/docs/perspectives|perspective documentation}
|
|
338
|
+
* @remarks
|
|
339
|
+
* 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}
|
|
340
|
+
* @defaultValue 'published'
|
|
341
|
+
*/
|
|
337
342
|
perspective?: ClientPerspective
|
|
338
343
|
apiHost?: string
|
|
344
|
+
/**
|
|
345
|
+
@remarks
|
|
346
|
+
* 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}
|
|
347
|
+
*/
|
|
339
348
|
apiVersion?: string
|
|
340
349
|
proxy?: string
|
|
341
350
|
/**
|
|
@@ -1124,7 +1133,12 @@ export declare interface ListenOptions {
|
|
|
1124
1133
|
*/
|
|
1125
1134
|
includePreviousRevision?: boolean
|
|
1126
1135
|
/**
|
|
1127
|
-
*
|
|
1136
|
+
* Whether to include events for drafts and versions. As of API Version >= v2025-02-19, only events
|
|
1137
|
+
* for published documents will be included by default (see {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog})
|
|
1138
|
+
* If you need events from drafts and versions, set this to `true`.
|
|
1139
|
+
* Note: Keep in mind that additional document variants may be introduced in the future, so it's
|
|
1140
|
+
* recommended to respond to events in a way that's tolerant of potential future variants, e.g. by
|
|
1141
|
+
* explicitly checking whether the event is for a draft or a version.
|
|
1128
1142
|
* @defaultValue `false`
|
|
1129
1143
|
*/
|
|
1130
1144
|
includeAllVersions?: boolean
|
package/dist/stega.d.ts
CHANGED
|
@@ -333,9 +333,18 @@ export declare interface ClientConfig {
|
|
|
333
333
|
/** @defaultValue true */
|
|
334
334
|
useCdn?: boolean
|
|
335
335
|
token?: string
|
|
336
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* What perspective to use for the client. See {@link https://www.sanity.io/docs/perspectives|perspective documentation}
|
|
338
|
+
* @remarks
|
|
339
|
+
* 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}
|
|
340
|
+
* @defaultValue 'published'
|
|
341
|
+
*/
|
|
337
342
|
perspective?: ClientPerspective
|
|
338
343
|
apiHost?: string
|
|
344
|
+
/**
|
|
345
|
+
@remarks
|
|
346
|
+
* 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}
|
|
347
|
+
*/
|
|
339
348
|
apiVersion?: string
|
|
340
349
|
proxy?: string
|
|
341
350
|
/**
|
|
@@ -1124,7 +1133,12 @@ export declare interface ListenOptions {
|
|
|
1124
1133
|
*/
|
|
1125
1134
|
includePreviousRevision?: boolean
|
|
1126
1135
|
/**
|
|
1127
|
-
*
|
|
1136
|
+
* Whether to include events for drafts and versions. As of API Version >= v2025-02-19, only events
|
|
1137
|
+
* for published documents will be included by default (see {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog})
|
|
1138
|
+
* If you need events from drafts and versions, set this to `true`.
|
|
1139
|
+
* Note: Keep in mind that additional document variants may be introduced in the future, so it's
|
|
1140
|
+
* recommended to respond to events in a way that's tolerant of potential future variants, e.g. by
|
|
1141
|
+
* explicitly checking whether the event is for a draft or a version.
|
|
1128
1142
|
* @defaultValue `false`
|
|
1129
1143
|
*/
|
|
1130
1144
|
includeAllVersions?: boolean
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -9,7 +9,11 @@ const exp = defineCreateClientExports<SanityClient, ClientConfig>(envMiddleware,
|
|
|
9
9
|
/** @public */
|
|
10
10
|
export const requester = exp.requester
|
|
11
11
|
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @remarks
|
|
14
|
+
* 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}
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
13
17
|
export const createClient = exp.createClient
|
|
14
18
|
|
|
15
19
|
/**
|
package/src/types.ts
CHANGED
|
@@ -60,9 +60,20 @@ export interface ClientConfig {
|
|
|
60
60
|
/** @defaultValue true */
|
|
61
61
|
useCdn?: boolean
|
|
62
62
|
token?: string
|
|
63
|
-
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* What perspective to use for the client. See {@link https://www.sanity.io/docs/perspectives|perspective documentation}
|
|
66
|
+
* @remarks
|
|
67
|
+
* 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}
|
|
68
|
+
* @defaultValue 'published'
|
|
69
|
+
*/
|
|
64
70
|
perspective?: ClientPerspective
|
|
65
71
|
apiHost?: string
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
@remarks
|
|
75
|
+
* 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}
|
|
76
|
+
*/
|
|
66
77
|
apiVersion?: string
|
|
67
78
|
proxy?: string
|
|
68
79
|
|
|
@@ -932,7 +943,12 @@ export interface ListenOptions {
|
|
|
932
943
|
includePreviousRevision?: boolean
|
|
933
944
|
|
|
934
945
|
/**
|
|
935
|
-
*
|
|
946
|
+
* Whether to include events for drafts and versions. As of API Version >= v2025-02-19, only events
|
|
947
|
+
* for published documents will be included by default (see {@link https://www.sanity.io/changelog/e93a2d5a-9cee-4801-829e-8d3394bfed85|Changelog})
|
|
948
|
+
* If you need events from drafts and versions, set this to `true`.
|
|
949
|
+
* Note: Keep in mind that additional document variants may be introduced in the future, so it's
|
|
950
|
+
* recommended to respond to events in a way that's tolerant of potential future variants, e.g. by
|
|
951
|
+
* explicitly checking whether the event is for a draft or a version.
|
|
936
952
|
* @defaultValue `false`
|
|
937
953
|
*/
|
|
938
954
|
includeAllVersions?: boolean
|