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

Function apiCommandBuilder

src/lib/command/api-command.ts:42–59  ·  view source on GitHub ↗
(yargs: Argv<T>)

Source from the content-addressed store, hash-verified

40 }
41
42export const apiCommandBuilder = <T extends object>(yargs: Argv<T>): Argv<T & APICommandFlags> =>
43 smartThingsCommandBuilder(yargs)
44 .option('environment', {
45 desc: 'the environment to use',
46 type: 'string',
47 choices: Object.keys(urlProvidersByEnvironment),
48 })
49 .option('token', {
50 alias: 't',
51 desc: 'the auth token to use',
52 type: 'string',
53 default: process.env.SMARTTHINGS_TOKEN,
54 hidden: true,
55 })
56 .option('language', {
57 desc: 'ISO language code or "NONE" to not specify a language. Defaults to the OS locale',
58 type: 'string',
59 })
60
61export type APICommand<T extends APICommandFlags = APICommandFlags> = SmartThingsCommand<T> & {
62 environment: string

Callers 15

builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85
builderFunction · 0.85

Calls 1

Tested by

no test coverage detected