misc_pterodactyl-panel/resources/scripts/api/definitions/user/models.d.ts

34 lines
808 B
TypeScript

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;
publicKey: string;
fingerprint: string;
createdAt: Date;
}
interface ActivityLog extends Model<'actor'> {
batch: UUID | null;
event: string;
ip: string;
isApi: boolean;
description: string | null;
properties: Record<string, string | unknown>;
hasAdditionalMetadata: boolean;
timestamp: Date;
relationships: {
actor: User | null;
};
}