/**
 * Cache invalidation helpers
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { emailKeys, phoneNumberKeys, cryptoAddressKeys, webauthnCredentialKeys, auditLogAuthKeys, identityProviderKeys, roleTypeKeys, userConnectedAccountKeys, userKeys, } 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 email queries */ email: {
        /** Invalidate all email queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: emailKeys.all,
        }),
        /** Invalidate email list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: emailKeys.lists(),
        }),
        /** Invalidate a specific email */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: emailKeys.detail(id),
        }),
    },
    /** Invalidate phoneNumber queries */ phoneNumber: {
        /** Invalidate all phoneNumber queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: phoneNumberKeys.all,
        }),
        /** Invalidate phoneNumber list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: phoneNumberKeys.lists(),
        }),
        /** Invalidate a specific phoneNumber */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: phoneNumberKeys.detail(id),
        }),
    },
    /** Invalidate cryptoAddress queries */ cryptoAddress: {
        /** Invalidate all cryptoAddress queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: cryptoAddressKeys.all,
        }),
        /** Invalidate cryptoAddress list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: cryptoAddressKeys.lists(),
        }),
        /** Invalidate a specific cryptoAddress */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: cryptoAddressKeys.detail(id),
        }),
    },
    /** Invalidate webauthnCredential queries */ webauthnCredential: {
        /** Invalidate all webauthnCredential queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: webauthnCredentialKeys.all,
        }),
        /** Invalidate webauthnCredential list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: webauthnCredentialKeys.lists(),
        }),
        /** Invalidate a specific webauthnCredential */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: webauthnCredentialKeys.detail(id),
        }),
    },
    /** Invalidate auditLogAuth queries */ auditLogAuth: {
        /** Invalidate all auditLogAuth queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: auditLogAuthKeys.all,
        }),
        /** Invalidate auditLogAuth list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: auditLogAuthKeys.lists(),
        }),
        /** Invalidate a specific auditLogAuth */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: auditLogAuthKeys.detail(id),
        }),
    },
    /** Invalidate identityProvider queries */ identityProvider: {
        /** Invalidate all identityProvider queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: identityProviderKeys.all,
        }),
        /** Invalidate identityProvider list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: identityProviderKeys.lists(),
        }),
        /** Invalidate a specific identityProvider */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: identityProviderKeys.detail(id),
        }),
    },
    /** Invalidate roleType queries */ roleType: {
        /** Invalidate all roleType queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: roleTypeKeys.all,
        }),
        /** Invalidate roleType list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: roleTypeKeys.lists(),
        }),
        /** Invalidate a specific roleType */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: roleTypeKeys.detail(id),
        }),
    },
    /** Invalidate userConnectedAccount queries */ userConnectedAccount: {
        /** Invalidate all userConnectedAccount queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: userConnectedAccountKeys.all,
        }),
        /** Invalidate userConnectedAccount list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: userConnectedAccountKeys.lists(),
        }),
        /** Invalidate a specific userConnectedAccount */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: userConnectedAccountKeys.detail(id),
        }),
    },
    /** Invalidate user queries */ user: {
        /** Invalidate all user queries */ all: (queryClient) => queryClient.invalidateQueries({
            queryKey: userKeys.all,
        }),
        /** Invalidate user list queries */ lists: (queryClient) => queryClient.invalidateQueries({
            queryKey: userKeys.lists(),
        }),
        /** Invalidate a specific user */ detail: (queryClient, id) => queryClient.invalidateQueries({
            queryKey: userKeys.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 email from cache */ email: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: emailKeys.detail(id),
        });
    },
    /** Remove phoneNumber from cache */ phoneNumber: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: phoneNumberKeys.detail(id),
        });
    },
    /** Remove cryptoAddress from cache */ cryptoAddress: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: cryptoAddressKeys.detail(id),
        });
    },
    /** Remove webauthnCredential from cache */ webauthnCredential: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: webauthnCredentialKeys.detail(id),
        });
    },
    /** Remove auditLogAuth from cache */ auditLogAuth: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: auditLogAuthKeys.detail(id),
        });
    },
    /** Remove identityProvider from cache */ identityProvider: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: identityProviderKeys.detail(id),
        });
    },
    /** Remove roleType from cache */ roleType: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: roleTypeKeys.detail(id),
        });
    },
    /** Remove userConnectedAccount from cache */ userConnectedAccount: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: userConnectedAccountKeys.detail(id),
        });
    },
    /** Remove user from cache */ user: (queryClient, id) => {
        queryClient.removeQueries({
            queryKey: userKeys.detail(id),
        });
    },
};
