mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
* Refactor retrieval of log counts * Async filters * Clean up * Clean up * Fix
66 lines
1.6 KiB
TypeScript
66 lines
1.6 KiB
TypeScript
import { QuerySearchParamsType } from 'components/interfaces/UnifiedLogs/UnifiedLogs.types'
|
|
|
|
export const logsKeys = {
|
|
unifiedLogsInfinite: (
|
|
projectRef: string | undefined,
|
|
searchParams: QuerySearchParamsType | undefined
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'unified-logs',
|
|
'logs-data',
|
|
...(searchParams ? [searchParams].filter(Boolean) : []),
|
|
] as const,
|
|
unifiedLogsCount: (
|
|
projectRef: string | undefined,
|
|
searchParams: QuerySearchParamsType | undefined
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'unified-logs',
|
|
'count-data',
|
|
...(searchParams ? [searchParams].filter(Boolean) : []),
|
|
] as const,
|
|
unifiedLogsChart: (
|
|
projectRef: string | undefined,
|
|
searchParams: QuerySearchParamsType | undefined
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'unified-logs',
|
|
'chart-data',
|
|
...(searchParams ? [searchParams].filter(Boolean) : []),
|
|
] as const,
|
|
unifiedLogsFacetCount: (
|
|
projectRef: string | undefined,
|
|
facet: string,
|
|
facetSearch: string | undefined,
|
|
searchParams: QuerySearchParamsType | undefined
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'unified-logs',
|
|
'count-data',
|
|
facet,
|
|
facetSearch,
|
|
...(searchParams ? [searchParams].filter(Boolean) : []),
|
|
] as const,
|
|
serviceFlow: (
|
|
projectRef: string | undefined,
|
|
searchParams: QuerySearchParamsType | undefined,
|
|
logId: string | undefined
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'unified-logs',
|
|
'service-flow',
|
|
logId,
|
|
...(searchParams ? [searchParams].filter(Boolean) : []),
|
|
] as const,
|
|
}
|