@sanity/client 6.27.1 → 6.27.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/LICENSE +1 -1
- package/dist/index.browser.cjs +2 -6
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +10 -4
- package/dist/index.browser.d.ts +10 -4
- package/dist/index.browser.js +2 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +3 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +10 -4
- package/dist/stega.browser.d.ts +10 -4
- package/dist/stega.d.cts +10 -4
- package/dist/stega.d.ts +10 -4
- package/package.json +14 -10
- package/src/data/live.ts +4 -9
- package/src/types.ts +4 -1
- package/umd/sanityClient.js +2 -6
- package/umd/sanityClient.min.js +2 -2
package/LICENSE
CHANGED
package/dist/index.browser.cjs
CHANGED
|
@@ -1044,14 +1044,14 @@ function _listen(query, params, opts = {}) {
|
|
|
1044
1044
|
)
|
|
1045
1045
|
);
|
|
1046
1046
|
}
|
|
1047
|
-
const requiredApiVersion = "2021-03-
|
|
1047
|
+
const requiredApiVersion = "2021-03-25";
|
|
1048
1048
|
class LiveClient {
|
|
1049
1049
|
#client;
|
|
1050
1050
|
constructor(client) {
|
|
1051
1051
|
this.#client = client;
|
|
1052
1052
|
}
|
|
1053
1053
|
/**
|
|
1054
|
-
* Requires `apiVersion` to be `2021-03-
|
|
1054
|
+
* Requires `apiVersion` to be `2021-03-25` or later.
|
|
1055
1055
|
*/
|
|
1056
1056
|
events({
|
|
1057
1057
|
includeDrafts = !1,
|
|
@@ -1072,10 +1072,6 @@ class LiveClient {
|
|
|
1072
1072
|
throw new Error(
|
|
1073
1073
|
"The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role."
|
|
1074
1074
|
);
|
|
1075
|
-
if (includeDrafts && apiVersion !== "X")
|
|
1076
|
-
throw new Error(
|
|
1077
|
-
"The live events API requires API version X when 'includeDrafts: true'. This API is experimental and may change or even be removed."
|
|
1078
|
-
);
|
|
1079
1075
|
const path = _getDataUrl(this.#client, "live/events"), url = new URL(this.#client.getUrl(path, !1)), tag = _tag && requestTagPrefix ? [requestTagPrefix, _tag].join(".") : _tag;
|
|
1080
1076
|
tag && url.searchParams.set("tag", tag), includeDrafts && url.searchParams.set("includeDrafts", "true");
|
|
1081
1077
|
const esOptions = {};
|