2021-04-14 16:52:15 +00:00
|
|
|
import PropTypes from "prop-types";
|
|
|
|
import teamInterface, { ITeam } from "./team";
|
2016-10-21 23:13:41 +00:00
|
|
|
|
|
|
|
export default PropTypes.shape({
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at: PropTypes.string,
|
|
|
|
updated_at: PropTypes.string,
|
|
|
|
id: PropTypes.number,
|
|
|
|
name: PropTypes.string,
|
2016-10-21 23:13:41 +00:00
|
|
|
email: PropTypes.string,
|
|
|
|
force_password_reset: PropTypes.bool,
|
2021-04-29 13:47:33 +00:00
|
|
|
gravatar_url: PropTypes.string,
|
|
|
|
sso_enabled: PropTypes.bool,
|
2021-08-16 14:30:19 +00:00
|
|
|
global_role: PropTypes.string,
|
|
|
|
api_only: PropTypes.bool,
|
2021-04-09 10:44:57 +00:00
|
|
|
teams: PropTypes.arrayOf(teamInterface),
|
2016-10-21 23:13:41 +00:00
|
|
|
});
|
2021-03-24 13:18:56 +00:00
|
|
|
|
|
|
|
export interface IUser {
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at?: string;
|
|
|
|
updated_at?: string;
|
|
|
|
id: number;
|
|
|
|
name: string;
|
2021-04-14 16:52:15 +00:00
|
|
|
email: string;
|
|
|
|
force_password_reset: boolean;
|
2021-04-29 13:47:33 +00:00
|
|
|
gravatar_url: string;
|
|
|
|
sso_enabled: boolean;
|
2021-08-16 14:30:19 +00:00
|
|
|
global_role: string | null;
|
|
|
|
api_only: boolean;
|
2021-04-09 10:44:57 +00:00
|
|
|
teams: ITeam[];
|
2021-04-29 13:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The shape of the request body when updating a user.
|
|
|
|
*/
|
|
|
|
export interface IUserUpdateBody {
|
|
|
|
global_role?: string | null;
|
|
|
|
teams?: ITeam[];
|
|
|
|
name?: string;
|
|
|
|
email?: string;
|
|
|
|
sso_enabled?: boolean;
|
2021-03-24 13:18:56 +00:00
|
|
|
}
|