feat: select governed workflow scope targets
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import { apiFetch, type ApiSettings } from "@govoplan/core-webui";
|
||||
import {
|
||||
apiFetch,
|
||||
apiReferenceOptionProvider,
|
||||
type ApiSettings,
|
||||
type ReferenceOptionProvider
|
||||
} from "@govoplan/core-webui";
|
||||
import type {
|
||||
DefinitionGraph,
|
||||
DefinitionGraphNode,
|
||||
@@ -216,3 +221,14 @@ export function validateWorkflowDefinition(
|
||||
body: JSON.stringify({ graph })
|
||||
});
|
||||
}
|
||||
|
||||
export function workflowScopeReferenceProvider(
|
||||
settings: ApiSettings,
|
||||
scopeType: "user" | "group"
|
||||
): ReferenceOptionProvider {
|
||||
return apiReferenceOptionProvider(
|
||||
settings,
|
||||
"/api/v1/workflow/scope-targets",
|
||||
{ scope_type: scopeType }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user