import AccountManager from "../account"; import User, { UserInfos } from "./user"; export type ActionLogInfos = { event: string; data: object; logged: string; ipAddress: string | null; userAgent: string; user: UserInfos; }; export declare function convertRawToActionLog(accountManager: AccountManager, raw: S): S extends ActionLogInfos[] ? ActionLog[] : ActionLog; export default class ActionLog { constructor(accountManager: AccountManager, infos: ActionLogInfos); /** * The Event that the Action logged * @since 0.2.0 */ event: string; /** * The IP Address that executed this Action * * Will be null if its a Server Action log or an Account Action Log caused by a different User * @since 0.2.1 */ ipAddress: string | null; /** * The User Agent that executed this Action * @since 0.2.1 */ userAgent: string; /** * Additional Data related to the Action * @since 0.2.0 */ data: object; /** * The Date when the Action was logged * @since 0.2.0 */ logged: Date; /** * The User that caused this Action * @since 0.2.0 */ user: User; }