feat(api): Telegram

This commit is contained in:
web@ppanel 2024-12-25 10:52:00 +07:00
parent bca0935063
commit 17ce96a423
27 changed files with 82 additions and 28 deletions

View File

@ -1,5 +1,5 @@
// @ts-ignore // @ts-ignore
// API 更新时间: // API 更新时间:
// API 唯一标识: // API 唯一标识:
import * as announcement from './announcement'; import * as announcement from './announcement';

View File

@ -1,7 +1,7 @@
'use client'; 'use client';
import useGlobalStore from '@/config/use-global'; import useGlobalStore from '@/config/use-global';
import { updateUserNotifySetting } from '@/services/user/user'; import { bindTelegram, unbindTelegram, updateUserNotifySetting } from '@/services/user/user';
import { Button } from '@shadcn/ui/button'; import { Button } from '@shadcn/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@shadcn/ui/card'; import { Card, CardContent, CardHeader, CardTitle } from '@shadcn/ui/card';
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@shadcn/ui/form'; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@shadcn/ui/form';
@ -20,7 +20,7 @@ const FormSchema = z.object({
export default function NotifySettings() { export default function NotifySettings() {
const t = useTranslations('profile.notify'); const t = useTranslations('profile.notify');
const { user } = useGlobalStore(); const { user, getUserInfo } = useGlobalStore();
const form = useForm<z.infer<typeof FormSchema>>({ const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema), resolver: zodResolver(FormSchema),
defaultValues: { defaultValues: {
@ -59,15 +59,22 @@ export default function NotifySettings() {
onChange={(e) => { onChange={(e) => {
field.onChange(e.target.value ? Number(e.target.value) : ''); field.onChange(e.target.value ? Number(e.target.value) : '');
}} }}
disabled
/> />
<Button <Button
size='sm' size='sm'
type='button' type='button'
onClick={async () => { onClick={async () => {
form.handleSubmit(onSubmit)(); if (user?.telegram) {
await unbindTelegram();
await getUserInfo();
} else {
const { data } = await bindTelegram();
data.data?.url && window.open(data.data.url, '_blank');
}
}} }}
> >
{t('bind')} {t(user?.telegram ? 'unbind' : 'bind')}
</Button> </Button>
</div> </div>
</FormControl> </FormControl>

View File

@ -9,12 +9,13 @@
"updateSuccess": "Aktualizace úspěšná" "updateSuccess": "Aktualizace úspěšná"
}, },
"notify": { "notify": {
"bind": "Připojit", "bind": "Přejít na vazbu",
"emailNotification": "E-mailové oznámení", "emailNotification": "E-mailové oznámení",
"notificationSettings": "Nastavení oznámení", "notificationSettings": "Nastavení oznámení",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Zadejte Telegram ID", "telegramIdPlaceholder": "Zadejte Telegram ID",
"telegramNotification": "Telegram oznámení", "telegramNotification": "Telegram oznámení",
"unbind": "Zrušit vazbu",
"updateSuccess": "Aktualizace byla úspěšná" "updateSuccess": "Aktualizace byla úspěšná"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Erfolgreich aktualisiert" "updateSuccess": "Erfolgreich aktualisiert"
}, },
"notify": { "notify": {
"bind": "Binden", "bind": "Zur Bindung gehen",
"emailNotification": "E-Mail-Benachrichtigung", "emailNotification": "E-Mail-Benachrichtigung",
"notificationSettings": "Benachrichtigungseinstellungen", "notificationSettings": "Benachrichtigungseinstellungen",
"telegramId": "Telegram-ID", "telegramId": "Telegram-ID",
"telegramIdPlaceholder": "Telegram-ID eingeben", "telegramIdPlaceholder": "Telegram-ID eingeben",
"telegramNotification": "Telegram-Benachrichtigung", "telegramNotification": "Telegram-Benachrichtigung",
"unbind": "Lösen",
"updateSuccess": "Erfolgreich aktualisiert" "updateSuccess": "Erfolgreich aktualisiert"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Update Successful" "updateSuccess": "Update Successful"
}, },
"notify": { "notify": {
"bind": "Bind", "bind": "Go to Binding",
"emailNotification": "Email Notification", "emailNotification": "Email Notification",
"notificationSettings": "Notification Settings", "notificationSettings": "Notification Settings",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Enter Telegram ID", "telegramIdPlaceholder": "Enter Telegram ID",
"telegramNotification": "Telegram Notification", "telegramNotification": "Telegram Notification",
"unbind": "Unbind",
"updateSuccess": "Update Successful" "updateSuccess": "Update Successful"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Actualización exitosa" "updateSuccess": "Actualización exitosa"
}, },
"notify": { "notify": {
"bind": "Vincular", "bind": "Ir a Vinculación",
"emailNotification": "Notificación por correo electrónico", "emailNotification": "Notificación por correo electrónico",
"notificationSettings": "Configuración de notificaciones", "notificationSettings": "Configuración de notificaciones",
"telegramId": "ID de Telegram", "telegramId": "ID de Telegram",
"telegramIdPlaceholder": "Ingrese ID de Telegram", "telegramIdPlaceholder": "Ingrese ID de Telegram",
"telegramNotification": "Notificación de Telegram", "telegramNotification": "Notificación de Telegram",
"unbind": "Desvincular",
"updateSuccess": "Actualización exitosa" "updateSuccess": "Actualización exitosa"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Actualización exitosa" "updateSuccess": "Actualización exitosa"
}, },
"notify": { "notify": {
"bind": "Vincular", "bind": "Ir a Vinculación",
"emailNotification": "Notificación por correo electrónico", "emailNotification": "Notificación por correo electrónico",
"notificationSettings": "Configuración de notificaciones", "notificationSettings": "Configuración de notificaciones",
"telegramId": "ID de Telegram", "telegramId": "ID de Telegram",
"telegramIdPlaceholder": "Ingrese ID de Telegram", "telegramIdPlaceholder": "Ingrese ID de Telegram",
"telegramNotification": "Notificación de Telegram", "telegramNotification": "Notificación de Telegram",
"unbind": "Desvincular",
"updateSuccess": "Actualización exitosa" "updateSuccess": "Actualización exitosa"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "به‌روزرسانی موفقیت‌آمیز" "updateSuccess": "به‌روزرسانی موفقیت‌آمیز"
}, },
"notify": { "notify": {
"bind": "اتصال", "bind": "رفتن به اتصال",
"emailNotification": "اعلان ایمیل", "emailNotification": "اعلان ایمیل",
"notificationSettings": "تنظیمات اعلان", "notificationSettings": "تنظیمات اعلان",
"telegramId": "شناسه تلگرام", "telegramId": "شناسه تلگرام",
"telegramIdPlaceholder": "شناسه تلگرام را وارد کنید", "telegramIdPlaceholder": "شناسه تلگرام را وارد کنید",
"telegramNotification": "اعلان تلگرام", "telegramNotification": "اعلان تلگرام",
"unbind": "لغو اتصال",
"updateSuccess": "به‌روزرسانی موفقیت‌آمیز" "updateSuccess": "به‌روزرسانی موفقیت‌آمیز"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Päivitys onnistui" "updateSuccess": "Päivitys onnistui"
}, },
"notify": { "notify": {
"bind": "Yhdistä", "bind": "Siirry sitomiseen",
"emailNotification": "Sähköposti-ilmoitus", "emailNotification": "Sähköposti-ilmoitus",
"notificationSettings": "Ilmoitusasetukset", "notificationSettings": "Ilmoitusasetukset",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Syötä Telegram ID", "telegramIdPlaceholder": "Syötä Telegram ID",
"telegramNotification": "Telegram-ilmoitus", "telegramNotification": "Telegram-ilmoitus",
"unbind": "Poista sitominen",
"updateSuccess": "Päivitys onnistui" "updateSuccess": "Päivitys onnistui"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Mise à jour réussie" "updateSuccess": "Mise à jour réussie"
}, },
"notify": { "notify": {
"bind": "Lier", "bind": "Aller à la liaison",
"emailNotification": "Notification par e-mail", "emailNotification": "Notification par e-mail",
"notificationSettings": "Paramètres de notification", "notificationSettings": "Paramètres de notification",
"telegramId": "ID Telegram", "telegramId": "ID Telegram",
"telegramIdPlaceholder": "Entrez l'ID Telegram", "telegramIdPlaceholder": "Entrez l'ID Telegram",
"telegramNotification": "Notification Telegram", "telegramNotification": "Notification Telegram",
"unbind": "Délier",
"updateSuccess": "Mise à jour réussie" "updateSuccess": "Mise à jour réussie"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "सफलतापूर्वक अपडेट किया गया" "updateSuccess": "सफलतापूर्वक अपडेट किया गया"
}, },
"notify": { "notify": {
"bind": "बाइंड", "bind": "बाइंडिंग पर जाएं",
"emailNotification": "ईमेल सूचना", "emailNotification": "ईमेल सूचना",
"notificationSettings": "सूचना सेटिंग्स", "notificationSettings": "सूचना सेटिंग्स",
"telegramId": "टेलीग्राम आईडी", "telegramId": "टेलीग्राम आईडी",
"telegramIdPlaceholder": "टेलीग्राम आईडी दर्ज करें", "telegramIdPlaceholder": "टेलीग्राम आईडी दर्ज करें",
"telegramNotification": "टेलीग्राम सूचना", "telegramNotification": "टेलीग्राम सूचना",
"unbind": "अनबाइंड करें",
"updateSuccess": "सफलतापूर्वक अपडेट किया गया" "updateSuccess": "सफलतापूर्वक अपडेट किया गया"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Sikeres frissítés" "updateSuccess": "Sikeres frissítés"
}, },
"notify": { "notify": {
"bind": "Összekapcsolás", "bind": "Menj a kötéshez",
"emailNotification": "E-mail értesítés", "emailNotification": "E-mail értesítés",
"notificationSettings": "Értesítési beállítások", "notificationSettings": "Értesítési beállítások",
"telegramId": "Telegram azonosító", "telegramId": "Telegram azonosító",
"telegramIdPlaceholder": "Adja meg a Telegram azonosítót", "telegramIdPlaceholder": "Adja meg a Telegram azonosítót",
"telegramNotification": "Telegram értesítés", "telegramNotification": "Telegram értesítés",
"unbind": "Kötés feloldása",
"updateSuccess": "Sikeres frissítés" "updateSuccess": "Sikeres frissítés"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "更新成功" "updateSuccess": "更新成功"
}, },
"notify": { "notify": {
"bind": "バイン", "bind": "バインディングに移動",
"emailNotification": "メール通知", "emailNotification": "メール通知",
"notificationSettings": "通知設定", "notificationSettings": "通知設定",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Telegram IDを入力", "telegramIdPlaceholder": "Telegram IDを入力",
"telegramNotification": "Telegram通知", "telegramNotification": "Telegram通知",
"unbind": "バインド解除",
"updateSuccess": "更新成功" "updateSuccess": "更新成功"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "업데이트 성공" "updateSuccess": "업데이트 성공"
}, },
"notify": { "notify": {
"bind": "연결", "bind": "바인딩으로 이동",
"emailNotification": "이메일 알림", "emailNotification": "이메일 알림",
"notificationSettings": "알림 설정", "notificationSettings": "알림 설정",
"telegramId": "텔레그램 ID", "telegramId": "텔레그램 ID",
"telegramIdPlaceholder": "텔레그램 ID 입력", "telegramIdPlaceholder": "텔레그램 ID 입력",
"telegramNotification": "텔레그램 알림", "telegramNotification": "텔레그램 알림",
"unbind": "바인딩 해제",
"updateSuccess": "업데이트 성공" "updateSuccess": "업데이트 성공"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Oppdatering vellykket" "updateSuccess": "Oppdatering vellykket"
}, },
"notify": { "notify": {
"bind": "Knytt til", "bind": "Gå til binding",
"emailNotification": "E-postvarsling", "emailNotification": "E-postvarsling",
"notificationSettings": "Varslingsinnstillinger", "notificationSettings": "Varslingsinnstillinger",
"telegramId": "Telegram-ID", "telegramId": "Telegram-ID",
"telegramIdPlaceholder": "Skriv inn Telegram-ID", "telegramIdPlaceholder": "Skriv inn Telegram-ID",
"telegramNotification": "Telegram-varsling", "telegramNotification": "Telegram-varsling",
"unbind": "Løsne",
"updateSuccess": "Oppdatering vellykket" "updateSuccess": "Oppdatering vellykket"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Aktualizacja zakończona sukcesem" "updateSuccess": "Aktualizacja zakończona sukcesem"
}, },
"notify": { "notify": {
"bind": "Połącz", "bind": "Przejdź do wiązania",
"emailNotification": "Powiadomienie e-mail", "emailNotification": "Powiadomienie e-mail",
"notificationSettings": "Ustawienia powiadomień", "notificationSettings": "Ustawienia powiadomień",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Wprowadź Telegram ID", "telegramIdPlaceholder": "Wprowadź Telegram ID",
"telegramNotification": "Powiadomienie Telegram", "telegramNotification": "Powiadomienie Telegram",
"unbind": "Odwiąż",
"updateSuccess": "Aktualizacja zakończona sukcesem" "updateSuccess": "Aktualizacja zakończona sukcesem"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Atualização bem-sucedida" "updateSuccess": "Atualização bem-sucedida"
}, },
"notify": { "notify": {
"bind": "Vincular", "bind": "Ir para Vinculação",
"emailNotification": "Notificação por e-mail", "emailNotification": "Notificação por e-mail",
"notificationSettings": "Configurações de notificação", "notificationSettings": "Configurações de notificação",
"telegramId": "ID do Telegram", "telegramId": "ID do Telegram",
"telegramIdPlaceholder": "Insira o ID do Telegram", "telegramIdPlaceholder": "Insira o ID do Telegram",
"telegramNotification": "Notificação do Telegram", "telegramNotification": "Notificação do Telegram",
"unbind": "Desvincular",
"updateSuccess": "Atualização bem-sucedida" "updateSuccess": "Atualização bem-sucedida"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Actualizare reușită" "updateSuccess": "Actualizare reușită"
}, },
"notify": { "notify": {
"bind": "Conectare", "bind": "Mergi la Legare",
"emailNotification": "Notificare prin email", "emailNotification": "Notificare prin email",
"notificationSettings": "Setări notificări", "notificationSettings": "Setări notificări",
"telegramId": "ID Telegram", "telegramId": "ID Telegram",
"telegramIdPlaceholder": "Introduceți ID-ul Telegram", "telegramIdPlaceholder": "Introduceți ID-ul Telegram",
"telegramNotification": "Notificare Telegram", "telegramNotification": "Notificare Telegram",
"unbind": "Dezleagă",
"updateSuccess": "Actualizare reușită" "updateSuccess": "Actualizare reușită"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Успешно обновлено" "updateSuccess": "Успешно обновлено"
}, },
"notify": { "notify": {
"bind": ривязать", "bind": ерейти к привязке",
"emailNotification": "Уведомление по электронной почте", "emailNotification": "Уведомление по электронной почте",
"notificationSettings": "Настройки уведомлений", "notificationSettings": "Настройки уведомлений",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Введите Telegram ID", "telegramIdPlaceholder": "Введите Telegram ID",
"telegramNotification": "Уведомление в Telegram", "telegramNotification": "Уведомление в Telegram",
"unbind": "Отвязать",
"updateSuccess": "Успешно обновлено" "updateSuccess": "Успешно обновлено"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "อัปเดตสำเร็จ" "updateSuccess": "อัปเดตสำเร็จ"
}, },
"notify": { "notify": {
"bind": "ผูก", "bind": "ไปที่การผูก",
"emailNotification": "การแจ้งเตือนทางอีเมล", "emailNotification": "การแจ้งเตือนทางอีเมล",
"notificationSettings": "การตั้งค่าการแจ้งเตือน", "notificationSettings": "การตั้งค่าการแจ้งเตือน",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "กรอก Telegram ID", "telegramIdPlaceholder": "กรอก Telegram ID",
"telegramNotification": "การแจ้งเตือนทาง Telegram", "telegramNotification": "การแจ้งเตือนทาง Telegram",
"unbind": "ยกเลิกการผูก",
"updateSuccess": "อัปเดตสำเร็จ" "updateSuccess": "อัปเดตสำเร็จ"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Güncelleme Başarılı" "updateSuccess": "Güncelleme Başarılı"
}, },
"notify": { "notify": {
"bind": "Bağla", "bind": "Bağlamaya Git",
"emailNotification": "E-posta Bildirimi", "emailNotification": "E-posta Bildirimi",
"notificationSettings": "Bildirim Ayarları", "notificationSettings": "Bildirim Ayarları",
"telegramId": "Telegram Kimliği", "telegramId": "Telegram Kimliği",
"telegramIdPlaceholder": "Telegram Kimliği girin", "telegramIdPlaceholder": "Telegram Kimliği girin",
"telegramNotification": "Telegram Bildirimi", "telegramNotification": "Telegram Bildirimi",
"unbind": "Bağlamayı Kaldır",
"updateSuccess": "Güncelleme Başarılı" "updateSuccess": "Güncelleme Başarılı"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Оновлення успішне" "updateSuccess": "Оновлення успішне"
}, },
"notify": { "notify": {
"bind": рив'язати", "bind": ерейти до прив'язки",
"emailNotification": "Сповіщення електронною поштою", "emailNotification": "Сповіщення електронною поштою",
"notificationSettings": "Налаштування сповіщень", "notificationSettings": "Налаштування сповіщень",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Введіть Telegram ID", "telegramIdPlaceholder": "Введіть Telegram ID",
"telegramNotification": "Сповіщення Telegram", "telegramNotification": "Сповіщення Telegram",
"unbind": "Відв'язати",
"updateSuccess": "Оновлення успішне" "updateSuccess": "Оновлення успішне"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "Cập nhật thành công" "updateSuccess": "Cập nhật thành công"
}, },
"notify": { "notify": {
"bind": "Liên kết", "bind": "Đi đến Liên kết",
"emailNotification": "Thông báo Email", "emailNotification": "Thông báo Email",
"notificationSettings": "Cài đặt Thông báo", "notificationSettings": "Cài đặt Thông báo",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "Nhập Telegram ID", "telegramIdPlaceholder": "Nhập Telegram ID",
"telegramNotification": "Thông báo Telegram", "telegramNotification": "Thông báo Telegram",
"unbind": "Hủy liên kết",
"updateSuccess": "Cập nhật thành công" "updateSuccess": "Cập nhật thành công"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "更新成功" "updateSuccess": "更新成功"
}, },
"notify": { "notify": {
"bind": "绑定", "bind": "前往绑定",
"emailNotification": "邮件通知", "emailNotification": "邮件通知",
"notificationSettings": "通知设置", "notificationSettings": "通知设置",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "输入 Telegram ID", "telegramIdPlaceholder": "输入 Telegram ID",
"telegramNotification": "Telegram 通知", "telegramNotification": "Telegram 通知",
"unbind": "解除绑定",
"updateSuccess": "更新成功" "updateSuccess": "更新成功"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -9,12 +9,13 @@
"updateSuccess": "更新成功" "updateSuccess": "更新成功"
}, },
"notify": { "notify": {
"bind": "綁定", "bind": "前往綁定",
"emailNotification": "郵件通知", "emailNotification": "郵件通知",
"notificationSettings": "通知設定", "notificationSettings": "通知設定",
"telegramId": "Telegram ID", "telegramId": "Telegram ID",
"telegramIdPlaceholder": "輸入 Telegram ID", "telegramIdPlaceholder": "輸入 Telegram ID",
"telegramNotification": "Telegram 通知", "telegramNotification": "Telegram 通知",
"unbind": "解除綁定",
"updateSuccess": "更新成功" "updateSuccess": "更新成功"
}, },
"notifyEvent": { "notifyEvent": {

View File

@ -27,6 +27,11 @@ declare namespace API {
ios: Application[]; ios: Application[];
}; };
type BindTelegramResponse = {
url: string;
expired_at: number;
};
type CheckoutOrderRequest = { type CheckoutOrderRequest = {
orderNo: string; orderNo: string;
}; };

View File

@ -24,6 +24,17 @@ export async function queryUserBalanceLog(options?: { [key: string]: any }) {
); );
} }
/** Bind Telegram GET /v1/public/user/bind_telegram */
export async function bindTelegram(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.BindTelegramResponse }>(
'/v1/public/user/bind_telegram',
{
method: 'GET',
...(options || {}),
},
);
}
/** Query User Info GET /v1/public/user/info */ /** Query User Info GET /v1/public/user/info */
export async function queryUserInfo(options?: { [key: string]: any }) { export async function queryUserInfo(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.User }>('/v1/public/user/info', { return request<API.Response & { data?: API.User }>('/v1/public/user/info', {
@ -87,3 +98,11 @@ export async function queryUserSubscribe(options?: { [key: string]: any }) {
}, },
); );
} }
/** Unbind Telegram POST /v1/public/user/unbind_telegram */
export async function unbindTelegram(options?: { [key: string]: any }) {
return request<API.Response & { data?: any }>('/v1/public/user/unbind_telegram', {
method: 'POST',
...(options || {}),
});
}