import request from "@/utils/request.js";


/**
 * @description 获取密钥列表
 * @param {*} (pageNum,pageSize)
 * @returns data
 */
export function keyListApi(pageNum, pageSize) {
  return request({
    url: `/thirdPartyApi/page?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'get'
  })
}

/**
 * @description 根据id获取密钥详情
 * @param {*} (id)
 * @returns data
 */
export function getKeyByIdApi(id) {
  return request({
    url: `/thirdPartyApi/getByServiceId?serviceId=${id}`,
    method: 'get'
  })
}

/**
 * @description 更改密钥状态
 * @param {*} (id,status)
 * @returns data
 */
export function updateKeyStatusApi(id, status) {
  return request({
    url: `/thirdPartyApi/updateStatus`,
    method: 'post',
    data: { id, status }
  })
}