2022-05-30 00:34:48 +00:00
|
|
|
import { Model, UUID } from '@/api/definitions';
|
|
|
|
import { SubuserPermission } from '@/state/server/subusers';
|
|
|
|
|
|
|
|
interface User extends Model {
|
|
|
|
uuid: string;
|
|
|
|
username: string;
|
|
|
|
email: string;
|
|
|
|
image: string;
|
|
|
|
twoFactorEnabled: boolean;
|
|
|
|
createdAt: Date;
|
|
|
|
permissions: SubuserPermission[];
|
|
|
|
can (permission: SubuserPermission): boolean;
|
|
|
|
}
|
2022-05-14 21:31:53 +00:00
|
|
|
|
|
|
|
interface SSHKey extends Model {
|
|
|
|
name: string;
|
|
|
|
publicKey: string;
|
|
|
|
fingerprint: string;
|
|
|
|
createdAt: Date;
|
|
|
|
}
|
2022-05-30 00:34:48 +00:00
|
|
|
|
|
|
|
interface ActivityLog extends Model<'actor'> {
|
|
|
|
batch: UUID | null;
|
|
|
|
event: string;
|
|
|
|
ip: string;
|
|
|
|
description: string | null;
|
|
|
|
properties: Record<string, string | unknown>;
|
2022-06-12 19:30:49 +00:00
|
|
|
hasAdditionalMetadata: boolean;
|
2022-05-30 00:34:48 +00:00
|
|
|
timestamp: Date;
|
|
|
|
relationships: {
|
|
|
|
actor: User | null;
|
|
|
|
}
|
|
|
|
}
|