Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.0 KB
Raw Blame
import { createQueryKeys } from '@lukemorales/query-key-factory';

export const channelKeys = createQueryKeys('channel', {
  picture: (channelId: string) => ({ queryKey: [channelId] }),
  withID: (channelID: string) => ({
    queryKey: [channelID],
  }),
  mentions: (channelID: string) => ({
    queryKey: [channelID],
  }),
  attachments: (channelID: string, attachmentType?: string) => ({
    queryKey: attachmentType ? [channelID, { attachmentType }] : [channelID],
  }),
  participants: (channelID: string) => ({
    queryKey: [channelID],
  }),
  myAccessRequest: (channelID: string) => ({
    queryKey: [channelID],
  }),
  accessRequest: (channelID: string, requestID: string) => ({
    queryKey: [channelID, requestID],
  }),
  channelBots: (channelID: string) => ({
    queryKey: [channelID],
  }),
  activity: null,
  listChannels: {
    queryKey: null,
    contextQueries: {
      account: (actorId?: string) => [actorId ?? 'signed-out'],
    },
  },
  quickAccessGraphql: (cacheClientId: string) => ({
    queryKey: [cacheClientId],
  }),
});