Skip to content

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

chore: Regenerate API types and fix all issues (#49646)

Ivan Vasilov26e89b36c349
diff --git a/apps/studio/components/interfaces/ConfigDrift/ConfigurationDriftPage.test.tsx b/apps/studio/components/interfaces/ConfigDrift/ConfigurationDriftPage.test.tsx
index 138b20a8d7c..7fd9669319e 100644
--- a/apps/studio/components/interfaces/ConfigDrift/ConfigurationDriftPage.test.tsx
+++ b/apps/studio/components/interfaces/ConfigDrift/ConfigurationDriftPage.test.tsx
@@ -15,7 +15,7 @@ type ListGitHubConnectionsResponse = platformComponents['schemas']['ListGitHubCo
type GetGitHubConnectionConfigResponse =
platformComponents['schemas']['GetGitHubConnectionConfigResponse']
type BranchResponse = apiV1Components['schemas']['BranchResponse']
-type V2ProjectConfigResponse = apiV2Components['schemas']['V2ProjectConfigResponse']
+type V2ProjectConfigResponse = apiV2Components['schemas']['V2ProjectConfigResponse_Output']
const PROJECT_REF = 'default'
const ORGANIZATION_ID = 1
diff --git a/apps/studio/components/interfaces/Workers/Workers.types.ts b/apps/studio/components/interfaces/Workers/Workers.types.ts
index 16fa531860a..629f5d34df5 100644
--- a/apps/studio/components/interfaces/Workers/Workers.types.ts
+++ b/apps/studio/components/interfaces/Workers/Workers.types.ts
@@ -1,6 +1,6 @@
import type { components } from 'api-types'
-type WorkerAttributes = components['schemas']['V2WorkerResponse']['data']['attributes']
+type WorkerAttributes = components['schemas']['V2WorkerResponse_Output']['data']['attributes']
export type WorkerBuildState = WorkerAttributes['build_state']
diff --git a/apps/studio/data/api.d.ts b/apps/studio/data/api.d.ts
index f544d32d35f..aaf4b26af7d 100644
--- a/apps/studio/data/api.d.ts
+++ b/apps/studio/data/api.d.ts
@@ -1,4 +1,5 @@
/**
* Avoid importing this file and import the types directly from api-types
+ * @deprecated import from 'api-types' instead
*/
export type * from 'api-types'
diff --git a/apps/studio/data/organizations/organization-mappers.test.ts b/apps/studio/data/organizations/organization-mappers.test.ts
index 39afb494e18..6b334622c68 100644
--- a/apps/studio/data/organizations/organization-mappers.test.ts
+++ b/apps/studio/data/organizations/organization-mappers.test.ts
@@ -21,6 +21,7 @@ const baseOrganizationResponse = {
organization_missing_tax_id: false,
organization_requires_mfa: false,
plan: { id: 'pro' as const, name: 'Pro' },
+ requires_indirect_tax_declaration: false,
restriction_data: null,
restriction_status: null,
slug: 'toolshed',
@@ -38,6 +39,7 @@ const baseOrganizationSlugResponse = {
name: 'Toolshed',
opt_in_tags: [] as string[],
plan: { id: 'pro' as const, name: 'Pro' },
+ requires_indirect_tax_declaration: false,
restriction_data: null,
restriction_status: null,
slug: 'toolshed',
diff --git a/apps/studio/data/sso/sso-config-create-mutation.ts b/apps/studio/data/sso/sso-config-create-mutation.ts
index 4ef7331c7dc..37063eae464 100644
--- a/apps/studio/data/sso/sso-config-create-mutation.ts
+++ b/apps/studio/data/sso/sso-config-create-mutation.ts
@@ -1,14 +1,17 @@
import { useMutation, useQueryClient } from '@tanstack/react-query'
+import type { operations } from 'api-types'
import { toast } from 'sonner'
import { orgSSOKeys } from './keys'
-import type { components } from '@/data/api'
import { handleError, post } from '@/data/fetchers'
import type { ResponseError, UseCustomMutationOptions } from '@/types'
+type CreateSSOProviderBody =
+ operations['SSOProvidersController_createSSOProvider']['requestBody']['content']['application/json']
+
export type SSOConfigCreateVariables = {
slug: string
- config: components['schemas']['CreateSSOProviderBody']
+ config: CreateSSOProviderBody
}
export async function createSSOConfig({ slug, config }: SSOConfigCreateVariables) {
diff --git a/apps/studio/data/sso/sso-config-update-mutation.ts b/apps/studio/data/sso/sso-config-update-mutation.ts
index 8244875a30e..85ec4ad0675 100644
--- a/apps/studio/data/sso/sso-config-update-mutation.ts
+++ b/apps/studio/data/sso/sso-config-update-mutation.ts
@@ -1,20 +1,23 @@
import { useMutation, useQueryClient } from '@tanstack/react-query'
+import type { operations } from 'api-types'
import { toast } from 'sonner'
import { orgSSOKeys } from './keys'
-import type { components } from '@/data/api'
import { handleError, put } from '@/data/fetchers'
import type { ResponseError, UseCustomMutationOptions } from '@/types'
+type UpdateSSOProviderBody =
+ operations['SSOProvidersController_updateSSOProvider']['requestBody']['content']['application/json']
+
export type SSOConfigUpdateVariables = {
slug: string
- config: Partial<components['schemas']['UpdateSSOProviderBody']>
+ config: Partial<UpdateSSOProviderBody>
}
export async function updateSSOConfig({ slug, config }: SSOConfigUpdateVariables) {
const { data, error } = await put('/platform/organizations/{slug}/sso', {
params: { path: { slug } },
- body: config as components['schemas']['UpdateSSOProviderBody'],
+ body: config as UpdateSSOProviderBody,
})
if (error) handleError(error)
diff --git a/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsx b/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsx
index 1ab2641ffae..a934d3ced55 100644
--- a/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsx
+++ b/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsx
@@ -1,6 +1,6 @@
import { fireEvent, screen, waitFor } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
-import { platformComponents as components } from 'api-types'
+import { platformComponents as components, operations } from 'api-types'
import { HttpResponse } from 'msw'
import { beforeEach, describe, expect, test, vi } from 'vitest'
@@ -15,7 +15,8 @@ type Member = components['schemas']['Member']
type InvitationResponse = components['schemas']['InvitationResponse']
type OrganizationRoleResponse = components['schemas']['OrganizationRoleResponse']
type ListEntitlementsResponse = components['schemas']['ListEntitlementsResponse']
-type CreateInvitationResponse = components['schemas']['CreateInvitationResponse']
+type CreateInvitationResponse =
+ operations['InvitationsController_createInvitation']['responses']['201']['content']['application/json']
type AccessControlPermission = components['schemas']['AccessControlPermission']
const ORG_SLUG = 'test-org'
diff --git a/apps/studio/tests/helpers.tsx b/apps/studio/tests/helpers.tsx
index 1cfb3d419ca..3a8a0dcae4c 100644
--- a/apps/studio/tests/helpers.tsx
+++ b/apps/studio/tests/helpers.tsx
@@ -65,6 +65,7 @@ export const createMockOrganization = (details: Partial<Organization>): Organiza
organization_requires_mfa: false,
opt_in_tags: [],
restriction_status: null,
+ requires_indirect_tax_declaration: false,
restriction_data: null,
organization_missing_address: false,
organization_missing_tax_id: false,
@@ -99,6 +100,7 @@ export const createMockOrganizationResponse = (
organization_requires_mfa: false,
opt_in_tags: [],
restriction_status: null,
+ requires_indirect_tax_declaration: false,
restriction_data: null,
organization_missing_address: false,
organization_missing_tax_id: false,
diff --git a/apps/studio/tests/lib/sql-editor-test-utils.tsx b/apps/studio/tests/lib/sql-editor-test-utils.tsx
index d2e30d49bab..22d0180eebc 100644
--- a/apps/studio/tests/lib/sql-editor-test-utils.tsx
+++ b/apps/studio/tests/lib/sql-editor-test-utils.tsx
@@ -228,6 +228,7 @@ export function setupSqlEditorMocks({
organization_missing_tax_id: false,
organization_requires_mfa: false,
plan: { id: 'free', name: 'Free' },
+ requires_indirect_tax_declaration: false,
restriction_data: null,
restriction_status: null,
stripe_customer_id: null,
diff --git a/apps/studio/tests/pages/project/[ref]/workers/index.test.tsx b/apps/studio/tests/pages/project/[ref]/workers/index.test.tsx
index 44bd63aae07..a30ff8ba80b 100644
--- a/apps/studio/tests/pages/project/[ref]/workers/index.test.tsx
+++ b/apps/studio/tests/pages/project/[ref]/workers/index.test.tsx
@@ -11,7 +11,7 @@ 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']
+type ListWorkersResponse = components['schemas']['V2ListWorkersResponse_Output']
type WorkerDatum = ListWorkersResponse['data'][number]
// `tests/vitestSetup.ts` mocks `common`'s useParams to always answer with this ref, so the page
diff --git a/packages/api-types/types/api-v1.d.ts b/packages/api-types/types/api-v1.d.ts
index 3cceab3eefa..b7d26dcb49d 100644
--- a/packages/api-types/types/api-v1.d.ts
+++ b/packages/api-types/types/api-v1.d.ts
@@ -5398,9 +5398,9 @@ export interface components {
username: string
}
V1ProjectAdvisorsResponse: {
- lints: {
+ lints: ({
cache_key: string
- categories: ('PERFORMANCE' | 'SECURITY')[]
+ categories: ('PERFORMANCE' | 'SECURITY' | 'HEALTH')[]
description: string
detail: string
/** @enum {string} */
@@ -5414,7 +5414,18 @@ export interface components {
name?: string
schema?: string
/** @enum {string} */
- type?: 'table' | 'view' | 'auth' | 'function' | 'extension' | 'compliance'
+ type?:
+ | 'table'
+ | 'view'
+ | 'materialized view'
+ | 'foreign table'
+ | 'auth'
+ | 'function'
+ | 'extension'
+ | 'compliance'
+ | 'health'
+ } & {
+ [key: string]: unknown
}
/** @enum {string} */
name:
@@ -5438,6 +5449,7 @@ export interface components {
| 'auth_otp_long_expiry'
| 'auth_otp_short_length'
| 'ssl_not_enforced'
+ | 'log_connections_not_enabled'
| 'network_restrictions_not_set'
| 'password_requirements_min_length'
| 'pitr_not_enabled'
@@ -5447,9 +5459,22 @@ export interface components {
| 'leaked_service_key'
| 'no_backup_admin'
| 'vulnerable_postgres_version'
+ | 'db_not_reachable'
+ | 'db_connection_failing'
+ | 'db_connection_limit_reached'
+ | 'instance_telemetry_lost'
+ | 'instance_db_down'
+ | 'instance_alert_firing'
+ | 'log_service_error_rate_high'
+ | 'project_not_active'
+ | 'advisor_check_unavailable'
+ /** Format: date-time */
+ observed_at?: string
remediation: string
title: string
- }[]
+ } & {
+ [key: string]: unknown
+ })[]
}
V1ProjectRefResponse: {
id: number
diff --git a/packages/api-types/types/api-v2.d.ts b/packages/api-types/types/api-v2.d.ts
index f616718eeef..7fc9ee5023c 100644
--- a/packages/api-types/types/api-v2.d.ts
+++ b/packages/api-types/types/api-v2.d.ts
@@ -316,6 +316,23 @@ export interface paths {
patch?: never
trace?: never
}
+ '/v2/projects/{ref}/advisors/run': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** Runs the project advisors with the given names */
+ post: operations['v2-run-project-advisors']
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/v2/projects/{ref}/analytics/log-drains': {
parameters: {
query?: never
@@ -748,14 +765,6 @@ export interface components {
| 'otlp'
| 'syslog'
config:
- | {
- hostname?: string
- password?: string | null
- port?: number | null
- schema?: string
- url?: string | null
- username?: string | null
- }
| {
gzip?: boolean
headers?: {
@@ -765,10 +774,6 @@ export interface components {
http?: 'http1' | 'http2'
url?: string
}
- | {
- dataset_id?: string
- project_id?: string
- }
| {
api_key?: string
region?: string
@@ -800,8 +805,33 @@ export interface components {
/** @default false */
tls?: boolean
}
+ | {
+ access_key_id?: string
+ batch_timeout?: number
+ s3_bucket?: string
+ secret_access_key?: string
+ storage_region?: string
+ }
+ | {
+ password?: string
+ region?: string
+ username?: string
+ }
+ | {
+ endpoint?: string
+ /** @default true */
+ gzip?: boolean
+ /** @default {} */
+ headers?: {
+ [key: string]: string
+ }
+ /** @default http/protobuf */
+ protocol?: string
+ }
description?: string
name: string
+ } & {
+ [key: string]: unknown
}
/**
* @description Resource type.
@@ -835,7 +865,7 @@ export interface components {
[key: string]: unknown
}
}
- ListLogDrainsResponse: {
+ ListLogDrainsResponse_Output: {
data: {
attributes: {
/** @enum {string} */
@@ -853,14 +883,6 @@ export interface components {
| 'otlp'
| 'syslog'
config:
- | {
- hostname?: string
- password?: string | null
- port?: number | null
- schema?: string
- url?: string | null
- username?: string | null
- }
| {
gzip?: boolean
headers?: {
@@ -870,10 +892,6 @@ export interface components {
http?: 'http1' | 'http2'
url?: string
}
- | {
- dataset_id?: string
- project_id?: string
- }
| {
api_key?: string
region?: string
@@ -905,6 +923,29 @@ export interface components {
/** @default false */
tls?: boolean
}
+ | {
+ access_key_id?: string
+ batch_timeout?: number
+ s3_bucket?: string
+ secret_access_key?: string
+ storage_region?: string
+ }
+ | {
+ password?: string
+ region?: string
+ username?: string
+ }
+ | {
+ endpoint?: string
+ /** @default true */
+ gzip?: boolean
+ /** @default {} */
+ headers?: {
+ [key: string]: string
+ }
+ /** @default http/protobuf */
+ protocol?: string
+ }
description?: string
name: string
}
@@ -916,7 +957,7 @@ export interface components {
type: 'log_drain'
}[]
}
- LogDrainResponse: {
+ LogDrainResponse_Output: {
data: {
attributes: {
/** @enum {string} */
@@ -934,14 +975,6 @@ export interface components {
| 'otlp'
| 'syslog'
config:
- | {
- hostname?: string
- password?: string | null
- port?: number | null
- schema?: string
- url?: string | null
- username?: string | null
- }
| {
gzip?: boolean
headers?: {
@@ -951,10 +984,6 @@ export interface components {
http?: 'http1' | 'http2'
url?: string
}
- | {
- dataset_id?: string
- project_id?: string
- }
| {
api_key?: string
region?: string
@@ -986,6 +1015,29 @@ export interface components {
/** @default false */
tls?: boolean
}
+ | {
+ access_key_id?: string
+ batch_timeout?: number
+ s3_bucket?: string
+ secret_access_key?: string
+ storage_region?: string
+ }
+ | {
+ password?: string
+ region?: string
+ username?: string
+ }
+ | {
+ endpoint?: string
+ /** @default true */
+ gzip?: boolean
+ /** @default {} */
+ headers?: {
+ [key: string]: string
+ }
+ /** @default http/protobuf */
+ protocol?: string
+ }
description?: string
name: string
}
@@ -997,7 +1049,7 @@ export interface components {
type: 'log_drain'
}
}
- OrganizationMemberRoleResponse: {
+ OrganizationMemberRoleResponse_Output: {
data: {
attributes: {
/**
@@ -1041,14 +1093,6 @@ export interface components {
| 'otlp'
| 'syslog'
config?:
- | {
- hostname?: string
- password?: string | null
- port?: number | null
- schema?: string
- url?: string | null
- username?: string | null
- }
| {
gzip?: boolean
headers?: {
@@ -1058,10 +1102,6 @@ export interface components {
http?: 'http1' | 'http2'
url?: string
}
- | {
- dataset_id?: string
- project_id?: string
- }
| {
api_key?: string
region?: string
@@ -1093,8 +1133,33 @@ export interface components {
/** @default false */
tls?: boolean
}
+ | {
+ access_key_id?: string
+ batch_timeout?: number
+ s3_bucket?: string
+ secret_access_key?: string
+ storage_region?: string
+ }
+ | {
+ password?: string
+ region?: string
+ username?: string
+ }
+ | {
+ endpoint?: string
+ /** @default true */
+ gzip?: boolean
+ /** @default {} */
+ headers?: {
+ [key: string]: string
+ }
+ /** @default http/protobuf */
+ protocol?: string
+ }
description?: string
name?: string
+ } & {
+ [key: string]: unknown
}
/**
* @description Resource type.
@@ -1160,7 +1225,7 @@ export interface components {
type: 'organization_invitation'
}[]
}
- V2CreateInvitationsResponse: {
+ V2CreateInvitationsResponse_Output: {
data: {
attributes: {
/**
@@ -1258,7 +1323,7 @@ export interface components {
type: 'organization_invitation'
}[]
}
- V2DeleteInvitationsResponse: {
+ V2DeleteInvitationsResponse_Output: {
data: {
attributes: {
/**
@@ -1298,7 +1363,7 @@ export interface components {
type: 'project_worker'
}
}
- V2ListGitHubConnectionsResponse: {
+ V2ListGitHubConnectionsResponse_Output: {
data: {
attributes: {
/** @description Maximum number of preview branches */
@@ -1371,7 +1436,7 @@ export interface components {
prev: string | null
}
}
- V2ListMembersResponse: {
+ V2ListMembersResponse_Output: {
data: {
attributes: {
/** @description Member's avatar URL */
@@ -1434,7 +1499,7 @@ export interface components {
prev: string | null
}
}
- V2ListPrivateLinkAssociationsResponse: {
+ V2ListPrivateLinkAssociationsResponse_Output: {
data: {
attributes: {
/** @description Human-readable name for the AWS account. */
@@ -1486,7 +1551,7 @@ export interface components {
type: 'private_link_association'
}[]
}
- V2ListProjectsResponse: {
+ V2ListProjectsResponse_Output: {
data: {
attributes: {
/** @description Cloud provider hosting the project */
@@ -1601,7 +1666,7 @@ export interface components {
prev: string | null
}
}
- V2ListRolesResponse: {
+ V2ListRolesResponse_Output: {
data: {
attributes: {
/**
@@ -1617,7 +1682,7 @@ export interface components {
type: 'organization_role'
}[]
}
- V2ListWorkersResponse: {
+ V2ListWorkersResponse_Output: {
data: {
attributes: {
/** @enum {string} */
@@ -1656,7 +1721,7 @@ export interface components {
type: 'project_worker'
}[]
}
- V2PreviewProjectTransferResponse: {
+ V2PreviewProjectTransferResponse_Output: {
data: {
attributes: {
errors: {
@@ -1680,7 +1745,7 @@ export interface components {
type: 'project_transfer_result'
}
}
- V2PrivateLinkAssociationResponse: {
+ V2PrivateLinkAssociationResponse_Output: {
data: {
attributes: {
/** @description Human-readable name for the AWS account. */
@@ -1732,7 +1797,91 @@ export interface components {
type: 'private_link_association'
}
}
- V2ProjectConfigResponse: {
+ V2ProjectAdvisorsResponse_Output: {
+ data: {
+ attributes: {
+ lints: {
+ cache_key: string
+ categories: ('PERFORMANCE' | 'SECURITY' | 'HEALTH')[]
+ description: string
+ detail: string
+ /** @enum {string} */
+ facing: 'EXTERNAL'
+ /** @enum {string} */
+ level: 'ERROR' | 'WARN' | 'INFO'
+ metadata?: {
+ entity?: string
+ fkey_columns?: number[]
+ fkey_name?: string
+ name?: string
+ schema?: string
+ /** @enum {string} */
+ type?:
+ | 'table'
+ | 'view'
+ | 'materialized view'
+ | 'foreign table'
+ | 'auth'
+ | 'function'
+ | 'extension'
+ | 'compliance'
+ | 'health'
+ }
+ /** @enum {string} */
+ name:
+ | 'unindexed_foreign_keys'
+ | 'auth_users_exposed'
+ | 'auth_rls_initplan'
+ | 'no_primary_key'
+ | 'unused_index'
+ | 'multiple_permissive_policies'
+ | 'policy_exists_rls_disabled'
+ | 'rls_enabled_no_policy'
+ | 'duplicate_index'
+ | 'security_definer_view'
+ | 'function_search_path_mutable'
+ | 'rls_disabled_in_public'
+ | 'extension_in_public'
+ | 'rls_references_user_metadata'
+ | 'materialized_view_in_api'
+ | 'foreign_table_in_api'
+ | 'unsupported_reg_types'
+ | 'auth_otp_long_expiry'
+ | 'auth_otp_short_length'
+ | 'ssl_not_enforced'
+ | 'log_connections_not_enabled'
+ | 'network_restrictions_not_set'
+ | 'password_requirements_min_length'
+ | 'pitr_not_enabled'
+ | 'auth_leaked_password_protection'
+ | 'auth_insufficient_mfa_options'
+ | 'auth_password_policy_missing'
+ | 'leaked_service_key'
+ | 'no_backup_admin'
+ | 'vulnerable_postgres_version'
+ | 'db_not_reachable'
+ | 'db_connection_failing'
+ | 'db_connection_limit_reached'
+ | 'instance_telemetry_lost'
+ | 'instance_db_down'
+ | 'instance_alert_firing'
+ | 'log_service_error_rate_high'
+ | 'project_not_active'
+ | 'advisor_check_unavailable'
+ /** Format: date-time */
+ observed_at?: string
+ remediation: string
+ title: string
+ }[]
+ }
+ /**
+ * @description Resource type.
+ * @enum {string}
+ */
+ type: 'project_advisors'
+ }
+ }
+ V2ProjectConfigResponse_Output: {
data: {
attributes: {
api: {
@@ -1891,6 +2040,60 @@ export interface components {
type: 'project_config'
}
}
+ V2RunProjectAdvisorsBody: {
+ data: {
+ attributes: {
+ lints: {
+ /** @enum {string} */
+ name:
+ | 'unindexed_foreign_keys'
+ | 'auth_users_exposed'
+ | 'auth_rls_initplan'
+ | 'no_primary_key'
+ | 'unused_index'
+ | 'multiple_permissive_policies'
+ | 'policy_exists_rls_disabled'
+ | 'rls_enabled_no_policy'
+ | 'duplicate_index'
+ | 'security_definer_view'
+ | 'function_search_path_mutable'
+ | 'rls_disabled_in_public'
+ | 'extension_in_public'
+ | 'rls_references_user_metadata'
+ | 'materialized_view_in_api'
+ | 'foreign_table_in_api'
+ | 'unsupported_reg_types'
+ | 'auth_otp_long_expiry'
+ | 'auth_otp_short_length'
+ | 'ssl_not_enforced'
+ | 'log_connections_not_enabled'
+ | 'network_restrictions_not_set'
+ | 'password_requirements_min_length'
+ | 'pitr_not_enabled'
+ | 'auth_leaked_password_protection'
+ | 'auth_insufficient_mfa_options'
+ | 'auth_password_policy_missing'
+ | 'leaked_service_key'
+ | 'no_backup_admin'
+ | 'vulnerable_postgres_version'
+ | 'db_not_reachable'
+ | 'db_connection_failing'
+ | 'db_connection_limit_reached'
+ | 'instance_telemetry_lost'
+ | 'instance_db_down'
+ | 'instance_alert_firing'
+ | 'log_service_error_rate_high'
+ }[]
+ }
+ /**
+ * @description Resource type.
+ * @enum {string}
+ */
+ type: 'project_advisors'
+ } & {
+ [key: string]: unknown
+ }
+ }
V2TransferProjectBody: {
data: {
attributes: {
@@ -1903,7 +2106,7 @@ export interface components {
type: 'project_transfer_input'
}
}
- V2WorkerResponse: {
+ V2WorkerResponse_Output: {
data: {
attributes: {
/** @enum {string} */
@@ -1942,7 +2145,7 @@ export interface components {
type: 'project_worker'
}
}
- V2WorkerUploadResponse: {
+ V2WorkerUploadResponse_Output: {
data: {
attributes: {
/** @description When the slot stops accepting the upload. */
@@ -2330,7 +2533,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2ListGitHubConnectionsResponse']
+ 'application/json': components['schemas']['V2ListGitHubConnectionsResponse_Output']
}
}
/** @description Unauthorized */
@@ -2392,7 +2595,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2ListMembersResponse']
+ 'application/json': components['schemas']['V2ListMembersResponse_Output']
}
}
/** @description Unauthorized */
@@ -2446,7 +2649,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['OrganizationMemberRoleResponse']
+ 'application/json': components['schemas']['OrganizationMemberRoleResponse_Output']
}
}
/** @description Unauthorized */
@@ -2517,7 +2720,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2CreateInvitationsResponse']
+ 'application/json': components['schemas']['V2CreateInvitationsResponse_Output']
}
}
/** @description Unauthorized */
@@ -2579,7 +2782,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2DeleteInvitationsResponse']
+ 'application/json': components['schemas']['V2DeleteInvitationsResponse_Output']
}
}
/** @description Unauthorized */
@@ -2647,7 +2850,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2ListProjectsResponse']
+ 'application/json': components['schemas']['V2ListProjectsResponse_Output']
}
}
/** @description Unauthorized */
@@ -2696,7 +2899,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2ListRolesResponse']
+ 'application/json': components['schemas']['V2ListRolesResponse_Output']
}
}
/** @description Unauthorized */
@@ -2765,8 +2968,6 @@ export interface operations {
*/
organization_slug: string
project_ref: string | null
- } & {
- [key: string]: unknown
}
/**
* Format: date-time
@@ -6952,6 +7153,59 @@ export interface operations {
}
}
}
+ 'v2-run-project-advisors': {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['V2RunProjectAdvisorsBody']
+ }
+ }
+ responses: {
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['V2ProjectAdvisorsResponse_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-list-log-drains': {
parameters: {
query?: never
@@ -6969,7 +7223,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['ListLogDrainsResponse']
+ 'application/json': components['schemas']['ListLogDrainsResponse_Output']
}
}
/** @description Unauthorized */
@@ -7031,7 +7285,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['LogDrainResponse']
+ 'application/json': components['schemas']['LogDrainResponse_Output']
}
}
/** @description Unauthorized */
@@ -7104,7 +7358,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['LogDrainResponse']
+ 'application/json': components['schemas']['LogDrainResponse_Output']
}
}
/** @description Unauthorized */
@@ -7220,7 +7474,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2ProjectConfigResponse']
+ 'application/json': components['schemas']['V2ProjectConfigResponse_Output']
}
}
/** @description Unauthorized */
@@ -7269,7 +7523,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2ListPrivateLinkAssociationsResponse']
+ 'application/json': components['schemas']['V2ListPrivateLinkAssociationsResponse_Output']
}
}
/** @description Unauthorized */
@@ -7331,7 +7585,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2PrivateLinkAssociationResponse']
+ 'application/json': components['schemas']['V2PrivateLinkAssociationResponse_Output']
}
}
/** @description Unauthorized */
@@ -7571,7 +7825,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2PreviewProjectTransferResponse']
+ 'application/json': components['schemas']['V2PreviewProjectTransferResponse_Output']
}
}
/** @description Unauthorized */
@@ -7640,8 +7894,6 @@ export interface operations {
*/
organization_slug: string
project_ref: string | null
- } & {
- [key: string]: unknown
}
/**
* Format: date-time
@@ -11844,7 +12096,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2ListWorkersResponse']
+ 'application/json': components['schemas']['V2ListWorkersResponse_Output']
}
}
/** @description Unauthorized */
@@ -11894,7 +12146,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2WorkerResponse']
+ 'application/json': components['schemas']['V2WorkerResponse_Output']
}
}
/** @description Unauthorized */
@@ -11996,7 +12248,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2WorkerResponse']
+ 'application/json': components['schemas']['V2WorkerResponse_Output']
}
}
/** @description Unauthorized */
@@ -12046,7 +12298,7 @@ export interface operations {
[name: string]: unknown
}
content: {
- 'application/json': components['schemas']['V2WorkerUploadResponse']
+ 'application/json': components['schemas']['V2WorkerUploadResponse_Output']
}
}
/** @description Unauthorized */
diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts
index 8f1706571cb..6baf4030898 100644
--- a/packages/api-types/types/platform.d.ts
+++ b/packages/api-types/types/platform.d.ts
@@ -5286,6 +5286,8 @@ export interface components {
dry_run?: boolean
/** Format: email */
email?: string
+ /** @enum {string} */
+ indirect_tax_registration_declaration?: 'yes' | 'no'
tax_id?: {
country: string
type: string
@@ -5477,14 +5479,6 @@ export interface components {
}
CreateBackendParamsOpenapi: {
config:
- | {
- hostname?: string
- password?: string | null
- port?: number | null
- schema?: string
- url?: string | null
- username?: string | null
- }
| {
gzip?: boolean
headers?: {
@@ -5494,10 +5488,6 @@ export interface components {
http?: 'http1' | 'http2'
url?: string
}
- | {
- dataset_id?: string
- project_id?: string
- }
| {
api_key?: string
region?: string
@@ -5529,6 +5519,29 @@ export interface components {
/** @default false */
tls?: boolean
}
+ | {
+ access_key_id?: string
+ batch_timeout?: number
+ s3_bucket?: string
+ secret_access_key?: string
+ storage_region?: string
+ }
+ | {
+ password?: string
+ region?: string
+ username?: string
+ }
+ | {
+ endpoint?: string
+ /** @default true */
+ gzip?: boolean
+ /** @default {} */
+ headers?: {
+ [key: string]: string
+ }
+ /** @default http/protobuf */
+ protocol?: string
+ }
description?: string
name: string
/** @enum {string} */
@@ -5636,14 +5649,6 @@ export interface components {
role_id?: number
role_scoped_projects?: string[]
}
- CreateInvitationResponse: {
- failed: {
- /** Format: email */
- email: string
- error: string
- }[]
- succeeded: string[]
- } | null
CreateNamespaceBody: {
namespace: string
}
@@ -7317,40 +7322,6 @@ export interface components {
/** @description Source ID */
id: number
}
- CreateSSOProviderBody:
- | {
- /** @default [] */
- domains?: string[]
- email_mapping: string[]
- enabled: boolean
- first_name_mapping?: string[]
- /** Format: uri */
- idjag_issuer_url?: string | null
- join_org_on_signup_enabled: boolean
- /** @enum {string} */
- join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
- last_name_mapping?: string[]
- metadata_xml_file: string
- /** Format: uri */
- metadata_xml_url?: string
- user_name_mapping?: string[]
- }
- | {
- /** @default [] */
- domains?: string[]
- email_mapping: string[]
- enabled: boolean
- first_name_mapping?: string[]
- /** Format: uri */
- idjag_issuer_url?: string | null
- join_org_on_signup_enabled: boolean
- /** @enum {string} */
- join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
- last_name_mapping?: string[]
- metadata_xml_file?: string
- metadata_xml_url: string
- user_name_mapping?: string[]
- }
CreateStorageAnalyticsBucketBody: {
bucketName: string
}
@@ -7955,9 +7926,9 @@ export interface components {
| 'DELETING'
}[]
}
- GetProjectLintsResponse: {
+ GetProjectLintsResponse: ({
cache_key: string
- categories: ('PERFORMANCE' | 'SECURITY')[]
+ categories: ('PERFORMANCE' | 'SECURITY' | 'HEALTH')[]
description: string
detail: string
/** @enum {string} */
@@ -7971,7 +7942,18 @@ export interface components {
name?: string
schema?: string
/** @enum {string} */
- type?: 'table' | 'view' | 'auth' | 'function' | 'extension' | 'compliance'
+ type?:
+ | 'table'
+ | 'view'
+ | 'materialized view'
+ | 'foreign table'
+ | 'auth'
+ | 'function'
+ | 'extension'
+ | 'compliance'
+ | 'health'
+ } & {
+ [key: string]: unknown
}
/** @enum {string} */
name:
@@ -7995,6 +7977,7 @@ export interface components {
| 'auth_otp_long_expiry'
| 'auth_otp_short_length'
| 'ssl_not_enforced'
+ | 'log_connections_not_enabled'
| 'network_restrictions_not_set'
| 'password_requirements_min_length'
| 'pitr_not_enabled'
@@ -8004,9 +7987,22 @@ export interface components {
| 'leaked_service_key'
| 'no_backup_admin'
| 'vulnerable_postgres_version'
+ | 'db_not_reachable'
+ | 'db_connection_failing'
+ | 'db_connection_limit_reached'
+ | 'instance_telemetry_lost'
+ | 'instance_db_down'
+ | 'instance_alert_firing'
+ | 'log_service_error_rate_high'
+ | 'project_not_active'
+ | 'advisor_check_unavailable'
+ /** Format: date-time */
+ observed_at?: string
remediation: string
title: string
- }[]
+ } & {
+ [key: string]: unknown
+ })[]
GetProjectLogsBody: {
iso_timestamp_end?: string
iso_timestamp_start?: string
@@ -8693,14 +8689,6 @@ export interface components {
}
LFBackend: {
config:
- | {
- hostname?: string
- password?: string | null
- port?: number | null
- schema?: string
- url?: string | null
- username?: string | null
- }
| {
gzip?: boolean
headers?: {
@@ -8710,10 +8698,6 @@ export interface components {
http?: 'http1' | 'http2'
url?: string
}
- | {
- dataset_id?: string
- project_id?: string
- }
| {
api_key?: string
region?: string
@@ -8745,6 +8729,29 @@ export interface components {
/** @default false */
tls?: boolean
}
+ | {
+ access_key_id?: string
+ batch_timeout?: number
+ s3_bucket?: string
+ secret_access_key?: string
+ storage_region?: string
+ }
+ | {
+ password?: string
+ region?: string
+ username?: string
+ }
+ | {
+ endpoint?: string
+ /** @default true */
+ gzip?: boolean
+ /** @default {} */
+ headers?: {
+ [key: string]: string
+ }
+ /** @default http/protobuf */
+ protocol?: string
+ }
description?: string
readonly id: number
readonly metadata: {
@@ -9279,6 +9286,7 @@ export interface components {
id: 'free' | 'pro' | 'team' | 'enterprise' | 'platform'
name: string
}
+ requires_indirect_tax_declaration: boolean
restriction_data: {
[key: string]: string
} | null
@@ -12301,14 +12309,6 @@ export interface components {
}
UpdateBackendParamsOpenapi: {
config?:
- | {
- hostname?: string
- password?: string | null
- port?: number | null
- schema?: string
- url?: string | null
- username?: string | null
- }
| {
gzip?: boolean
headers?: {
@@ -12318,10 +12318,6 @@ export interface components {
http?: 'http1' | 'http2'
url?: string
}
- | {
- dataset_id?: string
- project_id?: string
- }
| {
api_key?: string
region?: string
@@ -12353,6 +12349,29 @@ export interface components {
/** @default false */
tls?: boolean
}
+ | {
+ access_key_id?: string
+ batch_timeout?: number
+ s3_bucket?: string
+ secret_access_key?: string
+ storage_region?: string
+ }
+ | {
+ password?: string
+ region?: string
+ username?: string
+ }
+ | {
+ endpoint?: string
+ /** @default true */
+ gzip?: boolean
+ /** @default {} */
+ headers?: {
+ [key: string]: string
+ }
+ /** @default http/protobuf */
+ protocol?: string
+ }
description?: string
name?: string
/** @enum {string} */
@@ -13965,40 +13984,6 @@ export interface components {
UpdateSecretsResponse: {
message: string
}
- UpdateSSOProviderBody:
- | {
- /** @default [] */
- domains?: string[]
- email_mapping: string[]
- enabled: boolean
- first_name_mapping?: string[]
- /** Format: uri */
- idjag_issuer_url?: string | null
- join_org_on_signup_enabled: boolean
- /** @enum {string} */
- join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
- last_name_mapping?: string[]
- metadata_xml_file: string
- /** Format: uri */
- metadata_xml_url?: string
- user_name_mapping?: string[]
- }
- | {
- /** @default [] */
- domains?: string[]
- email_mapping: string[]
- enabled: boolean
- first_name_mapping?: string[]
- /** Format: uri */
- idjag_issuer_url?: string | null
- join_org_on_signup_enabled: boolean
- /** @enum {string} */
- join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
- last_name_mapping?: string[]
- metadata_xml_file?: string
- metadata_xml_url: string
- user_name_mapping?: string[]
- }
UpdateStorageBucketBody: {
allowed_mime_types?: string[] | null
file_size_limit?: number | null
@@ -18078,6 +18063,7 @@ export interface operations {
id: 'free' | 'pro' | 'team' | 'enterprise' | 'platform'
name: string
}
+ requires_indirect_tax_declaration: boolean
restriction_data: {
[key: string]: string
} | null
@@ -21951,7 +21937,38 @@ export interface operations {
}
requestBody: {
content: {
- 'application/json': components['schemas']['UpdateSSOProviderBody']
+ 'application/json':
+ | {
+ /** @default [] */
+ domains: string[]
+ email_mapping: string[]
+ enabled: boolean
+ first_name_mapping?: string[]
+ idjag_issuer_url?: string | null
+ join_org_on_signup_enabled: boolean
+ /** @enum {string} */
+ join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
+ last_name_mapping?: string[]
+ metadata_xml_file: string
+ /** Format: uri */
+ metadata_xml_url?: string
+ user_name_mapping?: string[]
+ }
+ | {
+ /** @default [] */
+ domains: string[]
+ email_mapping: string[]
+ enabled: boolean
+ first_name_mapping?: string[]
+ idjag_issuer_url?: string | null
+ join_org_on_signup_enabled: boolean
+ /** @enum {string} */
+ join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
+ last_name_mapping?: string[]
+ metadata_xml_file?: string
+ metadata_xml_url: string
+ user_name_mapping?: string[]
+ }
}
}
responses: {
@@ -22029,7 +22046,38 @@ export interface operations {
}
requestBody: {
content: {
- 'application/json': components['schemas']['CreateSSOProviderBody']
+ 'application/json':
+ | {
+ /** @default [] */
+ domains: string[]
+ email_mapping: string[]
+ enabled: boolean
+ first_name_mapping?: string[]
+ idjag_issuer_url?: string | null
+ join_org_on_signup_enabled: boolean
+ /** @enum {string} */
+ join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
+ last_name_mapping?: string[]
+ metadata_xml_file: string
+ /** Format: uri */
+ metadata_xml_url?: string
+ user_name_mapping?: string[]
+ }
+ | {
+ /** @default [] */
+ domains: string[]
+ email_mapping: string[]
+ enabled: boolean
+ first_name_mapping?: string[]
+ idjag_issuer_url?: string | null
+ join_org_on_signup_enabled: boolean
+ /** @enum {string} */
+ join_org_on_signup_role?: 'Administrator' | 'Developer' | 'Owner' | 'Read-only'
+ last_name_mapping?: string[]
+ metadata_xml_file?: string
+ metadata_xml_url: string
+ user_name_mapping?: string[]
+ }
}
}
responses: {
@@ -22373,6 +22421,7 @@ export interface operations {
id: 'free' | 'pro' | 'team' | 'enterprise' | 'platform'
name: string
}
+ requires_indirect_tax_declaration: boolean
restriction_data: {
[key: string]: string
} | null
diff --git a/packages/common/telemetry-constants.ts b/packages/common/telemetry-constants.ts
index a25642186f1..bafb97da937 100644
--- a/packages/common/telemetry-constants.ts
+++ b/packages/common/telemetry-constants.ts
@@ -10,6 +10,7 @@
*
* @module telemetry-frontend
*/
+import type { components } from 'api-types'
export type TelemetryGroups = {
project: string
@@ -2921,7 +2922,8 @@ export interface AuditLogDrainRemovedEvent {
groups: Omit<TelemetryGroups, 'project'>
}
-type AdvisorCategory = 'PERFORMANCE' | 'SECURITY'
+type AdvisorCategory =
+ components['schemas']['GetProjectLintsResponse'][number]['categories'][number]
type AdvisorLevel = 'ERROR' | 'WARN' | 'INFO'
/**