@sanity/client 6.21.2 → 6.21.3
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/index.browser.cjs +12 -2
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +10 -0
- package/dist/index.browser.d.ts +10 -0
- package/dist/index.browser.js +12 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/SanityClient.ts +2 -2
- package/src/data/dataMethods.ts +14 -4
- package/src/types.ts +8 -0
- package/umd/sanityClient.js +12 -2
- package/umd/sanityClient.min.js +1 -1
package/dist/index.cjs
CHANGED
|
@@ -645,14 +645,24 @@ function _fetch(client, httpRequest, _stega, query, _params = {}, options = {})
|
|
|
645
645
|
) : $request.pipe(operators.map(mapResponse));
|
|
646
646
|
}
|
|
647
647
|
function _getDocument(client, httpRequest, id, opts = {}) {
|
|
648
|
-
const options = {
|
|
648
|
+
const options = {
|
|
649
|
+
uri: _getDataUrl(client, "doc", id),
|
|
650
|
+
json: !0,
|
|
651
|
+
tag: opts.tag,
|
|
652
|
+
signal: opts.signal
|
|
653
|
+
};
|
|
649
654
|
return _requestObservable(client, httpRequest, options).pipe(
|
|
650
655
|
operators.filter(isResponse),
|
|
651
656
|
operators.map((event) => event.body.documents && event.body.documents[0])
|
|
652
657
|
);
|
|
653
658
|
}
|
|
654
659
|
function _getDocuments(client, httpRequest, ids, opts = {}) {
|
|
655
|
-
const options = {
|
|
660
|
+
const options = {
|
|
661
|
+
uri: _getDataUrl(client, "doc", ids.join(",")),
|
|
662
|
+
json: !0,
|
|
663
|
+
tag: opts.tag,
|
|
664
|
+
signal: opts.signal
|
|
665
|
+
};
|
|
656
666
|
return _requestObservable(client, httpRequest, options).pipe(
|
|
657
667
|
operators.filter(isResponse),
|
|
658
668
|
operators.map((event) => {
|
|
@@ -1513,7 +1523,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1513
1523
|
return printNoDefaultExport(), createClient2(config);
|
|
1514
1524
|
};
|
|
1515
1525
|
}
|
|
1516
|
-
var name = "@sanity/client", version = "6.21.
|
|
1526
|
+
var name = "@sanity/client", version = "6.21.3";
|
|
1517
1527
|
const middleware = [
|
|
1518
1528
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1519
1529
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|