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.

888 B
Raw Blame
import { createQueryKeys } from '@lukemorales/query-key-factory';
import type { EntityType } from '../../service-clients/service-properties/generated/schemas/entityType';
import type { PropertyScope } from '../../service-clients/service-properties/generated/schemas/propertyScope';

export const propertiesKeys = createQueryKeys('properties', {
  all: null,
  tags: null,
  entity: (params: { entityType: EntityType; entityId: string }) => ({
    queryKey: ['entity', params.entityType, params.entityId],
  }),
  options: (params: { propertyDefinitionId: string }) => ({
    queryKey: ['options', params.propertyDefinitionId],
  }),
  definitions: (params: {
    scope: PropertyScope;
    includeOptions: boolean;
    forEntityType?: EntityType;
  }) => ({
    queryKey: [
      'definitions',
      params.scope,
      params.includeOptions,
      params.forEntityType,
    ],
  }),
});