@sanity/client 5.0.0-esm.8 → 5.0.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
@@ -1,11 +1,10 @@
1
1
  import { debug, headers, retry, jsonRequest, jsonResponse, progress, observable } from 'get-it/middleware';
2
2
  import { getIt } from 'get-it';
3
3
  import { Observable, lastValueFrom } from 'rxjs';
4
- import { BaseError } from 'make-error';
5
4
  import { map, filter } from 'rxjs/operators';
6
5
  import polyfilledEventSource from '@sanity/eventsource';
7
6
  var name = "@sanity/client";
8
- var version = "5.0.0-esm.8";
7
+ var version = "5.0.0";
9
8
  const middleware = [debug({
10
9
  verbose: true,
11
10
  namespace: "sanity:client"
@@ -14,7 +13,7 @@ const middleware = [debug({
14
13
  }), retry({
15
14
  maxRetries: 3
16
15
  })];
17
- class ClientError extends BaseError {
16
+ class ClientError extends Error {
18
17
  constructor(res) {
19
18
  const props = extractErrorProps(res);
20
19
  super(props.message);
@@ -22,7 +21,7 @@ class ClientError extends BaseError {
22
21
  Object.assign(this, props);
23
22
  }
24
23
  }
25
- class ServerError extends BaseError {
24
+ class ServerError extends Error {
26
25
  constructor(res) {
27
26
  const props = extractErrorProps(res);
28
27
  super(props.message);
@@ -188,60 +187,50 @@ const requestTag = tag => {
188
187
  }
189
188
  return tag;
190
189
  };
191
- const enc = encodeURIComponent;
192
190
  var encodeQueryString = _ref => {
193
191
  let {
194
192
  query,
195
193
  params = {},
196
194
  options = {}
197
195
  } = _ref;
196
+ const searchParams = new URLSearchParams();
198
197
  const {
199
198
  tag,
200
199
  ...opts
201
200
  } = options;
202
- const q = "query=".concat(enc(query));
203
- const base = tag ? "?tag=".concat(enc(tag), "&").concat(q) : "?".concat(q);
204
- const qString = Object.keys(params).reduce((qs, param) => "".concat(qs, "&").concat(enc("$".concat(param)), "=").concat(enc(JSON.stringify(params[param]))), base);
205
- return Object.keys(opts).reduce((qs, option) => {
206
- return options[option] ? "".concat(qs, "&").concat(enc(option), "=").concat(enc(options[option])) : qs;
207
- }, qString);
201
+ if (tag) searchParams.set("tag", tag);
202
+ searchParams.set("query", query);
203
+ for (const [key, value] of Object.entries(params)) {
204
+ searchParams.set("$".concat(key), JSON.stringify(value));
205
+ }
206
+ for (const [key, value] of Object.entries(opts)) {
207
+ if (value) searchParams.set(key, "".concat(value));
208
+ }
209
+ return "?".concat(searchParams);
208
210
  };
209
- var __accessCheck$7 = (obj, member, msg) => {
211
+ var __accessCheck$6 = (obj, member, msg) => {
210
212
  if (!member.has(obj)) throw TypeError("Cannot " + msg);
211
213
  };
212
- var __privateGet$7 = (obj, member, getter) => {
213
- __accessCheck$7(obj, member, "read from private field");
214
+ var __privateGet$6 = (obj, member, getter) => {
215
+ __accessCheck$6(obj, member, "read from private field");
214
216
  return getter ? getter.call(obj) : member.get(obj);
215
217
  };
216
- var __privateAdd$7 = (obj, member, value) => {
218
+ var __privateAdd$6 = (obj, member, value) => {
217
219
  if (member.has(obj)) throw TypeError("Cannot add the same private member more than once");
218
220
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
219
221
  };
220
- var __privateSet$7 = (obj, member, value, setter) => {
221
- __accessCheck$7(obj, member, "write to private field");
222
+ var __privateSet$6 = (obj, member, value, setter) => {
223
+ __accessCheck$6(obj, member, "write to private field");
222
224
  setter ? setter.call(obj, value) : member.set(obj, value);
223
225
  return value;
224
226
  };
225
- var _client$6, _client2$6;
227
+ var _client$5, _client2$5;
226
228
  class BasePatch {
227
229
  constructor(selection) {
228
230
  let operations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
229
231
  this.selection = selection;
230
232
  this.operations = operations;
231
233
  }
232
- /**
233
- * DEPRECATED: Don't use.
234
- * The operation is added to the current patch, ready to be commited by `commit()`
235
- *
236
- * @deprecated - Don't use.
237
- * @param attrs - Attributes to replace
238
- */
239
- replace(attrs) {
240
- validateObject("replace", attrs);
241
- return this._set("set", {
242
- $: attrs
243
- });
244
- }
245
234
  /**
246
235
  * Sets the given attributes to the document. Does NOT merge objects.
247
236
  * The operation is added to the current patch, ready to be commited by `commit()`
@@ -395,8 +384,8 @@ class BasePatch {
395
384
  const _ObservablePatch = class extends BasePatch {
396
385
  constructor(selection, operations, client) {
397
386
  super(selection, operations);
398
- __privateAdd$7(this, _client$6, void 0);
399
- __privateSet$7(this, _client$6, client);
387
+ __privateAdd$6(this, _client$5, void 0);
388
+ __privateSet$6(this, _client$5, client);
400
389
  }
401
390
  /**
402
391
  * Clones the patch
@@ -404,10 +393,10 @@ const _ObservablePatch = class extends BasePatch {
404
393
  clone() {
405
394
  return new _ObservablePatch(this.selection, {
406
395
  ...this.operations
407
- }, __privateGet$7(this, _client$6));
396
+ }, __privateGet$6(this, _client$5));
408
397
  }
409
398
  commit(options) {
410
- if (!__privateGet$7(this, _client$6)) {
399
+ if (!__privateGet$6(this, _client$5)) {
411
400
  throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");
412
401
  }
413
402
  const returnFirst = typeof this.selection === "string";
@@ -415,18 +404,18 @@ const _ObservablePatch = class extends BasePatch {
415
404
  returnFirst,
416
405
  returnDocuments: true
417
406
  }, options);
418
- return __privateGet$7(this, _client$6).mutate({
407
+ return __privateGet$6(this, _client$5).mutate({
419
408
  patch: this.serialize()
420
409
  }, opts);
421
410
  }
422
411
  };
423
412
  let ObservablePatch = _ObservablePatch;
424
- _client$6 = new WeakMap();
413
+ _client$5 = new WeakMap();
425
414
  const _Patch = class extends BasePatch {
426
415
  constructor(selection, operations, client) {
427
416
  super(selection, operations);
428
- __privateAdd$7(this, _client2$6, void 0);
429
- __privateSet$7(this, _client2$6, client);
417
+ __privateAdd$6(this, _client2$5, void 0);
418
+ __privateSet$6(this, _client2$5, client);
430
419
  }
431
420
  /**
432
421
  * Clones the patch
@@ -434,10 +423,10 @@ const _Patch = class extends BasePatch {
434
423
  clone() {
435
424
  return new _Patch(this.selection, {
436
425
  ...this.operations
437
- }, __privateGet$7(this, _client2$6));
426
+ }, __privateGet$6(this, _client2$5));
438
427
  }
439
428
  commit(options) {
440
- if (!__privateGet$7(this, _client2$6)) {
429
+ if (!__privateGet$6(this, _client2$5)) {
441
430
  throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");
442
431
  }
443
432
  const returnFirst = typeof this.selection === "string";
@@ -445,30 +434,30 @@ const _Patch = class extends BasePatch {
445
434
  returnFirst,
446
435
  returnDocuments: true
447
436
  }, options);
448
- return __privateGet$7(this, _client2$6).mutate({
437
+ return __privateGet$6(this, _client2$5).mutate({
449
438
  patch: this.serialize()
450
439
  }, opts);
451
440
  }
452
441
  };
453
442
  let Patch = _Patch;
454
- _client2$6 = new WeakMap();
455
- var __accessCheck$6 = (obj, member, msg) => {
443
+ _client2$5 = new WeakMap();
444
+ var __accessCheck$5 = (obj, member, msg) => {
456
445
  if (!member.has(obj)) throw TypeError("Cannot " + msg);
457
446
  };
458
- var __privateGet$6 = (obj, member, getter) => {
459
- __accessCheck$6(obj, member, "read from private field");
447
+ var __privateGet$5 = (obj, member, getter) => {
448
+ __accessCheck$5(obj, member, "read from private field");
460
449
  return getter ? getter.call(obj) : member.get(obj);
461
450
  };
462
- var __privateAdd$6 = (obj, member, value) => {
451
+ var __privateAdd$5 = (obj, member, value) => {
463
452
  if (member.has(obj)) throw TypeError("Cannot add the same private member more than once");
464
453
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
465
454
  };
466
- var __privateSet$6 = (obj, member, value, setter) => {
467
- __accessCheck$6(obj, member, "write to private field");
455
+ var __privateSet$5 = (obj, member, value, setter) => {
456
+ __accessCheck$5(obj, member, "write to private field");
468
457
  setter ? setter.call(obj, value) : member.set(obj, value);
469
458
  return value;
470
459
  };
471
- var _client$5, _client2$5;
460
+ var _client$4, _client2$4;
472
461
  const defaultMutateOptions = {
473
462
  returnDocuments: false
474
463
  };
@@ -567,20 +556,20 @@ class BaseTransaction {
567
556
  const _Transaction = class extends BaseTransaction {
568
557
  constructor(operations, client, transactionId) {
569
558
  super(operations, transactionId);
570
- __privateAdd$6(this, _client$5, void 0);
571
- __privateSet$6(this, _client$5, client);
559
+ __privateAdd$5(this, _client$4, void 0);
560
+ __privateSet$5(this, _client$4, client);
572
561
  }
573
562
  /**
574
563
  * Clones the transaction
575
564
  */
576
565
  clone() {
577
- return new _Transaction([...this.operations], __privateGet$6(this, _client$5), this.trxId);
566
+ return new _Transaction([...this.operations], __privateGet$5(this, _client$4), this.trxId);
578
567
  }
579
568
  commit(options) {
580
- if (!__privateGet$6(this, _client$5)) {
569
+ if (!__privateGet$5(this, _client$4)) {
581
570
  throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");
582
571
  }
583
- return __privateGet$6(this, _client$5).mutate(this.serialize(), Object.assign({
572
+ return __privateGet$5(this, _client$4).mutate(this.serialize(), Object.assign({
584
573
  transactionId: this.trxId
585
574
  }, defaultMutateOptions, options || {}));
586
575
  }
@@ -593,7 +582,7 @@ const _Transaction = class extends BaseTransaction {
593
582
  });
594
583
  }
595
584
  if (isBuilder) {
596
- const patch = patchOps(new Patch(patchOrDocumentId, {}, __privateGet$6(this, _client$5)));
585
+ const patch = patchOps(new Patch(patchOrDocumentId, {}, __privateGet$5(this, _client$4)));
597
586
  if (!(patch instanceof Patch)) {
598
587
  throw new Error("function passed to `patch()` must return the patch");
599
588
  }
@@ -610,24 +599,24 @@ const _Transaction = class extends BaseTransaction {
610
599
  }
611
600
  };
612
601
  let Transaction = _Transaction;
613
- _client$5 = new WeakMap();
602
+ _client$4 = new WeakMap();
614
603
  const _ObservableTransaction = class extends BaseTransaction {
615
604
  constructor(operations, client, transactionId) {
616
605
  super(operations, transactionId);
617
- __privateAdd$6(this, _client2$5, void 0);
618
- __privateSet$6(this, _client2$5, client);
606
+ __privateAdd$5(this, _client2$4, void 0);
607
+ __privateSet$5(this, _client2$4, client);
619
608
  }
620
609
  /**
621
610
  * Clones the transaction
622
611
  */
623
612
  clone() {
624
- return new _ObservableTransaction([...this.operations], __privateGet$6(this, _client2$5), this.trxId);
613
+ return new _ObservableTransaction([...this.operations], __privateGet$5(this, _client2$4), this.trxId);
625
614
  }
626
615
  commit(options) {
627
- if (!__privateGet$6(this, _client2$5)) {
616
+ if (!__privateGet$5(this, _client2$4)) {
628
617
  throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");
629
618
  }
630
- return __privateGet$6(this, _client2$5).mutate(this.serialize(), Object.assign({
619
+ return __privateGet$5(this, _client2$4).mutate(this.serialize(), Object.assign({
631
620
  transactionId: this.trxId
632
621
  }, defaultMutateOptions, options || {}));
633
622
  }
@@ -640,7 +629,7 @@ const _ObservableTransaction = class extends BaseTransaction {
640
629
  });
641
630
  }
642
631
  if (isBuilder) {
643
- const patch = patchOps(new ObservablePatch(patchOrDocumentId, {}, __privateGet$6(this, _client2$5)));
632
+ const patch = patchOps(new ObservablePatch(patchOrDocumentId, {}, __privateGet$5(this, _client2$4)));
644
633
  if (!(patch instanceof ObservablePatch)) {
645
634
  throw new Error("function passed to `patch()` must return the patch");
646
635
  }
@@ -657,7 +646,7 @@ const _ObservableTransaction = class extends BaseTransaction {
657
646
  }
658
647
  };
659
648
  let ObservableTransaction = _ObservableTransaction;
660
- _client2$5 = new WeakMap();
649
+ _client2$4 = new WeakMap();
661
650
  const excludeFalsey = (param, defValue) => {
662
651
  const value = typeof param === "undefined" ? defValue : param;
663
652
  return param === false ? void 0 : value;
@@ -805,7 +794,9 @@ function _requestObservable(client, httpRequest, options) {
805
794
  const reqOptions = getRequestOptions(config, Object.assign({}, options, {
806
795
  url: _getUrl(client, uri, useCdn)
807
796
  }));
808
- return new Observable(subscriber => httpRequest(reqOptions, config.requester).subscribe(subscriber));
797
+ return new Observable(subscriber =>
798
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- the typings thinks it's optional because it's not required to specify it when calling createClient, but it's always defined in practice since SanityClient provides a default
799
+ httpRequest(reqOptions, config.requester).subscribe(subscriber));
809
800
  }
810
801
  function _request(client, httpRequest, options) {
811
802
  const observable = _requestObservable(client, httpRequest, options).pipe(filter(event => event.type === "response"), map(event => event.body));
@@ -827,50 +818,50 @@ function _getUrl(client, uri) {
827
818
  const base = canUseCdn ? cdnUrl : url;
828
819
  return "".concat(base, "/").concat(uri.replace(/^\//, ""));
829
820
  }
830
- var __accessCheck$5 = (obj, member, msg) => {
821
+ var __accessCheck$4 = (obj, member, msg) => {
831
822
  if (!member.has(obj)) throw TypeError("Cannot " + msg);
832
823
  };
833
- var __privateGet$5 = (obj, member, getter) => {
834
- __accessCheck$5(obj, member, "read from private field");
824
+ var __privateGet$4 = (obj, member, getter) => {
825
+ __accessCheck$4(obj, member, "read from private field");
835
826
  return getter ? getter.call(obj) : member.get(obj);
836
827
  };
837
- var __privateAdd$5 = (obj, member, value) => {
828
+ var __privateAdd$4 = (obj, member, value) => {
838
829
  if (member.has(obj)) throw TypeError("Cannot add the same private member more than once");
839
830
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
840
831
  };
841
- var __privateSet$5 = (obj, member, value, setter) => {
842
- __accessCheck$5(obj, member, "write to private field");
832
+ var __privateSet$4 = (obj, member, value, setter) => {
833
+ __accessCheck$4(obj, member, "write to private field");
843
834
  setter ? setter.call(obj, value) : member.set(obj, value);
844
835
  return value;
845
836
  };
846
- var _client$4, _httpRequest$5, _client2$4, _httpRequest2$5;
837
+ var _client$3, _httpRequest$4, _client2$3, _httpRequest2$4;
847
838
  class ObservableAssetsClient {
848
839
  constructor(client, httpRequest) {
849
- __privateAdd$5(this, _client$4, void 0);
850
- __privateAdd$5(this, _httpRequest$5, void 0);
851
- __privateSet$5(this, _client$4, client);
852
- __privateSet$5(this, _httpRequest$5, httpRequest);
840
+ __privateAdd$4(this, _client$3, void 0);
841
+ __privateAdd$4(this, _httpRequest$4, void 0);
842
+ __privateSet$4(this, _client$3, client);
843
+ __privateSet$4(this, _httpRequest$4, httpRequest);
853
844
  }
854
845
  upload(assetType, body, options) {
855
- return _upload(__privateGet$5(this, _client$4), __privateGet$5(this, _httpRequest$5), assetType, body, options);
846
+ return _upload(__privateGet$4(this, _client$3), __privateGet$4(this, _httpRequest$4), assetType, body, options);
856
847
  }
857
848
  }
858
- _client$4 = new WeakMap();
859
- _httpRequest$5 = new WeakMap();
849
+ _client$3 = new WeakMap();
850
+ _httpRequest$4 = new WeakMap();
860
851
  class AssetsClient {
861
852
  constructor(client, httpRequest) {
862
- __privateAdd$5(this, _client2$4, void 0);
863
- __privateAdd$5(this, _httpRequest2$5, void 0);
864
- __privateSet$5(this, _client2$4, client);
865
- __privateSet$5(this, _httpRequest2$5, httpRequest);
853
+ __privateAdd$4(this, _client2$3, void 0);
854
+ __privateAdd$4(this, _httpRequest2$4, void 0);
855
+ __privateSet$4(this, _client2$3, client);
856
+ __privateSet$4(this, _httpRequest2$4, httpRequest);
866
857
  }
867
858
  upload(assetType, body, options) {
868
- const observable = _upload(__privateGet$5(this, _client2$4), __privateGet$5(this, _httpRequest2$5), assetType, body, options);
859
+ const observable = _upload(__privateGet$4(this, _client2$3), __privateGet$4(this, _httpRequest2$4), assetType, body, options);
869
860
  return lastValueFrom(observable.pipe(filter(event => event.type === "response"), map(event => event.body.document)));
870
861
  }
871
862
  }
872
- _client2$4 = new WeakMap();
873
- _httpRequest2$5 = new WeakMap();
863
+ _client2$3 = new WeakMap();
864
+ _httpRequest2$4 = new WeakMap();
874
865
  function _upload(client, httpRequest, assetType, body) {
875
866
  let opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
876
867
  validateAssetType(assetType);
@@ -924,78 +915,7 @@ function optionsFromFile(opts, file) {
924
915
  contentType: file.type
925
916
  }, opts);
926
917
  }
927
- var __accessCheck$4 = (obj, member, msg) => {
928
- if (!member.has(obj)) throw TypeError("Cannot " + msg);
929
- };
930
- var __privateGet$4 = (obj, member, getter) => {
931
- __accessCheck$4(obj, member, "read from private field");
932
- return getter ? getter.call(obj) : member.get(obj);
933
- };
934
- var __privateAdd$4 = (obj, member, value) => {
935
- if (member.has(obj)) throw TypeError("Cannot add the same private member more than once");
936
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
937
- };
938
- var __privateSet$4 = (obj, member, value, setter) => {
939
- __accessCheck$4(obj, member, "write to private field");
940
- setter ? setter.call(obj, value) : member.set(obj, value);
941
- return value;
942
- };
943
- var _client$3, _httpRequest$4, _client2$3, _httpRequest2$4;
944
- class ObservableAuthClient {
945
- constructor(client, httpRequest) {
946
- __privateAdd$4(this, _client$3, void 0);
947
- __privateAdd$4(this, _httpRequest$4, void 0);
948
- __privateSet$4(this, _client$3, client);
949
- __privateSet$4(this, _httpRequest$4, httpRequest);
950
- }
951
- /**
952
- * Fetch available login providers
953
- */
954
- getLoginProviders() {
955
- return _request(__privateGet$4(this, _client$3), __privateGet$4(this, _httpRequest$4), {
956
- uri: "/auth/providers"
957
- });
958
- }
959
- /**
960
- * Revoke the configured session/token
961
- */
962
- logout() {
963
- return _request(__privateGet$4(this, _client$3), __privateGet$4(this, _httpRequest$4), {
964
- uri: "/auth/logout",
965
- method: "POST"
966
- });
967
- }
968
- }
969
- _client$3 = new WeakMap();
970
- _httpRequest$4 = new WeakMap();
971
- class AuthClient {
972
- constructor(client, httpRequest) {
973
- __privateAdd$4(this, _client2$3, void 0);
974
- __privateAdd$4(this, _httpRequest2$4, void 0);
975
- __privateSet$4(this, _client2$3, client);
976
- __privateSet$4(this, _httpRequest2$4, httpRequest);
977
- }
978
- /**
979
- * Fetch available login providers
980
- */
981
- getLoginProviders() {
982
- return lastValueFrom(_request(__privateGet$4(this, _client2$3), __privateGet$4(this, _httpRequest2$4), {
983
- uri: "/auth/providers"
984
- }));
985
- }
986
- /**
987
- * Revoke the configured session/token
988
- */
989
- logout() {
990
- return lastValueFrom(_request(__privateGet$4(this, _client2$3), __privateGet$4(this, _httpRequest2$4), {
991
- uri: "/auth/logout",
992
- method: "POST"
993
- }));
994
- }
995
- }
996
- _client2$3 = new WeakMap();
997
- _httpRequest2$4 = new WeakMap();
998
- const BASE_URL = "https://docs.sanity.io/help/";
918
+ const BASE_URL = "https://www.sanity.io/help/";
999
919
  function generateHelpUrl(slug) {
1000
920
  return BASE_URL + slug;
1001
921
  }
@@ -1019,7 +939,7 @@ once(function () {
1019
939
  }
1020
940
  return console.warn(message.join(" "), ...args);
1021
941
  });
1022
- const printCdnWarning = createWarningPrinter(["You are not using the Sanity CDN. That means your data is always fresh, but the CDN is faster and", "cheaper. Think about it! For more info, see ".concat(generateHelpUrl("js-client-cdn-configuration"), "."), "To hide this warning, please set the `useCdn` option to either `true` or `false` when creating", "the client."]);
942
+ const printCdnWarning = createWarningPrinter(["You are not using the Sanity CDN. That means your data is always fresh, but the CDN is faster and", "cheaper. Think about it! For more info, see ".concat(generateHelpUrl("js-client-cdn-configuration"), " "), "To hide this warning, please set the `useCdn` option to either `true` or `false` when creating", "the client."]);
1023
943
  const printBrowserTokenWarning = createWarningPrinter(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.", "See ".concat(generateHelpUrl("js-client-browser-token"), " for more information and how to hide this warning.")]);
1024
944
  const printNoApiVersionSpecifiedWarning = createWarningPrinter(["Using the Sanity client without specifying an API version is deprecated.", "See ".concat(generateHelpUrl("js-client-api-version"))]);
1025
945
  const defaultCdnHost = "apicdn.sanity.io";
@@ -1497,10 +1417,13 @@ const _ObservableSanityClient = class {
1497
1417
  */
1498
1418
  __privateAdd(this, _clientConfig, void 0);
1499
1419
  __privateAdd(this, _httpRequest, void 0);
1420
+ /**
1421
+ * Instance properties
1422
+ */
1423
+ this.listen = _listen;
1500
1424
  this.config(config);
1501
1425
  __privateSet(this, _httpRequest, httpRequest);
1502
1426
  this.assets = new ObservableAssetsClient(this, __privateGet(this, _httpRequest));
1503
- this.auth = new ObservableAuthClient(this, __privateGet(this, _httpRequest));
1504
1427
  this.datasets = new ObservableDatasetsClient(this, __privateGet(this, _httpRequest));
1505
1428
  this.projects = new ObservableProjectsClient(this, __privateGet(this, _httpRequest));
1506
1429
  this.users = new ObservableUsersClient(this, __privateGet(this, _httpRequest));
@@ -1551,7 +1474,7 @@ const _ObservableSanityClient = class {
1551
1474
  * Fetch multiple documents in one request.
1552
1475
  * Should be used sparingly - performing a query is usually a better option.
1553
1476
  * The order/position of documents is preserved based on the original array of IDs.
1554
- * If a any of the documents are missing, they will be replaced by a `null` entry in the returned array
1477
+ * If any of the documents are missing, they will be replaced by a `null` entry in the returned array
1555
1478
  *
1556
1479
  * @param ids - Document IDs to fetch
1557
1480
  * @param options - Request options
@@ -1619,7 +1542,6 @@ const _SanityClient = class {
1619
1542
  this.config(config);
1620
1543
  __privateSet(this, _httpRequest2, httpRequest);
1621
1544
  this.assets = new AssetsClient(this, __privateGet(this, _httpRequest2));
1622
- this.auth = new AuthClient(this, __privateGet(this, _httpRequest2));
1623
1545
  this.datasets = new DatasetsClient(this, __privateGet(this, _httpRequest2));
1624
1546
  this.projects = new ProjectsClient(this, __privateGet(this, _httpRequest2));
1625
1547
  this.users = new UsersClient(this, __privateGet(this, _httpRequest2));
@@ -1674,7 +1596,7 @@ const _SanityClient = class {
1674
1596
  * Fetch multiple documents in one request.
1675
1597
  * Should be used sparingly - performing a query is usually a better option.
1676
1598
  * The order/position of documents is preserved based on the original array of IDs.
1677
- * If a any of the documents are missing, they will be replaced by a `null` entry in the returned array
1599
+ * If any of the documents are missing, they will be replaced by a `null` entry in the returned array
1678
1600
  *
1679
1601
  * @param ids - Document IDs to fetch
1680
1602
  * @param options - Request options