new services + new scripts

This commit is contained in:
2022-10-14 18:49:09 +02:00
parent 8866784d49
commit 5538a042df
23 changed files with 200 additions and 126 deletions

View File

@ -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'>>;