UNPKG

1.79 kBTypeScriptView Raw
1/**
2 * @author: Prachi Singh (prachi@hackcapital.com)
3 * @date: Tuesday, 5th November 2019 1:11:40 pm
4 * @lastModifiedBy: Prachi Singh (prachi@hackcapital.com)
5 * @lastModifiedTime: Monday, 18th November 2019 4:28:12 pm
6 *
7 * DESCRIPTION: ops add
8 *
9 * @copyright (c) 2019 Hack Capital
10 */
11import Command from '../base';
12import { OpCommand, OpWorkflow, Config } from '../types';
13declare type OpFilter = {
14 opTeamName: string;
15 opName: string;
16 opVersionName: string;
17};
18interface AddInputs {
19 opName: string;
20 config: Config;
21 ops: (OpCommand | OpWorkflow)[];
22 opFilter: OpFilter;
23 addedOpID: number;
24}
25export default class Add extends Command {
26 static description: string;
27 static flags: {
28 help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
29 };
30 static args: {
31 name: string;
32 description: string;
33 }[];
34 ops: (OpCommand | OpWorkflow)[];
35 promptFilter: (inputs: AddInputs) => Promise<AddInputs>;
36 isOpAlreadyInTeam: (opResults: (OpCommand | OpWorkflow)[], opName: string, opTeamName: string, opVersionName: string, myTeamName: string) => boolean;
37 getAllMyOps: (config: Config) => Promise<(OpCommand | OpWorkflow)[]>;
38 getAllPublicOps: (inputs: AddInputs) => Promise<AddInputs>;
39 private _fuzzyFilterParams;
40 _formatOpOrWorkflowName: (op: OpCommand | OpWorkflow) => string;
41 private _autocompleteSearch;
42 selectOpPrompt: (inputs: AddInputs) => Promise<AddInputs>;
43 checkValidOpName: (inputs: AddInputs) => Promise<AddInputs>;
44 splitOpName: (inputs: AddInputs) => AddInputs;
45 addOp: (inputs: AddInputs) => Promise<AddInputs>;
46 sendAnalytics: (inputs: AddInputs) => Promise<AddInputs>;
47 getSuccessMessage: (inputs: AddInputs) => AddInputs;
48 run(): Promise<void>;
49}
50export {};