Skip to content

Commit 2cac9da

Browse files
committed
feat: extend suggestions type to include SubFlowValue and integrate getSubFlows function
1 parent 3e77653 commit 2cac9da

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/util/schema.util.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ import ts, {FunctionDeclaration} from "typescript";
22
import {getValues} from "./values.util";
33
import {getReferences} from "./references.util";
44
import {getNodes} from "./nodes.util";
5-
import {FunctionDefinition, LiteralValue, NodeFunction, ReferenceValue,} from "@code0-tech/sagittarius-graphql-types";
5+
import {
6+
FunctionDefinition,
7+
LiteralValue,
8+
NodeFunction,
9+
ReferenceValue,
10+
SubFlowValue,
11+
} from "@code0-tech/sagittarius-graphql-types";
12+
import {getSubFlows} from "./subflows.util";
613

714

815
/**
@@ -13,7 +20,7 @@ export interface Input {
1320
/** The type of input (string representation) */
1421
input?: string;
1522
/** Array of suggested values (functions, references, or literals) */
16-
suggestions?: (NodeFunction | ReferenceValue | LiteralValue)[];
23+
suggestions?: (NodeFunction | ReferenceValue | LiteralValue | SubFlowValue)[];
1724
}
1825

1926
/**
@@ -135,6 +142,12 @@ export const getSchema = (
135142
functions,
136143
parameterType
137144
),
145+
...getSubFlows(
146+
checker,
147+
functionDeclarations,
148+
functions,
149+
parameterType
150+
),
138151
],
139152
} : {};
140153

0 commit comments

Comments
 (0)