🐛 fix(api): Rename app-related functions and types to application for consistency
This commit is contained in:
@@ -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
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user