"use strict";
/**
 * Cache invalidation helpers
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.remove = exports.invalidate = void 0;
const query_keys_1 = require("./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);
 * ```
 */
exports.invalidate = {
    /** Invalidate platformConfig queries */ platformConfig: {
        /** Invalidate all platformConfig queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformConfigKeys.all,
        }),
        /** Invalidate platformConfig list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformConfigKeys.lists(),
        }),
        /** Invalidate a specific platformConfig */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformConfigKeys.detail(id),
        }),
    },
    /** Invalidate config queries */ config: {
        /** Invalidate all config queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.configKeys.all,
        }),
        /** Invalidate config list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.configKeys.lists(),
        }),
        /** Invalidate a specific config */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.configKeys.detail(id),
        }),
    },
    /** Invalidate platformInternalSecret queries */ platformInternalSecret: {
        /** Invalidate all platformInternalSecret queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInternalSecretKeys.all,
        }),
        /** Invalidate platformInternalSecret list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInternalSecretKeys.lists(),
        }),
        /** Invalidate a specific platformInternalSecret */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInternalSecretKeys.detail(id),
        }),
    },
    /** Invalidate platformSecret queries */ platformSecret: {
        /** Invalidate all platformSecret queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformSecretKeys.all,
        }),
        /** Invalidate platformSecret list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformSecretKeys.lists(),
        }),
        /** Invalidate a specific platformSecret */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformSecretKeys.detail(id),
        }),
    },
    /** Invalidate secret queries */ secret: {
        /** Invalidate all secret queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.secretKeys.all,
        }),
        /** Invalidate secret list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.secretKeys.lists(),
        }),
        /** Invalidate a specific secret */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.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).
 */
exports.remove = {
    /** Remove platformConfig from cache */ platformConfig: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformConfigKeys.detail(id),
        });
    },
    /** Remove config from cache */ config: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.configKeys.detail(id),
        });
    },
    /** Remove platformInternalSecret from cache */ platformInternalSecret: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformInternalSecretKeys.detail(id),
        });
    },
    /** Remove platformSecret from cache */ platformSecret: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformSecretKeys.detail(id),
        });
    },
    /** Remove secret from cache */ secret: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.secretKeys.detail(id),
        });
    },
};
