/**
 * Cache invalidation helpers
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { agentPlanKeys, agentKeys, agentThreadKeys, agentMessageKeys, agentTaskKeys, agentPromptKeys, agentResourceChunkKeys, agentPersonaKeys, agentResourceKeys, } from './query-keys';
/**
// ============================================================================
// Invalidation Helpers
// ============================================================================

 * Type-safe query invalidation helpers
 *
 * @example
 * ```ts
 * // Invalidate all user queries
 * invalidate.user.all(queryClient);
 *
 * // Invalidate user lists
 * invalidate.user.lists(queryClient);
 *
 * // Invalidate specific user
 * invalidate.user.detail(queryClient, userId);
 * ```
 */
export const invalidate = {
    /** Invalidate agentPlan queries */ agentPlan: {
        /** Invalidate all agentPlan queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentPlanKeys.all,
        }),
        /** Invalidate agentPlan list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentPlanKeys.lists(),
        }),
        /** Invalidate a specific agentPlan */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentPlanKeys.detail(id),
        }),
    },
    /** Invalidate agent queries */ agent: {
        /** Invalidate all agent queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentKeys.all,
        }),
        /** Invalidate agent list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentKeys.lists(),
        }),
        /** Invalidate a specific agent */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentKeys.detail(id),
        }),
    },
    /** Invalidate agentThread queries */ agentThread: {
        /** Invalidate all agentThread queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentThreadKeys.all,
        }),
        /** Invalidate agentThread list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentThreadKeys.lists(),
        }),
        /** Invalidate a specific agentThread */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentThreadKeys.detail(id),
        }),
    },
    /** Invalidate agentMessage queries */ agentMessage: {
        /** Invalidate all agentMessage queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentMessageKeys.all,
        }),
        /** Invalidate agentMessage list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentMessageKeys.lists(),
        }),
        /** Invalidate a specific agentMessage */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentMessageKeys.detail(id),
        }),
    },
    /** Invalidate agentTask queries */ agentTask: {
        /** Invalidate all agentTask queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentTaskKeys.all,
        }),
        /** Invalidate agentTask list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentTaskKeys.lists(),
        }),
        /** Invalidate a specific agentTask */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentTaskKeys.detail(id),
        }),
    },
    /** Invalidate agentPrompt queries */ agentPrompt: {
        /** Invalidate all agentPrompt queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentPromptKeys.all,
        }),
        /** Invalidate agentPrompt list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentPromptKeys.lists(),
        }),
        /** Invalidate a specific agentPrompt */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentPromptKeys.detail(id),
        }),
    },
    /** Invalidate agentResourceChunk queries */ agentResourceChunk: {
        /** Invalidate all agentResourceChunk queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentResourceChunkKeys.all,
        }),
        /** Invalidate agentResourceChunk list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentResourceChunkKeys.lists(),
        }),
        /** Invalidate a specific agentResourceChunk */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentResourceChunkKeys.detail(id),
        }),
    },
    /** Invalidate agentPersona queries */ agentPersona: {
        /** Invalidate all agentPersona queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentPersonaKeys.all,
        }),
        /** Invalidate agentPersona list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentPersonaKeys.lists(),
        }),
        /** Invalidate a specific agentPersona */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentPersonaKeys.detail(id),
        }),
    },
    /** Invalidate agentResource queries */ agentResource: {
        /** Invalidate all agentResource queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentResourceKeys.all,
        }),
        /** Invalidate agentResource list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: agentResourceKeys.lists(),
        }),
        /** Invalidate a specific agentResource */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: agentResourceKeys.detail(id),
        }),
    },
};
/**

// ============================================================================
// Remove Helpers (for delete operations)
// ============================================================================

 * Remove queries from cache (for delete operations)
 *
 * Use these when an entity is deleted to remove it from cache
 * instead of just invalidating (which would trigger a refetch).
 */
export const remove = {
    /** Remove agentPlan from cache */ agentPlan: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentPlanKeys.detail(id),
        });
    },
    /** Remove agent from cache */ agent: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentKeys.detail(id),
        });
    },
    /** Remove agentThread from cache */ agentThread: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentThreadKeys.detail(id),
        });
    },
    /** Remove agentMessage from cache */ agentMessage: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentMessageKeys.detail(id),
        });
    },
    /** Remove agentTask from cache */ agentTask: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentTaskKeys.detail(id),
        });
    },
    /** Remove agentPrompt from cache */ agentPrompt: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentPromptKeys.detail(id),
        });
    },
    /** Remove agentResourceChunk from cache */ agentResourceChunk: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentResourceChunkKeys.detail(id),
        });
    },
    /** Remove agentPersona from cache */ agentPersona: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentPersonaKeys.detail(id),
        });
    },
    /** Remove agentResource from cache */ agentResource: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: agentResourceKeys.detail(id),
        });
    },
};
