Files
supabase/apps/studio/data/database-queues/keys.ts
Ivan Vasilov 1157a20fbd feat: Queues v0.5 (#30418)
* Rename the regular/normal queues to basic.

* Move the partitioned type of queues to the end.

* Add metrics for the queues.

* Add actions for postponing and deleting a message.

* Add queue actions for purging and deleting a queue.

* Minor fixes for the empty stateof the queues page.

* Add a modal to send a message to the queue.

* Minor fixes.

* Correct some button texts.

* Refactor the metrics to switch to a rougher estimate method if it timeouts.

* Fix type errors.

* More minor fixes.
2024-11-14 13:02:29 +01:00

12 lines
677 B
TypeScript

export const databaseQueuesKeys = {
create: () => ['queues', 'create'] as const,
delete: (name: string) => ['queues', name, 'delete'] as const,
purge: (name: string) => ['queues', name, 'purge'] as const,
getMessagesInfinite: (projectRef: string | undefined, queueName: string, options?: object) =>
['projects', projectRef, 'queues', queueName, options].filter(Boolean),
list: (projectRef: string | undefined) => ['projects', projectRef, 'queues'] as const,
// invalidating queues.list will also invalidate queues.metrics
metrics: (projectRef: string | undefined, queueName: string) =>
['projects', projectRef, 'queues', 'metrics', queueName] as const,
}