diff --git a/apps/design-system/README.md b/apps/design-system/README.md index c4033664f80d3..47f009cebeab7 100644 --- a/apps/design-system/README.md +++ b/apps/design-system/README.md @@ -20,6 +20,16 @@ You can start editing the page by modifying `app/page.tsx`. The page auto-update This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +### Watching for MDX changes + +If you would like to watch for changes to MDX files with hot reload, you can run the following command in a separate Terminal shell: + +``` +pnpm content:dev +``` + +This runs Contentlayer concurrently and watches for any changes. + ## Learn More To learn more about Next.js, take a look at the following resources: diff --git a/apps/design-system/package.json b/apps/design-system/package.json index 7a262a1a1a0fd..e6acd2763ef0b 100644 --- a/apps/design-system/package.json +++ b/apps/design-system/package.json @@ -10,6 +10,7 @@ "build:registry": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-registry.mts && prettier --log-level silent --write \"registry/**/*.{ts,tsx,mdx}\" --cache", "start": "next start", "lint": "next lint", + "content:dev": "contentlayer2 dev", "content:build": "contentlayer2 build", "clean": "rimraf node_modules .next .turbo", "typecheck": "contentlayer2 build && tsc --noEmit -p tsconfig.json" diff --git a/apps/docs/content/guides/getting-started/quickstarts/reactjs.mdx b/apps/docs/content/guides/getting-started/quickstarts/reactjs.mdx index af74baf522eb5..1e15500c1518c 100644 --- a/apps/docs/content/guides/getting-started/quickstarts/reactjs.mdx +++ b/apps/docs/content/guides/getting-started/quickstarts/reactjs.mdx @@ -78,7 +78,7 @@ hideToc: true - In `App.jsx`, add a `getInstruments` function to fetch the data and display the query result to the page using a Supabase client. + Replace the contents of `App.jsx` to add a `getInstruments` function to fetch the data and display the query result to the page using a Supabase client. @@ -120,7 +120,7 @@ hideToc: true - Start the app, go to http://localhost:5173 in a browser, and open the browser console and you should see the list of instruments. + Run the development server, go to http://localhost:5173 in a browser and you should see the list of instruments. diff --git a/apps/docs/content/guides/platform/credits.mdx b/apps/docs/content/guides/platform/credits.mdx index 625cfc8bd79f2..b7d765b0230da 100644 --- a/apps/docs/content/guides/platform/credits.mdx +++ b/apps/docs/content/guides/platform/credits.mdx @@ -35,7 +35,7 @@ You may want to consider this option to avoid issues with recurring payments, ga -If you are interested in larger (> ,000) credit packages, [reach out](https://supabase.com/dashboard/support/new?subject=I%20would%20like%20to%20inquire%20about%20larger%20credit%20packages&category=Sales). +If you are interested in larger (> ) credit packages, [reach out](https://supabase.com/dashboard/support/new?subject=I%20would%20like%20to%20inquire%20about%20larger%20credit%20packages&category=Sales). diff --git a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx index 6a0595903cbe9..91414881c7f6e 100644 --- a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx +++ b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx @@ -9,6 +9,7 @@ import { useDatabaseExtensionEnableMutation } from 'data/database-extensions/dat import { useSchemasQuery } from 'data/database/schemas-query' import { executeSql } from 'data/sql/execute-sql-query' import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { useProtectedSchemas } from 'hooks/useProtectedSchemas' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, @@ -43,6 +44,7 @@ const EnableExtensionModal = ({ visible, extension, onCancel }: EnableExtensionM }, { enabled: visible } ) + const { data: protectedSchemas } = useProtectedSchemas({ excludeSchemas: ['extensions'] }) const { mutate: enableExtension, isLoading: isEnabling } = useDatabaseExtensionEnableMutation({ onSuccess: () => { toast.success(`Extension "${extension.name}" is now enabled`) @@ -180,19 +182,26 @@ const EnableExtensionModal = ({ visible, extension, onCancel }: EnableExtensionM Create a new schema "{extension.name}" - {schemas?.map((schema) => { - return ( - } - > - {schema.name} - + {schemas + ?.filter( + (schema) => + !protectedSchemas.some( + (protectedSchema) => protectedSchema.name === schema.name + ) ) - })} + .map((schema) => { + return ( + } + > + {schema.name} + + ) + })} )} diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.tsx index c9e2c7480591f..9eee2b101057a 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.tsx @@ -109,9 +109,8 @@ const SpreadsheetImport = ({ const [file] = event.target.files || event.dataTransfer.files if (file && !flagInvalidFileImport(file)) { await processFile(file) - } else { - event.target.value = '' } + event.target.value = '' }, [processFile] ) diff --git a/apps/studio/components/ui/Charts/StackedBarChart.tsx b/apps/studio/components/ui/Charts/StackedBarChart.tsx index ac12386f3b29a..4d362d9b25d92 100644 --- a/apps/studio/components/ui/Charts/StackedBarChart.tsx +++ b/apps/studio/components/ui/Charts/StackedBarChart.tsx @@ -80,7 +80,17 @@ const StackedBarChart: React.FC = ({ const resolvedHighlightedValue = focusDataIndex !== null ? data[focusDataIndex]?.[yAxisKey] : highlightedValue - if (!data || data.length === 0) return + if (!data || data.length === 0) { + return ( + + ) + } + const stackColorScales = genStackColorScales(stackColors) return (
diff --git a/apps/studio/data/analytics/functions-combined-stats-query.ts b/apps/studio/data/analytics/functions-combined-stats-query.ts new file mode 100644 index 0000000000000..edb4c095162a3 --- /dev/null +++ b/apps/studio/data/analytics/functions-combined-stats-query.ts @@ -0,0 +1,70 @@ +import { useQuery, UseQueryOptions } from '@tanstack/react-query' +import { operations } from 'api-types' +import { get, handleError } from 'data/fetchers' +import { analyticsKeys } from './keys' + +export type FunctionsCombinedStatsVariables = { + projectRef?: string + functionId?: string + interval?: operations['FunctionsLogsController_getCombinedStats']['parameters']['query']['interval'] +} + +export type FunctionsCombinedStatsResponse = any + +export async function getFunctionsCombinedStats( + { projectRef, functionId, interval }: FunctionsCombinedStatsVariables, + signal?: AbortSignal +) { + if (!projectRef) { + throw new Error('projectRef is required') + } + if (!functionId) { + throw new Error('functionId is required') + } + if (!interval) { + throw new Error('interval is required') + } + + const { data, error } = await get( + '/platform/projects/{ref}/analytics/endpoints/functions.combined-stats', + { + params: { + path: { + ref: projectRef, + }, + query: { + function_id: functionId, + interval, + }, + }, + signal, + } + ) + + if (error) handleError(error) + + return data +} + +export type FunctionsCombinedStatsData = Awaited> +export type FunctionsCombinedStatsError = unknown + +export const useFunctionsCombinedStatsQuery = ( + { projectRef, functionId, interval }: FunctionsCombinedStatsVariables, + { + enabled = true, + ...options + }: UseQueryOptions = {} +) => + useQuery( + analyticsKeys.functionsCombinedStats(projectRef, { functionId, interval }), + ({ signal }) => getFunctionsCombinedStats({ projectRef, functionId, interval }, signal), + { + enabled: + enabled && + typeof projectRef !== 'undefined' && + typeof functionId !== 'undefined' && + typeof interval !== 'undefined', + ...options, + } + ) diff --git a/apps/studio/data/analytics/keys.ts b/apps/studio/data/analytics/keys.ts index fa77be8e2c4c1..17e8d7ce14cb6 100644 --- a/apps/studio/data/analytics/keys.ts +++ b/apps/studio/data/analytics/keys.ts @@ -1,5 +1,24 @@ export const analyticsKeys = { // logs/reports endpoints + functionsCombinedStats: ( + projectRef: string | undefined, + { + interval, + functionId, + }: { + functionId: string | undefined + interval: string | undefined + } + ) => + [ + 'projects', + projectRef, + 'functions-combined-stats', + { + interval, + functionId, + }, + ] as const, functionsInvStats: ( projectRef: string | undefined, { diff --git a/apps/studio/pages/project/[ref]/functions/[functionSlug]/index.tsx b/apps/studio/pages/project/[ref]/functions/[functionSlug]/index.tsx index dc375da34561c..dc9cd65fb22f2 100644 --- a/apps/studio/pages/project/[ref]/functions/[functionSlug]/index.tsx +++ b/apps/studio/pages/project/[ref]/functions/[functionSlug]/index.tsx @@ -1,6 +1,7 @@ import { PermissionAction } from '@supabase/shared-types/out/constants' import { useParams } from 'common' import dayjs, { Dayjs } from 'dayjs' +import maxBy from 'lodash/maxBy' import meanBy from 'lodash/meanBy' import sumBy from 'lodash/sumBy' import { useRouter } from 'next/router' @@ -13,13 +14,9 @@ import AreaChart from 'components/ui/Charts/AreaChart' import StackedBarChart from 'components/ui/Charts/StackedBarChart' import NoPermission from 'components/ui/NoPermission' import { - FunctionsReqStatsVariables, - useFunctionsReqStatsQuery, -} from 'data/analytics/functions-req-stats-query' -import { - FunctionsResourceUsageVariables, - useFunctionsResourceUsageQuery, -} from 'data/analytics/functions-resource-usage-query' + FunctionsCombinedStatsVariables, + useFunctionsCombinedStatsQuery, +} from 'data/analytics/functions-combined-stats-query' import { useEdgeFunctionQuery } from 'data/edge-functions/edge-function-query' import { useFillTimeseriesSorted } from 'hooks/analytics/useFillTimeseriesSorted' import { useAsyncCheckProjectPermissions } from 'hooks/misc/useCheckPermissions' @@ -31,6 +28,7 @@ import { Button, WarningIcon, } from 'ui' +import { useFlag } from 'common' const CHART_INTERVALS: ChartIntervals[] = [ { @@ -47,6 +45,13 @@ const CHART_INTERVALS: ChartIntervals[] = [ startUnit: 'hour', format: 'MMM D, h:mma', }, + { + key: '3hr', + label: '3 hours', + startValue: 3, + startUnit: 'hour', + format: 'MMM D, h:mma', + }, { key: '1day', label: '1 day', @@ -54,18 +59,12 @@ const CHART_INTERVALS: ChartIntervals[] = [ startUnit: 'hour', format: 'MMM D, h:mma', }, - // { - // key: '7day', - // label: '7 days', - // startValue: 7, - // startUnit: 'day', - // format: 'MMM D', - // }, ] const PageLayout: NextPageWithLayout = () => { const router = useRouter() const { ref: projectRef, functionSlug } = useParams() + const newChartsEnabled = useFlag('newEdgeFunctionOverviewCharts') const [interval, setInterval] = useState('15min') const selectedInterval = CHART_INTERVALS.find((i) => i.key === interval) || CHART_INTERVALS[1] const { data: selectedFunction } = useEdgeFunctionQuery({ @@ -73,26 +72,16 @@ const PageLayout: NextPageWithLayout = () => { slug: functionSlug, }) const id = selectedFunction?.id - const reqStatsResult = useFunctionsReqStatsQuery({ + const combinedStatsResults = useFunctionsCombinedStatsQuery({ projectRef, functionId: id, - interval: selectedInterval.key as FunctionsReqStatsVariables['interval'], + interval: selectedInterval.key as FunctionsCombinedStatsVariables['interval'], }) - const resourceUsageResult = useFunctionsResourceUsageQuery({ - projectRef, - functionId: id, - interval: selectedInterval.key as FunctionsResourceUsageVariables['interval'], - }) - - const reqStatsData = useMemo(() => { - const result = reqStatsResult.data?.result + const combinedStatsData = useMemo(() => { + const result = combinedStatsResults.data?.result return result || [] - }, [reqStatsResult.data]) - - const resourceUsageData = useMemo(() => { - return resourceUsageResult.data?.result || [] - }, [resourceUsageResult.data]) + }, [combinedStatsResults.data]) const [startDate, endDate]: [Dayjs, Dayjs] = useMemo(() => { const start = dayjs() @@ -104,39 +93,30 @@ const PageLayout: NextPageWithLayout = () => { }, [selectedInterval]) const { - data: execTimeChartData, - error: execTimeError, - isError: isErrorExecTime, + data: combinedStatsChartData, + error: combinedStatsError, + isError: isErrorCombinedStats, } = useFillTimeseriesSorted( - reqStatsData, + combinedStatsData, 'timestamp', - ['avg_execution_time'], - 0, - startDate.toISOString(), - endDate.toISOString() - ) - - const { - data: invocationsChartData, - error: invocationsError, - isError: isErrorInvocations, - } = useFillTimeseriesSorted( - reqStatsData, - 'timestamp', - ['count', 'success_count', 'redirect_count', 'client_err_count', 'server_err_count'], - 0, - startDate.toISOString(), - endDate.toISOString() - ) - - const { - data: resourceUsageChartData, - error: resourceUsageError, - isError: isErrorResourceUsage, - } = useFillTimeseriesSorted( - resourceUsageData, - 'timestamp', - ['avg_cpu_time_used', 'avg_memory_used'], + [ + 'requests_count', + 'log_count', + 'log_info_count', + 'log_warn_count', + 'log_error_count', + 'success_count', + 'redirect_count', + 'client_err_count', + 'server_err_count', + 'avg_cpu_time_used', + 'avg_memory_used', + 'avg_execution_time', + 'max_execution_time', + 'avg_heap_memory_used', + 'avg_external_memory_used', + 'max_cpu_time_used', + ], 0, startDate.toISOString(), endDate.toISOString() @@ -151,7 +131,7 @@ const PageLayout: NextPageWithLayout = () => { } return ( -
+
@@ -188,45 +168,65 @@ const PageLayout: NextPageWithLayout = () => { { - return isErrorExecTime ? ( + return isErrorCombinedStats ? ( Failed to reterieve execution time - {execTimeError.message} + + {combinedStatsError.message} + ) : ( - +
+ + {newChartsEnabled && ( + + )} +
) }} /> { - if (isErrorInvocations) { + if (isErrorCombinedStats) { return ( Failed to reterieve invocations - {invocationsError.message} + {combinedStatsError.message} ) } else { - const data = props.data + const requestData = props.data .map((d: any) => [ { status: '2xx', @@ -251,22 +251,63 @@ const PageLayout: NextPageWithLayout = () => { ]) .flat() + const logsData = props.data + .map((d: any) => [ + { + status: 'error', + count: d.log_error_count, + timestamp: d.timestamp, + }, + { + status: 'info', + count: d.log_info_count, + timestamp: d.timestamp, + }, + { + status: 'warn', + count: d.log_warn_count, + timestamp: d.timestamp, + }, + ]) + .flat() + return ( - { - router.push( - `/project/${projectRef}/functions/${functionSlug}/invocations?its=${startDate.toISOString()}` - ) - }} - /> +
+ { + router.push( + `/project/${projectRef}/functions/${functionSlug}/invocations?its=${startDate.toISOString()}` + ) + }} + /> + {newChartsEnabled && ( + { + router.push( + `/project/${projectRef}/functions/${functionSlug}/logs?its=${startDate.toISOString()}` + ) + }} + /> + )} +
) } }} @@ -274,54 +315,105 @@ const PageLayout: NextPageWithLayout = () => { { - return isErrorResourceUsage ? ( + return isErrorCombinedStats ? ( Failed to retrieve CPU time - {resourceUsageError.message} + {combinedStatsError.message} ) : ( - +
+ + {newChartsEnabled && ( + + )} +
) }} /> { - return isErrorResourceUsage ? ( - - - Failed to retrieve memory usage - - {resourceUsageError.message} - - - ) : ( - + if (isErrorCombinedStats) { + return ( + + + Failed to retrieve memory usage + + {combinedStatsError.message} + + + ) + } + + const memoryData = props.data + .map((d: any) => [ + { + type: 'heap', + count: d.avg_heap_memory_used, + timestamp: d.timestamp, + }, + { + type: 'external', + count: d.avg_external_memory_used, + timestamp: d.timestamp, + }, + ]) + .flat() + + return ( +
+ + {newChartsEnabled && ( + + )} +
) }} /> diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.ts index 87bbc37c9df0d..a74db70f9e537 100644 --- a/packages/api-types/types/api.d.ts +++ b/packages/api-types/types/api.d.ts @@ -570,6 +570,24 @@ export interface paths { patch?: never trace?: never } + '/v1/projects/{ref}/cli/login-role': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** [Beta] Create a login role for CLI with temporary password */ + post: operations['v1-create-login-role'] + /** [Beta] Delete existing login roles used by CLI */ + delete: operations['v1-delete-login-roles'] + options?: never + head?: never + patch?: never + trace?: never + } '/v1/projects/{ref}/config/auth': { parameters: { query?: never @@ -1255,7 +1273,8 @@ export interface paths { delete?: never options?: never head?: never - patch?: never + /** [Alpha] Updates project's network restrictions by adding or removing CIDRs */ + patch: operations['v1-patch-network-restrictions'] trace?: never } '/v1/projects/{ref}/network-restrictions/apply': { @@ -1494,6 +1513,23 @@ export interface paths { patch?: never trace?: never } + '/v1/projects/{ref}/storage/buckets/{id}/objects': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Gets list of objects with the given bucket */ + post: operations['v1-list-storage-objects'] + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } '/v1/projects/{ref}/types/typescript': { parameters: { query?: never @@ -2104,6 +2140,12 @@ export interface components { domains?: string[] metadata_url?: string metadata_xml?: string + /** @enum {string} */ + name_id_format?: + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' /** * @description What type of provider will be created * @enum {string} @@ -2134,9 +2176,24 @@ export interface components { id: string metadata_url?: string metadata_xml?: string + /** @enum {string} */ + name_id_format?: + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' } updated_at?: string } + CreateRoleBody: { + read_only: boolean + } + CreateRoleResponse: { + password: string + role: string + /** Format: int64 */ + ttl_seconds: number + } CreateSecretBody: { /** * @description Secret name must not start with the SUPABASE_ prefix. @@ -2248,9 +2305,19 @@ export interface components { id: string metadata_url?: string metadata_xml?: string + /** @enum {string} */ + name_id_format?: + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' } updated_at?: string } + DeleteRolesResponse: { + /** @enum {string} */ + message: 'ok' + } DeployFunctionResponse: { /** Format: int64 */ created_at?: number @@ -2357,6 +2424,12 @@ export interface components { id: string metadata_url?: string metadata_xml?: string + /** @enum {string} */ + name_id_format?: + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' } updated_at?: string } @@ -2543,6 +2616,12 @@ export interface components { id: string metadata_url?: string metadata_xml?: string + /** @enum {string} */ + name_id_format?: + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' } updated_at?: string }[] @@ -2557,11 +2636,23 @@ export interface components { type: string }[] } + NetworkRestrictionsPatchRequest: { + add?: { + dbAllowedCidrs?: string[] + dbAllowedCidrsV6?: string[] + } + remove?: { + dbAllowedCidrs?: string[] + dbAllowedCidrsV6?: string[] + } + } NetworkRestrictionsRequest: { dbAllowedCidrs?: string[] dbAllowedCidrsV6?: string[] } NetworkRestrictionsResponse: { + /** Format: date-time */ + applied_at?: string /** @description At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`. */ config: { dbAllowedCidrs?: string[] @@ -2576,6 +2667,34 @@ export interface components { } /** @enum {string} */ status: 'stored' | 'applied' + /** Format: date-time */ + updated_at?: string + } + NetworkRestrictionsV2Response: { + /** Format: date-time */ + applied_at?: string + /** @description At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`. */ + config: { + dbAllowedCidrs?: { + address: string + /** @enum {string} */ + type: 'v4' | 'v6' + }[] + } + /** @enum {string} */ + entitlement: 'disallowed' | 'allowed' + /** @description Populated when a new config has been received, but not registered as successfully applied to a project. */ + old_config?: { + dbAllowedCidrs?: { + address: string + /** @enum {string} */ + type: 'v4' | 'v6' + }[] + } + /** @enum {string} */ + status: 'stored' | 'applied' + /** Format: date-time */ + updated_at?: string } OAuthRevokeTokenBody: { /** Format: uuid */ @@ -3227,6 +3346,12 @@ export interface components { domains?: string[] metadata_url?: string metadata_xml?: string + /** @enum {string} */ + name_id_format?: + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' } UpdateProviderResponse: { created_at?: string @@ -3252,6 +3377,12 @@ export interface components { id: string metadata_url?: string metadata_xml?: string + /** @enum {string} */ + name_id_format?: + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' + | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' } updated_at?: string } @@ -3437,6 +3568,43 @@ export interface components { name?: string version: string }[] + V1ListStorageObjectsBody: { + options?: { + limit?: number + offset?: number + search?: string + sort_by?: string + /** @enum {string} */ + sort_order?: 'asc' | 'desc' + } + path?: string + } + V1ListStorageObjectsResponse: { + items: { + bucket_id: string + buckets: { + allowed_mime_types?: string[] + created_at: string + file_size_limit?: number + id: string + name: string + owner: string + public: boolean + /** @enum {string} */ + type?: 'STANDARD' | 'ANALYTICS' + updated_at: string + } + created_at: string + id: string + last_accessed_at: string + metadata: { + [key: string]: unknown + } + name: string + owner: string + updated_at: string + }[] + } V1OrganizationMemberResponse: { email?: string mfa_enabled: boolean @@ -5077,6 +5245,80 @@ export interface operations { } } } + 'v1-create-login-role': { + parameters: { + query?: never + header?: never + path: { + /** @description Project ref */ + ref: string + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['CreateRoleBody'] + } + } + responses: { + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CreateRoleResponse'] + } + } + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Failed to create login role */ + 500: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } + 'v1-delete-login-roles': { + 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']['DeleteRolesResponse'] + } + } + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Failed to delete login roles */ + 500: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } 'v1-get-auth-service-config': { parameters: { query?: never @@ -7170,6 +7412,45 @@ export interface operations { } } } + 'v1-patch-network-restrictions': { + parameters: { + query?: never + header?: never + path: { + /** @description Project ref */ + ref: string + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['NetworkRestrictionsPatchRequest'] + } + } + responses: { + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['NetworkRestrictionsV2Response'] + } + } + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Failed to update project network restrictions */ + 500: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } 'v1-update-network-restrictions': { parameters: { query?: never @@ -7823,6 +8104,47 @@ export interface operations { } } } + 'v1-list-storage-objects': { + parameters: { + query?: never + header?: never + path: { + /** @description Storage bucket id */ + id: string + /** @description Project ref */ + ref: string + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['V1ListStorageObjectsBody'] + } + } + responses: { + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['V1ListStorageObjectsResponse'] + } + } + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Failed to get list of objects with the given bucket */ + 500: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } 'v1-generate-typescript-types': { parameters: { query?: { diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts index c6fb1f2f00d8d..d831af5c86421 100644 --- a/packages/api-types/types/platform.d.ts +++ b/packages/api-types/types/platform.d.ts @@ -6620,6 +6620,7 @@ export interface components { offset: number } projects: { + cloud_provider: string databases: { cloud_provider: string disk_last_modified_at?: string @@ -6668,6 +6669,7 @@ export interface components { /** @enum {string} */ type: 'PRIMARY' | 'READ_REPLICA' }[] + inserted_at: string is_branch: boolean name: string ref: string @@ -9244,7 +9246,7 @@ export interface components { folder_id?: (null | (string | null)) | null id: string name: string - owner_id: number + owner_id?: number project_id?: number /** @enum {string} */ type: 'sql' | 'report' | 'log_sql' @@ -13253,6 +13255,10 @@ export interface operations { search?: string /** @description Sort order for projects */ sort?: 'name_asc' | 'name_desc' | 'created_asc' | 'created_desc' + /** @description A comma-separated list of project statuses to filter by. + * + * The following values are supported: `ACTIVE_HEALTHY`, `INACTIVE`. */ + statuses?: string } header?: never path: {