@sanity/client 7.26.1 → 7.26.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/dist/_chunks-cjs/resolveEditInfo.cjs +4 -4
- package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +3 -3
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
- package/dist/_chunks-es/resolveEditInfo.js +4 -4
- package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +3 -3
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
- package/dist/csm.cjs.map +1 -1
- package/dist/csm.d.cts +5 -17
- package/dist/csm.d.ts +5 -17
- package/dist/csm.js.map +1 -1
- package/dist/index.browser.cjs +1 -1
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +23 -62
- package/dist/index.browser.d.ts +23 -62
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -57
- package/dist/index.d.ts +22 -57
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +26 -68
- package/dist/stega.browser.d.ts +26 -68
- package/dist/stega.d.cts +26 -68
- package/dist/stega.d.ts +26 -68
- package/package.json +31 -31
- package/src/agent/actions/commonTypes.ts +1 -2
- package/src/agent/actions/generate.ts +3 -6
- package/src/agent/actions/patch.ts +3 -6
- package/src/agent/actions/prompt.ts +1 -2
- package/src/agent/actions/transform.ts +1 -2
- package/src/agent/actions/translate.ts +1 -2
- package/src/csm/applySourceDocuments.ts +1 -3
- package/src/csm/types.ts +1 -3
- package/src/data/listen.ts +1 -2
- package/src/releases/ReleasesClient.ts +2 -4
- package/src/stega/types.ts +1 -2
- package/src/types.ts +9 -38
- package/umd/sanityClient.js +21 -14
- package/umd/sanityClient.min.js +2 -2
package/dist/stega.d.cts
CHANGED
|
@@ -417,14 +417,7 @@ export declare interface ArchiveReleaseAction {
|
|
|
417
417
|
|
|
418
418
|
/** @public */
|
|
419
419
|
export declare type AssetMetadataType =
|
|
420
|
-
| '
|
|
421
|
-
| 'exif'
|
|
422
|
-
| 'image'
|
|
423
|
-
| 'palette'
|
|
424
|
-
| 'lqip'
|
|
425
|
-
| 'blurhash'
|
|
426
|
-
| 'thumbhash'
|
|
427
|
-
| 'none'
|
|
420
|
+
'location' | 'exif' | 'image' | 'palette' | 'lqip' | 'blurhash' | 'thumbhash' | 'none'
|
|
428
421
|
|
|
429
422
|
/** @internal */
|
|
430
423
|
export declare class AssetsClient {
|
|
@@ -866,11 +859,7 @@ export declare class ClientError extends Error {
|
|
|
866
859
|
|
|
867
860
|
/** @public */
|
|
868
861
|
export declare type ClientPerspective =
|
|
869
|
-
|
|
|
870
|
-
| 'published'
|
|
871
|
-
| 'drafts'
|
|
872
|
-
| 'raw'
|
|
873
|
-
| StackablePerspective[]
|
|
862
|
+
DeprecatedPreviewDrafts | 'published' | 'drafts' | 'raw' | StackablePerspective[]
|
|
874
863
|
|
|
875
864
|
/** @public */
|
|
876
865
|
export declare type ClientReturn<
|
|
@@ -1041,14 +1030,12 @@ declare interface ContentSourceMapDocumentBase_2 {
|
|
|
1041
1030
|
|
|
1042
1031
|
/** @public */
|
|
1043
1032
|
export declare type ContentSourceMapDocuments = (
|
|
1044
|
-
|
|
|
1045
|
-
| ContentSourceMapRemoteDocument
|
|
1033
|
+
ContentSourceMapDocument | ContentSourceMapRemoteDocument
|
|
1046
1034
|
)[]
|
|
1047
1035
|
|
|
1048
1036
|
/** @public */
|
|
1049
1037
|
declare type ContentSourceMapDocuments_2 = (
|
|
1050
|
-
|
|
|
1051
|
-
| ContentSourceMapRemoteDocument_2
|
|
1038
|
+
ContentSourceMapDocument_2 | ContentSourceMapRemoteDocument_2
|
|
1052
1039
|
)[]
|
|
1053
1040
|
|
|
1054
1041
|
/**
|
|
@@ -1101,9 +1088,7 @@ declare type ContentSourceMapMappings_2 = Record<string, ContentSourceMapMapping
|
|
|
1101
1088
|
|
|
1102
1089
|
/** @alpha */
|
|
1103
1090
|
export declare type ContentSourceMapParsedPath = (
|
|
1104
|
-
|
|
|
1105
|
-
| number
|
|
1106
|
-
| ContentSourceMapParsedPathKeyedSegment
|
|
1091
|
+
string | number | ContentSourceMapParsedPathKeyedSegment
|
|
1107
1092
|
)[]
|
|
1108
1093
|
|
|
1109
1094
|
/** @alpha */
|
|
@@ -1120,8 +1105,7 @@ declare type ContentSourceMapPaths_2 = string[]
|
|
|
1120
1105
|
|
|
1121
1106
|
/** @public */
|
|
1122
1107
|
export declare type ContentSourceMapQueryResponse =
|
|
1123
|
-
| RawQueryResponse<unknown>
|
|
1124
|
-
| Pick<RawQueryResponse<unknown>, 'result' | 'resultSourceMap'>
|
|
1108
|
+
RawQueryResponse<unknown> | Pick<RawQueryResponse<unknown>, 'result' | 'resultSourceMap'>
|
|
1125
1109
|
|
|
1126
1110
|
/** @public */
|
|
1127
1111
|
export declare interface ContentSourceMapRemoteDocument extends ContentSourceMapDocumentBase {
|
|
@@ -1775,8 +1759,7 @@ export declare function formatQueryParseError(
|
|
|
1775
1759
|
|
|
1776
1760
|
/** @beta */
|
|
1777
1761
|
declare type GenerateAsyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1778
|
-
|
|
|
1779
|
-
| GenerateTargetDocumentRequest<T>
|
|
1762
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1780
1763
|
) &
|
|
1781
1764
|
GenerateRequestBase &
|
|
1782
1765
|
AgentActionAsync
|
|
@@ -1795,8 +1778,7 @@ declare interface GenerateExistingDocumentRequest {
|
|
|
1795
1778
|
|
|
1796
1779
|
/** @beta */
|
|
1797
1780
|
export declare type GenerateInstruction<T extends Record<string, Any> = Record<string, Any>> =
|
|
1798
|
-
|
|
|
1799
|
-
| GenerateAsyncInstruction<T>
|
|
1781
|
+
GenerateSyncInstruction<T> | GenerateAsyncInstruction<T>
|
|
1800
1782
|
|
|
1801
1783
|
/** @beta */
|
|
1802
1784
|
export declare type GenerateOperation = 'set' | 'append' | 'mixed'
|
|
@@ -1927,8 +1909,7 @@ declare interface GenerateRequestBase extends AgentActionRequestBase {
|
|
|
1927
1909
|
|
|
1928
1910
|
/** @beta */
|
|
1929
1911
|
declare type GenerateSyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1930
|
-
|
|
|
1931
|
-
| GenerateTargetDocumentRequest<T>
|
|
1912
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1932
1913
|
) &
|
|
1933
1914
|
GenerateRequestBase &
|
|
1934
1915
|
AgentActionSync
|
|
@@ -2275,12 +2256,7 @@ export declare function _listen<
|
|
|
2275
2256
|
|
|
2276
2257
|
/** @public */
|
|
2277
2258
|
export declare type ListenEvent<R extends Record<string, Any> = Record<string, Any>> =
|
|
2278
|
-
|
|
2279
|
-
| ReconnectEvent
|
|
2280
|
-
| WelcomeBackEvent
|
|
2281
|
-
| ResetEvent
|
|
2282
|
-
| WelcomeEvent
|
|
2283
|
-
| OpenEvent
|
|
2259
|
+
MutationEvent<R> | ReconnectEvent | WelcomeBackEvent | ResetEvent | WelcomeEvent | OpenEvent
|
|
2284
2260
|
|
|
2285
2261
|
/**
|
|
2286
2262
|
* Maps a ListenOptions object and returns the Listen events opted for, e.g:
|
|
@@ -2420,11 +2396,7 @@ export declare class LiveClient {
|
|
|
2420
2396
|
|
|
2421
2397
|
/** @public */
|
|
2422
2398
|
export declare type LiveEvent =
|
|
2423
|
-
|
|
|
2424
|
-
| LiveEventReconnect
|
|
2425
|
-
| LiveEventMessage
|
|
2426
|
-
| LiveEventWelcome
|
|
2427
|
-
| LiveEventGoAway
|
|
2399
|
+
LiveEventRestart | LiveEventReconnect | LiveEventMessage | LiveEventWelcome | LiveEventGoAway
|
|
2428
2400
|
|
|
2429
2401
|
/**
|
|
2430
2402
|
* The `id` field is the position at which the connection was rejected or closed.
|
|
@@ -2486,8 +2458,7 @@ declare type Logger_2 =
|
|
|
2486
2458
|
declare type MapListenEventNamesToListenEvents<
|
|
2487
2459
|
R extends Record<string, Any> = Record<string, Any>,
|
|
2488
2460
|
Events extends (ResumableListenEventNames | ListenEventName)[] = (
|
|
2489
|
-
|
|
|
2490
|
-
| ListenEventName
|
|
2461
|
+
ResumableListenEventNames | ListenEventName
|
|
2491
2462
|
)[],
|
|
2492
2463
|
> = Events extends (infer E)[]
|
|
2493
2464
|
? E extends 'welcome'
|
|
@@ -4214,21 +4185,18 @@ export declare type PatchBuilder = (patch: Patch) => Patch
|
|
|
4214
4185
|
|
|
4215
4186
|
/** @beta */
|
|
4216
4187
|
export declare type PatchDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
4217
|
-
|
|
|
4218
|
-
| PatchDocumentAsync<T>
|
|
4188
|
+
PatchDocumentSync<T> | PatchDocumentAsync<T>
|
|
4219
4189
|
|
|
4220
4190
|
/** @beta */
|
|
4221
4191
|
declare type PatchDocumentAsync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4222
|
-
|
|
|
4223
|
-
| PatchTargetDocumentRequest<T>
|
|
4192
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4224
4193
|
) &
|
|
4225
4194
|
PatchRequestBase &
|
|
4226
4195
|
AgentActionAsync
|
|
4227
4196
|
|
|
4228
4197
|
/** @beta */
|
|
4229
4198
|
declare type PatchDocumentSync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4230
|
-
|
|
|
4231
|
-
| PatchTargetDocumentRequest<T>
|
|
4199
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4232
4200
|
) &
|
|
4233
4201
|
PatchRequestBase &
|
|
4234
4202
|
AgentActionSync
|
|
@@ -4394,8 +4362,7 @@ declare interface PromptJsonResponse<T extends Record<string, Any> = Record<stri
|
|
|
4394
4362
|
|
|
4395
4363
|
/** @beta */
|
|
4396
4364
|
export declare type PromptRequest<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4397
|
-
|
|
|
4398
|
-
| PromptJsonResponse<T>
|
|
4365
|
+
PromptTextResponse | PromptJsonResponse<T>
|
|
4399
4366
|
) &
|
|
4400
4367
|
PromptRequestBase
|
|
4401
4368
|
|
|
@@ -4540,9 +4507,7 @@ export declare interface PublishReleaseAction {
|
|
|
4540
4507
|
|
|
4541
4508
|
/** @public */
|
|
4542
4509
|
export declare type QueryOptions =
|
|
4543
|
-
|
|
|
4544
|
-
| UnfilteredResponseQueryOptions
|
|
4545
|
-
| UnfilteredResponseWithoutQuery
|
|
4510
|
+
FilteredResponseQueryOptions | UnfilteredResponseQueryOptions | UnfilteredResponseWithoutQuery
|
|
4546
4511
|
|
|
4547
4512
|
/** @public */
|
|
4548
4513
|
export declare interface QueryParams {
|
|
@@ -5185,8 +5150,10 @@ export declare type ResumableListenEventNames =
|
|
|
5185
5150
|
| 'reset'
|
|
5186
5151
|
|
|
5187
5152
|
/** @public */
|
|
5188
|
-
export declare interface ResumableListenOptions
|
|
5189
|
-
|
|
5153
|
+
export declare interface ResumableListenOptions extends Omit<
|
|
5154
|
+
ListenOptions,
|
|
5155
|
+
'events' | 'enableResume'
|
|
5156
|
+
> {
|
|
5190
5157
|
/**
|
|
5191
5158
|
* If this is enabled, the client will normally resume events upon reconnect
|
|
5192
5159
|
* Note that you should also subscribe to `reset`-events and handle the case where the backend is unable to resume
|
|
@@ -6428,10 +6395,7 @@ export declare type StudioBaseRoute = {
|
|
|
6428
6395
|
|
|
6429
6396
|
/** @alpha */
|
|
6430
6397
|
export declare type StudioBaseUrl =
|
|
6431
|
-
|
|
|
6432
|
-
| `${string}.sanity.studio`
|
|
6433
|
-
| `https://${string}`
|
|
6434
|
-
| string
|
|
6398
|
+
`/${string}` | `${string}.sanity.studio` | `https://${string}` | string
|
|
6435
6399
|
|
|
6436
6400
|
/** @alpha */
|
|
6437
6401
|
export declare type StudioUrl = StudioBaseUrl | StudioBaseRoute
|
|
@@ -6555,8 +6519,7 @@ export declare type TransactionMutationOptions =
|
|
|
6555
6519
|
|
|
6556
6520
|
/** @beta */
|
|
6557
6521
|
export declare type TransformDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6558
|
-
|
|
6559
|
-
| TransformDocumentAsync
|
|
6522
|
+
TransformDocumentSync<T> | TransformDocumentAsync
|
|
6560
6523
|
|
|
6561
6524
|
/** @beta */
|
|
6562
6525
|
declare type TransformDocumentAsync = TransformRequestBase & AgentActionAsync
|
|
@@ -6820,8 +6783,7 @@ export declare interface TransformTargetInclude extends AgentActionTargetInclude
|
|
|
6820
6783
|
|
|
6821
6784
|
/** @beta */
|
|
6822
6785
|
export declare type TranslateDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6823
|
-
|
|
6824
|
-
| TranslateDocumentAsync
|
|
6786
|
+
TranslateDocumentSync<T> | TranslateDocumentAsync
|
|
6825
6787
|
|
|
6826
6788
|
/** @beta */
|
|
6827
6789
|
declare type TranslateDocumentAsync = TranslateRequestBase & AgentActionAsync
|
|
@@ -7106,10 +7068,7 @@ export declare const vercelStegaCleanAll: typeof stegaClean
|
|
|
7106
7068
|
|
|
7107
7069
|
/** @public */
|
|
7108
7070
|
export declare type VersionAction =
|
|
7109
|
-
|
|
|
7110
|
-
| DiscardVersionAction
|
|
7111
|
-
| ReplaceVersionAction
|
|
7112
|
-
| UnpublishVersionAction
|
|
7071
|
+
CreateVersionAction | DiscardVersionAction | ReplaceVersionAction | UnpublishVersionAction
|
|
7113
7072
|
|
|
7114
7073
|
/** @public */
|
|
7115
7074
|
export declare interface VideoPlaybackInfo<
|
|
@@ -7134,8 +7093,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
7134
7093
|
|
|
7135
7094
|
/** @public */
|
|
7136
7095
|
export declare type VideoPlaybackInfoItem =
|
|
7137
|
-
|
|
|
7138
|
-
| VideoPlaybackInfoItemSigned
|
|
7096
|
+
VideoPlaybackInfoItemPublic | VideoPlaybackInfoItemSigned
|
|
7139
7097
|
|
|
7140
7098
|
/** @public */
|
|
7141
7099
|
export declare interface VideoPlaybackInfoItemPublic {
|
package/dist/stega.d.ts
CHANGED
|
@@ -417,14 +417,7 @@ export declare interface ArchiveReleaseAction {
|
|
|
417
417
|
|
|
418
418
|
/** @public */
|
|
419
419
|
export declare type AssetMetadataType =
|
|
420
|
-
| '
|
|
421
|
-
| 'exif'
|
|
422
|
-
| 'image'
|
|
423
|
-
| 'palette'
|
|
424
|
-
| 'lqip'
|
|
425
|
-
| 'blurhash'
|
|
426
|
-
| 'thumbhash'
|
|
427
|
-
| 'none'
|
|
420
|
+
'location' | 'exif' | 'image' | 'palette' | 'lqip' | 'blurhash' | 'thumbhash' | 'none'
|
|
428
421
|
|
|
429
422
|
/** @internal */
|
|
430
423
|
export declare class AssetsClient {
|
|
@@ -866,11 +859,7 @@ export declare class ClientError extends Error {
|
|
|
866
859
|
|
|
867
860
|
/** @public */
|
|
868
861
|
export declare type ClientPerspective =
|
|
869
|
-
|
|
|
870
|
-
| 'published'
|
|
871
|
-
| 'drafts'
|
|
872
|
-
| 'raw'
|
|
873
|
-
| StackablePerspective[]
|
|
862
|
+
DeprecatedPreviewDrafts | 'published' | 'drafts' | 'raw' | StackablePerspective[]
|
|
874
863
|
|
|
875
864
|
/** @public */
|
|
876
865
|
export declare type ClientReturn<
|
|
@@ -1041,14 +1030,12 @@ declare interface ContentSourceMapDocumentBase_2 {
|
|
|
1041
1030
|
|
|
1042
1031
|
/** @public */
|
|
1043
1032
|
export declare type ContentSourceMapDocuments = (
|
|
1044
|
-
|
|
|
1045
|
-
| ContentSourceMapRemoteDocument
|
|
1033
|
+
ContentSourceMapDocument | ContentSourceMapRemoteDocument
|
|
1046
1034
|
)[]
|
|
1047
1035
|
|
|
1048
1036
|
/** @public */
|
|
1049
1037
|
declare type ContentSourceMapDocuments_2 = (
|
|
1050
|
-
|
|
|
1051
|
-
| ContentSourceMapRemoteDocument_2
|
|
1038
|
+
ContentSourceMapDocument_2 | ContentSourceMapRemoteDocument_2
|
|
1052
1039
|
)[]
|
|
1053
1040
|
|
|
1054
1041
|
/**
|
|
@@ -1101,9 +1088,7 @@ declare type ContentSourceMapMappings_2 = Record<string, ContentSourceMapMapping
|
|
|
1101
1088
|
|
|
1102
1089
|
/** @alpha */
|
|
1103
1090
|
export declare type ContentSourceMapParsedPath = (
|
|
1104
|
-
|
|
|
1105
|
-
| number
|
|
1106
|
-
| ContentSourceMapParsedPathKeyedSegment
|
|
1091
|
+
string | number | ContentSourceMapParsedPathKeyedSegment
|
|
1107
1092
|
)[]
|
|
1108
1093
|
|
|
1109
1094
|
/** @alpha */
|
|
@@ -1120,8 +1105,7 @@ declare type ContentSourceMapPaths_2 = string[]
|
|
|
1120
1105
|
|
|
1121
1106
|
/** @public */
|
|
1122
1107
|
export declare type ContentSourceMapQueryResponse =
|
|
1123
|
-
| RawQueryResponse<unknown>
|
|
1124
|
-
| Pick<RawQueryResponse<unknown>, 'result' | 'resultSourceMap'>
|
|
1108
|
+
RawQueryResponse<unknown> | Pick<RawQueryResponse<unknown>, 'result' | 'resultSourceMap'>
|
|
1125
1109
|
|
|
1126
1110
|
/** @public */
|
|
1127
1111
|
export declare interface ContentSourceMapRemoteDocument extends ContentSourceMapDocumentBase {
|
|
@@ -1775,8 +1759,7 @@ export declare function formatQueryParseError(
|
|
|
1775
1759
|
|
|
1776
1760
|
/** @beta */
|
|
1777
1761
|
declare type GenerateAsyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1778
|
-
|
|
|
1779
|
-
| GenerateTargetDocumentRequest<T>
|
|
1762
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1780
1763
|
) &
|
|
1781
1764
|
GenerateRequestBase &
|
|
1782
1765
|
AgentActionAsync
|
|
@@ -1795,8 +1778,7 @@ declare interface GenerateExistingDocumentRequest {
|
|
|
1795
1778
|
|
|
1796
1779
|
/** @beta */
|
|
1797
1780
|
export declare type GenerateInstruction<T extends Record<string, Any> = Record<string, Any>> =
|
|
1798
|
-
|
|
|
1799
|
-
| GenerateAsyncInstruction<T>
|
|
1781
|
+
GenerateSyncInstruction<T> | GenerateAsyncInstruction<T>
|
|
1800
1782
|
|
|
1801
1783
|
/** @beta */
|
|
1802
1784
|
export declare type GenerateOperation = 'set' | 'append' | 'mixed'
|
|
@@ -1927,8 +1909,7 @@ declare interface GenerateRequestBase extends AgentActionRequestBase {
|
|
|
1927
1909
|
|
|
1928
1910
|
/** @beta */
|
|
1929
1911
|
declare type GenerateSyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1930
|
-
|
|
|
1931
|
-
| GenerateTargetDocumentRequest<T>
|
|
1912
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1932
1913
|
) &
|
|
1933
1914
|
GenerateRequestBase &
|
|
1934
1915
|
AgentActionSync
|
|
@@ -2275,12 +2256,7 @@ export declare function _listen<
|
|
|
2275
2256
|
|
|
2276
2257
|
/** @public */
|
|
2277
2258
|
export declare type ListenEvent<R extends Record<string, Any> = Record<string, Any>> =
|
|
2278
|
-
|
|
2279
|
-
| ReconnectEvent
|
|
2280
|
-
| WelcomeBackEvent
|
|
2281
|
-
| ResetEvent
|
|
2282
|
-
| WelcomeEvent
|
|
2283
|
-
| OpenEvent
|
|
2259
|
+
MutationEvent<R> | ReconnectEvent | WelcomeBackEvent | ResetEvent | WelcomeEvent | OpenEvent
|
|
2284
2260
|
|
|
2285
2261
|
/**
|
|
2286
2262
|
* Maps a ListenOptions object and returns the Listen events opted for, e.g:
|
|
@@ -2420,11 +2396,7 @@ export declare class LiveClient {
|
|
|
2420
2396
|
|
|
2421
2397
|
/** @public */
|
|
2422
2398
|
export declare type LiveEvent =
|
|
2423
|
-
|
|
|
2424
|
-
| LiveEventReconnect
|
|
2425
|
-
| LiveEventMessage
|
|
2426
|
-
| LiveEventWelcome
|
|
2427
|
-
| LiveEventGoAway
|
|
2399
|
+
LiveEventRestart | LiveEventReconnect | LiveEventMessage | LiveEventWelcome | LiveEventGoAway
|
|
2428
2400
|
|
|
2429
2401
|
/**
|
|
2430
2402
|
* The `id` field is the position at which the connection was rejected or closed.
|
|
@@ -2486,8 +2458,7 @@ declare type Logger_2 =
|
|
|
2486
2458
|
declare type MapListenEventNamesToListenEvents<
|
|
2487
2459
|
R extends Record<string, Any> = Record<string, Any>,
|
|
2488
2460
|
Events extends (ResumableListenEventNames | ListenEventName)[] = (
|
|
2489
|
-
|
|
|
2490
|
-
| ListenEventName
|
|
2461
|
+
ResumableListenEventNames | ListenEventName
|
|
2491
2462
|
)[],
|
|
2492
2463
|
> = Events extends (infer E)[]
|
|
2493
2464
|
? E extends 'welcome'
|
|
@@ -4214,21 +4185,18 @@ export declare type PatchBuilder = (patch: Patch) => Patch
|
|
|
4214
4185
|
|
|
4215
4186
|
/** @beta */
|
|
4216
4187
|
export declare type PatchDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
4217
|
-
|
|
|
4218
|
-
| PatchDocumentAsync<T>
|
|
4188
|
+
PatchDocumentSync<T> | PatchDocumentAsync<T>
|
|
4219
4189
|
|
|
4220
4190
|
/** @beta */
|
|
4221
4191
|
declare type PatchDocumentAsync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4222
|
-
|
|
|
4223
|
-
| PatchTargetDocumentRequest<T>
|
|
4192
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4224
4193
|
) &
|
|
4225
4194
|
PatchRequestBase &
|
|
4226
4195
|
AgentActionAsync
|
|
4227
4196
|
|
|
4228
4197
|
/** @beta */
|
|
4229
4198
|
declare type PatchDocumentSync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4230
|
-
|
|
|
4231
|
-
| PatchTargetDocumentRequest<T>
|
|
4199
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4232
4200
|
) &
|
|
4233
4201
|
PatchRequestBase &
|
|
4234
4202
|
AgentActionSync
|
|
@@ -4394,8 +4362,7 @@ declare interface PromptJsonResponse<T extends Record<string, Any> = Record<stri
|
|
|
4394
4362
|
|
|
4395
4363
|
/** @beta */
|
|
4396
4364
|
export declare type PromptRequest<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4397
|
-
|
|
|
4398
|
-
| PromptJsonResponse<T>
|
|
4365
|
+
PromptTextResponse | PromptJsonResponse<T>
|
|
4399
4366
|
) &
|
|
4400
4367
|
PromptRequestBase
|
|
4401
4368
|
|
|
@@ -4540,9 +4507,7 @@ export declare interface PublishReleaseAction {
|
|
|
4540
4507
|
|
|
4541
4508
|
/** @public */
|
|
4542
4509
|
export declare type QueryOptions =
|
|
4543
|
-
|
|
|
4544
|
-
| UnfilteredResponseQueryOptions
|
|
4545
|
-
| UnfilteredResponseWithoutQuery
|
|
4510
|
+
FilteredResponseQueryOptions | UnfilteredResponseQueryOptions | UnfilteredResponseWithoutQuery
|
|
4546
4511
|
|
|
4547
4512
|
/** @public */
|
|
4548
4513
|
export declare interface QueryParams {
|
|
@@ -5185,8 +5150,10 @@ export declare type ResumableListenEventNames =
|
|
|
5185
5150
|
| 'reset'
|
|
5186
5151
|
|
|
5187
5152
|
/** @public */
|
|
5188
|
-
export declare interface ResumableListenOptions
|
|
5189
|
-
|
|
5153
|
+
export declare interface ResumableListenOptions extends Omit<
|
|
5154
|
+
ListenOptions,
|
|
5155
|
+
'events' | 'enableResume'
|
|
5156
|
+
> {
|
|
5190
5157
|
/**
|
|
5191
5158
|
* If this is enabled, the client will normally resume events upon reconnect
|
|
5192
5159
|
* Note that you should also subscribe to `reset`-events and handle the case where the backend is unable to resume
|
|
@@ -6428,10 +6395,7 @@ export declare type StudioBaseRoute = {
|
|
|
6428
6395
|
|
|
6429
6396
|
/** @alpha */
|
|
6430
6397
|
export declare type StudioBaseUrl =
|
|
6431
|
-
|
|
|
6432
|
-
| `${string}.sanity.studio`
|
|
6433
|
-
| `https://${string}`
|
|
6434
|
-
| string
|
|
6398
|
+
`/${string}` | `${string}.sanity.studio` | `https://${string}` | string
|
|
6435
6399
|
|
|
6436
6400
|
/** @alpha */
|
|
6437
6401
|
export declare type StudioUrl = StudioBaseUrl | StudioBaseRoute
|
|
@@ -6555,8 +6519,7 @@ export declare type TransactionMutationOptions =
|
|
|
6555
6519
|
|
|
6556
6520
|
/** @beta */
|
|
6557
6521
|
export declare type TransformDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6558
|
-
|
|
6559
|
-
| TransformDocumentAsync
|
|
6522
|
+
TransformDocumentSync<T> | TransformDocumentAsync
|
|
6560
6523
|
|
|
6561
6524
|
/** @beta */
|
|
6562
6525
|
declare type TransformDocumentAsync = TransformRequestBase & AgentActionAsync
|
|
@@ -6820,8 +6783,7 @@ export declare interface TransformTargetInclude extends AgentActionTargetInclude
|
|
|
6820
6783
|
|
|
6821
6784
|
/** @beta */
|
|
6822
6785
|
export declare type TranslateDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6823
|
-
|
|
6824
|
-
| TranslateDocumentAsync
|
|
6786
|
+
TranslateDocumentSync<T> | TranslateDocumentAsync
|
|
6825
6787
|
|
|
6826
6788
|
/** @beta */
|
|
6827
6789
|
declare type TranslateDocumentAsync = TranslateRequestBase & AgentActionAsync
|
|
@@ -7106,10 +7068,7 @@ export declare const vercelStegaCleanAll: typeof stegaClean
|
|
|
7106
7068
|
|
|
7107
7069
|
/** @public */
|
|
7108
7070
|
export declare type VersionAction =
|
|
7109
|
-
|
|
|
7110
|
-
| DiscardVersionAction
|
|
7111
|
-
| ReplaceVersionAction
|
|
7112
|
-
| UnpublishVersionAction
|
|
7071
|
+
CreateVersionAction | DiscardVersionAction | ReplaceVersionAction | UnpublishVersionAction
|
|
7113
7072
|
|
|
7114
7073
|
/** @public */
|
|
7115
7074
|
export declare interface VideoPlaybackInfo<
|
|
@@ -7134,8 +7093,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
7134
7093
|
|
|
7135
7094
|
/** @public */
|
|
7136
7095
|
export declare type VideoPlaybackInfoItem =
|
|
7137
|
-
|
|
|
7138
|
-
| VideoPlaybackInfoItemSigned
|
|
7096
|
+
VideoPlaybackInfoItemPublic | VideoPlaybackInfoItemSigned
|
|
7139
7097
|
|
|
7140
7098
|
/** @public */
|
|
7141
7099
|
export declare interface VideoPlaybackInfoItemPublic {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/client",
|
|
3
|
-
"version": "7.26.
|
|
3
|
+
"version": "7.26.2",
|
|
4
4
|
"description": "Client for retrieving, creating and patching data from Sanity.io",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -130,49 +130,49 @@
|
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
132
|
"@sanity/eventsource": "^5.0.4",
|
|
133
|
-
"get-it": "^8.8.
|
|
134
|
-
"nanoid": "^3.3.
|
|
135
|
-
"rxjs": "^7.
|
|
133
|
+
"get-it": "^8.8.3",
|
|
134
|
+
"nanoid": "^3.3.17",
|
|
135
|
+
"rxjs": "^7.8.2"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@edge-runtime/types": "^4.0.0",
|
|
139
139
|
"@edge-runtime/vm": "^5.0.0",
|
|
140
|
-
"@eslint/eslintrc": "^3.3.
|
|
141
|
-
"@eslint/js": "^9.
|
|
142
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
143
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
140
|
+
"@eslint/eslintrc": "^3.3.6",
|
|
141
|
+
"@eslint/js": "^9.39.5",
|
|
142
|
+
"@rollup/plugin-commonjs": "^28.0.9",
|
|
143
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
144
144
|
"@sanity/client-latest": "npm:@sanity/client@latest",
|
|
145
|
-
"@sanity/pkg-utils": "^7.
|
|
145
|
+
"@sanity/pkg-utils": "^7.11.9",
|
|
146
146
|
"@types/json-diff": "^1.0.3",
|
|
147
|
-
"@types/node": "^22.
|
|
148
|
-
"@types/react": "^19.2.
|
|
149
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
150
|
-
"@typescript-eslint/parser": "^8.
|
|
147
|
+
"@types/node": "^22.20.1",
|
|
148
|
+
"@types/react": "^19.2.18",
|
|
149
|
+
"@typescript-eslint/eslint-plugin": "^8.65.0",
|
|
150
|
+
"@typescript-eslint/parser": "^8.65.0",
|
|
151
151
|
"@vercel/stega": "1.1.0",
|
|
152
|
-
"@vitest/coverage-v8": "3.
|
|
153
|
-
"eslint": "^9.
|
|
154
|
-
"eslint-config-prettier": "^10.1.
|
|
152
|
+
"@vitest/coverage-v8": "3.2.6",
|
|
153
|
+
"eslint": "^9.39.5",
|
|
154
|
+
"eslint-config-prettier": "^10.1.8",
|
|
155
155
|
"eslint-formatter-compact": "^8.40.0",
|
|
156
|
-
"eslint-plugin-prettier": "^5.
|
|
156
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
157
157
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
158
|
-
"eslint-plugin-tsdoc": "^0.
|
|
159
|
-
"eslint-plugin-unused-imports": "^4.1
|
|
160
|
-
"globals": "^16.
|
|
158
|
+
"eslint-plugin-tsdoc": "^0.5.2",
|
|
159
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
160
|
+
"globals": "^16.5.0",
|
|
161
161
|
"happy-dom": "^12.10.3",
|
|
162
162
|
"json-diff": "^1.0.6",
|
|
163
|
-
"ls-engines": "^0.
|
|
164
|
-
"msw": "^2.
|
|
165
|
-
"next": "15.5.
|
|
163
|
+
"ls-engines": "^0.10.1",
|
|
164
|
+
"msw": "^2.15.0",
|
|
165
|
+
"next": "15.5.22",
|
|
166
166
|
"nock": "^13.5.6",
|
|
167
|
-
"pkg-pr-new": "^0.0.
|
|
168
|
-
"prettier": "^3.
|
|
169
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
167
|
+
"pkg-pr-new": "^0.0.86",
|
|
168
|
+
"prettier": "^3.9.6",
|
|
169
|
+
"prettier-plugin-packagejson": "^2.5.22",
|
|
170
170
|
"rimraf": "^5.0.7",
|
|
171
|
-
"rollup": "^4.
|
|
172
|
-
"sse-channel": "^4.0.
|
|
173
|
-
"terser": "^5.
|
|
174
|
-
"typescript": "5.
|
|
175
|
-
"vitest": "3.
|
|
171
|
+
"rollup": "^4.62.4",
|
|
172
|
+
"sse-channel": "^4.0.2",
|
|
173
|
+
"terser": "^5.49.0",
|
|
174
|
+
"typescript": "5.9.3",
|
|
175
|
+
"vitest": "3.2.6"
|
|
176
176
|
},
|
|
177
177
|
"packageManager": "npm@11.4.1",
|
|
178
178
|
"engines": {
|
|
@@ -135,8 +135,7 @@ export interface GroqAgentActionParam {
|
|
|
135
135
|
|
|
136
136
|
/** @beta */
|
|
137
137
|
export type AgentActionTypeConfig =
|
|
138
|
-
|
|
139
|
-
| {exclude: string[]; include?: never}
|
|
138
|
+
{include: string[]; exclude?: never} | {exclude: string[]; include?: never}
|
|
140
139
|
|
|
141
140
|
/** @beta */
|
|
142
141
|
export type AgentActionPathSegment = string | {_key: string}
|
|
@@ -271,24 +271,21 @@ interface GenerateTargetDocumentRequest<T extends Record<string, Any> = Record<s
|
|
|
271
271
|
|
|
272
272
|
/** @beta */
|
|
273
273
|
export type GenerateSyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
274
|
-
|
|
|
275
|
-
| GenerateTargetDocumentRequest<T>
|
|
274
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
276
275
|
) &
|
|
277
276
|
GenerateRequestBase &
|
|
278
277
|
AgentActionSync
|
|
279
278
|
|
|
280
279
|
/** @beta */
|
|
281
280
|
export type GenerateAsyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
282
|
-
|
|
|
283
|
-
| GenerateTargetDocumentRequest<T>
|
|
281
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
284
282
|
) &
|
|
285
283
|
GenerateRequestBase &
|
|
286
284
|
AgentActionAsync
|
|
287
285
|
|
|
288
286
|
/** @beta */
|
|
289
287
|
export type GenerateInstruction<T extends Record<string, Any> = Record<string, Any>> =
|
|
290
|
-
|
|
|
291
|
-
| GenerateAsyncInstruction<T>
|
|
288
|
+
GenerateSyncInstruction<T> | GenerateAsyncInstruction<T>
|
|
292
289
|
|
|
293
290
|
export function _generate<DocumentShape extends Record<string, Any>>(
|
|
294
291
|
client: SanityClient | ObservableSanityClient,
|
|
@@ -99,24 +99,21 @@ interface PatchTargetDocumentRequest<T extends Record<string, Any> = Record<stri
|
|
|
99
99
|
|
|
100
100
|
/** @beta */
|
|
101
101
|
export type PatchDocumentSync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
102
|
-
|
|
|
103
|
-
| PatchTargetDocumentRequest<T>
|
|
102
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
104
103
|
) &
|
|
105
104
|
PatchRequestBase &
|
|
106
105
|
AgentActionSync
|
|
107
106
|
|
|
108
107
|
/** @beta */
|
|
109
108
|
export type PatchDocumentAsync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
110
|
-
|
|
|
111
|
-
| PatchTargetDocumentRequest<T>
|
|
109
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
112
110
|
) &
|
|
113
111
|
PatchRequestBase &
|
|
114
112
|
AgentActionAsync
|
|
115
113
|
|
|
116
114
|
/** @beta */
|
|
117
115
|
export type PatchDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
118
|
-
|
|
|
119
|
-
| PatchDocumentAsync<T>
|
|
116
|
+
PatchDocumentSync<T> | PatchDocumentAsync<T>
|
|
120
117
|
|
|
121
118
|
export function _patch<DocumentShape extends Record<string, Any>>(
|
|
122
119
|
client: SanityClient | ObservableSanityClient,
|
|
@@ -120,8 +120,7 @@ interface PromptTextResponse {
|
|
|
120
120
|
|
|
121
121
|
/** @beta */
|
|
122
122
|
export type PromptRequest<T extends Record<string, Any> = Record<string, Any>> = (
|
|
123
|
-
|
|
|
124
|
-
| PromptJsonResponse<T>
|
|
123
|
+
PromptTextResponse | PromptJsonResponse<T>
|
|
125
124
|
) &
|
|
126
125
|
PromptRequestBase
|
|
127
126
|
|
|
@@ -322,8 +322,7 @@ export type TransformDocumentAsync = TransformRequestBase & AgentActionAsync
|
|
|
322
322
|
|
|
323
323
|
/** @beta */
|
|
324
324
|
export type TransformDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
325
|
-
|
|
326
|
-
| TransformDocumentAsync
|
|
325
|
+
TransformDocumentSync<T> | TransformDocumentAsync
|
|
327
326
|
|
|
328
327
|
export function _transform<DocumentShape extends Record<string, Any>>(
|
|
329
328
|
client: SanityClient | ObservableSanityClient,
|
|
@@ -147,8 +147,7 @@ export type TranslateDocumentAsync = TranslateRequestBase & AgentActionAsync
|
|
|
147
147
|
|
|
148
148
|
/** @beta */
|
|
149
149
|
export type TranslateDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
150
|
-
|
|
151
|
-
| TranslateDocumentAsync
|
|
150
|
+
TranslateDocumentSync<T> | TranslateDocumentAsync
|
|
152
151
|
|
|
153
152
|
export function _translate<DocumentShape extends Record<string, Any>>(
|
|
154
153
|
client: SanityClient | ObservableSanityClient,
|