@sanity/client 6.28.0 → 6.28.2
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 +23 -9
- package/dist/index.browser.d.ts +23 -9
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -10
- package/dist/index.d.ts +28 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +23 -9
- package/dist/stega.browser.d.ts +23 -9
- package/dist/stega.d.cts +23 -9
- package/dist/stega.d.ts +23 -9
- package/package.json +1 -1
- package/src/index.ts +5 -1
- package/src/types.ts +25 -9
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
|
-
/**
|
|
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,10 +571,14 @@ export declare type CreateAction = {
|
|
|
562
571
|
ifExists: 'fail' | 'ignore'
|
|
563
572
|
}
|
|
564
573
|
|
|
565
|
-
/**
|
|
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
|
+
/** @public */
|
|
569
582
|
export declare interface CurrentSanityUser {
|
|
570
583
|
id: string
|
|
571
584
|
name: string
|
|
@@ -574,10 +587,10 @@ export declare interface CurrentSanityUser {
|
|
|
574
587
|
role: string
|
|
575
588
|
}
|
|
576
589
|
|
|
577
|
-
/** @
|
|
590
|
+
/** @public */
|
|
578
591
|
export declare type DatasetAclMode = 'public' | 'private' | 'custom'
|
|
579
592
|
|
|
580
|
-
/** @
|
|
593
|
+
/** @public */
|
|
581
594
|
export declare type DatasetResponse = {
|
|
582
595
|
datasetName: string
|
|
583
596
|
aclMode: DatasetAclMode
|
|
@@ -625,7 +638,7 @@ export declare class DatasetsClient {
|
|
|
625
638
|
list(): Promise<DatasetsResponse>
|
|
626
639
|
}
|
|
627
640
|
|
|
628
|
-
/** @
|
|
641
|
+
/** @public */
|
|
629
642
|
export declare type DatasetsResponse = {
|
|
630
643
|
name: string
|
|
631
644
|
aclMode: DatasetAclMode
|
|
@@ -954,7 +967,12 @@ export declare interface ListenOptions {
|
|
|
954
967
|
*/
|
|
955
968
|
includePreviousRevision?: boolean
|
|
956
969
|
/**
|
|
957
|
-
*
|
|
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
|
|
@@ -2916,7 +2934,7 @@ export declare interface SanityImagePalette {
|
|
|
2916
2934
|
title: string
|
|
2917
2935
|
}
|
|
2918
2936
|
|
|
2919
|
-
/** @
|
|
2937
|
+
/** @public */
|
|
2920
2938
|
export declare interface SanityProject {
|
|
2921
2939
|
id: string
|
|
2922
2940
|
displayName: string
|
|
@@ -2944,7 +2962,7 @@ export declare interface SanityProject {
|
|
|
2944
2962
|
}
|
|
2945
2963
|
}
|
|
2946
2964
|
|
|
2947
|
-
/** @
|
|
2965
|
+
/** @public */
|
|
2948
2966
|
export declare interface SanityProjectMember {
|
|
2949
2967
|
id: string
|
|
2950
2968
|
role: string
|
|
@@ -2960,7 +2978,7 @@ export declare interface SanityReference {
|
|
|
2960
2978
|
_ref: string
|
|
2961
2979
|
}
|
|
2962
2980
|
|
|
2963
|
-
/** @
|
|
2981
|
+
/** @public */
|
|
2964
2982
|
export declare interface SanityUser {
|
|
2965
2983
|
id: string
|
|
2966
2984
|
projectId: string
|
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
|
-
/**
|
|
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,10 +571,14 @@ export declare type CreateAction = {
|
|
|
562
571
|
ifExists: 'fail' | 'ignore'
|
|
563
572
|
}
|
|
564
573
|
|
|
565
|
-
/**
|
|
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
|
+
/** @public */
|
|
569
582
|
export declare interface CurrentSanityUser {
|
|
570
583
|
id: string
|
|
571
584
|
name: string
|
|
@@ -574,10 +587,10 @@ export declare interface CurrentSanityUser {
|
|
|
574
587
|
role: string
|
|
575
588
|
}
|
|
576
589
|
|
|
577
|
-
/** @
|
|
590
|
+
/** @public */
|
|
578
591
|
export declare type DatasetAclMode = 'public' | 'private' | 'custom'
|
|
579
592
|
|
|
580
|
-
/** @
|
|
593
|
+
/** @public */
|
|
581
594
|
export declare type DatasetResponse = {
|
|
582
595
|
datasetName: string
|
|
583
596
|
aclMode: DatasetAclMode
|
|
@@ -625,7 +638,7 @@ export declare class DatasetsClient {
|
|
|
625
638
|
list(): Promise<DatasetsResponse>
|
|
626
639
|
}
|
|
627
640
|
|
|
628
|
-
/** @
|
|
641
|
+
/** @public */
|
|
629
642
|
export declare type DatasetsResponse = {
|
|
630
643
|
name: string
|
|
631
644
|
aclMode: DatasetAclMode
|
|
@@ -954,7 +967,12 @@ export declare interface ListenOptions {
|
|
|
954
967
|
*/
|
|
955
968
|
includePreviousRevision?: boolean
|
|
956
969
|
/**
|
|
957
|
-
*
|
|
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
|
|
@@ -2916,7 +2934,7 @@ export declare interface SanityImagePalette {
|
|
|
2916
2934
|
title: string
|
|
2917
2935
|
}
|
|
2918
2936
|
|
|
2919
|
-
/** @
|
|
2937
|
+
/** @public */
|
|
2920
2938
|
export declare interface SanityProject {
|
|
2921
2939
|
id: string
|
|
2922
2940
|
displayName: string
|
|
@@ -2944,7 +2962,7 @@ export declare interface SanityProject {
|
|
|
2944
2962
|
}
|
|
2945
2963
|
}
|
|
2946
2964
|
|
|
2947
|
-
/** @
|
|
2965
|
+
/** @public */
|
|
2948
2966
|
export declare interface SanityProjectMember {
|
|
2949
2967
|
id: string
|
|
2950
2968
|
role: string
|
|
@@ -2960,7 +2978,7 @@ export declare interface SanityReference {
|
|
|
2960
2978
|
_ref: string
|
|
2961
2979
|
}
|
|
2962
2980
|
|
|
2963
|
-
/** @
|
|
2981
|
+
/** @public */
|
|
2964
2982
|
export declare interface SanityUser {
|
|
2965
2983
|
id: string
|
|
2966
2984
|
projectId: string
|
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.
|
|
1511
|
+
var name = "@sanity/client", version = "6.28.2";
|
|
1512
1512
|
const middleware = [
|
|
1513
1513
|
debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1514
1514
|
headers({ "User-Agent": `${name} ${version}` }),
|