@@ -7,29 +7,61 @@ const command: CommandModule<GlobalOptions> = {
77 aliases : [ "noise-thresholds" , "nt" ] ,
88 describe : "interact with noise thresholds" ,
99 builder : ( yargs ) => {
10- return yargs . demandCommand ( ) . command (
11- "list" ,
12- "list noise thresholds" ,
13- ( yargs ) => {
14- return yargs . option ( "device-id" , {
15- describe : "filter by device ID" ,
16- demandOption : true ,
17- type : "string" ,
18- } )
19- } ,
20- async ( argv ) => {
21- await executeCommand (
22- "noiseThresholds.list" ,
23- [
24- {
25- device_id : argv . deviceId ,
26- } ,
27- ] ,
28- argv
29- )
30- }
31- )
10+ return yargs
11+ . demandCommand ( )
12+ . command (
13+ "list" ,
14+ "list noise thresholds" ,
15+ ( yargs ) => {
16+ return yargs . option ( "device-id" , {
17+ describe : "filter by device ID" ,
18+ demandOption : true ,
19+ type : "string" ,
20+ } )
21+ } ,
22+ async ( argv ) => {
23+ await executeCommand (
24+ "noiseThresholds.list" ,
25+ [
26+ {
27+ device_id : argv . deviceId ,
28+ } ,
29+ ] ,
30+ argv
31+ )
32+ }
33+ )
34+ . command (
35+ "delete" ,
36+ "delete a noise threshold" ,
37+ ( yargs ) => {
38+ return yargs
39+ . option ( "device_id" , {
40+ describe : "the device ID" ,
41+ type : "string" ,
42+ demandOption : true ,
43+ } )
44+ . option ( "noise_threshold_id" , {
45+ describe : "the noise threshold ID" ,
46+ type : "string" ,
47+ demandOption : true ,
48+ } )
49+ } ,
50+ async ( argv ) => {
51+ await executeCommand (
52+ "noiseThresholds.delete" ,
53+ [
54+ {
55+ device_id : argv . device_id ,
56+ noise_threshold_id : argv . noise_threshold_id ,
57+ } ,
58+ ] ,
59+ argv
60+ )
61+ }
62+ )
3263 } ,
64+
3365 handler : ( ) => { } ,
3466}
3567
0 commit comments