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

Function builder

src/commands/deviceprofiles/translations.ts:35–66  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

33const describe = 'list locales translated for a device profile or display translations for a specific locale'
34
35const builder = (yargs: Argv): Argv<CommandArgs> =>
36 outputItemOrListBuilder(apiOrganizationCommandBuilder(yargs))
37 .positional(
38 'profile-id-or-index',
39 { describe: 'device profile id or number from list', type: 'string' },
40 )
41 .positional('tag', { describe: 'the locale tag or number from list', type: 'string' })
42 .option('verbose',
43 { alias: 'v', describe: 'include list of locales in table output', type: 'boolean', default: false })
44 .example([
45 [
46 '$0 deviceprofiles:translations',
47 'prompt for a device profile and list its locales',
48 ],
49 [
50 '$0 deviceprofiles:translations --verbose',
51 'include locales with profiles when prompting for a device profile',
52 ],
53 [
54 '$0 deviceprofiles:translations 3acbf2fc-6be2-4be0-aeb5-c10f4ff357bb',
55 'list locales for a specific device profile id',
56 ],
57 [
58 '$0 deviceprofiles:translations 2',
59 'list locales for the device profile displayed when running "smartthings deviceprofiles:translations"',
60 ],
61 [
62 '$0 deviceprofiles:translations 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 sw',
63 'display translations for the specified device profile id and locale',
64 ],
65 ])
66 .epilog(buildEpilog({ command }))
67
68const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
69 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 2

buildEpilogFunction · 0.85

Tested by

no test coverage detected