forked from DGNum/uptime-kuma-api
feat: add support for uptime kuma 1.18.1 / 1.18.2
This commit is contained in:
parent
37e1fd6d6f
commit
fee0a1dd8e
1 changed files with 55 additions and 34 deletions
|
@ -16,8 +16,6 @@ class NotificationType(str, Enum):
|
||||||
LUNASEA = "lunasea"
|
LUNASEA = "lunasea"
|
||||||
MATRIX = "matrix"
|
MATRIX = "matrix"
|
||||||
MATTERMOST = "mattermost"
|
MATTERMOST = "mattermost"
|
||||||
NTFY = "ntfy"
|
|
||||||
OCTOPUSH = "octopush"
|
|
||||||
ONEBOT = "OneBot"
|
ONEBOT = "OneBot"
|
||||||
PAGERDUTY = "PagerDuty"
|
PAGERDUTY = "PagerDuty"
|
||||||
PROMOSMS = "promosms"
|
PROMOSMS = "promosms"
|
||||||
|
@ -31,15 +29,21 @@ class NotificationType(str, Enum):
|
||||||
SLACK = "slack"
|
SLACK = "slack"
|
||||||
SMTP = "smtp"
|
SMTP = "smtp"
|
||||||
STACKFIELD = "stackfield"
|
STACKFIELD = "stackfield"
|
||||||
TEAMS = "teams"
|
|
||||||
PUSHBYTECHULUS = "PushByTechulus"
|
PUSHBYTECHULUS = "PushByTechulus"
|
||||||
TELEGRAM = "telegram"
|
TELEGRAM = "telegram"
|
||||||
WEBHOOK = "webhook"
|
WEBHOOK = "webhook"
|
||||||
WECOM = "WeCom"
|
WECOM = "WeCom"
|
||||||
ALERTNOW = "AlertNow"
|
ALERTNOW = "AlertNow"
|
||||||
BARK = "Bark"
|
|
||||||
HOMEASSISTANT = "HomeAssistant"
|
HOMEASSISTANT = "HomeAssistant"
|
||||||
LINENOTIFY = "LineNotify"
|
LINENOTIFY = "LineNotify"
|
||||||
|
BARK = "Bark"
|
||||||
|
GOALERT = "GoAlert"
|
||||||
|
NTFY = "ntfy"
|
||||||
|
OCTOPUSH = "octopush"
|
||||||
|
SERVERCHAN = "ServerChan"
|
||||||
|
SMSMANAGER = "SMSManager"
|
||||||
|
SQUADCAST = "squadcast"
|
||||||
|
TEAMS = "teams"
|
||||||
|
|
||||||
|
|
||||||
notification_provider_options = {
|
notification_provider_options = {
|
||||||
|
@ -115,24 +119,6 @@ notification_provider_options = {
|
||||||
"mattermosticonemo",
|
"mattermosticonemo",
|
||||||
"mattermosticonurl",
|
"mattermosticonurl",
|
||||||
],
|
],
|
||||||
NotificationType.NTFY: [
|
|
||||||
"ntfyserverurl",
|
|
||||||
"ntfytopic",
|
|
||||||
"ntfyPriority",
|
|
||||||
],
|
|
||||||
NotificationType.OCTOPUSH: [
|
|
||||||
"octopushVersion",
|
|
||||||
"octopushAPIKey",
|
|
||||||
"octopushLogin",
|
|
||||||
"octopushPhoneNumber",
|
|
||||||
"octopushSMSType",
|
|
||||||
"octopushSenderName",
|
|
||||||
"octopushDMLogin",
|
|
||||||
"octopushDMAPIKey",
|
|
||||||
"octopushDMPhoneNumber",
|
|
||||||
"octopushDMSenderName",
|
|
||||||
"octopushDMSMSType",
|
|
||||||
],
|
|
||||||
NotificationType.ONEBOT: [
|
NotificationType.ONEBOT: [
|
||||||
"httpAddr",
|
"httpAddr",
|
||||||
"accessToken",
|
"accessToken",
|
||||||
|
@ -218,9 +204,6 @@ notification_provider_options = {
|
||||||
NotificationType.STACKFIELD: [
|
NotificationType.STACKFIELD: [
|
||||||
"stackfieldwebhookURL",
|
"stackfieldwebhookURL",
|
||||||
],
|
],
|
||||||
NotificationType.TEAMS: [
|
|
||||||
"webhookUrl",
|
|
||||||
],
|
|
||||||
NotificationType.PUSHBYTECHULUS: [
|
NotificationType.PUSHBYTECHULUS: [
|
||||||
"pushAPIKey",
|
"pushAPIKey",
|
||||||
],
|
],
|
||||||
|
@ -238,11 +221,6 @@ notification_provider_options = {
|
||||||
NotificationType.ALERTNOW: [
|
NotificationType.ALERTNOW: [
|
||||||
"alertNowWebhookURL",
|
"alertNowWebhookURL",
|
||||||
],
|
],
|
||||||
NotificationType.BARK: [
|
|
||||||
"barkEndpoint",
|
|
||||||
"barkGroup",
|
|
||||||
"barkSound",
|
|
||||||
],
|
|
||||||
NotificationType.HOMEASSISTANT: [
|
NotificationType.HOMEASSISTANT: [
|
||||||
"homeAssistantUrl",
|
"homeAssistantUrl",
|
||||||
"longLivedAccessToken",
|
"longLivedAccessToken",
|
||||||
|
@ -250,6 +228,49 @@ notification_provider_options = {
|
||||||
NotificationType.LINENOTIFY: [
|
NotificationType.LINENOTIFY: [
|
||||||
"lineNotifyAccessToken",
|
"lineNotifyAccessToken",
|
||||||
],
|
],
|
||||||
|
NotificationType.BARK: [
|
||||||
|
"barkEndpoint",
|
||||||
|
"barkGroup",
|
||||||
|
"barkSound",
|
||||||
|
],
|
||||||
|
NotificationType.GOALERT: [
|
||||||
|
"goAlertBaseURL",
|
||||||
|
"goAlertToken",
|
||||||
|
],
|
||||||
|
NotificationType.NTFY: [
|
||||||
|
"ntfyusername",
|
||||||
|
"ntfypassword",
|
||||||
|
"ntfytopic",
|
||||||
|
"ntfyPriority",
|
||||||
|
"ntfyserverurl",
|
||||||
|
],
|
||||||
|
NotificationType.OCTOPUSH: [
|
||||||
|
"octopushVersion",
|
||||||
|
"octopushAPIKey",
|
||||||
|
"octopushLogin",
|
||||||
|
"octopushPhoneNumber",
|
||||||
|
"octopushSMSType",
|
||||||
|
"octopushSenderName",
|
||||||
|
"octopushDMLogin",
|
||||||
|
"octopushDMAPIKey",
|
||||||
|
"octopushDMPhoneNumber",
|
||||||
|
"octopushDMSenderName",
|
||||||
|
"octopushDMSMSType",
|
||||||
|
],
|
||||||
|
NotificationType.SERVERCHAN: [
|
||||||
|
"serverChanSendKey",
|
||||||
|
],
|
||||||
|
NotificationType.SMSMANAGER: [
|
||||||
|
"smsmanagerApiKey",
|
||||||
|
"numbers",
|
||||||
|
"messageType",
|
||||||
|
],
|
||||||
|
NotificationType.SQUADCAST: [
|
||||||
|
"squadcastWebhookURL",
|
||||||
|
],
|
||||||
|
NotificationType.TEAMS: [
|
||||||
|
"webhookUrl",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
notification_provider_conditions = {
|
notification_provider_conditions = {
|
||||||
|
@ -257,12 +278,12 @@ notification_provider_conditions = {
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 10,
|
"max": 10,
|
||||||
},
|
},
|
||||||
"ntfyPriority": {
|
|
||||||
"min": 1,
|
|
||||||
"max": 5,
|
|
||||||
},
|
|
||||||
"smtpPort": {
|
"smtpPort": {
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 65535,
|
"max": 65535,
|
||||||
},
|
},
|
||||||
|
"ntfyPriority": {
|
||||||
|
"min": 1,
|
||||||
|
"max": 5,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue