/** * Centralized query key factory * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ // ============================================================================ // This file provides a centralized, type-safe query key factory following // the lukemorales query-key-factory pattern for React Query. // // Benefits: // - Single source of truth for all query keys // - Type-safe key access with autocomplete // - Hierarchical invalidation (invalidate all 'user.*' queries) // - Scoped keys for parent-child relationships // ============================================================================ // ============================================================================ // Entity Query Keys // ============================================================================ export const auditLogAuthKeys = { /** All auditLogAuth queries */ all: ['auditlogauth'] as const, /** List query keys */ lists: () => [...auditLogAuthKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...auditLogAuthKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...auditLogAuthKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...auditLogAuthKeys.details(), id] as const, } as const; export const cryptoAddressKeys = { /** All cryptoAddress queries */ all: ['cryptoaddress'] as const, /** List query keys */ lists: () => [...cryptoAddressKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...cryptoAddressKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...cryptoAddressKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...cryptoAddressKeys.details(), id] as const, } as const; export const emailKeys = { /** All email queries */ all: ['email'] as const, /** List query keys */ lists: () => [...emailKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...emailKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...emailKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...emailKeys.details(), id] as const, } as const; export const identityProviderKeys = { /** All identityProvider queries */ all: ['identityprovider'] as const, /** List query keys */ lists: () => [...identityProviderKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...identityProviderKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...identityProviderKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...identityProviderKeys.details(), id] as const, } as const; export const orgApiKeyListKeys = { /** All orgApiKeyList queries */ all: ['orgapikeylist'] as const, /** List query keys */ lists: () => [...orgApiKeyListKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...orgApiKeyListKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...orgApiKeyListKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...orgApiKeyListKeys.details(), id] as const, } as const; export const phoneNumberKeys = { /** All phoneNumber queries */ all: ['phonenumber'] as const, /** List query keys */ lists: () => [...phoneNumberKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...phoneNumberKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...phoneNumberKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...phoneNumberKeys.details(), id] as const, } as const; export const principalKeys = { /** All principal queries */ all: ['principal'] as const, /** List query keys */ lists: () => [...principalKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...principalKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...principalKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...principalKeys.details(), id] as const, } as const; export const principalEntityKeys = { /** All principalEntity queries */ all: ['principalentity'] as const, /** List query keys */ lists: () => [...principalEntityKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...principalEntityKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...principalEntityKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...principalEntityKeys.details(), id] as const, } as const; export const principalScopeOverrideKeys = { /** All principalScopeOverride queries */ all: ['principalscopeoverride'] as const, /** List query keys */ lists: () => [...principalScopeOverrideKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...principalScopeOverrideKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...principalScopeOverrideKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...principalScopeOverrideKeys.details(), id] as const, } as const; export const roleTypeKeys = { /** All roleType queries */ all: ['roletype'] as const, /** List query keys */ lists: () => [...roleTypeKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...roleTypeKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...roleTypeKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...roleTypeKeys.details(), id] as const, } as const; export const userConnectedAccountKeys = { /** All userConnectedAccount queries */ all: ['userconnectedaccount'] as const, /** List query keys */ lists: () => [...userConnectedAccountKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...userConnectedAccountKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...userConnectedAccountKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...userConnectedAccountKeys.details(), id] as const, } as const; export const userKeys = { /** All user queries */ all: ['user'] as const, /** List query keys */ lists: () => [...userKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...userKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...userKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...userKeys.details(), id] as const, } as const; export const userSettingKeys = { /** All userSetting queries */ all: ['usersetting'] as const, /** List query keys */ lists: () => [...userSettingKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...userSettingKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...userSettingKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...userSettingKeys.details(), id] as const, } as const; export const userSettingsSecurityKeys = { /** All userSettingsSecurity queries */ all: ['usersettingssecurity'] as const, /** List query keys */ lists: () => [...userSettingsSecurityKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...userSettingsSecurityKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...userSettingsSecurityKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...userSettingsSecurityKeys.details(), id] as const, } as const; export const webauthnCredentialKeys = { /** All webauthnCredential queries */ all: ['webauthncredential'] as const, /** List query keys */ lists: () => [...webauthnCredentialKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => [...webauthnCredentialKeys.lists(), variables] as const, /** Detail query keys */ details: () => [...webauthnCredentialKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => [...webauthnCredentialKeys.details(), id] as const, } as const; // ============================================================================ // Custom Query Keys // ============================================================================ export const customQueryKeys = { /** Query key for currentIpAddress */ currentIpAddress: () => ['currentIpAddress'] as const, /** Query key for currentUser */ currentUser: () => ['currentUser'] as const, /** Query key for currentUserAgent */ currentUserAgent: () => ['currentUserAgent'] as const, /** Query key for currentUserId */ currentUserId: () => ['currentUserId'] as const, /** Query key for getMfaStatus */ getMfaStatus: () => ['getMfaStatus'] as const, /** Query key for requireStepUp */ requireStepUp: (variables?: object) => ['requireStepUp', variables] as const, /** Query key for signInOptions */ signInOptions: () => ['signInOptions'] as const, } as const; /** // ============================================================================ // Unified Query Key Store // ============================================================================ * Unified query key store * * Use this for type-safe query key access across your application. * * @example * ```ts * // Invalidate all user queries * queryClient.invalidateQueries({ queryKey: queryKeys.user.all }); * * // Invalidate user list queries * queryClient.invalidateQueries({ queryKey: queryKeys.user.lists() }); * * // Invalidate specific user * queryClient.invalidateQueries({ queryKey: queryKeys.user.detail(userId) }); * ``` */ export const queryKeys = { auditLogAuth: auditLogAuthKeys, cryptoAddress: cryptoAddressKeys, email: emailKeys, identityProvider: identityProviderKeys, orgApiKeyList: orgApiKeyListKeys, phoneNumber: phoneNumberKeys, principal: principalKeys, principalEntity: principalEntityKeys, principalScopeOverride: principalScopeOverrideKeys, roleType: roleTypeKeys, userConnectedAccount: userConnectedAccountKeys, user: userKeys, userSetting: userSettingKeys, userSettingsSecurity: userSettingsSecurityKeys, webauthnCredential: webauthnCredentialKeys, custom: customQueryKeys, } as const; /** Type representing all available query key scopes */ export type QueryKeyScope = keyof typeof queryKeys;