import { TodoistApi } from '@doist/todoist-sdk'; export type ResolvedUser = { userId: string; displayName: string; email: string; }; export type ProjectCollaborator = { id: string; name: string; email: string; }; /** * A bounded, TTL-aware LRU cache. Expired entries are removed when read and * when space is needed; the least recently used live entry is then evicted. */ export declare class BoundedTtlCache { private readonly maxEntries; private readonly ttl; private readonly entries; constructor(maxEntries: number, ttl: number); get(key: string): T | undefined; set(key: string, result: T): void; clear(): void; get size(): number; private pruneExpiredEntries; } /** Keyword that resolves to the current authenticated user. */ export declare const SELF_USER_KEYWORD: "me"; export declare class UserResolver { /** * Resolve a user name or ID to a user ID by looking up collaborators across all shared projects. * Supports exact name matches, partial matches, email matches, and the "me" keyword. */ resolveUser(client: TodoistApi, nameOrId: string): Promise; /** * Validate that a user is a collaborator on a specific project */ validateProjectCollaborator(client: TodoistApi, projectId: string, userId: string): Promise; /** * Get collaborators for a specific project */ getProjectCollaborators(client: TodoistApi, projectId: string, cacheScope?: string | null): Promise; /** * Get all collaborators from all shared projects, deduplicated by user ID. */ getAllCollaborators(client: TodoistApi, cacheScope?: string | null): Promise; private getCacheScope; private getCacheKey; /** * Clear all caches - useful for testing */ clearCache(): void; } export declare const userResolver: UserResolver; export declare function resolveUserNameToId(client: TodoistApi, nameOrId: string): Promise; /** * Resolve a list of user references — IDs, emails, full names, or the "me" * keyword — to users, in one pass. * * Order of the input is preserved and duplicates are collapsed, so callers can * hand the result straight to an API that expects a recipient list. Every * reference that cannot be resolved is reported in a single error rather than * failing on the first one, so the caller learns about all the bad references * at once. * * @param client - Todoist API client * @param refs - User references to resolve * @returns The resolved users, deduplicated by user ID * @throws Error naming every reference that could not be resolved */ export declare function resolveUserRefs(client: TodoistApi, refs: string[]): Promise; //# sourceMappingURL=user-resolver.d.ts.map