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

import * as API from './types';

/** 修改密码 修改当前用户的密码 POST /my/change-password */
export async function myChangePasswordUsingPost({
  body,
  options,
}: {
  body: API.MyChangePasswordRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.MyChangePasswordResponse;
    }
  >('/my/change-password', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取我的信息 获取当前用户的个人信息 GET /my/profile */
export async function myProfileUsingGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.GetMyProfileResponse;
    }
  >('/my/profile', {
    method: 'GET',
    ...(options || {}),
  });
}
