import { PrismaService } from "../../../core/database/prisma/prisma.service";
export type ActorRole = 'OWNER' | 'ADMIN' | 'SYSTEM';
export type EventOutcome = 'OK' | 'FAIL';
export declare const EventType: {
    readonly TOKEN_ISSUED: "token.issued";
    readonly TOKEN_REGENERATED: "token.regenerated";
    readonly TOKEN_REVOKED: "token.revoked";
    readonly TOKEN_EXPIRED: "token.expired";
    readonly TOKEN_DISABLED: "token.disabled";
    readonly APP_CREATED: "app.created";
    readonly APP_DESTROYED: "app.destroyed";
    readonly APP_RECOVERED: "app.recovered";
    readonly APP_PURGED: "app.purged";
    readonly APP_DEPLOY_STARTED: "app.deploy_started";
    readonly APP_DEPLOY_SUCCEEDED: "app.deploy_succeeded";
    readonly APP_DEPLOY_FAILED: "app.deploy_failed";
    readonly APP_ENV_SET: "app.env_set";
    readonly APP_ENV_UNSET: "app.env_unset";
    readonly APP_DISABLED_BY_ADMIN: "app.disabled_by_admin";
    readonly APP_FORCE_DESTROYED_BY_ADMIN: "app.force_destroyed_by_admin";
};
export type EventTypeValue = (typeof EventType)[keyof typeof EventType];
export interface EmitEventParams {
    eventType: EventTypeValue | string;
    actorRole: ActorRole;
    organizationId: string;
    appId?: string | null;
    employeeSlug?: string | null;
    actorId?: string | null;
    outcome?: EventOutcome;
    errorCode?: string | null;
    durationMs?: number | null;
    payload?: Record<string, unknown>;
    requestId?: string | null;
    ipAddr?: string | null;
    userAgent?: string | null;
}
export interface ListEventsFilter {
    organizationId: string;
    appId?: string;
    employeeSlug?: string;
    actorRole?: ActorRole;
    eventTypes?: string[];
    outcome?: EventOutcome;
    from?: Date;
    to?: Date;
    page?: number;
    pageSize?: number;
}
export interface EventListItem {
    id: string;
    appId: string | null;
    appSlug: string | null;
    employeeSlug: string | null;
    actorId: string | null;
    actorEmail: string | null;
    actorRole: ActorRole;
    eventType: string;
    outcome: EventOutcome;
    errorCode: string | null;
    durationMs: number | null;
    payload: Record<string, unknown>;
    ipAddr: string | null;
    createdAt: Date;
}
export declare class InternalAppEventsService {
    private readonly prisma;
    private readonly logger;
    constructor(prisma: PrismaService);
    emit(params: EmitEventParams): Promise<void>;
    list(filter: ListEventsFilter): Promise<{
        items: EventListItem[];
        total: number;
        page: number;
        pageSize: number;
    }>;
    private sanitizePayload;
}
