@sanity/client 7.0.0 → 7.0.1-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/dist/index.js CHANGED
@@ -1226,14 +1226,8 @@ class ObservableSanityClient {
1226
1226
  live;
1227
1227
  projects;
1228
1228
  users;
1229
- /**
1230
- * Private properties
1231
- */
1232
1229
  #clientConfig;
1233
1230
  #httpRequest;
1234
- /**
1235
- * Instance properties
1236
- */
1237
1231
  listen = _listen;
1238
1232
  constructor(httpRequest, config = defaultConfig) {
1239
1233
  this.config(config), this.#httpRequest = httpRequest, this.assets = new ObservableAssetsClient(this, this.#httpRequest), this.datasets = new ObservableDatasetsClient(this, this.#httpRequest), this.live = new LiveClient(this), this.projects = new ObservableProjectsClient(this, this.#httpRequest), this.users = new ObservableUsersClient(this, this.#httpRequest);
@@ -1379,14 +1373,8 @@ class SanityClient {
1379
1373
  * Observable version of the Sanity client, with the same configuration as the promise-based one
1380
1374
  */
1381
1375
  observable;
1382
- /**
1383
- * Private properties
1384
- */
1385
1376
  #clientConfig;
1386
1377
  #httpRequest;
1387
- /**
1388
- * Instance properties
1389
- */
1390
1378
  listen = _listen;
1391
1379
  constructor(httpRequest, config = defaultConfig) {
1392
1380
  this.config(config), this.#httpRequest = httpRequest, this.assets = new AssetsClient(this, this.#httpRequest), this.datasets = new DatasetsClient(this, this.#httpRequest), this.live = new LiveClient(this), this.projects = new ProjectsClient(this, this.#httpRequest), this.users = new UsersClient(this, this.#httpRequest), this.observable = new ObservableSanityClient(httpRequest, config);
@@ -1483,8 +1471,8 @@ class SanityClient {
1483
1471
  * @param operations - Optional object of patch operations to initialize the patch instance with
1484
1472
  * @returns Patch instance - call `.commit()` to perform the operations defined
1485
1473
  */
1486
- patch(documentId, operations) {
1487
- return new Patch(documentId, operations, this);
1474
+ patch(selection, operations) {
1475
+ return new Patch(selection, operations, this);
1488
1476
  }
1489
1477
  /**
1490
1478
  * Create a new transaction of mutations
@@ -1565,7 +1553,7 @@ function defineDeprecatedCreateClient(createClient2) {
1565
1553
  return printNoDefaultExport(), createClient2(config);
1566
1554
  };
1567
1555
  }
1568
- var name = "@sanity/client", version = "7.0.0";
1556
+ var name = "@sanity/client", version = "7.0.1-canary.0";
1569
1557
  const middleware = [
1570
1558
  debug({ verbose: !0, namespace: "sanity:client" }),
1571
1559
  headers({ "User-Agent": `${name} ${version}` }),