@sanity/client 6.21.2 → 6.21.3

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.d.cts CHANGED
@@ -2269,6 +2269,7 @@ export declare class SanityClient {
2269
2269
  getDocument<R extends Record<string, Any> = Record<string, Any>>(
2270
2270
  id: string,
2271
2271
  options?: {
2272
+ signal?: AbortSignal
2272
2273
  tag?: string
2273
2274
  },
2274
2275
  ): Promise<SanityDocument<R> | undefined>
@@ -2284,6 +2285,7 @@ export declare class SanityClient {
2284
2285
  getDocuments<R extends Record<string, Any> = Record<string, Any>>(
2285
2286
  ids: string[],
2286
2287
  options?: {
2288
+ signal?: AbortSignal
2287
2289
  tag?: string
2288
2290
  },
2289
2291
  ): Promise<(SanityDocument<R> | null)[]>
@@ -2758,6 +2760,10 @@ export declare interface SanityImagePalette {
2758
2760
  export declare interface SanityProject {
2759
2761
  id: string
2760
2762
  displayName: string
2763
+ /**
2764
+ * @deprecated Use the `/user-applications` endpoint instead, which lists all deployed studios/applications
2765
+ * @see https://www.sanity.io/help/studio-host-user-applications
2766
+ */
2761
2767
  studioHost: string | null
2762
2768
  organizationId: string | null
2763
2769
  isBlocked: boolean
@@ -2770,6 +2776,10 @@ export declare interface SanityProject {
2770
2776
  metadata: {
2771
2777
  cliInitializedAt?: string
2772
2778
  color?: string
2779
+ /**
2780
+ * @deprecated Use the `/user-applications` endpoint instead, which lists all deployed studios/applications
2781
+ * @see https://www.sanity.io/help/studio-host-user-applications
2782
+ */
2773
2783
  externalStudioHost?: string
2774
2784
  }
2775
2785
  }
package/dist/index.d.ts CHANGED
@@ -2269,6 +2269,7 @@ export declare class SanityClient {
2269
2269
  getDocument<R extends Record<string, Any> = Record<string, Any>>(
2270
2270
  id: string,
2271
2271
  options?: {
2272
+ signal?: AbortSignal
2272
2273
  tag?: string
2273
2274
  },
2274
2275
  ): Promise<SanityDocument<R> | undefined>
@@ -2284,6 +2285,7 @@ export declare class SanityClient {
2284
2285
  getDocuments<R extends Record<string, Any> = Record<string, Any>>(
2285
2286
  ids: string[],
2286
2287
  options?: {
2288
+ signal?: AbortSignal
2287
2289
  tag?: string
2288
2290
  },
2289
2291
  ): Promise<(SanityDocument<R> | null)[]>
@@ -2758,6 +2760,10 @@ export declare interface SanityImagePalette {
2758
2760
  export declare interface SanityProject {
2759
2761
  id: string
2760
2762
  displayName: string
2763
+ /**
2764
+ * @deprecated Use the `/user-applications` endpoint instead, which lists all deployed studios/applications
2765
+ * @see https://www.sanity.io/help/studio-host-user-applications
2766
+ */
2761
2767
  studioHost: string | null
2762
2768
  organizationId: string | null
2763
2769
  isBlocked: boolean
@@ -2770,6 +2776,10 @@ export declare interface SanityProject {
2770
2776
  metadata: {
2771
2777
  cliInitializedAt?: string
2772
2778
  color?: string
2779
+ /**
2780
+ * @deprecated Use the `/user-applications` endpoint instead, which lists all deployed studios/applications
2781
+ * @see https://www.sanity.io/help/studio-host-user-applications
2782
+ */
2773
2783
  externalStudioHost?: string
2774
2784
  }
2775
2785
  }
package/dist/index.js CHANGED
@@ -627,14 +627,24 @@ function _fetch(client, httpRequest, _stega, query, _params = {}, options = {})
627
627
  ) : $request.pipe(map(mapResponse));
628
628
  }
629
629
  function _getDocument(client, httpRequest, id, opts = {}) {
630
- const options = { uri: _getDataUrl(client, "doc", id), json: !0, tag: opts.tag };
630
+ const options = {
631
+ uri: _getDataUrl(client, "doc", id),
632
+ json: !0,
633
+ tag: opts.tag,
634
+ signal: opts.signal
635
+ };
631
636
  return _requestObservable(client, httpRequest, options).pipe(
632
637
  filter(isResponse),
633
638
  map((event) => event.body.documents && event.body.documents[0])
634
639
  );
635
640
  }
636
641
  function _getDocuments(client, httpRequest, ids, opts = {}) {
637
- const options = { uri: _getDataUrl(client, "doc", ids.join(",")), json: !0, tag: opts.tag };
642
+ const options = {
643
+ uri: _getDataUrl(client, "doc", ids.join(",")),
644
+ json: !0,
645
+ tag: opts.tag,
646
+ signal: opts.signal
647
+ };
638
648
  return _requestObservable(client, httpRequest, options).pipe(
639
649
  filter(isResponse),
640
650
  map((event) => {
@@ -1495,7 +1505,7 @@ function defineDeprecatedCreateClient(createClient2) {
1495
1505
  return printNoDefaultExport(), createClient2(config);
1496
1506
  };
1497
1507
  }
1498
- var name = "@sanity/client", version = "6.21.2";
1508
+ var name = "@sanity/client", version = "6.21.3";
1499
1509
  const middleware = [
1500
1510
  debug({ verbose: !0, namespace: "sanity:client" }),
1501
1511
  headers({ "User-Agent": `${name} ${version}` }),