export interface SessionAffinityIdentity { deployment: string; webId: string; conversationId: string; provider: string; } export interface SessionAffinityEntry extends SessionAffinityIdentity { credentialId: string; expiresAt?: Date; } export interface CredentialCooldownIdentity { deployment: string; webId: string; credentialId: string; } export interface SessionAffinityStore { affinityKey(input: SessionAffinityIdentity): string; cooldownKey(input: CredentialCooldownIdentity): string; get(input: SessionAffinityIdentity): Promise; set(input: SessionAffinityEntry): Promise; delete(input: SessionAffinityIdentity): Promise; getCooldown(input: CredentialCooldownIdentity): Promise; setCooldown(input: CredentialCooldownIdentity & { until: Date; }): Promise; } export interface SessionAffinityKeyDeriver { hashWebId(webId: string): string; hashConversationId(conversationId: string): string; hashCredentialId(credentialId: string): string; } export interface HmacSessionAffinityKeyDeriverOptions { secret: string | Uint8Array; } export declare class HmacSessionAffinityKeyDeriver implements SessionAffinityKeyDeriver { private readonly secret; constructor(options: HmacSessionAffinityKeyDeriverOptions); hashWebId(webId: string): string; hashConversationId(conversationId: string): string; hashCredentialId(credentialId: string): string; private hmac; } export declare function createSessionAffinityKeyDeriver(input: { secret?: string | Uint8Array; keyDeriver?: SessionAffinityKeyDeriver; }): SessionAffinityKeyDeriver; export declare function affinityStorageKey(input: SessionAffinityIdentity, keyDeriver: SessionAffinityKeyDeriver): string; export declare function cooldownStorageKey(input: CredentialCooldownIdentity, keyDeriver: SessionAffinityKeyDeriver): string; export declare function isExpired(date: Date | undefined, now: Date): boolean;