new services + new scripts
This commit is contained in:
@ -1,11 +1,19 @@
|
||||
import { EntityInfo } from './entity';
|
||||
import { Hash } from 'crypto';
|
||||
|
||||
export type UserInfo = {
|
||||
uuid: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type UserInfoWithPassword = {
|
||||
password: Hash;
|
||||
} & UserInfo;
|
||||
|
||||
export type User = UserInfo & EntityInfo;
|
||||
|
||||
export type UserWithPassword = UserInfoWithPassword & EntityInfo;
|
||||
|
||||
export type CreateUserBody = {
|
||||
name: string;
|
||||
password: string;
|
||||
@ -14,3 +22,7 @@ export type CreateUserBody = {
|
||||
export type LoginUserBody = CreateUserBody;
|
||||
|
||||
export type UserCtor = Partial<User>;
|
||||
|
||||
export type UserWithPasswordCtor = {
|
||||
password: string;
|
||||
} & Partial<Omit<UserWithPassword, 'password'>>;
|
||||
|
Reference in New Issue
Block a user