fix(studio): use Compute management endpoints FUNC-896 (#50393)

## Problem

Studio still called the legacy `/workers` Management API routes and used
the old `project_worker` response contract, so Compute instances could
not be listed or retrieved after the API rename. The production API type
check also detected drift in the v1 and platform declarations.

## Fix

- Regenerate the v1, v2, and platform API declarations from the deployed
schemas.
- Update Studio list and detail queries to `/compute`.
- Align typed fixtures with the Compute response schemas and
`project_compute_instance` resource type.
- Update platform response type references to the generated `_Output`
schema names.

## How to test

- Run `pnpm api:verify-types`.
- Run `pnpm --filter api-types test`.
- Run `pnpm --filter studio test data/compute/compute.utils.test.ts
"tests/pages/project/[ref]/compute/index.test.tsx"`.
- Run `pnpm --filter studio typecheck`.
- Run `pnpm --filter common typecheck`.
- Run `pnpm --filter studio lint:ratchet`.

Expected result: production API declarations are synchronized, and
Studio requests the `/compute` list and detail endpoints and renders
`project_compute_instance` responses successfully.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Improvements**
* Updated API response handling across profiles, backups, notifications,
integrations, warehouses, access tokens, payments, and other Studio
workflows for more accurate serialized data.
* Compute instance pages and queries now use the compute-specific API
endpoints and response data.
* Improved feature-flag type handling when disabled feature data is
unavailable.

* **Tests**
* Updated automated coverage and fixtures to reflect current compute and
API response formats.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Jordi Enric authored and GitHub committed 2026-09-15 12:50:56 +02:00
1 parent b86b5feabd
commit fa7c223209
36 files changed
+1087 -677

No files matched your search

@@ -13,8 +13,8 @@ import { addAPIMock } from '@/tests/lib/msw'
type OrganizationResponse = components['schemas']['OrganizationResponse_Output']
type ProjectsResponse = components['schemas']['ListProjectsPaginatedResponse_Output']
type OrganizationProjectsResponse = components['schemas']['OrganizationProjectsResponse_Output']
type CreateTokenResponse = components['schemas']['CreateScopedAccessTokenResponse']
type CreateClassicTokenResponse = components['schemas']['CreateAccessTokenResponse']
type CreateTokenResponse = components['schemas']['CreateScopedAccessTokenResponse_Output']
type CreateClassicTokenResponse = components['schemas']['CreateAccessTokenResponse_Output']
const mockUseReducedMotion = vi.fn(() => false)
vi.mock('common', async (importOriginal) => {
@@ -17,7 +17,7 @@ import { customRender } from '@/tests/lib/custom-render'
import { addAPIMock } from '@/tests/lib/msw'
import { createMockProfileContext } from '@/tests/lib/profile-helpers'
type TokenResponse = components['schemas']['GetScopedAccessTokenResponse']
type TokenResponse = components['schemas']['GetScopedAccessTokenResponse_Output']
mockAnimationsApi()
@@ -1,7 +1,7 @@
import type { components } from 'api-types'
type ComputeInstanceAttributes =
components['schemas']['V2WorkerResponse_Output']['data']['attributes']
components['schemas']['V2ComputeInstanceResponse_Output']['data']['attributes']
export type ComputeInstanceBuildState = ComputeInstanceAttributes['build_state']
@@ -11,9 +11,10 @@ import { addAPIMock, type APIErrorBody } from '@/tests/lib/msw'
type ProjectDetailResponse = platformComponents['schemas']['ProjectDetailResponse_Output']
type OrganizationResponse = platformComponents['schemas']['OrganizationResponse_Output']
type ListGitHubConnectionsResponse = platformComponents['schemas']['ListGitHubConnectionsResponse']
type ListGitHubConnectionsResponse =
platformComponents['schemas']['ListGitHubConnectionsResponse_Output']
type GetGitHubConnectionConfigResponse =
platformComponents['schemas']['GetGitHubConnectionConfigResponse']
platformComponents['schemas']['GetGitHubConnectionConfigResponse_Output']
type BranchResponse = apiV1Components['schemas']['BranchResponse_Output']
type V2ProjectConfigResponse = apiV2Components['schemas']['V2ProjectConfigResponse_Output']
@@ -10,8 +10,8 @@ import { WarehouseTab } from './WarehouseTab'
import { customRender } from '@/tests/lib/custom-render'
import { addAPIMock, type APIErrorBody } from '@/tests/lib/msw'
type WarehouseSetupStatusResponse = components['schemas']['WarehouseSetupStatusResponse']
type WarehouseCatalogResponse = components['schemas']['WarehouseCatalogResponse']
type WarehouseSetupStatusResponse = components['schemas']['WarehouseSetupStatusResponse_Output']
type WarehouseCatalogResponse = components['schemas']['WarehouseCatalogResponse_Output']
type UpdateWarehouseCatalogBody = components['schemas']['UpdateWarehouseCatalogBody']
const FDW_STATUS: WarehouseSetupStatusResponse['fdw_status'] = {
@@ -16,7 +16,7 @@ import { addAPIMock } from '@/tests/lib/msw'
// The OAuth-apps query overrides its return type to `AuthorizedApp`, but the wire response (and so
// the MSW resolver) is the raw OpenAPI `OAuthAppResponse`. Build fixtures against the API shape.
type OAuthAppResponse = components['schemas']['OAuthAppResponse_Output']
type PartnerIntegrationListResponse = components['schemas']['PartnerIntegrationListResponse']
type PartnerIntegrationListResponse = components['schemas']['PartnerIntegrationListResponse_Output']
// Same story for permissions: the frontend `Permission` type narrows nullable wire fields, so build
// the fixture against the raw `AccessControlPermission` shape the MSW resolver actually returns.
type AccessControlPermission = components['schemas']['AccessControlPermission']
@@ -12,7 +12,7 @@ import { routerMock } from '@/tests/lib/route-mock'
// The OAuth-apps query overrides its return type to `AuthorizedApp`, but the wire response (and so
// the MSW resolver) is the raw OpenAPI `OAuthAppResponse`. Build fixtures against the API shape.
type OAuthAppResponse = components['schemas']['OAuthAppResponse_Output']
type PartnerIntegrationListResponse = components['schemas']['PartnerIntegrationListResponse']
type PartnerIntegrationListResponse = components['schemas']['PartnerIntegrationListResponse_Output']
const STABLE_PARAMS = { ref: 'default', id: 'grafana', pageId: 'overview' }
const STABLE_PROJECT = { data: { ref: 'default', connectionString: 'postgres://x' } }
@@ -11,7 +11,7 @@ import { WarehouseOverviewTab } from './OverviewTab'
import { customRender } from '@/tests/lib/custom-render'
import { addAPIMock, type APIErrorBody } from '@/tests/lib/msw'
type WarehouseSetupStatusResponse = components['schemas']['WarehouseSetupStatusResponse']
type WarehouseSetupStatusResponse = components['schemas']['WarehouseSetupStatusResponse_Output']
// Both integration shells are live, and the flag reads a context plus ConfigCat that
// `customRender` doesn't provide.
@@ -6,9 +6,9 @@ import { WAREHOUSE_METADATA_SCHEMA } from '@/lib/warehouse'
export type WarehouseSetupBody = components['schemas']['WarehouseSetupBody']
export type WarehouseSetupTarget = WarehouseSetupBody['targets'][number]
export type WarehouseSetupStatus =
components['schemas']['WarehouseSetupStatusResponse']['setup_status']
components['schemas']['WarehouseSetupStatusResponse_Output']['setup_status']
export type WarehouseSetupTable =
components['schemas']['WarehouseSetupStatusResponse']['tables'][number]
components['schemas']['WarehouseSetupStatusResponse_Output']['tables'][number]
export function isWarehouseProvisioned(setupStatus?: WarehouseSetupStatus): boolean {
return setupStatus === 'complete'
@@ -143,5 +143,5 @@ export function buildRetryTargets(
}
export type WarehouseCatalogCredentials = NonNullable<
components['schemas']['WarehouseCatalogResponse']['credentials']
components['schemas']['WarehouseCatalogResponse_Output']['credentials']
>
@@ -22,7 +22,7 @@ mockIntersectionObserver()
type ProjectDetailResponse = components['schemas']['ProjectDetailResponse_Output']
type OrganizationProjectsResponse = components['schemas']['OrganizationProjectsResponse_Output']
type OrganizationProjectsProject = OrganizationProjectsResponse['projects'][number]
type SendFeedbackResponse = components['schemas']['SendFeedbackResponse']
type SendFeedbackResponse = components['schemas']['SendFeedbackResponse_Output']
// Builders that return shapes matching the OpenAPI contract for endpoints
// the support form depends on. The test only exercises a few fields, but the
@@ -11,7 +11,7 @@ import { addAPIMock } from '@/tests/lib/msw'
type ProjectDetailResponse = components['schemas']['ProjectDetailResponse_Output']
type ProjectStatus = ProjectDetailResponse['status']
type DownloadableBackupsResponse = components['schemas']['DownloadableBackupsResponse']
type DownloadableBackupsResponse = components['schemas']['DownloadableBackupsResponse_Output']
const PROJECT_REF = 'default'
@@ -9,7 +9,7 @@ export type ValidateSpamVariables = {
projectRef: string
template: components['schemas']['ValidateSpamBody']
}
export type ValidateSpamResponse = components['schemas']['ValidateSpamResponse']
export type ValidateSpamResponse = components['schemas']['ValidateSpamResponse_Output']
export async function validateSpam({ projectRef, template }: ValidateSpamVariables) {
const { data, error } = await post('/platform/auth/{ref}/validate/spam', {
@@ -16,7 +16,7 @@ async function getComputeInstance(
if (!projectRef) throw new Error('projectRef is required')
if (!name) throw new Error('name is required')
const { data, error } = await get('/v2/projects/{ref}/workers/{name}', {
const { data, error } = await get('/v2/projects/{ref}/compute/{name}', {
params: { path: { ref: projectRef, name } },
signal,
})
+1 -1
View File
@@ -12,7 +12,7 @@ export type ComputeError = ResponseError
async function getComputeInstances({ projectRef }: ComputeVariables, signal?: AbortSignal) {
if (!projectRef) throw new Error('projectRef is required')
const { data, error } = await get('/v2/projects/{ref}/workers', {
const { data, error } = await get('/v2/projects/{ref}/compute', {
params: { path: { ref: projectRef } },
signal,
})
@@ -10,7 +10,7 @@ import {
const datum = (attributes: Record<string, unknown>) => ({
id: 'embed',
type: 'project_worker',
type: 'project_compute_instance',
attributes: {
build_state: 'active',
secret_generation: '1',
@@ -11,9 +11,10 @@ export type GitHubConfigVariables = {
branch?: string
}
type GithubConfigQueryResponse = components['schemas']['GetGitHubConnectionConfigResponse'] & {
config: z.infer<typeof gitHubConfigTomlSchema>
}
type GithubConfigQueryResponse =
components['schemas']['GetGitHubConnectionConfigResponse_Output'] & {
config: z.infer<typeof gitHubConfigTomlSchema>
}
export const githubConfigKeys = {
all: ['github-config'] as const,
@@ -11,7 +11,7 @@ export type BackupRestoreVariables = {
}
// [Joshen] Shift to backups RQ query once created
export type Backup = components['schemas']['BackupsResponse']['backups'][number]
export type Backup = components['schemas']['BackupsResponse_Output']['backups'][number]
export async function restoreFromBackup({ ref, backup }: BackupRestoreVariables) {
if (backup.isPhysicalBackup) {
+1 -1
View File
@@ -12,7 +12,7 @@ export type BackupsVariables = {
projectStatus?: string
}
export type DatabaseBackup = components['schemas']['BackupsResponse']['backups'][number]
export type DatabaseBackup = components['schemas']['BackupsResponse_Output']['backups'][number]
export async function getBackups({ projectRef }: BackupsVariables, signal?: AbortSignal) {
if (!projectRef) throw new Error('Project ref is required')
@@ -8,14 +8,15 @@ export type AiSupportStatus = 'bot_active' | 'escalated' | 'user_resolved' | 'bo
export type SyncConversationMessagesVariables =
components['schemas']['SyncConversationMessagesBody']
type SyncConversationMessagesResponse = components['schemas']['SyncConversationMessagesResponse']
type SyncConversationMessagesResponse =
components['schemas']['SyncConversationMessagesResponse_Output']
type EscalateConversationVariables = components['schemas']['EscalateConversationBody']
type ResolveConversationVariables = components['schemas']['ResolveConversationBody']
type UpdateConversationLifecycleResponse =
components['schemas']['UpdateConversationLifecycleResponse']
components['schemas']['UpdateConversationLifecycleResponse_Output']
/**
* Sync AI support chat messages to Front via the Platform API.
@@ -18,7 +18,7 @@ export type NotificationVariables = {
}
}
export type Notification = components['schemas']['NotificationResponse']
export type Notification = components['schemas']['NotificationResponse_Output']
/**
* Notification Data - This is not typed from the API end as it's meant to be open-ended
@@ -10,7 +10,7 @@ export type IntegrationVariables = {
}
export type IntegrationStatus =
components['schemas']['PartnerIntegrationListResponse']['integrations'][0]
components['schemas']['PartnerIntegrationListResponse_Output']['integrations'][0]
async function getIntegrations({ projectRef }: IntegrationVariables, signal?: AbortSignal) {
if (!projectRef) throw new Error('Project ref is required')
@@ -8,7 +8,7 @@ import { organizationKeys } from '@/data/organizations/keys'
import { permissionKeys } from '@/data/permissions/keys'
import type { ResponseError, UseCustomMutationOptions } from '@/types'
export type ProfileResponse = components['schemas']['ProfileResponse']
export type ProfileResponse = components['schemas']['ProfileResponse_Output']
export async function createProfile() {
const { data, error } = await post('/platform/profile')
+1 -1
View File
@@ -1,5 +1,5 @@
import type { components } from '@/data/api'
export type Profile = components['schemas']['ProfileResponse'] & {
export type Profile = components['schemas']['ProfileResponse_Output'] & {
profileImageUrl?: string
}
@@ -5,7 +5,7 @@ import { projectKeys } from './keys'
import { get, handleError } from '@/data/fetchers'
import type { ResponseError, UseCustomQueryOptions } from '@/types'
export type CloneStatus = components['schemas']['ProjectClonedStatusResponse']
export type CloneStatus = components['schemas']['ProjectClonedStatusResponse_Output']
export async function getCloneStatus(projectRef?: string) {
if (!projectRef) throw new Error('Project ref is required')
@@ -24,7 +24,7 @@ export async function createScopedAccessToken({
return data
}
export type NewScopedAccessToken = components['schemas']['CreateScopedAccessTokenResponse']
export type NewScopedAccessToken = components['schemas']['CreateScopedAccessTokenResponse_Output']
export const useScopedAccessTokenCreateMutation = ({
onSuccess,
@@ -30,7 +30,7 @@ export type ScopedAccessTokensData = Awaited<ReturnType<typeof getScopedAccessTo
export type ScopedAccessTokensError = ResponseError
export type ScopedAccessToken =
components['schemas']['GetScopedAccessTokensResponse']['tokens'][number]
components['schemas']['GetScopedAccessTokensResponse_Output']['tokens'][number]
export type ScopedAccessTokenData = Awaited<ReturnType<typeof getScopedAccessToken>>
@@ -9,7 +9,7 @@ export type SetupIntentVariables = {
hcaptchaToken: string
}
export type SetupIntentResponse = components['schemas']['SetupIntentResponse']
export type SetupIntentResponse = components['schemas']['SetupIntentResponse_Output']
export async function setupIntent({ hcaptchaToken }: SetupIntentVariables) {
const { data, error } = await post('/platform/stripe/setup-intent', {
@@ -5,7 +5,7 @@ import { warehouseKeys } from './keys'
import { get, handleError } from '@/data/fetchers'
import type { ResponseError, UseCustomQueryOptions } from '@/types'
export type WarehouseCatalogResponse = components['schemas']['WarehouseCatalogResponse']
export type WarehouseCatalogResponse = components['schemas']['WarehouseCatalogResponse_Output']
type WarehouseCatalogVariables = { projectRef?: string }
@@ -5,7 +5,8 @@ import { warehouseKeys } from './keys'
import { get, handleError } from '@/data/fetchers'
import type { ResponseError, UseCustomQueryOptions } from '@/types'
export type WarehouseSetupStatusResponse = components['schemas']['WarehouseSetupStatusResponse']
export type WarehouseSetupStatusResponse =
components['schemas']['WarehouseSetupStatusResponse_Output']
type WarehouseSetupStatusVariables = { projectRef?: string }
@@ -18,7 +18,7 @@ import { customRender } from '@/tests/lib/custom-render'
import { addAPIMock, type APIErrorBody } from '@/tests/lib/msw'
type OrganizationResponse = components['schemas']['OrganizationResponse_Output']
type GetOAuthAuthorizationResponse = components['schemas']['GetOAuthAuthorizationResponse']
type GetOAuthAuthorizationResponse = components['schemas']['GetOAuthAuthorizationResponse_Output']
type ApproveAuthorizationResponse = components['schemas']['ApproveAuthorizationResponse_Output']
type DeclineAuthorizationResponse = components['schemas']['DeclineAuthorizationResponse_Output']
@@ -11,8 +11,8 @@ import { customRender } from '@/tests/lib/custom-render'
import { addAPIMock, type APIErrorBody } from '@/tests/lib/msw'
import { routerMock } from '@/tests/lib/route-mock'
type ListWorkersResponse = components['schemas']['V2ListWorkersResponse_Output']
type WorkerDatum = ListWorkersResponse['data'][number]
type ListComputeInstancesResponse = components['schemas']['V2ListComputeInstancesResponse_Output']
type ComputeInstanceDatum = ListComputeInstancesResponse['data'][number]
// `tests/vitestSetup.ts` mocks `common`'s useParams to always answer with this ref, so the page
// reads it no matter what the router URL says.
@@ -20,10 +20,10 @@ const PROJECT_REF = 'default'
const computeInstanceDatum = (
id: string,
attributes: Partial<WorkerDatum['attributes']> = {}
): WorkerDatum => ({
attributes: Partial<ComputeInstanceDatum['attributes']> = {}
): ComputeInstanceDatum => ({
id,
type: 'project_worker' as const,
type: 'project_compute_instance' as const,
attributes: {
build_state: 'active' as const,
secret_generation: '1',
@@ -32,13 +32,13 @@ const computeInstanceDatum = (
},
})
const mockComputeInstancesList = (instances: WorkerDatum[]) =>
addAPIMock({ method: 'get', path: '/v2/projects/:ref/workers', response: { data: instances } })
const mockComputeInstancesList = (instances: ComputeInstanceDatum[]) =>
addAPIMock({ method: 'get', path: '/v2/projects/:ref/compute', response: { data: instances } })
const mockComputeInstancesListFailure = (status: number) =>
addAPIMock({
method: 'get',
path: '/v2/projects/:ref/workers',
path: '/v2/projects/:ref/compute',
response: () => HttpResponse.json<APIErrorBody>({ message: 'Denied' }, { status }),
})
@@ -125,13 +125,15 @@ describe('/project/[ref]/compute', () => {
let requestCount = 0
addAPIMock({
method: 'get',
path: '/v2/projects/:ref/workers',
response: (): HttpResponse<APIErrorBody> | HttpResponse<ListWorkersResponse> => {
path: '/v2/projects/:ref/compute',
response: (): HttpResponse<APIErrorBody> | HttpResponse<ListComputeInstancesResponse> => {
if (requestCount++ === 0) {
return HttpResponse.json<APIErrorBody>({ message: 'Unavailable' }, { status: 500 })
}
return HttpResponse.json<ListWorkersResponse>({ data: [computeInstanceDatum('embed')] })
return HttpResponse.json<ListComputeInstancesResponse>({
data: [computeInstanceDatum('embed')],
})
},
})
+209 -40
View File
@@ -40,8 +40,10 @@ export interface paths {
cookie?: never
}
/**
* [Beta] Diffs a database branch
* Diffs a database branch
* @description Diffs the specified database branch
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-diff-a-branch']
put?: never
@@ -139,7 +141,12 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Authorize user through oauth */
/**
* Authorize user through oauth
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-authorize-user']
put?: never
post?: never
@@ -178,7 +185,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Revoke oauth app authorization and it's corresponding tokens */
/**
* Revoke oauth app authorization and it's corresponding tokens
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-revoke-token']
delete?: never
options?: never
@@ -196,8 +208,10 @@ export interface paths {
get?: never
put?: never
/**
* [Beta] Exchange auth code for user's access and refresh token
* Exchange auth code for user's access and refresh token
* @description Supports `authorization_code`, `refresh_token`, and `urn:ietf:params:oauth:grant-type:jwt-bearer` grant types. The `jwt-bearer` grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-exchange-oauth-token']
delete?: never
@@ -471,7 +485,6 @@ export interface paths {
}
/**
* Gets project performance advisors.
* @deprecated
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*/
get: operations['v1-get-performance-advisors']
@@ -492,7 +505,6 @@ export interface paths {
}
/**
* Gets project security advisors.
* @deprecated
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*/
get: operations['v1-get-security-advisors']
@@ -807,9 +819,19 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Create a login role for CLI with temporary password */
/**
* Create a login role for CLI with temporary password
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-create-login-role']
/** [Beta] Delete existing login roles used by CLI */
/**
* Delete existing login roles used by CLI
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
delete: operations['v1-delete-login-roles']
options?: never
head?: never
@@ -1127,11 +1149,21 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Gets project's custom hostname config */
/**
* Gets project's custom hostname config
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-hostname-config']
put?: never
post?: never
/** [Beta] Deletes a project's custom hostname configuration */
/**
* Deletes a project's custom hostname configuration
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
delete: operations['v1-Delete hostname config']
options?: never
head?: never
@@ -1147,7 +1179,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Activates a custom hostname for a project. */
/**
* Activates a custom hostname for a project.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-activate-custom-hostname']
delete?: never
options?: never
@@ -1164,7 +1201,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Updates project's custom hostname configuration */
/**
* Updates project's custom hostname configuration
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-update-hostname-config']
delete?: never
options?: never
@@ -1181,7 +1223,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Attempts to verify the DNS configuration for project's custom hostname configuration */
/**
* Attempts to verify the DNS configuration for project's custom hostname configuration
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-verify-dns-config']
delete?: never
options?: never
@@ -1305,7 +1352,6 @@ export interface paths {
}
/**
* Gets database metadata for the given project.
* @deprecated
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*/
get: operations['v1-get-database-metadata']
@@ -1529,7 +1575,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Run sql query */
/**
* Run sql query
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-run-a-query']
delete?: never
options?: never
@@ -1547,8 +1598,10 @@ export interface paths {
get?: never
put?: never
/**
* [Beta] Run a sql query as supabase_read_only_user
* Run a sql query as supabase_read_only_user
* @description All entity references must be schema qualified.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-read-only-query']
delete?: never
@@ -1566,7 +1619,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Enables Database Webhooks on the project */
/**
* Enables Database Webhooks on the project
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-enable-database-webhook']
delete?: never
options?: never
@@ -1695,9 +1753,19 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Get project's temporary access configuration. */
/**
* Get project's temporary access configuration.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-jit-access-config']
/** [Beta] Update project's temporary access configuration. */
/**
* Update project's temporary access configuration.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
put: operations['v1-update-jit-access-config']
post?: never
delete?: never
@@ -1716,7 +1784,12 @@ export interface paths {
get?: never
put?: never
post?: never
/** [Beta] Remove network bans. */
/**
* Remove network bans.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
delete: operations['v1-delete-network-bans']
options?: never
head?: never
@@ -1732,7 +1805,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Gets project's network bans */
/**
* Gets project's network bans
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-list-all-network-bans']
delete?: never
options?: never
@@ -1749,7 +1827,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Gets project's network bans with additional information about which databases they affect */
/**
* Gets project's network bans with additional information about which databases they affect
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-list-all-network-bans-enriched']
delete?: never
options?: never
@@ -1764,14 +1847,24 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Gets project's network restrictions */
/**
* Gets project's network restrictions
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-network-restrictions']
put?: never
post?: never
delete?: never
options?: never
head?: never
/** [Alpha] Updates project's network restrictions by adding or removing CIDRs */
/**
* Updates project's network restrictions by adding or removing CIDRs
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Alpha** stage.
*/
patch: operations['v1-patch-network-restrictions']
trace?: never
}
@@ -1784,7 +1877,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Updates project's network restrictions */
/**
* Updates project's network restrictions
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-update-network-restrictions']
delete?: never
options?: never
@@ -1816,9 +1914,19 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Gets project's pgsodium config */
/**
* Gets project's pgsodium config
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-pgsodium-config']
/** [Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible. */
/**
* Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
put: operations['v1-update-pgsodium-config']
post?: never
delete?: never
@@ -1854,7 +1962,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Remove a read replica */
/**
* Remove a read replica
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-remove-a-read-replica']
delete?: never
options?: never
@@ -1871,7 +1984,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Set up a read replica */
/**
* Set up a read replica
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-setup-a-read-replica']
delete?: never
options?: never
@@ -2000,9 +2118,19 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Get project's SSL enforcement configuration. */
/**
* Get project's SSL enforcement configuration.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-ssl-enforcement-config']
/** [Beta] Update project's SSL enforcement configuration. */
/**
* Update project's SSL enforcement configuration.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
put: operations['v1-update-ssl-enforcement-config']
post?: never
delete?: never
@@ -2057,7 +2185,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Upgrades the project's Postgres version */
/**
* Upgrades the project's Postgres version
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-upgrade-postgres-version']
delete?: never
options?: never
@@ -2072,7 +2205,12 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Returns the project's eligibility for upgrades */
/**
* Returns the project's eligibility for upgrades
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-postgres-upgrade-eligibility']
put?: never
post?: never
@@ -2089,7 +2227,12 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Gets the latest status of the project's upgrade */
/**
* Gets the latest status of the project's upgrade
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-postgres-upgrade-status']
put?: never
post?: never
@@ -2106,11 +2249,21 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Gets current vanity subdomain config */
/**
* Gets current vanity subdomain config
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-vanity-subdomain-config']
put?: never
post?: never
/** [Beta] Deletes a project's vanity subdomain configuration */
/**
* Deletes a project's vanity subdomain configuration
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
delete: operations['v1-deactivate-vanity-subdomain-config']
options?: never
head?: never
@@ -2126,7 +2279,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Activates a vanity subdomain for a project. */
/**
* Activates a vanity subdomain for a project.
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-activate-vanity-subdomain-config']
delete?: never
options?: never
@@ -2143,7 +2301,12 @@ export interface paths {
}
get?: never
put?: never
/** [Beta] Checks vanity subdomain availability */
/**
* Checks vanity subdomain availability
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
post: operations['v1-check-vanity-subdomain-availability']
delete?: never
options?: never
@@ -2158,7 +2321,12 @@ export interface paths {
path?: never
cookie?: never
}
/** [Beta] Gets the list of available regions that can be used for a new project */
/**
* Gets the list of available regions that can be used for a new project
* @description This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
*
* This endpoint is currently in its **Beta** stage.
*/
get: operations['v1-get-available-regions']
put?: never
post?: never
@@ -3326,8 +3494,9 @@ export interface components {
}[]
}
JitAuthorizeAccessResponse_Output: {
act?: string
/** Format: uuid */
user_id: string
user_id?: string
user_role: {
allowed_networks?: {
allowed_cidrs?: {
+450 -438
View File
@@ -362,6 +362,100 @@ export interface paths {
patch?: never
trace?: never
}
'/v2/projects/{ref}/compute': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* List all compute instances
* @description Returns all compute instances you've previously deployed to the specified project.
*
* This endpoint is currently in its **Alpha** stage.
*/
get: operations['v2-list-all-compute-instances']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/v2/projects/{ref}/compute/{name}': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* Retrieve a compute instance
* @description Returns a compute instance along with the counts of its running instances. Poll this after a deploy until `build_state` leaves `building`.
*
* This endpoint is currently in its **Alpha** stage.
*/
get: operations['v2-get-a-compute-instance']
put?: never
post?: never
/**
* Delete a compute instance
* @description Tombstones the compute instance. Its running instances and image are torn down asynchronously.
*
* This endpoint is currently in its **Alpha** stage.
*/
delete: operations['v2-delete-a-compute-instance']
options?: never
head?: never
patch?: never
trace?: never
}
'/v2/projects/{ref}/compute/{name}/deploy': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get?: never
put?: never
/**
* Deploy a compute instance
* @description Creates the compute instance if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the compute instance reaches `build_state` `active` or `failed` later.
*
* This endpoint is currently in its **Alpha** stage.
*/
post: operations['v2-deploy-a-compute-instance']
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/v2/projects/{ref}/compute/{name}/uploads': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get?: never
put?: never
/**
* Mint a presigned slot for a build-context upload
* @description PUT the `.tar.gz` build context to the returned `url` before `expires_at`, then deploy with the upload id as `context_upload_id`. The bytes go straight to storage — no management API request carries them.
*
* This endpoint is currently in its **Alpha** stage.
*/
post: operations['v2-create-compute-instance-upload']
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/v2/projects/{ref}/config': {
parameters: {
query?: never
@@ -370,8 +464,10 @@ export interface paths {
cookie?: never
}
/**
* [Alpha] Get a project's service configuration
* Get a project's service configuration
* @description Returns the project's database, pooler, Auth, Data API, Realtime and Storage configuration — the same configuration a branch inherits from its base project. Each is the effective config, so a setting the project has never overridden is reported at its platform default rather than as null. Auth secrets are returned as an HMAC of their value. `storage` is read live from the storage service; the rest come from this platform's own records.
*
* This endpoint is currently in its **Alpha** stage.
*/
get: operations['v2-get-project-config']
put?: never
@@ -630,90 +726,6 @@ export interface paths {
patch?: never
trace?: never
}
'/v2/projects/{ref}/workers': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* [Alpha] List all workers
* @description Returns all workers you've previously deployed to the specified project.
*/
get: operations['v2-list-all-workers']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/v2/projects/{ref}/workers/{name}': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* [Alpha] Retrieve a worker
* @description Returns a worker along with its instance tally. Poll this after a deploy until `build_state` leaves `building`.
*/
get: operations['v2-get-a-worker']
put?: never
post?: never
/**
* [Alpha] Delete a worker
* @description Tombstones the worker. Its instances and image are torn down asynchronously.
*/
delete: operations['v2-delete-a-worker']
options?: never
head?: never
patch?: never
trace?: never
}
'/v2/projects/{ref}/workers/{name}/deploy': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get?: never
put?: never
/**
* [Alpha] Deploy a worker
* @description Creates the worker if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the worker reaches `build_state` `active` or `failed` later.
*/
post: operations['v2-deploy-a-worker']
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/v2/projects/{ref}/workers/{name}/uploads': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get?: never
put?: never
/**
* [Alpha] Mint a presigned slot for a build-context upload
* @description PUT the `.tar.gz` build context to the returned `url` before `expires_at`, then deploy with the upload id as `context_upload_id`. The bytes go straight to storage — no management API request carries them.
*/
post: operations['v2-create-worker-upload']
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
}
export type webhooks = Record<string, never>
export interface components {
@@ -1231,6 +1243,67 @@ export interface components {
type: 'branch'
}
}
V2ComputeInstanceResponse_Output: {
data: {
attributes: {
/** @enum {string} */
build_state: 'building' | 'active' | 'failed'
deleting?: boolean
image_version?: string
instances?: {
declared: number
live: number
ready: number
stale: number
}
instances_error?: string
secret_generation: string
spec: {
/** @example public */
exposure: string
/** @example 1 */
instances: number
/** @example node */
runtime?: string
/** @example 2gb-1vcpu */
size: string
}
state_reason?: string
}
/**
* @description Compute instance name.
* @example hello-world
*/
id: string
/**
* @description Resource type.
* @enum {string}
*/
type: 'project_compute_instance'
}
}
V2ComputeInstanceUploadResponse_Output: {
data: {
attributes: {
/** @description When the slot stops accepting the upload. */
expires_at: string
/** @example PUT */
method: string
/** @description Presigned destination for the `.tar.gz` build context. */
url: string
}
/**
* @description Upload id to pass to the deploy endpoint as `context_upload_id`.
* @example cafe0000000000000000000000000000
*/
id: string
/**
* @description Resource type.
* @enum {string}
*/
type: 'project_compute_instance_upload'
}
}
V2CreateBranchRequest: {
data: {
attributes: {
@@ -1437,7 +1510,7 @@ export interface components {
type: 'organization_invitation'
}[]
}
V2DeployWorkerRequest: {
V2DeployComputeInstanceRequest: {
data: {
attributes: {
/** @description Id of a build context staged through the uploads endpoint. Required unless `runtime` is set. */
@@ -1457,9 +1530,48 @@ export interface components {
* @description Resource type.
* @enum {string}
*/
type: 'project_worker'
type: 'project_compute_instance'
}
}
V2ListComputeInstancesResponse_Output: {
data: {
attributes: {
/** @enum {string} */
build_state: 'building' | 'active' | 'failed'
deleting?: boolean
image_version?: string
instances?: {
declared: number
live: number
ready: number
stale: number
}
instances_error?: string
secret_generation: string
spec: {
/** @example public */
exposure: string
/** @example 1 */
instances: number
/** @example node */
runtime?: string
/** @example 2gb-1vcpu */
size: string
}
state_reason?: string
}
/**
* @description Compute instance name.
* @example hello-world
*/
id: string
/**
* @description Resource type.
* @enum {string}
*/
type: 'project_compute_instance'
}[]
}
V2ListGitHubConnectionsResponse_Output: {
data: {
attributes: {
@@ -1779,45 +1891,6 @@ export interface components {
type: 'organization_role'
}[]
}
V2ListWorkersResponse_Output: {
data: {
attributes: {
/** @enum {string} */
build_state: 'building' | 'active' | 'failed'
deleting?: boolean
image_version?: string
instances?: {
declared: number
live: number
ready: number
stale: number
}
instances_error?: string
secret_generation: string
spec: {
/** @example public */
exposure: string
/** @example 1 */
instances: number
/** @example node */
runtime?: string
/** @example 2gb-1vcpu */
size: string
}
state_reason?: string
}
/**
* @description Worker name.
* @example hello-world
*/
id: string
/**
* @description Resource type.
* @enum {string}
*/
type: 'project_worker'
}[]
}
V2PreviewProjectTransferResponse_Output: {
data: {
attributes: {
@@ -2209,67 +2282,6 @@ export interface components {
type: 'project_transfer_input'
}
}
V2WorkerResponse_Output: {
data: {
attributes: {
/** @enum {string} */
build_state: 'building' | 'active' | 'failed'
deleting?: boolean
image_version?: string
instances?: {
declared: number
live: number
ready: number
stale: number
}
instances_error?: string
secret_generation: string
spec: {
/** @example public */
exposure: string
/** @example 1 */
instances: number
/** @example node */
runtime?: string
/** @example 2gb-1vcpu */
size: string
}
state_reason?: string
}
/**
* @description Worker name.
* @example hello-world
*/
id: string
/**
* @description Resource type.
* @enum {string}
*/
type: 'project_worker'
}
}
V2WorkerUploadResponse_Output: {
data: {
attributes: {
/** @description When the slot stops accepting the upload. */
expires_at: string
/** @example PUT */
method: string
/** @description Presigned destination for the `.tar.gz` build context. */
url: string
}
/**
* @description Upload id to pass to the deploy endpoint as `context_upload_id`.
* @example cafe0000000000000000000000000000
*/
id: string
/**
* @description Resource type.
* @enum {string}
*/
type: 'project_worker_upload'
}
}
}
responses: never
parameters: never
@@ -7321,6 +7333,257 @@ export interface operations {
}
}
}
'v2-list-all-compute-instances': {
parameters: {
query?: never
header?: never
path: {
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2ListComputeInstancesResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-get-a-compute-instance': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2ComputeInstanceResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-delete-a-compute-instance': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
204: {
headers: {
[name: string]: unknown
}
content?: never
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-deploy-a-compute-instance': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody: {
content: {
'application/json': components['schemas']['V2DeployComputeInstanceRequest']
}
}
responses: {
202: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2ComputeInstanceResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-create-compute-instance-upload': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
201: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2ComputeInstanceUploadResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-get-project-config': {
parameters: {
query?: never
@@ -11943,255 +12206,4 @@ export interface operations {
}
}
}
'v2-list-all-workers': {
parameters: {
query?: never
header?: never
path: {
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2ListWorkersResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-get-a-worker': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2WorkerResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-delete-a-worker': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
204: {
headers: {
[name: string]: unknown
}
content?: never
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-deploy-a-worker': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody: {
content: {
'application/json': components['schemas']['V2DeployWorkerRequest']
}
}
responses: {
202: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2WorkerResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
'v2-create-worker-upload': {
parameters: {
query?: never
header?: never
path: {
name: string
/** @description Project ref */
ref: string
}
cookie?: never
}
requestBody?: never
responses: {
201: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['V2WorkerUploadResponse_Output']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Forbidden action */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
/** @description Rate limit exceeded */
429: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponseBody']
}
}
}
}
}
+367 -147
View File
File diff suppressed because it is too large. Load diff
+4 -2
View File
@@ -4,9 +4,11 @@ import enabledFeaturesRaw from './enabled-features.json' with { type: 'json' }
const enabledFeaturesStaticObj = enabledFeaturesRaw as Omit<typeof enabledFeaturesRaw, '$schema'>
type Profile = components['schemas']['ProfileResponse']
type Profile = components['schemas']['ProfileResponse_Output']
export type Feature = Profile['disabled_features'][number] | keyof typeof enabledFeaturesStaticObj
export type Feature =
| NonNullable<Profile['disabled_features']>[number]
| keyof typeof enabledFeaturesStaticObj
const disabledFeaturesStaticArray = Object.entries(enabledFeaturesStaticObj)
.filter(([_, value]) => !value)
+2 -1
View File
@@ -12,7 +12,8 @@ import { ensurePlatformSuffix } from './helpers'
import { useParams } from './hooks'
type TrackFeatureFlagVariables = components['schemas']['TelemetryFeatureFlagBody']
export type CallFeatureFlagsResponse = components['schemas']['TelemetryCallFeatureFlagsResponse']
export type CallFeatureFlagsResponse =
components['schemas']['TelemetryCallFeatureFlagsResponse_Output']
export async function getFeatureFlags(
API_URL: string,