/**
 * Cache invalidation helpers
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { platformConfigKeys, configKeys, platformInternalSecretKeys, platformSecretKeys, secretKeys, } 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 platformConfig queries */ platformConfig: {
        /** Invalidate all platformConfig queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: platformConfigKeys.all,
        }),
        /** Invalidate platformConfig list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: platformConfigKeys.lists(),
        }),
        /** Invalidate a specific platformConfig */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: platformConfigKeys.detail(id),
        }),
    },
    /** Invalidate config queries */ config: {
        /** Invalidate all config queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: configKeys.all,
        }),
        /** Invalidate config list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: configKeys.lists(),
        }),
        /** Invalidate a specific config */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: configKeys.detail(id),
        }),
    },
    /** Invalidate platformInternalSecret queries */ platformInternalSecret: {
        /** Invalidate all platformInternalSecret queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: platformInternalSecretKeys.all,
        }),
        /** Invalidate platformInternalSecret list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: platformInternalSecretKeys.lists(),
        }),
        /** Invalidate a specific platformInternalSecret */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: platformInternalSecretKeys.detail(id),
        }),
    },
    /** Invalidate platformSecret queries */ platformSecret: {
        /** Invalidate all platformSecret queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: platformSecretKeys.all,
        }),
        /** Invalidate platformSecret list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: platformSecretKeys.lists(),
        }),
        /** Invalidate a specific platformSecret */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: platformSecretKeys.detail(id),
        }),
    },
    /** Invalidate secret queries */ secret: {
        /** Invalidate all secret queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: secretKeys.all,
        }),
        /** Invalidate secret list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: secretKeys.lists(),
        }),
        /** Invalidate a specific secret */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: secretKeys.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 platformConfig from cache */ platformConfig: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: platformConfigKeys.detail(id),
        });
    },
    /** Remove config from cache */ config: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: configKeys.detail(id),
        });
    },
    /** Remove platformInternalSecret from cache */ platformInternalSecret: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: platformInternalSecretKeys.detail(id),
        });
    },
    /** Remove platformSecret from cache */ platformSecret: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: platformSecretKeys.detail(id),
        });
    },
    /** Remove secret from cache */ secret: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: secretKeys.detail(id),
        });
    },
};
