@sanity/client 7.1.0-views.1 → 7.1.0-views.2
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 +142 -0
- package/dist/index.browser.cjs +1 -1
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +3 -1
- package/dist/index.browser.d.ts +3 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +3 -1
- package/dist/stega.browser.d.ts +3 -1
- package/dist/stega.d.cts +3 -1
- package/dist/stega.d.ts +3 -1
- package/dist/views.cjs +11 -3
- package/dist/views.cjs.map +1 -1
- package/dist/views.d.cts +4 -1
- package/dist/views.d.ts +4 -1
- package/dist/views.js +11 -3
- package/dist/views.js.map +1 -1
- package/package.json +1 -1
- package/src/types.ts +3 -1
- package/src/views/index.ts +17 -3
- package/umd/sanityClient.js +1 -1
- package/umd/sanityClient.min.js +1 -1
package/dist/index.browser.d.cts
CHANGED
|
@@ -6081,7 +6081,8 @@ export declare type ViewConnectionOverride = {
|
|
|
6081
6081
|
|
|
6082
6082
|
/** @public */
|
|
6083
6083
|
export declare type ViewOverride = {
|
|
6084
|
-
|
|
6084
|
+
resourceType: ViewResourceType.View
|
|
6085
|
+
resourceId: string
|
|
6085
6086
|
connections: ViewConnectionOverride[]
|
|
6086
6087
|
}
|
|
6087
6088
|
|
|
@@ -6094,6 +6095,7 @@ export declare type ViewQueryOptions = Pick<
|
|
|
6094
6095
|
/** @public */
|
|
6095
6096
|
export declare enum ViewResourceType {
|
|
6096
6097
|
Dataset = 'dataset',
|
|
6098
|
+
View = 'view',
|
|
6097
6099
|
}
|
|
6098
6100
|
|
|
6099
6101
|
/**
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -6081,7 +6081,8 @@ export declare type ViewConnectionOverride = {
|
|
|
6081
6081
|
|
|
6082
6082
|
/** @public */
|
|
6083
6083
|
export declare type ViewOverride = {
|
|
6084
|
-
|
|
6084
|
+
resourceType: ViewResourceType.View
|
|
6085
|
+
resourceId: string
|
|
6085
6086
|
connections: ViewConnectionOverride[]
|
|
6086
6087
|
}
|
|
6087
6088
|
|
|
@@ -6094,6 +6095,7 @@ export declare type ViewQueryOptions = Pick<
|
|
|
6094
6095
|
/** @public */
|
|
6095
6096
|
export declare enum ViewResourceType {
|
|
6096
6097
|
Dataset = 'dataset',
|
|
6098
|
+
View = 'view',
|
|
6097
6099
|
}
|
|
6098
6100
|
|
|
6099
6101
|
/**
|
package/dist/index.browser.js
CHANGED
|
@@ -281,7 +281,7 @@ const VALID_ASSET_TYPES = ["image", "file"], VALID_INSERT_LOCATIONS = ["before",
|
|
|
281
281
|
if (config["~experimental_resource"])
|
|
282
282
|
throw new Error(`\`${service}\` does not support resource-based operations`);
|
|
283
283
|
};
|
|
284
|
-
var ViewResourceType = /* @__PURE__ */ ((ViewResourceType2) => (ViewResourceType2.Dataset = "dataset", ViewResourceType2))(ViewResourceType || {});
|
|
284
|
+
var ViewResourceType = /* @__PURE__ */ ((ViewResourceType2) => (ViewResourceType2.Dataset = "dataset", ViewResourceType2.View = "view", ViewResourceType2))(ViewResourceType || {});
|
|
285
285
|
function once(fn) {
|
|
286
286
|
let didCall = !1, returnValue;
|
|
287
287
|
return (...args) => (didCall || (returnValue = fn(...args), didCall = !0), returnValue);
|