64 lines
2.4 KiB
TypeScript
64 lines
2.4 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 BizMailAccount extends BasicModel<BizMailAccount> {
|
|
createTime: string; // 记录时间
|
|
accountName: string;
|
|
host: string; // SMTP服务
|
|
smtpPort: number; // SMTP端口
|
|
imapHost: string; // IMAP服务
|
|
imapPort: number; // IMAP端口
|
|
username: string; // 用户名称
|
|
password: string; // 用户密码
|
|
fromAddress: string; // 发件人地址
|
|
sslEnable?: string; // 是否启用SSL
|
|
ustatus: string; //状态
|
|
remark?: string; // 备注
|
|
updateTime: string; // 更新时间
|
|
ftenantId?: string; // 租户id
|
|
fflowId?: string; // 流程id
|
|
fflowTaskId?: string; // 流程任务主键
|
|
fflowState?: number; // 流程任务状态
|
|
}
|
|
|
|
export const bizMailAccountList = (params?: BizMailAccount | any) =>
|
|
defHttp.get<BizMailAccount>({ url: adminPath + '/biz/mailAccount/list', params });
|
|
|
|
export const bizMailAccountListData = (params?: BizMailAccount | any) =>
|
|
defHttp.post<Page<BizMailAccount>>({ url: adminPath + '/biz/mailAccount/listData', params });
|
|
|
|
export const bizMailAccountForm = (params?: BizMailAccount | any) =>
|
|
defHttp.get<BizMailAccount>({ url: adminPath + '/biz/mailAccount/form', params });
|
|
|
|
export const bizMailAccountSave = (params?: any, data?: BizMailAccount | any) =>
|
|
defHttp.postJson<BizMailAccount>({ url: adminPath + '/biz/mailAccount/save', params, data });
|
|
|
|
export const bizMailAccountImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/mailAccount/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const bizMailAccountDelete = (params?: BizMailAccount | any) =>
|
|
defHttp.get<BizMailAccount>({ url: adminPath + '/biz/mailAccount/delete', params });
|
|
|
|
export const bizMailReceived = (params?: BizMailAccount | any) =>
|
|
defHttp.get<BizMailAccount>({ url: adminPath + '/biz/mailAccount/received', params });
|