🐛 fix(api): Rename app-related functions and types to application for consistency

This commit is contained in:
web@ppanel
2025-01-18 18:48:28 +07:00
parent 5e5e4edd2e
commit 9d8b814212
11 changed files with 77 additions and 228 deletions
+3 -3
View File
@@ -2,9 +2,9 @@
/* eslint-disable */
import request from '@/utils/request';
/** Get Tos Content GET /v1/common/app/info */
export async function getAppInfo(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetAppInfoResponse }>('/v1/common/app/info', {
/** Get Tos Content GET /v1/common/application */
export async function getApplication(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetAppcationResponse }>('/v1/common/application', {
method: 'GET',
...(options || {}),
});
+9 -20
View File
@@ -10,14 +10,6 @@ declare namespace API {
updated_at: number;
};
type AppConfig = {
name: string;
domains: string[];
describe: string;
startup_picture: string;
startup_picture_skip_time: number;
};
type Application = {
id: number;
icon: string;
@@ -26,6 +18,12 @@ declare namespace API {
subscribe_type: string;
};
type ApplicationConfig = {
domains: string[];
startup_picture: string;
startup_picture_skip_time: number;
};
type ApplicationPlatform = {
ios?: ApplicationVersion[];
mac?: ApplicationVersion[];
@@ -56,15 +54,6 @@ declare namespace API {
is_default: boolean;
};
type AppVersion = {
id: number;
os: string;
version: string;
download_url: string;
describe: string;
default_version: boolean;
};
type AuthConfig = {
sms: SmsAuthenticateConfig;
email: EmailAuthticateConfig;
@@ -151,9 +140,9 @@ declare namespace API {
created_at: number;
};
type GetAppInfoResponse = {
config: AppConfig;
versions: AppVersion[];
type GetAppcationResponse = {
config: ApplicationConfig;
applications: ApplicationResponseInfo[];
};
type GetGlobalConfigResponse = {