@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.cjs CHANGED
@@ -1603,9 +1603,18 @@ class ObservableProjectsClient {
1603
1603
  constructor(client, httpRequest) {
1604
1604
  this.#client = client, this.#httpRequest = httpRequest;
1605
1605
  }
1606
+ /**
1607
+ * Fetch a list of projects the authenticated user has access to.
1608
+ *
1609
+ * @param options - Options for the list request
1610
+ * - `includeMembers` - Whether to include members in the response (default: true)
1611
+ * - `includeFeatures` - Whether to include features in the response (default: true)
1612
+ * - `organizationId` - ID of the organization to fetch projects for
1613
+ * - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
1614
+ */
1606
1615
  list(options) {
1607
1616
  const query = {}, uri = "/projects";
1608
- 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 });
1617
+ 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 });
1609
1618
  }
1610
1619
  /**
1611
1620
  * Fetch a project by project ID
@@ -1622,9 +1631,20 @@ class ProjectsClient {
1622
1631
  constructor(client, httpRequest) {
1623
1632
  this.#client = client, this.#httpRequest = httpRequest;
1624
1633
  }
1634
+ /**
1635
+ * Fetch a list of projects the authenticated user has access to.
1636
+ *
1637
+ * @param options - Options for the list request
1638
+ * - `includeMembers` - Whether to include members in the response (default: true)
1639
+ * - `includeFeatures` - Whether to include features in the response (default: true)
1640
+ * - `organizationId` - ID of the organization to fetch projects for
1641
+ * - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
1642
+ */
1625
1643
  list(options) {
1626
1644
  const query = {}, uri = "/projects";
1627
- 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 }));
1645
+ 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(
1646
+ _request(this.#client, this.#httpRequest, { uri, query })
1647
+ );
1628
1648
  }
1629
1649
  /**
1630
1650
  * Fetch a project by project ID
@@ -2749,7 +2769,7 @@ function defineDeprecatedCreateClient(createClient2) {
2749
2769
  return config.printNoDefaultExport(), createClient2(config$1);
2750
2770
  };
2751
2771
  }
2752
- var name = "@sanity/client", version = "7.18.0";
2772
+ var name = "@sanity/client", version = "7.20.0";
2753
2773
  const middleware = [
2754
2774
  middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
2755
2775
  middleware$1.headers({ "User-Agent": `${name} ${version}` }),