Files
supabase/apps/studio/data/projects/keys.ts
T
Joshen Lim dabfaa8972 Support for projects pagination part 1 (#38298)
* init

* Infinite scrolling pagination for projects in table view

* Infinite scrolling pagination for projects in cards view

* Shift searching projects to URL state + to server side

* Shift status filter to URL state

* opt to use local storage query for view moe

* update wildcard project route

* add created at value, and shift filter status to server side

* Nit

* final nit

* Address comments

* Fix

* Prettier

* Raise page limit to 96
2025-09-11 14:02:58 +08:00

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', slug, params] as const,
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,
}