(argv: ArgumentsCamelCase<CommandArgs>)
| 33 | .epilog(buildEpilog({ command, apiDocs: ['deleteRule'] })) |
| 34 | |
| 35 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 36 | const command = await apiCommand(argv) |
| 37 | |
| 38 | const ruleId = await chooseRuleFn(argv.location)(command, argv.id, { promptMessage: 'Select a rule to delete.' }) |
| 39 | |
| 40 | const locationId = argv.location ?? (await getRuleWithLocation(command.client, ruleId)).locationId |
| 41 | |
| 42 | await command.client.rules.delete(ruleId, locationId) |
| 43 | console.log(`Rule ${ruleId} deleted.`) |
| 44 | } |
| 45 | |
| 46 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 47 | export default cmd |
nothing calls this directly
no test coverage detected