@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.
Files changed (44) hide show
  1. package/dist/_chunks-cjs/resolveEditInfo.cjs +1 -2
  2. package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
  3. package/dist/_chunks-cjs/stegaClean.cjs +1 -2
  4. package/dist/_chunks-cjs/stegaClean.cjs.map +1 -1
  5. package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +1 -2
  6. package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
  7. package/dist/_chunks-es/resolveEditInfo.js +1 -2
  8. package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
  9. package/dist/_chunks-es/stegaClean.js +1 -2
  10. package/dist/_chunks-es/stegaClean.js.map +1 -1
  11. package/dist/_chunks-es/stegaEncodeSourceMap.js +1 -2
  12. package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
  13. package/dist/csm.cjs +1 -2
  14. package/dist/csm.cjs.map +1 -1
  15. package/dist/csm.d.cts +99 -34
  16. package/dist/csm.d.ts +99 -34
  17. package/dist/csm.js +1 -2
  18. package/dist/csm.js.map +1 -1
  19. package/dist/index.browser.cjs +1 -2
  20. package/dist/index.browser.cjs.map +1 -1
  21. package/dist/index.browser.d.cts +3 -4
  22. package/dist/index.browser.d.ts +3 -4
  23. package/dist/index.browser.js +1 -2
  24. package/dist/index.browser.js.map +1 -1
  25. package/dist/index.cjs +2 -3
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +3 -4
  28. package/dist/index.d.ts +3 -4
  29. package/dist/index.js +2 -3
  30. package/dist/index.js.map +1 -1
  31. package/dist/stega.browser.d.cts +3312 -98
  32. package/dist/stega.browser.d.ts +3312 -98
  33. package/dist/stega.d.cts +3312 -98
  34. package/dist/stega.d.ts +3312 -98
  35. package/package.json +16 -16
  36. package/src/csm/types.ts +1 -1
  37. package/src/http/request.ts +1 -1
  38. package/src/index.browser.ts +1 -1
  39. package/src/index.ts +1 -1
  40. package/src/stega/stegaEncodeSourceMap.ts +5 -1
  41. package/src/util/pick.ts +1 -1
  42. package/src/warnings.ts +1 -1
  43. package/umd/sanityClient.js +99 -115
  44. package/umd/sanityClient.min.js +2 -2
@@ -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<MutationEvent_2<R>>
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
- | MutationEvent_2<R>
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 MutationEvent_2<R extends Record<string, Any> = Record<string, Any>> = {
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'
@@ -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<MutationEvent_2<R>>
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
- | MutationEvent_2<R>
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 MutationEvent_2<R extends Record<string, Any> = Record<string, Any>> = {
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'
@@ -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
  }