@sanity/client 7.26.0 → 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/README.md +1 -1
- 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.cjs.map +1 -1
- package/dist/stega.browser.d.cts +29 -69
- package/dist/stega.browser.d.ts +29 -69
- package/dist/stega.browser.js.map +1 -1
- package/dist/stega.cjs.map +1 -1
- package/dist/stega.d.cts +29 -69
- package/dist/stega.d.ts +29 -69
- package/dist/stega.js.map +1 -1
- 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/stegaBrand.ts +3 -1
- 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/index.d.cts
CHANGED
|
@@ -424,14 +424,7 @@ export declare interface ArchiveReleaseAction {
|
|
|
424
424
|
|
|
425
425
|
/** @public */
|
|
426
426
|
export declare type AssetMetadataType =
|
|
427
|
-
| '
|
|
428
|
-
| 'exif'
|
|
429
|
-
| 'image'
|
|
430
|
-
| 'palette'
|
|
431
|
-
| 'lqip'
|
|
432
|
-
| 'blurhash'
|
|
433
|
-
| 'thumbhash'
|
|
434
|
-
| 'none'
|
|
427
|
+
'location' | 'exif' | 'image' | 'palette' | 'lqip' | 'blurhash' | 'thumbhash' | 'none'
|
|
435
428
|
|
|
436
429
|
/** @internal */
|
|
437
430
|
export declare class AssetsClient {
|
|
@@ -873,11 +866,7 @@ export declare class ClientError extends Error {
|
|
|
873
866
|
|
|
874
867
|
/** @public */
|
|
875
868
|
export declare type ClientPerspective =
|
|
876
|
-
|
|
|
877
|
-
| 'published'
|
|
878
|
-
| 'drafts'
|
|
879
|
-
| 'raw'
|
|
880
|
-
| StackablePerspective[]
|
|
869
|
+
DeprecatedPreviewDrafts | 'published' | 'drafts' | 'raw' | StackablePerspective[]
|
|
881
870
|
|
|
882
871
|
/** @public */
|
|
883
872
|
export declare type ClientReturn<
|
|
@@ -1003,8 +992,7 @@ export declare interface ContentSourceMapDocumentBase {
|
|
|
1003
992
|
|
|
1004
993
|
/** @public */
|
|
1005
994
|
export declare type ContentSourceMapDocuments = (
|
|
1006
|
-
|
|
|
1007
|
-
| ContentSourceMapRemoteDocument
|
|
995
|
+
ContentSourceMapDocument | ContentSourceMapRemoteDocument
|
|
1008
996
|
)[]
|
|
1009
997
|
|
|
1010
998
|
/**
|
|
@@ -1600,8 +1588,7 @@ export declare function formatQueryParseError(
|
|
|
1600
1588
|
|
|
1601
1589
|
/** @beta */
|
|
1602
1590
|
declare type GenerateAsyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1603
|
-
|
|
|
1604
|
-
| GenerateTargetDocumentRequest<T>
|
|
1591
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1605
1592
|
) &
|
|
1606
1593
|
GenerateRequestBase &
|
|
1607
1594
|
AgentActionAsync
|
|
@@ -1620,8 +1607,7 @@ declare interface GenerateExistingDocumentRequest {
|
|
|
1620
1607
|
|
|
1621
1608
|
/** @beta */
|
|
1622
1609
|
export declare type GenerateInstruction<T extends Record<string, Any> = Record<string, Any>> =
|
|
1623
|
-
|
|
|
1624
|
-
| GenerateAsyncInstruction<T>
|
|
1610
|
+
GenerateSyncInstruction<T> | GenerateAsyncInstruction<T>
|
|
1625
1611
|
|
|
1626
1612
|
/** @beta */
|
|
1627
1613
|
export declare type GenerateOperation = 'set' | 'append' | 'mixed'
|
|
@@ -1752,8 +1738,7 @@ declare interface GenerateRequestBase extends AgentActionRequestBase {
|
|
|
1752
1738
|
|
|
1753
1739
|
/** @beta */
|
|
1754
1740
|
declare type GenerateSyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1755
|
-
|
|
|
1756
|
-
| GenerateTargetDocumentRequest<T>
|
|
1741
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1757
1742
|
) &
|
|
1758
1743
|
GenerateRequestBase &
|
|
1759
1744
|
AgentActionSync
|
|
@@ -2090,12 +2075,7 @@ export declare function _listen<
|
|
|
2090
2075
|
|
|
2091
2076
|
/** @public */
|
|
2092
2077
|
export declare type ListenEvent<R extends Record<string, Any> = Record<string, Any>> =
|
|
2093
|
-
|
|
2094
|
-
| ReconnectEvent
|
|
2095
|
-
| WelcomeBackEvent
|
|
2096
|
-
| ResetEvent
|
|
2097
|
-
| WelcomeEvent
|
|
2098
|
-
| OpenEvent
|
|
2078
|
+
MutationEvent<R> | ReconnectEvent | WelcomeBackEvent | ResetEvent | WelcomeEvent | OpenEvent
|
|
2099
2079
|
|
|
2100
2080
|
/**
|
|
2101
2081
|
* Maps a ListenOptions object and returns the Listen events opted for, e.g:
|
|
@@ -2235,11 +2215,7 @@ export declare class LiveClient {
|
|
|
2235
2215
|
|
|
2236
2216
|
/** @public */
|
|
2237
2217
|
export declare type LiveEvent =
|
|
2238
|
-
|
|
|
2239
|
-
| LiveEventReconnect
|
|
2240
|
-
| LiveEventMessage
|
|
2241
|
-
| LiveEventWelcome
|
|
2242
|
-
| LiveEventGoAway
|
|
2218
|
+
LiveEventRestart | LiveEventReconnect | LiveEventMessage | LiveEventWelcome | LiveEventGoAway
|
|
2243
2219
|
|
|
2244
2220
|
/**
|
|
2245
2221
|
* The `id` field is the position at which the connection was rejected or closed.
|
|
@@ -2294,8 +2270,7 @@ export declare type Logger =
|
|
|
2294
2270
|
declare type MapListenEventNamesToListenEvents<
|
|
2295
2271
|
R extends Record<string, Any> = Record<string, Any>,
|
|
2296
2272
|
Events extends (ResumableListenEventNames | ListenEventName)[] = (
|
|
2297
|
-
|
|
|
2298
|
-
| ListenEventName
|
|
2273
|
+
ResumableListenEventNames | ListenEventName
|
|
2299
2274
|
)[],
|
|
2300
2275
|
> = Events extends (infer E)[]
|
|
2301
2276
|
? E extends 'welcome'
|
|
@@ -4016,21 +3991,18 @@ export declare type PatchBuilder = (patch: Patch) => Patch
|
|
|
4016
3991
|
|
|
4017
3992
|
/** @beta */
|
|
4018
3993
|
export declare type PatchDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
4019
|
-
|
|
|
4020
|
-
| PatchDocumentAsync<T>
|
|
3994
|
+
PatchDocumentSync<T> | PatchDocumentAsync<T>
|
|
4021
3995
|
|
|
4022
3996
|
/** @beta */
|
|
4023
3997
|
declare type PatchDocumentAsync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4024
|
-
|
|
|
4025
|
-
| PatchTargetDocumentRequest<T>
|
|
3998
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4026
3999
|
) &
|
|
4027
4000
|
PatchRequestBase &
|
|
4028
4001
|
AgentActionAsync
|
|
4029
4002
|
|
|
4030
4003
|
/** @beta */
|
|
4031
4004
|
declare type PatchDocumentSync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4032
|
-
|
|
|
4033
|
-
| PatchTargetDocumentRequest<T>
|
|
4005
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4034
4006
|
) &
|
|
4035
4007
|
PatchRequestBase &
|
|
4036
4008
|
AgentActionSync
|
|
@@ -4196,8 +4168,7 @@ declare interface PromptJsonResponse<T extends Record<string, Any> = Record<stri
|
|
|
4196
4168
|
|
|
4197
4169
|
/** @beta */
|
|
4198
4170
|
export declare type PromptRequest<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4199
|
-
|
|
|
4200
|
-
| PromptJsonResponse<T>
|
|
4171
|
+
PromptTextResponse | PromptJsonResponse<T>
|
|
4201
4172
|
) &
|
|
4202
4173
|
PromptRequestBase
|
|
4203
4174
|
|
|
@@ -4342,9 +4313,7 @@ export declare interface PublishReleaseAction {
|
|
|
4342
4313
|
|
|
4343
4314
|
/** @public */
|
|
4344
4315
|
export declare type QueryOptions =
|
|
4345
|
-
|
|
|
4346
|
-
| UnfilteredResponseQueryOptions
|
|
4347
|
-
| UnfilteredResponseWithoutQuery
|
|
4316
|
+
FilteredResponseQueryOptions | UnfilteredResponseQueryOptions | UnfilteredResponseWithoutQuery
|
|
4348
4317
|
|
|
4349
4318
|
/** @public */
|
|
4350
4319
|
export declare interface QueryParams {
|
|
@@ -4981,8 +4950,10 @@ export declare type ResumableListenEventNames =
|
|
|
4981
4950
|
| 'reset'
|
|
4982
4951
|
|
|
4983
4952
|
/** @public */
|
|
4984
|
-
export declare interface ResumableListenOptions
|
|
4985
|
-
|
|
4953
|
+
export declare interface ResumableListenOptions extends Omit<
|
|
4954
|
+
ListenOptions,
|
|
4955
|
+
'events' | 'enableResume'
|
|
4956
|
+
> {
|
|
4986
4957
|
/**
|
|
4987
4958
|
* If this is enabled, the client will normally resume events upon reconnect
|
|
4988
4959
|
* Note that you should also subscribe to `reset`-events and handle the case where the backend is unable to resume
|
|
@@ -6151,8 +6122,7 @@ export declare type TransactionMutationOptions =
|
|
|
6151
6122
|
|
|
6152
6123
|
/** @beta */
|
|
6153
6124
|
export declare type TransformDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6154
|
-
|
|
6155
|
-
| TransformDocumentAsync
|
|
6125
|
+
TransformDocumentSync<T> | TransformDocumentAsync
|
|
6156
6126
|
|
|
6157
6127
|
/** @beta */
|
|
6158
6128
|
declare type TransformDocumentAsync = TransformRequestBase & AgentActionAsync
|
|
@@ -6416,8 +6386,7 @@ export declare interface TransformTargetInclude extends AgentActionTargetInclude
|
|
|
6416
6386
|
|
|
6417
6387
|
/** @beta */
|
|
6418
6388
|
export declare type TranslateDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6419
|
-
|
|
6420
|
-
| TranslateDocumentAsync
|
|
6389
|
+
TranslateDocumentSync<T> | TranslateDocumentAsync
|
|
6421
6390
|
|
|
6422
6391
|
/** @beta */
|
|
6423
6392
|
declare type TranslateDocumentAsync = TranslateRequestBase & AgentActionAsync
|
|
@@ -6694,10 +6663,7 @@ export declare function validateApiPerspective(
|
|
|
6694
6663
|
|
|
6695
6664
|
/** @public */
|
|
6696
6665
|
export declare type VersionAction =
|
|
6697
|
-
|
|
|
6698
|
-
| DiscardVersionAction
|
|
6699
|
-
| ReplaceVersionAction
|
|
6700
|
-
| UnpublishVersionAction
|
|
6666
|
+
CreateVersionAction | DiscardVersionAction | ReplaceVersionAction | UnpublishVersionAction
|
|
6701
6667
|
|
|
6702
6668
|
/** @public */
|
|
6703
6669
|
export declare interface VideoPlaybackInfo<
|
|
@@ -6722,8 +6688,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6722
6688
|
|
|
6723
6689
|
/** @public */
|
|
6724
6690
|
export declare type VideoPlaybackInfoItem =
|
|
6725
|
-
|
|
|
6726
|
-
| VideoPlaybackInfoItemSigned
|
|
6691
|
+
VideoPlaybackInfoItemPublic | VideoPlaybackInfoItemSigned
|
|
6727
6692
|
|
|
6728
6693
|
/** @public */
|
|
6729
6694
|
export declare interface VideoPlaybackInfoItemPublic {
|
package/dist/index.d.ts
CHANGED
|
@@ -424,14 +424,7 @@ export declare interface ArchiveReleaseAction {
|
|
|
424
424
|
|
|
425
425
|
/** @public */
|
|
426
426
|
export declare type AssetMetadataType =
|
|
427
|
-
| '
|
|
428
|
-
| 'exif'
|
|
429
|
-
| 'image'
|
|
430
|
-
| 'palette'
|
|
431
|
-
| 'lqip'
|
|
432
|
-
| 'blurhash'
|
|
433
|
-
| 'thumbhash'
|
|
434
|
-
| 'none'
|
|
427
|
+
'location' | 'exif' | 'image' | 'palette' | 'lqip' | 'blurhash' | 'thumbhash' | 'none'
|
|
435
428
|
|
|
436
429
|
/** @internal */
|
|
437
430
|
export declare class AssetsClient {
|
|
@@ -873,11 +866,7 @@ export declare class ClientError extends Error {
|
|
|
873
866
|
|
|
874
867
|
/** @public */
|
|
875
868
|
export declare type ClientPerspective =
|
|
876
|
-
|
|
|
877
|
-
| 'published'
|
|
878
|
-
| 'drafts'
|
|
879
|
-
| 'raw'
|
|
880
|
-
| StackablePerspective[]
|
|
869
|
+
DeprecatedPreviewDrafts | 'published' | 'drafts' | 'raw' | StackablePerspective[]
|
|
881
870
|
|
|
882
871
|
/** @public */
|
|
883
872
|
export declare type ClientReturn<
|
|
@@ -1003,8 +992,7 @@ export declare interface ContentSourceMapDocumentBase {
|
|
|
1003
992
|
|
|
1004
993
|
/** @public */
|
|
1005
994
|
export declare type ContentSourceMapDocuments = (
|
|
1006
|
-
|
|
|
1007
|
-
| ContentSourceMapRemoteDocument
|
|
995
|
+
ContentSourceMapDocument | ContentSourceMapRemoteDocument
|
|
1008
996
|
)[]
|
|
1009
997
|
|
|
1010
998
|
/**
|
|
@@ -1600,8 +1588,7 @@ export declare function formatQueryParseError(
|
|
|
1600
1588
|
|
|
1601
1589
|
/** @beta */
|
|
1602
1590
|
declare type GenerateAsyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1603
|
-
|
|
|
1604
|
-
| GenerateTargetDocumentRequest<T>
|
|
1591
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1605
1592
|
) &
|
|
1606
1593
|
GenerateRequestBase &
|
|
1607
1594
|
AgentActionAsync
|
|
@@ -1620,8 +1607,7 @@ declare interface GenerateExistingDocumentRequest {
|
|
|
1620
1607
|
|
|
1621
1608
|
/** @beta */
|
|
1622
1609
|
export declare type GenerateInstruction<T extends Record<string, Any> = Record<string, Any>> =
|
|
1623
|
-
|
|
|
1624
|
-
| GenerateAsyncInstruction<T>
|
|
1610
|
+
GenerateSyncInstruction<T> | GenerateAsyncInstruction<T>
|
|
1625
1611
|
|
|
1626
1612
|
/** @beta */
|
|
1627
1613
|
export declare type GenerateOperation = 'set' | 'append' | 'mixed'
|
|
@@ -1752,8 +1738,7 @@ declare interface GenerateRequestBase extends AgentActionRequestBase {
|
|
|
1752
1738
|
|
|
1753
1739
|
/** @beta */
|
|
1754
1740
|
declare type GenerateSyncInstruction<T extends Record<string, Any> = Record<string, Any>> = (
|
|
1755
|
-
|
|
|
1756
|
-
| GenerateTargetDocumentRequest<T>
|
|
1741
|
+
GenerateExistingDocumentRequest | GenerateTargetDocumentRequest<T>
|
|
1757
1742
|
) &
|
|
1758
1743
|
GenerateRequestBase &
|
|
1759
1744
|
AgentActionSync
|
|
@@ -2090,12 +2075,7 @@ export declare function _listen<
|
|
|
2090
2075
|
|
|
2091
2076
|
/** @public */
|
|
2092
2077
|
export declare type ListenEvent<R extends Record<string, Any> = Record<string, Any>> =
|
|
2093
|
-
|
|
2094
|
-
| ReconnectEvent
|
|
2095
|
-
| WelcomeBackEvent
|
|
2096
|
-
| ResetEvent
|
|
2097
|
-
| WelcomeEvent
|
|
2098
|
-
| OpenEvent
|
|
2078
|
+
MutationEvent<R> | ReconnectEvent | WelcomeBackEvent | ResetEvent | WelcomeEvent | OpenEvent
|
|
2099
2079
|
|
|
2100
2080
|
/**
|
|
2101
2081
|
* Maps a ListenOptions object and returns the Listen events opted for, e.g:
|
|
@@ -2235,11 +2215,7 @@ export declare class LiveClient {
|
|
|
2235
2215
|
|
|
2236
2216
|
/** @public */
|
|
2237
2217
|
export declare type LiveEvent =
|
|
2238
|
-
|
|
|
2239
|
-
| LiveEventReconnect
|
|
2240
|
-
| LiveEventMessage
|
|
2241
|
-
| LiveEventWelcome
|
|
2242
|
-
| LiveEventGoAway
|
|
2218
|
+
LiveEventRestart | LiveEventReconnect | LiveEventMessage | LiveEventWelcome | LiveEventGoAway
|
|
2243
2219
|
|
|
2244
2220
|
/**
|
|
2245
2221
|
* The `id` field is the position at which the connection was rejected or closed.
|
|
@@ -2294,8 +2270,7 @@ export declare type Logger =
|
|
|
2294
2270
|
declare type MapListenEventNamesToListenEvents<
|
|
2295
2271
|
R extends Record<string, Any> = Record<string, Any>,
|
|
2296
2272
|
Events extends (ResumableListenEventNames | ListenEventName)[] = (
|
|
2297
|
-
|
|
|
2298
|
-
| ListenEventName
|
|
2273
|
+
ResumableListenEventNames | ListenEventName
|
|
2299
2274
|
)[],
|
|
2300
2275
|
> = Events extends (infer E)[]
|
|
2301
2276
|
? E extends 'welcome'
|
|
@@ -4016,21 +3991,18 @@ export declare type PatchBuilder = (patch: Patch) => Patch
|
|
|
4016
3991
|
|
|
4017
3992
|
/** @beta */
|
|
4018
3993
|
export declare type PatchDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
4019
|
-
|
|
|
4020
|
-
| PatchDocumentAsync<T>
|
|
3994
|
+
PatchDocumentSync<T> | PatchDocumentAsync<T>
|
|
4021
3995
|
|
|
4022
3996
|
/** @beta */
|
|
4023
3997
|
declare type PatchDocumentAsync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4024
|
-
|
|
|
4025
|
-
| PatchTargetDocumentRequest<T>
|
|
3998
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4026
3999
|
) &
|
|
4027
4000
|
PatchRequestBase &
|
|
4028
4001
|
AgentActionAsync
|
|
4029
4002
|
|
|
4030
4003
|
/** @beta */
|
|
4031
4004
|
declare type PatchDocumentSync<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4032
|
-
|
|
|
4033
|
-
| PatchTargetDocumentRequest<T>
|
|
4005
|
+
PatchExistingDocumentRequest | PatchTargetDocumentRequest<T>
|
|
4034
4006
|
) &
|
|
4035
4007
|
PatchRequestBase &
|
|
4036
4008
|
AgentActionSync
|
|
@@ -4196,8 +4168,7 @@ declare interface PromptJsonResponse<T extends Record<string, Any> = Record<stri
|
|
|
4196
4168
|
|
|
4197
4169
|
/** @beta */
|
|
4198
4170
|
export declare type PromptRequest<T extends Record<string, Any> = Record<string, Any>> = (
|
|
4199
|
-
|
|
|
4200
|
-
| PromptJsonResponse<T>
|
|
4171
|
+
PromptTextResponse | PromptJsonResponse<T>
|
|
4201
4172
|
) &
|
|
4202
4173
|
PromptRequestBase
|
|
4203
4174
|
|
|
@@ -4342,9 +4313,7 @@ export declare interface PublishReleaseAction {
|
|
|
4342
4313
|
|
|
4343
4314
|
/** @public */
|
|
4344
4315
|
export declare type QueryOptions =
|
|
4345
|
-
|
|
|
4346
|
-
| UnfilteredResponseQueryOptions
|
|
4347
|
-
| UnfilteredResponseWithoutQuery
|
|
4316
|
+
FilteredResponseQueryOptions | UnfilteredResponseQueryOptions | UnfilteredResponseWithoutQuery
|
|
4348
4317
|
|
|
4349
4318
|
/** @public */
|
|
4350
4319
|
export declare interface QueryParams {
|
|
@@ -4981,8 +4950,10 @@ export declare type ResumableListenEventNames =
|
|
|
4981
4950
|
| 'reset'
|
|
4982
4951
|
|
|
4983
4952
|
/** @public */
|
|
4984
|
-
export declare interface ResumableListenOptions
|
|
4985
|
-
|
|
4953
|
+
export declare interface ResumableListenOptions extends Omit<
|
|
4954
|
+
ListenOptions,
|
|
4955
|
+
'events' | 'enableResume'
|
|
4956
|
+
> {
|
|
4986
4957
|
/**
|
|
4987
4958
|
* If this is enabled, the client will normally resume events upon reconnect
|
|
4988
4959
|
* Note that you should also subscribe to `reset`-events and handle the case where the backend is unable to resume
|
|
@@ -6151,8 +6122,7 @@ export declare type TransactionMutationOptions =
|
|
|
6151
6122
|
|
|
6152
6123
|
/** @beta */
|
|
6153
6124
|
export declare type TransformDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6154
|
-
|
|
6155
|
-
| TransformDocumentAsync
|
|
6125
|
+
TransformDocumentSync<T> | TransformDocumentAsync
|
|
6156
6126
|
|
|
6157
6127
|
/** @beta */
|
|
6158
6128
|
declare type TransformDocumentAsync = TransformRequestBase & AgentActionAsync
|
|
@@ -6416,8 +6386,7 @@ export declare interface TransformTargetInclude extends AgentActionTargetInclude
|
|
|
6416
6386
|
|
|
6417
6387
|
/** @beta */
|
|
6418
6388
|
export declare type TranslateDocument<T extends Record<string, Any> = Record<string, Any>> =
|
|
6419
|
-
|
|
6420
|
-
| TranslateDocumentAsync
|
|
6389
|
+
TranslateDocumentSync<T> | TranslateDocumentAsync
|
|
6421
6390
|
|
|
6422
6391
|
/** @beta */
|
|
6423
6392
|
declare type TranslateDocumentAsync = TranslateRequestBase & AgentActionAsync
|
|
@@ -6694,10 +6663,7 @@ export declare function validateApiPerspective(
|
|
|
6694
6663
|
|
|
6695
6664
|
/** @public */
|
|
6696
6665
|
export declare type VersionAction =
|
|
6697
|
-
|
|
|
6698
|
-
| DiscardVersionAction
|
|
6699
|
-
| ReplaceVersionAction
|
|
6700
|
-
| UnpublishVersionAction
|
|
6666
|
+
CreateVersionAction | DiscardVersionAction | ReplaceVersionAction | UnpublishVersionAction
|
|
6701
6667
|
|
|
6702
6668
|
/** @public */
|
|
6703
6669
|
export declare interface VideoPlaybackInfo<
|
|
@@ -6722,8 +6688,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6722
6688
|
|
|
6723
6689
|
/** @public */
|
|
6724
6690
|
export declare type VideoPlaybackInfoItem =
|
|
6725
|
-
|
|
|
6726
|
-
| VideoPlaybackInfoItemSigned
|
|
6691
|
+
VideoPlaybackInfoItemPublic | VideoPlaybackInfoItemSigned
|
|
6727
6692
|
|
|
6728
6693
|
/** @public */
|
|
6729
6694
|
export declare interface VideoPlaybackInfoItemPublic {
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { combineLatestWith, map, filter, concatMap, reduce, finalize as finalize
|
|
|
8
8
|
import { getVersionFromId, isDraftId, getVersionId, getDraftId, isVersionId, getPublishedId } from "@sanity/client/csm";
|
|
9
9
|
import { customAlphabet } from "nanoid";
|
|
10
10
|
import { validateObject, validateInsert, requireDocumentId, validateDocumentId, requireDocumentType, printCreateVersionWithBaseIdWarning, resourceConfig, hasDataset, requestTag, printPreviewDraftsDeprecationWarning, validateApiPerspective, printCdnPreviewDraftsWarning, validateAssetType, resourceGuard, dataset, validateVersionIdMatch, defaultConfig, initConfig, printNoDefaultExport } from "./_chunks-es/config.js";
|
|
11
|
-
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
11
|
+
const EXPERIMENTAL_API_WARNING = "This is an experimental API version", NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
12
12
|
function codeFrame(query, location2, message) {
|
|
13
13
|
const lines = query.split(NEWLINE), loc = {
|
|
14
14
|
start: columnToLine(location2.start, lines),
|
|
@@ -220,7 +220,6 @@ function shouldRetry(err, attempt, options) {
|
|
|
220
220
|
const isSafe = options.method === "GET" || options.method === "HEAD", isQuery2 = (options.uri || options.url).startsWith("/data/query"), isRetriableResponse = err.response && (err.response.statusCode === 429 || err.response.statusCode === 502 || err.response.statusCode === 503);
|
|
221
221
|
return (isSafe || isQuery2) && isRetriableResponse ? !0 : retry.shouldRetry(err, attempt, options);
|
|
222
222
|
}
|
|
223
|
-
const EXPERIMENTAL_API_WARNING = "This is an experimental API version";
|
|
224
223
|
class ConnectionFailedError extends Error {
|
|
225
224
|
name = "ConnectionFailedError";
|
|
226
225
|
/**
|
|
@@ -688,7 +687,7 @@ function requestOptions(config, overrides = {}) {
|
|
|
688
687
|
const withCredentials = !!(typeof overrides.withCredentials > "u" ? config.withCredentials : overrides.withCredentials), timeout = typeof overrides.timeout > "u" ? config.timeout : overrides.timeout;
|
|
689
688
|
return Object.assign({}, overrides, {
|
|
690
689
|
headers: Object.assign({}, headers2, overrides.headers || {}),
|
|
691
|
-
timeout: typeof timeout > "u" ?
|
|
690
|
+
timeout: typeof timeout > "u" ? 300 * 1e3 : timeout,
|
|
692
691
|
proxy: overrides.proxy || config.proxy,
|
|
693
692
|
json: !0,
|
|
694
693
|
withCredentials,
|
|
@@ -2866,7 +2865,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
2866
2865
|
return printNoDefaultExport(), createClient2(config);
|
|
2867
2866
|
};
|
|
2868
2867
|
}
|
|
2869
|
-
var name = "@sanity/client", version = "7.26.
|
|
2868
|
+
var name = "@sanity/client", version = "7.26.2";
|
|
2870
2869
|
const middleware = [
|
|
2871
2870
|
debug({ verbose: !0, namespace: "sanity:client" }),
|
|
2872
2871
|
headers({ "User-Agent": `${name} ${version}` }),
|