@sanity/client 7.8.1 → 7.8.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 +17 -16
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +29 -2
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +29 -2
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +21 -10
- package/dist/index.browser.d.ts +21 -10
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -10
- package/dist/index.d.ts +6 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +5 -10
- package/dist/stega.browser.d.ts +5 -10
- package/dist/stega.d.cts +5 -10
- package/dist/stega.d.ts +5 -10
- package/package.json +1 -1
- package/src/agent/actions/commonTypes.ts +3 -0
- package/src/agent/actions/prompt.ts +4 -10
- package/src/stega/filterDefault.ts +30 -2
- package/umd/sanityClient.js +29 -2
- package/umd/sanityClient.min.js +2 -2
package/dist/index.browser.d.cts
CHANGED
|
@@ -798,6 +798,14 @@ export declare type ClientPerspective =
|
|
|
798
798
|
| 'raw'
|
|
799
799
|
| StackablePerspective[]
|
|
800
800
|
|
|
801
|
+
/** @public */
|
|
802
|
+
declare type ClientPerspective_2 =
|
|
803
|
+
| DeprecatedPreviewDrafts_2
|
|
804
|
+
| 'published'
|
|
805
|
+
| 'drafts'
|
|
806
|
+
| 'raw'
|
|
807
|
+
| StackablePerspective_2[]
|
|
808
|
+
|
|
801
809
|
/** @public */
|
|
802
810
|
export declare type ClientReturn<
|
|
803
811
|
GroqString extends string,
|
|
@@ -1147,6 +1155,11 @@ export default deprecatedCreateClient
|
|
|
1147
1155
|
*/
|
|
1148
1156
|
declare type DeprecatedPreviewDrafts = 'previewDrafts'
|
|
1149
1157
|
|
|
1158
|
+
/**
|
|
1159
|
+
* @deprecated use 'drafts' instead
|
|
1160
|
+
*/
|
|
1161
|
+
declare type DeprecatedPreviewDrafts_2 = 'previewDrafts'
|
|
1162
|
+
|
|
1150
1163
|
/**
|
|
1151
1164
|
* Delete the draft version of a document.
|
|
1152
1165
|
* It is an error if it does not exist. If the purge flag is set, the document history is also deleted.
|
|
@@ -1745,6 +1758,7 @@ export declare interface GroqAgentActionParam {
|
|
|
1745
1758
|
type: 'groq'
|
|
1746
1759
|
query: string
|
|
1747
1760
|
params?: Record<string, string>
|
|
1761
|
+
perspective?: ClientPerspective_2
|
|
1748
1762
|
}
|
|
1749
1763
|
|
|
1750
1764
|
/**
|
|
@@ -3822,10 +3836,8 @@ export declare class ProjectsClient {
|
|
|
3822
3836
|
declare interface PromptJsonResponse<T extends Record<string, Any> = Record<string, Any>> {
|
|
3823
3837
|
/**
|
|
3824
3838
|
*
|
|
3825
|
-
* When
|
|
3826
|
-
*
|
|
3827
|
-
*
|
|
3828
|
-
* Note: In addition to setting this to true, `instruction` MUST include the word 'JSON', or 'json' for this to work.
|
|
3839
|
+
* When format is 'json', the response will be json according to the instruction.
|
|
3840
|
+
* Note: In addition to setting this to 'json', `instruction` MUST include the word 'JSON', or 'json' for this to work.
|
|
3829
3841
|
*/
|
|
3830
3842
|
format: 'json'
|
|
3831
3843
|
}
|
|
@@ -3932,13 +3944,9 @@ declare interface PromptRequestBase {
|
|
|
3932
3944
|
|
|
3933
3945
|
declare interface PromptTextResponse {
|
|
3934
3946
|
/**
|
|
3935
|
-
*
|
|
3936
|
-
* When true, the response body will be json according to the instruction.
|
|
3937
|
-
* When false, the response is the raw text response to the instruction.
|
|
3938
|
-
*
|
|
3939
|
-
* Note: In addition to setting this to true, `instruction` MUST include the word 'JSON', or 'json' for this to work.
|
|
3947
|
+
* When format is 'string', the response will be a raw text response to the instruction.
|
|
3940
3948
|
*/
|
|
3941
|
-
format?: '
|
|
3949
|
+
format?: 'string'
|
|
3942
3950
|
}
|
|
3943
3951
|
|
|
3944
3952
|
/**
|
|
@@ -5490,6 +5498,9 @@ export declare interface SingleMutationResult {
|
|
|
5490
5498
|
/** @public */
|
|
5491
5499
|
export declare type StackablePerspective = ('published' | 'drafts' | string) & {}
|
|
5492
5500
|
|
|
5501
|
+
/** @public */
|
|
5502
|
+
declare type StackablePerspective_2 = ('published' | 'drafts' | string) & {}
|
|
5503
|
+
|
|
5493
5504
|
/** @public */
|
|
5494
5505
|
export declare interface StegaConfig {
|
|
5495
5506
|
/**
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -798,6 +798,14 @@ export declare type ClientPerspective =
|
|
|
798
798
|
| 'raw'
|
|
799
799
|
| StackablePerspective[]
|
|
800
800
|
|
|
801
|
+
/** @public */
|
|
802
|
+
declare type ClientPerspective_2 =
|
|
803
|
+
| DeprecatedPreviewDrafts_2
|
|
804
|
+
| 'published'
|
|
805
|
+
| 'drafts'
|
|
806
|
+
| 'raw'
|
|
807
|
+
| StackablePerspective_2[]
|
|
808
|
+
|
|
801
809
|
/** @public */
|
|
802
810
|
export declare type ClientReturn<
|
|
803
811
|
GroqString extends string,
|
|
@@ -1147,6 +1155,11 @@ export default deprecatedCreateClient
|
|
|
1147
1155
|
*/
|
|
1148
1156
|
declare type DeprecatedPreviewDrafts = 'previewDrafts'
|
|
1149
1157
|
|
|
1158
|
+
/**
|
|
1159
|
+
* @deprecated use 'drafts' instead
|
|
1160
|
+
*/
|
|
1161
|
+
declare type DeprecatedPreviewDrafts_2 = 'previewDrafts'
|
|
1162
|
+
|
|
1150
1163
|
/**
|
|
1151
1164
|
* Delete the draft version of a document.
|
|
1152
1165
|
* It is an error if it does not exist. If the purge flag is set, the document history is also deleted.
|
|
@@ -1745,6 +1758,7 @@ export declare interface GroqAgentActionParam {
|
|
|
1745
1758
|
type: 'groq'
|
|
1746
1759
|
query: string
|
|
1747
1760
|
params?: Record<string, string>
|
|
1761
|
+
perspective?: ClientPerspective_2
|
|
1748
1762
|
}
|
|
1749
1763
|
|
|
1750
1764
|
/**
|
|
@@ -3822,10 +3836,8 @@ export declare class ProjectsClient {
|
|
|
3822
3836
|
declare interface PromptJsonResponse<T extends Record<string, Any> = Record<string, Any>> {
|
|
3823
3837
|
/**
|
|
3824
3838
|
*
|
|
3825
|
-
* When
|
|
3826
|
-
*
|
|
3827
|
-
*
|
|
3828
|
-
* Note: In addition to setting this to true, `instruction` MUST include the word 'JSON', or 'json' for this to work.
|
|
3839
|
+
* When format is 'json', the response will be json according to the instruction.
|
|
3840
|
+
* Note: In addition to setting this to 'json', `instruction` MUST include the word 'JSON', or 'json' for this to work.
|
|
3829
3841
|
*/
|
|
3830
3842
|
format: 'json'
|
|
3831
3843
|
}
|
|
@@ -3932,13 +3944,9 @@ declare interface PromptRequestBase {
|
|
|
3932
3944
|
|
|
3933
3945
|
declare interface PromptTextResponse {
|
|
3934
3946
|
/**
|
|
3935
|
-
*
|
|
3936
|
-
* When true, the response body will be json according to the instruction.
|
|
3937
|
-
* When false, the response is the raw text response to the instruction.
|
|
3938
|
-
*
|
|
3939
|
-
* Note: In addition to setting this to true, `instruction` MUST include the word 'JSON', or 'json' for this to work.
|
|
3947
|
+
* When format is 'string', the response will be a raw text response to the instruction.
|
|
3940
3948
|
*/
|
|
3941
|
-
format?: '
|
|
3949
|
+
format?: 'string'
|
|
3942
3950
|
}
|
|
3943
3951
|
|
|
3944
3952
|
/**
|
|
@@ -5490,6 +5498,9 @@ export declare interface SingleMutationResult {
|
|
|
5490
5498
|
/** @public */
|
|
5491
5499
|
export declare type StackablePerspective = ('published' | 'drafts' | string) & {}
|
|
5492
5500
|
|
|
5501
|
+
/** @public */
|
|
5502
|
+
declare type StackablePerspective_2 = ('published' | 'drafts' | string) & {}
|
|
5503
|
+
|
|
5493
5504
|
/** @public */
|
|
5494
5505
|
export declare interface StegaConfig {
|
|
5495
5506
|
/**
|