mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
* refactor * fix schema, add validation, add tests, remove old code * remove debugging tag * fix imports * prettier * fix prettier * move query to its own file
54 lines
1.5 KiB
TypeScript
54 lines
1.5 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 | undefined
|
|
filter: string | undefined
|
|
providers: string[] | undefined
|
|
sort: string | undefined
|
|
order: string | undefined
|
|
}
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'users-infinite',
|
|
...(params ? [params].filter(Boolean) : []),
|
|
] as const,
|
|
usersCount: (
|
|
projectRef: string | undefined,
|
|
params?: {
|
|
keywords: string | undefined
|
|
filter: string | undefined
|
|
providers: string[] | undefined
|
|
forceExactCount?: boolean
|
|
column?: OptimizedSearchColumns
|
|
}
|
|
) =>
|
|
['projects', projectRef, 'users-count', ...(params ? [params].filter(Boolean) : [])] 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,
|
|
}
|