Skip to content

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

feat(replication): Significantly improve the replication UI behavior (#38237)

Riccardo Busetti77356bf946af
diff --git a/apps/studio/components/interfaces/Database/Replication/DeleteDestination.tsx b/apps/studio/components/interfaces/Database/Replication/DeleteDestination.tsx
index 4782500013a..1c1f633505f 100644
--- a/apps/studio/components/interfaces/Database/Replication/DeleteDestination.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DeleteDestination.tsx
@@ -2,40 +2,32 @@ import TextConfirmModal from 'ui-patterns/Dialogs/TextConfirmModal'
interface DeleteDestinationProps {
visible: boolean
- setVisible: (value: boolean) => void
- onDelete: () => void
isLoading: boolean
name: string
+ setVisible: (value: boolean) => void
+ onDelete: () => void
}
-const DeleteDestination = ({
+export const DeleteDestination = ({
visible,
- setVisible,
- onDelete,
isLoading,
name,
+ setVisible,
+ onDelete,
}: DeleteDestinationProps) => {
return (
- <>
- <TextConfirmModal
- variant={'warning'}
- visible={visible}
- onCancel={() => setVisible(!visible)}
- onConfirm={onDelete}
- title="Delete this destination"
- loading={isLoading}
- confirmLabel={`Delete destination`}
- confirmPlaceholder="Type in name of destination"
- confirmString={name ?? 'Unknown'}
- text={
- <>
- <span>This will delete the destination</span>{' '}
- </>
- }
- alert={{ title: 'You cannot recover this destination once deleted.' }}
- />
- </>
+ <TextConfirmModal
+ variant="destructive"
+ visible={visible}
+ loading={isLoading}
+ title="Delete this destination"
+ confirmLabel={isLoading ? 'Deleting…' : `Delete destination`}
+ confirmPlaceholder="Type in name of destination"
+ confirmString={name ?? 'Unknown'}
+ text={`This will delete the destination "${name}"`}
+ alert={{ title: 'You cannot recover this destination once deleted.' }}
+ onCancel={() => setVisible(!visible)}
+ onConfirm={onDelete}
+ />
)
}
-
-export default DeleteDestination
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel.tsx
index 21f58cd2d20..68199c42788 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel.tsx
@@ -1,10 +1,21 @@
import { zodResolver } from '@hookform/resolvers/zod'
+import { useEffect, useMemo, useState } from 'react'
+import { useForm } from 'react-hook-form'
+import { toast } from 'sonner'
+import * as z from 'zod'
+
import { useParams } from 'common'
+import { useCreateDestinationPipelineMutation } from 'data/replication/create-destination-pipeline-mutation'
import { useCreateTenantSourceMutation } from 'data/replication/create-tenant-source-mutation'
+import { useReplicationDestinationByIdQuery } from 'data/replication/destination-by-id-query'
+import { useReplicationPipelineByIdQuery } from 'data/replication/pipeline-by-id-query'
import { useReplicationPublicationsQuery } from 'data/replication/publications-query'
import { useStartPipelineMutation } from 'data/replication/start-pipeline-mutation'
-import { useForm } from 'react-hook-form'
-import { toast } from 'sonner'
+import { useUpdateDestinationPipelineMutation } from 'data/replication/update-destination-pipeline-mutation'
+import {
+ PipelineStatusRequestStatus,
+ usePipelineRequestStatus,
+} from 'state/replication-pipeline-request-status'
import {
Accordion_Shadcn_,
AccordionContent_Shadcn_,
@@ -23,6 +34,7 @@ import {
SelectGroup_Shadcn_,
SelectItem_Shadcn_,
SelectTrigger_Shadcn_,
+ Separator,
Sheet,
SheetContent,
SheetDescription,
@@ -30,21 +42,28 @@ import {
SheetHeader,
SheetSection,
SheetTitle,
- Switch,
TextArea_Shadcn_,
WarningIcon,
- Label_Shadcn_ as Label,
} from 'ui'
-import * as z from 'zod'
-import PublicationsComboBox from './PublicationsComboBox'
-import NewPublicationPanel from './NewPublicationPanel'
-import { useState, useMemo, useEffect } from 'react'
-import { useReplicationDestinationByIdQuery } from 'data/replication/destination-by-id-query'
-import { useReplicationPipelineByIdQuery } from 'data/replication/pipeline-by-id-query'
-import { useStopPipelineMutation } from 'data/replication/stop-pipeline-mutation'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
-import { useCreateDestinationPipelineMutation } from 'data/replication/create-destination-pipeline-mutation'
-import { useUpdateDestinationPipelineMutation } from 'data/replication/update-destination-pipeline-mutation'
+import NewPublicationPanel from './NewPublicationPanel'
+import PublicationsComboBox from './PublicationsComboBox'
+
+const formId = 'destination-editor'
+const types = ['BigQuery'] as const
+const TypeEnum = z.enum(types)
+
+const FormSchema = z.object({
+ type: TypeEnum,
+ name: z.string().min(1, 'Name is required'),
+ projectId: z.string().min(1, 'Project id is required'),
+ datasetId: z.string().min(1, 'Dataset id is required'),
+ serviceAccountKey: z.string().min(1, 'Service account key is required'),
+ publicationName: z.string().min(1, 'Publication is required'),
+ maxSize: z.number().min(1, 'Max Size must be greater than 0').int().optional(),
+ maxFillMs: z.number().min(1, 'Max Fill milliseconds should be greater than 0').int().optional(),
+ maxStalenessMins: z.number().nonnegative().optional(),
+})
interface DestinationPanelProps {
visible: boolean
@@ -58,22 +77,33 @@ interface DestinationPanelProps {
}
}
-const DestinationPanel = ({
+export const DestinationPanel = ({
visible,
sourceId,
onClose,
existingDestination,
}: DestinationPanelProps) => {
const { ref: projectRef } = useParams()
+ const { setRequestStatus } = usePipelineRequestStatus()
+
+ const editMode = !!existingDestination
const [publicationPanelVisible, setPublicationPanelVisible] = useState(false)
+
const { mutateAsync: createTenantSource, isLoading: creatingTenantSource } =
useCreateTenantSourceMutation()
+
const { mutateAsync: createDestinationPipeline, isLoading: creatingDestinationPipeline } =
- useCreateDestinationPipelineMutation()
- const { mutateAsync: startPipeline, isLoading: startingPipeline } = useStartPipelineMutation()
- const { mutateAsync: stopPipeline, isLoading: stoppingPipeline } = useStopPipelineMutation()
+ useCreateDestinationPipelineMutation({
+ onSuccess: () => form.reset(defaultValues),
+ })
+
const { mutateAsync: updateDestinationPipeline, isLoading: updatingDestinationPipeline } =
- useUpdateDestinationPipelineMutation()
+ useUpdateDestinationPipelineMutation({
+ onSuccess: () => form.reset(defaultValues),
+ })
+
+ const { mutateAsync: startPipeline, isLoading: startingPipeline } = useStartPipelineMutation()
+
const { data: publications, isLoading: loadingPublications } = useReplicationPublicationsQuery({
projectRef,
sourceId,
@@ -89,26 +119,6 @@ const DestinationPanel = ({
pipelineId: existingDestination?.pipelineId,
})
- const isCreating = creatingTenantSource || creatingDestinationPipeline || startingPipeline
- const isUpdating = updatingDestinationPipeline || stoppingPipeline || startingPipeline
- const isSubmitting = isCreating || isUpdating
- const editMode = !!existingDestination
-
- const formId = 'destination-editor'
- const types = ['BigQuery'] as const
- const TypeEnum = z.enum(types)
- const FormSchema = z.object({
- type: TypeEnum,
- name: z.string().min(1, 'Name is required'),
- projectId: z.string().min(1, 'Project id is required'),
- datasetId: z.string().min(1, 'Dataset id is required'),
- serviceAccountKey: z.string().min(1, 'Service account key is required'),
- publicationName: z.string().min(1, 'Publication is required'),
- maxSize: z.number().min(1, 'Max Size must be greater than 0').int(),
- maxFillMs: z.number().min(1, 'Max Fill milliseconds should be greater than 0').int(),
- maxStalenessMins: z.number().nonnegative(),
- enabled: z.boolean(),
- })
const defaultValues = useMemo(
() => ({
type: TypeEnum.enum.BigQuery,
@@ -118,403 +128,406 @@ const DestinationPanel = ({
// For now, the password will always be set as empty for security reasons.
serviceAccountKey: destinationData?.config?.big_query?.service_account_key ?? '',
publicationName: pipelineData?.config.publication_name ?? '',
- maxSize: pipelineData?.config?.batch?.max_size ?? 1000,
- maxFillMs: pipelineData?.config?.batch?.max_fill_ms ?? 10,
- maxStalenessMins: destinationData?.config?.big_query?.max_staleness_mins ?? 5,
- enabled: existingDestination?.enabled ?? true,
+ maxSize: pipelineData?.config?.batch?.max_size,
+ maxFillMs: pipelineData?.config?.batch?.max_fill_ms,
+ maxStalenessMins: destinationData?.config?.big_query?.max_staleness_mins,
}),
- [destinationData, pipelineData, existingDestination]
+ [destinationData, pipelineData]
)
+
const form = useForm<z.infer<typeof FormSchema>>({
mode: 'onBlur',
reValidateMode: 'onBlur',
resolver: zodResolver(FormSchema),
defaultValues,
})
+ const isSaving = creatingDestinationPipeline || updatingDestinationPipeline || startingPipeline
+
const onSubmit = async (data: z.infer<typeof FormSchema>) => {
if (!projectRef) return console.error('Project ref is required')
+ if (!sourceId) return console.error('Source id is required')
+
try {
if (editMode && existingDestination) {
- if (!sourceId) {
- console.error('Source id is required')
- return
+ if (!existingDestination.pipelineId) return console.error('Pipeline id is required')
+
+ const bigQueryConfig: any = {
+ projectId: data.projectId,
+ datasetId: data.datasetId,
+ serviceAccountKey: data.serviceAccountKey,
}
- if (!existingDestination.pipelineId) {
- console.error('Pipeline id is required')
- return
+ if (!!data.maxStalenessMins) {
+ bigQueryConfig.maxStalenessMins = data.maxStalenessMins
}
- // Update existing destination
+
+ const batchConfig: any = {}
+ if (!!data.maxSize) batchConfig.maxSize = data.maxSize
+ if (!!data.maxFillMs) batchConfig.maxFillMs = data.maxFillMs
+ const hasBothBatchFields = Object.keys(batchConfig).length === 2
+
await updateDestinationPipeline({
destinationId: existingDestination.destinationId,
pipelineId: existingDestination.pipelineId,
projectRef,
destinationName: data.name,
- destinationConfig: {
- bigQuery: {
- projectId: data.projectId,
- datasetId: data.datasetId,
- serviceAccountKey: data.serviceAccountKey,
- maxStalenessMins: data.maxStalenessMins,
- },
- },
+ destinationConfig: { bigQuery: bigQueryConfig },
pipelineConfig: {
publicationName: data.publicationName,
- batch: { maxSize: data.maxSize, maxFillMs: data.maxFillMs },
+ ...(hasBothBatchFields ? { batch: batchConfig } : {}),
},
sourceId,
})
- if (data.enabled) {
- await startPipeline({ projectRef, pipelineId: existingDestination.pipelineId })
+ // Set request status only right before starting, then fire and close
+ const snapshot = existingDestination.enabled ? 'started' : 'stopped'
+ if (existingDestination.enabled) {
+ setRequestStatus(
+ existingDestination.pipelineId,
+ PipelineStatusRequestStatus.RestartRequested,
+ snapshot
+ )
+ toast.success('Settings applied. Restarting the pipeline...')
} else {
- await stopPipeline({ projectRef, pipelineId: existingDestination.pipelineId })
+ setRequestStatus(
+ existingDestination.pipelineId,
+ PipelineStatusRequestStatus.StartRequested,
+ snapshot
+ )
+ toast.success('Settings applied. Starting the pipeline...')
}
-
- toast.success('Successfully updated destination')
+ startPipeline({ projectRef, pipelineId: existingDestination.pipelineId })
+ onClose()
} else {
- // Create new destination
- if (!sourceId) {
- console.error('Source id is required')
- return
+ const bigQueryConfig: any = {
+ projectId: data.projectId,
+ datasetId: data.datasetId,
+ serviceAccountKey: data.serviceAccountKey,
}
+ if (!!data.maxStalenessMins) {
+ bigQueryConfig.maxStalenessMins = data.maxStalenessMins
+ }
+
+ const batchConfig: any = {}
+ if (!!data.maxSize) batchConfig.maxSize = data.maxSize
+ if (!!data.maxFillMs) batchConfig.maxFillMs = data.maxFillMs
+ const hasBothBatchFields = Object.keys(batchConfig).length === 2
+
const { pipeline_id: pipelineId } = await createDestinationPipeline({
projectRef,
destinationName: data.name,
- destinationConfig: {
- bigQuery: {
- projectId: data.projectId,
- datasetId: data.datasetId,
- serviceAccountKey: data.serviceAccountKey,
- maxStalenessMins: data.maxStalenessMins,
- },
- },
+ destinationConfig: { bigQuery: bigQueryConfig },
sourceId,
pipelineConfig: {
publicationName: data.publicationName,
- batch: { maxSize: data.maxSize, maxFillMs: data.maxFillMs },
+ ...(hasBothBatchFields ? { batch: batchConfig } : {}),
},
})
- if (data.enabled) {
- await startPipeline({ projectRef, pipelineId })
- }
- toast.success('Successfully created destination')
+ // Set request status only right before starting, then fire and close
+ setRequestStatus(pipelineId, PipelineStatusRequestStatus.StartRequested, undefined)
+ toast.success('Destination created. Starting the pipeline...')
+ startPipeline({ projectRef, pipelineId })
+ onClose()
}
- onClose()
} catch (error) {
- toast.error(`Failed to ${editMode ? 'update' : 'create'} destination`)
+ const action = editMode ? 'apply and run' : 'create and start'
+ toast.error(`Failed to ${action} destination`)
}
}
+
const onEnableReplication = async () => {
if (!projectRef) return console.error('Project ref is required')
await createTenantSource({ projectRef })
}
- const { enabled } = form.watch()
-
useEffect(() => {
if (editMode && destinationData && pipelineData) {
form.reset(defaultValues)
}
}, [destinationData, pipelineData, editMode, defaultValues, form])
- return (
+ return sourceId ? (
<>
- {sourceId ? (
- <>
- <Sheet open={visible} onOpenChange={onClose}>
- <SheetContent showClose={false} size="default">
- <div className="flex flex-col h-full" tabIndex={-1}>
- <SheetHeader className="flex justify-between items-center">
- <div>
- <SheetTitle>{editMode ? 'Edit Destination' : 'New Destination'}</SheetTitle>
- <SheetDescription>
- {editMode ? null : 'Send data to a new destination'}
- </SheetDescription>
- </div>
- <div className="flex items-center gap-2">
- <Switch
- checked={enabled}
- onCheckedChange={(checked) => {
- form.setValue('enabled', checked)
- }}
+ <Sheet open={visible} onOpenChange={onClose}>
+ <SheetContent showClose={false} size="default">
+ <div className="flex flex-col h-full" tabIndex={-1}>
+ <SheetHeader>
+ <SheetTitle>{editMode ? 'Edit destination' : 'Create a new destination'}</SheetTitle>
+ <SheetDescription>
+ {editMode ? null : 'Send data to a new destination'}
+ </SheetDescription>
+ </SheetHeader>
+ <SheetSection className="flex-grow overflow-auto px-0 pb-0">
+ <Form_Shadcn_ {...form}>
+ <form id={formId} onSubmit={form.handleSubmit(onSubmit)}>
+ <div className="px-5 pb-4">
+ <FormField_Shadcn_
+ control={form.control}
+ name="name"
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-8"
+ label="Name"
+ layout="vertical"
+ description="A name you will use to identify this destination"
+ >
+ <FormControl_Shadcn_>
+ <Input_Shadcn_ {...field} placeholder="Name" />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
/>
- <Label className="text-sm mx-2">Enable</Label>
- </div>
- </SheetHeader>
- <SheetSection className="flex-grow overflow-auto">
- <Form_Shadcn_ {...form}>
- <form id={formId} onSubmit={form.handleSubmit(onSubmit)}>
- <FormField_Shadcn_
- control={form.control}
- name="name"
- render={({ field }) => (
- <FormItemLayout
- className="mb-8"
- label="Name"
- layout="vertical"
- description="A name you will use to identify this destination"
- >
- <FormControl_Shadcn_>
- <Input_Shadcn_ {...field} placeholder="Name" />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- <h3 className="mb-4">What data to send</h3>
-
- <FormField_Shadcn_
- control={form.control}
- name="publicationName"
- render={({ field }) => (
- <FormItemLayout
- className="mb-4"
- label="Publication"
- layout="vertical"
- description="A publication is a collection of tables that you want to replicate "
- >
- <FormControl_Shadcn_>
- <PublicationsComboBox
- publications={publications?.map((pub) => pub.name) || []}
- loading={loadingPublications}
- field={field}
- onNewPublicationClick={() => setPublicationPanelVisible(true)}
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- <h3 className="mb-4 mt-8">Where to send that data</h3>
-
- <FormField_Shadcn_
- name="type"
- control={form.control}
- render={({ field }) => (
- <FormItemLayout
- className="mb-4"
- label="Type"
- layout="vertical"
- description="The type of destination to send the data to"
- >
- <FormControl_Shadcn_>
- <Select_Shadcn_ value={field.value}>
- <SelectTrigger_Shadcn_>{field.value}</SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="BigQuery">
- BigQuery
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- ></FormField_Shadcn_>
-
- <FormField_Shadcn_
- control={form.control}
- name="projectId"
- render={({ field }) => (
- <FormItemLayout
- className="mb-4"
- label="Project Id"
- layout="vertical"
- description="Which BigQuery project to send data to"
- >
- <FormControl_Shadcn_>
- <Input_Shadcn_ {...field} placeholder="Project id" />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- <FormField_Shadcn_
- control={form.control}
- name="datasetId"
- render={({ field }) => (
- <FormItemLayout
- className="mb-4"
- label="Project's Dataset Id"
- layout="vertical"
- >
- <FormControl_Shadcn_>
- <Input_Shadcn_ {...field} placeholder="Dataset id" />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- <FormField_Shadcn_
- control={form.control}
- name="serviceAccountKey"
- render={({ field }) => (
- <FormItemLayout
- label="Service Account Key"
- layout="vertical"
- description="The service account key for BigQuery"
- >
- <FormControl_Shadcn_>
- <TextArea_Shadcn_
- {...field}
- rows={4}
- maxLength={5000}
- placeholder="Service account key"
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
-
- <Accordion_Shadcn_ type="single" collapsible>
- <AccordionItem_Shadcn_ value="item-1" className="border-none">
- <AccordionTrigger_Shadcn_ className="font-normal gap-2 justify-start mb-0 mt-8">
- Advanced Settings
- </AccordionTrigger_Shadcn_>
- <AccordionContent_Shadcn_ asChild className="!pb-0">
- <FormField_Shadcn_
- control={form.control}
- name="maxSize"
- render={({ field }) => (
- <FormItemLayout
- className="mb-4"
- label="Max Size"
- layout="vertical"
- description="The maximum size of the data to send"
- >
- <FormControl_Shadcn_>
- <Input_Shadcn_
- {...field}
- type="number"
- {...form.register('maxSize', {
- valueAsNumber: true, // Ensure the value is handled as a number
- })}
- placeholder="Max size"
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- <FormField_Shadcn_
- control={form.control}
- name="maxFillMs"
- render={({ field }) => (
- <FormItemLayout
- className="mb-4"
- label="Max Fill Seconds"
- layout="vertical"
- description="The maximum amount of time to fill the data"
- >
- <FormControl_Shadcn_>
- <Input_Shadcn_
- {...field}
- type="number"
- {...form.register('maxFillMs', {
- valueAsNumber: true, // Ensure the value is handled as a number
- })}
- placeholder="Max fill seconds"
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
+
+ <h3 className="mb-4">What data to send</h3>
+
+ <FormField_Shadcn_
+ control={form.control}
+ name="publicationName"
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-4"
+ label="Publication"
+ layout="vertical"
+ description="A publication is a collection of tables that you want to replicate "
+ >
+ <FormControl_Shadcn_>
+ <PublicationsComboBox
+ publications={publications?.map((pub) => pub.name) || []}
+ loading={loadingPublications}
+ field={field}
+ onNewPublicationClick={() => setPublicationPanelVisible(true)}
/>
- <FormField_Shadcn_
- control={form.control}
- name="maxStalenessMins"
- render={({ field }) => (
- <FormItemLayout
- className="mb-4"
- label="Max Staleness"
- layout="vertical"
- description="Maximum staleness time allowed"
- >
- <FormControl_Shadcn_>
- <Input_Shadcn_
- {...field}
- type="number"
- {...form.register('maxStalenessMins', {
- valueAsNumber: true, // Ensure the value is handled as a number
- })}
- placeholder="Max staleness in minutes"
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+
+ <h3 className="mb-4 mt-8">Where to send that data</h3>
+
+ <FormField_Shadcn_
+ name="type"
+ control={form.control}
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-4"
+ label="Type"
+ layout="vertical"
+ description="The type of destination to send the data to"
+ >
+ <FormControl_Shadcn_>
+ <Select_Shadcn_ value={field.value}>
+ <SelectTrigger_Shadcn_>{field.value}</SelectTrigger_Shadcn_>
+ <SelectContent_Shadcn_>
+ <SelectGroup_Shadcn_>
+ <SelectItem_Shadcn_ value="BigQuery">BigQuery</SelectItem_Shadcn_>
+ </SelectGroup_Shadcn_>
+ </SelectContent_Shadcn_>
+ </Select_Shadcn_>
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+
+ <FormField_Shadcn_
+ control={form.control}
+ name="projectId"
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-4"
+ label="Project ID"
+ layout="vertical"
+ description="Which BigQuery project to send data to"
+ >
+ <FormControl_Shadcn_>
+ <Input_Shadcn_ {...field} placeholder="Project ID" />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+
+ <FormField_Shadcn_
+ control={form.control}
+ name="datasetId"
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-4"
+ label="Project's Dataset ID"
+ layout="vertical"
+ >
+ <FormControl_Shadcn_>
+ <Input_Shadcn_ {...field} placeholder="Dataset ID" />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+
+ <FormField_Shadcn_
+ control={form.control}
+ name="serviceAccountKey"
+ render={({ field }) => (
+ <FormItemLayout
+ label="Service Account Key"
+ layout="vertical"
+ description="The service account key for BigQuery"
+ >
+ <FormControl_Shadcn_>
+ <TextArea_Shadcn_
+ {...field}
+ rows={4}
+ maxLength={5000}
+ placeholder="Service account key"
/>
- </AccordionContent_Shadcn_>
- </AccordionItem_Shadcn_>
- </Accordion_Shadcn_>
- <div className="hidden">
- <FormField_Shadcn_
- control={form.control}
- name="enabled"
- render={({ field }) => (
- <FormItemLayout className="mb-4" layout="vertical" label="Enabled">
- <FormControl_Shadcn_>
- <Switch checked={field.value} onCheckedChange={field.onChange} />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- </div>
- </form>
- </Form_Shadcn_>
- </SheetSection>
- <SheetFooter>
- <Button disabled={isSubmitting} type="default" onClick={onClose}>
- Cancel
- </Button>
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ </div>
+
+ <Separator />
+
+ <div className="px-5">
+ <Accordion_Shadcn_ type="single" collapsible>
+ <AccordionItem_Shadcn_ value="item-1" className="border-none">
+ <AccordionTrigger_Shadcn_ className="font-normal gap-2 justify-between text-sm">
+ Advanced Settings
+ </AccordionTrigger_Shadcn_>
+ <AccordionContent_Shadcn_ asChild className="!pb-0">
+ <FormField_Shadcn_
+ control={form.control}
+ name="maxSize"
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-4"
+ label="Max size"
+ layout="vertical"
+ description="The maximum size of the data to send. Leave empty to use default value."
+ >
+ <FormControl_Shadcn_>
+ <Input_Shadcn_
+ {...field}
+ type="number"
+ value={field.value ?? ''}
+ onChange={(e) => {
+ const val = e.target.value
+ field.onChange(val === '' ? undefined : Number(val))
+ }}
+ placeholder="Leave empty for default"
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ <FormField_Shadcn_
+ control={form.control}
+ name="maxFillMs"
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-4"
+ label="Max fill milliseconds"
+ layout="vertical"
+ description="The maximum amount of time to fill the data in milliseconds. Leave empty to use default value."
+ >
+ <FormControl_Shadcn_>
+ <Input_Shadcn_
+ {...field}
+ type="number"
+ value={field.value ?? ''}
+ onChange={(e) => {
+ const val = e.target.value
+ field.onChange(val === '' ? undefined : Number(val))
+ }}
+ placeholder="Leave empty for default"
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ <FormField_Shadcn_
+ control={form.control}
+ name="maxStalenessMins"
+ render={({ field }) => (
+ <FormItemLayout
+ className="mb-4"
+ label="Max staleness minutes"
+ layout="vertical"
+ description="Maximum staleness time allowed in minutes. Leave empty to use default value."
+ >
+ <FormControl_Shadcn_>
+ <Input_Shadcn_
+ {...field}
+ type="number"
+ value={field.value ?? ''}
+ onChange={(e) => {
+ const val = e.target.value
+ field.onChange(val === '' ? undefined : Number(val))
+ }}
+ placeholder="Leave empty for default"
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ </AccordionContent_Shadcn_>
+ </AccordionItem_Shadcn_>
+ </Accordion_Shadcn_>
+ </div>
+ </form>
+ </Form_Shadcn_>
+ </SheetSection>
+ <SheetFooter>
+ <Button disabled={isSaving} type="default" onClick={onClose}>
+ Cancel
+ </Button>
+ <Button loading={isSaving} form={formId} htmlType="submit">
+ {editMode
+ ? existingDestination?.enabled
+ ? 'Apply and restart'
+ : 'Apply and start'
+ : 'Create and start'}
+ </Button>
+ </SheetFooter>
+ </div>
+ </SheetContent>
+ </Sheet>
+ <NewPublicationPanel
+ visible={publicationPanelVisible}
+ sourceId={sourceId}
+ onClose={() => setPublicationPanelVisible(false)}
+ />
+ </>
+ ) : (
+ <Sheet open={visible} onOpenChange={onClose}>
+ <SheetContent showClose={false} size="default">
+ <div className="flex flex-col h-full" tabIndex={-1}>
+ <SheetHeader>
+ <SheetTitle>Create a new destination</SheetTitle>
+ </SheetHeader>
+ <SheetSection className="flex-grow overflow-auto">
+ <Alert_Shadcn_>
+ <WarningIcon />
+ <AlertTitle_Shadcn_>
+ {/* Pricing to be decided yet */}
+ Enabling replication will cost additional $xx.xx
+ </AlertTitle_Shadcn_>
+ <AlertDescription_Shadcn_>
+ <span></span>
+ <div className="flex items-center gap-x-2 mt-3">
<Button
- disabled={isSubmitting}
- loading={isSubmitting}
- form={formId}
- htmlType="submit"
+ type="default"
+ loading={creatingTenantSource}
+ onClick={onEnableReplication}
>
- {editMode ? 'Update' : 'Create'}
- </Button>
- </SheetFooter>
- </div>
- </SheetContent>
- </Sheet>
- <NewPublicationPanel
- visible={publicationPanelVisible}
- sourceId={sourceId}
- onClose={() => setPublicationPanelVisible(false)}
- />
- </>
- ) : (
- <>
- <Sheet open={visible} onOpenChange={onClose}>
- <SheetContent showClose={false} size="default">
- <div className="flex flex-col h-full" tabIndex={-1}>
- <SheetHeader>
- <SheetTitle>New Destination</SheetTitle>
- </SheetHeader>
- <SheetSection className="flex-grow overflow-auto">
- <Alert_Shadcn_>
- <WarningIcon />
- <AlertTitle_Shadcn_>
- {/* Pricing to be decided yet */}
- Enabling replication will cost additional $xx.xx
- </AlertTitle_Shadcn_>
- <AlertDescription_Shadcn_>
- <span></span>
- <div className="flex items-center gap-x-2 mt-3">
- <Button type="default" onClick={onEnableReplication}>
- Enable replication
- </Button>
- </div>
- </AlertDescription_Shadcn_>
- </Alert_Shadcn_>
- </SheetSection>
- <SheetFooter>
- <Button disabled={isSubmitting} type="default" onClick={onClose}>
- Cancel
+ Enable replication
</Button>
- </SheetFooter>
- </div>
- </SheetContent>
- </Sheet>
- </>
- )}
- </>
+ </div>
+ </AlertDescription_Shadcn_>
+ </Alert_Shadcn_>
+ </SheetSection>
+ <SheetFooter>
+ <Button disabled={creatingTenantSource} type="default" onClick={onClose}>
+ Cancel
+ </Button>
+ </SheetFooter>
+ </div>
+ </SheetContent>
+ </Sheet>
)
}
-
-export default DestinationPanel
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx
index 85d315f7ef7..16437c30b5b 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx
@@ -6,18 +6,20 @@ import { useParams } from 'common'
import Table from 'components/to-be-cleaned/Table'
import AlertError from 'components/ui/AlertError'
import { useDeleteDestinationPipelineMutation } from 'data/replication/delete-destination-pipeline-mutation'
+import { useReplicationPipelineReplicationStatusQuery } from 'data/replication/pipeline-replication-status-query'
import { useReplicationPipelineStatusQuery } from 'data/replication/pipeline-status-query'
import { Pipeline } from 'data/replication/pipelines-query'
import { useStopPipelineMutation } from 'data/replication/stop-pipeline-mutation'
+import { AlertCircle } from 'lucide-react'
import {
PipelineStatusRequestStatus,
usePipelineRequestStatus,
} from 'state/replication-pipeline-request-status'
import { ResponseError } from 'types'
-import { Button } from 'ui'
+import { Button, Tooltip, TooltipContent, TooltipTrigger } from 'ui'
import ShimmeringLoader from 'ui-patterns/ShimmeringLoader'
-import DeleteDestination from './DeleteDestination'
-import DestinationPanel from './DestinationPanel'
+import { DeleteDestination } from './DeleteDestination'
+import { DestinationPanel } from './DestinationPanel'
import { getStatusName, PIPELINE_ERROR_MESSAGES } from './Pipeline.utils'
import { PipelineStatus, PipelineStatusName } from './PipelineStatus'
import { STATUS_REFRESH_FREQUENCY_MS } from './Replication.constants'
@@ -48,6 +50,7 @@ export const DestinationRow = ({
}: DestinationRowProps) => {
const { ref: projectRef } = useParams()
const [showDeleteDestinationForm, setShowDeleteDestinationForm] = useState(false)
+ const [isDeleting, setIsDeleting] = useState(false)
const [showEditDestinationPanel, setShowEditDestinationPanel] = useState(false)
const {
@@ -74,6 +77,15 @@ export const DestinationRow = ({
const pipelineStatus = pipelineStatusData?.status
const statusName = getStatusName(pipelineStatus)
+ // Fetch table-level replication status to surface errors in list view
+ const { data: replicationStatusData } = useReplicationPipelineReplicationStatusQuery(
+ { projectRef, pipelineId: pipeline?.id },
+ { refetchInterval: STATUS_REFRESH_FREQUENCY_MS }
+ )
+ const tableStatuses = replicationStatusData?.table_statuses ?? []
+ const errorCount = tableStatuses.filter((t) => t.state?.name === 'error').length
+ const hasTableErrors = errorCount > 0
+
const onDeleteClick = async () => {
if (!projectRef) {
return console.error('Project ref is required')
@@ -83,14 +95,20 @@ export const DestinationRow = ({
}
try {
+ setIsDeleting(true)
await stopPipeline({ projectRef, pipelineId: pipeline.id })
await deleteDestinationPipeline({
projectRef,
destinationId: destinationId,
pipelineId: pipeline.id,
})
+ // Close dialog after successful deletion
+ setShowDeleteDestinationForm(false)
+ toast.success(`Deleted destination "${destinationName}"`)
} catch (error) {
toast.error(PIPELINE_ERROR_MESSAGES.DELETE_DESTINATION)
+ } finally {
+ setIsDeleting(false)
}
}
@@ -132,9 +150,21 @@ export const DestinationRow = ({
</Table.td>
<Table.td>
<div className="flex items-center justify-end gap-x-2">
- <Button asChild type="default">
+ <Button asChild type="default" className="relative">
<Link href={`/project/${projectRef}/database/replication/${pipeline?.id}`}>
- View status
+ <span className="inline-flex items-center gap-2">
+ <span>View status</span>
+ {hasTableErrors && (
+ <Tooltip>
+ <TooltipTrigger>
+ <AlertCircle size={14} />
+ </TooltipTrigger>
+ <TooltipContent side="bottom">
+ {errorCount} table{errorCount === 1 ? '' : 's'} have replication errors
+ </TooltipContent>
+ </Tooltip>
+ )}
+ </span>
</Link>
</Button>
<RowMenu
@@ -154,7 +184,7 @@ export const DestinationRow = ({
visible={showDeleteDestinationForm}
setVisible={setShowDeleteDestinationForm}
onDelete={onDeleteClick}
- isLoading={isPipelineStatusLoading}
+ isLoading={isDeleting}
name={destinationName}
/>
<DestinationPanel
diff --git a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx
index 3335dc78c7b..f8366bee4b4 100644
--- a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx
@@ -9,7 +9,7 @@ import { useReplicationPipelinesQuery } from 'data/replication/pipelines-query'
import { useReplicationSourcesQuery } from 'data/replication/sources-query'
import { Button, cn, Input_Shadcn_ } from 'ui'
import { GenericSkeletonLoader } from 'ui-patterns'
-import NewDestinationPanel from './DestinationPanel'
+import { DestinationPanel } from './DestinationPanel'
import { DestinationRow } from './DestinationRow'
import { PIPELINE_ERROR_MESSAGES } from './Pipeline.utils'
@@ -159,7 +159,7 @@ export const Destinations = () => {
</div>
)}
- <NewDestinationPanel
+ <DestinationPanel
visible={showNewDestinationPanel}
sourceId={sourceId}
onClose={() => setShowNewDestinationPanel(false)}
diff --git a/apps/studio/components/interfaces/Database/Replication/Pipeline.utils.ts b/apps/studio/components/interfaces/Database/Replication/Pipeline.utils.ts
index 2d3efaf2337..eb69b88e689 100644
--- a/apps/studio/components/interfaces/Database/Replication/Pipeline.utils.ts
+++ b/apps/studio/components/interfaces/Database/Replication/Pipeline.utils.ts
@@ -22,16 +22,25 @@ export const getStatusName = (
return undefined
}
+export const PIPELINE_ENABLE_ALLOWED_FROM = ['stopped'] as const
+export const PIPELINE_DISABLE_ALLOWED_FROM = ['started', 'failed'] as const
+export const PIPELINE_ACTIONABLE_STATES = ['failed', 'started', 'stopped'] as const
+
const PIPELINE_STATE_MESSAGES = {
enabling: {
- title: 'Pipeline enabling',
- message: 'Starting the pipeline. Table replication will resume once enabled.',
- badge: 'Enabling',
+ title: 'Starting pipeline',
+ message: 'Starting the pipeline. Table replication will resume once running.',
+ badge: 'Starting',
},
disabling: {
- title: 'Pipeline disabling',
- message: 'Stopping the pipeline. Table replication will be paused once disabled.',
- badge: 'Disabling',
+ title: 'Stopping pipeline',
+ message: 'Stopping the pipeline. Table replication will be paused once stopped.',
+ badge: 'Stopping',
+ },
+ restarting: {
+ title: 'Restarting pipeline',
+ message: 'Applying settings and restarting the pipeline.',
+ badge: 'Restarting',
},
failed: {
title: 'Pipeline failed',
@@ -40,7 +49,7 @@ const PIPELINE_STATE_MESSAGES = {
},
stopped: {
title: 'Pipeline stopped',
- message: 'Replication is paused. Enable the pipeline to resume data synchronization.',
+ message: 'Replication is paused. Start the pipeline to resume data synchronization.',
badge: 'Stopped',
},
starting: {
@@ -60,8 +69,8 @@ const PIPELINE_STATE_MESSAGES = {
},
notRunning: {
title: 'Pipeline not running',
- message: 'Replication is not active. Enable the pipeline to start data synchronization.',
- badge: 'Disabled',
+ message: 'Replication is not active. Start the pipeline to begin data synchronization.',
+ badge: 'Stopped',
},
} as const
@@ -69,23 +78,25 @@ export const getPipelineStateMessages = (
requestStatus: PipelineStatusRequestStatus | undefined,
statusName: string | undefined
) => {
- // Always prioritize request status (enabling/disabling) over pipeline status
- if (requestStatus === PipelineStatusRequestStatus.EnableRequested) {
+ // Reflect optimistic request intent immediately after click
+ if (requestStatus === PipelineStatusRequestStatus.RestartRequested) {
+ return PIPELINE_STATE_MESSAGES.restarting
+ }
+ if (requestStatus === PipelineStatusRequestStatus.StartRequested) {
return PIPELINE_STATE_MESSAGES.enabling
}
-
- if (requestStatus === PipelineStatusRequestStatus.DisableRequested) {
+ if (requestStatus === PipelineStatusRequestStatus.StopRequested) {
return PIPELINE_STATE_MESSAGES.disabling
}
- // Only check pipeline status if no request is in progress
+ // Fall back to steady states
switch (statusName) {
+ case 'starting':
+ return PIPELINE_STATE_MESSAGES.starting
case 'failed':
return PIPELINE_STATE_MESSAGES.failed
case 'stopped':
return PIPELINE_STATE_MESSAGES.stopped
- case 'starting':
- return PIPELINE_STATE_MESSAGES.starting
case 'started':
return PIPELINE_STATE_MESSAGES.running
case 'unknown':
diff --git a/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx b/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx
index 69a988996d7..14e8b9a9969 100644
--- a/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx
@@ -45,18 +45,26 @@ export const PipelineStatus = ({
// Get consistent tooltip message using the same logic as other components
const stateMessages = getPipelineStateMessages(requestStatus, statusName)
- if (requestStatus === PipelineStatusRequestStatus.EnableRequested) {
+ // Show optimistic request state while backend still reports steady states
+ if (requestStatus === PipelineStatusRequestStatus.RestartRequested) {
return {
- label: 'Enabling...',
- dot: <Loader2 className="animate-spin w-3 h-3 text-brand-600" />,
- color: 'text-brand-600',
+ label: 'Restarting',
+ dot: <Loader2 className="animate-spin w-3 h-3 text-warning-600" />,
+ color: 'text-warning-600',
tooltip: stateMessages.message,
}
}
-
- if (requestStatus === PipelineStatusRequestStatus.DisableRequested) {
+ if (requestStatus === PipelineStatusRequestStatus.StartRequested) {
+ return {
+ label: 'Starting',
+ dot: <Loader2 className="animate-spin w-3 h-3 text-warning-600" />,
+ color: 'text-warning-600',
+ tooltip: stateMessages.message,
+ }
+ }
+ if (requestStatus === PipelineStatusRequestStatus.StopRequested) {
return {
- label: 'Disabling...',
+ label: 'Stopping',
dot: <Loader2 className="animate-spin w-3 h-3 text-warning-600" />,
color: 'text-warning-600',
tooltip: stateMessages.message,
diff --git a/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.tsx b/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.tsx
index dd098652c76..3d62d5f710a 100644
--- a/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.tsx
@@ -1,7 +1,3 @@
-// @ts-nocheck [Joshen] Temporarily silencing the TS checks here but please eventually remove
-// it's cause the API types are conflicting a bit - API types have probably been updated for the UI here
-// but the UI hasn't been updated yet to fit the new API types
-
import { Activity, ChevronLeft, ExternalLink, Search, X } from 'lucide-react'
import Link from 'next/link'
import { useEffect, useState } from 'react'
@@ -24,7 +20,13 @@ import { Badge, Button, cn } from 'ui'
import { GenericSkeletonLoader } from 'ui-patterns'
import { Input } from 'ui-patterns/DataInputs/Input'
import { ErroredTableDetails } from './ErroredTableDetails'
-import { getStatusName, PIPELINE_ERROR_MESSAGES } from './Pipeline.utils'
+import {
+ PIPELINE_ACTIONABLE_STATES,
+ PIPELINE_DISABLE_ALLOWED_FROM,
+ PIPELINE_ENABLE_ALLOWED_FROM,
+ PIPELINE_ERROR_MESSAGES,
+ getStatusName,
+} from './Pipeline.utils'
import { PipelineStatus } from './PipelineStatus'
import { STATUS_REFRESH_FREQUENCY_MS } from './Replication.constants'
import { TableState } from './ReplicationPipelineStatus.types'
@@ -97,8 +99,9 @@ export const ReplicationPipelineStatus = () => {
const isPipelineRunning = statusName === 'started'
const hasTableData = tableStatuses.length > 0
const isEnablingDisabling =
- requestStatus === PipelineStatusRequestStatus.EnableRequested ||
- requestStatus === PipelineStatusRequestStatus.DisableRequested
+ requestStatus === PipelineStatusRequestStatus.StartRequested ||
+ requestStatus === PipelineStatusRequestStatus.StopRequested ||
+ requestStatus === PipelineStatusRequestStatus.RestartRequested
const showDisabledState = !isPipelineRunning || isEnablingDisabling
const onTogglePipeline = async () => {
@@ -110,12 +113,12 @@ export const ReplicationPipelineStatus = () => {
}
try {
- if (statusName === 'stopped') {
+ if (PIPELINE_ENABLE_ALLOWED_FROM.includes(statusName as any)) {
+ setRequestStatus(pipeline.id, PipelineStatusRequestStatus.StartRequested, statusName)
await startPipeline({ projectRef, pipelineId: pipeline.id })
- setRequestStatus(pipeline.id, PipelineStatusRequestStatus.EnableRequested)
- } else if (statusName === 'started') {
+ } else if (PIPELINE_DISABLE_ALLOWED_FROM.includes(statusName as any)) {
+ setRequestStatus(pipeline.id, PipelineStatusRequestStatus.StopRequested, statusName)
await stopPipeline({ projectRef, pipelineId: pipeline.id })
- setRequestStatus(pipeline.id, PipelineStatusRequestStatus.DisableRequested)
}
} catch (error) {
toast.error(PIPELINE_ERROR_MESSAGES.ENABLE_DESTINATION)
@@ -181,9 +184,9 @@ export const ReplicationPipelineStatus = () => {
type={statusName === 'stopped' ? 'primary' : 'default'}
onClick={() => onTogglePipeline()}
loading={isPipelineError || isStartingPipeline || isStoppingPipeline}
- disabled={!['failed', 'started', 'stopped', 'stopping'].includes(statusName ?? '')}
+ disabled={!PIPELINE_ACTIONABLE_STATES.includes((statusName ?? '') as any)}
>
- {statusName === 'stopped' ? 'Enable' : 'Disable'} pipeline
+ {statusName === 'stopped' ? 'Start' : 'Stop'} pipeline
</Button>
</div>
</div>
@@ -286,7 +289,7 @@ export const ReplicationPipelineStatus = () => {
Status unavailable while pipeline is {config.badge.toLowerCase()}
</p>
) : (
- <div className="space-y-3">
+ <div className="space-y-1">
<div className="text-sm text-foreground">
{statusConfig.description}
</div>
diff --git a/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.utils.tsx b/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.utils.tsx
index af4207cc5c5..cb237042615 100644
--- a/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.utils.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus.utils.tsx
@@ -56,9 +56,10 @@ export const getDisabledStateConfig = ({
const { title, message, badge } = getPipelineStateMessages(requestStatus, statusName)
// Get icon and colors based on current state
- const isEnabling = requestStatus === PipelineStatusRequestStatus.EnableRequested
- const isDisabling = requestStatus === PipelineStatusRequestStatus.DisableRequested
- const isTransitioning = isEnabling || isDisabling
+ const isEnabling = requestStatus === PipelineStatusRequestStatus.StartRequested
+ const isDisabling = requestStatus === PipelineStatusRequestStatus.StopRequested
+ const isRestarting = requestStatus === PipelineStatusRequestStatus.RestartRequested
+ const isTransitioning = isEnabling || isDisabling || isRestarting
const icon = isTransitioning ? (
<Loader2 className="w-6 h-6 animate-spin" />
@@ -72,37 +73,38 @@ export const getDisabledStateConfig = ({
<Activity className="w-6 h-6" />
)
- const colors = isEnabling
- ? {
- bg: 'bg-brand-50',
- text: 'text-brand-900',
- subtext: 'text-brand-700',
- iconBg: 'bg-brand-600',
- icon: 'text-white dark:text-black',
- }
- : isDisabling || statusName === 'starting' || statusName === 'unknown'
+ const colors =
+ isEnabling || isRestarting
? {
- bg: 'bg-warning-50',
- text: 'text-warning-900',
- subtext: 'text-warning-700',
- iconBg: 'bg-warning-600',
+ bg: 'bg-brand-50',
+ text: 'text-brand-900',
+ subtext: 'text-brand-700',
+ iconBg: 'bg-brand-600',
icon: 'text-white dark:text-black',
}
- : statusName === 'failed'
+ : isDisabling || statusName === 'starting' || statusName === 'unknown'
? {
- bg: 'bg-destructive-50',
- text: 'text-destructive-900',
- subtext: 'text-destructive-700',
- iconBg: 'bg-destructive-600',
- icon: 'text-white dark:text-black',
- }
- : {
- bg: 'bg-surface-100',
- text: 'text-foreground',
- subtext: 'text-foreground-light',
- iconBg: 'bg-foreground-lighter',
+ bg: 'bg-warning-50',
+ text: 'text-warning-900',
+ subtext: 'text-warning-700',
+ iconBg: 'bg-warning-600',
icon: 'text-white dark:text-black',
}
+ : statusName === 'failed'
+ ? {
+ bg: 'bg-destructive-50',
+ text: 'text-destructive-900',
+ subtext: 'text-destructive-700',
+ iconBg: 'bg-destructive-600',
+ icon: 'text-white dark:text-black',
+ }
+ : {
+ bg: 'bg-surface-100',
+ text: 'text-foreground',
+ subtext: 'text-foreground-light',
+ iconBg: 'bg-foreground-lighter',
+ icon: 'text-white dark:text-black',
+ }
return { title, message, badge, icon, colors }
}
diff --git a/apps/studio/components/interfaces/Database/Replication/RetryOptionsDropdown.tsx b/apps/studio/components/interfaces/Database/Replication/RetryOptionsDropdown.tsx
index 350bd910bb4..147f8cc5bef 100644
--- a/apps/studio/components/interfaces/Database/Replication/RetryOptionsDropdown.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/RetryOptionsDropdown.tsx
@@ -40,7 +40,7 @@ export const RetryOptionsDropdown = ({ tableId, tableName }: RetryOptionsDropdow
const { mutate: rollbackTable, isLoading: isRollingBack } = useRollbackTableMutation({
onSuccess: (_, vars) => {
const { projectRef, pipelineId } = vars
- toast.success(`Table "${tableName}" rolled back successfully`)
+ toast.success(`Table "${tableName}" rolled back successfully and pipeline is being restarted`)
startPipeline({ projectRef, pipelineId })
},
onError: (error, vars) => {
diff --git a/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx b/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx
index ae5734b2e9c..7e083058ed5 100644
--- a/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx
@@ -20,7 +20,12 @@ import {
DropdownMenuTrigger,
} from 'ui'
import ShimmeringLoader from 'ui-patterns/ShimmeringLoader'
-import { PIPELINE_ERROR_MESSAGES } from './Pipeline.utils'
+import {
+ PIPELINE_DISABLE_ALLOWED_FROM,
+ PIPELINE_ENABLE_ALLOWED_FROM,
+ PIPELINE_ERROR_MESSAGES,
+ getStatusName,
+} from './Pipeline.utils'
import { PipelineStatusName } from './PipelineStatus'
interface RowMenuProps {
@@ -44,13 +49,6 @@ export const RowMenu = ({
}: RowMenuProps) => {
const { ref: projectRef } = useParams()
- const getStatusName = (status: any) => {
- if (status && typeof status === 'object' && 'name' in status) {
- return status.name
- }
- return status
- }
-
const statusName = getStatusName(pipelineStatus)
const pipelineEnabled = statusName !== PipelineStatusName.STOPPED
@@ -67,10 +65,13 @@ export const RowMenu = ({
}
try {
+ // Only show 'enabling' when transitioning from allowed states
+ if (PIPELINE_ENABLE_ALLOWED_FROM.includes(statusName as any)) {
+ setGlobalRequestStatus(pipeline.id, PipelineStatusRequestStatus.StartRequested, statusName)
+ }
await startPipeline({ projectRef, pipelineId: pipeline.id })
- toast(`Enabling pipeline ${pipeline.destination_name}`)
- setGlobalRequestStatus(pipeline.id, PipelineStatusRequestStatus.EnableRequested)
} catch (error) {
+ setGlobalRequestStatus(pipeline.id, PipelineStatusRequestStatus.None)
toast.error(PIPELINE_ERROR_MESSAGES.ENABLE_DESTINATION)
}
}
@@ -86,10 +87,13 @@ export const RowMenu = ({
}
try {
+ // Only show 'disabling' when transitioning from allowed states
+ if (PIPELINE_DISABLE_ALLOWED_FROM.includes(statusName as any)) {
+ setGlobalRequestStatus(pipeline.id, PipelineStatusRequestStatus.StopRequested, statusName)
+ }
await stopPipeline({ projectRef, pipelineId: pipeline.id })
- toast(`Disabling pipeline ${pipeline.destination_name}`)
- setGlobalRequestStatus(pipeline.id, PipelineStatusRequestStatus.DisableRequested)
} catch (error) {
+ setGlobalRequestStatus(pipeline.id, PipelineStatusRequestStatus.None)
toast.error(PIPELINE_ERROR_MESSAGES.DISABLE_DESTINATION)
}
}
@@ -109,12 +113,12 @@ export const RowMenu = ({
{pipelineEnabled ? (
<DropdownMenuItem className="space-x-2" onClick={onDisablePipeline}>
<Pause size={14} />
- <p>Disable pipeline</p>
+ <p>Stop pipeline</p>
</DropdownMenuItem>
) : (
<DropdownMenuItem className="space-x-2" onClick={onEnablePipeline}>
<Play size={14} />
- <p>Enable pipeline</p>
+ <p>Start pipeline</p>
</DropdownMenuItem>
)}
<DropdownMenuSeparator />
diff --git a/apps/studio/data/analytics/functions-req-stats-query.ts b/apps/studio/data/analytics/functions-req-stats-query.ts
index d386a07b465..5a765b4148f 100644
--- a/apps/studio/data/analytics/functions-req-stats-query.ts
+++ b/apps/studio/data/analytics/functions-req-stats-query.ts
@@ -6,7 +6,7 @@ import { analyticsKeys } from './keys'
export type FunctionsReqStatsVariables = {
projectRef?: string
functionId?: string
- interval?: operations['FunctionRequestLogsController_getStatus']['parameters']['query']['interval']
+ interval?: operations['FunctionsLogsController_getRequestStats']['parameters']['query']['interval']
}
export type FunctionsReqStatsResponse = any
diff --git a/apps/studio/data/analytics/functions-resource-usage-query.ts b/apps/studio/data/analytics/functions-resource-usage-query.ts
index cbb71f1d78e..ae767d52ebb 100644
--- a/apps/studio/data/analytics/functions-resource-usage-query.ts
+++ b/apps/studio/data/analytics/functions-resource-usage-query.ts
@@ -6,7 +6,7 @@ import { analyticsKeys } from './keys'
export type FunctionsResourceUsageVariables = {
projectRef?: string
functionId?: string
- interval?: operations['FunctionResourceLogsController_getStatus']['parameters']['query']['interval']
+ interval?: operations['FunctionsLogsController_getRequestStats']['parameters']['query']['interval']
}
export type FunctionsResourceUsageResponse = any
diff --git a/apps/studio/data/content/content-delete-mutation.ts b/apps/studio/data/content/content-delete-mutation.ts
index d5fd129fa3f..a8110e1e8f6 100644
--- a/apps/studio/data/content/content-delete-mutation.ts
+++ b/apps/studio/data/content/content-delete-mutation.ts
@@ -15,7 +15,7 @@ export async function deleteContents(
headers: { Version: '2' },
params: {
path: { ref: projectRef },
- query: { ids },
+ query: { ids: ids.join(',') },
},
signal,
})
diff --git a/apps/studio/data/lint/delete-lint-rule-mutation.ts b/apps/studio/data/lint/delete-lint-rule-mutation.ts
index 70dca1fdd73..cf6538fdff5 100644
--- a/apps/studio/data/lint/delete-lint-rule-mutation.ts
+++ b/apps/studio/data/lint/delete-lint-rule-mutation.ts
@@ -12,7 +12,7 @@ export type LintRuleDeleteVariables = {
export async function deleteLintRule({ projectRef, ids }: LintRuleDeleteVariables) {
const { data, error } = await del('/platform/projects/{ref}/notifications/advisor/exceptions', {
- params: { path: { ref: projectRef }, query: { ids } },
+ params: { path: { ref: projectRef }, query: { ids: ids.join(',') } },
})
if (error) handleError(error)
diff --git a/apps/studio/data/replication/create-destination-pipeline-mutation.ts b/apps/studio/data/replication/create-destination-pipeline-mutation.ts
index 67866a6f18b..ce9e285b092 100644
--- a/apps/studio/data/replication/create-destination-pipeline-mutation.ts
+++ b/apps/studio/data/replication/create-destination-pipeline-mutation.ts
@@ -1,15 +1,15 @@
import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
import { toast } from 'sonner'
+import { handleError, post } from 'data/fetchers'
import type { ResponseError } from 'types'
import { replicationKeys } from './keys'
-import { handleError, post } from 'data/fetchers'
export type BigQueryDestinationConfig = {
projectId: string
datasetId: string
serviceAccountKey: string
- maxStalenessMins: number
+ maxStalenessMins?: number
}
export type CreateDestinationPipelineParams = {
@@ -21,7 +21,7 @@ export type CreateDestinationPipelineParams = {
sourceId: number
pipelineConfig: {
publicationName: string
- batch: {
+ batch?: {
maxSize: number
maxFillMs: number
}
@@ -35,10 +35,7 @@ async function createDestinationPipeline(
destinationConfig: {
bigQuery: { projectId, datasetId, serviceAccountKey, maxStalenessMins },
},
- pipelineConfig: {
- publicationName,
- batch: { maxSize, maxFillMs },
- },
+ pipelineConfig: { publicationName, batch },
sourceId,
}: CreateDestinationPipelineParams,
signal?: AbortSignal
@@ -48,23 +45,27 @@ async function createDestinationPipeline(
const { data, error } = await post('/platform/replication/{ref}/destinations-pipelines', {
params: { path: { ref: projectRef } },
body: {
+ source_id: sourceId,
destination_name: destinationName,
destination_config: {
big_query: {
project_id: projectId,
dataset_id: datasetId,
service_account_key: serviceAccountKey,
- max_staleness_mins: maxStalenessMins,
+ ...(maxStalenessMins != null && { max_staleness_mins: maxStalenessMins }),
},
},
pipeline_config: {
publication_name: publicationName,
- batch: {
- max_size: maxSize,
- max_fill_ms: maxFillMs,
- },
+ ...(batch
+ ? {
+ batch: {
+ max_size: batch.maxSize,
+ max_fill_ms: batch.maxFillMs,
+ },
+ }
+ : {}),
},
- source_id: sourceId,
},
signal,
})
@@ -92,8 +93,12 @@ export const useCreateDestinationPipelineMutation = ({
{
async onSuccess(data, variables, context) {
const { projectRef } = variables
- await queryClient.invalidateQueries(replicationKeys.destinations(projectRef))
- await queryClient.invalidateQueries(replicationKeys.pipelines(projectRef))
+
+ await Promise.all([
+ queryClient.invalidateQueries(replicationKeys.destinations(projectRef)),
+ queryClient.invalidateQueries(replicationKeys.pipelines(projectRef)),
+ ])
+
await onSuccess?.(data, variables, context)
},
async onError(data, variables, context) {
diff --git a/apps/studio/data/replication/delete-destination-pipeline-mutation.ts b/apps/studio/data/replication/delete-destination-pipeline-mutation.ts
index 2ccb2473423..91766e5a80d 100644
--- a/apps/studio/data/replication/delete-destination-pipeline-mutation.ts
+++ b/apps/studio/data/replication/delete-destination-pipeline-mutation.ts
@@ -1,9 +1,9 @@
import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
import { toast } from 'sonner'
+import { del, handleError } from 'data/fetchers'
import type { ResponseError } from 'types'
import { replicationKeys } from './keys'
-import { handleError, del } from 'data/fetchers'
export type DeleteDestinationPipelineParams = {
projectRef: string
@@ -47,8 +47,19 @@ export const useDeleteDestinationPipelineMutation = ({
(vars) => deleteDestinationPipeline(vars),
{
async onSuccess(data, variables, context) {
- const { projectRef } = variables
- await queryClient.invalidateQueries(replicationKeys.destinations(projectRef))
+ const { projectRef, destinationId, pipelineId } = variables
+
+ await Promise.all([
+ queryClient.invalidateQueries(replicationKeys.destinations(projectRef)),
+ queryClient.invalidateQueries(replicationKeys.pipelines(projectRef)),
+ queryClient.invalidateQueries(replicationKeys.pipelineById(projectRef, pipelineId)),
+ queryClient.invalidateQueries(replicationKeys.pipelinesStatus(projectRef, pipelineId)),
+ queryClient.invalidateQueries(
+ replicationKeys.pipelinesReplicationStatus(projectRef, pipelineId)
+ ),
+ queryClient.invalidateQueries(replicationKeys.destinationById(projectRef, destinationId)),
+ ])
+
await onSuccess?.(data, variables, context)
},
async onError(data, variables, context) {
diff --git a/apps/studio/data/replication/update-destination-pipeline-mutation.ts b/apps/studio/data/replication/update-destination-pipeline-mutation.ts
index ee0cd6539ce..2c04b48db4c 100644
--- a/apps/studio/data/replication/update-destination-pipeline-mutation.ts
+++ b/apps/studio/data/replication/update-destination-pipeline-mutation.ts
@@ -1,15 +1,15 @@
import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
import { toast } from 'sonner'
+import { handleError, post } from 'data/fetchers'
import type { ResponseError } from 'types'
import { replicationKeys } from './keys'
-import { handleError, post } from 'data/fetchers'
export type BigQueryDestinationConfig = {
projectId: string
datasetId: string
serviceAccountKey: string
- maxStalenessMins: number
+ maxStalenessMins?: number
}
export type UpdateDestinationPipelineParams = {
@@ -23,7 +23,7 @@ export type UpdateDestinationPipelineParams = {
sourceId: number
pipelineConfig: {
publicationName: string
- batch: {
+ batch?: {
maxSize: number
maxFillMs: number
}
@@ -39,10 +39,7 @@ async function updateDestinationPipeline(
destinationConfig: {
bigQuery: { projectId, datasetId, serviceAccountKey, maxStalenessMins },
},
- pipelineConfig: {
- publicationName,
- batch: { maxSize, maxFillMs },
- },
+ pipelineConfig: { publicationName, batch },
sourceId,
}: UpdateDestinationPipelineParams,
signal?: AbortSignal
@@ -60,15 +57,17 @@ async function updateDestinationPipeline(
project_id: projectId,
dataset_id: datasetId,
service_account_key: serviceAccountKey,
- max_staleness_mins: maxStalenessMins,
+ ...(maxStalenessMins != null && { max_staleness_mins: maxStalenessMins }),
},
},
pipeline_config: {
publication_name: publicationName,
- batch: {
- max_size: maxSize,
- max_fill_ms: maxFillMs,
- },
+ ...(batch && {
+ batch: {
+ max_size: batch.maxSize,
+ max_fill_ms: batch.maxFillMs,
+ },
+ }),
},
source_id: sourceId,
},
@@ -99,8 +98,12 @@ export const useUpdateDestinationPipelineMutation = ({
{
async onSuccess(data, variables, context) {
const { projectRef } = variables
- await queryClient.invalidateQueries(replicationKeys.destinations(projectRef))
- await queryClient.invalidateQueries(replicationKeys.pipelines(projectRef))
+
+ await Promise.all([
+ queryClient.invalidateQueries(replicationKeys.destinations(projectRef)),
+ queryClient.invalidateQueries(replicationKeys.pipelines(projectRef)),
+ ])
+
await onSuccess?.(data, variables, context)
},
async onError(data, variables, context) {
diff --git a/apps/studio/state/replication-pipeline-request-status.tsx b/apps/studio/state/replication-pipeline-request-status.tsx
index 722c4de9120..36561ab5444 100644
--- a/apps/studio/state/replication-pipeline-request-status.tsx
+++ b/apps/studio/state/replication-pipeline-request-status.tsx
@@ -1,14 +1,28 @@
-import { createContext, useContext, useState, ReactNode, useCallback } from 'react'
+import {
+ createContext,
+ useContext,
+ useState,
+ ReactNode,
+ useCallback,
+ useRef,
+ useEffect,
+} from 'react'
export enum PipelineStatusRequestStatus {
None = 'None',
- EnableRequested = 'EnableRequested',
- DisableRequested = 'DisableRequested',
+ StartRequested = 'StartRequested',
+ StopRequested = 'StopRequested',
+ RestartRequested = 'RestartRequested',
}
interface PipelineRequestStatusContextType {
requestStatus: Record<number, PipelineStatusRequestStatus>
- setRequestStatus: (pipelineId: number, status: PipelineStatusRequestStatus) => void
+ pipelineStatusSnapshot: Record<number, string | undefined>
+ setRequestStatus: (
+ pipelineId: number,
+ status: PipelineStatusRequestStatus,
+ snapshotStatus?: string
+ ) => void
getRequestStatus: (pipelineId: number) => PipelineStatusRequestStatus
updatePipelineStatus: (pipelineId: number, backendStatus: string | undefined) => void
}
@@ -25,12 +39,58 @@ export const PipelineRequestStatusProvider = ({ children }: PipelineRequestStatu
const [requestStatus, setRequestStatusState] = useState<
Record<number, PipelineStatusRequestStatus>
>({})
+ const [pipelineStatusSnapshot, setPipelineStatusSnapshot] = useState<
+ Record<number, string | undefined>
+ >({})
+ const timeoutsRef = useRef<Record<number, number>>({})
+ const REQUEST_TIMEOUT_MS = 10_000
- const setRequestStatus = (pipelineId: number, status: PipelineStatusRequestStatus) => {
+ const setRequestStatus = (
+ pipelineId: number,
+ status: PipelineStatusRequestStatus,
+ snapshotStatus?: string
+ ) => {
setRequestStatusState((prev) => ({
...prev,
[pipelineId]: status,
}))
+ setPipelineStatusSnapshot((prev) => {
+ if (status === PipelineStatusRequestStatus.None) {
+ const { [pipelineId]: _omit, ...rest } = prev
+ return rest
+ }
+ // Only set snapshot when provided to avoid undefined entries
+ if (snapshotStatus !== undefined) {
+ return { ...prev, [pipelineId]: snapshotStatus }
+ }
+ return prev
+ })
+
+ // Clear existing timeout for this pipeline
+ const existing = timeoutsRef.current[pipelineId]
+ if (existing !== undefined) {
+ clearTimeout(existing)
+ delete timeoutsRef.current[pipelineId]
+ }
+
+ // Start auto-reset timer for non-None states
+ if (status !== PipelineStatusRequestStatus.None) {
+ const id = window.setTimeout(() => {
+ // If still pending, clear to None to show backend state
+ setRequestStatusState((prev) => {
+ if (prev[pipelineId] && prev[pipelineId] !== PipelineStatusRequestStatus.None) {
+ return { ...prev, [pipelineId]: PipelineStatusRequestStatus.None }
+ }
+ return prev
+ })
+ setPipelineStatusSnapshot((prev) => {
+ const { [pipelineId]: _omit, ...rest } = prev
+ return rest
+ })
+ delete timeoutsRef.current[pipelineId]
+ }, REQUEST_TIMEOUT_MS)
+ timeoutsRef.current[pipelineId] = id
+ }
}
const getRequestStatus = (pipelineId: number): PipelineStatusRequestStatus => {
@@ -38,25 +98,32 @@ export const PipelineRequestStatusProvider = ({ children }: PipelineRequestStatu
}
const updatePipelineStatus = useCallback(
- (pipelineId: number, backendStatus: string | undefined) => {
+ (pipelineId: number, newStatus: string | undefined) => {
const currentRequestStatus = requestStatus[pipelineId] || PipelineStatusRequestStatus.None
+ if (currentRequestStatus === PipelineStatusRequestStatus.None) return
- if (
- (currentRequestStatus === PipelineStatusRequestStatus.EnableRequested &&
- (backendStatus === 'started' || backendStatus === 'failed')) ||
- (currentRequestStatus === PipelineStatusRequestStatus.DisableRequested &&
- (backendStatus === 'stopped' || backendStatus === 'failed'))
- ) {
+ // Only remove when backend status differs from snapshot
+ const snapshotStatus = pipelineStatusSnapshot[pipelineId]
+ if (newStatus !== snapshotStatus) {
setRequestStatus(pipelineId, PipelineStatusRequestStatus.None)
}
},
- [requestStatus, setRequestStatus]
+ [requestStatus, pipelineStatusSnapshot]
)
+ // Cleanup all timers on unmount
+ useEffect(() => {
+ return () => {
+ Object.values(timeoutsRef.current).forEach((id) => clearTimeout(id))
+ timeoutsRef.current = {}
+ }
+ }, [])
+
return (
<PipelineRequestStatusContext.Provider
value={{
requestStatus,
+ pipelineStatusSnapshot,
setRequestStatus,
getRequestStatus,
updatePipelineStatus,
diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.ts
index 1c2b7042faa..87bbc37c9df 100644
--- a/packages/api-types/types/api.d.ts
+++ b/packages/api-types/types/api.d.ts
@@ -337,6 +337,23 @@ export interface paths {
patch?: never
trace?: never
}
+ '/v1/projects/{ref}/analytics/endpoints/functions.combined-stats': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Gets a project's function combined statistics */
+ get: operations['v1-get-project-function-combined-stats']
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/v1/projects/{ref}/analytics/endpoints/logs.all': {
parameters: {
query?: never
@@ -946,7 +963,11 @@ export interface paths {
* @description Modifies the roles that can be assumed and for how long
*/
put: operations['v1-update-jit-access']
- post?: never
+ /**
+ * Authorize user-id to role mappings for JIT access
+ * @description Authorizes the request to assume a role in the project database
+ */
+ post: operations['v1-authorize-jit-access']
delete?: never
options?: never
head?: never
@@ -1828,6 +1849,8 @@ export interface components {
mfa_totp_verify_enabled: boolean | null
mfa_web_authn_enroll_enabled: boolean | null
mfa_web_authn_verify_enabled: boolean | null
+ nimbus_oauth_client_id: string | null
+ nimbus_oauth_client_secret: string | null
password_hibp_enabled: boolean | null
password_min_length: number | null
/** @enum {string|null} */
@@ -1894,6 +1917,10 @@ export interface components {
smtp_user: string | null
uri_allow_list: string | null
}
+ AuthorizeJitAccessBody: {
+ rhost: string
+ role: string
+ }
BranchActionBody: {
migration_version?: string
}
@@ -1959,6 +1986,7 @@ export interface components {
| 'FUNCTIONS_FAILED'
/** Format: date-time */
updated_at: string
+ with_data: boolean
}
BranchUpdateResponse: {
/** @enum {string} */
@@ -2336,16 +2364,48 @@ export interface components {
/** Format: uuid */
user_id: string
user_roles: {
- expires_at?: string
+ allowed_networks?: {
+ allowed_cidrs?: {
+ cidr: string
+ }[]
+ allowed_cidrs_v6?: {
+ cidr: string
+ }[]
+ }
+ expires_at?: number
role: string
}[]
}
+ JitAuthorizeAccessResponse: {
+ /** Format: uuid */
+ user_id: string
+ user_role: {
+ allowed_networks?: {
+ allowed_cidrs?: {
+ cidr: string
+ }[]
+ allowed_cidrs_v6?: {
+ cidr: string
+ }[]
+ }
+ expires_at?: number
+ role: string
+ }
+ }
JitListAccessResponse: {
items: {
/** Format: uuid */
user_id: string
user_roles: {
- expires_at?: string
+ allowed_networks?: {
+ allowed_cidrs?: {
+ cidr: string
+ }[]
+ allowed_cidrs_v6?: {
+ cidr: string
+ }[]
+ }
+ expires_at?: number
role: string
}[]
}[]
@@ -2981,6 +3041,8 @@ export interface components {
mfa_totp_verify_enabled?: boolean | null
mfa_web_authn_enroll_enabled?: boolean | null
mfa_web_authn_verify_enabled?: boolean | null
+ nimbus_oauth_client_id?: string | null
+ nimbus_oauth_client_secret?: string | null
password_hibp_enabled?: boolean | null
password_min_length?: number | null
/** @enum {string|null} */
@@ -3107,7 +3169,15 @@ export interface components {
}
UpdateJitAccessBody: {
roles: {
- expires_at?: string
+ allowed_networks?: {
+ allowed_cidrs?: {
+ cidr: string
+ }[]
+ allowed_cidrs_v6?: {
+ cidr: string
+ }[]
+ }
+ expires_at?: number
role: string
}[]
/** Format: uuid */
@@ -4283,6 +4353,44 @@ export interface operations {
}
}
}
+ 'v1-get-project-function-combined-stats': {
+ parameters: {
+ query: {
+ function_id: string
+ interval: '15min' | '1hr' | '3hr' | '1day'
+ }
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['AnalyticsResponse']
+ }
+ }
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to get project's function combined statistics */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
'v1-get-project-logs': {
parameters: {
query?: {
@@ -4692,7 +4800,30 @@ export interface operations {
query?: never
header?: never
path: {
- addon_variant: unknown
+ addon_variant:
+ | (
+ | 'ci_micro'
+ | 'ci_small'
+ | 'ci_medium'
+ | 'ci_large'
+ | 'ci_xlarge'
+ | 'ci_2xlarge'
+ | 'ci_4xlarge'
+ | 'ci_8xlarge'
+ | 'ci_12xlarge'
+ | 'ci_16xlarge'
+ | 'ci_24xlarge'
+ | 'ci_24xlarge_optimized_cpu'
+ | 'ci_24xlarge_optimized_memory'
+ | 'ci_24xlarge_high_memory'
+ | 'ci_48xlarge'
+ | 'ci_48xlarge_optimized_cpu'
+ | 'ci_48xlarge_optimized_memory'
+ | 'ci_48xlarge_high_memory'
+ )
+ | 'cd_default'
+ | ('pitr_7' | 'pitr_14' | 'pitr_28')
+ | 'ipv4_default'
/** @description Project ref */
ref: string
}
@@ -6229,6 +6360,45 @@ export interface operations {
}
}
}
+ 'v1-authorize-jit-access': {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['AuthorizeJitAccessBody']
+ }
+ }
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['JitAuthorizeAccessResponse']
+ }
+ }
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to authorize database jit access */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
'v1-delete-jit-access': {
parameters: {
query?: never
diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts
index 70b04347348..c6fb1f2f00d 100644
--- a/packages/api-types/types/platform.d.ts
+++ b/packages/api-types/types/platform.d.ts
@@ -458,7 +458,7 @@ export interface paths {
}
get?: never
put?: never
- /** Send exit survey to HubSpot, Notion, and survey_responses table */
+ /** Send exit survey to HubSpot and survey_responses table */
post: operations['SendFeedbackController_sendExitSurvey']
delete?: never
options?: never
@@ -801,6 +801,23 @@ export interface paths {
patch?: never
trace?: never
}
+ '/platform/integrations/vercel/connections/project/{project_ref}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Gets all Vercel integrations (regular and marketplace) with their connections for a given project */
+ get: operations['VercelConnectionsController_getProjectVercelConnections']
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/platform/integrations/vercel/projects/{organization_integration_id}': {
parameters: {
query?: never
@@ -2134,23 +2151,6 @@ export interface paths {
patch?: never
trace?: never
}
- '/platform/profile/search': {
- parameters: {
- query?: never
- header?: never
- path?: never
- cookie?: never
- }
- get?: never
- put?: never
- /** Search profiles by username, email with the given keywords */
- post: operations['SearchProfileController_searchProfile']
- delete?: never
- options?: never
- head?: never
- patch?: never
- trace?: never
- }
'/platform/projects': {
parameters: {
query?: never
@@ -2211,15 +2211,15 @@ export interface paths {
patch: operations['ProjectsRefController_updateProject']
trace?: never
}
- '/platform/projects/{ref}/analytics/endpoints/functions.inv-stats': {
+ '/platform/projects/{ref}/analytics/endpoints/functions.combined-stats': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
- /** Gets a project's function invocation statistics */
- get: operations['FunctionInvocationLogsController_getStatus']
+ /** Gets a project's function combined statistics */
+ get: operations['FunctionsLogsController_getCombinedStats']
put?: never
post?: never
delete?: never
@@ -2236,7 +2236,7 @@ export interface paths {
cookie?: never
}
/** Gets a project's function request statistics */
- get: operations['FunctionRequestLogsController_getStatus']
+ get: operations['FunctionsLogsController_getRequestStats']
put?: never
post?: never
delete?: never
@@ -2253,7 +2253,7 @@ export interface paths {
cookie?: never
}
/** Gets a project's function resource usage */
- get: operations['FunctionResourceLogsController_getStatus']
+ get: operations['FunctionsLogsController_getResourceUsage']
put?: never
post?: never
delete?: never
@@ -4206,58 +4206,6 @@ export interface paths {
patch?: never
trace?: never
}
- '/platform/vercel/projects': {
- parameters: {
- query?: never
- header?: never
- path?: never
- cookie?: never
- }
- /** Gets the list of Vercel projects */
- get: operations['VercelProjectsController_getVercelProjects']
- put?: never
- post?: never
- delete?: never
- options?: never
- head?: never
- patch?: never
- trace?: never
- }
- '/platform/vercel/projects/{id}': {
- parameters: {
- query?: never
- header?: never
- path?: never
- cookie?: never
- }
- /** Gets the Vercel project with the given ID */
- get: operations['VercelProjectsController_getVercelProject']
- put?: never
- post?: never
- delete?: never
- options?: never
- head?: never
- patch?: never
- trace?: never
- }
- '/platform/vercel/projects/envs': {
- parameters: {
- query?: never
- header?: never
- path?: never
- cookie?: never
- }
- /** Gets the environment variables for the given project ID on behalf of the given team ID */
- get: operations['VercelEnvironmentVariablesController_getEnvironmentVariables']
- put?: never
- /** Creates the environment variable for the given project ID on behalf of the given team ID */
- post: operations['VercelEnvironmentVariablesController_createEnvironmentVariable']
- delete?: never
- options?: never
- head?: never
- patch?: never
- trace?: never
- }
'/platform/vercel/redirect/{installation_id}': {
parameters: {
query?: never
@@ -4483,11 +4431,9 @@ export interface components {
walg_enabled: boolean
}
CloneProject: {
- /** @default 0 */
cloneBackupId?: number
newDbPass: string
newProjectName: string
- /** @default 0 */
recoveryTimeTarget?: number
}
CloudMarketplaceOnboardingInfoResponse: {
@@ -5015,8 +4961,10 @@ export interface components {
big_query: {
/** @description BigQuery dataset id */
dataset_id: string
+ /** @description Maximum number of concurrent streams when writing */
+ max_concurrent_streams?: number
/** @description Max staleness in minutes */
- max_staleness_mins: number
+ max_staleness_mins?: number
/** @description BigQuery project id */
project_id: string
/** @description BigQuery service account key */
@@ -5032,8 +4980,10 @@ export interface components {
big_query: {
/** @description BigQuery dataset id */
dataset_id: string
+ /** @description Maximum number of concurrent streams when writing */
+ max_concurrent_streams?: number
/** @description Max staleness in minutes */
- max_staleness_mins: number
+ max_staleness_mins?: number
/** @description BigQuery project id */
project_id: string
/** @description BigQuery service account key */
@@ -5270,12 +5220,6 @@ export interface components {
}
organization_integration_id: string
}
- CreateVercelEnvironmentVariableBody: {
- key: string
- target: string[]
- type: string
- value: string
- }
CreateVercelIntegrationBody: {
code: string
configuration_id: string
@@ -5756,6 +5700,68 @@ export interface components {
iso_timestamp_start?: string
sql?: string
}
+ GetProjectVercelConnectionsResponse: {
+ integrations: {
+ added_by: {
+ primary_email: string
+ username: string
+ }
+ connections: {
+ added_by: {
+ primary_email: string
+ username: string
+ }
+ env_sync_targets: string[]
+ foreign_project_id: string
+ id: string
+ inserted_at: string
+ metadata: {
+ framework?: string | null
+ name: string
+ supabaseConfig: {
+ projectEnvVars: {
+ write: boolean
+ }
+ }
+ }
+ organization_integration_id: string
+ public_env_var_prefix: string
+ supabase_project_ref: string
+ updated_at: string
+ }[]
+ id: string
+ inserted_at: string
+ metadata: {
+ account: {
+ avatar: string | null
+ name: string
+ source: string
+ team_id: string | null
+ team_slug: string | null
+ type: string
+ }
+ configuration_id: string
+ }
+ organization_slug: string
+ updated_at: string
+ }[]
+ marketplace_integrations: {
+ connections: {
+ foreign_project_id: string
+ framework: string | null
+ id: string
+ inserted_at: string
+ marketplace_installation_id: string
+ name: string
+ updated_at: string
+ vercel_owner_id: string | null
+ }[]
+ id: string
+ inserted_at: string
+ organization_slug: string
+ updated_at: string
+ }[]
+ }
GetPublicUrlBody: {
options?: {
download?: boolean
@@ -6177,6 +6183,8 @@ export interface components {
MFA_TOTP_VERIFY_ENABLED: boolean
MFA_WEB_AUTHN_ENROLL_ENABLED: boolean
MFA_WEB_AUTHN_VERIFY_ENABLED: boolean
+ NIMBUS_OAUTH_CLIENT_ID: string | null
+ NIMBUS_OAUTH_CLIENT_SECRET: string | null
PASSWORD_HIBP_ENABLED: boolean
PASSWORD_MIN_LENGTH: number
PASSWORD_REQUIRED_CHARACTERS: string
@@ -7263,13 +7271,6 @@ export interface components {
enabled: boolean
}
}
- Profile: {
- first_name: string
- gotrue_id: string
- id: number
- last_name: string
- username: string
- }
ProfileResponse: {
auth0_id: string
disabled_features: (
@@ -7668,8 +7669,10 @@ export interface components {
big_query: {
/** @description BigQuery dataset id */
dataset_id: string
+ /** @description Maximum number of concurrent streams when writing */
+ max_concurrent_streams?: number
/** @description Max staleness in minutes */
- max_staleness_mins: number
+ max_staleness_mins?: number
/** @description BigQuery project id */
project_id: string
/** @description BigQuery service account key */
@@ -7691,8 +7694,10 @@ export interface components {
big_query: {
/** @description BigQuery dataset id */
dataset_id: string
+ /** @description Maximum number of concurrent streams when writing */
+ max_concurrent_streams?: number
/** @description Max staleness in minutes */
- max_staleness_mins: number
+ max_staleness_mins?: number
/** @description BigQuery project id */
project_id: string
/** @description BigQuery service account key */
@@ -8040,9 +8045,6 @@ export interface components {
disable_statement_timeout?: boolean
query: string
}
- SearchProfileBody: {
- keywords: string
- }
SendDocsFeedbackBody: {
feedback?: string
isHelpful: boolean
@@ -8698,6 +8700,8 @@ export interface components {
MFA_TOTP_VERIFY_ENABLED?: boolean | null
MFA_WEB_AUTHN_ENROLL_ENABLED?: boolean | null
MFA_WEB_AUTHN_VERIFY_ENABLED?: boolean | null
+ NIMBUS_OAUTH_CLIENT_ID?: string | null
+ NIMBUS_OAUTH_CLIENT_SECRET?: string | null
PASSWORD_HIBP_ENABLED?: boolean | null
PASSWORD_MIN_LENGTH?: number | null
/** @enum {string|null} */
@@ -8964,8 +8968,10 @@ export interface components {
big_query: {
/** @description BigQuery dataset id */
dataset_id: string
+ /** @description Maximum number of concurrent streams when writing */
+ max_concurrent_streams?: number
/** @description Max staleness in minutes */
- max_staleness_mins: number
+ max_staleness_mins?: number
/** @description BigQuery project id */
project_id: string
/** @description BigQuery service account key */
@@ -8981,8 +8987,10 @@ export interface components {
big_query: {
/** @description BigQuery dataset id */
dataset_id: string
+ /** @description Maximum number of concurrent streams when writing */
+ max_concurrent_streams?: number
/** @description Max staleness in minutes */
- max_staleness_mins: number
+ max_staleness_mins?: number
/** @description BigQuery project id */
project_id: string
/** @description BigQuery service account key */
@@ -10192,6 +10200,12 @@ export interface operations {
'application/json': components['schemas']['CloneBackupsResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to list available valid backups */
500: {
headers: {
@@ -10225,6 +10239,12 @@ export interface operations {
'application/json': components['schemas']['ProjectClonedResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to clone the current project */
500: {
headers: {
@@ -10254,6 +10274,12 @@ export interface operations {
'application/json': components['schemas']['ProjectClonedStatusResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve clone project status */
500: {
headers: {
@@ -11094,6 +11120,34 @@ export interface operations {
}
}
}
+ VercelConnectionsController_getProjectVercelConnections: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ project_ref: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['GetProjectVercelConnectionsResponse']
+ }
+ }
+ /** @description Failed to get Vercel integrations for the given project */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
VercelProjectController_getVercelProjects: {
parameters: {
query?: {
@@ -12343,6 +12397,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to remove organization member */
500: {
headers: {
@@ -12375,6 +12435,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to assign organization member with new role */
500: {
headers: {
@@ -12408,6 +12474,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to update organization member role */
500: {
headers: {
@@ -12437,6 +12509,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to remove organization member role */
500: {
headers: {
@@ -12537,6 +12615,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to delete organization invitation with given id */
500: {
headers: {
@@ -12625,6 +12709,12 @@ export interface operations {
'application/json': components['schemas']['MfaStatusResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to get organization MFA status */
500: {
headers: {
@@ -14662,6 +14752,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to format sql query */
500: {
headers: {
@@ -14695,6 +14791,12 @@ export interface operations {
'application/json': components['schemas']['ValidateQueryResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to validate sql query */
500: {
headers: {
@@ -15639,36 +15741,6 @@ export interface operations {
}
}
}
- SearchProfileController_searchProfile: {
- parameters: {
- query?: never
- header?: never
- path?: never
- cookie?: never
- }
- requestBody: {
- content: {
- 'application/json': components['schemas']['SearchProfileBody']
- }
- }
- responses: {
- 201: {
- headers: {
- [name: string]: unknown
- }
- content: {
- 'application/json': components['schemas']['Profile'][]
- }
- }
- /** @description Failed to search profiles with the given keywords */
- 500: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- }
- }
ProjectsController_getProjects: {
parameters: {
query?: never
@@ -15825,11 +15897,11 @@ export interface operations {
}
}
}
- FunctionInvocationLogsController_getStatus: {
+ FunctionsLogsController_getCombinedStats: {
parameters: {
query: {
function_id: string
- interval: '5min' | '15min' | '1hr' | '1day' | '7day'
+ interval: '15min' | '1hr' | '3hr' | '1day'
}
header?: never
path: {
@@ -15854,7 +15926,7 @@ export interface operations {
}
content?: never
}
- /** @description Failed to get project's function invocation statistics */
+ /** @description Failed to get project's function request statistics */
500: {
headers: {
[name: string]: unknown
@@ -15863,11 +15935,11 @@ export interface operations {
}
}
}
- FunctionRequestLogsController_getStatus: {
+ FunctionsLogsController_getRequestStats: {
parameters: {
query: {
function_id: string
- interval: '5min' | '15min' | '1hr' | '1day' | '7day'
+ interval: '15min' | '1hr' | '3hr' | '1day'
}
header?: never
path: {
@@ -15901,11 +15973,11 @@ export interface operations {
}
}
}
- FunctionResourceLogsController_getStatus: {
+ FunctionsLogsController_getResourceUsage: {
parameters: {
query: {
function_id: string
- interval: '5min' | '15min' | '1hr' | '1day' | '7day'
+ interval: '15min' | '1hr' | '3hr' | '1day'
}
header?: never
path: {
@@ -16074,6 +16146,12 @@ export interface operations {
'application/json': components['schemas']['AnalyticsResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to get project's usage api requests count */
500: {
headers: {
@@ -17039,6 +17117,12 @@ export interface operations {
'application/json': components['schemas']['PgbouncerConfigResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve project's pgbouncer config */
500: {
headers: {
@@ -17107,6 +17191,12 @@ export interface operations {
'application/json': components['schemas']['PgbouncerStatusResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve project's pgbouncer status */
500: {
headers: {
@@ -17136,6 +17226,12 @@ export interface operations {
'application/json': components['schemas']['PostgresConfigResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve project's Postgres config */
500: {
headers: {
@@ -17376,6 +17472,12 @@ export interface operations {
'application/json': components['schemas']['GetJwtSecretUpdateStatus']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve JWT secret update status */
500: {
headers: {
@@ -17479,6 +17581,12 @@ export interface operations {
'application/json': components['schemas']['SupavisorConfigResponse'][]
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve project's supavisor config */
500: {
headers: {
@@ -17651,7 +17759,7 @@ export interface operations {
ContentController_deleteContents: {
parameters: {
query: {
- ids: string[]
+ ids: string
}
header?: never
path: {
@@ -17808,7 +17916,7 @@ export interface operations {
ContentFoldersController_DeleteFolder: {
parameters: {
query: {
- ids: string[]
+ ids: string
}
header?: never
path?: never
@@ -18074,6 +18182,12 @@ export interface operations {
'application/json': components['schemas']['DatabaseStatusResponse'][]
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to get statuses of databases of a project */
500: {
headers: {
@@ -18354,6 +18468,10 @@ export interface operations {
| 'realtime_channel_events'
| 'realtime_channel_presence_events'
| 'realtime_channel_db_events'
+ | 'realtime_authorization_rls_execution_time'
+ | 'realtime_payload_size'
+ | 'realtime_connected_clients'
+ | 'realtime_replication_connection_lag'
databaseIdentifier?: string
endDate: string
interval?: '1m' | '5m' | '10m' | '30m' | '1h' | '1d'
@@ -18374,6 +18492,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to get project's usage metrics */
500: {
headers: {
@@ -18436,6 +18560,12 @@ export interface operations {
'application/json': components['schemas']['LoadBalancerDetailResponse'][]
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
}
}
ProjectAdvisorNotificationsController_listNotificationExceptions: {
@@ -18458,6 +18588,12 @@ export interface operations {
'application/json': components['schemas']['ListNotificationExceptionsResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve advisor notification exceptions */
500: {
headers: {
@@ -18491,7 +18627,13 @@ export interface operations {
'application/json': components['schemas']['CreateNotificationExceptionsResponse']
}
}
- /** @description Failed to creare advisor notification exceptions */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to create advisor notification exceptions */
500: {
headers: {
[name: string]: unknown
@@ -18503,7 +18645,7 @@ export interface operations {
ProjectAdvisorNotificationsController_deleteNotificationExceptions: {
parameters: {
query: {
- ids: string[]
+ ids: string
}
header?: never
path: {
@@ -18520,6 +18662,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to delete advisor notification exceptions */
500: {
headers: {
@@ -18552,6 +18700,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to update advisor notification exceptions */
500: {
headers: {
@@ -18644,6 +18798,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to resize database disk */
500: {
headers: {
@@ -18712,6 +18872,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to restart given services */
500: {
headers: {
@@ -18991,6 +19157,12 @@ export interface operations {
'application/json': components['schemas']['ServiceVersions']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
}
}
SettingsController_getProjectSettings: {
@@ -19013,6 +19185,12 @@ export interface operations {
'application/json': components['schemas']['ProjectSettingsResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to retrieve project's settings */
500: {
headers: {
@@ -20242,6 +20420,12 @@ export interface operations {
'application/json': components['schemas']['GetArchiveResponse']
}
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to get project storage archive */
500: {
headers: {
@@ -20269,6 +20453,12 @@ export interface operations {
}
content?: never
}
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to create project storage archive */
500: {
headers: {
@@ -21267,126 +21457,6 @@ export interface operations {
}
}
}
- VercelProjectsController_getVercelProjects: {
- parameters: {
- query?: {
- teamId?: string
- }
- header: {
- vercel_authorization: string
- }
- path?: never
- cookie?: never
- }
- requestBody?: never
- responses: {
- 200: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- /** @description Failed to get projects */
- 500: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- }
- }
- VercelProjectsController_getVercelProject: {
- parameters: {
- query?: {
- teamId?: string
- }
- header: {
- vercel_authorization: string
- }
- path: {
- id: string
- }
- cookie?: never
- }
- requestBody?: never
- responses: {
- 200: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- /** @description Failed to get project */
- 500: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- }
- }
- VercelEnvironmentVariablesController_getEnvironmentVariables: {
- parameters: {
- query: {
- projectId: string
- teamId?: string
- }
- header: {
- vercel_authorization: string
- }
- path?: never
- cookie?: never
- }
- requestBody?: never
- responses: {
- 200: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- /** @description Failed to get Vercel environment variables */
- 500: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- }
- }
- VercelEnvironmentVariablesController_createEnvironmentVariable: {
- parameters: {
- query: {
- projectId: string
- teamId?: string
- }
- header: {
- vercel_authorization: string
- }
- path?: never
- cookie?: never
- }
- requestBody: {
- content: {
- 'application/json': components['schemas']['CreateVercelEnvironmentVariableBody']
- }
- }
- responses: {
- 201: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- /** @description Failed to create Vercel environment variables */
- 500: {
- headers: {
- [name: string]: unknown
- }
- content?: never
- }
- }
- }
VercelRedirectController_getRedirectUrl: {
parameters: {
query?: never