Files
supabase/apps/studio/data/auth/keys.ts
T
Joshen Lim 5701a291fe Fix Users page not invalidating data when switching search mode (#40809)
* Fix Users page not invalidating data when switching search mode

* Nit fix
2025-11-26 16:15:34 +08:00

48 lines
1.4 KiB
TypeScript

import type { OptimizedSearchColumns } from '@supabase/pg-meta/src/sql/studio/get-users-types'
export const authKeys = {
users: (
projectRef: string | undefined,
params?: {
page: number | undefined
keywords: string | undefined
filter: string | undefined
}
) => ['projects', projectRef, 'users', ...(params ? [params] : [])] as const,
usersQuery: (
projectRef: string | undefined,
params?: {
query: string
startAt: string
}
) => ['projects', projectRef, 'users-query', ...(params ? [params] : [])] as const,
usersInfinite: (
projectRef: string | undefined,
params?: {
keywords?: string
filter?: string
providers?: string[]
sort?: string
order?: string
column?: OptimizedSearchColumns
}
) => ['projects', projectRef, 'users-infinite', params] as const,
usersCount: (
projectRef: string | undefined,
params?: {
keywords?: string
filter?: string
providers?: string[]
forceExactCount?: boolean
column?: OptimizedSearchColumns
}
) => ['projects', projectRef, 'users-count', params] as const,
authConfig: (projectRef: string | undefined) => ['projects', projectRef, 'auth-config'] as const,
accessToken: () => ['access-token'] as const,
overviewMetrics: (projectRef: string | undefined) =>
['projects', projectRef, 'auth-overview-metrics'] as const,
}