@sanity/workflow-studio-plugin 0.2.0 → 0.3.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.d.cts CHANGED
@@ -5,6 +5,7 @@ import { InitialFieldValue } from "@sanity/workflow-engine";
5
5
  import { JSX } from "react";
6
6
  import { Plugin as Plugin_2 } from "sanity";
7
7
  import { PreviewProps } from "sanity";
8
+ import { ResourceClientResolver } from "@sanity/workflow-engine";
8
9
  import { StartContext } from "@sanity/workflow-engine";
9
10
  import type { StructureBuilder } from "sanity/structure";
10
11
  import type { ViewBuilder } from "sanity/structure";
@@ -104,6 +105,15 @@ export declare interface WorkflowPluginConfig {
104
105
  * runtime to claim.
105
106
  */
106
107
  readonly effectHandlers?: Record<string, EffectHandler>;
108
+ /**
109
+ * Routing override for cross-resource reads, replacing the Studio's
110
+ * default per-dataset routing — see `useWorkflowEngine`. A served resource
111
+ * is also part of the declared surface for written refs, so this is how a
112
+ * plugin setup admits runtime-supplied `doc.ref` values to a foreign
113
+ * resource (media-library, canvas, another dataset). Keep the value
114
+ * stable (module scope or memoized).
115
+ */
116
+ readonly resourceClients?: ResourceClientResolver;
107
117
  }
108
118
 
109
119
  declare interface WorkflowPreviewProps extends PreviewProps {
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { InitialFieldValue } from "@sanity/workflow-engine";
5
5
  import { JSX } from "react";
6
6
  import { Plugin as Plugin_2 } from "sanity";
7
7
  import { PreviewProps } from "sanity";
8
+ import { ResourceClientResolver } from "@sanity/workflow-engine";
8
9
  import { StartContext } from "@sanity/workflow-engine";
9
10
  import type { StructureBuilder } from "sanity/structure";
10
11
  import type { ViewBuilder } from "sanity/structure";
@@ -104,6 +105,15 @@ export declare interface WorkflowPluginConfig {
104
105
  * runtime to claim.
105
106
  */
106
107
  readonly effectHandlers?: Record<string, EffectHandler>;
108
+ /**
109
+ * Routing override for cross-resource reads, replacing the Studio's
110
+ * default per-dataset routing — see `useWorkflowEngine`. A served resource
111
+ * is also part of the declared surface for written refs, so this is how a
112
+ * plugin setup admits runtime-supplied `doc.ref` values to a foreign
113
+ * resource (media-library, canvas, another dataset). Keep the value
114
+ * stable (module scope or memoized).
115
+ */
116
+ readonly resourceClients?: ResourceClientResolver;
107
117
  }
108
118
 
109
119
  declare interface WorkflowPreviewProps extends PreviewProps {