87 lines
1.7 KiB
TypeScript
87 lines
1.7 KiB
TypeScript
// Generated from the backend OpenAPI contract. Do not edit manually.
|
|
export type Permission =
|
|
| 'items.read'
|
|
| 'items.create'
|
|
| 'items.update'
|
|
| 'items.delete'
|
|
| 'users.read'
|
|
| 'users.manage'
|
|
| 'roles.read'
|
|
| 'roles.manage'
|
|
| 'audit.read'
|
|
| 'sessions.readOwn'
|
|
| 'sessions.revokeOwn'
|
|
| 'sessions.manage';
|
|
|
|
export interface ApiErrorBody {
|
|
status: number;
|
|
code: string;
|
|
message: string;
|
|
requestId: string;
|
|
validation?: { field: string; messages: string[] }[];
|
|
}
|
|
|
|
export interface PageDto<T> {
|
|
items: T[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
}
|
|
|
|
export interface UserDto {
|
|
id: string;
|
|
name: string;
|
|
email: string | null;
|
|
active: boolean;
|
|
lastLoginAt: string | null;
|
|
roles: RoleDto[];
|
|
settings: { tablePageSize: number; sidebarExpanded: boolean };
|
|
}
|
|
|
|
export interface RoleDto {
|
|
id: string;
|
|
name: string;
|
|
protected: boolean;
|
|
permissions: { id: Permission; description: string }[];
|
|
users?: UserDto[];
|
|
}
|
|
|
|
export interface ItemDto {
|
|
id: string;
|
|
name: string;
|
|
description: string | null;
|
|
status: 'draft' | 'active' | 'archived';
|
|
version: number;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
deletedAt: string | null;
|
|
}
|
|
|
|
export interface SaveItemDto {
|
|
name: string;
|
|
description?: string;
|
|
status: ItemDto['status'];
|
|
version?: number;
|
|
}
|
|
|
|
export interface SessionDto {
|
|
id: string;
|
|
createdAt: string;
|
|
lastActivityAt: string;
|
|
userAgent: string | null;
|
|
approximateIp: string | null;
|
|
current: boolean;
|
|
revokedAt: string | null;
|
|
}
|
|
|
|
export interface AuditLogDto {
|
|
id: string;
|
|
createdAt: string;
|
|
actorUserId: string | null;
|
|
action: string;
|
|
targetType: string;
|
|
targetId: string;
|
|
metadata: Record<string, string | number | boolean | null> | null;
|
|
requestId: string;
|
|
}
|