Added angular frontend #70

This commit is contained in:
2022-10-16 00:13:03 +02:00
parent ee49bde961
commit 8c3cd1fae7
151 changed files with 29104 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import { AuthUserDTO } from "./auth-user.dto";
export interface AdminUpdateUserDTO {
authUserDTO: AuthUserDTO;
newAuthUserDTO: AuthUserDTO;
changePassword: boolean;
}

View File

@@ -0,0 +1,7 @@
export enum AuthErrorMessages {
UserIsEmpty = "User is empty",
UserNotFound = "User not found",
WrongPassword = "Wrong password",
UserAlreadyExists = "User already exists",
EMailNotConfirmed = "E-Mail not confirmed"
}

View File

@@ -0,0 +1,4 @@
export enum AuthRoles {
Normal = 0,
Admin = 1
}

View File

@@ -0,0 +1,12 @@
export class AuthUserAtrErrors {
firstName: AuthUserAtrErrorType = new AuthUserAtrErrorType();
lastName: AuthUserAtrErrorType = new AuthUserAtrErrorType();
email: AuthUserAtrErrorType = new AuthUserAtrErrorType();
password: AuthUserAtrErrorType = new AuthUserAtrErrorType();
}
export class AuthUserAtrErrorType {
wrongData: boolean = false;
required: boolean = false;
notConfirmed: boolean = false;
}

View File

@@ -0,0 +1,11 @@
import { AuthRoles } from "./auth-roles.enum";
export interface AuthUserDTO {
id?: number;
firstName: string | null;
lastName: string | null;
email: string | null;
password: string | null;
isConfirmed?: boolean
authRole?: AuthRoles;
}

View File

@@ -0,0 +1,3 @@
export interface EMailStringDTO {
email: string;
}

View File

@@ -0,0 +1,4 @@
export enum RegisterErrorMessages {
InvalidEMail = "Invalid E-Mail",
UserAlreadyExists = "User already exists",
}

View File

@@ -0,0 +1,6 @@
import { AuthUserDTO } from "./auth-user.dto";
export interface ResetPasswordDTO {
id: string;
password: string;
}

View File

@@ -0,0 +1,4 @@
export interface TokenDTO {
token: string;
refreshToken: string;
}

View File

@@ -0,0 +1,6 @@
import { AuthUserDTO } from "./auth-user.dto";
export interface UpdateUserDTO {
authUserDTO: AuthUserDTO;
newAuthUserDTO: AuthUserDTO;
}

View File

@@ -0,0 +1,5 @@
export interface ApiVersion {
Major: string;
Minor: string;
Micro: string;
}

View File

@@ -0,0 +1,8 @@
import { SoftwareVersion } from "./software-version";
import { Theme } from '../view/theme';
export interface Appsettings {
ApiURL: string;
WebVersion: SoftwareVersion;
Themes: Theme[];
}

View File

@@ -0,0 +1,16 @@
export interface SettingsDTO {
webVersion: string;
apiVersion: string;
configPath: string;
webBaseURL: string;
apiBaseURL: string;
tokenExpireTime: number;
refreshTokenExpireTime: number;
mailUser: string;
mailPort: number;
mailHost: string;
mailTransceiver: string;
mailTransceiverAddress: string;
}

View File

@@ -0,0 +1,5 @@
export interface SoftwareVersionDTO {
major: string;
minor: string;
micro: string
}

View File

@@ -0,0 +1,19 @@
export class SoftwareVersion {
Major: string;
Minor: string;
Micro: string;
constructor(
major: string,
minor: string,
micro: string
) {
this.Major = major;
this.Minor = minor;
this.Micro = micro;
}
getVersionString(): string {
return `${this.Major}.${this.Minor}.${this.Micro}`;
}
}

View File

@@ -0,0 +1,8 @@
import { ServiceErrorCode } from "./service-error-code.enum";
export class ErrorDTO {
errorCode!: ServiceErrorCode;
message!: string;
}

View File

@@ -0,0 +1,16 @@
export enum ServiceErrorCode {
Unknown = 0,
InvalidDependencies = 1,
InvalidData = 2,
NotFound = 3,
DataAlreadyExists = 4,
UnableToAdd = 5,
UnableToDelete = 6,
InvalidUser = 7,
ConnectionFailed = 8,
Timeout = 9,
MailError = 10
}

View File

@@ -0,0 +1,8 @@
import { SelectCriterion } from "../select-criterion.model";
export interface AuthUserSelectCriterion extends SelectCriterion {
firstName: string | null;
lastName: string | null;
email: string | null;
authRole?: number | null;
}

View File

@@ -0,0 +1,6 @@
import { AuthUserDTO } from "../../auth/auth-user.dto";
export interface GetFilteredAuthUsersResultDTO {
users: AuthUserDTO[];
totalCount: number;
}

View File

@@ -0,0 +1,8 @@
import { SelectCriterion } from "../select-criterion.model";
export interface LoginSelectCriterion extends SelectCriterion {
timeFrom: string;
timeTo: string;
userName: string;
hostName: string;
}

View File

@@ -0,0 +1,6 @@
export interface SelectCriterion {
pageIndex: number;
pageSize: number;
sortDirection: string | null;
sortColumn: string | null;
}

View File

@@ -0,0 +1,7 @@
export interface ConfirmationDialog {
key?: string;
header: string;
message: string;
accept?: () => void;
reject?: () => void;
}

View File

@@ -0,0 +1,5 @@
export interface ToastOptions {
life?: number;
sticky?: boolean;
closable?: boolean;
}

View File

@@ -0,0 +1,4 @@
export interface Theme {
Label: string;
Name: string;
}

View File

@@ -0,0 +1,7 @@
export enum Themes {
Default = "sh-edraft-dark-theme",
DefaultLight = "default-light-theme",
DefaultDark = "default-dark-theme",
ShEdraftLight = "sh-edraft-light-theme",
ShEdraftDark = "sh-edraft-dark-theme",
}