feat(api): Add getClient API endpoint to retrieve subscription applications

This commit is contained in:
web
2025-08-13 07:35:58 -07:00
committed by speakeloudest
parent 688efcf29b
commit 5d8b22b81b
30 changed files with 1024 additions and 281 deletions
+12 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';
/** Get Ads GET /v1/common/ads */
@@ -43,6 +43,17 @@ export async function checkVerificationCode(
);
}
/** Get Client GET /v1/common/client */
export async function getClient(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetSubscribeApplicationListResponse }>(
'/v1/common/client',
{
method: 'GET',
...(options || {}),
},
);
}
/** Get verification code POST /v1/common/send_code */
export async function sendEmailCode(body: API.SendCodeRequest, options?: { [key: string]: any }) {
return request<API.Response & { data?: API.SendCodeResponse }>('/v1/common/send_code', {
+30
View File
@@ -213,6 +213,15 @@ declare namespace API {
updated_at: number;
};
type DownloadLink = {
ios?: string;
android?: string;
windows?: string;
mac?: string;
linux?: string;
harmony?: string;
};
type EmailAuthticateConfig = {
enable: boolean;
enable_verify: boolean;
@@ -284,6 +293,11 @@ declare namespace API {
protocol: string[];
};
type GetSubscribeApplicationListResponse = {
total: number;
list: SubscribeApplication[];
};
type GetTosResponse = {
tos_content: string;
};
@@ -765,6 +779,22 @@ declare namespace API {
updated_at: number;
};
type SubscribeApplication = {
id: number;
name: string;
description?: string;
icon?: string;
scheme?: string;
user_agent: string;
is_default: boolean;
proxy_template: string;
template: string;
output_format: string;
download_link?: DownloadLink;
created_at: number;
updated_at: number;
};
type SubscribeConfig = {
single_model: boolean;
subscribe_path: string;