✨ feat(api): Telegram
This commit is contained in:
Vendored
+5
@@ -27,6 +27,11 @@ declare namespace API {
|
||||
ios: Application[];
|
||||
};
|
||||
|
||||
type BindTelegramResponse = {
|
||||
url: string;
|
||||
expired_at: number;
|
||||
};
|
||||
|
||||
type CheckoutOrderRequest = {
|
||||
orderNo: string;
|
||||
};
|
||||
|
||||
@@ -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 */
|
||||
export async function queryUserInfo(options?: { [key: string]: any }) {
|
||||
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 || {}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user