Provides React Query hooks for CRM contacts, companies, deals, activities, and pipelines with identity-scoped caching.
// Source: https://github.com/better-stack-ai/better-stack | License: MIT | Copyright 2025 - present, olliethedev
// Provided via justclaw.it.com; keep this notice with the code.
"use client";
import { useIdentity, useIdentitySourceGeneration } from "@btst/stack/context";
import { useQueryClient } from "@tanstack/react-query";
import { useResourceContext } from "@btst/stack/plugins/client/hooks";
import { createCrmQueryKeys } from "../../query-keys";
import { createResource } from "@btst/stack/plugins/client/hooks";
import { crmResources, type CrmListParams } from "../../query-keys";
import { CRM_PLUGIN_ID } from "../constants";
export const crm = createResource({
plugin: CRM_PLUGIN_ID,
resources: crmResources,
});
function useCrmIdentity() {
const { identity, isPending, error } = useId
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key