Add support for returning transforming activity logs on the front-end

This commit is contained in:
DaneEveritt 2022-05-29 20:34:48 -04:00
parent e15985ea39
commit a5521ecb79
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 162 additions and 6 deletions

View file

@ -1,4 +1,16 @@
import { Model } from '@/api/definitions';
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;
}
interface SSHKey extends Model {
name: string;
@ -6,3 +18,15 @@ interface SSHKey extends Model {
fingerprint: string;
createdAt: Date;
}
interface ActivityLog extends Model<'actor'> {
batch: UUID | null;
event: string;
ip: string;
description: string | null;
properties: Record<string, string | unknown>;
timestamp: Date;
relationships: {
actor: User | null;
}
}