/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import type { CustomRequestOptions } from '@/http/types';

import * as API from './types';

/** 获取协议内容 GET /app/agreement/getAgreement/${param0} */
export async function appAgreementGetAgreementCodeGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppAgreementGetAgreementcodeGetParams;
  options?: CustomRequestOptions;
}) {
  const { code: param0, ...queryParams } = params;

  return request<string>(`/app/agreement/getAgreement/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取协议 POST /app/agreement/getByCode */
export async function appAgreementGetByCodePost({
  body,
  options,
}: {
  body: API.GetAgreementBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RAgreementVo>('/app/agreement/getByCode', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取协议内容 POST /app/agreement/getContentByCode */
export async function appAgreementGetContentByCodePost({
  body,
  options,
}: {
  body: API.GetAgreementBo;
  options?: CustomRequestOptions;
}) {
  return request<string>('/app/agreement/getContentByCode', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
