59 lines
2.3 KiB
TypeScript
59 lines
2.3 KiB
TypeScript
/**
|
|
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
|
* No deletion without permission, or be held responsible to law.
|
|
* @author gaoxq
|
|
*/
|
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
|
import { UploadFileParams } from '@jeesite/types/axios';
|
|
import { AxiosProgressEvent } from 'axios';
|
|
|
|
const { ctxPath, adminPath } = useGlobSetting();
|
|
|
|
export interface BizMailReceived extends BasicModel<BizMailReceived> {
|
|
createTime: string; // 记录时间
|
|
messageId: string; // 邮件服务器消息ID
|
|
accountId: string; // 邮件账户标识
|
|
fromAddress: string; // 发件人地址
|
|
fromName?: string; // 发件人名称
|
|
toAddresses: string; // 收件人地址
|
|
ccAddresses?: string; // 抄送地址
|
|
bccAddresses?: string; // 密送地址
|
|
subject: string; // 邮件主题
|
|
mailContent?: string; // 邮件内容
|
|
receivedTime: string; // 接收时间
|
|
sendTime?: string; // 发送时间
|
|
hasAttachment?: string; // 是否有附件
|
|
mailbox: string; // mailbox
|
|
ustatus: string; // 状态
|
|
}
|
|
|
|
export const bizMailReceivedList = (params?: BizMailReceived | any) =>
|
|
defHttp.get<BizMailReceived>({ url: adminPath + '/biz/mailReceived/list', params });
|
|
|
|
export const bizMailReceivedListData = (params?: BizMailReceived | any) =>
|
|
defHttp.post<Page<BizMailReceived>>({ url: adminPath + '/biz/mailReceived/listData', params });
|
|
|
|
export const bizMailReceivedForm = (params?: BizMailReceived | any) =>
|
|
defHttp.get<BizMailReceived>({ url: adminPath + '/biz/mailReceived/form', params });
|
|
|
|
export const bizMailReceivedSave = (params?: any, data?: BizMailReceived | any) =>
|
|
defHttp.postJson<BizMailReceived>({ url: adminPath + '/biz/mailReceived/save', params, data });
|
|
|
|
export const bizMailReceivedImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/mailReceived/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const bizMailReceivedDelete = (params?: BizMailReceived | any) =>
|
|
defHttp.get<BizMailReceived>({ url: adminPath + '/biz/mailReceived/delete', params });
|