Skip to content

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

Support restarting replicas (#26240)

Joshen Lim99635fbb5e26
diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DropReplicaConfirmationModal.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DropReplicaConfirmationModal.tsx
index 18b6a21fbb2..3f5c1734f95 100644
--- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DropReplicaConfirmationModal.tsx
+++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DropReplicaConfirmationModal.tsx
@@ -1,17 +1,10 @@
-import { useParams } from 'common'
import toast from 'react-hot-toast'
-import {
- AlertDescription_Shadcn_,
- AlertTitle_Shadcn_,
- Alert_Shadcn_,
- IconAlertTriangle,
- Modal,
-} from 'ui'
-import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
+import { useParams } from 'common'
import { useReadReplicaRemoveMutation } from 'data/read-replicas/replica-remove-mutation'
import type { Database } from 'data/read-replicas/replicas-query'
import { formatDatabaseID } from 'data/read-replicas/replicas.utils'
+import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
interface DropReplicaConfirmationModalProps {
selectedReplica?: Database
diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx
index e34538d6d05..fe6c905ab82 100644
--- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx
+++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx
@@ -29,6 +29,7 @@ import { REPLICA_STATUS } from './InstanceConfiguration.constants'
import { addRegionNodes, generateNodes, getDagreGraphLayout } from './InstanceConfiguration.utils'
import { LoadBalancerNode, PrimaryNode, RegionNode, ReplicaNode } from './InstanceNode'
import MapView from './MapView'
+import { RestartReplicaConfirmationModal } from './RestartReplicaConfirmationModal'
// [Joshen] Just FYI, UI assumes single provider for primary + replicas
// [Joshen] Idea to visualize grouping based on region: https://reactflow.dev/examples/layout/sub-flows
@@ -259,6 +260,7 @@ const InstanceConfigurationUI = () => {
setNewReplicaRegion(region)
setShowNewReplicaPanel(true)
}}
+ onSelectRestartReplica={setSelectedReplicaToRestart}
onSelectDropReplica={setSelectedReplicaToDrop}
/>
)}
@@ -288,28 +290,13 @@ const InstanceConfigurationUI = () => {
onCancel={() => setShowDeleteAllModal(false)}
/>
- <ComputeInstanceSidePanel />
-
- {/* <ConfirmationModal
- size="medium"
- visible={selectedReplicaToRestart !== undefined}
- title="Confirm to restart selected replica?"
- confirmLabel="Restart replica"
- confirmLabelLoading="Restarting replica"
+ <RestartReplicaConfirmationModal
+ selectedReplica={selectedReplicaToRestart}
+ onSuccess={() => setRefetchInterval(5000)}
onCancel={() => setSelectedReplicaToRestart(undefined)}
- onConfirm={() => onConfirmRestartReplica()}
- >
- <p className="text-sm">Before restarting the replica, consider:</p>
- <ul className="text-sm text-foreground-light py-1 list-disc mx-4 space-y-1">
- <li>
- Network traffic from this region may slow down while the replica is restarting,
- especially if you have no other replicas in this region
- </li>
- </ul>
- <p className="text-sm mt-2">
- Are you sure you want to restart this replica (ID: {selectedReplicaToRestart?.id}) now?{' '}
- </p>
- </ConfirmationModal> */}
+ />
+
+ <ComputeInstanceSidePanel />
</>
)
}
diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceNode.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceNode.tsx
index 9004109acd2..b2e3c62918e 100644
--- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceNode.tsx
+++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceNode.tsx
@@ -240,7 +240,7 @@ export const ReplicaNode = ({ data }: NodeProps<ReplicaNodeData>) => {
) : status === REPLICA_STATUS.GOING_DOWN ? (
<Badge>Going down</Badge>
) : status === REPLICA_STATUS.RESTORING ? (
- <Badge>Restoring</Badge>
+ <Badge>Restarting</Badge>
) : (
<Badge variant="warning">Unhealthy</Badge>
)}
@@ -270,9 +270,9 @@ export const ReplicaNode = ({ data }: NodeProps<ReplicaNodeData>) => {
</Link>
</DropdownMenuItem>
<DropdownMenuSeparator />
- {/* <DropdownMenuItem className="gap-x-2" onClick={() => onSelectRestartReplica()}>
- Restart replica
- </DropdownMenuItem> */}
+ <DropdownMenuItem className="gap-x-2" onClick={() => onSelectRestartReplica()}>
+ Restart replica
+ </DropdownMenuItem>
{/* <DropdownMenuItem className="gap-x-2" onClick={() => onSelectResizeReplica()}>
Resize replica
</DropdownMenuItem> */}
diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/MapView.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/MapView.tsx
index 11c371bb4e1..561803d7d05 100644
--- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/MapView.tsx
+++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/MapView.tsx
@@ -2,7 +2,7 @@ import { useParams } from 'common'
import dayjs from 'dayjs'
import { partition, uniqBy } from 'lodash'
import Link from 'next/link'
-import { useEffect, useMemo, useState } from 'react'
+import { useEffect, useState } from 'react'
import {
ComposableMap,
Geographies,
@@ -17,25 +17,31 @@ import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
+ DropdownMenuSeparator,
DropdownMenuTrigger,
- IconMoreVertical,
ScrollArea,
} from 'ui'
import { Database, useReadReplicasQuery } from 'data/read-replicas/replicas-query'
import { formatDatabaseID } from 'data/read-replicas/replicas.utils'
-import { AWS_REGIONS_KEYS, BASE_PATH, PROJECT_STATUS } from 'lib/constants'
-import { AVAILABLE_REPLICA_REGIONS } from './InstanceConfiguration.constants'
+import { AWS_REGIONS_KEYS, BASE_PATH } from 'lib/constants'
+import { MoreVertical } from 'lucide-react'
+import { AVAILABLE_REPLICA_REGIONS, REPLICA_STATUS } from './InstanceConfiguration.constants'
import GeographyData from './MapData.json'
// [Joshen] Foresee that we'll skip this view for initial launch
interface MapViewProps {
onSelectDeployNewReplica: (region: AWS_REGIONS_KEYS) => void
+ onSelectRestartReplica: (database: Database) => void
onSelectDropReplica: (database: Database) => void
}
-const MapView = ({ onSelectDeployNewReplica, onSelectDropReplica }: MapViewProps) => {
+const MapView = ({
+ onSelectDeployNewReplica,
+ onSelectRestartReplica,
+ onSelectDropReplica,
+}: MapViewProps) => {
const { ref } = useParams()
const [mount, setMount] = useState(false)
const [zoom, setZoom] = useState<number>(1.5)
@@ -63,14 +69,10 @@ const MapView = ({ onSelectDeployNewReplica, onSelectDropReplica }: MapViewProps
const selectedRegion = AVAILABLE_REPLICA_REGIONS.find(
(region) => region.region === selectedRegionKey
)
- const databasesInSelectedRegion = useMemo(
- () =>
- databases
- .filter((database) => database.region.includes(selectedRegionKey))
- .sort((a, b) => (a.inserted_at > b.inserted_at ? 1 : 0))
- .sort((database) => (database.identifier === ref ? -1 : 0)),
- [ref, selectedRegionKey]
- )
+ const databasesInSelectedRegion = databases
+ .filter((database) => database.region.includes(selectedRegionKey))
+ .sort((a, b) => (a.inserted_at > b.inserted_at ? 1 : 0))
+ .sort((database) => (database.identifier === ref ? -1 : 0))
useEffect(() => {
setTimeout(() => setMount(true), 100)
@@ -257,10 +259,12 @@ const MapView = ({ onSelectDeployNewReplica, onSelectDropReplica }: MapViewProps
database.identifier.length > 0 &&
`(ID: ${formatDatabaseID(database.identifier)})`
}`}
- {database.status === PROJECT_STATUS.ACTIVE_HEALTHY ? (
+ {database.status === REPLICA_STATUS.ACTIVE_HEALTHY ? (
<Badge variant="brand">Healthy</Badge>
- ) : database.status === PROJECT_STATUS.COMING_UP ? (
+ ) : database.status === REPLICA_STATUS.COMING_UP ? (
<Badge>Coming up</Badge>
+ ) : database.status === REPLICA_STATUS.RESTORING ? (
+ <Badge>Restarting</Badge>
) : (
<Badge variant="warning">Unhealthy</Badge>
)}
@@ -273,9 +277,9 @@ const MapView = ({ onSelectDeployNewReplica, onSelectDropReplica }: MapViewProps
{database.identifier !== ref && (
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
- <Button type="text" icon={<IconMoreVertical />} className="px-1" />
+ <Button type="text" icon={<MoreVertical />} className="px-1" />
</DropdownMenuTrigger>
- <DropdownMenuContent className="p-0 w-40" side="bottom" align="end">
+ <DropdownMenuContent className="w-40" side="bottom" align="end">
<DropdownMenuItem className="gap-x-2">
<Link
href={`/project/${ref}/settings/database?connectionString=${database.identifier}`}
@@ -283,7 +287,13 @@ const MapView = ({ onSelectDeployNewReplica, onSelectDropReplica }: MapViewProps
View connection string
</Link>
</DropdownMenuItem>
- <div className="border-t" />
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ className="gap-x-2"
+ onClick={() => onSelectRestartReplica(database)}
+ >
+ Restart replica
+ </DropdownMenuItem>
<DropdownMenuItem
className="gap-x-2"
onClick={() => onSelectDropReplica(database)}
diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/RestartReplicaConfirmationModal.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/RestartReplicaConfirmationModal.tsx
new file mode 100644
index 00000000000..8acc83bb4bb
--- /dev/null
+++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/RestartReplicaConfirmationModal.tsx
@@ -0,0 +1,81 @@
+import toast from 'react-hot-toast'
+
+import { useProjectRestartMutation } from 'data/projects/project-restart-mutation'
+import { Database } from 'data/read-replicas/replicas-query'
+import { formatDatabaseID } from 'data/read-replicas/replicas.utils'
+import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
+import { useParams } from 'common'
+import { useQueryClient } from '@tanstack/react-query'
+import { replicaKeys } from 'data/read-replicas/keys'
+import { REPLICA_STATUS } from './InstanceConfiguration.constants'
+
+interface RestartReplicaConfirmationModalProps {
+ selectedReplica?: Database
+ onSuccess: () => void
+ onCancel: () => void
+}
+
+export const RestartReplicaConfirmationModal = ({
+ selectedReplica,
+ onSuccess,
+ onCancel,
+}: RestartReplicaConfirmationModalProps) => {
+ const { ref } = useParams()
+ const queryClient = useQueryClient()
+ const formattedId = formatDatabaseID(selectedReplica?.identifier ?? '')
+
+ const { mutate: restartProject, isLoading: isRestartingProject } = useProjectRestartMutation({
+ onSuccess: () => {
+ toast.success(`Restarting read replica (ID: ${formattedId})`)
+
+ // [Joshen] Temporarily optimistic rendering until API supports immediate status update
+ queryClient.setQueriesData<any>(replicaKeys.list(ref), (old: Database[]) => {
+ const updatedReplicas = old.map((x) => {
+ if (x.identifier === selectedReplica?.identifier) {
+ return { ...x, status: REPLICA_STATUS.RESTORING }
+ } else {
+ return x
+ }
+ })
+ return updatedReplicas
+ })
+
+ onSuccess()
+ onCancel()
+ },
+ onError: (error) => {
+ toast.error(`Failed to restart replica: ${error.message}`)
+ },
+ })
+
+ const onConfirmRestartReplica = () => {
+ if (!ref) return console.error('Project is required')
+ if (selectedReplica === undefined) return toast.error('No replica selected')
+ restartProject({ ref, identifier: selectedReplica.identifier })
+ }
+
+ return (
+ <ConfirmationModal
+ size="medium"
+ loading={isRestartingProject}
+ visible={selectedReplica !== undefined}
+ title={`Confirm to restart selected replica? (ID: ${formattedId})`}
+ confirmLabel="Restart replica"
+ confirmLabelLoading="Restarting replica"
+ onCancel={() => onCancel()}
+ onConfirm={() => onConfirmRestartReplica()}
+ >
+ <p className="text-sm">
+ Your replica will be offline for a few minutes while it is being restarted. Before
+ restarting the replica, consider:
+ </p>
+ <ul className="text-sm text-foreground-light py-1 list-disc mx-4 space-y-1">
+ <li>
+ Network traffic from this region may slow down while the replica is restarting, especially
+ if you have no other replicas in this region
+ </li>
+ </ul>
+ <p className="text-sm mt-2">Are you sure you want to restart this replica now?</p>
+ </ConfirmationModal>
+ )
+}
diff --git a/apps/studio/data/projects/project-restart-mutation.ts b/apps/studio/data/projects/project-restart-mutation.ts
index f6de0ae1be2..c00e4ad09db 100644
--- a/apps/studio/data/projects/project-restart-mutation.ts
+++ b/apps/studio/data/projects/project-restart-mutation.ts
@@ -3,14 +3,22 @@ import { toast } from 'react-hot-toast'
import { post } from 'data/fetchers'
import type { ResponseError } from 'types'
+import type { components } from 'api-types'
export type ProjectRestartVariables = {
ref: string
+ identifier?: string
}
-export async function restartProject({ ref }: ProjectRestartVariables) {
+type RestartProjectBody = components['schemas']['RestartProjectInfo']
+
+export async function restartProject({ ref, identifier }: ProjectRestartVariables) {
+ const payload: RestartProjectBody = {}
+ if (identifier !== undefined) payload.database_identifier = identifier
+
const { data, error } = await post('/platform/projects/{ref}/restart', {
params: { path: { ref } },
+ body: payload,
})
if (error) throw error
return data
diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.ts
index f05b7377788..934edab64f2 100644
--- a/packages/api-types/types/api.d.ts
+++ b/packages/api-types/types/api.d.ts
@@ -136,16 +136,6 @@ export interface paths {
/** Enables Database Webhooks on the project */
post: operations['HooksController_enableHooks']
}
- '/platform/database/{ref}/owner-reassign': {
- /** Gets the status of owner reassignment */
- get: operations['OwnerController_getOwnerReassignStatus']
- /** Reassigns object owner from supabase_admin to temp */
- post: operations['OwnerController_applyOwnerReassign']
- /** Rollback object owner from temp to supabase_admin */
- delete: operations['OwnerController_rollbackOwnerReassign']
- /** Reassigns object owner from temp to postgres */
- patch: operations['OwnerController_finaliseOwnerReassign']
- }
'/platform/organizations': {
/** Gets user's organizations */
get: operations['OrganizationsController_getOrganizations']
@@ -555,6 +545,10 @@ export interface paths {
/** Restarts project */
post: operations['RestartController_restartProject']
}
+ '/platform/projects/{ref}/run-lints': {
+ /** Run project lints */
+ get: operations['ProjectRunLintsController_runProjectLints']
+ }
'/platform/projects/{ref}': {
/** Gets a specific project that belongs to the authenticated user */
get: operations['ProjectsRefController_getProject']
@@ -928,16 +922,6 @@ export interface paths {
/** Gets GoTrue template */
get: operations['SystemAuthTemplateController_getTemplate']
}
- '/system/database/{ref}/owner/owner-reassign': {
- /** Gets the status of owner reassignment */
- get: operations['DatabaseOwnerController_getOwnerReassignStatus']
- /** Reassigns object owner from supabase_admin to temp */
- post: operations['DatabaseOwnerController_applyOwnerReassign']
- /** Rollback object owner from temp to supabase_admin */
- delete: operations['DatabaseOwnerController_rollbackOwnerReassign']
- /** Reassigns object owner from temp to postgres */
- patch: operations['DatabaseOwnerController_finaliseOwnerReassign']
- }
'/system/database/{ref}/password': {
/** Updates the database password */
patch: operations['DatabasePasswordController_updatePassword']
@@ -2489,16 +2473,6 @@ export interface components {
PointInTimeRestoreBody: {
recovery_time_target_unix: number
}
- OwnerResponse: {
- project_ref: string
- /** @enum {string} */
- current: 'unmigrated' | 'temp_role' | 'migrated'
- /** @enum {string} */
- desired: 'unmigrated' | 'temp_role' | 'migrated'
- created_at: string
- modified_at: string
- migrated_at: string | null
- }
OrganizationResponse: {
/** @enum {string|null} */
restriction_status: 'grace_period' | 'grace_period_over' | 'restricted' | null
@@ -3742,10 +3716,13 @@ export interface components {
id: string
inserted_at: string
updated_at: string
- type: Record<string, never>
- visibility: Record<string, never>
+ /** @enum {string} */
+ type: 'sql' | 'report' | 'log_sql'
+ /** @enum {string} */
+ visibility: 'user' | 'project' | 'org' | 'public'
name: string
description?: string
+ content: Record<string, never>
project_id: number
owner_id: number
last_updated_by?: number
@@ -3758,10 +3735,13 @@ export interface components {
id: string
inserted_at: string
updated_at: string
- type: Record<string, never>
- visibility: Record<string, never>
+ /** @enum {string} */
+ type: 'sql' | 'report' | 'log_sql'
+ /** @enum {string} */
+ visibility: 'user' | 'project' | 'org' | 'public'
name: string
description?: string
+ content: Record<string, never>
project_id: number
owner_id: number
last_updated_by?: number
@@ -3781,10 +3761,13 @@ export interface components {
id: string
inserted_at: string
updated_at: string
- type: Record<string, never>
- visibility: Record<string, never>
+ /** @enum {string} */
+ type: 'sql' | 'report' | 'log_sql'
+ /** @enum {string} */
+ visibility: 'user' | 'project' | 'org' | 'public'
name: string
description?: string
+ content: Record<string, never>
project_id: number
owner_id: number
last_updated_by?: number
@@ -3805,10 +3788,13 @@ export interface components {
id: string
inserted_at: string
updated_at: string
- type: Record<string, never>
- visibility: Record<string, never>
+ /** @enum {string} */
+ type: 'sql' | 'report' | 'log_sql'
+ /** @enum {string} */
+ visibility: 'user' | 'project' | 'org' | 'public'
name: string
description?: string
+ content: Record<string, never>
project_id: number
owner_id: number
last_updated_by?: number
@@ -3864,8 +3850,10 @@ export interface components {
id: string
inserted_at: string
updated_at: string
- type: Record<string, never>
- visibility: Record<string, never>
+ /** @enum {string} */
+ type: 'sql' | 'report' | 'log_sql'
+ /** @enum {string} */
+ visibility: 'user' | 'project' | 'org' | 'public'
name: string
description?: string
project_id: number
@@ -3953,6 +3941,47 @@ export interface components {
ResizeBody: {
volume_size_gb: number
}
+ RestartProjectInfo: {
+ database_identifier?: string
+ }
+ ProjectLintMetadata: {
+ /** @enum {string} */
+ type?: 'table' | 'view' | 'auth' | 'function' | 'extension'
+ schema?: string
+ name?: string
+ entity?: string
+ fkey_name?: string
+ fkey_columns?: number[]
+ }
+ ProjectLintResponse: {
+ /** @enum {string} */
+ name:
+ | 'unindexed_foreign_keys'
+ | 'auth_users_exposed'
+ | 'auth_rls_initplan'
+ | 'no_primary_key'
+ | 'unused_index'
+ | 'multiple_permissive_policies'
+ | 'policy_exists_rls_disabled'
+ | 'rls_enabled_no_policy'
+ | 'duplicate_index'
+ | 'security_definer_view'
+ | 'function_search_path_mutable'
+ | 'rls_disabled_in_public'
+ | 'extension_in_public'
+ | 'auth_otp_long_expiry'
+ | 'auth_otp_short_length'
+ | 'rls_references_user_metadata'
+ /** @enum {string} */
+ level: 'ERROR' | 'WARN' | 'INFO'
+ categories: ('PERFORMANCE' | 'SECURITY')[]
+ facing: string
+ description: string
+ detail: string
+ remediation: Record<string, never>
+ metadata: components['schemas']['ProjectLintMetadata'] | null
+ cache_key: string
+ }
ServiceVersions: {
gotrue: string
postgrest: string
@@ -4037,6 +4066,7 @@ export interface components {
)[]
source_notification_id?: string
region: string
+ database_identifier?: string
}
RestartServicesBody: {
restartRequest: components['schemas']['RestartServiceRequest']
@@ -4134,6 +4164,13 @@ export interface components {
id: number
name: string
}
+ LFAccessToken: {
+ token: string
+ id: number
+ inserted_at: string
+ scopes: string
+ description: string | null
+ }
LFEndpoint: {
token: string
id: number
@@ -4921,9 +4958,18 @@ export interface components {
restriction_data?: components['schemas']['RestrictionData']
message?: string
}
+ AwsPartnerBillingBody: {
+ aws_customer_id: string
+ aws_customer_account_id: string
+ aws_product_code: string
+ aws_private_offer_id: string
+ aws_subscription_start: string
+ aws_subscription_end: string
+ }
CreateAwsPartnerOrganizationBody: {
primary_email: string
name: string
+ partner_billing: components['schemas']['AwsPartnerBillingBody']
}
AwsPartnerOrganizationResponse: {
id: number
@@ -6707,104 +6753,6 @@ export interface operations {
}
}
}
- /** Gets the status of owner reassignment */
- OwnerController_getOwnerReassignStatus: {
- parameters: {
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 200: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- /** @description Failed to get status of owner reassignment */
- 500: {
- content: never
- }
- }
- }
- /** Reassigns object owner from supabase_admin to temp */
- OwnerController_applyOwnerReassign: {
- parameters: {
- header: {
- 'x-connection-encrypted': string
- }
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 201: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- 403: {
- content: never
- }
- /** @description Failed to reassign owner on the project */
- 500: {
- content: never
- }
- }
- }
- /** Rollback object owner from temp to supabase_admin */
- OwnerController_rollbackOwnerReassign: {
- parameters: {
- header: {
- 'x-connection-encrypted': string
- }
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 200: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- 403: {
- content: never
- }
- /** @description Failed to rollback owner on the project */
- 500: {
- content: never
- }
- }
- }
- /** Reassigns object owner from temp to postgres */
- OwnerController_finaliseOwnerReassign: {
- parameters: {
- header: {
- 'x-connection-encrypted': string
- }
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 200: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- 403: {
- content: never
- }
- /** @description Failed to reassign owner on the project */
- 500: {
- content: never
- }
- }
- }
/** Gets user's organizations */
OrganizationsController_getOrganizations: {
responses: {
@@ -9920,6 +9868,7 @@ export interface operations {
| 'disk_io_consumption'
| 'ram_usage'
| 'swap_usage'
+ | 'physical_replication_lag_physical_replica_lag_seconds'
startDate: string
endDate: string
interval?: '1m' | '5m' | '10m' | '30m' | '1h' | '1d'
@@ -9991,6 +9940,11 @@ export interface operations {
ref: string
}
}
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['RestartProjectInfo']
+ }
+ }
responses: {
201: {
content: never
@@ -10004,6 +9958,25 @@ export interface operations {
}
}
}
+ /** Run project lints */
+ ProjectRunLintsController_runProjectLints: {
+ parameters: {
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ }
+ responses: {
+ 200: {
+ content: {
+ 'application/json': components['schemas']['ProjectLintResponse'][]
+ }
+ }
+ 403: {
+ content: never
+ }
+ }
+ }
/** Gets a specific project that belongs to the authenticated user */
ProjectsRefController_getProject: {
parameters: {
@@ -10507,7 +10480,7 @@ export interface operations {
responses: {
200: {
content: {
- 'application/json': components['schemas']['LFSource'][]
+ 'application/json': components['schemas']['LFAccessToken'][]
}
}
403: {
@@ -10524,7 +10497,7 @@ export interface operations {
responses: {
201: {
content: {
- 'application/json': components['schemas']['LFSource']
+ 'application/json': components['schemas']['LFAccessToken']
}
}
403: {
@@ -10540,9 +10513,7 @@ export interface operations {
AccessTokenController_deleteAccessToken: {
responses: {
200: {
- content: {
- 'application/json': components['schemas']['LFSource']
- }
+ content: never
}
403: {
content: never
@@ -12241,104 +12212,6 @@ export interface operations {
}
}
}
- /** Gets the status of owner reassignment */
- DatabaseOwnerController_getOwnerReassignStatus: {
- parameters: {
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 200: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- /** @description Failed to get status of owner reassignment */
- 500: {
- content: never
- }
- }
- }
- /** Reassigns object owner from supabase_admin to temp */
- DatabaseOwnerController_applyOwnerReassign: {
- parameters: {
- header: {
- 'x-connection-encrypted': string
- }
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 201: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- 403: {
- content: never
- }
- /** @description Failed to reassign owner on the project */
- 500: {
- content: never
- }
- }
- }
- /** Rollback object owner from temp to supabase_admin */
- DatabaseOwnerController_rollbackOwnerReassign: {
- parameters: {
- header: {
- 'x-connection-encrypted': string
- }
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 200: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- 403: {
- content: never
- }
- /** @description Failed to rollback owner on the project */
- 500: {
- content: never
- }
- }
- }
- /** Reassigns object owner from temp to postgres */
- DatabaseOwnerController_finaliseOwnerReassign: {
- parameters: {
- header: {
- 'x-connection-encrypted': string
- }
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 200: {
- content: {
- 'application/json': components['schemas']['OwnerResponse']
- }
- }
- 403: {
- content: never
- }
- /** @description Failed to reassign owner on the project */
- 500: {
- content: never
- }
- }
- }
/** Updates the database password */
DatabasePasswordController_updatePassword: {
parameters: {