Skip to content

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

feat(studio): add flag-gated general region selection (#51274)

Charis22886fd3045e
diff --git a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.test.ts b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.test.ts
index 344eaf59ad9..dd5297f5a7a 100644
--- a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.test.ts
+++ b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.test.ts
@@ -6,10 +6,13 @@ import {
HIGH_AVAILABILITY_POSTGRES_ENGINE,
HIGH_AVAILABILITY_RELEASE_CHANNEL,
} from './ProjectCreation.constants'
+import type { AvailableRegions } from './ProjectCreation.utils'
import {
filterHighAvailabilityRegions,
getAvailableRegions,
+ getFreeTierGeneralRegionExperimentVariant,
getHighAvailabilityRegionCode,
+ getRegionSelectionType,
resolveDefaultDbRegion,
} from './ProjectCreation.utils'
@@ -115,3 +118,83 @@ describe('High Availability project creation constraints', () => {
}
)
})
+
+describe('getFreeTierGeneralRegionExperimentVariant', () => {
+ const base = {
+ isFreePlan: true,
+ smartRegionEnabled: true,
+ enrollmentFlag: true,
+ selectionFlag: true,
+ }
+
+ it('returns test when in the experiment and the selection flag is on', () => {
+ expect(getFreeTierGeneralRegionExperimentVariant(base)).toBe('test')
+ })
+
+ it('returns control when in the experiment and the selection flag is off', () => {
+ expect(getFreeTierGeneralRegionExperimentVariant({ ...base, selectionFlag: false })).toBe(
+ 'control'
+ )
+ })
+
+ it('returns undefined for a paid plan', () => {
+ expect(
+ getFreeTierGeneralRegionExperimentVariant({ ...base, isFreePlan: false })
+ ).toBeUndefined()
+ })
+
+ it('returns undefined when smart regions are disabled (AWS_NIMBUS)', () => {
+ expect(
+ getFreeTierGeneralRegionExperimentVariant({ ...base, smartRegionEnabled: false })
+ ).toBeUndefined()
+ })
+
+ it('returns undefined when the enrollment flag is off', () => {
+ expect(
+ getFreeTierGeneralRegionExperimentVariant({ ...base, enrollmentFlag: false })
+ ).toBeUndefined()
+ })
+
+ it('returns undefined when the enrollment flag is off even if the selection flag is on', () => {
+ expect(
+ getFreeTierGeneralRegionExperimentVariant({
+ ...base,
+ enrollmentFlag: false,
+ selectionFlag: true,
+ })
+ ).toBeUndefined()
+ })
+})
+
+describe('getRegionSelectionType', () => {
+ const availableRegions: AvailableRegions = {
+ smartGroup: [{ code: 'americas', name: 'Americas', type: 'smartGroup' }],
+ specific: [
+ { code: 'us-east-1', name: 'East US (North Virginia)', provider: 'AWS', type: 'specific' },
+ ],
+ }
+
+ it('classifies a smart group region as general', () => {
+ expect(getRegionSelectionType({ dbRegion: 'Americas', availableRegions })).toBe('general')
+ })
+
+ it('classifies a specific region as specific', () => {
+ expect(getRegionSelectionType({ dbRegion: 'East US (North Virginia)', availableRegions })).toBe(
+ 'specific'
+ )
+ })
+
+ it('returns undefined when the region matches neither list', () => {
+ expect(getRegionSelectionType({ dbRegion: 'Nonexistent', availableRegions })).toBeUndefined()
+ })
+
+ it('returns undefined when dbRegion is undefined', () => {
+ expect(getRegionSelectionType({ dbRegion: undefined, availableRegions })).toBeUndefined()
+ })
+
+ it('returns undefined when availableRegions is undefined', () => {
+ expect(
+ getRegionSelectionType({ dbRegion: 'Americas', availableRegions: undefined })
+ ).toBeUndefined()
+ })
+})
diff --git a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts
index 92c3938925a..82835530311 100644
--- a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts
+++ b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts
@@ -2,6 +2,7 @@ import type { CloudProvider, Region } from 'shared-data'
import { AWS_REGIONS } from 'shared-data'
import { SMART_REGION_TO_EXACT_REGION_MAP } from 'shared-data/regions'
+import type { OrganizationAvailableRegionsData } from '@/data/organizations/organization-available-regions-query'
import { DesiredInstanceSize, instanceSizeSpecs } from '@/data/projects/new-project.constants'
export function smartRegionToExactRegion(smartOrExactRegion: string) {
@@ -103,3 +104,50 @@ export const filterHighAvailabilityRegions = <T extends { code: string }>(
? regions.filter((region) => region.code === regionCode)
: regions
}
+
+export type FreeTierGeneralRegionExperimentVariant = 'test' | 'control'
+
+type GetFreeTierGeneralRegionExperimentVariantArgs = {
+ isFreePlan: boolean
+ smartRegionEnabled: boolean
+ enrollmentFlag: boolean
+ selectionFlag: boolean
+}
+
+/**
+ * Org's arm in the freeTierGeneralRegionExperiment. The test arm only sees general regions.
+ * Returns undefined when the org isn't enrolled.
+ */
+export function getFreeTierGeneralRegionExperimentVariant({
+ isFreePlan,
+ smartRegionEnabled,
+ enrollmentFlag,
+ selectionFlag,
+}: GetFreeTierGeneralRegionExperimentVariantArgs):
+ | FreeTierGeneralRegionExperimentVariant
+ | undefined {
+ const isInExperiment = isFreePlan && smartRegionEnabled && enrollmentFlag === true
+ if (!isInExperiment) return undefined
+ return selectionFlag === true ? 'test' : 'control'
+}
+
+export type AvailableRegions = NonNullable<OrganizationAvailableRegionsData>['all']
+
+type GetRegionSelectionTypeArgs = {
+ dbRegion: string | undefined
+ availableRegions: AvailableRegions | undefined
+}
+
+/**
+ * Whether the selected region is a general region (e.g. Americas) or a specific one
+ * (e.g. us-east-1). Returns undefined if it matches neither list.
+ */
+export function getRegionSelectionType({
+ dbRegion,
+ availableRegions,
+}: GetRegionSelectionTypeArgs): 'general' | 'specific' | undefined {
+ if (!dbRegion || !availableRegions) return undefined
+ if (availableRegions.smartGroup.some((region) => region.name === dbRegion)) return 'general'
+ if (availableRegions.specific.some((region) => region.name === dbRegion)) return 'specific'
+ return undefined
+}
diff --git a/apps/studio/components/interfaces/ProjectCreation/ProjectCreationForm.tsx b/apps/studio/components/interfaces/ProjectCreation/ProjectCreationForm.tsx
index 45284928fb2..a1aa4b508e0 100644
--- a/apps/studio/components/interfaces/ProjectCreation/ProjectCreationForm.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/ProjectCreationForm.tsx
@@ -31,7 +31,9 @@ import {
import { FormSchema } from './ProjectCreation.schema'
import {
getAvailableRegions,
+ getFreeTierGeneralRegionExperimentVariant,
getHighAvailabilityRegionCode,
+ getRegionSelectionType,
instanceLabel,
monthlyInstancePrice,
resolveDefaultDbRegion,
@@ -74,6 +76,7 @@ import {
import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
import { useLastVisitedOrganization } from '@/hooks/misc/useLastVisitedOrganization'
import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
+import { useSelectedOrganizationCreatedAtQuery } from '@/hooks/misc/useSelectedOrganizationCreatedAt'
import { usePHFlag } from '@/hooks/ui/useFlag'
import { DOCS_URL, PROJECT_STATUS, PROVIDERS, useDefaultProvider } from '@/lib/constants'
import { getInitialMigrationSQLFromGitHubRepo } from '@/lib/integration-utils'
@@ -136,7 +139,7 @@ export const ProjectCreationForm = ({
'integrations.github_connections'
)
- const { hasLoaded: flagsLoaded } = useFeatureFlags()
+ const { hasLoaded: flagsLoaded, isConfigCatStale } = useFeatureFlags()
const projectCreationDisabled = useFlag('disableProjectCreationAndUpdate')
const showInternalOnlyConfiguration =
useFlag('newProjectInternalOnlyConfiguration') && !isVercelIntegrationFlow
@@ -203,6 +206,20 @@ export const ProjectCreationForm = ({
const smartRegionEnabled = cloudProvider !== 'AWS_NIMBUS'
const highAvailabilityRegionCode = getHighAvailabilityRegionCode()
+ const { isPending: isPendingOrganizationCreatedAt } = useSelectedOrganizationCreatedAtQuery()
+ const isResolvingFreeTierGeneralRegionExperiment =
+ isFreePlan &&
+ smartRegionEnabled &&
+ (!flagsLoaded || isPendingOrganizationCreatedAt || isConfigCatStale === true)
+ const freeTierGeneralRegionEnrollment = useFlag('freeTierGeneralRegionEnrollment')
+ const freeTierGeneralRegionSelection = useFlag('freeTierGeneralRegionSelection')
+ const freeTierGeneralRegionExperimentVariant = getFreeTierGeneralRegionExperimentVariant({
+ isFreePlan,
+ smartRegionEnabled,
+ enrollmentFlag: freeTierGeneralRegionEnrollment,
+ selectionFlag: freeTierGeneralRegionSelection,
+ })
+
// Read dirty state during render rather than depending on form.formState in the
// effect — form.formState is a Proxy that gets a new reference every render, which
// would re-fire this effect after each setValue and trigger an infinite loop.
@@ -217,10 +234,8 @@ export const ProjectCreationForm = ({
// form state carried over from the free plan. To avoid this, we set a
// default instance size in this case.
const instanceSize = canChooseInstanceSize ? (watchedInstanceSize ?? sizes[0]) : undefined
- const { data: membersExceededLimit = [] } = useFreeProjectLimitCheckQuery(
- { slug },
- { enabled: isFreePlan }
- )
+ const { data: membersExceededLimit = [], isLoading: isLoadingFreeProjectLimit } =
+ useFreeProjectLimitCheckQuery({ slug }, { enabled: isFreePlan })
const hasMembersExceedingFreeTierLimit = membersExceededLimit.length > 0
const freePlanWithExceedingLimits = isFreePlan && hasMembersExceedingFreeTierLimit
@@ -348,6 +363,12 @@ export const ProjectCreationForm = ({
} = useProjectCreateMutation({
onSuccess: (res) => {
setProjectCreationError(undefined)
+ const regionSelectionType = smartRegionEnabled
+ ? getRegionSelectionType({
+ dbRegion: form.getValues('dbRegion'),
+ availableRegions: availableRegionsData?.all,
+ })
+ : undefined
track(
'project_creation_simple_version_submitted',
{
@@ -360,6 +381,10 @@ export const ProjectCreationForm = ({
...(dataApiRevokeOnCreateDefaultFlag !== undefined && {
dataApiRevokeOnCreateDefaultEnabled: dataApiRevokeOnCreateDefaultFlag,
}),
+ ...(freeTierGeneralRegionExperimentVariant !== undefined && {
+ freeTierGeneralRegionExperiment: freeTierGeneralRegionExperimentVariant,
+ }),
+ ...(regionSelectionType !== undefined && { regionSelectionType }),
},
{
project: res.ref,
@@ -594,6 +619,26 @@ export const ProjectCreationForm = ({
track('project_creation_form_exposed', { surface })
}, [isOrganizationsSuccess, canCreateProject, currentOrg, track, surface])
+ const freeTierGeneralRegionExposedSlug = useRef<string | undefined>(undefined)
+ useEffect(() => {
+ if (!slug || freeTierGeneralRegionExposedSlug.current === slug) return
+ if (isResolvingFreeTierGeneralRegionExperiment) return
+ if (freeTierGeneralRegionExperimentVariant === undefined) return
+ if (!canCreateProject || projectCreationDisabled || isLoadingFreeProjectLimit) return
+ freeTierGeneralRegionExposedSlug.current = slug
+ track('free_tier_general_region_experiment_exposed', {
+ variant: freeTierGeneralRegionExperimentVariant,
+ })
+ }, [
+ slug,
+ isResolvingFreeTierGeneralRegionExperiment,
+ freeTierGeneralRegionExperimentVariant,
+ canCreateProject,
+ projectCreationDisabled,
+ isLoadingFreeProjectLimit,
+ track,
+ ])
+
useEffect(() => {
// Only set once to ensure compute credits dont change while project is being created
if (allOrgProjects && allOrgProjects.length > 0 && !allProjects) {
@@ -781,6 +826,8 @@ export const ProjectCreationForm = ({
form={form}
hasSelectedOrganization={hasSelectedOrganization}
instanceSize={instanceSize as DesiredInstanceSize}
+ showGeneralRegionsOnly={freeTierGeneralRegionExperimentVariant === 'test'}
+ isLoading={isResolvingFreeTierGeneralRegionExperiment}
/>
{isVercelIntegrationFlow && !!externalId && <DataSeeding form={form} />}
diff --git a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
index da573afda9d..093a2a67ab6 100644
--- a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
@@ -45,12 +45,16 @@ import { useDefaultRegionQuery } from '@/data/misc/get-default-region-query'
import { useOrganizationAvailableRegionsQuery } from '@/data/organizations/organization-available-regions-query'
import { useIncidentStatusQuery } from '@/data/platform/incident-status-query'
import type { DesiredInstanceSize } from '@/data/projects/new-project.constants'
+import { useTrack } from '@/lib/telemetry/track'
interface RegionSelectorProps {
form: UseFormReturn<CreateProjectForm>
hasSelectedOrganization: boolean
instanceSize?: DesiredInstanceSize
layout?: 'vertical' | 'horizontal'
+ /** Hides specific regions and shows an upgrade prompt in their place */
+ showGeneralRegionsOnly?: boolean
+ isLoading?: boolean
}
// [Joshen] Let's use a library to maintain the flag SVGs in the future
@@ -72,12 +76,16 @@ export const RegionSelector = ({
hasSelectedOrganization,
instanceSize,
layout = 'horizontal',
+ showGeneralRegionsOnly = false,
+ isLoading: isParentLoading = false,
}: RegionSelectorProps) => {
const { slug } = useParams()
+ const track = useTrack()
const cloudProvider = form.getValues('cloudProvider') as CloudProvider
const highAvailability = useWatch({ control: form.control, name: 'highAvailability' })
const dbRegion = useWatch({ control: form.control, name: 'dbRegion' })
const highAvailabilityRegionCode = getHighAvailabilityRegionCode()
+ const hideSpecificRegions = showGeneralRegionsOnly && !highAvailability
const { hasLoaded: flagsLoaded } = useFeatureFlags()
const smartRegionEnabled = cloudProvider !== 'AWS_NIMBUS'
@@ -139,7 +147,8 @@ export const RegionSelector = ({
...region,
restriction: getRegionRestriction(region),
}))
- const isLoading = smartRegionEnabled ? isLoadingAvailableRegions : isLoadingDefaultRegion
+ const isLoading =
+ isParentLoading || (smartRegionEnabled ? isLoadingAvailableRegions : isLoadingDefaultRegion)
const isLocalEnvironment = process.env.NEXT_PUBLIC_ENVIRONMENT === 'local'
const showNonProdFields = isLocalEnvironment || process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
@@ -300,60 +309,77 @@ export const RegionSelector = ({
)
})}
</SelectGroup>
- <SelectSeparator />
+ {!hideSpecificRegions && <SelectSeparator />}
</>
)}
- <SelectGroup>
- <SelectLabel>
- {highAvailability ? 'High Availability Regions' : 'Specific regions'}
- </SelectLabel>
- {regionOptionsWithRestriction.map((value) => {
- const restrictionCopy =
- value.restriction !== undefined
- ? getRegionRestrictionCopy(value.restriction)
- : undefined
- return (
- <SelectItem
- key={value.code}
- value={value.name}
- className={cn(
- 'w-full [&>:nth-child(2)]:w-full',
- restrictionCopy !== undefined && 'pointer-events-auto!'
- )}
- >
- <div className="flex flex-row items-center justify-between w-full gap-x-2">
- <div className="flex items-center gap-x-3">
- <RegionFlag className="w-5" region={value.code} />
- <div className="flex items-center gap-x-2">
- <span className="text-foreground">{value.name}</span>
- <span className="text-xs text-foreground-lighter font-mono">
- {value.code}
- </span>
+ {!hideSpecificRegions && (
+ <SelectGroup>
+ <SelectLabel>
+ {highAvailability ? 'High Availability Regions' : 'Specific regions'}
+ </SelectLabel>
+ {regionOptionsWithRestriction.map((value) => {
+ const restrictionCopy =
+ value.restriction !== undefined
+ ? getRegionRestrictionCopy(value.restriction)
+ : undefined
+ return (
+ <SelectItem
+ key={value.code}
+ value={value.name}
+ className={cn(
+ 'w-full [&>:nth-child(2)]:w-full',
+ restrictionCopy !== undefined && 'pointer-events-auto!'
+ )}
+ >
+ <div className="flex flex-row items-center justify-between w-full gap-x-2">
+ <div className="flex items-center gap-x-3">
+ <RegionFlag className="w-5" region={value.code} />
+ <div className="flex items-center gap-x-2">
+ <span className="text-foreground">{value.name}</span>
+ <span className="text-xs text-foreground-lighter font-mono">
+ {value.code}
+ </span>
+ </div>
</div>
- </div>
- {recommendedSpecificRegions.has(value.code) && (
- <Badge variant="success" className="mr-1">
- Recommended
- </Badge>
- )}
+ {recommendedSpecificRegions.has(value.code) && (
+ <Badge variant="success" className="mr-1">
+ Recommended
+ </Badge>
+ )}
+
+ {restrictionCopy !== undefined && (
+ <Tooltip>
+ <TooltipTrigger>
+ <Badge variant="warning" className="mr-1">
+ {restrictionCopy.badge}
+ </Badge>
+ </TooltipTrigger>
+ <TooltipContent>{restrictionCopy.tooltip}</TooltipContent>
+ </Tooltip>
+ )}
+ </div>
+ </SelectItem>
+ )
+ })}
+ </SelectGroup>
+ )}
- {restrictionCopy !== undefined && (
- <Tooltip>
- <TooltipTrigger>
- <Badge variant="warning" className="mr-1">
- {restrictionCopy.badge}
- </Badge>
- </TooltipTrigger>
- <TooltipContent>{restrictionCopy.tooltip}</TooltipContent>
- </Tooltip>
- )}
- </div>
- </SelectItem>
- )
- })}
- </SelectGroup>
+ {hideSpecificRegions && (
+ <div
+ className="border-t px-3 py-2.5 text-xs text-foreground-light"
+ onPointerDown={(e) => e.stopPropagation()}
+ >
+ <InlineLink
+ href={`/org/${slug ?? '_'}/billing?panel=subscriptionPlan&source=freeTierGeneralRegionSelector`}
+ onClick={() => track('free_tier_general_region_upgrade_clicked')}
+ >
+ Upgrade to Pro
+ </InlineLink>{' '}
+ to choose a specific region.
+ </div>
+ )}
</SelectContent>
</Select>
</FormControl>
diff --git a/apps/studio/data/organizations/organization-mappers.test.ts b/apps/studio/data/organizations/organization-mappers.test.ts
index 3bc0f75184e..488b114a227 100644
--- a/apps/studio/data/organizations/organization-mappers.test.ts
+++ b/apps/studio/data/organizations/organization-mappers.test.ts
@@ -33,6 +33,7 @@ const baseOrganizationResponse = {
const baseOrganizationSlugResponse = {
billing_email: '[email protected]',
billing_partner: null,
+ created_at: '2026-01-01T00:00:00Z',
has_oriole_project: false,
id: 1,
integration_source: null,
diff --git a/apps/studio/hooks/misc/useSelectedOrganizationCreatedAt.ts b/apps/studio/hooks/misc/useSelectedOrganizationCreatedAt.ts
new file mode 100644
index 00000000000..87b4d0df050
--- /dev/null
+++ b/apps/studio/hooks/misc/useSelectedOrganizationCreatedAt.ts
@@ -0,0 +1,18 @@
+import { useOrganizationQuery } from '@/data/organizations/organization-query'
+import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
+import { IS_PLATFORM } from '@/lib/constants'
+
+/**
+ * Creation time of the selected organization, used to target free-plan experiments. Only
+ * fetched for free-plan orgs. Read from the org detail endpoint as the org list response
+ * doesn't include it.
+ */
+export function useSelectedOrganizationCreatedAtQuery() {
+ const { data: selectedOrganization } = useSelectedOrganizationQuery({ enabled: IS_PLATFORM })
+ const isFreePlan = selectedOrganization?.plan?.id === 'free'
+
+ return useOrganizationQuery(
+ { slug: selectedOrganization?.slug },
+ { enabled: IS_PLATFORM && isFreePlan, select: (organization) => organization.created_at }
+ )
+}
diff --git a/apps/studio/lib/configcat-attributes.test.ts b/apps/studio/lib/configcat-attributes.test.ts
new file mode 100644
index 00000000000..9cda82a72bc
--- /dev/null
+++ b/apps/studio/lib/configcat-attributes.test.ts
@@ -0,0 +1,29 @@
+import { describe, expect, it } from 'vitest'
+
+import { toUnixSecondsString } from './configcat-attributes'
+
+describe('toUnixSecondsString', () => {
+ it('converts a valid ISO datetime to Unix seconds', () => {
+ expect(toUnixSecondsString('2024-01-01T00:00:00.000Z')).toBe('1704067200')
+ })
+
+ it('converts a datetime with no milliseconds', () => {
+ expect(toUnixSecondsString('2024-01-01T00:00:00Z')).toBe('1704067200')
+ })
+
+ it('returns undefined for undefined', () => {
+ expect(toUnixSecondsString(undefined)).toBeUndefined()
+ })
+
+ it('returns undefined for null', () => {
+ expect(toUnixSecondsString(null)).toBeUndefined()
+ })
+
+ it('returns undefined for an empty string', () => {
+ expect(toUnixSecondsString('')).toBeUndefined()
+ })
+
+ it('returns undefined for an unparseable string', () => {
+ expect(toUnixSecondsString('not-a-date')).toBeUndefined()
+ })
+})
diff --git a/apps/studio/lib/configcat-attributes.ts b/apps/studio/lib/configcat-attributes.ts
new file mode 100644
index 00000000000..c6201e977ea
--- /dev/null
+++ b/apps/studio/lib/configcat-attributes.ts
@@ -0,0 +1,15 @@
+import dayjs from 'dayjs'
+
+/**
+ * Converts an ISO-8601 datetime to a Unix timestamp in seconds, as a string — the format
+ * ConfigCat's date comparators expect for custom attributes (see
+ * https://configcat.com/docs/targeting/targeting-rule/user-condition/#user-attribute-value-types).
+ * Returns undefined for a missing or unparseable value so the caller can omit the custom
+ * attribute entirely rather than send ConfigCat a bad one.
+ */
+export function toUnixSecondsString(isoDateTime: string | null | undefined): string | undefined {
+ if (!isoDateTime) return undefined
+ const parsed = dayjs(isoDateTime)
+ if (!parsed.isValid()) return undefined
+ return parsed.unix().toString()
+}
diff --git a/apps/studio/pages/_app.tsx b/apps/studio/pages/_app.tsx
index 576baa72ac1..9dda7bd2968 100644
--- a/apps/studio/pages/_app.tsx
+++ b/apps/studio/pages/_app.tsx
@@ -56,7 +56,9 @@ import { useRootQueryClient } from '@/data/query-client'
import { inter, manrope, sourceCodePro } from '@/fonts'
import { useCustomContent } from '@/hooks/custom-content/useCustomContent'
import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
+import { useSelectedOrganizationCreatedAtQuery } from '@/hooks/misc/useSelectedOrganizationCreatedAt'
import { AuthProvider } from '@/lib/auth'
+import { toUnixSecondsString } from '@/lib/configcat-attributes'
import { configureMonacoLoader } from '@/lib/configure-monaco-loader'
import { API_URL, BASE_PATH, IS_PLATFORM, useDefaultProvider } from '@/lib/constants'
import { TimezoneProvider, useTimezone } from '@/lib/datetime'
@@ -101,6 +103,7 @@ const FeatureFlagProviderWithOrgContext = ({
...props
}: ComponentProps<typeof FeatureFlagProvider>) => {
const { data: selectedOrganization } = useSelectedOrganizationQuery({ enabled: IS_PLATFORM })
+ const { data: organizationCreatedAt } = useSelectedOrganizationCreatedAtQuery()
const cloudProvider = useDefaultProvider()
const getConfigCatFlags = useCallback(
@@ -108,9 +111,17 @@ const FeatureFlagProviderWithOrgContext = ({
const customAttributes: Record<string, string> = {}
if (cloudProvider) customAttributes.cloud_provider = cloudProvider
if (selectedOrganization?.plan?.id) customAttributes.plan = selectedOrganization.plan.id
+ if (selectedOrganization?.slug) customAttributes.organization_slug = selectedOrganization.slug
+ const createdAtUnixSeconds = toUnixSecondsString(organizationCreatedAt)
+ if (createdAtUnixSeconds) customAttributes.organization_created_at = createdAtUnixSeconds
return getFlags(userEmail, customAttributes)
},
- [cloudProvider, selectedOrganization?.plan?.id]
+ [
+ cloudProvider,
+ selectedOrganization?.plan?.id,
+ selectedOrganization?.slug,
+ organizationCreatedAt,
+ ]
)
return (
diff --git a/apps/studio/routes/__root.tsx b/apps/studio/routes/__root.tsx
index a7abe08003a..d6d195f8f86 100644
--- a/apps/studio/routes/__root.tsx
+++ b/apps/studio/routes/__root.tsx
@@ -76,7 +76,9 @@ import { GlobalErrorBoundaryState } from '@/components/ui/ErrorBoundary/GlobalEr
import { GlobalShortcuts } from '@/components/ui/GlobalShortcuts/GlobalShortcuts'
import { useCustomContent } from '@/hooks/custom-content/useCustomContent'
import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
+import { useSelectedOrganizationCreatedAtQuery } from '@/hooks/misc/useSelectedOrganizationCreatedAt'
import { AuthProvider } from '@/lib/auth'
+import { toUnixSecondsString } from '@/lib/configcat-attributes'
import { configureMonacoLoader } from '@/lib/configure-monaco-loader'
import { API_URL, BASE_PATH, IS_PLATFORM, useDefaultProvider } from '@/lib/constants'
import { TimezoneProvider, useTimezone } from '@/lib/datetime'
@@ -108,6 +110,7 @@ const FeatureFlagProviderWithOrgContext = ({
...props
}: ComponentProps<typeof FeatureFlagProvider>) => {
const { data: selectedOrganization } = useSelectedOrganizationQuery({ enabled: IS_PLATFORM })
+ const { data: organizationCreatedAt } = useSelectedOrganizationCreatedAtQuery()
const cloudProvider = useDefaultProvider()
const getConfigCatFlags = useCallback(
@@ -115,9 +118,17 @@ const FeatureFlagProviderWithOrgContext = ({
const customAttributes: Record<string, string> = {}
if (cloudProvider) customAttributes.cloud_provider = cloudProvider
if (selectedOrganization?.plan?.id) customAttributes.plan = selectedOrganization.plan.id
+ if (selectedOrganization?.slug) customAttributes.organization_slug = selectedOrganization.slug
+ const createdAtUnixSeconds = toUnixSecondsString(organizationCreatedAt)
+ if (createdAtUnixSeconds) customAttributes.organization_created_at = createdAtUnixSeconds
return getFlags(userEmail, customAttributes)
},
- [cloudProvider, selectedOrganization?.plan?.id]
+ [
+ cloudProvider,
+ selectedOrganization?.plan?.id,
+ selectedOrganization?.slug,
+ organizationCreatedAt,
+ ]
)
return (
diff --git a/apps/studio/tests/pages/new/[slug].test.tsx b/apps/studio/tests/pages/new/[slug].test.tsx
index 753e9a172ab..af17b78e2eb 100644
--- a/apps/studio/tests/pages/new/[slug].test.tsx
+++ b/apps/studio/tests/pages/new/[slug].test.tsx
@@ -187,6 +187,15 @@ function mockWizardEndpoints(
response: () =>
HttpResponse.json<OrganizationResponse[]>(overrides.organizations ?? [mockOrg()]),
})
+ addAPIMock({
+ method: 'get',
+ path: '/platform/organizations/:slug',
+ response: {
+ ...(overrides.organizations?.[0] ?? mockOrg()),
+ created_at: '2026-01-01T00:00:00Z',
+ has_oriole_project: false,
+ },
+ })
addAPIMock({
method: 'get',
path: '/platform/profile/permissions',
@@ -275,13 +284,22 @@ const DEFAULT_FLAGS = {
disableOrioleProjectCreation: false,
defaultRegionRestrictedPool: false,
projectCreationRestrictedRegions: false,
+ freeTierGeneralRegionEnrollment: false,
+ freeTierGeneralRegionSelection: false,
}
-async function renderWizard(options: { flags?: Record<string, boolean | string> } = {}) {
+async function renderWizard(
+ options: { flags?: Record<string, boolean | string>; isConfigCatStale?: boolean } = {}
+) {
const { default: Wizard } = await import('@/pages/new/[slug]')
return customRender(
<FeatureFlagContext.Provider
- value={{ configcat: { ...DEFAULT_FLAGS, ...options.flags }, posthog: {}, hasLoaded: true }}
+ value={{
+ configcat: { ...DEFAULT_FLAGS, ...options.flags },
+ posthog: {},
+ hasLoaded: true,
+ isConfigCatStale: options.isConfigCatStale,
+ }}
>
<Wizard dehydratedState={undefined} />
</FeatureFlagContext.Provider>,
@@ -493,6 +511,89 @@ describe('project creation wizard', () => {
await screen.findByText('Error loading available regions')
})
+ describe('free tier general region experiment', () => {
+ test('keeps the region selector loading while flags are being re-evaluated', async () => {
+ mockWizardEndpoints({
+ organizations: [mockOrg({ plan: { id: 'free', name: 'Free' } })],
+ })
+
+ await renderWizard({
+ flags: {
+ freeTierGeneralRegionEnrollment: true,
+ freeTierGeneralRegionSelection: true,
+ },
+ isConfigCatStale: true,
+ })
+
+ await screen.findByPlaceholderText('Project name')
+ expect(await screen.findByText('Loading available regions...')).toBeInTheDocument()
+ expect(getSelectTriggerByLabel('Region')).toBeDisabled()
+ })
+
+ test('restricts the picker to general regions with an upgrade footer for a free-plan org in the test arm', async () => {
+ mockWizardEndpoints({
+ organizations: [mockOrg({ plan: { id: 'free', name: 'Free' } })],
+ })
+
+ await renderWizard({
+ flags: {
+ freeTierGeneralRegionEnrollment: true,
+ freeTierGeneralRegionSelection: true,
+ },
+ })
+
+ await screen.findByPlaceholderText('Project name')
+ await user.click(getSelectTriggerByLabel('Region'))
+
+ expect(await screen.findByText('General regions')).toBeInTheDocument()
+ expect(screen.queryByText('Specific regions')).not.toBeInTheDocument()
+ expect(screen.queryByRole('option', { name: /North Virginia/ })).not.toBeInTheDocument()
+
+ const upgradeLink = screen.getByRole('link', { name: 'Upgrade to Pro' })
+ expect(upgradeLink).toHaveAttribute(
+ 'href',
+ `/org/${ORG_SLUG}/billing?panel=subscriptionPlan&source=freeTierGeneralRegionSelector`
+ )
+ })
+
+ test('shows the full region picker with no upgrade footer for a free-plan org in the control arm', async () => {
+ mockWizardEndpoints({
+ organizations: [mockOrg({ plan: { id: 'free', name: 'Free' } })],
+ })
+
+ await renderWizard({
+ flags: {
+ freeTierGeneralRegionEnrollment: true,
+ freeTierGeneralRegionSelection: false,
+ },
+ })
+
+ await screen.findByPlaceholderText('Project name')
+ await user.click(getSelectTriggerByLabel('Region'))
+
+ expect(await screen.findByText('Specific regions')).toBeInTheDocument()
+ expect(screen.getByRole('option', { name: /North Virginia/ })).toBeInTheDocument()
+ expect(screen.queryByRole('link', { name: 'Upgrade to Pro' })).not.toBeInTheDocument()
+ })
+
+ test('shows the full region picker with no upgrade footer for a paid-plan org even when enrolled', async () => {
+ mockWizardEndpoints()
+
+ await renderWizard({
+ flags: {
+ freeTierGeneralRegionEnrollment: true,
+ freeTierGeneralRegionSelection: true,
+ },
+ })
+
+ await screen.findByPlaceholderText('Project name')
+ await user.click(getSelectTriggerByLabel('Region'))
+
+ expect(await screen.findByText('Specific regions')).toBeInTheDocument()
+ expect(screen.queryByRole('link', { name: 'Upgrade to Pro' })).not.toBeInTheDocument()
+ })
+ })
+
describe('restricted regions', () => {
const CAPACITY_COPY = {
title: 'Selected region is at capacity',
diff --git a/packages/api-types/types/api-v2.d.ts b/packages/api-types/types/api-v2.d.ts
index 1af3d1d68d9..e8adbe0699b 100644
--- a/packages/api-types/types/api-v2.d.ts
+++ b/packages/api-types/types/api-v2.d.ts
@@ -777,10 +777,71 @@ export type webhooks = Record<string, never>
export interface components {
schemas: {
APIErrorObject: {
- code: string
+ /** @enum {string} */
+ code:
+ | 'bad_request'
+ | 'forbidden'
+ | 'internal_server_error'
+ | 'not_found'
+ | 'payment_required'
+ | 'rate_limit_exceeded'
+ | 'request_timeout'
+ | 'request_too_large'
+ | 'unauthorized'
+ | 'validation_failed'
+ | 'agentic_credential_not_found'
+ | 'branch_admin_required'
+ | 'compute_build_context_too_large'
+ | 'compute_build_in_progress'
+ | 'compute_deploy_rate_limit_exceeded'
+ | 'compute_instance_limit_exceeded'
+ | 'compute_instance_not_found'
+ | 'compute_not_enabled'
+ | 'compute_request_rejected'
+ | 'compute_unavailable'
+ | 'notebook_cell_duplicate'
+ | 'notebook_cell_unknown'
+ | 'notebook_disabled'
+ | 'notebook_not_found'
+ | 'notebook_sort_invalid'
+ | 'organization_invitation_email_delivery_failed'
+ | 'organization_invitations_partially_failed'
+ | 'organization_role_name_invalid'
+ | 'organization_role_not_entitled'
+ | 'pagination_cursor_invalid'
+ | 'project_branch_resync_unsupported'
+ | 'project_not_found'
+ | 'project_privatelink_disabled'
+ | 'project_transfer_disabled'
+ | 'delivery_not_found'
+ | 'endpoint_disabled'
+ | 'endpoint_event_type_not_subscribed'
+ | 'endpoint_not_found'
+ | 'endpoint_url_unresolvable'
+ | 'webhooks_access_disabled'
description?: string
id?: string
- issues?: components['schemas']['APIErrorObject'][]
+ issues?: {
+ code: string
+ description?: string
+ id?: string
+ links?: {
+ [key: string]: {
+ describedby?: string
+ href: string
+ meta?: {
+ [key: string]: unknown
+ }
+ rel?: string
+ title?: string
+ type?: string
+ }
+ }
+ message: string
+ meta?: {
+ [key: string]: unknown
+ }
+ }[]
links?: {
[key: string]: {
describedby?: string
@@ -895,10 +956,71 @@ export interface components {
error: components['schemas']['ErrorResponseBodyAPIErrorObject']
}
ErrorResponseBodyAPIErrorObject: {
- code: string
+ /** @enum {string} */
+ code:
+ | 'bad_request'
+ | 'forbidden'
+ | 'internal_server_error'
+ | 'not_found'
+ | 'payment_required'
+ | 'rate_limit_exceeded'
+ | 'request_timeout'
+ | 'request_too_large'
+ | 'unauthorized'
+ | 'validation_failed'
+ | 'agentic_credential_not_found'
+ | 'branch_admin_required'
+ | 'compute_build_context_too_large'
+ | 'compute_build_in_progress'
+ | 'compute_deploy_rate_limit_exceeded'
+ | 'compute_instance_limit_exceeded'
+ | 'compute_instance_not_found'
+ | 'compute_not_enabled'
+ | 'compute_request_rejected'
+ | 'compute_unavailable'
+ | 'notebook_cell_duplicate'
+ | 'notebook_cell_unknown'
+ | 'notebook_disabled'
+ | 'notebook_not_found'
+ | 'notebook_sort_invalid'
+ | 'organization_invitation_email_delivery_failed'
+ | 'organization_invitations_partially_failed'
+ | 'organization_role_name_invalid'
+ | 'organization_role_not_entitled'
+ | 'pagination_cursor_invalid'
+ | 'project_branch_resync_unsupported'
+ | 'project_not_found'
+ | 'project_privatelink_disabled'
+ | 'project_transfer_disabled'
+ | 'delivery_not_found'
+ | 'endpoint_disabled'
+ | 'endpoint_event_type_not_subscribed'
+ | 'endpoint_not_found'
+ | 'endpoint_url_unresolvable'
+ | 'webhooks_access_disabled'
description?: string
id?: string
- issues?: components['schemas']['ErrorResponseBodyAPIErrorObject'][]
+ issues?: {
+ code: string
+ description?: string
+ id?: string
+ links?: {
+ [key: string]: {
+ describedby?: string
+ href: string
+ meta?: {
+ [key: string]: unknown
+ }
+ rel?: string
+ title?: string
+ type?: string
+ }
+ }
+ message: string
+ meta?: {
+ [key: string]: unknown
+ }
+ }[]
links?: {
[key: string]: {
describedby?: string
@@ -1458,7 +1580,48 @@ export interface components {
type: 'organization_invitation'
}[]
error?: {
- code: string
+ /** @enum {string} */
+ code:
+ | 'bad_request'
+ | 'forbidden'
+ | 'internal_server_error'
+ | 'not_found'
+ | 'payment_required'
+ | 'rate_limit_exceeded'
+ | 'request_timeout'
+ | 'request_too_large'
+ | 'unauthorized'
+ | 'validation_failed'
+ | 'agentic_credential_not_found'
+ | 'branch_admin_required'
+ | 'compute_build_context_too_large'
+ | 'compute_build_in_progress'
+ | 'compute_deploy_rate_limit_exceeded'
+ | 'compute_instance_limit_exceeded'
+ | 'compute_instance_not_found'
+ | 'compute_not_enabled'
+ | 'compute_request_rejected'
+ | 'compute_unavailable'
+ | 'notebook_cell_duplicate'
+ | 'notebook_cell_unknown'
+ | 'notebook_disabled'
+ | 'notebook_not_found'
+ | 'notebook_sort_invalid'
+ | 'organization_invitation_email_delivery_failed'
+ | 'organization_invitations_partially_failed'
+ | 'organization_role_name_invalid'
+ | 'organization_role_not_entitled'
+ | 'pagination_cursor_invalid'
+ | 'project_branch_resync_unsupported'
+ | 'project_not_found'
+ | 'project_privatelink_disabled'
+ | 'project_transfer_disabled'
+ | 'delivery_not_found'
+ | 'endpoint_disabled'
+ | 'endpoint_event_type_not_subscribed'
+ | 'endpoint_not_found'
+ | 'endpoint_url_unresolvable'
+ | 'webhooks_access_disabled'
description?: string
id?: string
issues?: {
@@ -3340,7 +3503,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3357,14 +3520,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3381,7 +3544,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -3401,7 +3564,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.delivery'
+ code: 'delivery_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3418,7 +3581,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Delivery not found'
+ message: 'Webhook delivery not found'
meta?: {
[key: string]: unknown
}
@@ -3455,7 +3618,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -3475,7 +3638,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3492,7 +3655,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -3621,7 +3784,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3638,14 +3801,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3662,7 +3825,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -3682,7 +3845,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.delivery'
+ code: 'delivery_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3699,7 +3862,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Delivery not found'
+ message: 'Webhook delivery not found'
meta?: {
[key: string]: unknown
}
@@ -3736,7 +3899,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -3756,7 +3919,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -3773,7 +3936,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -4005,7 +4168,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4022,14 +4185,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4046,7 +4209,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -4083,7 +4246,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -4103,7 +4266,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4120,7 +4283,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -4397,7 +4560,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4414,14 +4577,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4438,7 +4601,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -4475,7 +4638,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -4495,7 +4658,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4512,7 +4675,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -4715,7 +4878,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4732,14 +4895,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4756,7 +4919,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -4793,7 +4956,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -4813,7 +4976,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -4830,7 +4993,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -5035,7 +5198,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5052,14 +5215,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5076,7 +5239,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -5096,7 +5259,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5113,7 +5276,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -5150,7 +5313,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -5170,7 +5333,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5187,7 +5350,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -5392,7 +5555,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5409,14 +5572,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5433,7 +5596,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -5453,7 +5616,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5470,7 +5633,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -5507,7 +5670,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -5527,7 +5690,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5544,7 +5707,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -5820,7 +5983,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5837,14 +6000,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5861,7 +6024,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -5881,7 +6044,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5898,7 +6061,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -5935,7 +6098,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -5955,7 +6118,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -5972,7 +6135,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -6170,7 +6333,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6187,14 +6350,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6211,7 +6374,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -6231,7 +6394,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6248,7 +6411,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -6285,7 +6448,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -6305,7 +6468,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6322,7 +6485,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -6474,7 +6637,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'bad_request.endpoint.test.disabled'
+ code: 'endpoint_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6491,14 +6654,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Bad Request: Endpoint is disabled'
+ message: 'Webhook endpoint is disabled'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'bad_request.endpoint.test.wrong_event_type'
+ code: 'endpoint_event_type_not_subscribed'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6515,7 +6678,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Bad Request: Provided event type is not subscribed to by the endpoint'
+ message: 'Webhook endpoint is not subscribed to this event type'
meta?: {
[key: string]: unknown
}
@@ -6573,7 +6736,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6590,14 +6753,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6614,7 +6777,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -6634,7 +6797,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6651,7 +6814,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -6688,7 +6851,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -6708,7 +6871,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -6725,7 +6888,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -8345,7 +8508,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8362,14 +8525,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8386,7 +8549,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -8406,7 +8569,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.delivery'
+ code: 'delivery_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8423,7 +8586,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Delivery not found'
+ message: 'Webhook delivery not found'
meta?: {
[key: string]: unknown
}
@@ -8460,7 +8623,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -8480,7 +8643,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8497,7 +8660,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -8626,7 +8789,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8643,14 +8806,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8667,7 +8830,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -8687,7 +8850,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.delivery'
+ code: 'delivery_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8704,7 +8867,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Delivery not found'
+ message: 'Webhook delivery not found'
meta?: {
[key: string]: unknown
}
@@ -8741,7 +8904,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -8761,7 +8924,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -8778,7 +8941,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -9010,7 +9173,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9027,14 +9190,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9051,7 +9214,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -9088,7 +9251,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -9108,7 +9271,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9125,7 +9288,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -9402,7 +9565,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9419,14 +9582,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9443,7 +9606,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -9480,7 +9643,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -9500,7 +9663,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9517,7 +9680,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -9720,7 +9883,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9737,14 +9900,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9761,7 +9924,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -9798,7 +9961,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -9818,7 +9981,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -9835,7 +9998,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -10040,7 +10203,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10057,14 +10220,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10081,7 +10244,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -10101,7 +10264,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10118,7 +10281,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -10155,7 +10318,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -10175,7 +10338,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10192,7 +10355,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -10397,7 +10560,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10414,14 +10577,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10438,7 +10601,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -10458,7 +10621,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10475,7 +10638,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -10512,7 +10675,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -10532,7 +10695,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10549,7 +10712,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -10825,7 +10988,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10842,14 +11005,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10866,7 +11029,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -10886,7 +11049,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10903,7 +11066,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -10940,7 +11103,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -10960,7 +11123,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -10977,7 +11140,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -11175,7 +11338,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11192,14 +11355,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11216,7 +11379,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -11236,7 +11399,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11253,7 +11416,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -11290,7 +11453,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -11310,7 +11473,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11327,7 +11490,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
@@ -11479,7 +11642,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'bad_request.endpoint.test.disabled'
+ code: 'endpoint_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11496,14 +11659,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Bad Request: Endpoint is disabled'
+ message: 'Webhook endpoint is disabled'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'bad_request.endpoint.test.wrong_event_type'
+ code: 'endpoint_event_type_not_subscribed'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11520,7 +11683,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Bad Request: Provided event type is not subscribed to by the endpoint'
+ message: 'Webhook endpoint is not subscribed to this event type'
meta?: {
[key: string]: unknown
}
@@ -11578,7 +11741,7 @@ export interface operations {
error:
| {
/** @constant */
- code: 'forbidden.permission_denied'
+ code: 'forbidden'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11595,14 +11758,14 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Permission denied'
+ message: 'Forbidden'
meta?: {
[key: string]: unknown
}
}
| {
/** @constant */
- code: 'forbidden.access_disabled'
+ code: 'webhooks_access_disabled'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11619,7 +11782,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Forbidden: Access disabled'
+ message: 'Webhooks access is disabled for this organization or project'
meta?: {
[key: string]: unknown
}
@@ -11639,7 +11802,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'not_found.endpoint'
+ code: 'endpoint_not_found'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11656,7 +11819,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Not Found: Endpoint not found'
+ message: 'Webhook endpoint not found'
meta?: {
[key: string]: unknown
}
@@ -11693,7 +11856,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Request Timeout'
+ message: 'Request timed out'
meta?: {
[key: string]: unknown
}
@@ -11713,7 +11876,7 @@ export interface operations {
'application/json': {
error: {
/** @constant */
- code: 'too_many_requests'
+ code: 'rate_limit_exceeded'
description?: string
id?: string
issues?: components['schemas']['APIErrorObject'][]
@@ -11730,7 +11893,7 @@ export interface operations {
}
}
/** @constant */
- message: 'Too Many Requests'
+ message: 'Rate limit exceeded'
meta?: {
[key: string]: unknown
}
diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts
index 7b37321ebba..1624cd0861e 100644
--- a/packages/api-types/types/platform.d.ts
+++ b/packages/api-types/types/platform.d.ts
@@ -1279,6 +1279,23 @@ export interface paths {
patch?: never
trace?: never
}
+ '/platform/organizations/{slug}/billing/credits/burndown': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Retrieves the burndown of prepaid credit blocks for an organization */
+ get: operations['OrgCreditsController_getBurndown']
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/platform/organizations/{slug}/billing/credits/preview': {
parameters: {
query?: never
@@ -1657,7 +1674,7 @@ export interface paths {
options?: never
head?: never
/** Assign organization member with new role */
- patch: operations['MembersController_assignMemberRoleV2']
+ patch: operations['MembersController_assignMemberRoleV2_2']
trace?: never
}
'/platform/organizations/{slug}/members/{gotrue_id}/roles/{role_id}': {
@@ -5210,6 +5227,26 @@ export interface paths {
patch?: never
trace?: never
}
+ '/platform/warehouse/{ref}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ post?: never
+ /**
+ * Disable Warehouse
+ * @description Asynchronously stop and delete Warehouse replication, remove its publication and FDW, and revoke external catalog access. Optionally delete the DuckLake catalog schema and managed Storage bucket with delete_data=true, requiring SQL and Storage admin write permissions on the configured destination. Poll setup-status for completion. Source tables are preserved.
+ */
+ delete: operations['WarehouseController_deleteWarehouse']
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/platform/warehouse/{ref}/catalog': {
parameters: {
query?: never
@@ -5265,7 +5302,7 @@ export interface paths {
put?: never
/**
* Set up Warehouse
- * @description Replace the Warehouse publication with the complete requested selection and start syncing. Optionally select another Supabase project for both the DuckLake PostgreSQL catalog and Storage using destination_project_ref; SQL and Storage admin write permissions are required on that project. The configured destination is reused on subsequent requests and cannot be changed through setup. Schema targets include the currently eligible tables in that schema. An empty targets array stops and deletes the Warehouse pipeline and publication, disables external catalog access, and uninstalls the Warehouse FDW and its dependent foreign tables. Warehouse FDW installation is opt-in, remains on the source project, and is ignored for an empty selection.
+ * @description Replace the Warehouse publication with the complete requested selection and start syncing. Optionally select another Supabase project for both the DuckLake PostgreSQL catalog and Storage using destination_project_ref; SQL and Storage admin write permissions are required on that project. The configured destination is reused on subsequent requests and cannot be changed through setup. Schema targets include the currently eligible tables in that schema. For backward compatibility, an empty targets array asynchronously stops and deletes the Warehouse pipeline and publication, disables external catalog access, and uninstalls the Warehouse FDW and its dependent foreign tables. Warehouse FDW installation is opt-in, remains on the source project, and is ignored for an empty selection. Prefer DELETE to disable Warehouse and optionally delete its data; poll setup-status for completion.
*/
post: operations['WarehouseController_setup']
delete?: never
@@ -5283,7 +5320,7 @@ export interface paths {
}
/**
* Get Warehouse setup status
- * @description Return the async Warehouse setup status for the project. Overall completion follows the replication pipeline and table copy state; project database FDW markers are informational.
+ * @description Return Warehouse setup or disable status. During and after teardown, persisted lifecycle state is returned without querying ETL or inspecting the project FDW. Otherwise completion follows replication and table copy state.
*/
get: operations['WarehouseController_getSetupStatus']
put?: never
@@ -6701,6 +6738,9 @@ export interface components {
| 'snippets_read'
| 'organization_admin_read'
| 'organization_admin_write'
+ | 'audit_logs_read'
+ | 'billing_read'
+ | 'billing_write'
| 'members_read'
| 'members_write'
| 'organization_projects_read'
@@ -6766,6 +6806,7 @@ export interface components {
| 'infra_add_ons_write'
| 'infra_disk_config_read'
| 'infra_disk_config_write'
+ | 'project_operations_write'
| 'infra_read_replicas_read'
| 'infra_read_replicas_write'
| 'project_snippets_read'
@@ -7661,6 +7702,9 @@ export interface components {
| 'snippets_read'
| 'organization_admin_read'
| 'organization_admin_write'
+ | 'audit_logs_read'
+ | 'billing_read'
+ | 'billing_write'
| 'members_read'
| 'members_write'
| 'organization_projects_read'
@@ -7726,6 +7770,7 @@ export interface components {
| 'infra_add_ons_write'
| 'infra_disk_config_read'
| 'infra_disk_config_write'
+ | 'project_operations_write'
| 'infra_read_replicas_read'
| 'infra_read_replicas_write'
| 'project_snippets_read'
@@ -7905,6 +7950,7 @@ export interface components {
code: string
}
CreditRedemptionResponse_Output: {
+ already_redeemed_partner_credits: number
amount_cents: number
credits_expire_at: string | null
}
@@ -8802,6 +8848,17 @@ export interface components {
private: number
shared: number
}
+ GetCreditBurndownResponse_Output: {
+ data: {
+ amount_cents: number
+ breakdown: {
+ amount_cents: number
+ item: string
+ }[]
+ day: string
+ ending_balance_cents: number
+ }[]
+ }
GetGitHubConnectionConfigResponse_Output: {
/** @description JSON representation of the parsed `supabase/config.toml`. Its shape is owned by the Supabase CLI and is passed through as-is. */
config: {
@@ -10475,6 +10532,8 @@ export interface components {
billing_email: string | null
/** @enum {string|null} */
billing_partner: 'aws_marketplace' | 'vercel_marketplace' | null
+ /** Format: date-time */
+ created_at: string
has_oriole_project: boolean
id: number
integration_source: string | null
@@ -14264,6 +14323,9 @@ export interface components {
| 'snippets_read'
| 'organization_admin_read'
| 'organization_admin_write'
+ | 'audit_logs_read'
+ | 'billing_read'
+ | 'billing_write'
| 'members_read'
| 'members_write'
| 'organization_projects_read'
@@ -14329,6 +14391,7 @@ export interface components {
| 'infra_add_ons_write'
| 'infra_disk_config_read'
| 'infra_disk_config_write'
+ | 'project_operations_write'
| 'infra_read_replicas_read'
| 'infra_read_replicas_write'
| 'project_snippets_read'
@@ -16120,6 +16183,10 @@ export interface components {
/** @description Whether external catalog access is enabled */
enabled: boolean
}
+ WarehouseDeleteResponse_Output: {
+ /** @enum {string} */
+ status: 'accepted'
+ }
WarehouseSetupBody: {
/**
* @description Supabase project to use for both the DuckLake PostgreSQL catalog and Supabase Storage. Defaults to this project on first setup and to the configured destination on later requests. The destination must be active and healthy, and another project requires SQL and Storage admin write permissions. An existing destination cannot be changed through setup. Ignored when targets is empty.
@@ -16131,7 +16198,7 @@ export interface components {
* @example false
*/
install_fdw?: boolean
- /** @description Complete selection of schemas and individual tables to copy, replacing the previous selection. Schema targets expand to the eligible tables present when the request is processed. An empty array disables Warehouse replication and external catalog access and uninstalls the Warehouse FDW. */
+ /** @description Complete selection of schemas and individual tables to copy, replacing the previous selection. Schema targets expand to the eligible tables present when the request is processed. An empty array asynchronously disables Warehouse while retaining its data. Prefer DELETE to disable Warehouse; poll setup-status for completion. */
targets: (
| {
/**
@@ -16160,7 +16227,7 @@ export interface components {
}
WarehouseSetupResponse_Output: {
/**
- * @description Warehouse replication pipeline id, or null when Warehouse is disabled
+ * @description Warehouse replication pipeline id, or null when Warehouse disable has been requested
* @example 101
*/
pipeline_id: number | null
@@ -16206,7 +16273,11 @@ export interface components {
}[]
}
WarehouseSetupStatusResponse_Output: {
- /** @description Project database FDW setup markers used to derive the Warehouse FDW phase */
+ /** @description Whether the current disable request deletes DuckLake data. */
+ delete_data?: boolean
+ /** @description Warehouse cleanup failure, when present. */
+ error?: string
+ /** @description Project database FDW setup markers; null during or after teardown, when setup inspection is inapplicable. */
fdw_status: {
/**
* @description Whether fdw_warehouse is available to install on the project database instance
@@ -16238,18 +16309,26 @@ export interface components {
* @example true
*/
wrapper_installed: boolean
- }
+ } | null
/**
* @description Warehouse replication pipeline id when it exists
* @example 101
*/
pipeline_id?: number
/**
- * @description Overall Warehouse setup status derived from replication state
+ * @description Overall Warehouse lifecycle status, using persisted state during teardown and replication state during setup
* @example copying
* @enum {string}
*/
- setup_status: 'not_started' | 'setting_up' | 'copying' | 'complete' | 'error'
+ setup_status:
+ | 'not_started'
+ | 'setting_up'
+ | 'copying'
+ | 'complete'
+ | 'error'
+ | 'disabling'
+ | 'disabled'
+ | 'deletion_failed'
/** @description Warehouse setup phases in execution order */
steps: {
/**
@@ -17848,6 +17927,27 @@ export interface operations {
'application/json': components['schemas']['UpdateConversationCustomFieldsResponse_Output']
}
}
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
/** @description Failed to update conversation custom fields */
500: {
headers: {
@@ -19169,6 +19269,27 @@ export interface operations {
'application/json': components['schemas']['GetOAuthAuthorizationResponse_Output']
}
}
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
}
}
OrganizationsController_getOrganizations: {
@@ -20497,6 +20618,59 @@ export interface operations {
}
}
}
+ OrgCreditsController_getBurndown: {
+ parameters: {
+ query?: {
+ end_date?: string
+ start_date?: string
+ }
+ header?: never
+ path: {
+ /** @description Organization slug */
+ slug: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['GetCreditBurndownResponse_Output']
+ }
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to retrieve prepaid credit block burndown */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
OrgCreditsController_previewTopUp: {
parameters: {
query?: never
@@ -21779,7 +21953,7 @@ export interface operations {
}
}
}
- MembersController_assignMemberRoleV2: {
+ MembersController_assignMemberRoleV2_2: {
parameters: {
query?: never
header?: never
@@ -35126,6 +35300,83 @@ export interface operations {
}
}
}
+ WarehouseController_deleteWarehouse: {
+ parameters: {
+ query?: {
+ /** @description Permanently delete the managed DuckLake catalog schema and Storage bucket. Defaults to false. */
+ delete_data?: 'true' | 'false'
+ }
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Warehouse disable accepted. Poll setup-status for completion. */
+ 202: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['WarehouseDeleteResponse_Output']
+ }
+ }
+ /** @description Invalid deletion option or unmanaged Warehouse destination. */
+ 400: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description This feature requires the Pro, Team, or Enterprise organization plan. */
+ 402: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['PlanGateErrorBody']
+ }
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Another Warehouse mutation is running or the cleanup policy cannot be changed. */
+ 409: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Failed to request Warehouse disable. */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
WarehouseController_getCatalog: {
parameters: {
query?: never
diff --git a/packages/common/feature-flags.tsx b/packages/common/feature-flags.tsx
index a84e6b9fc83..cbe98be0683 100644
--- a/packages/common/feature-flags.tsx
+++ b/packages/common/feature-flags.tsx
@@ -2,7 +2,15 @@
import { components } from 'api-types'
import { FlagValues } from 'flags/react'
-import { createContext, PropsWithChildren, useContext, useEffect, useRef, useState } from 'react'
+import {
+ createContext,
+ PropsWithChildren,
+ useContext,
+ useEffect,
+ useMemo,
+ useRef,
+ useState,
+} from 'react'
import { useAuth, useUser } from './auth'
import { getFlags as getDefaultConfigCatFlags } from './configcat'
@@ -52,6 +60,21 @@ export type FeatureFlagContextType = {
configcat: { [key: string]: boolean | number | string | null }
posthog: CallFeatureFlagsResponse
hasLoaded?: boolean
+ /**
+ * True while ConfigCat flags are being re-evaluated after `getConfigCatFlags` changed,
+ * e.g. because its custom attributes changed. Until then, `configcat` holds values
+ * evaluated with the previous attributes.
+ */
+ isConfigCatStale?: boolean
+}
+
+type ConfigCatFlagsFetcher = (
+ userEmail?: string
+) => Promise<{ settingKey: string; settingValue: boolean | number | string | null | undefined }[]>
+
+type FeatureFlagStore = FeatureFlagContextType & {
+ /** The `getConfigCatFlags` that produced the current ConfigCat values */
+ configCatFetcher?: ConfigCatFlagsFetcher
}
export const FeatureFlagContext = createContext<FeatureFlagContextType>({
@@ -87,9 +110,7 @@ export const FeatureFlagProvider = ({
organizationSlug?: string
projectRef?: string
/** Custom fetcher for ConfigCat flags if passing in custom attributes */
- getConfigCatFlags?: (
- userEmail?: string
- ) => Promise<{ settingKey: string; settingValue: boolean | number | string | null | undefined }[]>
+ getConfigCatFlags?: ConfigCatFlagsFetcher
}>) => {
const { isLoading } = useAuth()
const user = useUser()
@@ -99,7 +120,7 @@ export const FeatureFlagProvider = ({
const resolvedProjectRef = projectRef ?? params.ref
const lastSentGroupContextRef = useRef<string | null>(null)
- const [store, setStore] = useState<FeatureFlagContextType>({
+ const [store, setStore] = useState<FeatureFlagStore>({
API_URL,
configcat: {},
posthog: {},
@@ -145,7 +166,11 @@ export const FeatureFlagProvider = ({
(enabled === true || (typeof enabled === 'object' && enabled.ph)) && !!API_URL
const loadCCFlags = enabled === true || (typeof enabled === 'object' && enabled.cc)
- let flagStore: FeatureFlagContextType = { configcat: {}, posthog: {} }
+ let flagStore: FeatureFlagStore = {
+ configcat: {},
+ posthog: {},
+ configCatFetcher: getConfigCatFlags,
+ }
// Run both async operations in parallel — allSettled so a failure in one doesn't block the other
const [phResult, ccResult] = await Promise.allSettled([
@@ -253,8 +278,14 @@ export const FeatureFlagProvider = ({
getConfigCatFlags,
])
+ // Memoized so consumers only re-render when the flags or their staleness change
+ const contextValue = useMemo<FeatureFlagContextType>(() => {
+ const { configCatFetcher, ...flags } = store
+ return { ...flags, isConfigCatStale: configCatFetcher !== getConfigCatFlags }
+ }, [store, getConfigCatFlags])
+
return (
- <FeatureFlagContext.Provider value={store}>
+ <FeatureFlagContext.Provider value={contextValue}>
{/*
[Joshen] Just support configcat flags in Vercel flags for now for simplicity
although I think it should be fairly simply to support PH too
diff --git a/packages/common/telemetry-constants.ts b/packages/common/telemetry-constants.ts
index 7dd44aeec0e..31e2cc4e116 100644
--- a/packages/common/telemetry-constants.ts
+++ b/packages/common/telemetry-constants.ts
@@ -449,6 +449,18 @@ export interface ProjectCreationSimpleVersionSubmittedEvent {
* omitted = PostHog flags had not loaded at the time of project creation
*/
dataApiRevokeOnCreateDefaultEnabled?: boolean | string
+ /**
+ * freeTierGeneralRegionExperiment variant at submission time. Omitted when the org isn't
+ * in the experiment (paid plan, smart regions disabled for the selected cloud provider,
+ * or not enrolled via the freeTierGeneralRegionEnrollment ConfigCat flag).
+ */
+ freeTierGeneralRegionExperiment?: 'control' | 'test'
+ /**
+ * Whether the submitted region is a smart region group ('general', e.g. Americas) or an
+ * exact region ('specific', e.g. us-east-1). Only set when smart regions are enabled for
+ * the selected cloud provider.
+ */
+ regionSelectionType?: 'general' | 'specific'
}
groups: TelemetryGroups
}
@@ -506,6 +518,36 @@ export interface ProjectCreationFormExposedEvent {
groups: Omit<TelemetryGroups, 'project'>
}
+/**
+ * Org was targeted for the freeTierGeneralRegionExperiment: a free-plan org with smart
+ * regions enabled for the selected cloud provider, enrolled (control or test arm) via the
+ * freeTierGeneralRegionEnrollment ConfigCat flag.
+ *
+ * @group Events
+ * @source studio
+ * @page new/{slug} and /integrations/vercel/{slug}/deploy-button/new-project
+ */
+export interface FreeTierGeneralRegionExperimentExposedEvent {
+ action: 'free_tier_general_region_experiment_exposed'
+ properties: {
+ /** The experiment variant the user is enrolled in */
+ variant: 'control' | 'test'
+ }
+ groups: Omit<TelemetryGroups, 'project'>
+}
+
+/**
+ * User clicked the "Upgrade to Pro" link in the region selector's footer.
+ *
+ * @group Events
+ * @source studio
+ * @page new/{slug} and /integrations/vercel/{slug}/deploy-button/new-project
+ */
+export interface FreeTierGeneralRegionUpgradeClickedEvent {
+ action: 'free_tier_general_region_upgrade_clicked'
+ groups: Omit<TelemetryGroups, 'project'>
+}
+
/**
* New-organization form was rendered and shown to the user. Passive impression that
* anchors the organization-creation funnel (exposed -> completed). Fires once per form
@@ -4121,6 +4163,8 @@ export type TelemetryEvent =
| ProjectCreationSimpleVersionSubmittedEvent
| ProjectCreationSimpleVersionConfirmModalOpenedEvent
| ProjectCreationFormExposedEvent
+ | FreeTierGeneralRegionExperimentExposedEvent
+ | FreeTierGeneralRegionUpgradeClickedEvent
| OrganizationCreationFormExposedEvent
| OrganizationCreationCompletedEvent
| TableApiAccessToggleClickedEvent