feat: check for required notification arguments #36
4 changed files with 473 additions and 370 deletions
|
@ -6,9 +6,84 @@ from bs4 import BeautifulSoup
|
||||||
from utils import deduplicate_list, write_to_file
|
from utils import deduplicate_list, write_to_file
|
||||||
|
|
||||||
|
|
||||||
|
# deprecated or wrong inputs
|
||||||
|
ignored_inputs = {
|
||||||
|
"slack": [
|
||||||
|
"slackbutton"
|
||||||
|
],
|
||||||
|
"rocket.chat": [
|
||||||
|
"rocketbutton"
|
||||||
|
],
|
||||||
|
"octopush": [
|
||||||
|
"octopushDMLogin",
|
||||||
|
"octopushDMAPIKey",
|
||||||
|
"octopushDMPhoneNumber",
|
||||||
|
"octopushDMSenderName",
|
||||||
|
"octopushDMSMSType"
|
||||||
|
],
|
||||||
|
"Splunk": [
|
||||||
|
"pagerdutyIntegrationKey"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
titles = {
|
||||||
|
"alerta": "Alerta",
|
||||||
|
"AlertNow": "AlertNow",
|
||||||
|
"apprise": "Apprise (Support 50+ Notification services)",
|
||||||
|
"Bark": "Bark",
|
||||||
|
"clicksendsms": "ClickSend SMS",
|
||||||
|
"discord": "Discord",
|
||||||
|
"GoogleChat": "Google Chat (Google Workspace)",
|
||||||
|
"gorush": "Gorush",
|
||||||
|
"gotify": "Gotify",
|
||||||
|
"HomeAssistant": "Home Assistant",
|
||||||
|
"Kook": "Kook",
|
||||||
|
"line": "LINE Messenger",
|
||||||
|
"LineNotify": "LINE Notify",
|
||||||
|
"lunasea": "LunaSea",
|
||||||
|
"matrix": "Matrix",
|
||||||
|
"mattermost": "Mattermost",
|
||||||
|
"ntfy": "Ntfy",
|
||||||
|
"octopush": "Octopush",
|
||||||
|
"OneBot": "OneBot",
|
||||||
|
"Opsgenie": "Opsgenie",
|
||||||
|
"PagerDuty": "PagerDuty",
|
||||||
|
"pushbullet": "Pushbullet",
|
||||||
|
"PushByTechulus": "Push by Techulus",
|
||||||
|
"pushover": "Pushover",
|
||||||
|
"pushy": "Pushy",
|
||||||
|
"rocket.chat": "Rocket.Chat",
|
||||||
|
"signal": "Signal",
|
||||||
|
"slack": "Slack",
|
||||||
|
"squadcast": "SquadCast",
|
||||||
|
"SMSEagle": "SMSEagle",
|
||||||
|
"smtp": "Email (SMTP)",
|
||||||
|
"stackfield": "Stackfield",
|
||||||
|
"teams": "Microsoft Teams",
|
||||||
|
"telegram": "Telegram",
|
||||||
|
"twilio": "Twilio",
|
||||||
|
"Splunk": "Splunk",
|
||||||
|
"webhook": "Webhook",
|
||||||
|
"GoAlert": "GoAlert",
|
||||||
|
"ZohoCliq": "ZohoCliq",
|
||||||
|
"AliyunSMS": "AliyunSMS",
|
||||||
|
"DingDing": "DingDing",
|
||||||
|
"Feishu": "Feishu",
|
||||||
|
"FreeMobile": "FreeMobile (mobile.free.fr)",
|
||||||
|
"PushDeer": "PushDeer",
|
||||||
|
"promosms": "PromoSMS",
|
||||||
|
"serwersms": "SerwerSMS.pl",
|
||||||
|
"SMSManager": "SmsManager (smsmanager.cz)",
|
||||||
|
"WeCom": "WeCom",
|
||||||
|
"ServerChan": "ServerChan",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def build_notification_providers(root):
|
def build_notification_providers(root):
|
||||||
providers = []
|
providers = {}
|
||||||
for path in glob.glob(f'{root}/server/notification-providers/*'):
|
|
||||||
|
# get providers and input names
|
||||||
|
for path in sorted(glob.glob(f'{root}/server/notification-providers/*')):
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
match = re.search(r'class [^ ]+ extends NotificationProvider {', content)
|
match = re.search(r'class [^ ]+ extends NotificationProvider {', content)
|
||||||
|
@ -16,19 +91,19 @@ def build_notification_providers(root):
|
||||||
match = re.search(r'name = "([^"]+)";', content)
|
match = re.search(r'name = "([^"]+)";', content)
|
||||||
name = match.group(1)
|
name = match.group(1)
|
||||||
|
|
||||||
inputs = re.findall(r'notification\.([^ ,.;})\]]+)', content)
|
inputs = re.findall(r'notification\??\.([^ ,.;})\]]+)', content)
|
||||||
inputs = deduplicate_list(inputs)
|
inputs = deduplicate_list(inputs)
|
||||||
inputs = [i.strip() for i in inputs]
|
inputs = [i.strip() for i in inputs]
|
||||||
|
|
||||||
providers.append({
|
providers[name] = {
|
||||||
"name": name,
|
"title": titles.get(name, name),
|
||||||
"inputs": inputs,
|
"inputs": {},
|
||||||
})
|
}
|
||||||
return providers
|
for input_ in inputs:
|
||||||
|
if input_ not in ignored_inputs.get(name, []):
|
||||||
|
providers[name]["inputs"][input_] = {}
|
||||||
|
|
||||||
|
# get inputs
|
||||||
def build_notification_provider_conditions(root):
|
|
||||||
conditions = {}
|
|
||||||
for path in glob.glob(f'{root}/src/components/notifications/*'):
|
for path in glob.glob(f'{root}/src/components/notifications/*'):
|
||||||
if path.endswith("index.js"):
|
if path.endswith("index.js"):
|
||||||
continue
|
continue
|
||||||
|
@ -37,21 +112,49 @@ def build_notification_provider_conditions(root):
|
||||||
match = re.search(r'<template>[\s\S]+</template>', content, re.MULTILINE)
|
match = re.search(r'<template>[\s\S]+</template>', content, re.MULTILINE)
|
||||||
html = match.group(0)
|
html = match.group(0)
|
||||||
soup = BeautifulSoup(html, "html.parser")
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
inputs = soup.find_all("input")
|
inputs = soup.find_all(attrs={"v-model": True})
|
||||||
for input in inputs:
|
for input_ in inputs:
|
||||||
condition = {}
|
conditions = {}
|
||||||
attrs = input.attrs
|
attrs = input_.attrs
|
||||||
v_model = attrs.get("v-model")
|
v_model = attrs.get("v-model")
|
||||||
min_ = attrs.get("min")
|
|
||||||
max_ = attrs.get("max")
|
|
||||||
if min_:
|
|
||||||
condition["min"] = int(min_)
|
|
||||||
if max_:
|
|
||||||
condition["max"] = int(max_)
|
|
||||||
param_name = re.match(r'\$parent.notification.(.*)$', v_model).group(1)
|
param_name = re.match(r'\$parent.notification.(.*)$', v_model).group(1)
|
||||||
if condition:
|
|
||||||
conditions[param_name] = condition
|
type_ = attrs.get("type")
|
||||||
return conditions
|
if type_ == "number":
|
||||||
|
type_ = "int"
|
||||||
|
elif type_ == "checkbox":
|
||||||
|
type_ = "bool"
|
||||||
|
else:
|
||||||
|
type_ = "str"
|
||||||
|
|
||||||
|
required_true_values = ['', 'true']
|
||||||
|
if attrs.get("required") in required_true_values or attrs.get(":required") in required_true_values:
|
||||||
|
required = True
|
||||||
|
else:
|
||||||
|
required = False
|
||||||
|
|
||||||
|
min_ = attrs.get("min")
|
||||||
|
if min_:
|
||||||
|
conditions["min"] = int(min_)
|
||||||
|
|
||||||
|
max_ = attrs.get("max")
|
||||||
|
if max_:
|
||||||
|
conditions["max"] = int(max_)
|
||||||
|
|
||||||
|
# find provider inputs dict
|
||||||
|
input_found = False
|
||||||
|
for name in list(providers.keys()):
|
||||||
|
inputs = providers[name]["inputs"]
|
||||||
|
for provider_input in inputs:
|
||||||
|
if provider_input == param_name:
|
||||||
|
input_found = True
|
||||||
|
providers[name]["inputs"][provider_input] = {
|
||||||
|
"conditions": conditions,
|
||||||
|
"type": type_,
|
||||||
|
"required": required
|
||||||
|
}
|
||||||
|
assert input_found
|
||||||
|
return providers
|
||||||
|
|
||||||
|
|
||||||
def diff(old, new):
|
def diff(old, new):
|
||||||
|
@ -64,16 +167,25 @@ def diff(old, new):
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
|
||||||
# write_to_file(
|
notification_providers = build_notification_providers("uptime-kuma")
|
||||||
# "notification_providers.py.j2", "./../uptime_kuma_api/notification_providers.py",
|
|
||||||
# notification_providers=notification_providers,
|
|
||||||
# notification_provider_conditions=notification_provider_conditions
|
|
||||||
# )
|
|
||||||
|
|
||||||
notification_providers_old = build_notification_providers("uptime-kuma-old")
|
notification_provider_conditions = {}
|
||||||
notification_providers_new = build_notification_providers("uptime-kuma")
|
for notification_provider in notification_providers:
|
||||||
diff(notification_providers_old, notification_providers_new)
|
for notification_provider_input_name in notification_providers[notification_provider]["inputs"]:
|
||||||
|
notification_provider_input = notification_providers[notification_provider]["inputs"][notification_provider_input_name]
|
||||||
|
if notification_provider_input["conditions"]:
|
||||||
|
notification_provider_conditions[notification_provider_input_name] = notification_provider_input["conditions"]
|
||||||
|
|
||||||
notification_provider_conditions_old = build_notification_provider_conditions("uptime-kuma-old")
|
write_to_file(
|
||||||
notification_provider_conditions_new = build_notification_provider_conditions("uptime-kuma")
|
"notification_providers.py.j2", "./../uptime_kuma_api/notification_providers.py",
|
||||||
diff(notification_provider_conditions_old, notification_provider_conditions_new)
|
notification_providers=notification_providers,
|
||||||
|
notification_provider_conditions=notification_provider_conditions
|
||||||
|
)
|
||||||
|
|
||||||
|
# notification_providers_old = build_notification_providers("uptime-kuma-old")
|
||||||
|
# notification_providers_new = build_notification_providers("uptime-kuma")
|
||||||
|
# diff(notification_providers_old, notification_providers_new)
|
||||||
|
#
|
||||||
|
# notification_provider_conditions_old = build_notification_provider_conditions("uptime-kuma-old")
|
||||||
|
# notification_provider_conditions_new = build_notification_provider_conditions("uptime-kuma")
|
||||||
|
# diff(notification_provider_conditions_old, notification_provider_conditions_new)
|
||||||
|
|
|
@ -2,30 +2,30 @@ from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class NotificationType(str, Enum):
|
class NotificationType(str, Enum):
|
||||||
{%- for notification_provider in notification_providers %}
|
"""Enumerate notification types."""
|
||||||
{%- set name = notification_provider["name"] %}
|
{% for provider in notification_providers %}
|
||||||
{{ name.upper().replace(".", "_") }} = "{{ name }}"
|
{{ provider.upper().replace(".", "_") }} = "{{ provider }}"
|
||||||
{%- endfor %}
|
"""{{ notification_providers[provider]["title"] }}"""
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
notification_provider_options = {
|
notification_provider_options = {
|
||||||
{%- for notification_provider in notification_providers %}
|
{%- for provider in notification_providers %}
|
||||||
{%- set name = notification_provider["name"] %}
|
NotificationType.{{ provider.upper().replace(".", "_") }}: dict(
|
||||||
NotificationType.{{ name.upper().replace(".", "_") }}: [
|
{%- for input_name in notification_providers[provider]["inputs"] %}
|
||||||
{%- for input in notification_provider["inputs"] %}
|
{%- set input = notification_providers[provider]["inputs"][input_name] %}
|
||||||
"{{ input }}",
|
{{ input_name }}=dict(type="{{ input["type"] }}", required={{ input["required"] }}),
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
],
|
),
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
}
|
}
|
||||||
|
|
||||||
notification_provider_conditions = {
|
notification_provider_conditions = dict(
|
||||||
{%- for provider in notification_provider_conditions %}
|
{%- for provider in notification_provider_conditions %}
|
||||||
"{{ provider }}": {
|
{{ provider }}=dict(
|
||||||
{%- for key, value in notification_provider_conditions[provider].items() %}
|
{%- for key, value in notification_provider_conditions[provider].items() %}
|
||||||
"{{ key }}": {{ value }},
|
{{ key }}={{ value }},
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
},
|
),
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
|
@ -305,10 +305,9 @@ def _check_arguments_notification(kwargs) -> None:
|
||||||
required_args = ["type", "name"]
|
required_args = ["type", "name"]
|
||||||
_check_missing_arguments(required_args, kwargs)
|
_check_missing_arguments(required_args, kwargs)
|
||||||
|
|
||||||
# TODO: collect required notification args from /src/components/notifications/*
|
type_ = kwargs["type"]
|
||||||
# type_ = kwargs["type"]
|
required_args = notification_provider_options[type_]
|
||||||
# required_args = notification_provider_options[type_]
|
_check_missing_arguments(required_args, kwargs)
|
||||||
# _check_missing_arguments(required_args, kwargs)
|
|
||||||
_check_argument_conditions(notification_provider_conditions, kwargs)
|
_check_argument_conditions(notification_provider_conditions, kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,18 @@ class NotificationType(str, Enum):
|
||||||
ALERTA = "alerta"
|
ALERTA = "alerta"
|
||||||
"""Alerta"""
|
"""Alerta"""
|
||||||
|
|
||||||
|
ALERTNOW = "AlertNow"
|
||||||
|
"""AlertNow"""
|
||||||
|
|
||||||
ALIYUNSMS = "AliyunSMS"
|
ALIYUNSMS = "AliyunSMS"
|
||||||
"""AliyunSMS"""
|
"""AliyunSMS"""
|
||||||
|
|
||||||
APPRISE = "apprise"
|
APPRISE = "apprise"
|
||||||
"""Apprise (Support 50+ Notification services)"""
|
"""Apprise (Support 50+ Notification services)"""
|
||||||
|
|
||||||
|
BARK = "Bark"
|
||||||
|
"""Bark"""
|
||||||
|
|
||||||
CLICKSENDSMS = "clicksendsms"
|
CLICKSENDSMS = "clicksendsms"
|
||||||
"""ClickSend SMS"""
|
"""ClickSend SMS"""
|
||||||
|
|
||||||
|
@ -25,8 +31,14 @@ class NotificationType(str, Enum):
|
||||||
FEISHU = "Feishu"
|
FEISHU = "Feishu"
|
||||||
"""Feishu"""
|
"""Feishu"""
|
||||||
|
|
||||||
|
FREEMOBILE = "FreeMobile"
|
||||||
|
"""FreeMobile (mobile.free.fr)"""
|
||||||
|
|
||||||
|
GOALERT = "GoAlert"
|
||||||
|
"""GoAlert"""
|
||||||
|
|
||||||
GOOGLECHAT = "GoogleChat"
|
GOOGLECHAT = "GoogleChat"
|
||||||
"""Google Chat (Google Workspace only)"""
|
"""Google Chat (Google Workspace)"""
|
||||||
|
|
||||||
GORUSH = "gorush"
|
GORUSH = "gorush"
|
||||||
"""Gorush"""
|
"""Gorush"""
|
||||||
|
@ -34,8 +46,17 @@ class NotificationType(str, Enum):
|
||||||
GOTIFY = "gotify"
|
GOTIFY = "gotify"
|
||||||
"""Gotify"""
|
"""Gotify"""
|
||||||
|
|
||||||
|
HOMEASSISTANT = "HomeAssistant"
|
||||||
|
"""Home Assistant"""
|
||||||
|
|
||||||
|
KOOK = "Kook"
|
||||||
|
"""Kook"""
|
||||||
|
|
||||||
LINE = "line"
|
LINE = "line"
|
||||||
"""Line Messenger"""
|
"""LINE Messenger"""
|
||||||
|
|
||||||
|
LINENOTIFY = "LineNotify"
|
||||||
|
"""LINE Notify"""
|
||||||
|
|
||||||
LUNASEA = "lunasea"
|
LUNASEA = "lunasea"
|
||||||
"""LunaSea"""
|
"""LunaSea"""
|
||||||
|
@ -46,9 +67,18 @@ class NotificationType(str, Enum):
|
||||||
MATTERMOST = "mattermost"
|
MATTERMOST = "mattermost"
|
||||||
"""Mattermost"""
|
"""Mattermost"""
|
||||||
|
|
||||||
|
NTFY = "ntfy"
|
||||||
|
"""Ntfy"""
|
||||||
|
|
||||||
|
OCTOPUSH = "octopush"
|
||||||
|
"""Octopush"""
|
||||||
|
|
||||||
ONEBOT = "OneBot"
|
ONEBOT = "OneBot"
|
||||||
"""OneBot"""
|
"""OneBot"""
|
||||||
|
|
||||||
|
OPSGENIE = "Opsgenie"
|
||||||
|
"""Opsgenie"""
|
||||||
|
|
||||||
PAGERDUTY = "PagerDuty"
|
PAGERDUTY = "PagerDuty"
|
||||||
"""PagerDuty"""
|
"""PagerDuty"""
|
||||||
|
|
||||||
|
@ -73,6 +103,9 @@ class NotificationType(str, Enum):
|
||||||
ROCKET_CHAT = "rocket.chat"
|
ROCKET_CHAT = "rocket.chat"
|
||||||
"""Rocket.Chat"""
|
"""Rocket.Chat"""
|
||||||
|
|
||||||
|
SERVERCHAN = "ServerChan"
|
||||||
|
"""ServerChan"""
|
||||||
|
|
||||||
SERWERSMS = "serwersms"
|
SERWERSMS = "serwersms"
|
||||||
"""SerwerSMS.pl"""
|
"""SerwerSMS.pl"""
|
||||||
|
|
||||||
|
@ -82,374 +115,333 @@ class NotificationType(str, Enum):
|
||||||
SLACK = "slack"
|
SLACK = "slack"
|
||||||
"""Slack"""
|
"""Slack"""
|
||||||
|
|
||||||
|
SMSEAGLE = "SMSEagle"
|
||||||
|
"""SMSEagle"""
|
||||||
|
|
||||||
|
SMSMANAGER = "SMSManager"
|
||||||
|
"""SmsManager (smsmanager.cz)"""
|
||||||
|
|
||||||
SMTP = "smtp"
|
SMTP = "smtp"
|
||||||
"""Email (SMTP)"""
|
"""Email (SMTP)"""
|
||||||
|
|
||||||
|
SPLUNK = "Splunk"
|
||||||
|
"""Splunk"""
|
||||||
|
|
||||||
|
SQUADCAST = "squadcast"
|
||||||
|
"""SquadCast"""
|
||||||
|
|
||||||
STACKFIELD = "stackfield"
|
STACKFIELD = "stackfield"
|
||||||
"""Stackfield"""
|
"""Stackfield"""
|
||||||
|
|
||||||
|
TEAMS = "teams"
|
||||||
|
"""Microsoft Teams"""
|
||||||
|
|
||||||
PUSHBYTECHULUS = "PushByTechulus"
|
PUSHBYTECHULUS = "PushByTechulus"
|
||||||
"""Push by Techulus"""
|
"""Push by Techulus"""
|
||||||
|
|
||||||
TELEGRAM = "telegram"
|
TELEGRAM = "telegram"
|
||||||
"""Telegram"""
|
"""Telegram"""
|
||||||
|
|
||||||
|
TWILIO = "twilio"
|
||||||
|
"""Twilio"""
|
||||||
|
|
||||||
WEBHOOK = "webhook"
|
WEBHOOK = "webhook"
|
||||||
"""Webhook"""
|
"""Webhook"""
|
||||||
|
|
||||||
WECOM = "WeCom"
|
WECOM = "WeCom"
|
||||||
"""WeCom"""
|
"""WeCom"""
|
||||||
|
|
||||||
ALERTNOW = "AlertNow"
|
|
||||||
"""AlertNow"""
|
|
||||||
|
|
||||||
HOMEASSISTANT = "HomeAssistant"
|
|
||||||
"""Home Assistant"""
|
|
||||||
|
|
||||||
LINENOTIFY = "LineNotify"
|
|
||||||
"""LineNotify"""
|
|
||||||
|
|
||||||
BARK = "Bark"
|
|
||||||
"""Bark"""
|
|
||||||
|
|
||||||
GOALERT = "GoAlert"
|
|
||||||
"""GoAlert"""
|
|
||||||
|
|
||||||
OCTOPUSH = "octopush"
|
|
||||||
"""Octopush"""
|
|
||||||
|
|
||||||
SERVERCHAN = "ServerChan"
|
|
||||||
"""ServerChan"""
|
|
||||||
|
|
||||||
SMSMANAGER = "SMSManager"
|
|
||||||
"""SMSManager"""
|
|
||||||
|
|
||||||
SQUADCAST = "squadcast"
|
|
||||||
"""Squadcast"""
|
|
||||||
|
|
||||||
TEAMS = "teams"
|
|
||||||
"""Microsoft Teams"""
|
|
||||||
|
|
||||||
FREEMOBILE = "FreeMobile"
|
|
||||||
"""FreeMobile"""
|
|
||||||
|
|
||||||
NTFY = "ntfy"
|
|
||||||
"""ntfy"""
|
|
||||||
|
|
||||||
SMSEAGLE = "SMSEagle"
|
|
||||||
"""SMSEagle"""
|
|
||||||
|
|
||||||
ZOHOCLIQ = "ZohoCliq"
|
ZOHOCLIQ = "ZohoCliq"
|
||||||
"""ZohoCliq"""
|
"""ZohoCliq"""
|
||||||
|
|
||||||
KOOK = "Kook"
|
|
||||||
"""Kook"""
|
|
||||||
|
|
||||||
SPLUNK = "Splunk"
|
|
||||||
"""Splunk"""
|
|
||||||
|
|
||||||
OPSGENIE = "Opsgenie"
|
|
||||||
"""Opsgenie"""
|
|
||||||
|
|
||||||
TWILIO = "twilio"
|
|
||||||
"""twilio"""
|
|
||||||
|
|
||||||
|
|
||||||
notification_provider_options = {
|
notification_provider_options = {
|
||||||
NotificationType.ALERTA: dict(
|
NotificationType.ALERTA: dict(
|
||||||
alertaApiEndpoint=dict(
|
alertaApiEndpoint=dict(type="str", required=True),
|
||||||
type="str"
|
alertaApiKey=dict(type="str", required=True),
|
||||||
),
|
alertaEnvironment=dict(type="str", required=True),
|
||||||
alertaApiKey=dict(type="str"),
|
alertaAlertState=dict(type="str", required=True),
|
||||||
alertaEnvironment=dict(type="str"),
|
alertaRecoverState=dict(type="str", required=True),
|
||||||
alertaAlertState=dict(type="str"),
|
|
||||||
alertaRecoverState=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.ALIYUNSMS: dict(
|
|
||||||
phonenumber=dict(type="str"),
|
|
||||||
templateCode=dict(type="str"),
|
|
||||||
signName=dict(type="str"),
|
|
||||||
accessKeyId=dict(type="str"),
|
|
||||||
secretAccessKey=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.APPRISE: dict(
|
|
||||||
appriseURL=dict(type="str"),
|
|
||||||
title=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.CLICKSENDSMS: dict(
|
|
||||||
clicksendsmsLogin=dict(type="str"),
|
|
||||||
clicksendsmsPassword=dict(type="str"),
|
|
||||||
clicksendsmsToNumber=dict(type="str"),
|
|
||||||
clicksendsmsSenderName=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.DINGDING: dict(
|
|
||||||
webHookUrl=dict(type="str"),
|
|
||||||
secretKey=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.DISCORD: dict(
|
|
||||||
discordUsername=dict(type="str"),
|
|
||||||
discordWebhookUrl=dict(type="str"),
|
|
||||||
discordPrefixMessage=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.FEISHU: dict(
|
|
||||||
feishuWebHookUrl=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.GOOGLECHAT: dict(
|
|
||||||
googleChatWebhookURL=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.GORUSH: dict(
|
|
||||||
gorushDeviceToken=dict(type="str"),
|
|
||||||
gorushPlatform=dict(type="str"),
|
|
||||||
gorushTitle=dict(type="str"),
|
|
||||||
gorushPriority=dict(type="str"),
|
|
||||||
gorushRetry=dict(type="str"),
|
|
||||||
gorushTopic=dict(type="str"),
|
|
||||||
gorushServerURL=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.GOTIFY: dict(
|
|
||||||
gotifyserverurl=dict(type="str"),
|
|
||||||
gotifyapplicationToken=dict(type="str"),
|
|
||||||
gotifyPriority=dict(type="int"),
|
|
||||||
),
|
|
||||||
NotificationType.LINE: dict(
|
|
||||||
lineChannelAccessToken=dict(type="str"),
|
|
||||||
lineUserID=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.LUNASEA: dict(
|
|
||||||
lunaseaTarget=dict(type="str"),
|
|
||||||
lunaseaUserID=dict(type="str"),
|
|
||||||
lunaseaDevice=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.MATRIX: dict(
|
|
||||||
internalRoomId=dict(type="str"),
|
|
||||||
accessToken=dict(type="str"),
|
|
||||||
homeserverUrl=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.MATTERMOST: dict(
|
|
||||||
mattermostusername=dict(type="str"),
|
|
||||||
mattermostWebhookUrl=dict(type="str"),
|
|
||||||
mattermostchannel=dict(type="str"),
|
|
||||||
mattermosticonemo=dict(type="str"),
|
|
||||||
mattermosticonurl=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.ONEBOT: dict(
|
|
||||||
httpAddr=dict(type="str"),
|
|
||||||
accessToken=dict(type="str"),
|
|
||||||
msgType=dict(type="str"),
|
|
||||||
recieverId=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.PAGERDUTY: dict(
|
|
||||||
pagerdutyAutoResolve=dict(type="str"),
|
|
||||||
pagerdutyIntegrationUrl=dict(type="str"),
|
|
||||||
pagerdutyPriority=dict(type="str"),
|
|
||||||
pagerdutyIntegrationKey=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.PAGERTREE: dict(
|
|
||||||
pagertreeAutoResolve=dict(type="str"),
|
|
||||||
pagertreeIntegrationUrl=dict(type="str"),
|
|
||||||
pagertreeUrgency=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.PROMOSMS: dict(
|
|
||||||
promosmsLogin=dict(type="str"),
|
|
||||||
promosmsPassword=dict(type="str"),
|
|
||||||
promosmsPhoneNumber=dict(type="str"),
|
|
||||||
promosmsSMSType=dict(type="str"),
|
|
||||||
promosmsSenderName=dict(type="str"),
|
|
||||||
promosmsAllowLongSMS=dict(type="bool"),
|
|
||||||
),
|
|
||||||
NotificationType.PUSHBULLET: dict(
|
|
||||||
pushbulletAccessToken=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.PUSHDEER: dict(
|
|
||||||
pushdeerKey=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.PUSHOVER: dict(
|
|
||||||
pushoveruserkey=dict(type="str"),
|
|
||||||
pushoverapptoken=dict(type="str"),
|
|
||||||
pushoversounds=dict(type="str"),
|
|
||||||
pushoverpriority=dict(type="str"),
|
|
||||||
pushovertitle=dict(type="str"),
|
|
||||||
pushoverdevice=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.PUSHY: dict(
|
|
||||||
pushyAPIKey=dict(type="str"),
|
|
||||||
pushyToken=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.ROCKET_CHAT: dict(
|
|
||||||
rocketchannel=dict(type="str"),
|
|
||||||
rocketusername=dict(type="str"),
|
|
||||||
rocketiconemo=dict(type="str"),
|
|
||||||
rocketwebhookURL=dict(type="str"),
|
|
||||||
rocketbutton=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.SERWERSMS: dict(
|
|
||||||
serwersmsUsername=dict(type="str"),
|
|
||||||
serwersmsPassword=dict(type="str"),
|
|
||||||
serwersmsPhoneNumber=dict(type="str"),
|
|
||||||
serwersmsSenderName=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.SIGNAL: dict(
|
|
||||||
signalNumber=dict(type="str"),
|
|
||||||
signalRecipients=dict(type="str"),
|
|
||||||
signalURL=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.SLACK: dict(
|
|
||||||
slackbutton=dict(type="str"),
|
|
||||||
slackchannel=dict(type="str"),
|
|
||||||
slackusername=dict(type="str"),
|
|
||||||
slackiconemo=dict(type="str"),
|
|
||||||
slackwebhookURL=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.SMTP: dict(
|
|
||||||
smtpHost=dict(type="str"),
|
|
||||||
smtpPort=dict(type="int"),
|
|
||||||
smtpSecure=dict(type="str"),
|
|
||||||
smtpIgnoreTLSError=dict(type="str"),
|
|
||||||
smtpDkimDomain=dict(type="str"),
|
|
||||||
smtpDkimKeySelector=dict(type="str"),
|
|
||||||
smtpDkimPrivateKey=dict(type="str"),
|
|
||||||
smtpDkimHashAlgo=dict(type="str"),
|
|
||||||
smtpDkimheaderFieldNames=dict(type="str"),
|
|
||||||
smtpDkimskipFields=dict(type="str"),
|
|
||||||
smtpUsername=dict(type="str"),
|
|
||||||
smtpPassword=dict(type="str"),
|
|
||||||
customSubject=dict(type="str"),
|
|
||||||
smtpFrom=dict(type="str"),
|
|
||||||
smtpCC=dict(type="str"),
|
|
||||||
smtpBCC=dict(type="str"),
|
|
||||||
smtpTo=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.STACKFIELD: dict(
|
|
||||||
stackfieldwebhookURL=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.PUSHBYTECHULUS: dict(
|
|
||||||
pushAPIKey=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.TELEGRAM: dict(
|
|
||||||
telegramChatID=dict(type="str"),
|
|
||||||
telegramSendSilently=dict(type="bool"),
|
|
||||||
telegramProtectContent=dict(type="bool"),
|
|
||||||
telegramMessageThreadID=dict(type="str"),
|
|
||||||
telegramBotToken=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.WEBHOOK: dict(
|
|
||||||
webhookContentType=dict(type="str"),
|
|
||||||
webhookAdditionalHeaders=dict(type="str"),
|
|
||||||
webhookURL=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.WECOM: dict(
|
|
||||||
weComBotKey=dict(type="str"),
|
|
||||||
),
|
),
|
||||||
NotificationType.ALERTNOW: dict(
|
NotificationType.ALERTNOW: dict(
|
||||||
alertNowWebhookURL=dict(type="str"),
|
alertNowWebhookURL=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.HOMEASSISTANT: dict(
|
NotificationType.ALIYUNSMS: dict(
|
||||||
homeAssistantUrl=dict(type="str"),
|
phonenumber=dict(type="str", required=True),
|
||||||
longLivedAccessToken=dict(type="str"),
|
templateCode=dict(type="str", required=True),
|
||||||
|
signName=dict(type="str", required=True),
|
||||||
|
accessKeyId=dict(type="str", required=True),
|
||||||
|
secretAccessKey=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.LINENOTIFY: dict(
|
NotificationType.APPRISE: dict(
|
||||||
lineNotifyAccessToken=dict(type="str"),
|
appriseURL=dict(type="str", required=True),
|
||||||
|
title=dict(type="str", required=False),
|
||||||
),
|
),
|
||||||
NotificationType.BARK: dict(
|
NotificationType.BARK: dict(
|
||||||
barkEndpoint=dict(type="str"),
|
barkEndpoint=dict(type="str", required=True),
|
||||||
barkGroup=dict(type="str"),
|
barkGroup=dict(type="str", required=True),
|
||||||
barkSound=dict(type="str"),
|
barkSound=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.GOALERT: dict(
|
NotificationType.CLICKSENDSMS: dict(
|
||||||
goAlertBaseURL=dict(type="str"),
|
clicksendsmsLogin=dict(type="str", required=True),
|
||||||
goAlertToken=dict(type="str"),
|
clicksendsmsPassword=dict(type="str", required=True),
|
||||||
|
clicksendsmsToNumber=dict(type="str", required=True),
|
||||||
|
clicksendsmsSenderName=dict(type="str", required=False),
|
||||||
),
|
),
|
||||||
NotificationType.OCTOPUSH: dict(
|
NotificationType.DINGDING: dict(
|
||||||
octopushVersion=dict(type="str"),
|
webHookUrl=dict(type="str", required=True),
|
||||||
octopushAPIKey=dict(type="str"),
|
secretKey=dict(type="str", required=True),
|
||||||
octopushLogin=dict(type="str"),
|
|
||||||
octopushPhoneNumber=dict(type="str"),
|
|
||||||
octopushSMSType=dict(type="str"),
|
|
||||||
octopushSenderName=dict(type="str"),
|
|
||||||
octopushDMLogin=dict(type="str"),
|
|
||||||
octopushDMAPIKey=dict(type="str"),
|
|
||||||
octopushDMPhoneNumber=dict(type="str"),
|
|
||||||
octopushDMSenderName=dict(type="str"),
|
|
||||||
octopushDMSMSType=dict(type="str"),
|
|
||||||
),
|
),
|
||||||
NotificationType.SERVERCHAN: dict(
|
NotificationType.DISCORD: dict(
|
||||||
serverChanSendKey=dict(type="str"),
|
discordUsername=dict(type="str", required=False),
|
||||||
|
discordWebhookUrl=dict(type="str", required=True),
|
||||||
|
discordPrefixMessage=dict(type="str", required=False),
|
||||||
),
|
),
|
||||||
NotificationType.SMSMANAGER: dict(
|
NotificationType.FEISHU: dict(
|
||||||
smsmanagerApiKey=dict(type="str"),
|
feishuWebHookUrl=dict(type="str", required=True),
|
||||||
numbers=dict(type="str"),
|
|
||||||
messageType=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.SQUADCAST: dict(
|
|
||||||
squadcastWebhookURL=dict(type="str"),
|
|
||||||
),
|
|
||||||
NotificationType.TEAMS: dict(
|
|
||||||
webhookUrl=dict(type="str"),
|
|
||||||
),
|
),
|
||||||
NotificationType.FREEMOBILE: dict(
|
NotificationType.FREEMOBILE: dict(
|
||||||
freemobileUser=dict(type="str"),
|
freemobileUser=dict(type="str", required=True),
|
||||||
freemobilePass=dict(type="str"),
|
freemobilePass=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.NTFY: dict(
|
NotificationType.GOALERT: dict(
|
||||||
ntfyusername=dict(type="str"),
|
goAlertBaseURL=dict(type="str", required=True),
|
||||||
ntfypassword=dict(type="str"),
|
goAlertToken=dict(type="str", required=True),
|
||||||
ntfytopic=dict(type="str"),
|
|
||||||
ntfyPriority=dict(type="int"),
|
|
||||||
ntfyIcon=dict(type="str"),
|
|
||||||
ntfyserverurl=dict(type="str"),
|
|
||||||
),
|
),
|
||||||
NotificationType.SMSEAGLE: dict(
|
NotificationType.GOOGLECHAT: dict(
|
||||||
smseagleEncoding=dict(type="bool"),
|
googleChatWebhookURL=dict(type="str", required=True),
|
||||||
smseaglePriority=dict(type="int"),
|
|
||||||
smseagleRecipientType=dict(type="str"),
|
|
||||||
smseagleToken=dict(type="str"),
|
|
||||||
smseagleRecipient=dict(type="str"),
|
|
||||||
smseagleUrl=dict(type="str")
|
|
||||||
),
|
),
|
||||||
NotificationType.ZOHOCLIQ: dict(
|
NotificationType.GORUSH: dict(
|
||||||
webhookUrl=dict(type="str")
|
gorushDeviceToken=dict(type="str", required=True),
|
||||||
|
gorushPlatform=dict(type="str", required=False),
|
||||||
|
gorushTitle=dict(type="str", required=False),
|
||||||
|
gorushPriority=dict(type="str", required=False),
|
||||||
|
gorushRetry=dict(type="int", required=False),
|
||||||
|
gorushTopic=dict(type="str", required=False),
|
||||||
|
gorushServerURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.GOTIFY: dict(
|
||||||
|
gotifyserverurl=dict(type="str", required=True),
|
||||||
|
gotifyapplicationToken=dict(type="str", required=True),
|
||||||
|
gotifyPriority=dict(type="int", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.HOMEASSISTANT: dict(
|
||||||
|
notificationService=dict(type="str", required=False),
|
||||||
|
homeAssistantUrl=dict(type="str", required=True),
|
||||||
|
longLivedAccessToken=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.KOOK: dict(
|
NotificationType.KOOK: dict(
|
||||||
kookGuildID=dict(type="str"),
|
kookGuildID=dict(type="str", required=True),
|
||||||
kookBotToken=dict(type="str")
|
kookBotToken=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.SPLUNK: dict(
|
NotificationType.LINE: dict(
|
||||||
splunkAutoResolve=dict(type="str"),
|
lineChannelAccessToken=dict(type="str", required=True),
|
||||||
splunkSeverity=dict(type="str"),
|
lineUserID=dict(type="str", required=True),
|
||||||
splunkRestURL=dict(type="str")
|
),
|
||||||
|
NotificationType.LINENOTIFY: dict(
|
||||||
|
lineNotifyAccessToken=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.LUNASEA: dict(
|
||||||
|
lunaseaTarget=dict(type="str", required=True),
|
||||||
|
lunaseaUserID=dict(type="str", required=False),
|
||||||
|
lunaseaDevice=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.MATRIX: dict(
|
||||||
|
internalRoomId=dict(type="str", required=True),
|
||||||
|
accessToken=dict(type="str", required=True),
|
||||||
|
homeserverUrl=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.MATTERMOST: dict(
|
||||||
|
mattermostusername=dict(type="str", required=False),
|
||||||
|
mattermostWebhookUrl=dict(type="str", required=True),
|
||||||
|
mattermostchannel=dict(type="str", required=False),
|
||||||
|
mattermosticonemo=dict(type="str", required=False),
|
||||||
|
mattermosticonurl=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.NTFY: dict(
|
||||||
|
ntfyusername=dict(type="str", required=False),
|
||||||
|
ntfypassword=dict(type="str", required=False),
|
||||||
|
ntfytopic=dict(type="str", required=True),
|
||||||
|
ntfyPriority=dict(type="int", required=True),
|
||||||
|
ntfyIcon=dict(type="str", required=False),
|
||||||
|
ntfyserverurl=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.OCTOPUSH: dict(
|
||||||
|
octopushVersion=dict(type="str", required=False),
|
||||||
|
octopushAPIKey=dict(type="str", required=True),
|
||||||
|
octopushLogin=dict(type="str", required=True),
|
||||||
|
octopushPhoneNumber=dict(type="str", required=True),
|
||||||
|
octopushSMSType=dict(type="str", required=False),
|
||||||
|
octopushSenderName=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.ONEBOT: dict(
|
||||||
|
httpAddr=dict(type="str", required=True),
|
||||||
|
accessToken=dict(type="str", required=True),
|
||||||
|
msgType=dict(type="str", required=False),
|
||||||
|
recieverId=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.OPSGENIE: dict(
|
NotificationType.OPSGENIE: dict(
|
||||||
opsgeniePriority=dict(type="int"),
|
opsgeniePriority=dict(type="int", required=False),
|
||||||
opsgenieRegion=dict(type="str"),
|
opsgenieRegion=dict(type="str", required=True),
|
||||||
opsgenieApiKey=dict(type="str")
|
opsgenieApiKey=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.PAGERDUTY: dict(
|
||||||
|
pagerdutyAutoResolve=dict(type="str", required=False),
|
||||||
|
pagerdutyIntegrationUrl=dict(type="str", required=False),
|
||||||
|
pagerdutyPriority=dict(type="str", required=False),
|
||||||
|
pagerdutyIntegrationKey=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.PAGERTREE: dict(
|
||||||
|
pagertreeAutoResolve=dict(type="str", required=False),
|
||||||
|
pagertreeIntegrationUrl=dict(type="str", required=False),
|
||||||
|
pagertreeUrgency=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.PROMOSMS: dict(
|
||||||
|
promosmsAllowLongSMS=dict(type="bool", required=False),
|
||||||
|
promosmsLogin=dict(type="str", required=True),
|
||||||
|
promosmsPassword=dict(type="str", required=True),
|
||||||
|
promosmsPhoneNumber=dict(type="str", required=True),
|
||||||
|
promosmsSMSType=dict(type="str", required=False),
|
||||||
|
promosmsSenderName=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.PUSHBULLET: dict(
|
||||||
|
pushbulletAccessToken=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.PUSHDEER: dict(
|
||||||
|
pushdeerKey=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.PUSHOVER: dict(
|
||||||
|
pushoveruserkey=dict(type="str", required=True),
|
||||||
|
pushoverapptoken=dict(type="str", required=True),
|
||||||
|
pushoversounds=dict(type="str", required=False),
|
||||||
|
pushoverpriority=dict(type="str", required=False),
|
||||||
|
pushovertitle=dict(type="str", required=False),
|
||||||
|
pushoverdevice=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.PUSHY: dict(
|
||||||
|
pushyAPIKey=dict(type="str", required=True),
|
||||||
|
pushyToken=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.ROCKET_CHAT: dict(
|
||||||
|
rocketchannel=dict(type="str", required=False),
|
||||||
|
rocketusername=dict(type="str", required=False),
|
||||||
|
rocketiconemo=dict(type="str", required=False),
|
||||||
|
rocketwebhookURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.SERVERCHAN: dict(
|
||||||
|
serverChanSendKey=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.SERWERSMS: dict(
|
||||||
|
serwersmsUsername=dict(type="str", required=True),
|
||||||
|
serwersmsPassword=dict(type="str", required=True),
|
||||||
|
serwersmsPhoneNumber=dict(type="str", required=True),
|
||||||
|
serwersmsSenderName=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.SIGNAL: dict(
|
||||||
|
signalNumber=dict(type="str", required=True),
|
||||||
|
signalRecipients=dict(type="str", required=True),
|
||||||
|
signalURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.SLACK: dict(
|
||||||
|
slackchannel=dict(type="str", required=False),
|
||||||
|
slackusername=dict(type="str", required=False),
|
||||||
|
slackiconemo=dict(type="str", required=False),
|
||||||
|
slackwebhookURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.SMSEAGLE: dict(
|
||||||
|
smseagleEncoding=dict(type="bool", required=False),
|
||||||
|
smseaglePriority=dict(type="int", required=False),
|
||||||
|
smseagleRecipientType=dict(type="str", required=False),
|
||||||
|
smseagleToken=dict(type="str", required=True),
|
||||||
|
smseagleRecipient=dict(type="str", required=True),
|
||||||
|
smseagleUrl=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.SMSMANAGER: dict(
|
||||||
|
smsmanagerApiKey=dict(type="str", required=False),
|
||||||
|
numbers=dict(type="str", required=False),
|
||||||
|
messageType=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.SMTP: dict(
|
||||||
|
smtpHost=dict(type="str", required=True),
|
||||||
|
smtpPort=dict(type="int", required=True),
|
||||||
|
smtpSecure=dict(type="str", required=False),
|
||||||
|
smtpIgnoreTLSError=dict(type="bool", required=False),
|
||||||
|
smtpDkimDomain=dict(type="str", required=False),
|
||||||
|
smtpDkimKeySelector=dict(type="str", required=False),
|
||||||
|
smtpDkimPrivateKey=dict(type="str", required=False),
|
||||||
|
smtpDkimHashAlgo=dict(type="str", required=False),
|
||||||
|
smtpDkimheaderFieldNames=dict(type="str", required=False),
|
||||||
|
smtpDkimskipFields=dict(type="str", required=False),
|
||||||
|
smtpUsername=dict(type="str", required=False),
|
||||||
|
smtpPassword=dict(type="str", required=False),
|
||||||
|
customSubject=dict(type="str", required=False),
|
||||||
|
smtpFrom=dict(type="str", required=True),
|
||||||
|
smtpCC=dict(type="str", required=False),
|
||||||
|
smtpBCC=dict(type="str", required=False),
|
||||||
|
smtpTo=dict(type="str", required=False),
|
||||||
|
),
|
||||||
|
NotificationType.SPLUNK: dict(
|
||||||
|
splunkAutoResolve=dict(type="str", required=False),
|
||||||
|
splunkSeverity=dict(type="str", required=False),
|
||||||
|
splunkRestURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.SQUADCAST: dict(
|
||||||
|
squadcastWebhookURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.STACKFIELD: dict(
|
||||||
|
stackfieldwebhookURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.TEAMS: dict(
|
||||||
|
webhookUrl=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.PUSHBYTECHULUS: dict(
|
||||||
|
pushAPIKey=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.TELEGRAM: dict(
|
||||||
|
telegramChatID=dict(type="str", required=True),
|
||||||
|
telegramSendSilently=dict(type="bool", required=False),
|
||||||
|
telegramProtectContent=dict(type="bool", required=False),
|
||||||
|
telegramMessageThreadID=dict(type="str", required=False),
|
||||||
|
telegramBotToken=dict(type="str", required=True),
|
||||||
),
|
),
|
||||||
NotificationType.TWILIO: dict(
|
NotificationType.TWILIO: dict(
|
||||||
twilioAccountSID=dict(type="str"),
|
twilioAccountSID=dict(type="str", required=True),
|
||||||
twilioAuthToken=dict(type="str"),
|
twilioAuthToken=dict(type="str", required=True),
|
||||||
twilioToNumber=dict(type="str"),
|
twilioToNumber=dict(type="str", required=True),
|
||||||
twilioFromNumber=dict(type="str")
|
twilioFromNumber=dict(type="str", required=True),
|
||||||
)
|
),
|
||||||
|
NotificationType.WEBHOOK: dict(
|
||||||
|
webhookContentType=dict(type="str", required=True),
|
||||||
|
webhookAdditionalHeaders=dict(type="str", required=False),
|
||||||
|
webhookURL=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.WECOM: dict(
|
||||||
|
weComBotKey=dict(type="str", required=True),
|
||||||
|
),
|
||||||
|
NotificationType.ZOHOCLIQ: dict(
|
||||||
|
webhookUrl=dict(type="str", required=True),
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
notification_provider_conditions = dict(
|
notification_provider_conditions = dict(
|
||||||
gotifyPriority=dict(
|
gotifyPriority=dict(
|
||||||
min=0,
|
min=0,
|
||||||
max=10
|
max=10,
|
||||||
),
|
|
||||||
smtpPort=dict(
|
|
||||||
min=0,
|
|
||||||
max=65535
|
|
||||||
),
|
),
|
||||||
ntfyPriority=dict(
|
ntfyPriority=dict(
|
||||||
min=1,
|
min=1,
|
||||||
max=5
|
max=5,
|
||||||
),
|
|
||||||
smseaglePriority=dict(
|
|
||||||
min=0,
|
|
||||||
max=9
|
|
||||||
),
|
),
|
||||||
opsgeniePriority=dict(
|
opsgeniePriority=dict(
|
||||||
min=1,
|
min=1,
|
||||||
max=5
|
max=5,
|
||||||
)
|
),
|
||||||
|
smseaglePriority=dict(
|
||||||
|
min=0,
|
||||||
|
max=9,
|
||||||
|
),
|
||||||
|
smtpPort=dict(
|
||||||
|
min=0,
|
||||||
|
max=65535,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue