MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/organizations.ts:28–46  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

26const describe = 'get a specific organization or list organizations the user belongs to'
27
28const builder = (yargs: Argv): Argv<CommandArgs> =>
29 outputItemOrListBuilder(apiCommandBuilder(yargs))
30 .positional(
31 'id-or-index',
32 { describe: 'the organization name or number from list', type: 'string' },
33 )
34 .example([
35 ['$0 organizations', 'list all organizations the user is a member of'],
36 [
37 '$0 organizations 1',
38 'display details for the first organization in the list retrieved by running ' +
39 '"smartthings organizations"',
40 ],
41 [
42 '$0 organizations MyCompanyOrgName',
43 'display details for an organization by name',
44 ],
45 ])
46 .epilog(buildEpilog({ command }))
47
48const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
49 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected