diff --git a/packages/numberInsight/src/commands/numberinsight/index.ts b/packages/numberInsight/src/commands/numberinsight/index.ts index 87a2edab..a62f0c24 100644 --- a/packages/numberInsight/src/commands/numberinsight/index.ts +++ b/packages/numberInsight/src/commands/numberinsight/index.ts @@ -1,5 +1,5 @@ import NumberInsightCommand from '../../numberinsight_base'; -import { OutputFlags, OutputArgs, flags } from '@oclif/parser'; +import { OutputFlags, flags } from '@oclif/parser'; import { startCase, toLower } from 'lodash'; import { prompt } from 'prompts' import chalk from 'chalk'; diff --git a/packages/numbers/src/commands/numbers/buy.ts b/packages/numbers/src/commands/numbers/buy.ts index ad5a97f8..0d2b985b 100644 --- a/packages/numbers/src/commands/numbers/buy.ts +++ b/packages/numbers/src/commands/numbers/buy.ts @@ -1,10 +1,6 @@ import NumberCommand from '../../number_base'; -import { OutputArgs, OutputFlags } from '@oclif/parser'; +import { OutputFlags } from '@oclif/parser'; -interface buyArgs extends OutputArgs { - number: string, - countryCode: string -} export default class NumberBuy extends NumberCommand { static description = 'buy a Vonage number' @@ -21,7 +17,7 @@ export default class NumberBuy extends NumberCommand { ] async run() { - const args = this.parsedArgs! as buyArgs; + const args = this.parsedArgs!; await this.numberBuy(args); this.log(`Number ${args.number} has been purchased.`) } diff --git a/packages/numbers/src/commands/numbers/cancel.ts b/packages/numbers/src/commands/numbers/cancel.ts index fc608bca..9fbc6fad 100644 --- a/packages/numbers/src/commands/numbers/cancel.ts +++ b/packages/numbers/src/commands/numbers/cancel.ts @@ -1,10 +1,7 @@ import NumberCommand from '../../number_base'; import { OutputFlags } from '@oclif/parser'; -interface cancelArgs { - number: string, - countryCode: string -} + export default class NumberCancel extends NumberCommand { static description = 'cancel a Vonage number' @@ -20,7 +17,7 @@ export default class NumberCancel extends NumberCommand { ] async run() { - const args = this.parsedArgs! as cancelArgs; + const args = this.parsedArgs!; await this.numberCancel(args); this.log(`Number ${args.number} has been cancelled.`) } diff --git a/packages/numbers/src/commands/numbers/search.ts b/packages/numbers/src/commands/numbers/search.ts index 5f0d5bdf..5f169c4a 100644 --- a/packages/numbers/src/commands/numbers/search.ts +++ b/packages/numbers/src/commands/numbers/search.ts @@ -18,10 +18,6 @@ interface searchFlags { features?: any } -interface searchArgs { - countryCode?: string -} - export default class NumberSearch extends NumberCommand { static description = 'search for available Vonage numbers' @@ -62,7 +58,7 @@ export default class NumberSearch extends NumberCommand { async run() { const flags = this.parsedFlags as OutputFlags & searchFlags - const args = this.parsedArgs! as searchArgs; + const args = this.parsedArgs!; let numberData = await this.numberSearch(args.countryCode, flags); cli.table(numberData.numbers, { diff --git a/packages/users/src/commands/apps/users/create.ts b/packages/users/src/commands/apps/users/create.ts index b30dc8dd..44a2b9f5 100644 --- a/packages/users/src/commands/apps/users/create.ts +++ b/packages/users/src/commands/apps/users/create.ts @@ -1,4 +1,4 @@ -import { OutputArgs, OutputFlags } from '@oclif/parser'; +import { OutputFlags } from '@oclif/parser'; import { flags } from '@oclif/command' import UserCommand from '../../../users_base'; import cli from 'cli-ux'; @@ -10,10 +10,6 @@ interface CreateFlags { image_url: any } -interface CreateArgs extends OutputArgs { - name: string, -} - export default class UsersCreate extends UserCommand { static description = "" @@ -32,7 +28,7 @@ export default class UsersCreate extends UserCommand { async run() { const flags = this.parsedFlags - const args = this.parsedArgs! as CreateArgs; + const args = this.parsedArgs!; // check for name diff --git a/packages/users/src/commands/apps/users/delete.ts b/packages/users/src/commands/apps/users/delete.ts index 820c906a..bae76ea3 100644 --- a/packages/users/src/commands/apps/users/delete.ts +++ b/packages/users/src/commands/apps/users/delete.ts @@ -1,10 +1,7 @@ -import { OutputArgs, OutputFlags } from '@oclif/parser'; +import { OutputFlags } from '@oclif/parser'; import UserCommand from '../../../users_base'; import chalk from 'chalk'; -interface DeleteArgs extends OutputArgs { - userID: string, -} export default class UsersDelete extends UserCommand { static description = "" @@ -21,7 +18,7 @@ export default class UsersDelete extends UserCommand { ] async run() { - const args = this.parsedArgs! as DeleteArgs; + const args = this.parsedArgs!; await this.deleteUser(args.userID); diff --git a/packages/users/src/commands/apps/users/show.ts b/packages/users/src/commands/apps/users/show.ts index 0bac0a24..93a264bd 100644 --- a/packages/users/src/commands/apps/users/show.ts +++ b/packages/users/src/commands/apps/users/show.ts @@ -1,11 +1,8 @@ -import { OutputArgs, OutputFlags } from '@oclif/parser'; +import { OutputFlags } from '@oclif/parser'; import UserCommand from '../../../users_base'; import chalk from 'chalk'; import { VetchResponse } from '../../../types'; -interface ShowArgs extends OutputArgs { - userID: string, -} export default class UsersShow extends UserCommand { static description = "" @@ -22,7 +19,7 @@ export default class UsersShow extends UserCommand { ] async run() { - const args = this.parsedArgs! as ShowArgs; + const args = this.parsedArgs!; let response = await this.getUserById(args.userID) as VetchResponse; diff --git a/packages/users/src/commands/apps/users/update.ts b/packages/users/src/commands/apps/users/update.ts index 77981294..d0338b7c 100644 --- a/packages/users/src/commands/apps/users/update.ts +++ b/packages/users/src/commands/apps/users/update.ts @@ -1,4 +1,4 @@ -import { OutputArgs, OutputFlags } from '@oclif/parser'; +import { OutputFlags } from '@oclif/parser'; import { flags } from '@oclif/command' import UserCommand from '../../../users_base'; import chalk from 'chalk'; @@ -10,9 +10,6 @@ interface UpdateFlags { image_url: any } -interface UpdateArgs extends OutputArgs { - userID: string, -} export default class UsersUpdate extends UserCommand { static description = "" @@ -33,7 +30,7 @@ export default class UsersUpdate extends UserCommand { async run() { const flags = this.parsedFlags - const args = this.parsedArgs! as UpdateArgs; + const args = this.parsedArgs!; let response = await this.updateUser({ ...args, ...flags }) as VetchResponse; diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 80e52a73..8bf523a1 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -1,5 +1,5 @@ import { Command, flags } from '@oclif/command'; -import { OutputArgs, OutputFlags } from '@oclif/parser'; +import { OutputFlags } from '@oclif/parser'; import Vonage from '@vonage/server-sdk'; import { CredentialsObject } from '@vonage/server-sdk'; import { readFileSync, writeFileSync } from 'fs'; @@ -44,7 +44,7 @@ export default abstract class BaseCommand extends Command { protected _keyFile!: any protected _userConfig!: UserConfig - protected parsedArgs?: OutputArgs; + protected parsedArgs?; protected parsedFlags?: OutputFlags; protected globalFlags?: OutputFlags;