MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/edge/channels/unenroll.ts:25–41  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

23const describe = 'unenroll a hub from a channel'
24
25const builder = (yargs: Argv): Argv<CommandArgs> =>
26 apiCommandBuilder(yargs)
27 .positional('id', { describe: 'hub id', type: 'string' })
28 .option('channel', { alias: 'C', describe: 'channel id', type: 'string' })
29 .example([
30 ['$0 edge:channels:unenroll', 'prompt for channel and hub'],
31 [
32 '$0 edge:channels:unenroll 2fa0912f-cb73-424e-97f9-ffff76ea4f2a',
33 'prompt user for a channel the given hub is enrolled in and then unenroll it',
34 ],
35 [
36 '$0 edge:channels:unenroll 2fa0912f-cb73-424e-97f9-ffff76ea4f2a ' +
37 '--channel fcd6ca9c-2764-4dbb-9bbe-d40c900c960f',
38 'unenroll the specified hub from the specified channel',
39 ],
40 ])
41 .epilog(buildEpilog({ command }))
42
43const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
44 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected