Files
supabase/apps/studio/data/storage/keys.ts
Joshen Lim d8fcab2433 Joshen/depr 250 analytics buckets use temporary api key instead of projects (#40342)
* Retrieve temporary API key within iceberg-namespace-tables-query

* Retrieve temporary API key within iceberg-namespace-table-delete-mutation

* Retrieve temporary API key within iceberg-namespaces-query

* Fix

* Retrieve temporary API key within iceberg-namespace-create-mutation

* Update based on comments
2025-11-13 16:04:21 +08:00

45 lines
1.5 KiB
TypeScript

export const storageKeys = {
buckets: (projectRef: string | undefined) => ['projects', projectRef, 'buckets'] as const,
analyticsBuckets: (projectRef: string | undefined) =>
['projects', projectRef, 'analytics-buckets'] as const,
vectorBuckets: (projectRef: string | undefined) =>
['projects', projectRef, 'vector-buckets'] as const,
vectorBucket: (projectRef: string | undefined, vectorbucketName: string | undefined) =>
['projects', projectRef, 'vector-bucket', vectorbucketName] as const,
vectorBucketsIndexes: (projectRef: string | undefined, vectorBucketName: string | undefined) =>
['projects', projectRef, 'vector-buckets', vectorBucketName, 'indexes'] as const,
archive: (projectRef: string | undefined) => ['projects', projectRef, 'archive'] as const,
icebergNamespaces: ({
projectRef,
catalog,
warehouse,
}: {
projectRef?: string
catalog: string
warehouse: string
}) => [projectRef, 'catalog', catalog, 'warehouse', warehouse, 'namespaces'] as const,
icebergNamespace: (catalog: string, warehouse: string, namespace: string) =>
['catalog', catalog, 'warehouse', warehouse, 'namespaces', namespace] as const,
icebergNamespaceTables: ({
projectRef,
catalog,
warehouse,
namespace,
}: {
projectRef?: string
catalog: string
warehouse: string
namespace: string
}) =>
[
projectRef,
'catalog',
catalog,
'warehouse',
warehouse,
'namespaces',
namespace,
'tables',
] as const,
}