Skip to content

Commit

Permalink
docs(types): add JSDoc for Workflow type properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rifont committed Nov 13, 2024
1 parent c7047ef commit 1ed6539
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/framework/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export { Client } from './client';
export { NovuRequestHandler, type ServeHandlerOptions } from './handler';
export { workflow } from './resources';
export type { Workflow } from './types';
export { CronExpression } from './constants';
12 changes: 9 additions & 3 deletions packages/framework/src/types/discover.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ export type DiscoverWorkflowOutput = {
description?: string;
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type Workflow<T_Payload = any> = {
/**
* A workflow resource.
*
* @property `id` - The unique identifier for the workflow.
* @property `trigger` - The function to trigger the workflow.
* @property `discover` - The function to discover the workflow definition.
*/
export type Workflow<T_Payload = Record<string, unknown>> = {
/**
* The unique identifier of the workflow.
* The unique identifier for the workflow.
*/
id: string;
/**
Expand Down

0 comments on commit 1ed6539

Please sign in to comment.