Skip to main content
View as Markdown

Function: getFlows()

getFlows(directory): (options?) => Promise<Flow[]>

Defined in: flows.ts:62

Returns all flows from EventCatalog.

You can optionally specify if you want to get the latest version of the flows.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
options?{ latestOnly: boolean; }
options.latestOnly?boolean

Returns

Promise<Flow[]>

Example

import utils from '@eventcatalog/utils';

const { getFlows } = utils('/path/to/eventcatalog');

// Gets all flows (and versions) from the catalog
const flows = await getFlows();

// Gets all flows (only latest version) from the catalog
const flows = await getFlows({ latestOnly: true });