SurfSense/surfsense_web/lib/query-client/cache-keys.ts

18 lines
594 B
TypeScript
Raw Normal View History

2025-11-18 22:12:47 +02:00
import type { GetChatsRequest } from "@/contracts/types/chat.types";
2025-11-19 08:29:33 +02:00
import type { GetPodcastsRequest } from "@/contracts/types/podcast.types";
2025-11-18 22:12:47 +02:00
2025-11-11 04:02:04 +02:00
export const cacheKeys = {
2025-11-18 22:12:47 +02:00
chats: {
activeChat: (chatId: string) => ["active-chat", chatId] as const,
globalQueryParams: (queries: GetChatsRequest["queryParams"]) =>
["chats", ...(queries ? Object.values(queries) : [])] as const,
2025-11-12 13:27:15 +02:00
},
2025-11-19 08:29:33 +02:00
podcasts: {
globalQueryParams: (queries: GetPodcastsRequest["queryParams"]) =>
["podcasts", ...(queries ? Object.values(queries) : [])] as const,
},
2025-11-15 02:07:20 +02:00
auth: {
user: ["auth", "user"] as const,
},
2025-11-11 04:02:04 +02:00
};