The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Implement disable branching
Joshen Lim2ede787f7582
diff --git a/studio/components/interfaces/BranchManagement/BranchManagement.tsx b/studio/components/interfaces/BranchManagement/BranchManagement.tsxindex bedea626b42..c18f2a213ff 100644--- a/studio/components/interfaces/BranchManagement/BranchManagement.tsx+++ b/studio/components/interfaces/BranchManagement/BranchManagement.tsx@@ -1,7 +1,16 @@import { partition } from 'lodash'import { useRouter } from 'next/router'import { useState } from 'react'-import { Button, IconSearch, Input } from 'ui'+import {+ AlertDescription_Shadcn_,+ AlertTitle_Shadcn_,+ Alert_Shadcn_,+ Button,+ IconAlertTriangle,+ IconSearch,+ Input,+ Modal,+} from 'ui'import { useParams } from 'common'import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'@@ -15,7 +24,8 @@ import { MainBranchPanel } from './BranchPanels'import CreateBranchSidePanel from './CreateBranchSidePanel'import PreviewBranches from './PreviewBranches'import PullRequests from './PullRequests'-import UpdateBranchSidePanel from './UpdateBranchSidePanel'+import ConfirmationModal from 'components/ui/ConfirmationModal'+import { useBranchesDisableMutation } from 'data/branches/branches-disable-mutation'const BranchManagement = () => {const { ui } = useStore()@@ -24,11 +34,12 @@ const BranchManagement = () => {const projectDetails = useSelectedProject()const isBranch = projectDetails?.parent_project_ref !== undefined+ const hasBranchEnabled = projectDetails?.has_branch_enabledconst projectRef =projectDetails !== undefined ? (isBranch ? projectDetails.parent_project_ref : ref) : undefinedconst [showCreateBranch, setShowCreateBranch] = useState(false)- const [selectedBranchToUpdate, setSelectedBranchToUpdate] = useState<Branch>()+ const [showDisableBranching, setShowDisableBranching] = useState(false)const [selectedBranchToDelete, setSelectedBranchToDelete] = useState<Branch>()const { data: branches, error, isLoading, isError, isSuccess } = useBranchesQuery({ projectRef })@@ -50,12 +61,33 @@ const BranchManagement = () => {},})+ const { mutate: disableBranching, isLoading: isDisabling } = useBranchesDisableMutation({+ onSuccess: () => {+ ui.setNotification({+ category: 'success',+ message: 'Successfully disabled branching for project',+ })+ setShowDisableBranching(false)+ },+ })+const onConfirmDeleteBranch = () => {if (selectedBranchToDelete == undefined) return console.error('No branch selected')if (projectRef == undefined) return console.error('Project ref is required')deleteBranch({ id: selectedBranchToDelete?.id, projectRef })}+ const onConfirmDisableBranching = () => {+ if (projectRef == undefined) return console.error('Project ref is required')+ if (!previewBranches) return console.error('No branches available')+ disableBranching({ projectRef, branchIds: previewBranches?.map((branch) => branch.id) })+ }++ if (!hasBranchEnabled) {+ // [Joshen] Some empty state here+ return <div>Some disabled state</div>+ }+return (<><ScaffoldContainer>@@ -71,16 +103,15 @@ const BranchManagement = () => {<div className="">{isLoading && <GenericSkeletonLoader />}{isError && <AlertError error={error} subject="Failed to retrieve branches" />}- {isSuccess && (+ {isSuccess && mainBranch !== undefined && (<><MainBranchPanelbranch={mainBranch}- onSelectUpdate={() => setSelectedBranchToUpdate(mainBranch)}+ onSelectDisableBranching={() => setShowDisableBranching(true)}/><PullRequests previewBranches={previewBranches} /><PreviewBranchespreviewBranches={previewBranches}- onSelectUpdateBranch={setSelectedBranchToUpdate}onSelectDeleteBranch={setSelectedBranchToDelete}/></>@@ -95,24 +126,60 @@ const BranchManagement = () => {visible={selectedBranchToDelete !== undefined}onCancel={() => setSelectedBranchToDelete(undefined)}onConfirm={() => onConfirmDeleteBranch()}- title="Delete branch"loading={isDeleting}- confirmLabel={`Delete branch`}+ title="Delete branch"+ confirmLabel="Delete branch"confirmPlaceholder="Type in name of branch"confirmString={selectedBranchToDelete?.name ?? ''}text={`This will delete your database preview branch "${selectedBranchToDelete?.name}"`}alert="You cannot recover this branch once it is deleted!"/>+ <ConfirmationModal+ danger+ size="medium"+ loading={isDisabling}+ visible={showDisableBranching}+ header="Confirm disable branching for project"+ buttonLabel="Confirm disable branching"+ buttonLoadingLabel="Disabling branching..."+ onSelectConfirm={() => onConfirmDisableBranching()}+ onSelectCancel={() => setShowDisableBranching(false)}+ >+ <Modal.Content>+ <div className="py-6">+ <Alert_Shadcn_ variant="warning">+ <IconAlertTriangle strokeWidth={2} />+ <AlertTitle_Shadcn_>This action cannot be undone</AlertTitle_Shadcn_>+ <AlertDescription_Shadcn_>+ All database preview branches will be removed upon disabling branching. You may+ still re-enable branching again thereafter, but your existing preview branches will+ not be restored.+ </AlertDescription_Shadcn_>+ </Alert_Shadcn_>+ <ul className="mt-4 space-y-5">+ <li className="flex gap-3">+ <div>+ <strong className="text-sm">Before you disable branching, consider:</strong>+ <ul className="space-y-2 mt-2 text-sm text-light">+ <li className="list-disc ml-6">+ Your project no longer requires database previews.+ </li>+ <li className="list-disc ml-6">+ None of your database previews are currently being used in any app.+ </li>+ </ul>+ </div>+ </li>+ </ul>+ </div>+ </Modal.Content>+ </ConfirmationModal>+<CreateBranchSidePanelvisible={showCreateBranch}onClose={() => setShowCreateBranch(false)}/>-- <UpdateBranchSidePanel- selectedBranch={selectedBranchToUpdate}- onClose={() => setSelectedBranchToUpdate(undefined)}- /></>)}diff --git a/studio/components/interfaces/BranchManagement/BranchPanels.tsx b/studio/components/interfaces/BranchManagement/BranchPanels.tsxindex 383902267ca..f209176b6d9 100644--- a/studio/components/interfaces/BranchManagement/BranchPanels.tsx+++ b/studio/components/interfaces/BranchManagement/BranchPanels.tsx@@ -5,11 +5,11 @@ import { PropsWithChildren, forwardRef, useState } from 'react'import {Badge,Button,+ Dropdown,DropdownMenuContent_Shadcn_,DropdownMenuItem_Shadcn_,DropdownMenuTrigger_Shadcn_,DropdownMenu_Shadcn_,- IconEdit,IconGitBranch,IconGitHub,IconMoreVertical,@@ -26,9 +26,10 @@ interface BranchPanelProps {branch: BranchonSelectUpdate?: () => voidonSelectDelete?: () => void+ onSelectDisableBranching?: () => void}-const MainBranchPanel = ({ branch, onSelectUpdate = noop }: BranchPanelProps) => {+const MainBranchPanel = ({ branch, onSelectDisableBranching = noop }: BranchPanelProps) => {const { ref } = useParams()const [open, setOpen] = useState(false)const isActive = ref === branch.project_ref@@ -60,9 +61,15 @@ const MainBranchPanel = ({ branch, onSelectUpdate = noop }: BranchPanelProps) =></Button></DropdownMenuTrigger_Shadcn_><DropdownMenuContent_Shadcn_ side="bottom" align="end">- <DropdownMenuItem_Shadcn_ className="flex gap-2" onSelect={() => onSelectUpdate()}>- <IconEdit size={14} />- Edit branch+ <DropdownMenuItem_Shadcn_ className="flex gap-2" onSelect={() => {}}>+ Change production branch+ </DropdownMenuItem_Shadcn_>+ <Dropdown.Separator />+ <DropdownMenuItem_Shadcn_+ className="flex gap-2"+ onSelect={() => onSelectDisableBranching()}+ >+ Disable branching</DropdownMenuItem_Shadcn_></DropdownMenuContent_Shadcn_></DropdownMenu_Shadcn_>@@ -88,11 +95,7 @@ const BranchContainer = ({ className, children }: PropsWithChildren<{ className?)}-const BranchPanel = ({- branch,- onSelectUpdate = noop,- onSelectDelete = noop,-}: BranchPanelProps) => {+const BranchPanel = ({ branch, onSelectDelete = noop }: BranchPanelProps) => {const { ref } = useParams()const [open, setOpen] = useState(false)@@ -119,10 +122,6 @@ const BranchPanel = ({</Button></DropdownMenuTrigger_Shadcn_><DropdownMenuContent_Shadcn_ side="bottom" align="end">- <DropdownMenuItem_Shadcn_ className="flex gap-2" onSelect={() => onSelectUpdate()}>- <IconEdit size={14} />- Edit branch- </DropdownMenuItem_Shadcn_><DropdownMenuItem_Shadcn_ className="flex gap-2" onSelect={() => onSelectDelete()}><IconTrash size={14} />Delete branch@@ -157,4 +156,4 @@ const BranchHeader = forwardRef<HTMLDivElement, BranchHeader>()BranchHeader.displayName = 'BranchHeader'-export { BranchHeader, BranchContainer, BranchPanel, MainBranchPanel }+export { BranchContainer, BranchHeader, BranchPanel, MainBranchPanel }diff --git a/studio/components/interfaces/BranchManagement/PreviewBranches.tsx b/studio/components/interfaces/BranchManagement/PreviewBranches.tsxindex 4bd7f567b27..50003ddb270 100644--- a/studio/components/interfaces/BranchManagement/PreviewBranches.tsx+++ b/studio/components/interfaces/BranchManagement/PreviewBranches.tsx@@ -1,18 +1,13 @@import { Branch } from 'data/branches/branches-query'-import { BranchContainer, BranchHeader, BranchPanel } from './BranchPanels'import { Button, IconExternalLink, IconGitBranch } from 'ui'+import { BranchContainer, BranchHeader, BranchPanel } from './BranchPanels'interface PreviewBranchesProps {previewBranches: Branch[]- onSelectUpdateBranch: (branch: Branch) => voidonSelectDeleteBranch: (branch: Branch) => void}-const PreviewBranches = ({- previewBranches,- onSelectUpdateBranch,- onSelectDeleteBranch,-}: PreviewBranchesProps) => {+const PreviewBranches = ({ previewBranches, onSelectDeleteBranch }: PreviewBranchesProps) => {return (<><BranchHeader markdown={previewBranches.length > 0 ? `#### Preview branches` : undefined} />@@ -49,7 +44,6 @@ const PreviewBranches = ({<BranchPanelkey={branch.id}branch={branch}- onSelectUpdate={() => onSelectUpdateBranch(branch)}onSelectDelete={() => onSelectDeleteBranch(branch)}/>))diff --git a/studio/components/interfaces/BranchManagement/UpdateBranchSidePanel.tsx b/studio/components/interfaces/BranchManagement/UpdateBranchSidePanel.tsxdeleted file mode 100644index 4899a922c11..00000000000--- a/studio/components/interfaces/BranchManagement/UpdateBranchSidePanel.tsx+++ /dev/null@@ -1,97 +0,0 @@-import { useParams } from 'common'-import { useBranchUpdateMutation } from 'data/branches/branch-update-mutation'-import { Branch } from 'data/branches/branches-query'-import { useStore } from 'hooks'-import { useRef } from 'react'-import { Button, Form, Input, SidePanel } from 'ui'--interface UpdateBranchSidePanelProps {- selectedBranch?: Branch- onClose: () => void-}--const UpdateBranchSidePanel = ({ selectedBranch, onClose }: UpdateBranchSidePanelProps) => {- const { ui } = useStore()- const submitRef: any = useRef()- const { ref: projectRef } = useParams()- const { mutate: updateBranch, isLoading: isUpdating } = useBranchUpdateMutation({- onSuccess: () => {- onClose()- ui.setNotification({ category: 'success', message: 'Successfully updated branch' })- },- })-- const formId = 'update-branch-form'- const initialValues = {- branchName: selectedBranch?.name,- gitBranch: selectedBranch?.git_branch,- }-- const validate = (values: any) => {- const errors: any = {}- if (values.branchName.length === 0) errors.branchName = 'Please provide a branch name'- if (values.gitBranch.length === 0) errors.gitBranch = 'Please provide a Git branch'- return errors- }-- const onConfirmUpdate = (values: any) => {- if (selectedBranch === undefined) return console.error('No branch selected')- if (projectRef === undefined) return console.error('Project ref is required')- updateBranch({ ...values, id: selectedBranch.id, projectRef })- }-- return (- <SidePanel- visible={selectedBranch !== undefined}- header={`Update branch: ${selectedBranch?.name}`}- onCancel={onClose}- customFooter={- <div className="flex w-full justify-end space-x-3 border-t border-scale-500 px-3 py-4">- <Button- size="tiny"- type="default"- htmlType="button"- onClick={onClose}- disabled={isUpdating}- >- Cancel- </Button>- <Button- size="tiny"- type="primary"- htmlType="button"- disabled={isUpdating}- loading={isUpdating}- onClick={() => submitRef?.current?.click()}- >- Confirm- </Button>- </div>- }- >- <div className="py-6">- <SidePanel.Content>- <Form- validateOnBlur- id={formId}- initialValues={initialValues}- validate={validate}- onSubmit={onConfirmUpdate}- >- {() => {- return (- <div className="space-y-6">- <Input id="branchName" label="Branch name" />- <Input disabled id="gitBranch" label="Git branch" />- <button ref={submitRef} type="submit" className="hidden" />- </div>- )- }}- </Form>- </SidePanel.Content>- </div>- </SidePanel>- )-}--export default UpdateBranchSidePaneldiff --git a/studio/components/layouts/AppLayout/AppHeader.tsx b/studio/components/layouts/AppLayout/AppHeader.tsxindex 41e3cb83317..b0c582465fb 100644--- a/studio/components/layouts/AppLayout/AppHeader.tsx+++ b/studio/components/layouts/AppLayout/AppHeader.tsx@@ -11,19 +11,18 @@ import ProjectDropdown from './ProjectDropdown'import SettingsButton from './SettingsButton'import UserSettingsDropdown from './UserSettingsDropdown'import BranchDropdown from './BranchDropdown'-import { useProjectsQuery } from 'data/projects/projects-query'import EnableBranchingButton from './EnableBranchingButton/EnableBranchingButton'const AppHeader = () => {const router = useRouter()const { ref } = useParams()- const { data: projects } = useProjectsQuery()+ const project = useSelectedProject()const organization = useSelectedOrganization()const enableBranchManagement = useFlag('branchManagement')- const project = projects?.find((project) => project.ref === ref)const isBranchingAllowed = project?.cloud_provider === 'FLY'- const isBranchingEnabled = (project?.preview_branch_refs ?? []).length > 0+ const isBranchingEnabled =+ project?.has_branch_enabled === true || project?.parent_project_ref !== undefinedreturn (<div className="flex items-center justify-between px-4 py-1 bg-scale-200 border-b">diff --git a/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsx b/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsxindex 3a0804d531c..4a56d10098b 100644--- a/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsx+++ b/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsx@@ -20,11 +20,11 @@ import {} from 'ui'import { useParams } from 'common'+import { EmptyIntegrationConnection } from 'components/interfaces/Integrations/IntegrationPanels'import AlertError from 'components/ui/AlertError'import ShimmeringLoader from 'components/ui/ShimmeringLoader'import { useGithubBranchesQuery } from 'data/integrations/integrations-github-branches-query'import { Integration } from 'data/integrations/integrations.types'-import { EmptyIntegrationConnection } from 'components/interfaces/Integrations/IntegrationPanels'interface GithubRepositorySelectionProps {integration?: Integrationdiff --git a/studio/components/ui/ConfirmationModal.tsx b/studio/components/ui/ConfirmationModal.tsxindex 1465a529c8e..842572933c0 100644--- a/studio/components/ui/ConfirmationModal.tsx+++ b/studio/components/ui/ConfirmationModal.tsx@@ -4,6 +4,7 @@ import { Button, Modal } from 'ui'export interface ConfirmationModalProps {visible: booleandanger?: boolean+ loading?: booleanheader: string | JSX.Elementdescription?: stringsize?: 'small' | 'tiny' | 'medium' | 'large'@@ -15,6 +16,7 @@ export interface ConfirmationModalProps {const ConfirmationModal = ({visible = false,+ loading: loading_ = false,danger = false,header = '',description = '',@@ -31,6 +33,10 @@ const ConfirmationModal = ({}}, [visible])+ useEffect(() => {+ setLoading(loading_)+ }, [loading_])+const [loading, setLoading] = useState(false)const onConfirm: MouseEventHandler<HTMLButtonElement> = (e) => {diff --git a/studio/data/api.d.ts b/studio/data/api.d.tsindex 04dc4ae9cc8..1fce7b8a7a6 100644--- a/studio/data/api.d.ts+++ b/studio/data/api.d.ts@@ -1451,6 +1451,12 @@ export interface paths {/** Updates project's pgbouncer config */patch: operations["V1PgbouncerConfigController_updatePgbouncerConfig"];};+ "/v1/projects/{ref}/config/auth": {+ /** Gets project's auth config */+ get: operations["V1AuthConfigController_getV1AuthConfig"];+ /** Updates a project's auth config */+ patch: operations["V1AuthConfigController_updateV1AuthConfig"];+ };"/v1/projects/{ref}/functions": {/*** List all functions@@ -1607,35 +1613,9 @@ export interface components {redirectTo?: string;};GetGoTrueConfigResponse: {- app_version: string;- isFreeTier: boolean;- SAML_PRIVATE_KEY_ENCRYPTED?: string;- id: number;- project_id: number;- updated_at: string;SITE_URL: string;DISABLE_SIGNUP: boolean;- RATE_LIMIT_HEADER: string;JWT_EXP: number;- JWT_AUD: string;- JWT_DEFAULT_GROUP_NAME: string;- EXTERNAL_GITHUB_ENABLED: boolean;- EXTERNAL_GITHUB_CLIENT_ID: string;- EXTERNAL_GITHUB_SECRET: string;- EXTERNAL_BITBUCKET_ENABLED: boolean;- EXTERNAL_BITBUCKET_CLIENT_ID: string;- EXTERNAL_BITBUCKET_SECRET: string;- EXTERNAL_GOOGLE_ENABLED: boolean;- EXTERNAL_GOOGLE_CLIENT_ID: string;- EXTERNAL_GOOGLE_SECRET: string;- EXTERNAL_GOOGLE_ADDITIONAL_CLIENT_IDS?: string;- EXTERNAL_GITLAB_ENABLED: boolean;- EXTERNAL_GITLAB_CLIENT_ID: string;- EXTERNAL_GITLAB_SECRET: string;- EXTERNAL_GITLAB_URL: string;- EXTERNAL_KAKAO_ENABLED: boolean;- EXTERNAL_KAKAO_CLIENT_ID: string;- EXTERNAL_KAKAO_SECRET: string;SMTP_ADMIN_EMAIL: string;SMTP_HOST: string;SMTP_PORT: string;@@ -1643,139 +1623,121 @@ export interface components {SMTP_PASS?: string | null;SMTP_PASS_ENCRYPTED?: string | null;SMTP_MAX_FREQUENCY: number;+ SMTP_SENDER_NAME?: string;MAILER_AUTOCONFIRM: boolean;- MAILER_URLPATHS_INVITE: string;- MAILER_URLPATHS_CONFIRMATION: string;- MAILER_URLPATHS_RECOVERY: string;- MAILER_URLPATHS_EMAIL_CHANGE: string;MAILER_SUBJECTS_INVITE: string;MAILER_SUBJECTS_CONFIRMATION: string;MAILER_SUBJECTS_RECOVERY: string;MAILER_SUBJECTS_EMAIL_CHANGE: string;- MAILER_TEMPLATES_INVITE: string;+ MAILER_SUBJECTS_MAGIC_LINK: string;MAILER_TEMPLATES_INVITE_CONTENT: string;- MAILER_TEMPLATES_CONFIRMATION: string;MAILER_TEMPLATES_CONFIRMATION_CONTENT: string;- MAILER_TEMPLATES_RECOVERY: string;MAILER_TEMPLATES_RECOVERY_CONTENT: string;- MAILER_TEMPLATES_EMAIL_CHANGE: string;MAILER_TEMPLATES_EMAIL_CHANGE_CONTENT: string;- MAILER_SUBJECTS_MAGIC_LINK: string;- MAILER_TEMPLATES_MAGIC_LINK: string;MAILER_TEMPLATES_MAGIC_LINK_CONTENT: string;- MAX_ENROLLED_FACTORS: number;MFA_MAX_ENROLLED_FACTORS: number;- EXTERNAL_AZURE_ENABLED: boolean;- EXTERNAL_AZURE_CLIENT_ID: string;- EXTERNAL_AZURE_SECRET: string;- EXTERNAL_FACEBOOK_ENABLED: boolean;- EXTERNAL_FACEBOOK_CLIENT_ID: string;- EXTERNAL_FACEBOOK_SECRET: string;URI_ALLOW_LIST: string;- EXTERNAL_TWITTER_ENABLED: boolean;- EXTERNAL_TWITTER_CLIENT_ID: string;- EXTERNAL_TWITTER_SECRET: string;- EXTERNAL_APPLE_ENABLED: boolean;- EXTERNAL_APPLE_CLIENT_ID: string;- EXTERNAL_APPLE_SECRET: string;- EXTERNAL_IOS_BUNDLE_ID?: string;- EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS?: string;- EXTERNAL_DISCORD_ENABLED: boolean;- EXTERNAL_DISCORD_CLIENT_ID: string;- EXTERNAL_DISCORD_SECRET: string;- EXTERNAL_TWITCH_ENABLED: boolean;- EXTERNAL_TWITCH_CLIENT_ID: string;- EXTERNAL_TWITCH_SECRET: string;- SMTP_SENDER_NAME?: string;EXTERNAL_EMAIL_ENABLED: boolean;EXTERNAL_PHONE_ENABLED: boolean;+ SAML_ENABLED?: boolean;+ SECURITY_CAPTCHA_ENABLED: boolean;+ SECURITY_CAPTCHA_PROVIDER: string;+ SECURITY_CAPTCHA_SECRET: string;+ RATE_LIMIT_EMAIL_SENT: number;+ RATE_LIMIT_SMS_SENT: number;+ MAILER_SECURE_EMAIL_CHANGE_ENABLED: boolean;+ REFRESH_TOKEN_ROTATION_ENABLED: boolean;+ PASSWORD_MIN_LENGTH: number;+ SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION: boolean;+ SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: number;+ MAILER_OTP_EXP: number;SMS_AUTOCONFIRM: boolean;SMS_MAX_FREQUENCY: number;SMS_OTP_EXP: number;SMS_OTP_LENGTH: number;SMS_PROVIDER: string;+ SMS_MESSAGEBIRD_ACCESS_KEY: string;+ SMS_MESSAGEBIRD_ORIGINATOR: string;+ SMS_TEXTLOCAL_API_KEY: string;+ SMS_TEXTLOCAL_SENDER: string;SMS_TWILIO_ACCOUNT_SID: string;SMS_TWILIO_AUTH_TOKEN: string;SMS_TWILIO_MESSAGE_SERVICE_SID: string;SMS_TWILIO_VERIFY_ACCOUNT_SID: string;SMS_TWILIO_VERIFY_AUTH_TOKEN: string;SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: string;- SMS_TEMPLATE: string;- SAML_ENABLED?: boolean;- SECURITY_CAPTCHA_ENABLED: boolean;- SECURITY_CAPTCHA_PROVIDER: string;- SECURITY_CAPTCHA_SECRET: string;- RATE_LIMIT_EMAIL_SENT: number;- RATE_LIMIT_SMS_SENT: number;- MAILER_SECURE_EMAIL_CHANGE_ENABLED: boolean;- EXTERNAL_SPOTIFY_ENABLED: boolean;- EXTERNAL_SPOTIFY_CLIENT_ID: string;- EXTERNAL_SPOTIFY_SECRET: string;- EXTERNAL_SLACK_ENABLED: boolean;- EXTERNAL_SLACK_CLIENT_ID: string;- EXTERNAL_SLACK_SECRET: string;- SMS_MESSAGEBIRD_ACCESS_KEY: string;- SMS_MESSAGEBIRD_ORIGINATOR: string;- REFRESH_TOKEN_ROTATION_ENABLED: boolean;- EXTERNAL_LINKEDIN_ENABLED: boolean;- EXTERNAL_LINKEDIN_CLIENT_ID: string;- EXTERNAL_LINKEDIN_SECRET: string;- EXTERNAL_NOTION_ENABLED: boolean;- EXTERNAL_NOTION_CLIENT_ID: string;- EXTERNAL_NOTION_SECRET: string;SMS_VONAGE_API_KEY: string;SMS_VONAGE_API_SECRET: string;SMS_VONAGE_FROM: string;- SMS_TEXTLOCAL_API_KEY: string;- SMS_TEXTLOCAL_SENDER: string;- EXTERNAL_ZOOM_ENABLED: boolean;- EXTERNAL_ZOOM_CLIENT_ID: string;- EXTERNAL_ZOOM_SECRET: string;+ SMS_TEMPLATE: string;+ EXTERNAL_APPLE_ENABLED: boolean;+ EXTERNAL_APPLE_CLIENT_ID: string;+ EXTERNAL_APPLE_SECRET: string;+ EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS?: string;+ EXTERNAL_AZURE_ENABLED: boolean;+ EXTERNAL_AZURE_CLIENT_ID: string;+ EXTERNAL_AZURE_SECRET: string;EXTERNAL_AZURE_URL: string;- PASSWORD_MIN_LENGTH: number;- EXTERNAL_KEYCLOAK_ENABLED: boolean;- EXTERNAL_KEYCLOAK_CLIENT_ID: string;- EXTERNAL_KEYCLOAK_SECRET: string;- EXTERNAL_KEYCLOAK_URL: string;- EXTERNAL_WORKOS_ENABLED: boolean;- EXTERNAL_WORKOS_CLIENT_ID: string;- EXTERNAL_WORKOS_SECRET: string;- EXTERNAL_WORKOS_URL: string;+ EXTERNAL_BITBUCKET_ENABLED: boolean;+ EXTERNAL_BITBUCKET_CLIENT_ID: string;+ EXTERNAL_BITBUCKET_SECRET: string;+ EXTERNAL_DISCORD_ENABLED: boolean;+ EXTERNAL_DISCORD_CLIENT_ID: string;+ EXTERNAL_DISCORD_SECRET: string;+ EXTERNAL_FACEBOOK_ENABLED: boolean;+ EXTERNAL_FACEBOOK_CLIENT_ID: string;+ EXTERNAL_FACEBOOK_SECRET: string;EXTERNAL_FIGMA_ENABLED: boolean;EXTERNAL_FIGMA_CLIENT_ID: string;EXTERNAL_FIGMA_SECRET: string;- EXTERNAL_FIGMA_URL: string;- MFA_ENABLED: boolean;- SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION: boolean;- SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: number;- MAILER_OTP_EXP: number;- RATE_LIMIT_VERIFY: number;- RATE_LIMIT_TOKEN_REFRESH: number;- };- UpdateGoTrueConfigBody: {- SITE_URL: string;- DISABLE_SIGNUP: boolean;- RATE_LIMIT_HEADER: string;- JWT_EXP: number;- JWT_AUD: string;- JWT_DEFAULT_GROUP_NAME: string;EXTERNAL_GITHUB_ENABLED: boolean;EXTERNAL_GITHUB_CLIENT_ID: string;EXTERNAL_GITHUB_SECRET: string;- EXTERNAL_BITBUCKET_ENABLED: boolean;- EXTERNAL_BITBUCKET_CLIENT_ID: string;- EXTERNAL_BITBUCKET_SECRET: string;- EXTERNAL_GOOGLE_ENABLED: boolean;- EXTERNAL_GOOGLE_CLIENT_ID: string;- EXTERNAL_GOOGLE_SECRET: string;- EXTERNAL_GOOGLE_ADDITIONAL_CLIENT_IDS?: string;EXTERNAL_GITLAB_ENABLED: boolean;EXTERNAL_GITLAB_CLIENT_ID: string;EXTERNAL_GITLAB_SECRET: string;EXTERNAL_GITLAB_URL: string;+ EXTERNAL_GOOGLE_ENABLED: boolean;+ EXTERNAL_GOOGLE_CLIENT_ID: string;+ EXTERNAL_GOOGLE_SECRET: string;+ EXTERNAL_GOOGLE_ADDITIONAL_CLIENT_IDS?: string;EXTERNAL_KAKAO_ENABLED: boolean;EXTERNAL_KAKAO_CLIENT_ID: string;EXTERNAL_KAKAO_SECRET: string;+ EXTERNAL_KEYCLOAK_ENABLED: boolean;+ EXTERNAL_KEYCLOAK_CLIENT_ID: string;+ EXTERNAL_KEYCLOAK_SECRET: string;+ EXTERNAL_KEYCLOAK_URL: string;+ EXTERNAL_LINKEDIN_ENABLED: boolean;+ EXTERNAL_LINKEDIN_CLIENT_ID: string;+ EXTERNAL_LINKEDIN_SECRET: string;+ EXTERNAL_NOTION_ENABLED: boolean;+ EXTERNAL_NOTION_CLIENT_ID: string;+ EXTERNAL_NOTION_SECRET: string;+ EXTERNAL_SLACK_ENABLED: boolean;+ EXTERNAL_SLACK_CLIENT_ID: string;+ EXTERNAL_SLACK_SECRET: string;+ EXTERNAL_SPOTIFY_ENABLED: boolean;+ EXTERNAL_SPOTIFY_CLIENT_ID: string;+ EXTERNAL_SPOTIFY_SECRET: string;+ EXTERNAL_TWITCH_ENABLED: boolean;+ EXTERNAL_TWITCH_CLIENT_ID: string;+ EXTERNAL_TWITCH_SECRET: string;+ EXTERNAL_TWITTER_ENABLED: boolean;+ EXTERNAL_TWITTER_CLIENT_ID: string;+ EXTERNAL_TWITTER_SECRET: string;+ EXTERNAL_WORKOS_ENABLED: boolean;+ EXTERNAL_WORKOS_CLIENT_ID: string;+ EXTERNAL_WORKOS_SECRET: string;+ EXTERNAL_WORKOS_URL: string;+ EXTERNAL_ZOOM_ENABLED: boolean;+ EXTERNAL_ZOOM_CLIENT_ID: string;+ EXTERNAL_ZOOM_SECRET: string;+ };+ UpdateGoTrueConfigBody: {+ SITE_URL: string;+ DISABLE_SIGNUP: boolean;+ JWT_EXP: number;SMTP_ADMIN_EMAIL: string;SMTP_HOST: string;SMTP_PORT: string;@@ -1783,139 +1745,121 @@ export interface components {SMTP_PASS?: string | null;SMTP_PASS_ENCRYPTED?: string | null;SMTP_MAX_FREQUENCY: number;+ SMTP_SENDER_NAME?: string;MAILER_AUTOCONFIRM: boolean;- MAILER_URLPATHS_INVITE: string;- MAILER_URLPATHS_CONFIRMATION: string;- MAILER_URLPATHS_RECOVERY: string;- MAILER_URLPATHS_EMAIL_CHANGE: string;MAILER_SUBJECTS_INVITE: string;MAILER_SUBJECTS_CONFIRMATION: string;MAILER_SUBJECTS_RECOVERY: string;MAILER_SUBJECTS_EMAIL_CHANGE: string;- MAILER_TEMPLATES_INVITE: string;+ MAILER_SUBJECTS_MAGIC_LINK: string;MAILER_TEMPLATES_INVITE_CONTENT: string;- MAILER_TEMPLATES_CONFIRMATION: string;MAILER_TEMPLATES_CONFIRMATION_CONTENT: string;- MAILER_TEMPLATES_RECOVERY: string;MAILER_TEMPLATES_RECOVERY_CONTENT: string;- MAILER_TEMPLATES_EMAIL_CHANGE: string;MAILER_TEMPLATES_EMAIL_CHANGE_CONTENT: string;- MAILER_SUBJECTS_MAGIC_LINK: string;- MAILER_TEMPLATES_MAGIC_LINK: string;MAILER_TEMPLATES_MAGIC_LINK_CONTENT: string;- MAX_ENROLLED_FACTORS: number;MFA_MAX_ENROLLED_FACTORS: number;- EXTERNAL_AZURE_ENABLED: boolean;- EXTERNAL_AZURE_CLIENT_ID: string;- EXTERNAL_AZURE_SECRET: string;- EXTERNAL_FACEBOOK_ENABLED: boolean;- EXTERNAL_FACEBOOK_CLIENT_ID: string;- EXTERNAL_FACEBOOK_SECRET: string;URI_ALLOW_LIST: string;- EXTERNAL_TWITTER_ENABLED: boolean;- EXTERNAL_TWITTER_CLIENT_ID: string;- EXTERNAL_TWITTER_SECRET: string;- EXTERNAL_APPLE_ENABLED: boolean;- EXTERNAL_APPLE_CLIENT_ID: string;- EXTERNAL_APPLE_SECRET: string;- EXTERNAL_IOS_BUNDLE_ID?: string;- EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS?: string;- EXTERNAL_DISCORD_ENABLED: boolean;- EXTERNAL_DISCORD_CLIENT_ID: string;- EXTERNAL_DISCORD_SECRET: string;- EXTERNAL_TWITCH_ENABLED: boolean;- EXTERNAL_TWITCH_CLIENT_ID: string;- EXTERNAL_TWITCH_SECRET: string;- SMTP_SENDER_NAME?: string;EXTERNAL_EMAIL_ENABLED: boolean;EXTERNAL_PHONE_ENABLED: boolean;+ SAML_ENABLED?: boolean;+ SECURITY_CAPTCHA_ENABLED: boolean;+ SECURITY_CAPTCHA_PROVIDER: string;+ SECURITY_CAPTCHA_SECRET: string;+ RATE_LIMIT_EMAIL_SENT: number;+ RATE_LIMIT_SMS_SENT: number;+ MAILER_SECURE_EMAIL_CHANGE_ENABLED: boolean;+ REFRESH_TOKEN_ROTATION_ENABLED: boolean;+ PASSWORD_MIN_LENGTH: number;+ SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION: boolean;+ SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: number;+ MAILER_OTP_EXP: number;SMS_AUTOCONFIRM: boolean;SMS_MAX_FREQUENCY: number;SMS_OTP_EXP: number;SMS_OTP_LENGTH: number;SMS_PROVIDER: string;+ SMS_MESSAGEBIRD_ACCESS_KEY: string;+ SMS_MESSAGEBIRD_ORIGINATOR: string;+ SMS_TEXTLOCAL_API_KEY: string;+ SMS_TEXTLOCAL_SENDER: string;SMS_TWILIO_ACCOUNT_SID: string;SMS_TWILIO_AUTH_TOKEN: string;SMS_TWILIO_MESSAGE_SERVICE_SID: string;SMS_TWILIO_VERIFY_ACCOUNT_SID: string;SMS_TWILIO_VERIFY_AUTH_TOKEN: string;SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: string;- SMS_TEMPLATE: string;- SAML_ENABLED?: boolean;- SECURITY_CAPTCHA_ENABLED: boolean;- SECURITY_CAPTCHA_PROVIDER: string;- SECURITY_CAPTCHA_SECRET: string;- RATE_LIMIT_EMAIL_SENT: number;- RATE_LIMIT_SMS_SENT: number;- MAILER_SECURE_EMAIL_CHANGE_ENABLED: boolean;- EXTERNAL_SPOTIFY_ENABLED: boolean;- EXTERNAL_SPOTIFY_CLIENT_ID: string;- EXTERNAL_SPOTIFY_SECRET: string;- EXTERNAL_SLACK_ENABLED: boolean;- EXTERNAL_SLACK_CLIENT_ID: string;- EXTERNAL_SLACK_SECRET: string;- SMS_MESSAGEBIRD_ACCESS_KEY: string;- SMS_MESSAGEBIRD_ORIGINATOR: string;- REFRESH_TOKEN_ROTATION_ENABLED: boolean;- EXTERNAL_LINKEDIN_ENABLED: boolean;- EXTERNAL_LINKEDIN_CLIENT_ID: string;- EXTERNAL_LINKEDIN_SECRET: string;- EXTERNAL_NOTION_ENABLED: boolean;- EXTERNAL_NOTION_CLIENT_ID: string;- EXTERNAL_NOTION_SECRET: string;SMS_VONAGE_API_KEY: string;SMS_VONAGE_API_SECRET: string;SMS_VONAGE_FROM: string;- SMS_TEXTLOCAL_API_KEY: string;- SMS_TEXTLOCAL_SENDER: string;- EXTERNAL_ZOOM_ENABLED: boolean;- EXTERNAL_ZOOM_CLIENT_ID: string;- EXTERNAL_ZOOM_SECRET: string;+ SMS_TEMPLATE: string;+ EXTERNAL_APPLE_ENABLED: boolean;+ EXTERNAL_APPLE_CLIENT_ID: string;+ EXTERNAL_APPLE_SECRET: string;+ EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS?: string;+ EXTERNAL_AZURE_ENABLED: boolean;+ EXTERNAL_AZURE_CLIENT_ID: string;+ EXTERNAL_AZURE_SECRET: string;EXTERNAL_AZURE_URL: string;- PASSWORD_MIN_LENGTH: number;- EXTERNAL_KEYCLOAK_ENABLED: boolean;- EXTERNAL_KEYCLOAK_CLIENT_ID: string;- EXTERNAL_KEYCLOAK_SECRET: string;- EXTERNAL_KEYCLOAK_URL: string;- EXTERNAL_WORKOS_ENABLED: boolean;- EXTERNAL_WORKOS_CLIENT_ID: string;- EXTERNAL_WORKOS_SECRET: string;- EXTERNAL_WORKOS_URL: string;+ EXTERNAL_BITBUCKET_ENABLED: boolean;+ EXTERNAL_BITBUCKET_CLIENT_ID: string;+ EXTERNAL_BITBUCKET_SECRET: string;+ EXTERNAL_DISCORD_ENABLED: boolean;+ EXTERNAL_DISCORD_CLIENT_ID: string;+ EXTERNAL_DISCORD_SECRET: string;+ EXTERNAL_FACEBOOK_ENABLED: boolean;+ EXTERNAL_FACEBOOK_CLIENT_ID: string;+ EXTERNAL_FACEBOOK_SECRET: string;EXTERNAL_FIGMA_ENABLED: boolean;EXTERNAL_FIGMA_CLIENT_ID: string;EXTERNAL_FIGMA_SECRET: string;- EXTERNAL_FIGMA_URL: string;- MFA_ENABLED: boolean;- SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION: boolean;- SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: number;- MAILER_OTP_EXP: number;- RATE_LIMIT_VERIFY: number;- RATE_LIMIT_TOKEN_REFRESH: number;- };- GoTrueConfig: {- SITE_URL: string;- DISABLE_SIGNUP: boolean;- RATE_LIMIT_HEADER: string;- JWT_EXP: number;- JWT_AUD: string;- JWT_DEFAULT_GROUP_NAME: string;EXTERNAL_GITHUB_ENABLED: boolean;EXTERNAL_GITHUB_CLIENT_ID: string;EXTERNAL_GITHUB_SECRET: string;- EXTERNAL_BITBUCKET_ENABLED: boolean;- EXTERNAL_BITBUCKET_CLIENT_ID: string;- EXTERNAL_BITBUCKET_SECRET: string;- EXTERNAL_GOOGLE_ENABLED: boolean;- EXTERNAL_GOOGLE_CLIENT_ID: string;- EXTERNAL_GOOGLE_SECRET: string;- EXTERNAL_GOOGLE_ADDITIONAL_CLIENT_IDS?: string;EXTERNAL_GITLAB_ENABLED: boolean;EXTERNAL_GITLAB_CLIENT_ID: string;EXTERNAL_GITLAB_SECRET: string;EXTERNAL_GITLAB_URL: string;+ EXTERNAL_GOOGLE_ENABLED: boolean;+ EXTERNAL_GOOGLE_CLIENT_ID: string;+ EXTERNAL_GOOGLE_SECRET: string;+ EXTERNAL_GOOGLE_ADDITIONAL_CLIENT_IDS?: string;EXTERNAL_KAKAO_ENABLED: boolean;EXTERNAL_KAKAO_CLIENT_ID: string;EXTERNAL_KAKAO_SECRET: string;+ EXTERNAL_KEYCLOAK_ENABLED: boolean;+ EXTERNAL_KEYCLOAK_CLIENT_ID: string;+ EXTERNAL_KEYCLOAK_SECRET: string;+ EXTERNAL_KEYCLOAK_URL: string;+ EXTERNAL_LINKEDIN_ENABLED: boolean;+ EXTERNAL_LINKEDIN_CLIENT_ID: string;+ EXTERNAL_LINKEDIN_SECRET: string;+ EXTERNAL_NOTION_ENABLED: boolean;+ EXTERNAL_NOTION_CLIENT_ID: string;+ EXTERNAL_NOTION_SECRET: string;+ EXTERNAL_SLACK_ENABLED: boolean;+ EXTERNAL_SLACK_CLIENT_ID: string;+ EXTERNAL_SLACK_SECRET: string;+ EXTERNAL_SPOTIFY_ENABLED: boolean;+ EXTERNAL_SPOTIFY_CLIENT_ID: string;+ EXTERNAL_SPOTIFY_SECRET: string;+ EXTERNAL_TWITCH_ENABLED: boolean;+ EXTERNAL_TWITCH_CLIENT_ID: string;+ EXTERNAL_TWITCH_SECRET: string;+ EXTERNAL_TWITTER_ENABLED: boolean;+ EXTERNAL_TWITTER_CLIENT_ID: string;+ EXTERNAL_TWITTER_SECRET: string;+ EXTERNAL_WORKOS_ENABLED: boolean;+ EXTERNAL_WORKOS_CLIENT_ID: string;+ EXTERNAL_WORKOS_SECRET: string;+ EXTERNAL_WORKOS_URL: string;+ EXTERNAL_ZOOM_ENABLED: boolean;+ EXTERNAL_ZOOM_CLIENT_ID: string;+ EXTERNAL_ZOOM_SECRET: string;+ };+ GoTrueConfig: {+ SITE_URL: string;+ DISABLE_SIGNUP: boolean;+ JWT_EXP: number;SMTP_ADMIN_EMAIL: string;SMTP_HOST: string;SMTP_PORT: string;@@ -1923,118 +1867,116 @@ export interface components {SMTP_PASS?: string | null;SMTP_PASS_ENCRYPTED?: string | null;SMTP_MAX_FREQUENCY: number;+ SMTP_SENDER_NAME?: string;MAILER_AUTOCONFIRM: boolean;- MAILER_URLPATHS_INVITE: string;- MAILER_URLPATHS_CONFIRMATION: string;- MAILER_URLPATHS_RECOVERY: string;- MAILER_URLPATHS_EMAIL_CHANGE: string;MAILER_SUBJECTS_INVITE: string;MAILER_SUBJECTS_CONFIRMATION: string;MAILER_SUBJECTS_RECOVERY: string;MAILER_SUBJECTS_EMAIL_CHANGE: string;- MAILER_TEMPLATES_INVITE: string;+ MAILER_SUBJECTS_MAGIC_LINK: string;MAILER_TEMPLATES_INVITE_CONTENT: string;- MAILER_TEMPLATES_CONFIRMATION: string;MAILER_TEMPLATES_CONFIRMATION_CONTENT: string;- MAILER_TEMPLATES_RECOVERY: string;MAILER_TEMPLATES_RECOVERY_CONTENT: string;- MAILER_TEMPLATES_EMAIL_CHANGE: string;MAILER_TEMPLATES_EMAIL_CHANGE_CONTENT: string;- MAILER_SUBJECTS_MAGIC_LINK: string;- MAILER_TEMPLATES_MAGIC_LINK: string;MAILER_TEMPLATES_MAGIC_LINK_CONTENT: string;- MAX_ENROLLED_FACTORS: number;MFA_MAX_ENROLLED_FACTORS: number;- EXTERNAL_AZURE_ENABLED: boolean;- EXTERNAL_AZURE_CLIENT_ID: string;- EXTERNAL_AZURE_SECRET: string;- EXTERNAL_FACEBOOK_ENABLED: boolean;- EXTERNAL_FACEBOOK_CLIENT_ID: string;- EXTERNAL_FACEBOOK_SECRET: string;URI_ALLOW_LIST: string;- EXTERNAL_TWITTER_ENABLED: boolean;- EXTERNAL_TWITTER_CLIENT_ID: string;- EXTERNAL_TWITTER_SECRET: string;- EXTERNAL_APPLE_ENABLED: boolean;- EXTERNAL_APPLE_CLIENT_ID: string;- EXTERNAL_APPLE_SECRET: string;- EXTERNAL_IOS_BUNDLE_ID?: string;- EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS?: string;- EXTERNAL_DISCORD_ENABLED: boolean;- EXTERNAL_DISCORD_CLIENT_ID: string;- EXTERNAL_DISCORD_SECRET: string;- EXTERNAL_TWITCH_ENABLED: boolean;- EXTERNAL_TWITCH_CLIENT_ID: string;- EXTERNAL_TWITCH_SECRET: string;- SMTP_SENDER_NAME?: string;EXTERNAL_EMAIL_ENABLED: boolean;EXTERNAL_PHONE_ENABLED: boolean;+ SAML_ENABLED?: boolean;+ SECURITY_CAPTCHA_ENABLED: boolean;+ SECURITY_CAPTCHA_PROVIDER: string;+ SECURITY_CAPTCHA_SECRET: string;+ RATE_LIMIT_EMAIL_SENT: number;+ RATE_LIMIT_SMS_SENT: number;+ MAILER_SECURE_EMAIL_CHANGE_ENABLED: boolean;+ REFRESH_TOKEN_ROTATION_ENABLED: boolean;+ PASSWORD_MIN_LENGTH: number;+ SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION: boolean;+ SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: number;+ MAILER_OTP_EXP: number;SMS_AUTOCONFIRM: boolean;SMS_MAX_FREQUENCY: number;SMS_OTP_EXP: number;SMS_OTP_LENGTH: number;SMS_PROVIDER: string;+ SMS_MESSAGEBIRD_ACCESS_KEY: string;+ SMS_MESSAGEBIRD_ORIGINATOR: string;+ SMS_TEXTLOCAL_API_KEY: string;+ SMS_TEXTLOCAL_SENDER: string;SMS_TWILIO_ACCOUNT_SID: string;SMS_TWILIO_AUTH_TOKEN: string;SMS_TWILIO_MESSAGE_SERVICE_SID: string;SMS_TWILIO_VERIFY_ACCOUNT_SID: string;SMS_TWILIO_VERIFY_AUTH_TOKEN: string;SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: string;- SMS_TEMPLATE: string;- SAML_ENABLED?: boolean;- SECURITY_CAPTCHA_ENABLED: boolean;- SECURITY_CAPTCHA_PROVIDER: string;- SECURITY_CAPTCHA_SECRET: string;- RATE_LIMIT_EMAIL_SENT: number;- RATE_LIMIT_SMS_SENT: number;- MAILER_SECURE_EMAIL_CHANGE_ENABLED: boolean;- EXTERNAL_SPOTIFY_ENABLED: boolean;- EXTERNAL_SPOTIFY_CLIENT_ID: string;- EXTERNAL_SPOTIFY_SECRET: string;- EXTERNAL_SLACK_ENABLED: boolean;- EXTERNAL_SLACK_CLIENT_ID: string;- EXTERNAL_SLACK_SECRET: string;- SMS_MESSAGEBIRD_ACCESS_KEY: string;- SMS_MESSAGEBIRD_ORIGINATOR: string;- REFRESH_TOKEN_ROTATION_ENABLED: boolean;- EXTERNAL_LINKEDIN_ENABLED: boolean;- EXTERNAL_LINKEDIN_CLIENT_ID: string;- EXTERNAL_LINKEDIN_SECRET: string;- EXTERNAL_NOTION_ENABLED: boolean;- EXTERNAL_NOTION_CLIENT_ID: string;- EXTERNAL_NOTION_SECRET: string;SMS_VONAGE_API_KEY: string;SMS_VONAGE_API_SECRET: string;SMS_VONAGE_FROM: string;- SMS_TEXTLOCAL_API_KEY: string;- SMS_TEXTLOCAL_SENDER: string;- EXTERNAL_ZOOM_ENABLED: boolean;- EXTERNAL_ZOOM_CLIENT_ID: string;- EXTERNAL_ZOOM_SECRET: string;+ SMS_TEMPLATE: string;+ EXTERNAL_APPLE_ENABLED: boolean;+ EXTERNAL_APPLE_CLIENT_ID: string;+ EXTERNAL_APPLE_SECRET: string;+ EXTERNAL_APPLE_ADDITIONAL_CLIENT_IDS?: string;+ EXTERNAL_AZURE_ENABLED: boolean;+ EXTERNAL_AZURE_CLIENT_ID: string;+ EXTERNAL_AZURE_SECRET: string;EXTERNAL_AZURE_URL: string;- PASSWORD_MIN_LENGTH: number;+ EXTERNAL_BITBUCKET_ENABLED: boolean;+ EXTERNAL_BITBUCKET_CLIENT_ID: string;+ EXTERNAL_BITBUCKET_SECRET: string;+ EXTERNAL_DISCORD_ENABLED: boolean;+ EXTERNAL_DISCORD_CLIENT_ID: string;+ EXTERNAL_DISCORD_SECRET: string;+ EXTERNAL_FACEBOOK_ENABLED: boolean;+ EXTERNAL_FACEBOOK_CLIENT_ID: string;+ EXTERNAL_FACEBOOK_SECRET: string;+ EXTERNAL_FIGMA_ENABLED: boolean;+ EXTERNAL_FIGMA_CLIENT_ID: string;+ EXTERNAL_FIGMA_SECRET: string;+ EXTERNAL_GITHUB_ENABLED: boolean;+ EXTERNAL_GITHUB_CLIENT_ID: string;+ EXTERNAL_GITHUB_SECRET: string;+ EXTERNAL_GITLAB_ENABLED: boolean;+ EXTERNAL_GITLAB_CLIENT_ID: string;+ EXTERNAL_GITLAB_SECRET: string;+ EXTERNAL_GITLAB_URL: string;+ EXTERNAL_GOOGLE_ENABLED: boolean;+ EXTERNAL_GOOGLE_CLIENT_ID: string;+ EXTERNAL_GOOGLE_SECRET: string;+ EXTERNAL_GOOGLE_ADDITIONAL_CLIENT_IDS?: string;+ EXTERNAL_KAKAO_ENABLED: boolean;+ EXTERNAL_KAKAO_CLIENT_ID: string;+ EXTERNAL_KAKAO_SECRET: string;EXTERNAL_KEYCLOAK_ENABLED: boolean;EXTERNAL_KEYCLOAK_CLIENT_ID: string;EXTERNAL_KEYCLOAK_SECRET: string;EXTERNAL_KEYCLOAK_URL: string;+ EXTERNAL_LINKEDIN_ENABLED: boolean;+ EXTERNAL_LINKEDIN_CLIENT_ID: string;+ EXTERNAL_LINKEDIN_SECRET: string;+ EXTERNAL_NOTION_ENABLED: boolean;+ EXTERNAL_NOTION_CLIENT_ID: string;+ EXTERNAL_NOTION_SECRET: string;+ EXTERNAL_SLACK_ENABLED: boolean;+ EXTERNAL_SLACK_CLIENT_ID: string;+ EXTERNAL_SLACK_SECRET: string;+ EXTERNAL_SPOTIFY_ENABLED: boolean;+ EXTERNAL_SPOTIFY_CLIENT_ID: string;+ EXTERNAL_SPOTIFY_SECRET: string;+ EXTERNAL_TWITCH_ENABLED: boolean;+ EXTERNAL_TWITCH_CLIENT_ID: string;+ EXTERNAL_TWITCH_SECRET: string;+ EXTERNAL_TWITTER_ENABLED: boolean;+ EXTERNAL_TWITTER_CLIENT_ID: string;+ EXTERNAL_TWITTER_SECRET: string;EXTERNAL_WORKOS_ENABLED: boolean;EXTERNAL_WORKOS_CLIENT_ID: string;EXTERNAL_WORKOS_SECRET: string;EXTERNAL_WORKOS_URL: string;- EXTERNAL_FIGMA_ENABLED: boolean;- EXTERNAL_FIGMA_CLIENT_ID: string;- EXTERNAL_FIGMA_SECRET: string;- EXTERNAL_FIGMA_URL: string;- MFA_ENABLED: boolean;- SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION: boolean;- SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: number;- MAILER_OTP_EXP: number;- RATE_LIMIT_VERIFY: number;- RATE_LIMIT_TOKEN_REFRESH: number;- id: number;- project_id: number;- updated_at: string;- SAML_PRIVATE_KEY_ENCRYPTED?: string;+ EXTERNAL_ZOOM_ENABLED: boolean;+ EXTERNAL_ZOOM_CLIENT_ID: string;+ EXTERNAL_ZOOM_SECRET: string;};UserBody: {id?: string;@@ -3026,6 +2968,7 @@ export interface components {status: string;subscription_id: string;is_readonly_mode_enabled?: boolean;+ is_branch_enabled?: boolean;preview_branch_refs: (string)[];};AmiSearchOptions: {@@ -3066,6 +3009,7 @@ export interface components {status: string;subscription_id: string;is_readonly_mode_enabled?: boolean;+ is_branch_enabled?: boolean;preview_branch_refs: (string)[];endpoint: string;anon_key: string;@@ -3156,6 +3100,7 @@ export interface components {id: string;name: string;project_ref: string;+ parent_project_ref: string;is_default: boolean;git_branch: string;created_at: string;@@ -3182,6 +3127,8 @@ export interface components {maxDatabasePreprovisionGb?: number;lastDatabaseResizeAt?: string;preview_branches: (components["schemas"]["BranchResponse"])[];+ parent_project_ref?: string;+ has_branch_enabled?: boolean;};ProjectRefResponse: {id: number;@@ -4111,6 +4058,26 @@ export interface components {override_enabled: boolean;override_active_until: string;};+ AuthConfigResponse: {+ smtp_admin_email?: string;+ smtp_host?: string;+ smtp_port?: string;+ smtp_user?: string;+ smtp_pass?: string;+ smtp_max_frequency?: number;+ smtp_sender_name?: string;+ rate_limit_email_sent?: number;+ };+ UpdateAuthConfigBody: {+ smtp_admin_email?: string;+ smtp_host?: string;+ smtp_port?: string;+ smtp_user?: string;+ smtp_pass?: string;+ smtp_max_frequency?: number;+ smtp_sender_name?: string;+ rate_limit_email_sent?: number;+ };FunctionSlugResponse: {id: string;slug: string;@@ -9745,6 +9712,49 @@ export interface operations {500: never;};};+ /** Gets project's auth config */+ V1AuthConfigController_getV1AuthConfig: {+ parameters: {+ path: {+ /** @description Project ref */+ ref: string;+ };+ };+ responses: {+ 200: {+ content: {+ "application/json": components["schemas"]["AuthConfigResponse"];+ };+ };+ 403: never;+ /** @description Failed to retrieve project's auth config */+ 500: never;+ };+ };+ /** Updates a project's auth config */+ V1AuthConfigController_updateV1AuthConfig: {+ parameters: {+ path: {+ /** @description Project ref */+ ref: string;+ };+ };+ requestBody: {+ content: {+ "application/json": components["schemas"]["UpdateAuthConfigBody"];+ };+ };+ responses: {+ 200: {+ content: {+ "application/json": components["schemas"]["AuthConfigResponse"];+ };+ };+ 403: never;+ /** @description Failed to update project's auth config */+ 500: never;+ };+ };/*** Retrieve a function* @description Retrieves a function with the specified slug and project.diff --git a/studio/data/branches/branch-create-mutation.ts b/studio/data/branches/branch-create-mutation.tsindex 2dddbb1abb0..bd9933ddff0 100644--- a/studio/data/branches/branch-create-mutation.ts+++ b/studio/data/branches/branch-create-mutation.ts@@ -51,9 +51,7 @@ export const useBranchCreateMutation = ({async onSuccess(data, variables, context) {const { projectRef } = variablesawait queryClient.invalidateQueries(branchKeys.list(projectRef))- // [Joshen] Need to refresh projects cause thats where we'll check if branching is enabled or not- // pending adding preview_project_refs to project details, then we can just check there instead- await queryClient.invalidateQueries(projectKeys.list())+ await queryClient.invalidateQueries(projectKeys.detail(projectRef))await onSuccess?.(data, variables, context)},async onError(data, variables, context) {diff --git a/studio/data/branches/branch-delete-mutation.ts b/studio/data/branches/branch-delete-mutation.tsindex 2f5974fcce7..736a66b9162 100644--- a/studio/data/branches/branch-delete-mutation.ts+++ b/studio/data/branches/branch-delete-mutation.ts@@ -10,7 +10,7 @@ export type BranchDeleteVariables = {projectRef: string}-export async function deleteBranch({ id }: BranchDeleteVariables) {+export async function deleteBranch({ id }: Pick<BranchDeleteVariables, 'id'>) {const { data, error } = await del('/v1/branches/{branch_id}', {params: { path: { branch_id: id } },})diff --git a/studio/data/branches/branches-disable-mutation.ts b/studio/data/branches/branches-disable-mutation.tsnew file mode 100644index 00000000000..b557cf77ef4--- /dev/null+++ b/studio/data/branches/branches-disable-mutation.ts@@ -0,0 +1,69 @@+import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'+import { toast } from 'react-hot-toast'++import { del } from 'data/fetchers'+import { projectKeys } from 'data/projects/keys'+import { ResponseError } from 'types'+import { deleteBranch } from './branch-delete-mutation'+import { branchKeys } from './keys'++export type BranchesDisableVariables = {+ branchIds: string[]+ projectRef: string+}++export async function disableBranching({ branchIds, projectRef }: BranchesDisableVariables) {+ // Delete all preview branches first+ if (branchIds.length > 0) {+ const res = await Promise.all(+ branchIds.map(async (id) => {+ try {+ return await deleteBranch({ id })+ } catch (error) {+ return error+ }+ })+ )+ const hasError = res.some((item: any) => item.message !== undefined)+ if (hasError) throw new Error('Failed to disable branching: Unable to delete all branches')+ }++ // Then disable branching+ const { data, error } = await del('/v1/projects/{ref}/branches', {+ params: { path: { ref: projectRef } },+ })+ if (error) throw error+ return data+}++type BranchesDisableData = Awaited<ReturnType<typeof disableBranching>>++export const useBranchesDisableMutation = ({+ onSuccess,+ onError,+ ...options+}: Omit<+ UseMutationOptions<BranchesDisableData, ResponseError, BranchesDisableVariables>,+ 'mutationFn'+> = {}) => {+ const queryClient = useQueryClient()+ return useMutation<BranchesDisableData, ResponseError, BranchesDisableVariables>(+ (vars) => disableBranching(vars),+ {+ async onSuccess(data, variables, context) {+ const { projectRef } = variables+ await queryClient.invalidateQueries(branchKeys.list(projectRef))+ await queryClient.invalidateQueries(projectKeys.detail(projectRef))+ await onSuccess?.(data, variables, context)+ },+ async onError(data, variables, context) {+ if (onError === undefined) {+ toast.error(`Failed to disable branching: ${data.message}`)+ } else {+ onError(data, variables, context)+ }+ },+ ...options,+ }+ )+}diff --git a/studio/types/base.ts b/studio/types/base.tsindex dd506a691b1..93d9c2fe7c6 100644--- a/studio/types/base.ts+++ b/studio/types/base.ts@@ -34,6 +34,7 @@ export interface Project extends ProjectBase {lastDatabaseResizeAt?: string | nullmaxDatabasePreprovisionGb?: string | nullparent_project_ref?: string+ has_branch_enabled?: boolean/*** postgrestStatus is available on client side only.