-
Notifications
You must be signed in to change notification settings - Fork 106
Support any channel types from Notification #743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ const NODE_API_BASE_PATH = '/api/notifications'; | |
| const NODE_API = Object.freeze({ | ||
| GET_CONFIGS: `${NODE_API_BASE_PATH}/get_configs`, | ||
| GET_CONFIG: `${NODE_API_BASE_PATH}/get_config`, | ||
| GET_AVAILABLE_FEATURES: `${NODE_API_BASE_PATH}/features`, | ||
| }); | ||
|
|
||
| export default class NotificationService { | ||
|
|
@@ -25,6 +26,18 @@ export default class NotificationService { | |
| this.httpClient = httpClient; | ||
| } | ||
|
|
||
| getServerFeatures = async (): Promise<Array<String>> => { | ||
| try { | ||
| const response = await this.httpClient.get( | ||
| NODE_API.GET_AVAILABLE_FEATURES | ||
| ); | ||
| return response.allowed_config_type_list as Array<String>; | ||
| } catch (error) { | ||
| console.error('error fetching available features', error); | ||
| return null; | ||
|
||
| } | ||
| }; | ||
|
|
||
| getConfigs = async (queryObject: HttpFetchQuery) => { | ||
| return this.httpClient.get<ConfigsResponse>(NODE_API.GET_CONFIGS, { | ||
| query: queryObject, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.