import { MethodType } from "../../constants/enum/method-type.enum";
import { HeaderType } from "../../constants/enum/header-type.enum";
import { API_PREFIX, PERMIT_ENDPOINT } from "../../constants/config/base.config";

const prefix = API_PREFIX + "/sys-user-info";

const sysUserInfoApi = {
  login: {
    url: prefix + PERMIT_ENDPOINT + "/login",
    method: MethodType.POST.code,
    header: HeaderType.BASE.code,
  },
  qyWechatOauthLogin: {
    url: prefix + PERMIT_ENDPOINT + "/qy-wechat-oauth-login",
    method: MethodType.GET.code,
    header: HeaderType.BASE.code,
  },
  casLogin: {
    url: prefix + PERMIT_ENDPOINT + "/casLogin",
    method: MethodType.POST.code,
    header: HeaderType.BASE.code,
  },
  logout: {
    url: prefix + PERMIT_ENDPOINT + "/logout",
    method: MethodType.GET.code,
    header: HeaderType.BASE.code,
  },
  refreshToken: {
    url: prefix + PERMIT_ENDPOINT + "/refresh_token",
    method: MethodType.PUT.code,
    header: HeaderType.BASE.code,
  },
  syncUserCache: {
    url: prefix + "/sync-user-cache",
    method: MethodType.POST.code,
    header: HeaderType.AUTH.code,
  },
  updateOnlyUser: {
    url: prefix + "/update-only-user",
    method: MethodType.PUT.code,
    header: HeaderType.AUTH.code,
  },
};
export default sysUserInfoApi;
