mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 17:30:25 -04:00
c198a61951
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? feature ## Additional context Adds a feature flagged UI for toggling JIT based access to a project's database and managing permissions/access --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
45 lines
2.0 KiB
TypeScript
45 lines
2.0 KiB
TypeScript
export const INFINITE_PROJECTS_KEY_PREFIX = 'all-projects-infinite'
|
|
|
|
export const projectKeys = {
|
|
infiniteList: (params?: {
|
|
limit: number
|
|
sort?: 'name_asc' | 'name_desc' | 'created_asc' | 'created_desc'
|
|
search?: string
|
|
}) => [INFINITE_PROJECTS_KEY_PREFIX, params].filter(Boolean),
|
|
infiniteListByOrg: (
|
|
slug: string | undefined,
|
|
params?: {
|
|
limit: number
|
|
sort?: 'name_asc' | 'name_desc' | 'created_asc' | 'created_desc'
|
|
search?: string
|
|
statuses?: string[]
|
|
}
|
|
) => [INFINITE_PROJECTS_KEY_PREFIX, slug, params].filter(Boolean),
|
|
status: (projectRef: string | undefined) => ['project', projectRef, 'status'] as const,
|
|
types: (projectRef: string | undefined) => ['project', projectRef, 'types'] as const,
|
|
detail: (projectRef: string | undefined) => ['project', projectRef, 'detail'] as const,
|
|
serviceVersions: (projectRef: string | undefined) =>
|
|
['project', projectRef, 'service-versions'] as const,
|
|
readonlyStatus: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'readonly-status'] as const,
|
|
projectTransfer: (projectRef: string | undefined, targetOrganizationSlug: string | undefined) =>
|
|
['projects', 'transfer', projectRef, targetOrganizationSlug] as const,
|
|
projectTransferPreview: (
|
|
projectRef: string | undefined,
|
|
targetOrganizationSlug: string | undefined
|
|
) => ['projects', 'transfer', projectRef, targetOrganizationSlug, 'preview'] as const,
|
|
pauseStatus: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'pause-status'] as const,
|
|
|
|
projectMembers: (projectRef: string | undefined) => ['project', projectRef, 'members'] as const,
|
|
|
|
// Clone to new project
|
|
listCloneBackups: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'clone-backups'] as const,
|
|
listCloneStatus: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'clone-status'] as const,
|
|
|
|
// Banner-specific: first-page snapshot used by the status page banner hook
|
|
bannerProjectsByOrg: (slug: string) => ['banner', 'org-projects', slug] as const,
|
|
}
|