diff --git a/packages/framework/src/types/discover.types.ts b/packages/framework/src/types/discover.types.ts index b97078a0eef..a8e711ea107 100644 --- a/packages/framework/src/types/discover.types.ts +++ b/packages/framework/src/types/discover.types.ts @@ -67,9 +67,20 @@ export type DiscoverWorkflowOutput = { // eslint-disable-next-line @typescript-eslint/no-explicit-any export type Workflow = { + /** + * Trigger an event for this workflow with a strongly typed and validated `payload`, derived from the `payloadSchema`. + * + * @param event - The event to trigger + * @returns `EventTriggerResult` - The result of the event trigger + */ trigger: ( event: Prettify, 'workflowId' | 'bridgeUrl' | 'controls'>> ) => Promise; + /** + * Discover the workflow definition. + * + * @returns `DiscoverWorkflowOutput` - The workflow definition + */ discover: () => Promise; };