Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Check storage config for vector buckets enabled (#40694)

Joshen Lim4982ef8703ef
diff --git a/apps/studio/data/config/project-storage-config-query.ts b/apps/studio/data/config/project-storage-config-query.ts
index 3b460103e9b..1b4e60bbc9a 100644
--- a/apps/studio/data/config/project-storage-config-query.ts
+++ b/apps/studio/data/config/project-storage-config-query.ts
@@ -1,6 +1,5 @@
import { useQuery } from '@tanstack/react-query'
-import { useFlag } from 'common'
import { components } from 'data/api'
import { get, handleError } from 'data/fetchers'
import { IS_PLATFORM } from 'lib/constants'
@@ -60,7 +59,7 @@ export const useIsAnalyticsBucketsEnabled = ({ projectRef }: { projectRef?: stri
}
export const useIsVectorBucketsEnabled = ({ projectRef }: { projectRef?: string }) => {
- // [Joshen] Temp using feature flag - will need to shift to storage config like analytics bucket once ready
- const isVectorBucketsEnabled = useFlag('storageAnalyticsVector')
+ const { data } = useProjectStorageConfigQuery({ projectRef })
+ const isVectorBucketsEnabled = !!data?.features.vectorBuckets?.enabled
return isVectorBucketsEnabled
}
diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.ts
index 998932342db..2748ab0765f 100644
--- a/packages/api-types/types/api.d.ts
+++ b/packages/api-types/types/api.d.ts
@@ -334,7 +334,8 @@ export interface paths {
delete: operations['v1-delete-a-project']
options?: never
head?: never
- patch?: never
+ /** Updates the given project */
+ patch: operations['v1-update-a-project']
trace?: never
}
'/v1/projects/{ref}/actions': {
@@ -924,6 +925,24 @@ export interface paths {
patch?: never
trace?: never
}
+ '/v1/projects/{ref}/config/realtime': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Gets realtime configuration */
+ get: operations['v1-get-realtime-config']
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ /** Updates realtime configuration */
+ patch: operations['v1-update-realtime-config']
+ trace?: never
+ }
'/v1/projects/{ref}/config/storage': {
parameters: {
query?: never
@@ -1225,6 +1244,23 @@ export interface paths {
patch: operations['v1-patch-a-migration']
trace?: never
}
+ '/v1/projects/{ref}/database/password': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ /** Updates the database password */
+ patch: operations['v1-update-database-password']
+ trace?: never
+ }
'/v1/projects/{ref}/database/query': {
parameters: {
query?: never
@@ -1242,6 +1278,26 @@ export interface paths {
patch?: never
trace?: never
}
+ '/v1/projects/{ref}/database/query/read-only': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /**
+ * [Beta] Run a sql query as supabase_read_only_user
+ * @description All entity references must be schema qualified.
+ */
+ post: operations['v1-read-only-query']
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/v1/projects/{ref}/database/webhooks/enable': {
parameters: {
query?: never
@@ -1948,6 +2004,8 @@ export interface components {
AuthConfigResponse: {
api_max_request_duration: number | null
db_max_pool_size: number | null
+ /** @enum {string|null} */
+ db_max_pool_size_unit: 'connections' | 'percent' | null
disable_signup: boolean | null
external_anonymous_users_enabled: boolean | null
external_apple_additional_client_ids: string | null
@@ -3244,6 +3302,28 @@ export interface components {
override_active_until: string
override_enabled: boolean
}
+ RealtimeConfigResponse: {
+ /** @description Sets connection pool size for Realtime Authorization */
+ connection_pool: number | null
+ /** @description Sets maximum number of bytes per second rate per channel limit */
+ max_bytes_per_second: number | null
+ /** @description Sets maximum number of channels per client rate limit */
+ max_channels_per_client: number | null
+ /** @description Sets maximum number of concurrent users rate limit */
+ max_concurrent_users: number | null
+ /** @description Sets maximum number of events per second rate per channel limit */
+ max_events_per_second: number | null
+ /** @description Sets maximum number of joins per second rate limit */
+ max_joins_per_second: number | null
+ /** @description Sets maximum number of payload size in KB rate limit */
+ max_payload_size_in_kb: number | null
+ /** @description Sets maximum number of presence events per second rate limit */
+ max_presence_events_per_second: number | null
+ /** @description Whether to only allow private channels */
+ private_only: boolean | null
+ /** @description Whether to suspend realtime */
+ suspend: boolean | null
+ }
RegionsInfo: {
all: {
smartGroup: {
@@ -3440,6 +3520,9 @@ export interface components {
features: {
icebergCatalog?: {
enabled: boolean
+ maxCatalogs: number
+ maxNamespaces: number
+ maxTables: number
}
imageTransformation: {
enabled: boolean
@@ -3447,6 +3530,11 @@ export interface components {
s3Protocol: {
enabled: boolean
}
+ vectorBuckets?: {
+ enabled: boolean
+ maxBuckets: number
+ maxIndexes: number
+ }
}
/** Format: int64 */
fileSizeLimit: number
@@ -3498,6 +3586,8 @@ export interface components {
UpdateAuthConfigBody: {
api_max_request_duration?: number | null
db_max_pool_size?: number | null
+ /** @enum {string|null} */
+ db_max_pool_size_unit?: 'connections' | 'percent' | null
disable_signup?: boolean | null
external_anonymous_users_enabled?: boolean | null
external_apple_additional_client_ids?: string | null
@@ -3896,6 +3986,28 @@ export interface components {
}
updated_at?: string
}
+ UpdateRealtimeConfigBody: {
+ /** @description Sets connection pool size for Realtime Authorization */
+ connection_pool?: number
+ /** @description Sets maximum number of bytes per second rate per channel limit */
+ max_bytes_per_second?: number
+ /** @description Sets maximum number of channels per client rate limit */
+ max_channels_per_client?: number
+ /** @description Sets maximum number of concurrent users rate limit */
+ max_concurrent_users?: number
+ /** @description Sets maximum number of events per second rate per channel limit */
+ max_events_per_second?: number
+ /** @description Sets maximum number of joins per second rate limit */
+ max_joins_per_second?: number
+ /** @description Sets maximum number of payload size in KB rate limit */
+ max_payload_size_in_kb?: number
+ /** @description Sets maximum number of presence events per second rate limit */
+ max_presence_events_per_second?: number
+ /** @description Whether to only allow private channels */
+ private_only?: boolean
+ /** @description Whether to suspend realtime */
+ suspend?: boolean
+ }
UpdateRunStatusBody: {
/** @enum {string} */
clone?: 'CREATED' | 'DEAD' | 'EXITED' | 'PAUSED' | 'REMOVING' | 'RESTARTING' | 'RUNNING'
@@ -3928,6 +4040,9 @@ export interface components {
features?: {
icebergCatalog?: {
enabled: boolean
+ maxCatalogs: number
+ maxNamespaces: number
+ maxTables: number
}
imageTransformation: {
enabled: boolean
@@ -3935,6 +4050,11 @@ export interface components {
s3Protocol: {
enabled: boolean
}
+ vectorBuckets?: {
+ enabled: boolean
+ maxBuckets: number
+ maxIndexes: number
+ }
}
/** Format: int64 */
fileSizeLimit?: number
@@ -4416,6 +4536,10 @@ export interface components {
| 'PAUSE_FAILED'
| 'RESIZING'
}
+ V1ReadOnlyQueryBody: {
+ parameters?: unknown[]
+ query: string
+ }
V1RestorePitrBody: {
/** Format: int64 */
recovery_time_target_unix: number
@@ -4480,12 +4604,21 @@ export interface components {
name?: string
verify_jwt?: boolean
}
+ V1UpdatePasswordBody: {
+ password: string
+ }
+ V1UpdatePasswordResponse: {
+ message: string
+ }
V1UpdatePostgrestConfigBody: {
db_extra_search_path?: string
db_pool?: number
db_schema?: string
max_rows?: number
}
+ V1UpdateProjectBody: {
+ name: string
+ }
V1UpsertMigrationBody: {
name?: string
query: string
@@ -5267,6 +5400,60 @@ export interface operations {
}
}
}
+ 'v1-update-a-project': {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['V1UpdateProjectBody']
+ }
+ }
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['V1ProjectRefResponse']
+ }
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to update project */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
'v1-list-action-runs': {
parameters: {
query?: {
@@ -7875,6 +8062,95 @@ export interface operations {
}
}
}
+ 'v1-get-realtime-config': {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Gets project's realtime configuration */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['RealtimeConfigResponse']
+ }
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
+ 'v1-update-realtime-config': {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['UpdateRealtimeConfigBody']
+ }
+ }
+ responses: {
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
'v1-get-storage-config': {
parameters: {
query?: never
@@ -9083,6 +9359,60 @@ export interface operations {
}
}
}
+ 'v1-update-database-password': {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['V1UpdatePasswordBody']
+ }
+ }
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['V1UpdatePasswordResponse']
+ }
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to update database password */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
'v1-run-a-query': {
parameters: {
query?: never
@@ -9135,6 +9465,58 @@ export interface operations {
}
}
}
+ 'v1-read-only-query': {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['V1ReadOnlyQueryBody']
+ }
+ }
+ responses: {
+ 201: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to run read-only sql query */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
'v1-enable-database-webhook': {
parameters: {
query?: never
diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts
index e4413322a98..4bff0728e42 100644
--- a/packages/api-types/types/platform.d.ts
+++ b/packages/api-types/types/platform.d.ts
@@ -4880,6 +4880,7 @@ export interface components {
[key: string]: unknown
}
description?: string
+ /** @default false */
favorite?: boolean
/** Format: uuid */
folder_id?: (null | (string | null)) | null
@@ -6635,6 +6636,8 @@ export interface components {
API_MAX_REQUEST_DURATION: number | null
AUDIT_LOG_DISABLE_POSTGRES: boolean | null
DB_MAX_POOL_SIZE: number | null
+ /** @enum {string|null} */
+ DB_MAX_POOL_SIZE_UNIT: 'connections' | 'percent' | null
DISABLE_SIGNUP: boolean
EXTERNAL_ANONYMOUS_USERS_ENABLED: boolean
EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS: string
@@ -6747,6 +6750,7 @@ export interface components {
HOOK_SEND_SMS_ENABLED: boolean
HOOK_SEND_SMS_SECRETS: string
HOOK_SEND_SMS_URI: string
+ INDEX_WORKER_ENSURE_USER_SEARCH_INDEXES_EXIST: boolean | null
JWT_EXP: number
MAILER_ALLOW_UNVERIFIED_EMAIL_SIGN_INS: boolean
MAILER_AUTOCONFIRM: boolean
@@ -9136,6 +9140,9 @@ export interface components {
features: {
icebergCatalog?: {
enabled: boolean
+ maxCatalogs: number
+ maxNamespaces: number
+ maxTables: number
}
imageTransformation: {
enabled: boolean
@@ -9143,6 +9150,11 @@ export interface components {
s3Protocol: {
enabled: boolean
}
+ vectorBuckets?: {
+ enabled: boolean
+ maxBuckets: number
+ maxIndexes: number
+ }
}
/** Format: int64 */
fileSizeLimit: number
@@ -9630,6 +9642,8 @@ export interface components {
API_MAX_REQUEST_DURATION?: number | null
AUDIT_LOG_DISABLE_POSTGRES?: boolean | null
DB_MAX_POOL_SIZE?: number | null
+ /** @enum {string|null} */
+ DB_MAX_POOL_SIZE_UNIT?: 'connections' | 'percent' | null
DISABLE_SIGNUP?: boolean | null
EXTERNAL_ANONYMOUS_USERS_ENABLED?: boolean | null
EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS?: string | null
@@ -9743,6 +9757,7 @@ export interface components {
HOOK_SEND_SMS_ENABLED?: boolean | null
HOOK_SEND_SMS_SECRETS?: string | null
HOOK_SEND_SMS_URI?: string | null
+ INDEX_WORKER_ENSURE_USER_SEARCH_INDEXES_EXIST?: boolean | null
JWT_EXP?: number | null
MAILER_ALLOW_UNVERIFIED_EMAIL_SIGN_INS?: boolean | null
MAILER_AUTOCONFIRM?: boolean | null
@@ -10361,6 +10376,9 @@ export interface components {
features?: {
icebergCatalog?: {
enabled: boolean
+ maxCatalogs: number
+ maxNamespaces: number
+ maxTables: number
}
imageTransformation: {
enabled: boolean
@@ -10368,6 +10386,11 @@ export interface components {
s3Protocol: {
enabled: boolean
}
+ vectorBuckets?: {
+ enabled: boolean
+ maxBuckets: number
+ maxIndexes: number
+ }
}
/** Format: int64 */
fileSizeLimit?: number
@@ -10461,6 +10484,7 @@ export interface components {
[key: string]: unknown
}
description?: string
+ /** @description A missing `favorite` value means that the value will remained unchanged for updates. Defaults to `false` for inserts. */
favorite?: boolean
/** Format: uuid */
folder_id?: (null | (string | null)) | null
@@ -21126,6 +21150,8 @@ export interface operations {
| 'realtime_channel_presence_events'
| 'realtime_channel_db_events'
| 'realtime_authorization_rls_execution_time'
+ | 'realtime_read_authorization_rls_execution_time'
+ | 'realtime_write_authorization_rls_execution_time'
| 'realtime_payload_size'
| 'realtime_replication_connection_lag'
| 'realtime_sum_connections_connected'
@@ -21180,6 +21206,8 @@ export interface operations {
| 'realtime_channel_presence_events'
| 'realtime_channel_db_events'
| 'realtime_authorization_rls_execution_time'
+ | 'realtime_read_authorization_rls_execution_time'
+ | 'realtime_write_authorization_rls_execution_time'
| 'realtime_payload_size'
| 'realtime_replication_connection_lag'
| 'realtime_sum_connections_connected'