// @ts-ignore
/* eslint-disable */
import request from "../request";

/** 创建平台 POST /operation/createPlatform */
export async function createPlatform(
  body: BusinessAPI.PlatformCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePlatformVO>(
    "/operation/createPlatform",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 平台删除 DELETE /operation/destroyPlatform */
export async function destroyPlatform(
  body: BusinessAPI.PlatformDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/destroyPlatform", {
    method: "DELETE",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 平台列表 GET /operation/listPlatform */
export async function listPlatform(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listPlatformParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponsePlatformVO>(
    "/operation/listPlatform",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 平台列表 GET /operation/pagePlatform */
export async function pagePlatform(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pagePlatformParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponsePlatformVO>(
    "/operation/pagePlatform",
    {
      method: "GET",
      params: {
        ...params,
        platformPageQry: undefined,
        ...params["platformPageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 平台详情 GET /operation/showPlatform */
export async function showPlatform(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showPlatformParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePlatformVO>(
    "/operation/showPlatform",
    {
      method: "GET",
      params: {
        ...params,
        platformShowQry: undefined,
        ...params["platformShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 平台更新 PUT /operation/updatePlatform */
export async function updatePlatform(
  body: BusinessAPI.PlatformUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePlatformVO>(
    "/operation/updatePlatform",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 平台更新 PATCH /operation/updatePlatform */
export async function updatePlatform1(
  body: BusinessAPI.PlatformUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePlatformVO>(
    "/operation/updatePlatform",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
