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

Function handler

src/commands/schema/regenerate.ts:43–57  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

41 }))
42
43const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
44 const command = await apiOrganizationCommand(argv)
45
46 const id = await chooseSchemaApp(
47 command,
48 argv.id,
49 { promptMessage: 'Select a schema app to regenerate its client id and secret.' },
50 )
51
52 await outputItem(
53 command,
54 { tableFieldDefinitions: ['endpointAppId', 'stClientId', 'stClientSecret'] },
55 () => command.client.schema.regenerateOauth(id),
56 )
57}
58
59const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
60export default cmd

Callers

nothing calls this directly

Calls 2

apiOrganizationCommandFunction · 0.85
outputItemFunction · 0.85

Tested by

no test coverage detected