diff --git a/internal/notify/providers.go b/internal/notify/providers.go index 7d2f772c..7f06908e 100644 --- a/internal/notify/providers.go +++ b/internal/notify/providers.go @@ -5,6 +5,9 @@ import ( "github.com/usual2970/certimate/internal/domain" "github.com/usual2970/certimate/internal/pkg/core/notifier" + pEmail "github.com/usual2970/certimate/internal/pkg/core/notifier/providers/email" + pMattermost "github.com/usual2970/certimate/internal/pkg/core/notifier/providers/mattermost" + pTelegram "github.com/usual2970/certimate/internal/pkg/core/notifier/providers/telegram" pWebhook "github.com/usual2970/certimate/internal/pkg/core/notifier/providers/webhook" maputil "github.com/usual2970/certimate/internal/pkg/utils/map" ) @@ -21,11 +24,64 @@ func createNotifierProvider(options *notifierProviderOptions) (notifier.Notifier NOTICE: If you add new constant, please keep ASCII order. */ switch options.Provider { + case domain.NotificationProviderTypeEmail: + { + access := domain.AccessConfigForEmail{} + if err := maputil.Populate(options.ProviderAccessConfig, &access); err != nil { + return nil, fmt.Errorf("failed to populate provider access config: %w", err) + } + + return pEmail.NewNotifier(&pEmail.NotifierConfig{ + SmtpHost: access.SmtpHost, + SmtpPort: access.SmtpPort, + SmtpTls: access.SmtpTls, + Username: access.Username, + Password: access.Password, + SenderAddress: maputil.GetOrDefaultString(options.ProviderNotifyConfig, "senderAddress", access.DefaultSenderAddress), + ReceiverAddress: maputil.GetOrDefaultString(options.ProviderNotifyConfig, "receiverAddress", access.DefaultReceiverAddress), + }) + } + + case domain.NotificationProviderTypeMattermost: + { + access := domain.AccessConfigForMattermost{} + if err := maputil.Populate(options.ProviderAccessConfig, &access); err != nil { + return nil, fmt.Errorf("failed to populate provider access config: %w", err) + } + + return pMattermost.NewNotifier(&pMattermost.NotifierConfig{ + ServerUrl: access.ServerUrl, + Username: access.Username, + Password: access.Password, + ChannelId: maputil.GetOrDefaultString(options.ProviderNotifyConfig, "channelId", access.DefaultChannelId), + }) + } + + case domain.NotificationProviderTypeTelegram: + { + access := domain.AccessConfigForTelegram{} + if err := maputil.Populate(options.ProviderAccessConfig, &access); err != nil { + return nil, fmt.Errorf("failed to populate provider access config: %w", err) + } + + return pTelegram.NewNotifier(&pTelegram.NotifierConfig{ + BotToken: access.BotToken, + ChatId: maputil.GetOrDefaultInt64(options.ProviderNotifyConfig, "chatId", access.DefaultChatId), + }) + } + case domain.NotificationProviderTypeWebhook: - return pWebhook.NewNotifier(&pWebhook.NotifierConfig{ - Url: maputil.GetString(options.ProviderAccessConfig, "url"), - AllowInsecureConnections: maputil.GetBool(options.ProviderAccessConfig, "allowInsecureConnections"), - }) + { + access := domain.AccessConfigForWebhook{} + if err := maputil.Populate(options.ProviderAccessConfig, &access); err != nil { + return nil, fmt.Errorf("failed to populate provider access config: %w", err) + } + + return pWebhook.NewNotifier(&pWebhook.NotifierConfig{ + Url: access.Url, + AllowInsecureConnections: access.AllowInsecureConnections, + }) + } } return nil, fmt.Errorf("unsupported notifier provider '%s'", options.Provider) diff --git a/ui/src/components/access/AccessForm.tsx b/ui/src/components/access/AccessForm.tsx index a00b0f2e..566c06e1 100644 --- a/ui/src/components/access/AccessForm.tsx +++ b/ui/src/components/access/AccessForm.tsx @@ -29,6 +29,7 @@ import AccessFormDNSLAConfig from "./AccessFormDNSLAConfig"; import AccessFormDogeCloudConfig from "./AccessFormDogeCloudConfig"; import AccessFormDynv6Config from "./AccessFormDynv6Config"; import AccessFormEdgioConfig from "./AccessFormEdgioConfig"; +import AccessFormEmailConfig from "./AccessFormEmailConfig"; import AccessFormGcoreConfig from "./AccessFormGcoreConfig"; import AccessFormGnameConfig from "./AccessFormGnameConfig"; import AccessFormGoDaddyConfig from "./AccessFormGoDaddyConfig"; @@ -36,6 +37,7 @@ import AccessFormGoogleTrustServicesConfig from "./AccessFormGoogleTrustServices import AccessFormHuaweiCloudConfig from "./AccessFormHuaweiCloudConfig"; import AccessFormJDCloudConfig from "./AccessFormJDCloudConfig"; import AccessFormKubernetesConfig from "./AccessFormKubernetesConfig"; +import AccessFormMattermostConfig from "./AccessFormMattermostConfig"; import AccessFormNamecheapConfig from "./AccessFormNamecheapConfig"; import AccessFormNameDotComConfig from "./AccessFormNameDotComConfig"; import AccessFormNameSiloConfig from "./AccessFormNameSiloConfig"; @@ -47,6 +49,7 @@ import AccessFormRainYunConfig from "./AccessFormRainYunConfig"; import AccessFormSafeLineConfig from "./AccessFormSafeLineConfig"; import AccessFormSSHConfig from "./AccessFormSSHConfig"; import AccessFormSSLComConfig from "./AccessFormSSLComConfig"; +import AccessFormTelegramConfig from "./AccessFormTelegramConfig"; import AccessFormTencentCloudConfig from "./AccessFormTencentCloudConfig"; import AccessFormUCloudConfig from "./AccessFormUCloudConfig"; import AccessFormUpyunConfig from "./AccessFormUpyunConfig"; @@ -195,12 +198,16 @@ const AccessForm = forwardRef(({ className, return ; case ACCESS_PROVIDERS.EDGIO: return ; + case ACCESS_PROVIDERS.EMAIL: + return ; case ACCESS_PROVIDERS.HUAWEICLOUD: return ; case ACCESS_PROVIDERS.JDCLOUD: return ; case ACCESS_PROVIDERS.KUBERNETES: return ; + case ACCESS_PROVIDERS.MATTERMOST: + return ; case ACCESS_PROVIDERS.NAMECHEAP: return ; case ACCESS_PROVIDERS.NAMEDOTCOM: @@ -221,6 +228,8 @@ const AccessForm = forwardRef(({ className, return ; case ACCESS_PROVIDERS.SSH: return ; + case ACCESS_PROVIDERS.TELEGRAM: + return ; case ACCESS_PROVIDERS.SSLCOM: return ; case ACCESS_PROVIDERS.TENCENTCLOUD: diff --git a/ui/src/components/access/AccessFormEmailConfig.tsx b/ui/src/components/access/AccessFormEmailConfig.tsx new file mode 100644 index 00000000..ee939b9a --- /dev/null +++ b/ui/src/components/access/AccessFormEmailConfig.tsx @@ -0,0 +1,127 @@ +import { useTranslation } from "react-i18next"; +import { Form, type FormInstance, Input, InputNumber, Switch } from "antd"; +import { createSchemaFieldRule } from "antd-zod"; +import { z } from "zod"; + +import { type AccessConfigForEmail } from "@/domain/access"; +import { validEmailAddress, validPortNumber } from "@/utils/validators"; + +type AccessFormEmailConfigFieldValues = Nullish; + +export type AccessFormEmailConfigProps = { + form: FormInstance; + formName: string; + disabled?: boolean; + initialValues?: AccessFormEmailConfigFieldValues; + onValuesChange?: (values: AccessFormEmailConfigFieldValues) => void; +}; + +const initFormModel = (): AccessFormEmailConfigFieldValues => { + return { + smtpHost: "", + smtpPort: 465, + smtpTls: true, + username: "", + password: "", + }; +}; + +const AccessFormEmailConfig = ({ form: formInst, formName, disabled, initialValues, onValuesChange }: AccessFormEmailConfigProps) => { + const { t } = useTranslation(); + + const formSchema = z.object({ + smtpHost: z + .string() + .min(1, t("access.form.email_smtp_host.placeholder")) + .max(256, t("common.errmsg.string_max", { max: 256 })), + smtpPort: z.preprocess( + (v) => Number(v), + z.number().refine((v) => validPortNumber(v), t("common.errmsg.port_invalid")) + ), + smtpTls: z.boolean().nullish(), + username: z + .string() + .min(1, t("access.form.email_username.placeholder")) + .max(256, t("common.errmsg.string_max", { max: 256 })), + password: z + .string() + .min(1, t("access.form.email_password.placeholder")) + .max(256, t("common.errmsg.string_max", { max: 256 })), + defaultSenderAddress: z + .string() + .nullish() + .refine((v) => { + if (!v) return true; + return validEmailAddress(v); + }, t("common.errmsg.email_invalid")), + defaultReceiverAddress: z + .string() + .nullish() + .refine((v) => { + if (!v) return true; + return validEmailAddress(v); + }, t("common.errmsg.email_invalid")), + }); + const formRule = createSchemaFieldRule(formSchema); + + const handleTlsSwitchChange = (checked: boolean) => { + const oldPort = formInst.getFieldValue("smtpPort"); + const newPort = checked && (oldPort == null || oldPort === 25) ? 465 : !checked && (oldPort == null || oldPort === 465) ? 25 : oldPort; + if (newPort !== oldPort) { + formInst.setFieldValue("smtpPort", newPort); + } + }; + + const handleFormChange = (_: unknown, values: z.infer) => { + onValuesChange?.(values); + }; + + return ( +
+
+
+ + + +
+ +
+ + + +
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + +
+ ); +}; + +export default AccessFormEmailConfig; diff --git a/ui/src/components/access/AccessFormMattermostConfig.tsx b/ui/src/components/access/AccessFormMattermostConfig.tsx new file mode 100644 index 00000000..f4a99ece --- /dev/null +++ b/ui/src/components/access/AccessFormMattermostConfig.tsx @@ -0,0 +1,79 @@ +import { useTranslation } from "react-i18next"; +import { Form, type FormInstance, Input } from "antd"; +import { createSchemaFieldRule } from "antd-zod"; +import { z } from "zod"; + +import { type AccessConfigForMattermost } from "@/domain/access"; + +type AccessFormMattermostConfigFieldValues = Nullish; + +export type AccessFormMattermostConfigProps = { + form: FormInstance; + formName: string; + disabled?: boolean; + initialValues?: AccessFormMattermostConfigFieldValues; + onValuesChange?: (values: AccessFormMattermostConfigFieldValues) => void; +}; + +const initFormModel = (): AccessFormMattermostConfigFieldValues => { + return { + serverUrl: "http://:8065/", + username: "", + password: "", + }; +}; + +const AccessFormMattermostConfig = ({ form: formInst, formName, disabled, initialValues, onValuesChange }: AccessFormMattermostConfigProps) => { + const { t } = useTranslation(); + + const formSchema = z.object({ + serverUrl: z.string().url(t("common.errmsg.url_invalid")), + username: z.string().nonempty(t("access.form.mattermost_username.placeholder")), + password: z.string().nonempty(t("access.form.mattermost_password.placeholder")), + defaultChannelId: z.string().nullish(), + }); + const formRule = createSchemaFieldRule(formSchema); + + const handleFormChange = (_: unknown, values: z.infer) => { + onValuesChange?.(values); + }; + + return ( +
+ } + > + + + + + + + + + + + + } + > + + +
+ ); +}; + +export default AccessFormMattermostConfig; diff --git a/ui/src/components/access/AccessFormSSHConfig.tsx b/ui/src/components/access/AccessFormSSHConfig.tsx index 6d3615cf..ebaeba90 100644 --- a/ui/src/components/access/AccessFormSSHConfig.tsx +++ b/ui/src/components/access/AccessFormSSHConfig.tsx @@ -31,13 +31,11 @@ const AccessFormSSHConfig = ({ form: formInst, formName, disabled, initialValues const { t } = useTranslation(); const formSchema = z.object({ - host: z - .string({ message: t("access.form.ssh_host.placeholder") }) - .refine((v) => validDomainName(v) || validIPv4Address(v) || validIPv6Address(v), t("common.errmsg.host_invalid")), + host: z.string().refine((v) => validDomainName(v) || validIPv4Address(v) || validIPv6Address(v), t("common.errmsg.host_invalid")), port: z.preprocess( (v) => Number(v), z - .number({ message: t("access.form.ssh_port.placeholder") }) + .number() .int(t("access.form.ssh_port.placeholder")) .refine((v) => validPortNumber(v), t("common.errmsg.port_invalid")) ), diff --git a/ui/src/components/access/AccessFormTelegramConfig.tsx b/ui/src/components/access/AccessFormTelegramConfig.tsx new file mode 100644 index 00000000..19ceaee2 --- /dev/null +++ b/ui/src/components/access/AccessFormTelegramConfig.tsx @@ -0,0 +1,81 @@ +import { useTranslation } from "react-i18next"; +import { Form, type FormInstance, Input } from "antd"; +import { createSchemaFieldRule } from "antd-zod"; +import { z } from "zod"; + +import { type AccessConfigForTelegram } from "@/domain/access"; + +type AccessFormTelegramConfigFieldValues = Nullish; + +export type AccessFormTelegramConfigProps = { + form: FormInstance; + formName: string; + disabled?: boolean; + initialValues?: AccessFormTelegramConfigFieldValues; + onValuesChange?: (values: AccessFormTelegramConfigFieldValues) => void; +}; + +const initFormModel = (): AccessFormTelegramConfigFieldValues => { + return { + botToken: "", + }; +}; + +const AccessFormTelegramConfig = ({ form: formInst, formName, disabled, initialValues, onValuesChange }: AccessFormTelegramConfigProps) => { + const { t } = useTranslation(); + + const formSchema = z.object({ + botToken: z + .string({ message: t("access.form.telegram_bot_token.placeholder") }) + .min(1, t("access.form.telegram_bot_token.placeholder")) + .max(256, t("common.errmsg.string_max", { max: 256 })), + defaultChatId: z + .preprocess( + (v) => Number(v), + z + .number() + .nullish() + .refine((v) => { + if (v == null || v + "" === "") return true; + return /^\d+$/.test(v + "") && +v! > 0; + }, t("access.form.telegram_default_chat_id.placeholder")) + ) + .nullish(), + }); + const formRule = createSchemaFieldRule(formSchema); + + const handleFormChange = (_: unknown, values: z.infer) => { + onValuesChange?.(values); + }; + + return ( +
+ } + > + + + + } + > + + +
+ ); +}; + +export default AccessFormTelegramConfig; diff --git a/ui/src/components/access/AccessFormWebhookConfig.tsx b/ui/src/components/access/AccessFormWebhookConfig.tsx index 89280d79..f15fe221 100644 --- a/ui/src/components/access/AccessFormWebhookConfig.tsx +++ b/ui/src/components/access/AccessFormWebhookConfig.tsx @@ -25,7 +25,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa const { t } = useTranslation(); const formSchema = z.object({ - url: z.string({ message: t("access.form.webhook_url.placeholder") }).url(t("common.errmsg.url_invalid")), + url: z.string().url(t("common.errmsg.url_invalid")), allowInsecureConnections: z.boolean().nullish(), }); const formRule = createSchemaFieldRule(formSchema); diff --git a/ui/src/components/notification/NotifyChannelEditFormMattermostFields.tsx b/ui/src/components/notification/NotifyChannelEditFormMattermostFields.tsx index a847be75..829a2a0d 100644 --- a/ui/src/components/notification/NotifyChannelEditFormMattermostFields.tsx +++ b/ui/src/components/notification/NotifyChannelEditFormMattermostFields.tsx @@ -7,9 +7,7 @@ const NotifyChannelEditFormMattermostFields = () => { const { t } = useTranslation(); const formSchema = z.object({ - serverUrl: z - .string({ message: t("settings.notification.channel.form.mattermost_server_url.placeholder") }) - .url(t("common.errmsg.url_invalid")), + serverUrl: z.string({ message: t("settings.notification.channel.form.mattermost_server_url.placeholder") }).url(t("common.errmsg.url_invalid")), channelId: z .string({ message: t("settings.notification.channel.form.mattermost_channel_id.placeholder") }) .nonempty(t("settings.notification.channel.form.mattermost_channel_id.placeholder")), @@ -42,19 +40,11 @@ const NotifyChannelEditFormMattermostFields = () => { - + - + diff --git a/ui/src/i18n/locales/en/nls.access.json b/ui/src/i18n/locales/en/nls.access.json index 2959a9b6..49f9d8fb 100644 --- a/ui/src/i18n/locales/en/nls.access.json +++ b/ui/src/i18n/locales/en/nls.access.json @@ -166,6 +166,19 @@ "access.form.edgio_client_secret.label": "Edgio ClientSecret", "access.form.edgio_client_secret.placeholder": "Please enter Edgio ClientSecret", "access.form.edgio_client_secret.tooltip": "For more information, see https://docs.edg.io/applications/v7/rest_api/authentication#administering-api-clients", + "access.form.email_smtp_host.label": "SMTP host", + "access.form.email_smtp_host.placeholder": "Please enter SMTP host", + "access.form.email_smtp_port.label": "SMTP port", + "access.form.email_smtp_port.placeholder": "Please enter SMTP port", + "access.form.email_smtp_tls.label": "Use SSL/TLS", + "access.form.email_username.label": "Username", + "access.form.email_username.placeholder": "please enter username", + "access.form.email_password.label": "Password", + "access.form.email_password.placeholder": "please enter password", + "access.form.email_default_sender_address.label": "Default sender email address (Optional)", + "access.form.email_default_sender_address.placeholder": "Please enter default sender email address", + "access.form.email_default_receiver_address.label": "Default receiver email address (Optional)", + "access.form.email_default_receiver_address.placeholder": "Please enter default receiver email address", "access.form.gcore_api_token.label": "Gcore API token", "access.form.gcore_api_token.placeholder": "Please enter Gcore API token", "access.form.gcore_api_token.tooltip": "For more information, see https://api.gcore.com/docs/iam#section/Authentication", @@ -203,6 +216,15 @@ "access.form.k8s_kubeconfig.placeholder": "Please enter KubeConfig file", "access.form.k8s_kubeconfig.upload": "Choose File ...", "access.form.k8s_kubeconfig.tooltip": "For more information, see https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/

Leave it blank to use the Pod's ServiceAccount.", + "access.form.mattermost_server_url.label": "Mattermost server URL", + "access.form.mattermost_server_url.placeholder": "Please enter Mattermost server URL", + "access.form.mattermost_username.label": "Mattermost username", + "access.form.mattermost_username.placeholder": "Please enter Mattermost username", + "access.form.mattermost_password.label": "Mattermost password", + "access.form.mattermost_password.placeholder": "Please enter Mattermost password", + "access.form.mattermost_default_channel_id.label": "Default Mattermost channel ID", + "access.form.mattermost_default_channel_id.placeholder": "Please enter default Mattermost channel ID", + "access.form.mattermost_default_channel_id.tooltip": "How to get the channel ID? Select the target channel from the left sidebar, click on the channel name at the top, and choose ”Channel Details.” You can directly see the channel ID on the pop-up page.", "access.form.namecheap_username.label": "Namecheap username", "access.form.namecheap_username.placeholder": "Please enter Namecheap username", "access.form.namecheap_username.tooltip": "For more information, see https://www.namecheap.com/support/api/intro/", @@ -274,6 +296,12 @@ "access.form.sslcom_eab_hmac_key.label": "ACME EAB HMAC key", "access.form.sslcom_eab_hmac_key.placeholder": "Please enter ACME EAB HMAC key", "access.form.sslcom_eab_hmac_key.tooltip": "For more information, see https://www.ssl.com/how-to/generate-acme-credentials-for-reseller-customers/", + "access.form.telegram_bot_token.label": "Telegram bot token", + "access.form.telegram_bot_token.placeholder": "Please enter Telegram bot token", + "access.form.telegram_bot_token.tooltip": "How to get the bot token? Please refer to https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a", + "access.form.telegram_default_chat_id.label": "Default Telegram chat ID (Optional)", + "access.form.telegram_default_chat_id.placeholder": "Please enter default Telegram chat ID", + "access.form.telegram_default_chat_id.tooltip": "How to get the chat ID? Please refer to https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a", "access.form.tencentcloud_secret_id.label": "Tencent Cloud SecretId", "access.form.tencentcloud_secret_id.placeholder": "Please enter Tencent Cloud SecretId", "access.form.tencentcloud_secret_id.tooltip": "For more information, see https://cloud.tencent.com/document/product/598/40488?lang=en", diff --git a/ui/src/i18n/locales/zh/nls.access.json b/ui/src/i18n/locales/zh/nls.access.json index ce6ad588..85eb0645 100644 --- a/ui/src/i18n/locales/zh/nls.access.json +++ b/ui/src/i18n/locales/zh/nls.access.json @@ -160,6 +160,19 @@ "access.form.edgio_client_secret.label": "Edgio 客户端密码", "access.form.edgio_client_secret.placeholder": "请输入 Edgio 客户端密码", "access.form.edgio_client_secret.tooltip": "这是什么?请参阅 https://docs.edg.io/applications/v7/rest_api/authentication#administering-api-clients", + "access.form.email_smtp_host.label": "SMTP 服务器地址", + "access.form.email_smtp_host.placeholder": "请输入 SMTP 服务器地址", + "access.form.email_smtp_port.label": "SMTP 服务器端口", + "access.form.email_smtp_port.placeholder": "请输入 SMTP 服务器端口", + "access.form.email_smtp_tls.label": "SSL/TLS 连接", + "access.form.email_username.label": "用户名", + "access.form.email_username.placeholder": "请输入用户名", + "access.form.email_password.label": "密码", + "access.form.email_password.placeholder": "请输入密码", + "access.form.email_default_sender_address.label": "默认的发送邮箱地址(可选)", + "access.form.email_default_sender_address.placeholder": "请输入默认的发送邮箱地址", + "access.form.email_default_receiver_address.label": "默认的接收邮箱地址(可选)", + "access.form.email_default_receiver_address.placeholder": "请输入默认的接收邮箱地址", "access.form.gcore_api_token.label": "Gcore API Token", "access.form.gcore_api_token.placeholder": "请输入 Gcore API Token", "access.form.gcore_api_token.tooltip": "这是什么?请参阅 https://api.gcore.com/docs/iam#section/Authentication", @@ -197,6 +210,15 @@ "access.form.k8s_kubeconfig.placeholder": "请选择 KubeConfig 文件", "access.form.k8s_kubeconfig.upload": "选择文件", "access.form.k8s_kubeconfig.tooltip": "这是什么?请参阅 https://kubernetes.io/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig/

为空时,将使用 Pod 的 ServiceAccount 作为凭证。", + "access.form.mattermost_server_url.label": "Mattermost 服务地址", + "access.form.mattermost_server_url.placeholder": "请输入 Mattermost 服务地址", + "access.form.mattermost_username.label": "Mattermost 用户名", + "access.form.mattermost_username.placeholder": "请输入 Mattermost 用户名", + "access.form.mattermost_password.label": "Mattermost 密码", + "access.form.mattermost_password.placeholder": "请输入 Mattermost 密码", + "access.form.mattermost_default_channel_id.label": "默认的 Mattermost 频道 ID(可选)", + "access.form.mattermost_default_channel_id.placeholder": "请输入默认的 Mattermost 频道 ID", + "access.form.mattermost_default_channel_id.tooltip": "如何获取频道 ID?从左侧边栏中选择目标频道,点击顶部的频道名称,选择“频道详情”,即可在弹出页面中直接看到频道 ID。", "access.form.namecheap_username.label": "Namecheap 用户名", "access.form.namecheap_username.placeholder": "请输入 Namecheap 用户名", "access.form.namecheap_username.tooltip": "这是什么?请参阅 https://www.namecheap.com/support/api/intro/", @@ -268,6 +290,12 @@ "access.form.sslcom_eab_hmac_key.label": "ACME EAB HMAC key", "access.form.sslcom_eab_hmac_key.placeholder": "请输入 ACME EAB HMAC key", "access.form.sslcom_eab_hmac_key.tooltip": "这是什么?请参阅 https://www.ssl.com/how-to/generate-acme-credentials-for-reseller-customers/", + "access.form.telegram_bot_token.label": "Telegram 机器人 API Token", + "access.form.telegram_bot_token.placeholder": "请输入 Telegram 机器人 API Token", + "access.form.telegram_bot_token.tooltip": "如何获取机器人 API Token?请参阅 https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a", + "access.form.telegram_default_chat_id.label": "默认的 Telegram 会话 ID(可选)", + "access.form.telegram_default_chat_id.placeholder": "请输入默认的 Telegram 会话 ID", + "access.form.telegram_default_chat_id.tooltip": "如何获取会话 ID?请参阅 https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a", "access.form.tencentcloud_secret_id.label": "腾讯云 SecretId", "access.form.tencentcloud_secret_id.placeholder": "请输入腾讯云 SecretId", "access.form.tencentcloud_secret_id.tooltip": "这是什么?请参阅 https://cloud.tencent.com/document/product/598/40488",