"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 infraGetAllRecord queries */ infraGetAllRecord: {
        /** Invalidate all infraGetAllRecord queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraGetAllRecordKeys.all,
        }),
        /** Invalidate infraGetAllRecord list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraGetAllRecordKeys.lists(),
        }),
        /** Invalidate a specific infraGetAllRecord */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraGetAllRecordKeys.detail(id),
        }),
    },
    /** Invalidate infraRef queries */ infraRef: {
        /** Invalidate all infraRef queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraRefKeys.all,
        }),
        /** Invalidate infraRef list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraRefKeys.lists(),
        }),
        /** Invalidate a specific infraRef */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraRefKeys.detail(id),
        }),
    },
    /** Invalidate infraStore queries */ infraStore: {
        /** Invalidate all infraStore queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraStoreKeys.all,
        }),
        /** Invalidate infraStore list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraStoreKeys.lists(),
        }),
        /** Invalidate a specific infraStore */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraStoreKeys.detail(id),
        }),
    },
    /** Invalidate infraObject queries */ infraObject: {
        /** Invalidate all infraObject queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraObjectKeys.all,
        }),
        /** Invalidate infraObject list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraObjectKeys.lists(),
        }),
        /** Invalidate a specific infraObject */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraObjectKeys.detail(id),
        }),
    },
    /** Invalidate infraCommit queries */ infraCommit: {
        /** Invalidate all infraCommit queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraCommitKeys.all,
        }),
        /** Invalidate infraCommit list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraCommitKeys.lists(),
        }),
        /** Invalidate a specific infraCommit */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: query_keys_1.infraCommitKeys.detail(id),
        }),
    },
    /** 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 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 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 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),
        }),
    },
    /** 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),
        }),
    },
};
/**

// ============================================================================
// 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 infraGetAllRecord from cache */ infraGetAllRecord: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.infraGetAllRecordKeys.detail(id),
        });
    },
    /** Remove infraRef from cache */ infraRef: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.infraRefKeys.detail(id),
        });
    },
    /** Remove infraStore from cache */ infraStore: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.infraStoreKeys.detail(id),
        });
    },
    /** Remove infraObject from cache */ infraObject: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.infraObjectKeys.detail(id),
        });
    },
    /** Remove infraCommit from cache */ infraCommit: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.infraCommitKeys.detail(id),
        });
    },
    /** Remove dbPreset from cache */ dbPreset: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.dbPresetKeys.detail(id),
        });
    },
    /** Remove platformNamespace from cache */ platformNamespace: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformNamespaceKeys.detail(id),
        });
    },
    /** Remove namespace from cache */ namespace: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.namespaceKeys.detail(id),
        });
    },
    /** Remove platformNamespaceEvent from cache */ platformNamespaceEvent: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.platformNamespaceEventKeys.detail(id),
        });
    },
    /** Remove namespaceEvent from cache */ namespaceEvent: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: query_keys_1.namespaceEventKeys.detail(id),
        });
    },
};
