This repository has been archived by the owner on Apr 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DicaCertBrApp.ts
56 lines (47 loc) · 1.78 KB
/
DicaCertBrApp.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
import { IAppAccessors, IConfigurationExtend, 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 { DicaCertBrProcessor } from './DicaCertBrProcessor';
export class DicaCertBrApp extends App {
constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) {
super(info, logger, accessors);
}
public async extendConfiguration(configuration: IConfigurationExtend) {
await configuration.settings.provideSetting({
id: 'room_name',
type: SettingType.STRING,
packageValue: 'general',
required: true,
public: false,
i18nLabel: 'room_name_label',
});
await configuration.settings.provideSetting({
id: 'sender_username',
type: SettingType.STRING,
packageValue: '',
required: false,
public: false,
i18nLabel: 'sender_username_label',
});
await configuration.settings.provideSetting({
id: 'consumer_key',
type: SettingType.STRING,
packageValue: '',
required: true,
public: false,
i18nLabel: 'consumer_key_label',
});
await configuration.settings.provideSetting({
id: 'consumer_secret',
type: SettingType.STRING,
packageValue: '',
required: true,
public: false,
i18nLabel: 'consumer_secret_label',
});
await configuration.scheduler.registerProcessors([
new DicaCertBrProcessor()
]);
}
}