-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMaxiconApp.ts
63 lines (52 loc) · 2.17 KB
/
MaxiconApp.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import {
IConfigurationExtend, IEnvironmentRead, ILogger,
} from '@rocket.chat/apps-engine/definition/accessors';
import { App } from '@rocket.chat/apps-engine/definition/App';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';
import { SettingType } from '@rocket.chat/apps-engine/definition/settings';
import { Getter } from './commands/Getter';
import { ManualSlashCommand } from './commands/manual';
import { ConfluenceSlashCommand } from './commands/confluence';
import { StatusProjetoSlashCommand } from './commands/statusprojeto';
export class MaxiconApp extends App {
private getter: Getter;
constructor(info: IAppInfo, logger: ILogger) {
super(info, logger);
this.getter = new Getter();
}
public getGetter(): Getter {
return this.getter;
}
public async extendConfiguration(configuration: IConfigurationExtend, environmentRead: IEnvironmentRead): Promise<void> {
configuration.settings.provideSetting({
id: 'user_alias',
type: SettingType.STRING,
packageValue: 'username',
required: true,
public: false,
i18nLabel: 'user_alias_label',
i18nDescription: 'user_alias_description',
});
configuration.settings.provideSetting({
id: 'passwd_alias',
type: SettingType.STRING,
packageValue: 'password',
required: true,
public: false,
i18nLabel: 'passwd_alias',
i18nDescription: 'passwd_alias_description',
});
configuration.settings.provideSetting({
id: 'url_alias',
type: SettingType.STRING,
packageValue: 'https://confluence.maxiconsystems.com.br/',
required: true,
public: false,
i18nLabel: 'passwd_alias',
i18nDescription: 'passwd_alias_description',
});
configuration.slashCommands.provideSlashCommand(new ManualSlashCommand(this));
configuration.slashCommands.provideSlashCommand(new ConfluenceSlashCommand(this));
configuration.slashCommands.provideSlashCommand(new StatusProjetoSlashCommand(this));
}
}