import { AbstractModel } from "../lib/model/AbstractModel"; import { ModelConfig } from "./adminpanelConfig"; export type EntityType = "form" | "model"; export interface Entity { name: string; config?: ModelConfig; model?: AbstractModel; uri: string; type: EntityType; } export interface AccessRightsToken { name: string; description: string; department: string; id: string; } export interface PropsField { label: string; type: string; name: string; tooltip?: string; value: string | boolean | number | string[]; disabled?: boolean; required?: boolean; isIn?: string[] | number[] | boolean[]; options?: Record | Record[]; relatedModel?: string; canCreateRelated?: boolean; } export interface DiffChanges { field: string; oldValue: any; newValue: any; type: string; } export interface Diff { changes: DiffChanges[]; summary: string; } export interface INotification { id: string; title: string; message: string; createdAt: Date; userId?: number; read?: boolean; icon: { icon: string; iconColor: string; }; notificationClass: string; channel: string | 'created' | 'updated' | 'deleted' | 'system'; metadata?: Record | Diff; } export interface INotificationEvent { type: 'notification' | 'heartbeat' | 'connected' | 'error'; data: INotification | string; notificationClass?: string; channel?: string; userId?: number; } export type AiAssistantRole = 'user' | 'assistant'; export interface AiAssistantMessage { id: string; role: AiAssistantRole; content: string; timestamp: Date; modelId: string; } export interface AiAssistantModelInfo { id: string; name: string; description?: string; } export type Migration = { name: string; timestamp: number; up: (args: { context: any; }) => Promise | unknown; down: (args: { context: any; }) => Promise | unknown; };