The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
refactor: to projects (#43825)
Raúl Barroso2ba93c563243
diff --git a/apps/studio/data/partners/keys.ts b/apps/studio/data/partners/keys.tsindex fff012ea904..eeff9d8ef38 100644--- a/apps/studio/data/partners/keys.ts+++ b/apps/studio/data/partners/keys.ts@@ -1,3 +1,3 @@-export const stripeFabricKeys = {- get: (arId: string | undefined) => ['stripe', 'fabric', arId] as const,+export const stripeProjectsKeys = {+ get: (arId: string | undefined) => ['stripe', 'projects', arId] as const,}diff --git a/apps/studio/data/partners/stripe-fabric-confirm-mutation.ts b/apps/studio/data/partners/stripe-projects-confirm-mutation.tssimilarity index 95%rename from apps/studio/data/partners/stripe-fabric-confirm-mutation.tsrename to apps/studio/data/partners/stripe-projects-confirm-mutation.tsindex 50cdb57d1da..e0ba1a55615 100644--- a/apps/studio/data/partners/stripe-fabric-confirm-mutation.ts+++ b/apps/studio/data/partners/stripe-projects-confirm-mutation.ts@@ -18,7 +18,7 @@ async function confirmAccountRequest({if (!arId) throw new Error('Account request ID is required')const { data, error } = await post(- '/platform/stripe/fabric/provisioning/account_requests/{id}/confirm',+ '/platform/stripe/projects/provisioning/account_requests/{id}/confirm',{params: { path: { id: arId } },body: { organization_id: organizationId, organization_name: organizationName },diff --git a/apps/studio/data/partners/stripe-fabric-query.ts b/apps/studio/data/partners/stripe-projects-query.tssimilarity index 75%rename from apps/studio/data/partners/stripe-fabric-query.tsrename to apps/studio/data/partners/stripe-projects-query.tsindex bc60a1f0895..acbaf67fe35 100644--- a/apps/studio/data/partners/stripe-fabric-query.ts+++ b/apps/studio/data/partners/stripe-projects-query.ts@@ -2,7 +2,7 @@ import { queryOptions } from '@tanstack/react-query'import type { components } from 'api-types'import { get, handleError } from '../fetchers'-import { stripeFabricKeys } from './keys'+import { stripeProjectsKeys } from './keys'type GetAccountRequestVariables = {arId?: string@@ -13,10 +13,13 @@ export type AccountRequestDetails = components['schemas']['AccountRequestDetailsasync function getAccountRequest({ arId }: GetAccountRequestVariables, signal?: AbortSignal) {if (!arId) throw new Error('Account request ID is required')- const { data, error } = await get('/platform/stripe/fabric/provisioning/account_requests/{id}', {- params: { path: { id: arId } },- signal,- })+ const { data, error } = await get(+ '/platform/stripe/projects/provisioning/account_requests/{id}',+ {+ params: { path: { id: arId } },+ signal,+ }+ )if (error) handleError(error)return data@@ -27,7 +30,7 @@ export const accountRequestQueryOptions = ({ enabled = true }: { enabled?: boolean } = { enabled: true }) => {return queryOptions({- queryKey: stripeFabricKeys.get(arId),+ queryKey: stripeProjectsKeys.get(arId),queryFn: ({ signal }) => getAccountRequest({ arId }, signal),enabled: enabled && typeof arId !== 'undefined',})diff --git a/apps/studio/pages/partners/stripe/fabric/login.tsx b/apps/studio/pages/partners/stripe/projects/login.tsxsimilarity index 98%rename from apps/studio/pages/partners/stripe/fabric/login.tsxrename to apps/studio/pages/partners/stripe/projects/login.tsxindex 103493f8813..eaed00687c2 100644--- a/apps/studio/pages/partners/stripe/fabric/login.tsx+++ b/apps/studio/pages/partners/stripe/projects/login.tsx@@ -15,17 +15,17 @@ import {import APIAuthorizationLayout from '@/components/layouts/APIAuthorizationLayout'import { OrganizationSelector } from '@/components/ui/org-selector'import { useOrganizationsQuery } from '@/data/organizations/organizations-query'-import { useConfirmAccountRequestMutation } from '@/data/partners/stripe-fabric-confirm-mutation'+import { useConfirmAccountRequestMutation } from '@/data/partners/stripe-projects-confirm-mutation'import {accountRequestQueryOptions,type AccountRequestDetails,-} from '@/data/partners/stripe-fabric-query'+} from '@/data/partners/stripe-projects-query'import { withAuth } from '@/hooks/misc/withAuth'import { useSignOut } from '@/lib/auth'type OrgSummary = NonNullable<AccountRequestDetails['linked_organization']>-const StripeFabricLoginPage = () => {+const StripeProjectsLoginPage = () => {const router = useRouter()const { ar_id } = useParams()@@ -297,4 +297,4 @@ const StripeFabricLoginPage = () => {)}-export default withAuth(StripeFabricLoginPage)+export default withAuth(StripeProjectsLoginPage)diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.tsindex bb0848390c6..c63a6f6d669 100644--- a/packages/api-types/types/api.d.ts+++ b/packages/api-types/types/api.d.ts@@ -4807,6 +4807,8 @@ export interface components {name: string}V1RestorePointResponse: {+ /** Format: date-time */+ completed_on: string | nullname: string/** @enum {string} */status: 'AVAILABLE' | 'PENDING' | 'REMOVED' | 'FAILED'diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.tsindex ec0ec1b1849..18a6aa902dd 100644--- a/packages/api-types/types/platform.d.ts+++ b/packages/api-types/types/platform.d.ts@@ -3205,23 +3205,6 @@ export interface paths {patch?: nevertrace?: never}- '/platform/projects/{ref}/restore/status': {- parameters: {- query?: never- header?: never- path?: never- cookie?: never- }- /** Gets the latest restore initiated event for a project if a project is restored */- get: operations['UnpauseController_getRestoreInitiatedEvent']- put?: never- post?: never- delete?: never- options?: never- head?: never- patch?: never- trace?: never- }'/platform/projects/{ref}/restore/versions': {parameters: {query?: never@@ -4337,15 +4320,15 @@ export interface paths {patch?: nevertrace?: never}- '/platform/stripe/fabric/provisioning/account_requests/{id}': {+ '/platform/stripe/invoices/overdue': {parameters: {query?: neverheader?: neverpath?: nevercookie?: never}- /** Get account request details */- get: operations['AccountRequestsController_getAccountRequest']+ /** Gets information about overdue invoices that relate to the authenticated user */+ get: operations['InvoicesController_getOverdueInvoices']put?: neverpost?: neverdelete?: never@@ -4354,34 +4337,34 @@ export interface paths {patch?: nevertrace?: never}- '/platform/stripe/fabric/provisioning/account_requests/{id}/confirm': {+ '/platform/stripe/projects/provisioning/account_requests/{id}': {parameters: {query?: neverheader?: neverpath?: nevercookie?: never}- get?: never+ /** Get account request details */+ get: operations['AccountRequestsController_getAccountRequest']put?: never- /** Confirm account request (from Studio) */- post: operations['AccountRequestsController_confirmAccountRequest']+ post?: neverdelete?: neveroptions?: neverhead?: neverpatch?: nevertrace?: never}- '/platform/stripe/invoices/overdue': {+ '/platform/stripe/projects/provisioning/account_requests/{id}/confirm': {parameters: {query?: neverheader?: neverpath?: nevercookie?: never}- /** Gets information about overdue invoices that relate to the authenticated user */- get: operations['InvoicesController_getOverdueInvoices']+ get?: neverput?: never- post?: never+ /** Confirm account request (from Studio) */+ post: operations['AccountRequestsController_confirmAccountRequest']delete?: neveroptions?: neverhead?: never@@ -5230,7 +5213,12 @@ export interface components {| {billing_email: string | null/** @enum {string|null} */- billing_partner: 'fly' | 'aws_marketplace' | 'vercel_marketplace' | 'stripe_fabric' | null+ billing_partner:+ | 'fly'+ | 'aws_marketplace'+ | 'vercel_marketplace'+ | 'stripe_projects'+ | nullid: numberis_owner: booleanname: string@@ -5301,6 +5289,8 @@ export interface components {| '48xlarge_optimized_memory'| '48xlarge_optimized_cpu'| '48xlarge_high_memory'+ /** @description Whether to enable high availability for the project. */+ high_availability?: booleanname: stringorganization_slug: string/**@@ -6580,7 +6570,7 @@ export interface components {}[]billing_cycle_anchor: number/** @enum {string} */- billing_partner?: 'fly' | 'aws_marketplace' | 'vercel_marketplace' | 'stripe_fabric'+ billing_partner?: 'fly' | 'aws_marketplace' | 'vercel_marketplace' | 'stripe_projects'billing_via_partner: booleancurrent_period_end: numbercurrent_period_start: number@@ -7596,7 +7586,7 @@ export interface components {OrganizationResponse: {billing_email: string | null/** @enum {string|null} */- billing_partner: 'fly' | 'aws_marketplace' | 'vercel_marketplace' | 'stripe_fabric' | null+ billing_partner: 'fly' | 'aws_marketplace' | 'vercel_marketplace' | 'stripe_projects' | nullid: numberis_owner: booleanname: string@@ -7660,7 +7650,7 @@ export interface components {OrganizationSlugResponse: {billing_email: string | null/** @enum {string|null} */- billing_partner: 'fly' | 'aws_marketplace' | 'vercel_marketplace' | 'stripe_fabric' | null+ billing_partner: 'fly' | 'aws_marketplace' | 'vercel_marketplace' | 'stripe_projects' | nullhas_oriole_project: booleanid: numbername: string@@ -8376,6 +8366,7 @@ export interface components {| 'PAUSE_FAILED'| 'RESIZING'subscription_id: string+ updated_at: stringvolumeSizeGb?: number}ProjectMembersResponse: {@@ -8410,9 +8401,6 @@ export interface components {need_pitr: 'critical' | 'warning' | nullproject: string}- ProjectRestoreInitiatedEventResponse: {- restore_initiated_on: string | null- }ProjectSensitivityResponse: {is_sensitive: boolean}@@ -22299,49 +22287,6 @@ export interface operations {}}}- UnpauseController_getRestoreInitiatedEvent: {- 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']['ProjectRestoreInitiatedEventResponse']- }- }- /** @description Unauthorized */- 401: {- headers: {- [name: string]: unknown- }- content?: never- }- /** @description Forbidden action */- 403: {- headers: {- [name: string]: unknown- }- content?: never- }- /** @description Rate limit exceeded */- 429: {- headers: {- [name: string]: unknown- }- content?: never- }- }- }UnpauseController_getAvailableImageVersions: {parameters: {query?: never@@ -26491,13 +26436,11 @@ export interface operations {}}}- AccountRequestsController_getAccountRequest: {+ InvoicesController_getOverdueInvoices: {parameters: {query?: neverheader?: never- path: {- id: string- }+ path?: nevercookie?: never}requestBody?: never@@ -26507,12 +26450,12 @@ export interface operations {[name: string]: unknown}content: {- 'application/json': components['schemas']['AccountRequestDetailsDto']+ 'application/json': components['schemas']['OverdueInvoiceCount'][]}}}}- AccountRequestsController_confirmAccountRequest: {+ AccountRequestsController_getAccountRequest: {parameters: {query?: neverheader?: never@@ -26521,37 +26464,39 @@ export interface operations {}cookie?: never}- requestBody: {- content: {- 'application/json': components['schemas']['ConfirmRequestDto']- }- }+ requestBody?: neverresponses: {200: {headers: {[name: string]: unknown}content: {- 'application/json': components['schemas']['ConfirmResponseDto']+ 'application/json': components['schemas']['AccountRequestDetailsDto']}}}}- InvoicesController_getOverdueInvoices: {+ AccountRequestsController_confirmAccountRequest: {parameters: {query?: neverheader?: never- path?: never+ path: {+ id: string+ }cookie?: never}- requestBody?: never+ requestBody: {+ content: {+ 'application/json': components['schemas']['ConfirmRequestDto']+ }+ }responses: {200: {headers: {[name: string]: unknown}content: {- 'application/json': components['schemas']['OverdueInvoiceCount'][]+ 'application/json': components['schemas']['ConfirmResponseDto']}}}