---
title: "Utilities"
description: "Shared utilities — query-key factories, cache-invalidation helper, and the generic `useSdkQuery` / `useSdkMutation` escape hatches."
section: "Libraries"
group: "React hooks"
order: 464
---

## Hooks

### `agentKeys` `composite`

Query key factory for agents.

```ts
agentKeys = {
  all: () => ["agents"] as const,
  list: (params?: any) => ["agents", "list", params] as const,
  detail: (id: string) => ["agents", id] as const,
};
```

### `agentVersionKeys` `composite`

Query key factory for agent-versions.

```ts
agentVersionKeys = { all: () => ["agent-versions"] as const, list: (params?: any) => ["agent-versions", "list", params] as const, detail: (id: string) => ["agent-versions", id]...
```

### `apiKeyKeys` `composite`

Query key factory for api-keys.

```ts
apiKeyKeys = {
  all: () => ["api-keys"] as const,
  list: (params?: any) => ["api-keys", "list", params] as const,
  detail: (id: string) => ["api-keys", id] as const,
};
```

### `apiKeyKeys` `composite`

Query key factory for API keys.

```ts
apiKeyKeys = {
  all: () => ["api-keys"] as const,
  list: (params?: any) => ["api-keys", "list", params] as const,
  detail: (id: string) => ["api-keys", id] as const,
};
```

### `apiKeys_` `composite`

Query key factory for apis.

```ts
apiKeys_ = {
  all: () => ["apis"] as const,
  list: (params?: any) => ["apis", "list", params] as const,
  detail: (id: string) => ["apis", id] as const,
};
```

### `appDomainKeys` `composite`

Query key factory for app-domains.

```ts
appDomainKeys = {
  all: () => ["app-domains"] as const,
  list: (params?: any) => ["app-domains", "list", params] as const,
  detail: (id: string) => ["app-domains", id] as const,
};
```

### `appKeys` `composite`

Query key factory for apps.

```ts
appKeys = {
  all: () => ["apps"] as const,
  list: (params?: any) => ["apps", "list", params] as const,
  detail: (id: string) => ["apps", id] as const,
};
```

### `appKeys` `composite`

```ts
appKeys = { ..._appKeysGen, files: (id: string, path?: string) => ["apps", id, "files", path] as const, fileContent: (id: string, path: string) => ["apps", id, "file",...
```

### `appVersionKeys` `composite`

Query key factory for app-versions.

```ts
appVersionKeys = { all: () => ["app-versions"] as const, list: (params?: any) => ["app-versions", "list", params] as const, detail: (id: string) => ["app-versions", id] as co...
```

### `buildKeys` `composite`

Query key factory for builds.

```ts
buildKeys = {
  all: () => ["builds"] as const,
  list: (params?: any) => ["builds", "list", params] as const,
  detail: (id: string) => ["builds", id] as const,
};
```

### `buildKeys` `composite`

Query key factory for builds.

```ts
buildKeys = {
  all: () => ["builds"] as const,
  list: (params?: any) => ["builds", "list", params] as const,
  detail: (id: string) => ["builds", id] as const,
};
```

### `cleanParams` `composite`

Strip `undefined` and `null` values from a params object before passing
to `URLSearchParams` (which would otherwise stringify them as `"undefined"` / `"null"`).

```ts
cleanParams(params?: Record<string, unknown>): Record<string, string>
```

### `cleanupTaskKeys` `composite`

Query key factory for cleanup-tasks.

```ts
cleanupTaskKeys = { all: () => ["cleanup-tasks"] as const, list: (params?: any) => ["cleanup-tasks", "list", params] as const, detail: (id: string) => ["cleanup-tasks", id] as...
```

### `cleanupTaskKeys` `composite`

```ts
cleanupTaskKeys = {
  ..._ctKeysGen,
  tree: (id: string) => ["cleanup-tasks", id, "tree"] as const,
};
```

### `connectorKeys` `composite`

Query key factory for connectors.

```ts
connectorKeys = {
  all: () => ["connectors"] as const,
  list: (params?: any) => ["connectors", "list", params] as const,
  detail: (id: string) => ["connectors", id] as const,
};
```

### `databaseKeys` `composite`

Query key factory for databases.

```ts
databaseKeys = {
  all: () => ["databases"] as const,
  list: (params?: any) => ["databases", "list", params] as const,
  detail: (id: string) => ["databases", id] as const,
};
```

### `databaseKeys` `composite`

```ts
databaseKeys = { ..._databaseKeysGen, tables: (id: string) => ["databases", id, "tables"] as const, tableDetail: (id: string, tableName: string) => ["databases", id, "table...
```

### `deployKeys` `composite`

Query key factory for deploys.

```ts
deployKeys = {
  all: () => ["deploys"] as const,
  list: (params?: any) => ["deploys", "list", params] as const,
  detail: (id: string) => ["deploys", id] as const,
};
```

### `deployKeys` `composite`

Query key factory for deploys.

```ts
deployKeys = {
  all: () => ["deploys"] as const,
  list: (params?: any) => ["deploys", "list", params] as const,
  detail: (id: string) => ["deploys", id] as const,
};
```

### `directoryKeys` `composite`

Query key factory for directories.

```ts
directoryKeys = {
  all: () => ["directories"] as const,
  list: (params?: any) => ["directories", "list", params] as const,
  detail: (id: string) => ["directories", id] as const,
};
```

### `elementKeys` `composite`

Query key factory for elements.

```ts
elementKeys = {
  all: () => ["elements"] as const,
  list: (params?: any) => ["elements", "list", params] as const,
  detail: (id: string) => ["elements", id] as const,
};
```

### `elementKeys` `composite`

Query key factory for elements.

```ts
elementKeys = {
  all: () => ["elements"] as const,
  list: (params?: any) => ["elements", "list", params] as const,
  detail: (id: string) => ["elements", id] as const,
};
```

### `elementVersionKeys` `composite`

Query key factory for element-versions.

```ts
elementVersionKeys = { all: () => ["element-versions"] as const, list: (params?: any) => ["element-versions", "list", params] as const, detail: (id: string) => ["element-versions...
```

### `emailKeys` `composite`

Query key factory for emails.

```ts
emailKeys = {
  all: () => ["emails"] as const,
  list: (params?: any) => ["emails", "list", params] as const,
  detail: (id: string) => ["emails", id] as const,
};
```

### `endpointKeys` `composite`

Query key factory for endpoints.

```ts
endpointKeys = {
  all: () => ["endpoints"] as const,
  list: (params?: any) => ["endpoints", "list", params] as const,
  detail: (id: string) => ["endpoints", id] as const,
};
```

### `ENTITY_TYPE_TO_QUERY_KEY` `composite`

Maps EntityType (camelCase, from detectEntityType) to QUERY_KEYS entries.
Used by useEventStream for automatic cache invalidation.

```ts
ENTITY_TYPE_TO_QUERY_KEY = { user: QUERY_KEYS.users, workspace: QUERY_KEYS.workspaces, workspaceMember: QUERY_KEYS["workspace-members"], organization: QUERY_KEYS.organizations, organiz...
```

### `eventKeys` `composite`

Query key factory for events.

```ts
eventKeys = {
  all: () => ["events"] as const,
  list: (params?: any) => ["events", "list", params] as const,
  detail: (id: string) => ["events", id] as const,
};
```

### `fileKeys` `composite`

Query key factory for files.

```ts
fileKeys = {
  all: () => ["files"] as const,
  list: (params?: any) => ["files", "list", params] as const,
  detail: (id: string) => ["files", id] as const,
};
```

### `functionFileKeys` `composite`

Query key factory for function-files.

```ts
functionFileKeys = { all: () => ["function-files"] as const, list: (params?: any) => ["function-files", "list", params] as const, detail: (id: string) => ["function-files", id]...
```

### `functionKeys` `composite`

Query key factory for functions.

```ts
functionKeys = {
  all: () => ["functions"] as const,
  list: (params?: any) => ["functions", "list", params] as const,
  detail: (id: string) => ["functions", id] as const,
};
```

### `functionVersionKeys` `composite`

Query key factory for function-versions.

```ts
functionVersionKeys = { all: () => ["function-versions"] as const, list: (params?: any) => ["function-versions", "list", params] as const, detail: (id: string) => ["function-versi...
```

### `graphDefinitionKeys` `composite`

Query key factory for graph-definitions.

```ts
graphDefinitionKeys = { all: () => ["graph-definitions"] as const, list: (params?: any) => ["graph-definitions", "list", params] as const, detail: (id: string) => ["graph-definiti...
```

### `graphDefinitionKeys` `composite`

```ts
graphDefinitionKeys = {
  ..._graphDefinitionKeysGen,
  graphs: (id: string, params?: any) =>
    ["graph-definitions", id, "graphs", params] as const,
};
```

### `graphEdgeKeys` `composite`

Query key factory for graph-edges.

```ts
graphEdgeKeys = {
  all: () => ["graph-edges"] as const,
  list: (params?: any) => ["graph-edges", "list", params] as const,
  detail: (id: string) => ["graph-edges", id] as const,
};
```

### `graphKeys` `composite`

Query key factory for graphs.

```ts
graphKeys = {
  all: () => ["graphs"] as const,
  list: (params?: any) => ["graphs", "list", params] as const,
  detail: (id: string) => ["graphs", id] as const,
};
```

### `graphKeys` `composite`

```ts
graphKeys = {
  ..._graphKeysGen,
  data: (id: string) => ["graphs", id, "data"] as const,
};
```

### `graphNodeKeys` `composite`

Query key factory for graph-nodes.

```ts
graphNodeKeys = {
  all: () => ["graph-nodes"] as const,
  list: (params?: any) => ["graph-nodes", "list", params] as const,
  detail: (id: string) => ["graph-nodes", id] as const,
};
```

### `imageKeys` `composite`

Query key factory for images.

```ts
imageKeys = {
  all: () => ["images"] as const,
  list: (params?: any) => ["images", "list", params] as const,
  detail: (id: string) => ["images", id] as const,
};
```

### `integrationInstallKeys` `composite`

Query key factory for integration-installs.

```ts
integrationInstallKeys = { all: () => ["integration-installs"] as const, list: (params?: any) => ["integration-installs", "list", params] as const, detail: (id: string) => ["integrat...
```

### `integrationKeys` `composite`

Query key factory for integrations.

```ts
integrationKeys = { all: () => ["integrations"] as const, list: (params?: any) => ["integrations", "list", params] as const, detail: (id: string) => ["integrations", id] as co...
```

### `integrationVersionKeys` `composite`

Query key factory for integration-versions.

```ts
integrationVersionKeys = { all: () => ["integration-versions"] as const, list: (params?: any) => ["integration-versions", "list", params] as const, detail: (id: string) => ["integrat...
```

### `logKeys` `composite`

Query key factory for logs.

```ts
logKeys = {
  all: () => ["logs"] as const,
  list: (params?: any) => ["logs", "list", params] as const,
  detail: (id: string) => ["logs", id] as const,
};
```

### `mcpServerKeys` `composite`

Query key factory for mcp-servers.

```ts
mcpServerKeys = {
  all: () => ["mcp-servers"] as const,
  list: (params?: any) => ["mcp-servers", "list", params] as const,
  detail: (id: string) => ["mcp-servers", id] as const,
};
```

### `messageKeys` `composite`

Query key factory for messages.

```ts
messageKeys = {
  all: () => ["messages"] as const,
  list: (params?: any) => ["messages", "list", params] as const,
  detail: (id: string) => ["messages", id] as const,
};
```

### `notificationKeys` `composite`

```ts
notificationKeys = {
  ..._notifKeysGen,
  unreadCount: () => ["notifications", "unread-count"] as const,
};
```

### `notificationKeys` `composite`

Query key factory for notifications.

```ts
notificationKeys = { all: () => ["notifications"] as const, list: (params?: any) => ["notifications", "list", params] as const, detail: (id: string) => ["notifications", id] as...
```

### `oauthApplicationKeys` `composite`

Query key factory for oauth-applications.

```ts
oauthApplicationKeys = { all: () => ["oauth-applications"] as const, list: (params?: any) => ["oauth-applications", "list", params] as const, detail: (id: string) => ["oauth-applic...
```

### `OBSERVATIONAL_EVENT_TYPES` `composite`

Observational event types — events that fire for audit, metrics, or
internal signalling and should NOT drive cache invalidation in the
React client. Invalidating on these events creates feedback loops
where a query triggered from the UI fires an event that invalidates
the same query, causing it to refetch, emit again, etc.

Rule: any event where "the set of entity rows" doesn't change goes
here. Lifecycle internals (provision_requested / provision_failed),
failure-reporting events, loop-prevention events (trigger.fired,
workflow.executed — already filtered server-side), and high-volume
audit events (database.query_executed) all qualify.

Note: this list is a safety net, NOT the trigger-source allowlist.
Events here can still be used as trigger sources by the workflow
dispatcher; we're only saying the React client shouldn't refetch
caches when they arrive. See apps/run/src/lib/event-catalog.ts
for the assistant-side tier classification.

```ts
OBSERVATIONAL_EVENT_TYPES = new Set([ // High-volume audit — triggered by every SQL call through executeSql. // Invalidating databaseKeys on each of these creates a runaway loop // when...
```

### `organizationKeys` `composite`

```ts
organizationKeys = {
  ..._orgKeysGen,
  byHandle: (handle: string) => ["organizations", "by-handle", handle] as const,
};
```

### `organizationKeys` `composite`

Query key factory for organizations.

```ts
organizationKeys = { all: () => ["organizations"] as const, list: (params?: any) => ["organizations", "list", params] as const, detail: (id: string) => ["organizations", id] as...
```

### `organizationMemberKeys` `composite`

Query key factory for organization-members.

```ts
organizationMemberKeys = { all: () => ["organization-members"] as const, list: (params?: any) => ["organization-members", "list", params] as const, detail: (id: string) => ["organiza...
```

### `pageKeys` `composite`

```ts
pageKeys = {
  ..._pageKeysGen,
  resolve: (params?: any) => ["pages", "resolve", params] as const,
  tree: (workspaceId: string) => ["pages", "tree", workspaceId] as const,
};
```

### `pageKeys` `composite`

Query key factory for pages.

```ts
pageKeys = {
  all: () => ["pages"] as const,
  list: (params?: any) => ["pages", "list", params] as const,
  detail: (id: string) => ["pages", id] as const,
};
```

### `permissionKeys` `composite`

```ts
permissionKeys = { ..._permKeysGen, /** Effective tier of the caller on a (entityType, entityId) pair. */ effectiveTier: (entityType: string, entityId: string) => ["permissio...
```

### `permissionKeys` `composite`

Query key factory for permissions.

```ts
permissionKeys = {
  all: () => ["permissions"] as const,
  list: (params?: any) => ["permissions", "list", params] as const,
  detail: (id: string) => ["permissions", id] as const,
};
```

### `QUERY_KEYS` `composite`

Flat map of entity name → all() key, for event stream invalidation.

```ts
QUERY_KEYS = { agents: agentKeys.all(), "agent-versions": agentVersionKeys.all(), "function-versions": functionVersionKeys.all(), "function-files": functionFileKeys.all()...
```

### `runKeys` `composite`

Query key factory for runs.

```ts
runKeys = {
  all: () => ["runs"] as const,
  list: (params?: any) => ["runs", "list", params] as const,
  detail: (id: string) => ["runs", id] as const,
};
```

### `scheduleKeys` `composite`

Query key factory for schedules.

```ts
scheduleKeys = {
  all: () => ["schedules"] as const,
  list: (params?: any) => ["schedules", "list", params] as const,
  detail: (id: string) => ["schedules", id] as const,
};
```

### `schemaKeys` `composite`

```ts
schemaKeys = {
  ..._schemaKeysGen,
  fields: (id: string, params?: any) =>
    ["schemas", id, "fields", params] as const,
};
```

### `schemaKeys` `composite`

Query key factory for schemas.

```ts
schemaKeys = {
  all: () => ["schemas"] as const,
  list: (params?: any) => ["schemas", "list", params] as const,
  detail: (id: string) => ["schemas", id] as const,
};
```

### `secretKeys` `composite`

Query key factory for secrets.

```ts
secretKeys = {
  all: () => ["secrets"] as const,
  list: (params?: any) => ["secrets", "list", params] as const,
  detail: (id: string) => ["secrets", id] as const,
};
```

### `skillKeys` `composite`

Query key factory for skills.

```ts
skillKeys = {
  all: () => ["skills"] as const,
  list: (params?: any) => ["skills", "list", params] as const,
  detail: (id: string) => ["skills", id] as const,
};
```

### `solutionKeys` `composite`

Query key factory for solutions.

```ts
solutionKeys = {
  all: () => ["solutions"] as const,
  list: (params?: any) => ["solutions", "list", params] as const,
  detail: (id: string) => ["solutions", id] as const,
};
```

### `solutionMemberKeys` `composite`

Query key factory for solution-members.

```ts
solutionMemberKeys = { all: () => ["solution-members"] as const, list: (params?: any) => ["solution-members", "list", params] as const, detail: (id: string) => ["solution-members...
```

### `specKeys` `composite`

Query key factory for specs.

```ts
specKeys = {
  all: () => ["specs"] as const,
  list: (params?: any) => ["specs", "list", params] as const,
  detail: (id: string) => ["specs", id] as const,
};
```

### `specMemberKeys` `composite`

Query key factory for spec-members.

```ts
specMemberKeys = { all: () => ["spec-members"] as const, list: (params?: any) => ["spec-members", "list", params] as const, detail: (id: string) => ["spec-members", id] as co...
```

### `swarmEdgeKeys` `composite`

Query key factory for swarm-edges.

```ts
swarmEdgeKeys = {
  all: () => ["swarm-edges"] as const,
  list: (params?: any) => ["swarm-edges", "list", params] as const,
  detail: (id: string) => ["swarm-edges", id] as const,
};
```

### `swarmKeys` `composite`

Query key factory for swarms.

```ts
swarmKeys = {
  all: () => ["swarms"] as const,
  list: (params?: any) => ["swarms", "list", params] as const,
  detail: (id: string) => ["swarms", id] as const,
};
```

### `swarmNodeKeys` `composite`

Query key factory for swarm-nodes.

```ts
swarmNodeKeys = {
  all: () => ["swarm-nodes"] as const,
  list: (params?: any) => ["swarm-nodes", "list", params] as const,
  detail: (id: string) => ["swarm-nodes", id] as const,
};
```

### `swarmVersionKeys` `composite`

Query key factory for swarm-versions.

```ts
swarmVersionKeys = { all: () => ["swarm-versions"] as const, list: (params?: any) => ["swarm-versions", "list", params] as const, detail: (id: string) => ["swarm-versions", id]...
```

### `teamKeys` `composite`

Query key factory for teams.

```ts
teamKeys = {
  all: () => ["teams"] as const,
  list: (params?: any) => ["teams", "list", params] as const,
  detail: (id: string) => ["teams", id] as const,
};
```

### `teamMemberKeys` `composite`

Query key factory for team-members.

```ts
teamMemberKeys = { all: () => ["team-members"] as const, list: (params?: any) => ["team-members", "list", params] as const, detail: (id: string) => ["team-members", id] as co...
```

### `threadKeys` `composite`

```ts
threadKeys = {
  ..._threadKeysGen,
  messages: (id: string, params?: any) =>
    ["threads", id, "messages", params] as const,
};
```

### `threadKeys` `composite`

Query key factory for threads.

```ts
threadKeys = {
  all: () => ["threads"] as const,
  list: (params?: any) => ["threads", "list", params] as const,
  detail: (id: string) => ["threads", id] as const,
};
```

### `threadParticipantKeys` `composite`

Query key factory for thread-participants.

```ts
threadParticipantKeys = { all: () => ["thread-participants"] as const, list: (params?: any) => ["thread-participants", "list", params] as const, detail: (id: string) => ["thread-par...
```

### `tokenKeys` `composite`

Query key factory for tokens.

```ts
tokenKeys = {
  all: () => ["tokens"] as const,
  list: (params?: any) => ["tokens", "list", params] as const,
  detail: (id: string) => ["tokens", id] as const,
};
```

### `toolKeys` `composite`

Query key factory for tools.

```ts
toolKeys = {
  all: () => ["tools"] as const,
  list: (params?: any) => ["tools", "list", params] as const,
  detail: (id: string) => ["tools", id] as const,
};
```

### `trashKeys` `composite`

Query key factory for trash.

```ts
trashKeys = {
  all: () => ["trash"] as const,
  list: (params?: any) => ["trash", "list", params] as const,
  detail: (id: string) => ["trash", id] as const,
};
```

### `triggerKeys` `composite`

Query key factory for triggers.

```ts
triggerKeys = {
  all: () => ["triggers"] as const,
  list: (params?: any) => ["triggers", "list", params] as const,
  detail: (id: string) => ["triggers", id] as const,
};
```

### `useCreateApiKey` `mutation`

Create a new API key — returns the plaintext value once.

```ts
useCreateApiKey(options?: MutationOpts<ApiKeyCreated, CreateApiKeyParams>)
```

**Types:** [ApiKeyCreated](/types/api-key-created) · [CreateApiKeyParams](/types/create-api-key-params)

### `useDeleteApiKey` `mutation`

Soft-delete an API key.

```ts
useDeleteApiKey(options?: MutationOpts<SuccessResponse, string>)
```

**Types:** [SuccessResponse](/types/success-response)

### `useInvalidate` `composite`

Invalidate queries by key. Wraps useQueryClient so consumers
don't need to import `@tanstack/react-query` directly.

```ts
useInvalidate();
```

```ts
const invalidate = useInvalidate();
invalidate(agentKeys.all(), functionKeys.all());
```

### `useListApiKeys` `query`

List API keys.

```ts
useListApiKeys(params?: Omit<ListApiKeysParams, | > & { filter?: ApiKeyFilter; orderBy?: ApiKeyOrderBy[]; } & ApiKeyShorthands, options?: QueryOpts<Page<ApiKey>>)
```

**Types:** [ListApiKeysParams](/types/list-api-keys-params) · [ApiKeyFilter](/types/api-key-filter) · [ApiKeyOrderBy](/types/api-key-order-by) · [ApiKeyShorthands](/types/api-key-shorthands) · [Page](/types/page) · [ApiKey](/types/api-key)

### `usePurgeApiKey` `composite`

Permanently delete a soft-deleted API key.

```ts
usePurgeApiKey(options?: MutationOpts<SuccessResponse, PurgeApiKeyParams>)
```

**Types:** [SuccessResponse](/types/success-response) · [PurgeApiKeyParams](/types/purge-api-key-params)

### `useRestoreApiKey` `composite`

Restore a soft-deleted API key.

```ts
useRestoreApiKey(options?: MutationOpts<ApiKey, string>)
```

**Types:** [ApiKey](/types/api-key)

### `useRetrieveApiKey` `query`

Get a single API key by ID.

```ts
useRetrieveApiKey(id: string, options?: QueryOpts<ApiKey>)
```

**Types:** [ApiKey](/types/api-key)

### `userKeys` `composite`

Query key factory for users (admin).

```ts
userKeys = { all: () => ["users"] as const, list: (params?: any) => ["users", "list", params] as const, detail: (id: string) => ["users", id] as const, me: () => ["user...
```

### `useSdkMutation` `composite`

Generic SDK mutation hook for endpoints not covered by specific hooks.

```ts
useSdkMutation<TData = unknown, TVars = void>(fn: (vars: TVars) => Promise<TData>, options?: MutationOpts<TData, TVars>)
```

### `useSdkQuery` `composite`

Generic SDK query hook for endpoints not covered by specific hooks.

```ts
useSdkQuery<TData = unknown>(key: string[], fn: () => Promise<TData>, options?: QueryOpts<TData>)
```

### `useUpdateApiKey` `mutation`

Update an API key's metadata.

```ts
useUpdateApiKey(options?: MutationOpts<ApiKey, UpdateApiKeyParams>)
```

**Types:** [ApiKey](/types/api-key) · [UpdateApiKeyParams](/types/update-api-key-params)

### `videoKeys` `composite`

Query key factory for videos.

```ts
videoKeys = {
  all: () => ["videos"] as const,
  list: (params?: any) => ["videos", "list", params] as const,
  detail: (id: string) => ["videos", id] as const,
};
```

### `webhookCallKeys` `composite`

Query key factory for webhook-calls.

```ts
webhookCallKeys = { all: () => ["webhook-calls"] as const, list: (params?: any) => ["webhook-calls", "list", params] as const, detail: (id: string) => ["webhook-calls", id] as...
```

### `webhookDeliveryAttemptKeys` `composite`

Query key factory for webhook-delivery-attempts.

```ts
webhookDeliveryAttemptKeys = { all: () => ["webhook-delivery-attempts"] as const, list: (params?: any) => ["webhook-delivery-attempts", "list", params] as const, detail: (id: string) => ...
```

### `webhookDeliveryKeys` `composite`

```ts
webhookDeliveryKeys = {
  ..._wdKeysGen,
  attempts: (id: string) => ["webhook-deliveries", id, "attempts"] as const,
};
```

### `webhookDeliveryKeys` `composite`

Query key factory for webhook-deliveries.

```ts
webhookDeliveryKeys = { all: () => ["webhook-deliveries"] as const, list: (params?: any) => ["webhook-deliveries", "list", params] as const, detail: (id: string) => ["webhook-deli...
```

### `webhookEndpointKeys` `composite`

Query key factory for webhook-endpoints.

```ts
webhookEndpointKeys = { all: () => ["webhook-endpoints"] as const, list: (params?: any) => ["webhook-endpoints", "list", params] as const, detail: (id: string) => ["webhook-endpoi...
```

### `webhookSubscriptionKeys` `composite`

Query key factory for webhook-subscriptions.

```ts
webhookSubscriptionKeys = { all: () => ["webhook-subscriptions"] as const, list: (params?: any) => ["webhook-subscriptions", "list", params] as const, detail: (id: string) => ["webhoo...
```

### `withOptimisticUpdate` `composite`

Build optimistic cache update callbacks for detail entity update mutations.

On mutate: cancels in-flight queries for the detail key, snapshots the previous
data, and merges the mutation variables into the cached detail entry.
On error: rolls back to the snapshot.
On settled: invalidates the "all" key so lists refetch.

```ts
withOptimisticUpdate(qc: QueryClient, detailKey: (id: string) => readonly unknown[], allKey: () => readonly unknown[], getId: (vars: any) => string)
```

### `workflowEdgeKeys` `composite`

Query key factory for workflow-edges.

```ts
workflowEdgeKeys = { all: () => ["workflow-edges"] as const, list: (params?: any) => ["workflow-edges", "list", params] as const, detail: (id: string) => ["workflow-edges", id]...
```

### `workflowKeys` `composite`

```ts
workflowKeys = {
  ..._workflowKeysGen,
  run: (workflowId: string, runId: string) =>
    ["workflows", workflowId, "runs", runId] as const,
};
```

### `workflowKeys` `composite`

Query key factory for workflows.

```ts
workflowKeys = {
  all: () => ["workflows"] as const,
  list: (params?: any) => ["workflows", "list", params] as const,
  detail: (id: string) => ["workflows", id] as const,
};
```

### `workflowNodeKeys` `composite`

Query key factory for workflow-nodes.

```ts
workflowNodeKeys = { all: () => ["workflow-nodes"] as const, list: (params?: any) => ["workflow-nodes", "list", params] as const, detail: (id: string) => ["workflow-nodes", id]...
```

### `workspaceKeys` `composite`

```ts
workspaceKeys = { ..._workspaceKeysGen, byHandle: (orgHandle: string, wsHandle: string) => ["workspaces", "by-handle", orgHandle, wsHandle] as const, email: (id: string) => ...
```

### `workspaceKeys` `composite`

Query key factory for workspaces.

```ts
workspaceKeys = {
  all: () => ["workspaces"] as const,
  list: (params?: any) => ["workspaces", "list", params] as const,
  detail: (id: string) => ["workspaces", id] as const,
};
```

### `workspaceMemberKeys` `composite`

Query key factory for workspace-members.

```ts
workspaceMemberKeys = { all: () => ["workspace-members"] as const, list: (params?: any) => ["workspace-members", "list", params] as const, detail: (id: string) => ["workspace-memb...
```
