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

Function builder

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

Source from the content-addressed store, hash-verified

23const describe = 'assign a driver to a channel'
24
25const builder = (yargs: Argv): Argv<CommandArgs> =>
26 apiOrganizationCommandBuilder(yargs)
27 .positional('driver-id', { describe: 'driver id', type: 'string' })
28 .positional('driver-version', { describe: 'driver version', type: 'string' })
29 .option('channel', { alias: 'C', describe: 'channel to assigned to', type: 'string' })
30 .example([
31 ['$0 edge:channels:assign', 'prompt for a channel and driver'],
32 [
33 '$0 edge:channels:assign 636169e4-8b9f-4438-a941-953b0d617231',
34 'prompt for a channel and assign the specified driver to it',
35 ],
36 [
37 '$0 edge:channels:assign --channel 6ea857c6-23d4-4aae-aaf7-7a36daf42f92',
38 'prompt for a driver and assign it to the specified channel',
39 ],
40 [
41 '$0 edge:channels:assign 636169e4-8b9f-4438-a941-953b0d617231' +
42 ' --channel 6ea857c6-23d4-4aae-aaf7-7a36daf42f92',
43 'assign the specified driver to the specified channel',
44 ],
45 ])
46 .epilog(buildEpilog({ command, apiDocs: 'createDriverChannel' }))
47
48
49const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {

Callers

nothing calls this directly

Calls 2

buildEpilogFunction · 0.85

Tested by

no test coverage detected