Skip to content

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

feat(observability): migrate overview to service-health endpoint (#46100)

Jordi Enric4ca7e6615329
diff --git a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx
index f7143e9dd19..d4e94c0bdf8 100644
--- a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx
+++ b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx
@@ -109,10 +109,6 @@ const lokiSubmitSchema = z.object({
headers: headerRecordSchema,
})
-const elasticSchema = z.object({
- type: z.literal('elastic'),
-})
-
const postgresSchema = z.object({
type: z.literal('postgres'),
})
@@ -199,8 +195,6 @@ const formUnion = z.discriminatedUnion('type', [
webhookFormSchema,
datadogSchema,
lokiFormSchema,
- // [Joshen] To fix API types, not supported in the UI
- elasticSchema,
postgresSchema,
bigquerySchema,
clickhouseSchema,
@@ -216,7 +210,6 @@ const submitUnion = z.discriminatedUnion('type', [
webhookSubmitSchema,
datadogSchema,
lokiSubmitSchema,
- elasticSchema,
postgresSchema,
bigquerySchema,
clickhouseSchema,
diff --git a/apps/studio/components/interfaces/Observability/ObservabilityOverview.tsx b/apps/studio/components/interfaces/Observability/ObservabilityOverview.tsx
index b0c7d614ac0..309f14a3a05 100644
--- a/apps/studio/components/interfaces/Observability/ObservabilityOverview.tsx
+++ b/apps/studio/components/interfaces/Observability/ObservabilityOverview.tsx
@@ -48,11 +48,11 @@ export const ObservabilityOverview = () => {
const handleRefresh = useCallback(() => {
setRefreshKey((prev) => prev + 1)
+ queryClient.invalidateQueries({ queryKey: ['projects', projectRef, 'service-health'] })
queryClient.invalidateQueries({ queryKey: ['project-metrics'] })
- queryClient.invalidateQueries({ queryKey: ['postgrest-overview-metrics'] })
queryClient.invalidateQueries({ queryKey: ['infra-monitoring'] })
queryClient.invalidateQueries({ queryKey: ['max-connections'] })
- }, [queryClient])
+ }, [queryClient, projectRef])
const serviceBase = useMemo(
() => [
diff --git a/apps/studio/components/interfaces/Observability/ServiceHealthTable.tsx b/apps/studio/components/interfaces/Observability/ServiceHealthTable.tsx
index ab092f3ffab..4973ff277b0 100644
--- a/apps/studio/components/interfaces/Observability/ServiceHealthTable.tsx
+++ b/apps/studio/components/interfaces/Observability/ServiceHealthTable.tsx
@@ -96,7 +96,7 @@ const ServiceRow = ({ service, data, onBarClick, datetimeFormat }: ServiceRowPro
<div />
) : (
<LogsBarChart
- data={data.eventChartData}
+ data={data.total === 0 ? [] : data.eventChartData}
DateTimeFormat={datetimeFormat}
onBarClick={onBarClick}
EmptyState={
@@ -109,28 +109,32 @@ const ServiceRow = ({ service, data, onBarClick, datetimeFormat }: ServiceRowPro
</Loading>
</div>
- {data.total > 0 && (
- <div className="flex items-center justify-center mt-2 text-xs text-foreground-lighter gap-4 font-mono tabular-nums tracking-tight">
- {errorRate > 0 && (
- <span className="flex items-center gap-1.5">
- <div className="w-1.5 h-1.5 rounded-full bg-destructive" />
- {errorRate.toFixed(2)}% errors
- </span>
- )}
- {warningRate > 0 && (
- <span className="flex items-center gap-1.5">
- <div className="w-1.5 h-1.5 rounded-full bg-warning" />
- {warningRate.toFixed(2)}% warnings
- </span>
- )}
- {errorRate === 0 && warningRate === 0 && (
- <span className="flex items-center gap-1.5">
- <div className="w-1.5 h-1.5 rounded-full bg-brand" />
- 0% errors
- </span>
- )}
- </div>
- )}
+ <div className="flex items-center justify-center mt-2 text-xs text-foreground-lighter gap-4 font-mono tabular-nums tracking-tight">
+ {data.total > 0 ? (
+ <>
+ {errorRate > 0 && (
+ <span className="flex items-center gap-1.5">
+ <div className="w-1.5 h-1.5 rounded-full bg-destructive" />
+ {errorRate.toFixed(2)}% errors
+ </span>
+ )}
+ {warningRate > 0 && (
+ <span className="flex items-center gap-1.5">
+ <div className="w-1.5 h-1.5 rounded-full bg-warning" />
+ {warningRate.toFixed(2)}% warnings
+ </span>
+ )}
+ {errorRate === 0 && warningRate === 0 && (
+ <span className="flex items-center gap-1.5">
+ <div className="w-1.5 h-1.5 rounded-full bg-brand" />
+ 0% errors
+ </span>
+ )}
+ </>
+ ) : !data.isLoading ? (
+ <span>No requests in this period</span>
+ ) : null}
+ </div>
</Link>
)
}
diff --git a/apps/studio/components/interfaces/Observability/useServiceHealthMetrics.test.ts b/apps/studio/components/interfaces/Observability/useServiceHealthMetrics.test.ts
new file mode 100644
index 00000000000..ecc27af0f78
--- /dev/null
+++ b/apps/studio/components/interfaces/Observability/useServiceHealthMetrics.test.ts
@@ -0,0 +1,84 @@
+import { describe, expect, it } from 'vitest'
+
+import { extractServiceRows } from './useServiceHealthMetrics'
+import type { ServiceHealthResultRow } from '@/data/analytics/service-health-query'
+
+const makeRow = (overrides?: Partial<ServiceHealthResultRow>): ServiceHealthResultRow => ({
+ timestamp: '2026-05-20T10:00:00',
+ postgres_logs: { ok: 10, warning: 1, error: 2, total: 13 },
+ auth_logs: { ok: 5, warning: 0, error: 1, total: 6 },
+ function_edge_logs: { ok: 20, warning: 2, error: 0, total: 22 },
+ storage_logs: { ok: 3, warning: 0, error: 0, total: 3 },
+ realtime_logs: { ok: 0, warning: 0, error: 0, total: 0 },
+ postgrest_logs: { ok: 7, warning: 1, error: 1, total: 9 },
+ edge_logs: { ok: 100, warning: 5, error: 3, total: 108 },
+ supavisor_logs: { ok: 0, warning: 0, error: 0, total: 0 },
+ function_logs: { ok: 15, warning: 0, error: 0, total: 15 },
+ etl_replication_logs: { ok: 0, warning: 0, error: 0, total: 0 },
+ ...overrides,
+})
+
+describe('extractServiceRows', () => {
+ it('maps postgres_logs fields to ok_count/warning_count/error_count for db', () => {
+ const rows = [makeRow()]
+ const result = extractServiceRows(rows, 'db')
+ expect(result).toEqual([
+ { timestamp: '2026-05-20T10:00:00', ok_count: 10, warning_count: 1, error_count: 2 },
+ ])
+ })
+
+ it('maps the correct service field for each service key', () => {
+ const row = makeRow()
+ expect(extractServiceRows([row], 'auth')[0]).toMatchObject({
+ ok_count: 5,
+ error_count: 1,
+ })
+ expect(extractServiceRows([row], 'functions')[0]).toMatchObject({
+ ok_count: 20,
+ error_count: 0,
+ })
+ expect(extractServiceRows([row], 'storage')[0]).toMatchObject({ ok_count: 3 })
+ expect(extractServiceRows([row], 'postgrest')[0]).toMatchObject({
+ ok_count: 7,
+ warning_count: 1,
+ error_count: 1,
+ })
+ })
+
+ it('returns an empty array when given no rows', () => {
+ expect(extractServiceRows([], 'db')).toEqual([])
+ })
+
+ it('preserves the timestamp from each row', () => {
+ const rows = [
+ makeRow({ timestamp: '2026-05-20T09:00:00' }),
+ makeRow({ timestamp: '2026-05-20T10:00:00' }),
+ ]
+ const result = extractServiceRows(rows, 'db')
+ expect(result.map((r) => r.timestamp)).toEqual(['2026-05-20T09:00:00', '2026-05-20T10:00:00'])
+ })
+
+ it('handles multiple rows and maps each independently', () => {
+ const rows = [
+ makeRow({ postgres_logs: { ok: 100, warning: 0, error: 0, total: 100 } }),
+ makeRow({ postgres_logs: { ok: 50, warning: 5, error: 10, total: 65 } }),
+ ]
+ const result = extractServiceRows(rows, 'db')
+ expect(result[0]).toMatchObject({ ok_count: 100, warning_count: 0, error_count: 0 })
+ expect(result[1]).toMatchObject({ ok_count: 50, warning_count: 5, error_count: 10 })
+ })
+
+ it('defaults to 0 when the service field is missing from the row', () => {
+ const row = makeRow()
+ // Simulate a backend response that omits a service field
+ const partial = { ...row } as Partial<ServiceHealthResultRow> & { timestamp: string }
+ delete (partial as any).realtime_logs
+ const result = extractServiceRows([partial as ServiceHealthResultRow], 'realtime')
+ expect(result[0]).toEqual({
+ timestamp: row.timestamp,
+ ok_count: 0,
+ warning_count: 0,
+ error_count: 0,
+ })
+ })
+})
diff --git a/apps/studio/components/interfaces/Observability/useServiceHealthMetrics.ts b/apps/studio/components/interfaces/Observability/useServiceHealthMetrics.ts
index 37591ac7b3a..f30a511b49e 100644
--- a/apps/studio/components/interfaces/Observability/useServiceHealthMetrics.ts
+++ b/apps/studio/components/interfaces/Observability/useServiceHealthMetrics.ts
@@ -1,9 +1,9 @@
import { useQuery } from '@tanstack/react-query'
+import dayjs from 'dayjs'
+import utc from 'dayjs/plugin/utc'
import { useMemo } from 'react'
import type { LogsBarChartDatum } from '../ProjectHome/ProjectUsage.metrics'
-import { LogsTableName } from '../Settings/Logs/Logs.constants'
-import { genChartQuery } from '../Settings/Logs/Logs.utils'
import {
calculateAggregatedMetrics,
calculateDateRange,
@@ -11,9 +11,15 @@ import {
transformToBarChartData,
type RawChartData,
} from './useServiceHealthMetrics.utils'
-import { get } from '@/data/fetchers'
+import { analyticsKeys } from '@/data/analytics/keys'
+import {
+ getServiceHealth,
+ type ServiceHealthGranularity,
+ type ServiceHealthResultRow,
+} from '@/data/analytics/service-health-query'
import { useFillTimeseriesSorted } from '@/hooks/analytics/useFillTimeseriesSorted'
-import useTimeseriesUnixToIso from '@/hooks/analytics/useTimeseriesUnixToIso'
+
+dayjs.extend(utc)
export type ServiceKey = 'db' | 'functions' | 'auth' | 'storage' | 'realtime' | 'postgrest'
@@ -30,112 +36,91 @@ export type ServiceHealthData = {
refresh: () => void
}
-type ServiceConfig = {
- table: LogsTableName
- enabled: boolean
+const INTERVAL_TO_GRANULARITY: Record<'1hr' | '1day' | '7day', ServiceHealthGranularity> = {
+ '1hr': 'minute',
+ '1day': 'hour',
+ '7day': 'day',
}
-const SERVICE_CONFIG: Record<ServiceKey, ServiceConfig> = {
- db: { table: LogsTableName.POSTGRES, enabled: true },
- auth: { table: LogsTableName.AUTH, enabled: true },
- functions: { table: LogsTableName.FN_EDGE, enabled: true },
- storage: { table: LogsTableName.STORAGE, enabled: true },
- realtime: { table: LogsTableName.REALTIME, enabled: true },
- postgrest: { table: LogsTableName.POSTGREST, enabled: true },
+/** Maps our service keys to the field names returned by the service-health endpoint */
+const SERVICE_RESPONSE_KEY: Record<
+ ServiceKey,
+ Exclude<keyof ServiceHealthResultRow, 'timestamp'>
+> = {
+ db: 'postgres_logs',
+ auth: 'auth_logs',
+ functions: 'function_edge_logs',
+ storage: 'storage_logs',
+ realtime: 'realtime_logs',
+ postgrest: 'postgrest_logs',
}
-type ChartQueryResult = {
- timestamp: string | number
- ok_count: number
- warning_count: number
- error_count: number
-}
-
-/**
- * Fetches service health metrics using the same logic as the logs pages
- */
-const fetchServiceHealthMetrics = async (
- projectRef: string,
- table: LogsTableName,
- startDate: string,
- endDate: string,
- signal?: AbortSignal
-): Promise<ChartQueryResult[]> => {
- const sql = genChartQuery(
- table,
- {
- iso_timestamp_start: startDate,
- iso_timestamp_end: endDate,
- },
- {}
- )
-
- const { data, error } = await get(`/platform/projects/{ref}/analytics/endpoints/logs.all`, {
- params: {
- path: { ref: projectRef },
- query: {
- sql,
- iso_timestamp_start: startDate,
- iso_timestamp_end: endDate,
- },
- },
- signal,
+/** Extracts a single service's timeseries rows from the shared service-health response */
+export function extractServiceRows(rows: ServiceHealthResultRow[], serviceKey: ServiceKey) {
+ const responseKey = SERVICE_RESPONSE_KEY[serviceKey]
+ return rows.map((row) => {
+ const svc = row[responseKey]
+ return {
+ timestamp: row.timestamp,
+ ok_count: svc?.ok ?? 0,
+ warning_count: svc?.warning ?? 0,
+ error_count: svc?.error ?? 0,
+ }
})
-
- if (error ?? data?.error) {
- throw error ?? data?.error
- }
-
- return (data?.result ?? []) as ChartQueryResult[]
}
/**
- * Hook to fetch health metrics for a single service
+ * Hook to fetch and process health metrics for a single service.
+ * All service hooks share one deduplicated network request via the same query key.
*/
const useServiceHealthQuery = ({
projectRef,
serviceKey,
startDate,
endDate,
+ granularity,
enabled,
}: {
projectRef: string
serviceKey: ServiceKey
startDate: string
endDate: string
+ granularity: ServiceHealthGranularity
enabled: boolean
}) => {
- const config = SERVICE_CONFIG[serviceKey]
- const table = config.table
-
const queryResult = useQuery({
- queryKey: ['service-health-metrics', projectRef, serviceKey, startDate, endDate, table],
+ queryKey: analyticsKeys.serviceHealth(projectRef, { startDate, endDate, granularity }),
queryFn: ({ signal }) =>
- fetchServiceHealthMetrics(projectRef, table, startDate, endDate, signal),
- enabled: enabled && config.enabled && Boolean(projectRef),
- staleTime: 1000 * 60, // 1 minute
+ getServiceHealth({ projectRef, startDate, endDate, granularity }, signal),
+ enabled: enabled && Boolean(projectRef),
+ staleTime: 1000 * 60,
})
- // Convert unix microseconds to ISO timestamps
- const normalizedData = useTimeseriesUnixToIso(queryResult.data ?? [], 'timestamp')
+ const rawRows = useMemo(
+ () => extractServiceRows(queryResult.data?.result ?? [], serviceKey),
+ [queryResult.data, serviceKey]
+ )
+
+ // Snap start/end to the granularity boundary so fillTimeseries iterates
+ // in sync with the API's bucketed timestamps (e.g. midnight for 'day').
+ const fillStart = dayjs.utc(startDate).startOf(granularity).toISOString()
+ const fillEnd = dayjs.utc(endDate).startOf(granularity).toISOString()
// Fill gaps in timeseries
const { data: filledData } = useFillTimeseriesSorted({
- data: normalizedData,
+ data: rawRows,
timestampKey: 'timestamp',
- valueKey: 'ok_count',
+ valueKey: ['ok_count', 'warning_count', 'error_count'],
defaultValue: 0,
- startDate,
- endDate,
+ startDate: fillStart,
+ endDate: fillEnd,
})
- // Transform to LogsBarChartDatum format
const eventChartData: LogsBarChartDatum[] = useMemo(
() => transformToBarChartData(filledData as RawChartData[]),
[filledData]
)
- // Calculate metrics
const metrics = useMemo(() => calculateHealthMetrics(eventChartData), [eventChartData])
return {
@@ -148,71 +133,34 @@ const useServiceHealthQuery = ({
}
/**
- * Hook to fetch observability overview data for all services using logs page queries
+ * Hook to fetch observability overview data for all services using the service-health endpoint.
+ * One network request is made; results are fanned out to each service by field name.
*/
export const useServiceHealthMetrics = (
projectRef: string,
interval: '1hr' | '1day' | '7day',
refreshKey: number
) => {
- // Calculate date range based on interval
- // refreshKey is intentionally included to force recalculation when user refreshes
// eslint-disable-next-line react-hooks/exhaustive-deps
const { startDate, endDate } = useMemo(() => calculateDateRange(interval), [interval, refreshKey])
+ const granularity = INTERVAL_TO_GRANULARITY[interval]
const enabled = Boolean(projectRef)
- // Fetch metrics for each service
- const db = useServiceHealthQuery({ projectRef, serviceKey: 'db', startDate, endDate, enabled })
- const auth = useServiceHealthQuery({
- projectRef,
- serviceKey: 'auth',
- startDate,
- endDate,
- enabled,
- })
- const functions = useServiceHealthQuery({
- projectRef,
- serviceKey: 'functions',
- startDate,
- endDate,
- enabled,
- })
- const storage = useServiceHealthQuery({
- projectRef,
- serviceKey: 'storage',
- startDate,
- endDate,
- enabled,
- })
- const realtime = useServiceHealthQuery({
- projectRef,
- serviceKey: 'realtime',
- startDate,
- endDate,
- enabled,
- })
- const postgrest = useServiceHealthQuery({
- projectRef,
- serviceKey: 'postgrest',
- startDate,
- endDate,
- enabled,
- })
+ const sharedParams = { projectRef, startDate, endDate, granularity, enabled }
+
+ const db = useServiceHealthQuery({ ...sharedParams, serviceKey: 'db' })
+ const auth = useServiceHealthQuery({ ...sharedParams, serviceKey: 'auth' })
+ const functions = useServiceHealthQuery({ ...sharedParams, serviceKey: 'functions' })
+ const storage = useServiceHealthQuery({ ...sharedParams, serviceKey: 'storage' })
+ const realtime = useServiceHealthQuery({ ...sharedParams, serviceKey: 'realtime' })
+ const postgrest = useServiceHealthQuery({ ...sharedParams, serviceKey: 'postgrest' })
const services: Record<ServiceKey, ServiceHealthData> = useMemo(
- () => ({
- db,
- auth,
- functions,
- storage,
- realtime,
- postgrest,
- }),
+ () => ({ db, auth, functions, storage, realtime, postgrest }),
[db, auth, functions, storage, realtime, postgrest]
)
- // Calculate aggregated metrics
const aggregated = useMemo(() => calculateAggregatedMetrics(Object.values(services)), [services])
const isLoading = Object.values(services).some((s) => s.isLoading)
diff --git a/apps/studio/data/analytics/keys.ts b/apps/studio/data/analytics/keys.ts
index f3aea771094..966d2f80419 100644
--- a/apps/studio/data/analytics/keys.ts
+++ b/apps/studio/data/analytics/keys.ts
@@ -155,6 +155,19 @@ export const analyticsKeys = {
usageApiRequestsCount: (projectRef: string | undefined) =>
['projects', projectRef, 'usage.api-requests-count'] as const,
+
+ serviceHealth: (
+ projectRef: string | undefined,
+ {
+ startDate,
+ endDate,
+ granularity,
+ }: {
+ startDate?: string
+ endDate?: string
+ granularity?: string
+ }
+ ) => ['projects', projectRef, 'service-health', { startDate, endDate, granularity }] as const,
}
function isoDateStringToDate(isoDateString: string | undefined): string | undefined {
diff --git a/apps/studio/data/analytics/service-health-query.ts b/apps/studio/data/analytics/service-health-query.ts
new file mode 100644
index 00000000000..66cb364f268
--- /dev/null
+++ b/apps/studio/data/analytics/service-health-query.ts
@@ -0,0 +1,68 @@
+import { get, handleError } from '@/data/fetchers'
+
+export type ServiceHealthGranularity = 'day' | 'hour' | 'minute'
+
+export type ServiceHealthServiceData = {
+ error: number
+ ok: number
+ warning: number
+ total: number
+}
+
+/** Shape of a single result row returned by the service-health endpoint */
+export type ServiceHealthResultRow = {
+ timestamp: string
+ postgres_logs: ServiceHealthServiceData
+ auth_logs: ServiceHealthServiceData
+ function_edge_logs: ServiceHealthServiceData
+ storage_logs: ServiceHealthServiceData
+ realtime_logs: ServiceHealthServiceData
+ postgrest_logs: ServiceHealthServiceData
+ edge_logs: ServiceHealthServiceData
+ supavisor_logs: ServiceHealthServiceData
+ function_logs: ServiceHealthServiceData
+ etl_replication_logs: ServiceHealthServiceData
+}
+
+export type ProjectServiceHealthResponse = {
+ error?: string | null
+ result?: ServiceHealthResultRow[]
+}
+
+export type ServiceHealthVariables = {
+ projectRef?: string
+ startDate?: string
+ endDate?: string
+ granularity?: ServiceHealthGranularity
+}
+
+export async function getServiceHealth(
+ { projectRef, startDate, endDate, granularity }: ServiceHealthVariables,
+ signal?: AbortSignal
+): Promise<ProjectServiceHealthResponse> {
+ if (!projectRef) throw new Error('Project ref is required')
+ if (!startDate) throw new Error('Start date is required')
+ if (!endDate) throw new Error('End date is required')
+
+ const { data, error } = await get('/platform/projects/{ref}/analytics/endpoints/service-health', {
+ params: {
+ path: { ref: projectRef },
+ query: {
+ iso_timestamp_start: startDate,
+ iso_timestamp_end: endDate,
+ granularity,
+ },
+ },
+ signal,
+ })
+
+ if (error) handleError(error)
+
+ const result = data as unknown as ProjectServiceHealthResponse
+ if (result?.error)
+ throw new Error(
+ typeof result.error === 'string' ? result.error : 'Failed to fetch service health'
+ )
+
+ return result
+}
diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts
index f0bf0352afa..187a5310bf5 100644
--- a/packages/api-types/types/platform.d.ts
+++ b/packages/api-types/types/platform.d.ts
@@ -951,6 +951,43 @@ export interface paths {
patch: operations['OrganizationSlugController_updateOrganization']
trace?: never
}
+ '/platform/organizations/{slug}/analytics/audit-log-drains': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Lists all audit log drains for an organization */
+ get: operations['AuditLogDrainController_listAuditLogDrains']
+ put?: never
+ /** Create an audit log drain */
+ post: operations['AuditLogDrainController_createAuditLogDrain']
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/platform/organizations/{slug}/analytics/audit-log-drains/{token}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ /** Update an audit log drain */
+ put: operations['AuditLogDrainController_updateAuditLogDrain']
+ post?: never
+ /** Delete an audit log drain */
+ delete: operations['AuditLogDrainController_deleteAuditLogDrain']
+ options?: never
+ head?: never
+ /** Patch an audit log drain */
+ patch: operations['AuditLogDrainController_patchAuditLogDrain']
+ trace?: never
+ }
'/platform/organizations/{slug}/apps': {
parameters: {
query?: never
@@ -2505,6 +2542,23 @@ export interface paths {
patch?: never
trace?: never
}
+ '/platform/projects/{ref}/analytics/endpoints/service-health': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Gets project's service health based on log levels */
+ get: operations['UsageApiController_getProjectServiceHealth']
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/platform/projects/{ref}/analytics/endpoints/usage.api-counts': {
parameters: {
query?: never
@@ -4919,6 +4973,7 @@ export interface components {
| 'ALREADY_MANAGED_BY_PARTNER'
| 'ALREADY_MANAGED_BY_PARTNER_AWS'
| 'OVERDUE_INVOICES'
+ | 'IN_ARREARS_BILLING_MODE'
)[]
slug: string
}[]
@@ -4995,11 +5050,6 @@ export interface components {
api_key?: string
region?: string
}
- | {
- password?: string | null
- url?: string
- username?: string | null
- }
| {
headers?: {
[key: string]: string
@@ -5036,7 +5086,6 @@ export interface components {
| 'clickhouse'
| 'webhook'
| 'datadog'
- | 'elastic'
| 'loki'
| 'sentry'
| 's3'
@@ -7357,21 +7406,6 @@ export interface components {
MAILER_SUBJECTS_PHONE_CHANGED_NOTIFICATION: string
MAILER_SUBJECTS_REAUTHENTICATION: string
MAILER_SUBJECTS_RECOVERY: string
- MAILER_SUBJECTS_CUSTOM_CONTENTS: {
- MAILER_SUBJECTS_CONFIRMATION: boolean
- MAILER_SUBJECTS_EMAIL_CHANGE: boolean
- MAILER_SUBJECTS_EMAIL_CHANGED_NOTIFICATION: boolean
- MAILER_SUBJECTS_IDENTITY_LINKED_NOTIFICATION: boolean
- MAILER_SUBJECTS_IDENTITY_UNLINKED_NOTIFICATION: boolean
- MAILER_SUBJECTS_INVITE: boolean
- MAILER_SUBJECTS_MAGIC_LINK: boolean
- MAILER_SUBJECTS_MFA_FACTOR_ENROLLED_NOTIFICATION: boolean
- MAILER_SUBJECTS_MFA_FACTOR_UNENROLLED_NOTIFICATION: boolean
- MAILER_SUBJECTS_PASSWORD_CHANGED_NOTIFICATION: boolean
- MAILER_SUBJECTS_PHONE_CHANGED_NOTIFICATION: boolean
- MAILER_SUBJECTS_REAUTHENTICATION: boolean
- MAILER_SUBJECTS_RECOVERY: boolean
- }
MAILER_TEMPLATES_CONFIRMATION_CONTENT: string
MAILER_TEMPLATES_CUSTOM_CONTENTS: {
MAILER_TEMPLATES_CONFIRMATION_CONTENT: boolean
@@ -7559,11 +7593,6 @@ export interface components {
api_key?: string
region?: string
}
- | {
- password?: string | null
- url?: string
- username?: string | null
- }
| {
headers?: {
[key: string]: string
@@ -7607,7 +7636,6 @@ export interface components {
| 'clickhouse'
| 'webhook'
| 'datadog'
- | 'elastic'
| 'loki'
| 'sentry'
| 's3'
@@ -7662,6 +7690,7 @@ export interface components {
| 'ipv4'
| 'pitr.available_variants'
| 'log_drains'
+ | 'audit_log_drains'
| 'branching_limit'
| 'branching_persistent'
| 'auth.mfa_phone'
@@ -7679,6 +7708,7 @@ export interface components {
| 'auth.custom_oauth.max_providers'
| 'backup.retention_days'
| 'backup.restore_to_new_project'
+ | 'backup.schedule'
| 'function.max_count'
| 'function.size_limit_mb'
| 'realtime.max_concurrent_users'
@@ -8338,16 +8368,6 @@ export interface components {
overdue_invoice_count: number
}
PartnerIntegrationsResponse: {
- /**
- * Format: date-time
- * @description When the integration link expires (1 hour from creation). The user must begin the flow before this time.
- */
- expiresAt: string
- /**
- * Format: uuid
- * @description Unique identifier for the integration record
- */
- integrationId: string
/**
* Format: uri
* @description URL to redirect the user's browser to
@@ -9130,6 +9150,18 @@ export interface components {
ProjectSensitivityResponse: {
is_sensitive: boolean
}
+ ProjectServiceHealthResponse: {
+ /** @enum {string} */
+ granularity?: 'day' | 'hour' | 'minute'
+ /** @example 2025-03-01T23:59:59Z */
+ iso_timestamp_end: string
+ /** @example 2025-03-01T00:00:00Z */
+ iso_timestamp_start: string
+ /** @example s:edge_logs */
+ lql?: string
+ /** @example select timestamp, edge_logs from service_health */
+ sql?: string
+ }
ProjectSettingsResponse: {
app_config?: {
db_schema: string
@@ -10673,11 +10705,6 @@ export interface components {
api_key?: string
region?: string
}
- | {
- password?: string | null
- url?: string
- username?: string | null
- }
| {
headers?: {
[key: string]: string
@@ -10714,7 +10741,6 @@ export interface components {
| 'clickhouse'
| 'webhook'
| 'datadog'
- | 'elastic'
| 'loki'
| 'sentry'
| 's3'
@@ -14795,6 +14821,272 @@ export interface operations {
}
}
}
+ AuditLogDrainController_listAuditLogDrains: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Organization slug */
+ slug: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['LFBackend'][]
+ }
+ }
+ /** @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 fetch audit log drains */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
+ AuditLogDrainController_createAuditLogDrain: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Organization slug */
+ slug: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['CreateBackendParamsOpenapi']
+ }
+ }
+ responses: {
+ 201: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['LFBackend']
+ }
+ }
+ /** @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 create an audit log drain */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
+ AuditLogDrainController_updateAuditLogDrain: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Organization slug */
+ slug: string
+ /** @description Audit log drain identifier */
+ token: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['UpdateBackendParamsOpenapi']
+ }
+ }
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['LFBackend']
+ }
+ }
+ /** @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 audit log drain */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
+ AuditLogDrainController_deleteAuditLogDrain: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Organization slug */
+ slug: string
+ /** @description Audit log drain identifier */
+ token: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ 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
+ }
+ /** @description Failed to delete an audit log drain */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
+ AuditLogDrainController_patchAuditLogDrain: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Organization slug */
+ slug: string
+ /** @description Audit log drain identifier */
+ token: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['UpdateBackendParamsOpenapi']
+ }
+ }
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['LFBackend']
+ }
+ }
+ /** @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 patch audit log drain */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
PlatformAppsController_listPlatformApps: {
parameters: {
query?: never
@@ -16531,7 +16823,10 @@ export interface operations {
parameters: {
query?: never
header?: never
- path?: never
+ path: {
+ /** @description Organization slug */
+ slug: string
+ }
cookie?: never
}
requestBody: {
@@ -19347,6 +19642,7 @@ export interface operations {
| 'ipv4'
| 'pitr.available_variants'
| 'log_drains'
+ | 'audit_log_drains'
| 'branching_limit'
| 'branching_persistent'
| 'auth.mfa_phone'
@@ -19364,6 +19660,7 @@ export interface operations {
| 'auth.custom_oauth.max_providers'
| 'backup.retention_days'
| 'backup.restore_to_new_project'
+ | 'backup.schedule'
| 'function.max_count'
| 'function.size_limit_mb'
| 'realtime.max_concurrent_users'
@@ -20473,6 +20770,62 @@ export interface operations {
}
}
}
+ UsageApiController_getProjectServiceHealth: {
+ parameters: {
+ query: {
+ granularity?: 'day' | 'hour' | 'minute'
+ iso_timestamp_end: string
+ iso_timestamp_start: string
+ lql?: string
+ sql?: string
+ }
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['ProjectServiceHealthResponse']
+ }
+ }
+ /** @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 get project's service health */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
UsageApiController_getApiCounts: {
parameters: {
query?: {