// Copyright (c) 2026 Doforu // Copyright (c) 2026 Cloudflare, Inc. // Licensed under the Apache 2.0 license found in the LICENSE-APACHE file or at: // https://opensource.org/licenses/Apache-2.0 // Modifications Copyright (c) 2026 Doforu, distributed under the AGPL-3.0-only (see LICENSE). /** Centralised query key factories for cache invalidation. */ export const queryKeys = { mailboxes: { all: ["mailboxes"] as const, detail: (id: string) => ["mailboxes", id] as const, }, emails: { list: (mailboxId: string, params: Record) => ["emails", mailboxId, params] as const, detail: (mailboxId: string, emailId: string) => ["emails", mailboxId, emailId] as const, thread: (mailboxId: string, threadId: string) => ["emails", mailboxId, "thread", threadId] as const, }, folders: { list: (mailboxId: string) => ["folders", mailboxId] as const, }, search: { results: (mailboxId: string, query: string, page: number) => ["search", mailboxId, query, page] as const, }, domains: { all: ["domains"] as const, }, // Global agent API keys used by external LLM / MCP clients. agentApiKeys: { all: ["agent-api-keys"] as const, }, config: ["config"] as const, };