summaryrefslogtreecommitdiff
path: root/apps/web/lib/queries/query-keys.ts
blob: d8931655bfe5e6eb04abeba09180d25ee4364dc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
export const queryKeys = {
  timeline: {
    all: ["timeline"] as const,
    list: (folderIdentifier?: string | null, feedIdentifier?: string | null, unreadOnly?: boolean, prioritiseUnread?: boolean) =>
      ["timeline", { folderIdentifier, feedIdentifier, unreadOnly, prioritiseUnread }] as const,
  },
  savedEntries: {
    all: ["saved-entries"] as const,
  },
  subscriptions: {
    all: ["subscriptions"] as const,
  },
  entryDetail: {
    single: (entryIdentifier: string) =>
      ["entry-detail", entryIdentifier] as const,
  },
  userProfile: {
    all: ["user-profile"] as const,
  },
  mutedKeywords: {
    all: ["muted-keywords"] as const,
  },
  unreadCounts: {
    all: ["unread-counts"] as const,
  },
  entrySearch: {
    query: (searchQuery: string) => ["entry-search", searchQuery] as const,
  },
  entryShare: {
    single: (entryIdentifier: string) =>
      ["entry-share", entryIdentifier] as const,
  },
  entryState: {
    single: (entryIdentifier: string) =>
      ["entry-state", entryIdentifier] as const,
  },
  highlights: {
    forEntry: (entryIdentifier: string) =>
      ["highlights", entryIdentifier] as const,
    all: ["highlights"] as const,
  },
  customFeeds: {
    all: ["custom-feeds"] as const,
    timeline: (customFeedIdentifier: string) =>
      ["custom-feed-timeline", customFeedIdentifier] as const,
  },
}