diff --git a/frontend/src/client/schemas.gen.ts b/frontend/src/client/schemas.gen.ts index 7e409d9fa..9c320d247 100644 --- a/frontend/src/client/schemas.gen.ts +++ b/frontend/src/client/schemas.gen.ts @@ -105,16 +105,12 @@ export const $ActionRead = { type: 'object', title: 'Inputs' }, - key: { - type: 'string', - title: 'Key' - }, control_flow: { '$ref': '#/components/schemas/ActionControlFlow' } }, type: 'object', - required: ['id', 'type', 'title', 'description', 'status', 'inputs', 'key'], + required: ['id', 'type', 'title', 'description', 'status', 'inputs'], title: 'ActionRead' } as const; @@ -143,14 +139,10 @@ export const $ActionReadMinimal = { status: { type: 'string', title: 'Status' - }, - key: { - type: 'string', - title: 'Key' } }, type: 'object', - required: ['id', 'workflow_id', 'type', 'title', 'description', 'status', 'key'], + required: ['id', 'workflow_id', 'type', 'title', 'description', 'status'], title: 'ActionReadMinimal' } as const; diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index 08d3ca274..23ee248f3 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -31,7 +31,6 @@ export type ActionRead = { inputs: { [key: string]: unknown; }; - key: string; control_flow?: ActionControlFlow; }; @@ -42,7 +41,6 @@ export type ActionReadMinimal = { title: string; description: string; status: string; - key: string; }; export type ActionRetryPolicy = { diff --git a/tracecat/db/schemas.py b/tracecat/db/schemas.py index 3edf0723b..c2dee4a7a 100644 --- a/tracecat/db/schemas.py +++ b/tracecat/db/schemas.py @@ -435,12 +435,6 @@ class Action(Resource, table=True): back_populates="actions", sa_relationship_kwargs=DEFAULT_SA_RELATIONSHIP_KWARGS ) - @computed_field - @property - def key(self) -> str: - """Workflow-relative key for an Action.""" - return action.key(self.workflow_id, self.id) - @property def ref(self) -> str: """Slugified title of the action. Used for references.""" diff --git a/tracecat/workflow/actions/models.py b/tracecat/workflow/actions/models.py index 55111c93a..f2f7a659c 100644 --- a/tracecat/workflow/actions/models.py +++ b/tracecat/workflow/actions/models.py @@ -23,7 +23,6 @@ class ActionRead(BaseModel): description: str status: str inputs: dict[str, Any] - key: str # Computed field control_flow: ActionControlFlow = Field(default_factory=ActionControlFlow) @@ -34,7 +33,6 @@ class ActionReadMinimal(BaseModel): title: str description: str status: str - key: str class ActionCreate(BaseModel): diff --git a/tracecat/workflow/actions/router.py b/tracecat/workflow/actions/router.py index 040da51f2..9ee1ddcc4 100644 --- a/tracecat/workflow/actions/router.py +++ b/tracecat/workflow/actions/router.py @@ -37,7 +37,6 @@ async def list_actions( title=action.title, description=action.description, status=action.status, - key=action.key, ) for action in actions ] @@ -82,7 +81,6 @@ async def create_action( title=action.title, description=action.description, status=action.status, - key=action.key, ) return action_metadata @@ -115,7 +113,6 @@ async def get_action( description=action.description, status=action.status, inputs=action.inputs, - key=action.key, control_flow=ActionControlFlow(**action.control_flow), ) @@ -163,7 +160,6 @@ async def update_action( description=action.description, status=action.status, inputs=action.inputs, - key=action.key, )