"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 dbPreset queries */ dbPreset: {
        /** Invalidate all dbPreset queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.dbPresetKeys.all,
        }),
        /** Invalidate dbPreset list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.dbPresetKeys.lists(),
        }),
        /** Invalidate a specific dbPreset */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.dbPresetKeys.detail(id),
        }),
    },
    /** Invalidate namespace queries */ namespace: {
        /** Invalidate all namespace queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.namespaceKeys.all,
        }),
        /** Invalidate namespace list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.namespaceKeys.lists(),
        }),
        /** Invalidate a specific namespace */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.namespaceKeys.detail(id),
        }),
    },
    /** Invalidate namespaceEvent queries */ namespaceEvent: {
        /** Invalidate all namespaceEvent queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.namespaceEventKeys.all,
        }),
        /** Invalidate namespaceEvent list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.namespaceEventKeys.lists(),
        }),
        /** Invalidate a specific namespaceEvent */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.namespaceEventKeys.detail(id),
        }),
    },
    /** Invalidate platformInfraCommit queries */ platformInfraCommit: {
        /** Invalidate all platformInfraCommit queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraCommitKeys.all,
        }),
        /** Invalidate platformInfraCommit list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraCommitKeys.lists(),
        }),
        /** Invalidate a specific platformInfraCommit */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraCommitKeys.detail(id),
        }),
    },
    /** Invalidate platformInfraGetAllTreeNodesRecord queries */ platformInfraGetAllTreeNodesRecord: {
        /** Invalidate all platformInfraGetAllTreeNodesRecord queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraGetAllTreeNodesRecordKeys.all,
        }),
        /** Invalidate platformInfraGetAllTreeNodesRecord list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraGetAllTreeNodesRecordKeys.lists(),
        }),
        /** Invalidate a specific platformInfraGetAllTreeNodesRecord */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraGetAllTreeNodesRecordKeys.detail(id),
        }),
    },
    /** Invalidate platformInfraObject queries */ platformInfraObject: {
        /** Invalidate all platformInfraObject queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraObjectKeys.all,
        }),
        /** Invalidate platformInfraObject list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraObjectKeys.lists(),
        }),
        /** Invalidate a specific platformInfraObject */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraObjectKeys.detail(id),
        }),
    },
    /** Invalidate platformInfraRef queries */ platformInfraRef: {
        /** Invalidate all platformInfraRef queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraRefKeys.all,
        }),
        /** Invalidate platformInfraRef list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraRefKeys.lists(),
        }),
        /** Invalidate a specific platformInfraRef */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraRefKeys.detail(id),
        }),
    },
    /** Invalidate platformInfraStore queries */ platformInfraStore: {
        /** Invalidate all platformInfraStore queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraStoreKeys.all,
        }),
        /** Invalidate platformInfraStore list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraStoreKeys.lists(),
        }),
        /** Invalidate a specific platformInfraStore */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformInfraStoreKeys.detail(id),
        }),
    },
    /** Invalidate platformNamespace queries */ platformNamespace: {
        /** Invalidate all platformNamespace queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformNamespaceKeys.all,
        }),
        /** Invalidate platformNamespace list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformNamespaceKeys.lists(),
        }),
        /** Invalidate a specific platformNamespace */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformNamespaceKeys.detail(id),
        }),
    },
    /** Invalidate platformNamespaceEvent queries */ platformNamespaceEvent: {
        /** Invalidate all platformNamespaceEvent queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformNamespaceEventKeys.all,
        }),
        /** Invalidate platformNamespaceEvent list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformNamespaceEventKeys.lists(),
        }),
        /** Invalidate a specific platformNamespaceEvent */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.platformNamespaceEventKeys.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 dbPreset from cache */ dbPreset: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.dbPresetKeys.detail(id),
        });
    },
    /** Remove namespace from cache */ namespace: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.namespaceKeys.detail(id),
        });
    },
    /** Remove namespaceEvent from cache */ namespaceEvent: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.namespaceEventKeys.detail(id),
        });
    },
    /** Remove platformInfraCommit from cache */ platformInfraCommit: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformInfraCommitKeys.detail(id),
        });
    },
    /** Remove platformInfraGetAllTreeNodesRecord from cache */ platformInfraGetAllTreeNodesRecord: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformInfraGetAllTreeNodesRecordKeys.detail(id),
        });
    },
    /** Remove platformInfraObject from cache */ platformInfraObject: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformInfraObjectKeys.detail(id),
        });
    },
    /** Remove platformInfraRef from cache */ platformInfraRef: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformInfraRefKeys.detail(id),
        });
    },
    /** Remove platformInfraStore from cache */ platformInfraStore: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformInfraStoreKeys.detail(id),
        });
    },
    /** Remove platformNamespace from cache */ platformNamespace: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformNamespaceKeys.detail(id),
        });
    },
    /** Remove platformNamespaceEvent from cache */ platformNamespaceEvent: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformNamespaceEventKeys.detail(id),
        });
    },
};
