@sanity/client 6.24.1 → 6.24.2-canary.0
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 +1 -2
- package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaClean.cjs +1 -2
- package/dist/_chunks-cjs/stegaClean.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +1 -2
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
- package/dist/_chunks-es/resolveEditInfo.js +1 -2
- package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
- package/dist/_chunks-es/stegaClean.js +1 -2
- package/dist/_chunks-es/stegaClean.js.map +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +1 -2
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
- package/dist/csm.cjs +1 -2
- package/dist/csm.cjs.map +1 -1
- package/dist/csm.d.cts +99 -34
- package/dist/csm.d.ts +99 -34
- package/dist/csm.js +1 -2
- package/dist/csm.js.map +1 -1
- package/dist/index.browser.cjs +1 -2
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +3 -4
- package/dist/index.browser.d.ts +3 -4
- package/dist/index.browser.js +1 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +3312 -98
- package/dist/stega.browser.d.ts +3312 -98
- package/dist/stega.d.cts +3312 -98
- package/dist/stega.d.ts +3312 -98
- package/package.json +16 -16
- package/src/csm/types.ts +1 -1
- package/src/http/request.ts +1 -1
- package/src/index.browser.ts +1 -1
- package/src/index.ts +1 -1
- package/src/stega/stegaEncodeSourceMap.ts +5 -1
- package/src/util/pick.ts +1 -1
- package/src/warnings.ts +1 -1
- package/umd/sanityClient.js +99 -115
- package/umd/sanityClient.min.js +2 -2
package/dist/index.browser.d.cts
CHANGED
|
@@ -826,7 +826,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
826
826
|
this: SanityClient | ObservableSanityClient,
|
|
827
827
|
query: string,
|
|
828
828
|
params?: ListenParams,
|
|
829
|
-
): Observable<
|
|
829
|
+
): Observable<MutationEvent<R>>
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* Set up a listener that will be notified when mutations occur on documents matching the provided query/filter.
|
|
@@ -845,7 +845,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
845
845
|
|
|
846
846
|
/** @public */
|
|
847
847
|
export declare type ListenEvent<R extends Record<string, Any>> =
|
|
848
|
-
|
|
|
848
|
+
| MutationEvent<R>
|
|
849
849
|
| ChannelErrorEvent
|
|
850
850
|
| DisconnectEvent
|
|
851
851
|
| ReconnectEvent
|
|
@@ -1031,7 +1031,7 @@ export declare interface MutationErrorItem {
|
|
|
1031
1031
|
*
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
declare type
|
|
1034
|
+
export declare type MutationEvent<R extends Record<string, Any> = Record<string, Any>> = {
|
|
1035
1035
|
type: 'mutation'
|
|
1036
1036
|
/**
|
|
1037
1037
|
* The ID of the document that was affected
|
|
@@ -1120,7 +1120,6 @@ declare type MutationEvent_2<R extends Record<string, Any> = Record<string, Any>
|
|
|
1120
1120
|
*/
|
|
1121
1121
|
transactionCurrentEvent: number
|
|
1122
1122
|
}
|
|
1123
|
-
export {MutationEvent_2 as MutationEvent}
|
|
1124
1123
|
|
|
1125
1124
|
/** @internal */
|
|
1126
1125
|
export declare type MutationOperation = 'create' | 'delete' | 'update' | 'none'
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -826,7 +826,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
826
826
|
this: SanityClient | ObservableSanityClient,
|
|
827
827
|
query: string,
|
|
828
828
|
params?: ListenParams,
|
|
829
|
-
): Observable<
|
|
829
|
+
): Observable<MutationEvent<R>>
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* Set up a listener that will be notified when mutations occur on documents matching the provided query/filter.
|
|
@@ -845,7 +845,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
845
845
|
|
|
846
846
|
/** @public */
|
|
847
847
|
export declare type ListenEvent<R extends Record<string, Any>> =
|
|
848
|
-
|
|
|
848
|
+
| MutationEvent<R>
|
|
849
849
|
| ChannelErrorEvent
|
|
850
850
|
| DisconnectEvent
|
|
851
851
|
| ReconnectEvent
|
|
@@ -1031,7 +1031,7 @@ export declare interface MutationErrorItem {
|
|
|
1031
1031
|
*
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
declare type
|
|
1034
|
+
export declare type MutationEvent<R extends Record<string, Any> = Record<string, Any>> = {
|
|
1035
1035
|
type: 'mutation'
|
|
1036
1036
|
/**
|
|
1037
1037
|
* The ID of the document that was affected
|
|
@@ -1120,7 +1120,6 @@ declare type MutationEvent_2<R extends Record<string, Any> = Record<string, Any>
|
|
|
1120
1120
|
*/
|
|
1121
1121
|
transactionCurrentEvent: number
|
|
1122
1122
|
}
|
|
1123
|
-
export {MutationEvent_2 as MutationEvent}
|
|
1124
1123
|
|
|
1125
1124
|
/** @internal */
|
|
1126
1125
|
export declare type MutationOperation = 'create' | 'delete' | 'update' | 'none'
|
package/dist/index.browser.js
CHANGED
|
@@ -100,8 +100,7 @@ function defineHttpRequest(envMiddleware2) {
|
|
|
100
100
|
]);
|
|
101
101
|
}
|
|
102
102
|
function shouldRetry(err, attempt, options) {
|
|
103
|
-
if (options.maxRetries === 0)
|
|
104
|
-
return !1;
|
|
103
|
+
if (options.maxRetries === 0) return !1;
|
|
105
104
|
const isSafe = options.method === "GET" || options.method === "HEAD", isQuery = (options.uri || options.url).startsWith("/data/query"), isRetriableResponse = err.response && (err.response.statusCode === 429 || err.response.statusCode === 502 || err.response.statusCode === 503);
|
|
106
105
|
return (isSafe || isQuery) && isRetriableResponse ? !0 : retry.shouldRetry(err, attempt, options);
|
|
107
106
|
}
|