declare namespace Api {
  /**
   * namespace Auth
   *
   * backend api module: "auth"
   */
  namespace Auth {
    interface LoginToken {
      token: string;
      refreshToken: string;
    }

    interface UserInfo {
      userId: string;
      userName: string;
      nickname: string;
      deptId?: string | null;
      roles: string[];
      buttons: string[];
    }

    interface MyProfileDetail {
      userId: string;
      username: string;
      nickname?: string | null;
      deptId?: string | null;
      deptName?: string | null;
      positionId?: string | null;
      positionName?: string | null;
      company?: string | null;
      email?: string | null;
      mobile?: string | null;
      sex?: Api.SystemManage.UserGender | null;
      avatar?: string | null;
      roles: Api.SystemManage.RoleSimple[];
      dept?: Api.SystemManage.DeptSimple | null;
      position?: Api.SystemManage.PostSimple | null;
      loginIp?: string | null;
      loginDate?: string | null;
      createTime?: string | null;
    }

    interface UpdateMyProfileParams {
      nickname?: string | null;
      email?: string | null;
      mobile?: string | null;
      sex?: Api.SystemManage.UserGender | null;
      avatar?: string | null;
    }

    interface UpdateMyPasswordParams {
      oldPassword: string;
      newPassword: string;
    }
  }
}
