feat(notif): add Gotify agent (#2196)

* feat(notifications): adds gotify notifications

adds new settings screen for gotify notifications including url, token and types settings

fix #2183

* feat(notif): add Gotify agent
addresses PR comments, runs i18n:extract

fix #2183

* reword validationTokenRequired

change wording to indicate presence, not validity

Co-authored-by: TheCatLady <52870424+TheCatLady@users.noreply.github.com>

* feat(notifications): gotify notifications fix

applies changes from #2077 in which Yup validation was failing for types

fix #2183

* feat(notifications): adds gotify notifications

adds new settings screen for gotify notifications including url, token and types settings

fix #2183

* feat(notif): add Gotify agent
addresses PR comments, runs i18n:extract

fix #2183

* reword validationTokenRequired

change wording to indicate presence, not validity

Co-authored-by: TheCatLady <52870424+TheCatLady@users.noreply.github.com>

* feat(notifications): gotify notifications fix

applies changes from #2077 in which Yup validation was failing for types

fix #2183

* feat(notifications): incorporate issue feature into gotify notifications

* feat(notifications): adds gotify notifications

adds new settings screen for gotify notifications including url, token and types settings

fix #2183

* feat(notif): add Gotify agent
addresses PR comments, runs i18n:extract

fix #2183

* reword validationTokenRequired

change wording to indicate presence, not validity

Co-authored-by: TheCatLady <52870424+TheCatLady@users.noreply.github.com>

* feat: add missing ts field

include notifyAdmin in test notification endpoint

* feat: apply formatting/line break items

add addition line break before conditional, change ordering of notifyAdmin/notifyUser in test
endpoint

* feat: remove duplicated endpoints

during rebase, notification endpoints were duplicated upon rebasing. remove duplicate routes

* feat: correct linting quirks

* feat: formatting improvements

* feat(gotify): refactor axios post to leverage 'getNotificationPayload'

Co-authored-by: TheCatLady <52870424+TheCatLady@users.noreply.github.com>
This commit is contained in:
Sean Chambers
2022-01-13 19:04:25 -06:00
committed by GitHub
parent 879df20022
commit e0b6abe479
12 changed files with 589 additions and 0 deletions

View File

@@ -189,9 +189,17 @@ export interface NotificationAgentWebhook extends NotificationAgentConfig {
};
}
export interface NotificationAgentGotify extends NotificationAgentConfig {
options: {
url: string;
token: string;
};
}
export enum NotificationAgentKey {
DISCORD = 'discord',
EMAIL = 'email',
GOTIFY = 'gotify',
PUSHBULLET = 'pushbullet',
PUSHOVER = 'pushover',
SLACK = 'slack',
@@ -203,6 +211,7 @@ export enum NotificationAgentKey {
interface NotificationAgents {
discord: NotificationAgentDiscord;
email: NotificationAgentEmail;
gotify: NotificationAgentGotify;
lunasea: NotificationAgentLunaSea;
pushbullet: NotificationAgentPushbullet;
pushover: NotificationAgentPushover;
@@ -359,6 +368,14 @@ class Settings {
enabled: false,
options: {},
},
gotify: {
enabled: false,
types: 0,
options: {
url: '',
token: '',
},
},
},
},
jobs: {