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

Function builder

src/commands/capabilities/translations.ts:41–76  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

39const describe = 'get list of locales supported by the capability'
40
41export const builder = (yargs: Argv): Argv<CommandArgs> =>
42 outputItemOrListBuilder(capabilityIdOrIndexBuilder(apiOrganizationCommandBuilder(yargs)))
43 .option('namespace', {
44 alias: 'n',
45 description: 'a specific namespace to query; will use all by default',
46 type: 'string',
47 })
48 .option('verbose', {
49 alias: 'v',
50 description: 'include list of supported locales in table output',
51 type: 'boolean',
52 default: false,
53 })
54 .positional('tag', { desc: 'the locale tag', type: 'string' })
55 .example([
56 ['$0 capabilities:translations', 'prompt for a capability and list its translations'],
57 [
58 '$0 capabilities:translations --verbose',
59 'prompt for a capability and list its translations, includes supported locales in capability list',
60 ],
61 [
62 '$0 capabilities:translations 1',
63 'list translations for the first capability in the list retrieved by running' +
64 ' "smartthings capabilities"',
65 ],
66 [
67 '$0 capabilities:translations cathappy12345.myCapability',
68 'list translations for the specified capability',
69 ],
70 [
71 '$0 capabilities:translations 12 es',
72 'display details of Spanish translation for twelfth capability retrieved by running' +
73 ' "smartthings capabilities"',
74 ],
75 ])
76 .epilog(buildEpilog({ command, apiDocs: ['listCapabilityLocalizations', 'getCapabilityLocalization'] }))
77
78export type CapabilitySummaryWithLocales = CapabilitySummaryWithNamespace & WithLocales
79

Callers

nothing calls this directly

Calls 3

buildEpilogFunction · 0.85

Tested by

no test coverage detected