diff --git a/client/src/api/invocations.ts b/client/src/api/invocations.ts index 00817980ab40..467267fe19f1 100644 --- a/client/src/api/invocations.ts +++ b/client/src/api/invocations.ts @@ -8,7 +8,7 @@ export type WorkflowInvocationElementView = components["schemas"]["WorkflowInvoc export type WorkflowInvocationCollectionView = components["schemas"]["WorkflowInvocationCollectionView"]; export type InvocationJobsSummary = components["schemas"]["InvocationJobsResponse"]; export type InvocationStep = components["schemas"]["InvocationStep"]; -export type InvocationMessage = components["schemas"]["WorkflowInvocationElementView"]["messages"][0]; +export type InvocationMessage = components["schemas"]["InvocationMessageResponseUnion"]; export type StepJobSummary = | components["schemas"]["InvocationStepJobsResponseStepModel"] diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index fce5294b4509..65e445bc357e 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -8049,6 +8049,18 @@ export interface components { [key: string]: number | undefined; }; }; + InvocationMessageResponseUnion: + | components["schemas"]["InvocationCancellationReviewFailedResponse"] + | components["schemas"]["InvocationCancellationHistoryDeletedResponse"] + | components["schemas"]["InvocationCancellationUserRequestResponse"] + | components["schemas"]["InvocationFailureDatasetFailedResponse"] + | components["schemas"]["InvocationFailureCollectionFailedResponse"] + | components["schemas"]["InvocationFailureJobFailedResponse"] + | components["schemas"]["InvocationFailureOutputNotFoundResponse"] + | components["schemas"]["InvocationFailureExpressionEvaluationFailedResponse"] + | components["schemas"]["InvocationFailureWhenNotBooleanResponse"] + | components["schemas"]["InvocationUnexpectedFailureResponse"] + | components["schemas"]["InvocationEvaluationWarningWorkflowOutputNotFoundResponse"]; /** InvocationOutput */ InvocationOutput: { /** @@ -13316,19 +13328,7 @@ export interface components { * Messages * @description A list of messages about why the invocation did not succeed. */ - messages: ( - | components["schemas"]["InvocationCancellationReviewFailedResponse"] - | components["schemas"]["InvocationCancellationHistoryDeletedResponse"] - | components["schemas"]["InvocationCancellationUserRequestResponse"] - | components["schemas"]["InvocationFailureDatasetFailedResponse"] - | components["schemas"]["InvocationFailureCollectionFailedResponse"] - | components["schemas"]["InvocationFailureJobFailedResponse"] - | components["schemas"]["InvocationFailureOutputNotFoundResponse"] - | components["schemas"]["InvocationFailureExpressionEvaluationFailedResponse"] - | components["schemas"]["InvocationFailureWhenNotBooleanResponse"] - | components["schemas"]["InvocationUnexpectedFailureResponse"] - | components["schemas"]["InvocationEvaluationWarningWorkflowOutputNotFoundResponse"] - )[]; + messages: components["schemas"]["InvocationMessageResponseUnion"][]; /** * Model class * @description The name of the database model class. diff --git a/lib/galaxy/schema/invocation.py b/lib/galaxy/schema/invocation.py index 1d433fa5584a..4d5ce80548e8 100644 --- a/lib/galaxy/schema/invocation.py +++ b/lib/galaxy/schema/invocation.py @@ -20,6 +20,7 @@ from typing_extensions import ( Annotated, Literal, + TypeAliasType, ) from galaxy.schema import schema @@ -253,7 +254,7 @@ class GenericInvocationEvaluationWarningWorkflowOutputNotFound( EncodedDatabaseIdField ] -InvocationMessageResponseUnion = Annotated[ +_InvocationMessageResponseUnion = Annotated[ Union[ InvocationCancellationReviewFailedResponseModel, InvocationCancellationHistoryDeletedResponseModel, @@ -270,6 +271,8 @@ class GenericInvocationEvaluationWarningWorkflowOutputNotFound( Field(discriminator="reason"), ] +InvocationMessageResponseUnion = TypeAliasType("InvocationMessageResponseUnion", _InvocationMessageResponseUnion) + class InvocationMessageResponseModel(RootModel): root: InvocationMessageResponseUnion