/*
 * <<
 * Davinci
 * ==
 * Copyright (C) 2016 - 2017 EDP
 * ==
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * >>
 */

import { API_HOST, HOST1 } from '../globalConstants'

export default {
  externalAuthProviders: `${API_HOST}/login/getOauth2Clients`,
  tryExternalAuth: `${API_HOST}/login/externalLogin`,
  login: `${API_HOST}/login`,
  group: `${API_HOST}/groups`,
  user: `${API_HOST}/users`,
  changepwd: `${API_HOST}/changepwd`,
  source: `${API_HOST}/sources`,
  view: `${API_HOST}/views`,
  widget: `${API_HOST}/widgets`,
  display: `${API_HOST}/displays`,
  share: `${API_HOST}/share`,
  checkName: `${API_HOST}/check`,
  projectsCheckName: `${API_HOST}/check/`,
  uploads: `${API_HOST}/uploads`,
  schedule: `${API_HOST}/cronjobs`,
  signup: `${API_HOST}/users`,
  organizations: `${API_HOST}/organizations`,
  checkNameUnique: `${API_HOST}/check`,
  projects: `${API_HOST}/projects`,
  teams: `${API_HOST}/teams`,
  roles: `${API_HOST}/roles`,
  portal: `${API_HOST}/dashboardPortals`,
  star: `${API_HOST}/star`,
  download: `${API_HOST}/download`,
  buriedPoints: `${API_HOST}/statistic`,
  configurations: `${API_HOST}/configurations`,

  // 根据ticket获取用户信息
  getUserInfo: `${HOST1}taihu-auth/thirdLogin/getUserInfo`,
  // 数据概览
  dataScreening: `${API_HOST}/dataScreening`,
  // 获取资源目录列表
  getCatalogues: `${API_HOST}/catalogue/getCatalogues`,
  // 创建资源目录 POST
  createCatalogue: `${API_HOST}/catalogue/createCatalogue`,
  // 修改资源目录 PUT /api/v3/catalogue/updateCatalogue/{id}
  updateCatalogue: `${API_HOST}/catalogue/updateCatalogue`,
  // 删除资源目录 DELETE /api/v3/catalogue/deleteCatalogue/{id}
  deleteCatalogue: `${API_HOST}/catalogue/deleteCatalogue/`,
  // 根据目录id获取view /api/v3/views/getViewsByParentId params:  projectId parentId
  getViewsByParentId: `${API_HOST}/views/getViewsByParentId`,

  // 查询数据字典数据 /api/v3/dict/dictDatas?dictType=xx
  dictDatas: `${API_HOST}/dict/dictDatas`,
  // PUT /api/v3/dict/updateDictData/{id}
  updateDictData: `${API_HOST}/dict/updateDictData/`,
  // POST /api/v3/dict/createDictData
  createDictData: `${API_HOST}/dict/createDictData/`,
  // DELETE  /api/v3/dict/deleteDictData/{id}
  deleteDictData: `${API_HOST}/dict/deleteDictData/`,

  // 获取数据字典类型 /api/v3/dict/dictTypes
  dictTypes: `${API_HOST}/dict/dictTypes`,
  // 新增数据字典类型 /api/v3/dict/createDictType POST
  createDictType: `${API_HOST}/dict/createDictType`,
  // 修改数据字典类型 /api/v3/dict/updateDictType/{id} PUT
  updateDictType: `${API_HOST}/dict/updateDictType/`,
  // 删除数据字典类型 /api/v3/dict/deleteDictType/{id} DELETE
  deleteDictType: `${API_HOST}/dict/deleteDictType/`,

  // 从字典表中获取主题列表 /api/v3/dict/getDictDataList/{dictType}
  getSubjects: `${API_HOST}/dict/getDictDataList/`,

  // 查询数据标准
  getDataSubject: `${API_HOST}/dataSubject/getDataSubject`,
  // 删除数据标准 /api/v3/dataSubject/deleteDataSubject/{id}
  deleteDataSubject: `${API_HOST}/dataSubject/deleteDataSubject/`,
  // /api/v3/dataSubject/updateDataSubject/{id}
  updateDataSubject: `${API_HOST}/dataSubject/updateDataSubject/`,
  createDataSubject: `${API_HOST}/dataSubject/createDataSubject`,

  getDataRules: `${API_HOST}/dataRules/getDataRules`,
  createDataRules: `${API_HOST}/dataRules/createDataRules`,
  // /api/v3/dataRules/updateDataRules/1 put
  updateDataRules: `${API_HOST}/dataRules/updateDataRules/`,
  // /api/v3/dataRules/deleteDataRules/1 delete
  deleteDataRules: `${API_HOST}/dataRules/deleteDataRules/`,

  // 查询稽核类型
  getAuditClassification: `${API_HOST}/auditClassification/getAuditClassification`,
  createAuditClassification: `${API_HOST}/auditClassification/createAuditClassification`,
  // /api/v3/auditClassification/updateAuditClassification/{id} PUT
  updateAuditClassification: `${API_HOST}/auditClassification/updateAuditClassification/`,
  // /api/v3/auditClassification/deleteAuditClassification/{id} DELETE
  deleteAuditClassification: `${API_HOST}/auditClassification/deleteAuditClassification/`,

  getQualityTask: `${API_HOST}/qualityTask/getQualityTask`,
  // 新增质量任务 POST /api/v3/qualityTask/createQualityTask
  createQualityTask: `${API_HOST}/qualityTask/createQualityTask`,
  // 修改质量任务 PUT /api/v3/qualityTask/updateQualityTask/{id}
  updateQualityTask: `${API_HOST}/qualityTask/updateQualityTask/`,
  // 删除质量任务 DELETE /api/v3/qualityTask/deleteQualityTask/{id}
  deleteQualityTask: `${API_HOST}/qualityTask/deleteQualityTask/`,

  // 设置调度 PUT /api/v3/qualityTask/setDispatch/{id}
  setDispatch: `${API_HOST}/qualityTask/setDispatch/`,
  // 立即稽核 PUT /api/v3/qualityTask/auditor/{id}
  setDispatchRightNow: `${API_HOST}/qualityTask/auditor/`,

  // 质量报告列表 GET /api/v3/qualityTask/qualityReport
  qualityReport: `${API_HOST}/qualityTask/qualityReport`,
  // 质量报告详情 GET /api/v3/qualityTask/qualityReportDetail/{taskId}
  qualityReportDetail: `${API_HOST}/qualityTask/qualityReportDetail/`
}
