@sanity/client 6.21.1 → 6.21.3-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/README.md CHANGED
@@ -101,7 +101,7 @@ export async function updateDocumentTitle(_id, title) {
101
101
  - [2. Cancel a request by unsubscribing from the Observable](#2-cancel-a-request-by-unsubscribing-from-the-observable)
102
102
  - [Get client configuration](#get-client-configuration)
103
103
  - [Set client configuration](#set-client-configuration)
104
- - [Server Side Actions](#server-side-actions)
104
+ - [Actions](#actions)
105
105
  - [Action options](#action-options)
106
106
  - [Create Action](#create-action)
107
107
  - [Delete Action](#delete-action)
@@ -1159,9 +1159,9 @@ client.mutate(transaction)
1159
1159
 
1160
1160
  An important note on this approach is that you cannot call `commit()` on transactions or patches instantiated this way, instead you have to pass them to `client.mutate()`
1161
1161
 
1162
- ### Server Side Actions
1162
+ ### Actions
1163
1163
 
1164
- The Server Side Actions API provides a new interface for creating, updating and publishing documents. It is a wrapper around the [Server Side Actions API](https://www.sanity.io/docs/http-actions).
1164
+ The Actions API provides a new interface for creating, updating and publishing documents. It is a wrapper around the [Actions API](https://www.sanity.io/docs/http-actions).
1165
1165
 
1166
1166
  This API is only available from API version `v2024-05-23`.
1167
1167
 
@@ -660,14 +660,24 @@ function _fetch(client, httpRequest, _stega, query, _params = {}, options = {})
660
660
  ) : $request.pipe(operators.map(mapResponse));
661
661
  }
662
662
  function _getDocument(client, httpRequest, id, opts = {}) {
663
- const options = { uri: _getDataUrl(client, "doc", id), json: !0, tag: opts.tag };
663
+ const options = {
664
+ uri: _getDataUrl(client, "doc", id),
665
+ json: !0,
666
+ tag: opts.tag,
667
+ signal: opts.signal
668
+ };
664
669
  return _requestObservable(client, httpRequest, options).pipe(
665
670
  operators.filter(isResponse),
666
671
  operators.map((event) => event.body.documents && event.body.documents[0])
667
672
  );
668
673
  }
669
674
  function _getDocuments(client, httpRequest, ids, opts = {}) {
670
- const options = { uri: _getDataUrl(client, "doc", ids.join(",")), json: !0, tag: opts.tag };
675
+ const options = {
676
+ uri: _getDataUrl(client, "doc", ids.join(",")),
677
+ json: !0,
678
+ tag: opts.tag,
679
+ signal: opts.signal
680
+ };
671
681
  return _requestObservable(client, httpRequest, options).pipe(
672
682
  operators.filter(isResponse),
673
683
  operators.map((event) => {