add project structure

This commit is contained in:
veselovnk committed 2024-04-04 13:54:22 +03:00
1 parent 07fc6c0b6c
commit 6eaf18285a
28 files changed
+1309 -648

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
export interface MSPError {
details: Array<any>
errorCode: string
errorMessage: string
}
+17
View File
@@ -0,0 +1,17 @@
import { StateProfileStatus } from '../stores/redusers/ProfileSlice.ts'
export type ProfileDataType = {
email: string
firstName: string
lastName: string
role: string
roles: number[]
permissions: string[]
idleTimeoutMs: number
}
export type ProfileType = {
profile: ProfileDataType
status: StateProfileStatus
error: string
}
+38
View File
@@ -0,0 +1,38 @@
export enum RoleKeys {
user = 'user',
admin = 'admin'
}
export enum PermissionKeys {
user_view = 'user_view', // Просмотр списка пользователей
admin_view = 'admin_view' // роль суперадмина, требуется для интерфейса
}
export type ConfigRoles = {
operator: string[]
supervisor: string[]
ontologist: string[]
businessMonitoring: string[]
technicalMonitoring: string[]
administratorIS: string[]
}
export type RoleType = {
changeMessage?: string
createdAt: string
description: string
externalGroup: string
id: number
name: string
permissions: PermissionKeys[]
updatedAt: string
immutable: boolean
exclusive: boolean
}
export type NewRoleType = Omit<RoleType, 'id' | 'createdAt' | 'updatedAt'>
export type PermissionType = {
key: PermissionKeys
name: string
}