Function: getFlow()
getFlow(
directory): (id,version?) =>Promise<Flow>
Defined in: flows.ts:38
Returns a flow from EventCatalog.
You can optionally specify a version to get a specific version of the flow
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
version? | string |
Returns
Promise<Flow>
Example
import utils from '@eventcatalog/utils';
const { getFlow } = utils('/path/to/eventcatalog');
// Gets the latest version of the flow
const flow = await getFlow('PaymentFlow');
// Gets a version of the flow
const flow = await getFlow('PaymentFlow', '0.0.1');