(yargs: Argv)
| 45 | const describe = 'get a specific capability or a list of capabilities' |
| 46 | |
| 47 | export const builder = (yargs: Argv): Argv<CommandArgs> => |
| 48 | outputItemOrListBuilder(capabilityIdOrIndexBuilder(allOrganizationsBuilder( |
| 49 | apiOrganizationCommandBuilder(yargs))), |
| 50 | ) |
| 51 | .option('namespace', { |
| 52 | alias: 'n', |
| 53 | description: 'a specific namespace to query; will use all by default', |
| 54 | type: 'string', |
| 55 | }) |
| 56 | .option('standard', { |
| 57 | alias: 's', |
| 58 | description: 'show standard SmartThings capabilities', |
| 59 | type: 'boolean', |
| 60 | default: false, |
| 61 | }) |
| 62 | .example([ |
| 63 | ['$0 capabilities', 'list capabilities'], |
| 64 | [ |
| 65 | '$0 capabilities 1', |
| 66 | 'display details for the first capability in the list retrieved by running' + |
| 67 | ' "smartthings capabilities"', |
| 68 | ], |
| 69 | [ |
| 70 | '$0 capabilities cathappy12345.myCapability', |
| 71 | 'display details for a capability by id', |
| 72 | ], |
| 73 | [ |
| 74 | '$0 capabilities --organization 4b1e82f1-7c0a-4d96-8b1c-5565150f5f66', |
| 75 | 'list capabilities for the specified organization', |
| 76 | ], |
| 77 | [ |
| 78 | '$0 capabilities --namespace cathappy12345', |
| 79 | 'list capabilities for the specified namespace', |
| 80 | ], |
| 81 | ['$0 capabilities --standard', 'list standard capabilities'], |
| 82 | ]) |
| 83 | .epilog(buildEpilog({ command, apiDocs: ['listNamespacedCapabilities', 'listCapabilities', 'getCapability'] })) |
| 84 | |
| 85 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 86 | const command = await apiOrganizationCommand(argv) |
nothing calls this directly
no test coverage detected