@anoki/fse-common
Version:
Common types for FSE
33 lines (32 loc) • 991 B
TypeScript
import { WithMongooseProps } from './with-mongoose-props';
import { Upload } from './upload-file';
import { GetValues } from '../constants';
export declare const UserRolesEnum: {
readonly ADMIN: "admin";
readonly USER: "user";
};
export declare const UsersApplicationRolesEnum: {
CMS_EDITOR: string;
STRUCTURE_EDITOR: string;
SETTINGS_EDITOR: string;
ADMINISTRATOR: string;
};
export type UserType = GetValues<typeof UserRolesEnum>;
export type UserRoles = GetValues<typeof UserRolesEnum>;
export type UsersApplicationRoles = GetValues<typeof UsersApplicationRolesEnum>;
export type User = WithMongooseProps<{
name: string;
surname: string;
email: string;
password: string;
role: UserType;
profileImage?: Upload;
last_login: string;
applicationRoles: UsersApplicationRoles[];
fiscalCode: string;
sex: string;
pid: string | null;
personId: string;
hasSeenConsent: boolean;
hasAcceptedPrivacyPolicy: boolean;
}>;