2022-05-29 20:34:48 -04: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 15:13:52 -04:00
|
|
|
can(permission: SubuserPermission): boolean;
|
2022-05-29 20:34:48 -04:00
|
|
|
}
|
2022-05-14 17:31:53 -04:00
|
|
|
|
|
|
|
interface SSHKey extends Model {
|
|
|
|
name: string;
|
|
|
|
publicKey: string;
|
|
|
|
fingerprint: string;
|
|
|
|
createdAt: Date;
|
|
|
|
}
|
2022-05-29 20:34:48 -04:00
|
|
|
|
|
|
|
interface ActivityLog extends Model<'actor'> {
|
2022-07-10 14:53:29 -04:00
|
|
|
id: string;
|
2022-05-29 20:34:48 -04:00
|
|
|
batch: UUID | null;
|
|
|
|
event: string;
|
2022-06-27 20:52:27 -04:00
|
|
|
ip: string | null;
|
2022-06-18 12:52:26 -04:00
|
|
|
isApi: boolean;
|
2022-05-29 20:34:48 -04:00
|
|
|
description: string | null;
|
|
|
|
properties: Record<string, string | unknown>;
|
2022-06-12 15:30:49 -04:00
|
|
|
hasAdditionalMetadata: boolean;
|
2022-05-29 20:34:48 -04:00
|
|
|
timestamp: Date;
|
|
|
|
relationships: {
|
|
|
|
actor: User | null;
|
2022-06-26 15:13:52 -04:00
|
|
|
};
|
2022-05-29 20:34:48 -04:00
|
|
|
}
|