Files
supabase/apps/studio/data/projects/keys.ts
T

37 lines
1.7 KiB
TypeScript

export const projectKeys = {
list: () => ['all-projects'] as const,
infiniteListByOrg: (
slug: string | undefined,
params?: {
limit: number
sort?: 'name_asc' | 'name_desc' | 'created_asc' | 'created_desc'
search?: string
statuses?: string[]
}
) => ['all-projects-infinite', 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,
readonlyStatusList: () => ['projects', 'readonly-statuses'] 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,
orgProjects: (slug: string | undefined) => ['projects', 'org', slug] 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,
}