@sanity/client 7.19.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.
@@ -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 === !0 && (query.onlyExplicitMembership = "true"), _request(this.#client, this.#httpRequest, { uri, query });
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 === !0 && (query.onlyExplicitMembership = "true"), rxjs.lastValueFrom(_request(this.#client, this.#httpRequest, { uri, query }));
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