@contrail/cli 1.0.39 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/lib/api/apps.d.ts +13 -0
  2. package/lib/api/apps.js +85 -0
  3. package/lib/api/event-workflow-action-definition.d.ts +1 -0
  4. package/lib/api/event-workflow-action-definition.js +7 -0
  5. package/lib/api/event-workflow-template-definition.d.ts +5 -0
  6. package/lib/api/event-workflow-template-definition.js +14 -0
  7. package/lib/api/event-workflow-templates.d.ts +7 -0
  8. package/lib/api/event-workflow-templates.js +25 -0
  9. package/lib/apps/deploy-app/app-deployer.js +4 -17
  10. package/lib/apps/deploy-app/workflow-definition-deployer.js +2 -1
  11. package/lib/apps/install-app/app-installer.js +21 -4
  12. package/lib/apps/upgrade-app/app-upgrader.js +1 -1
  13. package/lib/auth/login.js +2 -2
  14. package/lib/cli.js +112 -44
  15. package/lib/config/config.d.ts +2 -2
  16. package/lib/config/configCommands.d.ts +1 -0
  17. package/lib/config/configCommands.js +25 -1
  18. package/lib/interfaces.d.ts +65 -1
  19. package/lib/interfaces.js +21 -0
  20. package/lib/workflow-template-definitions/workflow-template-definition-commands.d.ts +2 -0
  21. package/lib/workflow-template-definitions/workflow-template-definition-commands.js +10 -0
  22. package/lib/workflow-template-definitions/workflow-template-definition-deployer.d.ts +12 -0
  23. package/lib/workflow-template-definitions/workflow-template-definition-deployer.js +148 -0
  24. package/lib/workflow-templates/local-workflow-template-deployer.d.ts +11 -0
  25. package/lib/workflow-templates/local-workflow-template-deployer.js +102 -0
  26. package/lib/workflow-templates/workflow-template-commands.d.ts +4 -0
  27. package/lib/workflow-templates/workflow-template-commands.js +51 -0
  28. package/lib/workflow-templates/workflow-template-deployer.d.ts +4 -0
  29. package/lib/workflow-templates/workflow-template-deployer.js +25 -0
  30. package/package.json +1 -1
  31. package/src/api/apps.ts +97 -0
  32. package/src/api/event-workflow-action-definition.ts +8 -0
  33. package/src/api/event-workflow-template-definition.ts +16 -0
  34. package/src/api/event-workflow-templates.ts +29 -0
  35. package/src/apps/deploy-app/app-deployer.ts +4 -19
  36. package/src/apps/install-app/app-installer.ts +34 -13
  37. package/src/apps/upgrade-app/app-upgrader.ts +1 -1
  38. package/src/auth/login.ts +2 -2
  39. package/src/cli.ts +114 -44
  40. package/src/config/config.ts +2 -2
  41. package/src/config/configCommands.ts +26 -1
  42. package/src/interfaces.ts +76 -6
  43. package/src/workflow-template-definitions/workflow-template-definition-commands.ts +13 -0
  44. package/src/workflow-template-definitions/workflow-template-definition-deployer.ts +182 -0
  45. package/src/{workflows/workflow-template-deployer.ts → workflow-templates/local-workflow-template-deployer.ts} +9 -38
  46. package/src/{workflows/workflowCommands.ts → workflow-templates/workflow-template-commands.ts} +10 -4
  47. package/src/workflow-templates/workflow-template-deployer.ts +29 -0
  48. package/src/apps/app-api.ts +0 -66
  49. package/src/apps/deploy-app/workflow-definition-deployer.ts +0 -118
  50. package/tslint.json +0 -57
@@ -1,8 +1,10 @@
1
1
  import inquirer from 'inquirer';
2
2
  import chalk from 'chalk';
3
3
  import { Entities } from '@contrail/sdk';
4
- import {authUser} from '../../auth/login';
5
- import { deleteAppOrg, getAvailableApps, getInstalledApps, installAppToOrg } from '../app-api';
4
+ import { authUser } from '../../auth/login';
5
+ import { deleteAppOrg, getAvailableApps, getInstalledApps, getWorkflowTemplateDefinitionsForApp, installAppToOrg } from '../../api/apps';
6
+ import { App } from '../../interfaces';
7
+ import { WorkflowTemplateDefinitionDeployer } from '../../workflow-template-definitions/workflow-template-definition-deployer';
6
8
 
7
9
  async function getConfigProperties(app) {
8
10
  const config = {};
@@ -30,14 +32,14 @@ export async function uninstallApp() {
30
32
  message: 'Which app would you like to uninstall?',
31
33
  choices: installedApps.map(x => x.app.identifier)
32
34
  }]);
33
- const appToDelete = installedApps.find(x=> x.app.identifier === answers.appIdentifier);
35
+ const appToDelete = installedApps.find(x => x.app.identifier === answers.appIdentifier);
34
36
  console.log('%s Uninstalling app', chalk.green.bold('APP INSTALLATION'));
35
37
  await deleteAppOrg(appToDelete.id);
36
38
  // eslint-disable-next-line no-constant-condition
37
39
  while (true) {
38
40
  await delay(1000);
39
- try{
40
- const appStillDeleting = await new Entities().get({entityName: 'app-org', id: appToDelete.id});
41
+ try {
42
+ const appStillDeleting = await new Entities().get({ entityName: 'app-org', id: appToDelete.id });
41
43
  if (!appStillDeleting) {
42
44
  break;
43
45
  }
@@ -52,7 +54,7 @@ export async function uninstallApp() {
52
54
 
53
55
  export async function installApp() {
54
56
  await authUser();
55
- const apps = await getAvailableApps();
57
+ const apps: App[] = await getAvailableApps();
56
58
  if (!apps.length) {
57
59
  throw new Error('No apps are available to install...');
58
60
  }
@@ -70,7 +72,7 @@ export async function installApp() {
70
72
  message: 'Which app would you like to install?',
71
73
  choices: installableApps.map(x => x.identifier)
72
74
  });
73
- const answers = await inquirer.prompt(questions);
75
+ let answers = await inquirer.prompt(questions);
74
76
  const app = installableApps.find(x => x.identifier === answers.appIdentifier);
75
77
  let configProperties: any;
76
78
  if (app.configProperties) {
@@ -82,24 +84,43 @@ export async function installApp() {
82
84
  // eslint-disable-next-line no-constant-condition
83
85
  while (true) {
84
86
  await delay(1000);
85
- try{
86
- const installingApp = await new Entities().get({entityName: 'app-org', id: appOrg.id});
87
+ try {
88
+ const installingApp = await new Entities().get({ entityName: 'app-org', id: appOrg.id });
87
89
  if (installingApp.status === 'READY') {
88
90
  console.log('%s App installed', chalk.green.bold('APP INSTALLATION'));
89
- return;
91
+ break;
90
92
  }
91
- if(installingApp.status === 'FAILED_INSTALLING') {
93
+ if (installingApp.status === 'FAILED_INSTALLING') {
92
94
  console.log('%s App installation failed', chalk.red.bold('APP INSTALLATION'));
93
95
  return;
94
96
  }
95
97
  process.stdout.write('.');
96
98
  } catch (e) {
99
+ console.log('%s App installation failed', chalk.red.bold('APP INSTALLATION'));
97
100
  console.log('Error is:', e);
98
- break;
101
+ return;
99
102
  }
100
103
  }
104
+
105
+ const workflowTemplateDefinitions = await getWorkflowTemplateDefinitionsForApp({ appId: app.id });
106
+ if (!workflowTemplateDefinitions.length) {
107
+ return;
108
+ }
109
+ answers = await inquirer.prompt([{
110
+ type: 'confirm',
111
+ name: 'shouldInstallWorkflows',
112
+ message: 'Would you like to install the Workflows associated with this app?',
113
+ default: false
114
+ }]);
115
+
116
+ if (!answers.shouldInstallWorkflows) {
117
+ console.log('%s Not installing associated app workflows', chalk.yellow.bold('APP INSTALLATION'));
118
+ return;
119
+ }
120
+
121
+ new WorkflowTemplateDefinitionDeployer().installWorkflowTemplateDefinitions(workflowTemplateDefinitions);
101
122
  }
102
123
 
103
124
  function delay(ms: number) {
104
- return new Promise( resolve => setTimeout(resolve, ms) );
125
+ return new Promise(resolve => setTimeout(resolve, ms));
105
126
  }
@@ -2,7 +2,7 @@ import inquirer from 'inquirer';
2
2
  import chalk from 'chalk';
3
3
  import { Entities } from '@contrail/sdk';
4
4
  import { authUser } from '../../auth/login';
5
- import { deleteAppOrg, getAppVersions, getAvailableApps, getInstalledApps, installAppToOrg, upgradeAppVersion } from '../app-api';
5
+ import { deleteAppOrg, getAppVersions, getAvailableApps, getInstalledApps, installAppToOrg, upgradeAppVersion } from '../../api/apps';
6
6
 
7
7
  async function getConfigProperties(app) {
8
8
  const config = {};
package/src/auth/login.ts CHANGED
@@ -5,8 +5,8 @@ import { Auth, AuthContext } from './auth';
5
5
  import { getConfig, storeConfig } from '../config/config';
6
6
 
7
7
  const CONFIGURATION = {
8
- userPoolId: 'us-east-1_qIaNZdUfm',
9
- clientId: process.env.CONTRAIL_COGNITO_CLIENT_ID || '7knkt34gfacbgd0ghnuspefdfg',
8
+ userPoolId: 'us-east-1_x8hXZUsL6',
9
+ clientId: process.env.CONTRAIL_COGNITO_CLIENT_ID || '2oubek96sue5rsncovtqhs3scm',
10
10
  };
11
11
 
12
12
  export async function authUser(): Promise<AuthContext> {
package/src/cli.ts CHANGED
@@ -9,10 +9,11 @@ import { MergeOptionSets } from './types/option-set-merger';
9
9
  import { MergeTypeProperties } from './types/types-properties-merger';
10
10
  import { ParseTypesFromFiles, ParseTypesFromLocalFiles, ParseTypesFromTemplateFromLocalFiles } from './types/parse-types';
11
11
  import { loadColors, deleteColors } from './colors/color-loader';
12
- import { listConfig, removeConfig } from './config/configCommands';
13
- import { deleteWorkflowTemplate, deployWorkflowTemplate, listWorkflowTemplate } from './workflows/workflowCommands';
12
+ import { listConfig, removeConfig, setConfig } from './config/configCommands';
13
+ import { deleteWorkflowTemplates, localDeployWorkflowTemplate, listWorkflowTemplate } from './workflow-templates/workflow-template-commands';
14
14
  import { installApp, uninstallApp } from './apps/install-app/app-installer';
15
15
  import { upgradeApp } from './apps/upgrade-app/app-upgrader';
16
+ import { cliInstallWorkflowTemplateDefinitions, listWorkflowTemplateDefinitions } from './workflow-template-definitions/workflow-template-definition-commands';
16
17
  const cliUsage = require('command-line-usage');
17
18
 
18
19
  /**
@@ -22,8 +23,6 @@ const cliUsage = require('command-line-usage');
22
23
 
23
24
  export async function cli(args) {
24
25
  const fullCommand = args[2];
25
- let domain;
26
- let command;
27
26
  if (!fullCommand) {
28
27
  printIllegalCommand();
29
28
  return;
@@ -35,13 +34,18 @@ export async function cli(args) {
35
34
  return;
36
35
  }
37
36
 
38
- if (commandParts?.length < 2 && commandParts[0].toLowerCase() !== 'help' && commandParts[0].toLowerCase() !== '-help' && commandParts[0].toLowerCase() !== '--help') {
37
+ if (
38
+ commandParts?.length < 2 &&
39
+ commandParts[0].toLowerCase() !== 'help' &&
40
+ commandParts[0].toLowerCase() !== '-help' &&
41
+ commandParts[0].toLowerCase() !== '--help'
42
+ ) {
39
43
  printIllegalCommand();
40
44
  return;
41
45
  }
42
46
 
43
- domain = commandParts[0];
44
- command = commandParts[1];
47
+ const domain = commandParts[0];
48
+ const command = commandParts[1];
45
49
 
46
50
  switch (domain) {
47
51
  case 'app': {
@@ -140,11 +144,11 @@ export async function cli(args) {
140
144
  case 'workflow-templates': {
141
145
  switch (command) {
142
146
  case 'load': {
143
- await deployWorkflowTemplate();
147
+ await localDeployWorkflowTemplate();
144
148
  break;
145
149
  }
146
150
  case 'delete': {
147
- await deleteWorkflowTemplate();
151
+ await deleteWorkflowTemplates();
148
152
  break;
149
153
  }
150
154
  case 'list': {
@@ -157,12 +161,32 @@ export async function cli(args) {
157
161
  }
158
162
  break;
159
163
  }
164
+ case 'workflow-template-definitions': {
165
+ switch (command) {
166
+ case 'install': {
167
+ await cliInstallWorkflowTemplateDefinitions();
168
+ break;
169
+ }
170
+ case 'list': {
171
+ await listWorkflowTemplateDefinitions();
172
+ break;
173
+ }
174
+ default: {
175
+ printIllegalCommand();
176
+ }
177
+ }
178
+ break;
179
+ }
160
180
  case 'config': {
161
181
  switch (command) {
162
182
  case 'list': {
163
183
  await listConfig();
164
184
  break;
165
185
  }
186
+ case 'set': {
187
+ await setConfig(args);
188
+ break;
189
+ }
166
190
  case 'remove': {
167
191
  await removeConfig(args);
168
192
  break;
@@ -218,55 +242,101 @@ const helpSections = [
218
242
  {
219
243
  header: 'App Commands - Domain: app',
220
244
  content: [
221
- 'create Create a new app workspace.',
222
- 'deploy Deploy your app.',
223
- 'deploy [OPTIONS] --template-only deploy event workflow as',
224
- '. a template directly to the org',
225
- 'deploy Deploy your app.',
226
- 'remove Remove your app.',
227
- 'install Install an app to your org.',
228
- 'uninstall Uninstall an app from your org.',
245
+ {
246
+ name: 'create',
247
+ summary: 'Create a new app workspace.'
248
+ },
249
+ {
250
+ name: 'deploy [--template-only]',
251
+ summary: 'Deploy your app. --template-only can be used to deploy event workflow as a template directly to the org'
252
+ },
253
+ {
254
+ name: 'remove',
255
+ summary: 'Remove your app.'
256
+ },
257
+ {
258
+ name: 'install',
259
+ summary: 'Install an app to your org.'
260
+ },
261
+ {
262
+ name: 'uninstall',
263
+ summary: 'Uninstall an app from your org.'
264
+ },
229
265
  ],
230
266
  },
231
267
  {
232
268
  header: 'Colors Commands - Domain: colors',
233
- content: [
234
- 'load Load colors from a CSV. Headers (name, hex, red,',
235
- '. green, blue) are required.',
236
- // 'delete Delete all colors.',
269
+ content: [{
270
+ name: 'load',
271
+ summary: 'Load colors from a CSV. Headers (name, hex, red, green, blue) are required'
272
+ }
273
+ // , {name: 'delete', summary: 'Delete all colors.'}
237
274
  ],
238
275
  },
239
276
  {
240
277
  header: 'Workflow Template Commands - Domain: workflow-templates',
241
278
  content: [
242
- 'deploy Deploy your workflow. Assumes a workflow.yml file.',
243
- 'delete Removes the workflows in the workflow.yml file.',
244
- 'list Lists the workflow templates in the org',
279
+ {
280
+ name: 'deploy',
281
+ summary: 'Deploy your workflow. Assumes a workflow.yml file.'
282
+ },
283
+ {
284
+ name: 'delete',
285
+ summary: 'Removes the workflows in the workflow.yml file.'
286
+ },
287
+ {
288
+ name: 'list',
289
+ summary: 'Lists the workflow templates in the org'
290
+ },
291
+ ],
292
+ },
293
+ {
294
+ header: 'Workflow Template Definition Commands - Domain: workflow-template-definitions',
295
+ content: [{
296
+ name: 'install',
297
+ summary: 'Install the template definitions of an app to your org'
298
+ },
299
+ {
300
+ name: 'list',
301
+ summary: 'Lists the workflow templates in the org'
302
+ }
245
303
  ],
246
304
  },
247
305
  {
248
306
  header: 'Type Commands - Domain: types',
249
307
  content: [
250
- 'getAll Get all OptionSets and Types for your Org.',
251
- 'uploadTypes Upload Types for your Org.',
252
- '. Types are uploaded from types.yml\n',
253
- 'uploadOptionSets Upload OptionSets for your Org.',
254
- '. OptionSets are loaded from option_sets.yml\n',
255
- 'parseOptionSetsLocalFiles <File Paths> Parse CSV files into OptionSets',
256
- 'parseTypesFromLocalFiles <File Paths> Parse CSV files into Types and ',
257
- '. OptionSets from local files.\n',
258
- 'parseTypesFromTemplateFromLocalFiles <File Paths> Parse CSV files into ',
259
- '. Types and OptionSets from local files.\n',
260
- 'parseTypesFromFiles <fileIds> Parse CSV files into Types and ',
261
- '. OptionSets from VibeIQ Files.\n',
262
- 'mergeOptionSets <File Path> Merge the OptionSets from an existing',
263
- '. org and the OptionSets passed in.',
264
- '. File must be .yml\n',
265
- 'mergeTypeProperties <File Path> <TypePaths> ',
266
- '. Merge the TypeProperties from an existing',
267
- '. org and the TypeProperties passed in.',
268
- '. Add to Types via TypePath',
269
- '. File must be .yml\n',
308
+ {
309
+ name: 'getAll',
310
+ summary: 'Get all OptionSets and Types for your Org.'
311
+ },
312
+ {
313
+ name: 'uploadTypes',
314
+ summary: 'Upload Types for your Org. Types are uploaded from types.yml\n'
315
+ },
316
+ {
317
+ name: 'uploadOptionSets',
318
+ summary: 'Upload OptionSets for your Org. OptionSets are loaded from option_sets.yml\n'
319
+ },
320
+ {
321
+ name: 'parseOptionSetsLocalFiles <File Paths>',
322
+ summary: 'Parse CSV files into OptionSets'
323
+ },
324
+ {
325
+ name: 'parseTypesFromLocalFiles <File Paths>',
326
+ summary: 'Parse CSV files into Types and OptionSets from local files.\n'
327
+ },
328
+ {
329
+ name: 'parseTypesFromTemplateFromLocalFiles <File Paths>',
330
+ summary: 'Parse CSV files into Types and OptionSets from local files.\n'
331
+ },
332
+ {
333
+ name: 'parseTypesFromFiles <fileIds>',
334
+ summary: 'Parse CSV files into Types and OptionSets from VibeIQ Files.\n File must be .yml\n'
335
+ },
336
+ {
337
+ name: 'mergeTypeProperties <File Path> <TypePaths>',
338
+ summary: 'Merge the TypeProperties from an existing org and the TypeProperties passed in. Add to Types via TypePath File must be .yml\n'
339
+ },
270
340
  ],
271
341
  },
272
342
  ];
@@ -38,7 +38,7 @@ export async function readVibeIQConfig() {
38
38
  }
39
39
  }
40
40
 
41
- export async function writeVibeIQConfig(config: Object) {
41
+ export async function writeVibeIQConfig(config: any) {
42
42
  try {
43
43
  await fsPromises.writeFile(configFileLocation, JSON.stringify(config, null, 2));
44
44
  } catch (e) {
@@ -60,7 +60,7 @@ export async function deleteConfigs(configNames: string[]) {
60
60
  await storeConfig(currentConfig, false);
61
61
  }
62
62
 
63
- export async function storeConfig(incomingConfig: Object, merge=true) {
63
+ export async function storeConfig(incomingConfig: any, merge=true) {
64
64
  let config;
65
65
  if (merge) {
66
66
  config = {
@@ -1,8 +1,33 @@
1
- import {deleteConfigs, readVibeIQConfig} from './config';
1
+ import {deleteConfigs, readVibeIQConfig, storeConfig} from './config';
2
2
  export async function listConfig() {
3
3
  console.log(await readVibeIQConfig());
4
4
  }
5
5
 
6
+ export async function setConfig(args) {
7
+ const helpConfigLine = `
8
+ Usage:
9
+ contrail config.set key1=value1 key2=value2
10
+ `;
11
+ if (args?.length < 4) {
12
+ console.log(helpConfigLine);
13
+ throw new Error('You need to pass at least one config to set');
14
+ }
15
+ const configsToSet = args.slice(3);
16
+ const config = {};
17
+ for(const conf of configsToSet) {
18
+ if(conf.length < 3 || conf.indexOf('=') <= 0) {
19
+ console.log(helpConfigLine);
20
+ throw new Error(`value ${conf} does not adhere to key1=value1 standard`);
21
+ }
22
+ const [key, value] = conf.split('=');
23
+ console.log('key and value:', key, value);
24
+ console.log(conf.split('='));
25
+ config[key] = value;
26
+ }
27
+ console.log('config is:', config);
28
+ await storeConfig(config);
29
+ }
30
+
6
31
  export async function removeConfig(args) {
7
32
  if (args?.length < 4) {
8
33
  throw new Error('At least one configuration must be included to be removed.');
package/src/interfaces.ts CHANGED
@@ -14,7 +14,7 @@ export interface AppDeclaration {
14
14
  actions?: { [key: string]: AppActionDeclaration };
15
15
  appConfiguration: ConfigPropertyElements;
16
16
  triggers: { [key: string]: AppTriggerDeclaration };
17
- workflows?: { [key: string]: WorkflowDefinition|WorkflowTemplateDeclaration };
17
+ workflows?: { [key: string]: WorkflowDefinition | WorkflowTemplateDeclaration };
18
18
  dockerImageRef?: string;
19
19
  }
20
20
 
@@ -23,9 +23,9 @@ export interface ConfigPropertyElements {
23
23
  }
24
24
 
25
25
  export interface ConfigPropertyElement {
26
- propertyType: string;
27
- options?: any[];
28
- label: string;
26
+ propertyType: string;
27
+ options?: any[];
28
+ label: string;
29
29
  dynamic?: boolean;
30
30
  }
31
31
 
@@ -45,6 +45,7 @@ export interface AppTriggerDeclaration {
45
45
  description?: string;
46
46
  }
47
47
 
48
+ // workflow-template and workflow-template-definition share the same interface
48
49
  export interface WorkflowDefinition {
49
50
  id?: string;
50
51
  identifier: string;
@@ -65,7 +66,7 @@ export interface WorkflowTemplateDeclaration {
65
66
 
66
67
  export interface WorkflowTemplate {
67
68
  id?: string;
68
- identifier: string;
69
+ identifier?: string;
69
70
  name: string;
70
71
  triggerKey: string;
71
72
  workflowDefinition: WorkflowDefinitionPaths;
@@ -87,7 +88,7 @@ export interface WorkflowConditional {
87
88
  export interface ActionDefinitionConfig {
88
89
  name: string;
89
90
  action: string;
90
- config?: {[key: string]: any};
91
+ config?: { [key: string]: any };
91
92
  id?: string;
92
93
  }
93
94
 
@@ -104,6 +105,75 @@ export interface App {
104
105
  triggerKeyDefinitions?: TriggerKeyDefinition[];
105
106
  }
106
107
 
108
+ export interface AppOrg {
109
+ id: string;
110
+ createdOn?: Date;
111
+ updatedOn?: Date;
112
+ createdById?: string;
113
+ updatedById?: string;
114
+ createdBy?: any;
115
+ updatedBy?: any;
116
+ orgId?: string;
117
+ status: AppOrgStatus;
118
+ appId?: string;
119
+ app?: App;
120
+ appVersionId?: string;
121
+ appVersion?: AppVersion;
122
+ apiKey?: AppApiKey;
123
+ appConfig?: any;
124
+ }
125
+
126
+ export enum AppOrgStatus {
127
+ INSTALLING = 'INSTALLING',
128
+ FAILED_INSTALLING = 'FAILED_INSTALLING',
129
+ READY = 'READY',
130
+ DELETING = 'DELETING',
131
+ FAILED_DELETING = 'FAILED_DELETING',
132
+ }
133
+
134
+ export enum AppVersionStatus {
135
+ PUBLISHING = 'PUBLISHING',
136
+ FAILED_PUBLISHING = 'FAILED_PUBLISHING',
137
+ PUBLISHED = 'PUBLISHED',
138
+ ARCHIVING = 'ARCHIVING',
139
+ FAILED_ARCHIVING = 'FAILED_ARCHIVING',
140
+ ARCHIVED = 'ARCHIVED',
141
+ }
142
+
143
+ export class AppVersion {
144
+ id: string;
145
+ createdOn?: Date;
146
+ updatedOn?: Date;
147
+ createdById?: string;
148
+ updatedById?: string;
149
+ createdBy?: any;
150
+ updatedBy?: any;
151
+ orgId?: string;
152
+ appId?: string;
153
+ app?: App;
154
+ appOrgs?: AppOrg[];
155
+ versionNumber: number;
156
+ status: AppVersionStatus;
157
+ eventWorkflowTriggerKeyMapping: string;
158
+ configProperties?: ConfigProperty[];
159
+ triggerKeyDefinitions?: TriggerKeyDefinition[];
160
+ dockerImageRef?: string;
161
+ }
162
+
163
+ export class AppApiKey {
164
+ id: string;
165
+ createdOn?: Date;
166
+ updatedOn?: Date;
167
+ createdById?: string;
168
+ updatedById?: string;
169
+ createdBy?: any;
170
+ updatedBy?: any;
171
+ orgId?: string;
172
+ appOrgId?: string;
173
+ appOrg?: AppOrg;
174
+ apiKey?: string;
175
+ }
176
+
107
177
  export class ConfigProperty {
108
178
  slug: string;
109
179
  propertyType: string;
@@ -0,0 +1,13 @@
1
+
2
+ import { authUser } from '../auth/login';
3
+ import { WorkflowTemplateDefinitionDeployer } from './workflow-template-definition-deployer';
4
+
5
+ export async function cliInstallWorkflowTemplateDefinitions() {
6
+ await authUser();
7
+ await new WorkflowTemplateDefinitionDeployer().cliInstallWorkflowTemplateDefinitions();
8
+ }
9
+
10
+ export async function listWorkflowTemplateDefinitions() {
11
+ await authUser();
12
+ await new WorkflowTemplateDefinitionDeployer().listWorkflowTemplateDefinitions();
13
+ }