Skip to main content

Function: writeTeam()

writeTeam(catalogDir): (team, options) => Promise<void>

Defined in: teams.ts:105

Write a team to EventCatalog.

Parameters

ParameterType
catalogDirstring

Returns

Function

Parameters

ParameterType
teamTeam
options{ override: boolean; }
options.override?boolean

Returns

Promise<void>

Example

import utils from '@eventcatalog/utils';

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

// Write a team to the catalog
// team would be written to teams/EventCatalogCoreTeam
await writeTeam({
id: 'eventcatalog-core-team',
name: 'EventCatalogCoreTeam',
members: ['dboyne', 'asmith', 'msmith'],
email: 'test@test.com',
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
});

// Write a team to the catalog and override the existing content (if there is any)
await writeTeam({
id: 'eventcatalog-core-team',
name: 'EventCatalogCoreTeam',
members: ['dboyne', 'asmith', 'msmith'],
email: 'test@test.com',
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
}, { override: true });