@sanity/client 7.18.0 → 7.20.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/dist/index.browser.cjs +22 -2
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +57 -24
- package/dist/index.browser.d.ts +57 -24
- package/dist/index.browser.js +22 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +23 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -24
- package/dist/index.d.ts +57 -24
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/media-library.cjs.map +1 -1
- package/dist/media-library.d.cts +27 -0
- package/dist/media-library.d.ts +27 -0
- package/dist/media-library.js.map +1 -1
- package/dist/stega.browser.d.cts +57 -24
- package/dist/stega.browser.d.ts +57 -24
- package/dist/stega.d.cts +57 -24
- package/dist/stega.d.ts +57 -24
- package/package.json +1 -1
- package/src/media-library.ts +1 -0
- package/src/projects/ProjectsClient.ts +37 -36
- package/src/types.ts +28 -0
- package/umd/sanityClient.js +22 -2
- package/umd/sanityClient.min.js +2 -2
package/dist/index.browser.cjs
CHANGED
|
@@ -1787,9 +1787,18 @@ class ObservableProjectsClient {
|
|
|
1787
1787
|
constructor(client, httpRequest) {
|
|
1788
1788
|
this.#client = client, this.#httpRequest = httpRequest;
|
|
1789
1789
|
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Fetch a list of projects the authenticated user has access to.
|
|
1792
|
+
*
|
|
1793
|
+
* @param options - Options for the list request
|
|
1794
|
+
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
1795
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
1796
|
+
* - `organizationId` - ID of the organization to fetch projects for
|
|
1797
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
1798
|
+
*/
|
|
1790
1799
|
list(options) {
|
|
1791
1800
|
const query = {}, uri = "/projects";
|
|
1792
|
-
return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), options?.onlyExplicitMembership
|
|
1801
|
+
return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.includeFeatures === !1 && (query.includeFeatures = "false"), options?.organizationId && (query.organizationId = options.organizationId), options?.onlyExplicitMembership && (query.onlyExplicitMembership = "true"), _request(this.#client, this.#httpRequest, { uri, query });
|
|
1793
1802
|
}
|
|
1794
1803
|
/**
|
|
1795
1804
|
* Fetch a project by project ID
|
|
@@ -1806,9 +1815,20 @@ class ProjectsClient {
|
|
|
1806
1815
|
constructor(client, httpRequest) {
|
|
1807
1816
|
this.#client = client, this.#httpRequest = httpRequest;
|
|
1808
1817
|
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Fetch a list of projects the authenticated user has access to.
|
|
1820
|
+
*
|
|
1821
|
+
* @param options - Options for the list request
|
|
1822
|
+
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
1823
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
1824
|
+
* - `organizationId` - ID of the organization to fetch projects for
|
|
1825
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
1826
|
+
*/
|
|
1809
1827
|
list(options) {
|
|
1810
1828
|
const query = {}, uri = "/projects";
|
|
1811
|
-
return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), options?.onlyExplicitMembership
|
|
1829
|
+
return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.includeFeatures === !1 && (query.includeFeatures = "false"), options?.organizationId && (query.organizationId = options.organizationId), options?.onlyExplicitMembership && (query.onlyExplicitMembership = "true"), rxjs.lastValueFrom(
|
|
1830
|
+
_request(this.#client, this.#httpRequest, { uri, query })
|
|
1831
|
+
);
|
|
1812
1832
|
}
|
|
1813
1833
|
/**
|
|
1814
1834
|
* Fetch a project by project ID
|