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[];
|
2022-06-26 19:13:52 +00:00
|
|
|
can(permission: SubuserPermission): boolean;
|
2022-05-30 00:34:48 +00:00
|
|
|
}
|
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;
|
2022-06-28 00:52:27 +00:00
|
|
|
ip: string | null;
|
2022-06-18 16:52:26 +00:00
|
|
|
isApi: boolean;
|
2022-05-30 00:34:48 +00:00
|
|
|
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;
|
2022-06-26 19:13:52 +00:00
|
|
|
};
|
2022-05-30 00:34:48 +00:00
|
|
|
}
|