import req from '@/request.js';

const bpmModel = window.context.bpmModel;
const bpmRunTime = window.context.bpmRunTime;
const portal = window.context.portal;
export default {
  // 数据共享管理- 数据调用日志
  dataCallLogs(data) {
    return new Promise((resolve, reject) => {
      req.post(`${portal}/biz/dataShare/shareApiLog/v1/query`, data).then(
        response => {
          resolve(response.data);
        },
        error => {
          reject(error);
        },
      );
    });
  },
  // 离线文件下载调用
  fileDownloads(data) {
    return new Promise((resolve, reject) => {
      req.post(`${portal}/biz/dataShare/shareFileLog/v1/query`, data).then(
        response => {
          resolve(response.data);
        },
        error => {
          reject(error);
        },
      );
    });
  },
};
