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.

901 B
Raw Blame
import { createQueryKeys } from '@lukemorales/query-key-factory';
import type { GroupByField } from './grouped/types';
import type { SoupAstItemsQueryArgs, SoupItemsQueryArgs } from './items';
import type { SearchSoupQueryArgs } from './search';

export const soupKeys = createQueryKeys('soup', {
  crmPeople: (teamId: string) => [teamId],
  items: (args: SoupItemsQueryArgs) => ({
    queryKey: [args.params, args.body],
  }),
  astItems: (args: SoupAstItemsQueryArgs) => ({
    queryKey: [args.params, args.body, args.groupBy, args.transport],
  }),
  search: (args: SearchSoupQueryArgs) => ({
    queryKey: [args.params, args.body],
  }),
  groupedGroup: (args: {
    params: SoupAstItemsQueryArgs['params'];
    body: SoupAstItemsQueryArgs['body'];
    groupBy: GroupByField;
    groupKey: string;
  }) => ({
    queryKey: ['group', args.groupKey, args.groupBy, args.params, args.body],
  }),
});