feat: Extend UserSelectInteractive and UserInputInteractive types to inherit from InteractiveBasicType

This commit is contained in:
sd0ric4
2025-03-27 11:33:12 +08:00
parent de1cc6b7d4
commit e5c03bacac

View File

@@ -41,7 +41,7 @@ type InteractiveBasicType = {
};
};
type UserSelectInteractive = {
type UserSelectInteractive = InteractiveBasicType & {
type: 'userSelect';
params: {
description: string;
@@ -50,7 +50,7 @@ type UserSelectInteractive = {
};
};
type UserInputInteractive = {
type UserInputInteractive = InteractiveBasicType & {
type: 'userInput';
params: {
description: string;
@@ -58,6 +58,5 @@ type UserInputInteractive = {
submitted?: boolean;
};
};
export type InteractiveNodeResponseType = UserSelectInteractive | UserInputInteractive;
export type WorkflowInteractiveResponseType = InteractiveBasicType & InteractiveNodeResponseType;