feat(log): Add message log retrieval functionality and update related typings

This commit is contained in:
web@ppanel
2025-02-13 21:25:21 +07:00
parent 13c33378aa
commit 1c0ecaecbd
84 changed files with 928 additions and 534 deletions
+2 -2
View File
@@ -7,10 +7,10 @@ import * as authMethod from './authMethod';
import * as console from './console';
import * as coupon from './coupon';
import * as document from './document';
import * as log from './log';
import * as order from './order';
import * as payment from './payment';
import * as server from './server';
import * as sms from './sms';
import * as subscribe from './subscribe';
import * as system from './system';
import * as ticket from './ticket';
@@ -22,10 +22,10 @@ export default {
console,
coupon,
document,
log,
order,
payment,
server,
sms,
subscribe,
system,
ticket,
+21
View File
@@ -0,0 +1,21 @@
// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';
/** Get message log list GET /v1/admin/log/message/list */
export async function getMessageLogList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.GetMessageLogListParams,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: API.GetMessageLogListResponse }>(
'/v1/admin/log/message/list',
{
method: 'GET',
params: {
...params,
},
...(options || {}),
},
);
}
-18
View File
@@ -1,18 +0,0 @@
// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';
/** Get sms list GET /v1/admin/sms/list */
export async function getSmsList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.GetSmsListParams,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: API.GetSmsListResponse }>('/v1/admin/sms/list', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
-23
View File
@@ -303,29 +303,6 @@ export async function getSubscribeType(options?: { [key: string]: any }) {
});
}
/** Get Telegram Config GET /v1/admin/system/telegram_config */
export async function getTelegramConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.TelegramConfig }>('/v1/admin/system/telegram_config', {
method: 'GET',
...(options || {}),
});
}
/** Update Telegram Config PUT /v1/admin/system/telegram_config */
export async function updateTelegramConfig(
body: API.TelegramConfig,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: any }>('/v1/admin/system/telegram_config', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** Get Team of Service Config GET /v1/admin/system/tos_config */
export async function getTosConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.TosConfig }>('/v1/admin/system/tos_config', {
+42 -27
View File
@@ -458,6 +458,33 @@ declare namespace API {
list: Document[];
};
type GetMessageLogListParams = {
page: number;
size: number;
type: string;
platform?: string;
to?: string;
subject?: string;
content?: string;
status?: number;
};
type GetMessageLogListRequest = {
page: number;
size: number;
type: string;
platform?: string;
to?: string;
subject?: string;
content?: string;
status?: number;
};
type GetMessageLogListResponse = {
total: number;
list: MessageLog[];
};
type GetNodeDetailParams = {
id: number;
};
@@ -524,23 +551,6 @@ declare namespace API {
list: ServerRuleGroup[];
};
type GetSmsListParams = {
page: number;
size: number;
telephone?: string;
};
type GetSmsListRequest = {
page: number;
size: number;
telephone?: string;
};
type GetSmsListResponse = {
total: number;
list: SMS[];
};
type GetSubscribeDetailsParams = {
id: number;
};
@@ -744,6 +754,18 @@ declare namespace API {
list: Record<string, any>;
};
type MessageLog = {
id: number;
type: string;
platform: string;
to: string;
subject: string;
content: string;
status: number;
created_at: number;
updated_at: number;
};
type MobileAuthenticateConfig = {
enable: boolean;
limit: number;
@@ -857,6 +879,9 @@ declare namespace API {
type RegisterConfig = {
stop_register: boolean;
enable_trial: boolean;
trial_subscribe: number;
trial_time: number;
trial_time_unit: string;
enable_ip_register_limit: boolean;
ip_register_limit: number;
ip_register_limit_duration: number;
@@ -973,16 +998,6 @@ declare namespace API {
site_logo: string;
};
type SMS = {
id: string;
content: string;
platform: string;
areaCode: string;
telephone: string;
status: number;
created_at: number;
};
type SortItem = {
id: number;
sort: number;
+15
View File
@@ -193,6 +193,18 @@ declare namespace API {
token: string;
};
type MessageLog = {
id: number;
type: string;
platform: string;
to: string;
subject: string;
content: string;
status: number;
created_at: number;
updated_at: number;
};
type MobileAuthenticateConfig = {
enable: boolean;
limit: number;
@@ -300,6 +312,9 @@ declare namespace API {
type RegisterConfig = {
stop_register: boolean;
enable_trial: boolean;
trial_subscribe: number;
trial_time: number;
trial_time_unit: string;
enable_ip_register_limit: boolean;
ip_register_limit: number;
ip_register_limit_duration: number;