import EventEmitter from 'node:events'; import type { KittenRequest, KittenResponse } from './types/index.ts'; /** Represents an active session. Important: since sessions can be deleted during the lifecycle of a server and since you can listen for events on sessions, these need to be cleaned up before a session object is destroyed. As we don’t have destructors in JavaScript, you must call the cleanUp() method manually deleting a session. */ export declare class Session extends EventEmitter { redirectToAfterSignIn: string | undefined; id: string; createdAt: number; authenticated: boolean; constructor({ id, createdAt, authenticated, ...customData }: { id: string; createdAt?: number; authenticated?: boolean; [key: string]: any; }); hasExpired(): boolean; } export default class Sessions { static instance: Sessions | null; /** Singleton accessor. */ static getInstance(): Sessions; constructor(); session(request: KittenRequest, response: KittenResponse): Promise; }