diff --git a/apps/studio/data/partners/keys.ts b/apps/studio/data/partners/keys.ts index 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.ts similarity index 95% rename from apps/studio/data/partners/stripe-fabric-confirm-mutation.ts rename to apps/studio/data/partners/stripe-projects-confirm-mutation.ts index 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.ts similarity index 75% rename from apps/studio/data/partners/stripe-fabric-query.ts rename to apps/studio/data/partners/stripe-projects-query.ts index 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']['AccountRequestDetails async 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.tsx similarity index 98% rename from apps/studio/pages/partners/stripe/fabric/login.tsx rename to apps/studio/pages/partners/stripe/projects/login.tsx index 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 -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.ts index 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 | null name: 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.ts index 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?: never trace?: 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,7 +4320,24 @@ export interface paths { patch?: never trace?: never } - '/platform/stripe/fabric/provisioning/account_requests/{id}': { + '/platform/stripe/invoices/overdue': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Gets information about overdue invoices that relate to the authenticated user */ + get: operations['InvoicesController_getOverdueInvoices'] + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/platform/stripe/projects/provisioning/account_requests/{id}': { parameters: { query?: never header?: never @@ -4354,7 +4354,7 @@ export interface paths { patch?: never trace?: never } - '/platform/stripe/fabric/provisioning/account_requests/{id}/confirm': { + '/platform/stripe/projects/provisioning/account_requests/{id}/confirm': { parameters: { query?: never header?: never @@ -4371,23 +4371,6 @@ export interface paths { patch?: never trace?: never } - '/platform/stripe/invoices/overdue': { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - /** Gets information about overdue invoices that relate to the authenticated user */ - get: operations['InvoicesController_getOverdueInvoices'] - put?: never - post?: never - delete?: never - options?: never - head?: never - patch?: never - trace?: never - } '/platform/stripe/setup-intent': { parameters: { query?: 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' + | null id: number is_owner: boolean name: 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?: boolean name: string organization_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: boolean current_period_end: number current_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' | null id: number is_owner: boolean name: 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' | null has_oriole_project: boolean id: number name: string @@ -8376,6 +8366,7 @@ export interface components { | 'PAUSE_FAILED' | 'RESIZING' subscription_id: string + updated_at: string volumeSizeGb?: number } ProjectMembersResponse: { @@ -8410,9 +8401,6 @@ export interface components { need_pitr: 'critical' | 'warning' | null project: 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,6 +26436,25 @@ export interface operations { } } } + InvoicesController_getOverdueInvoices: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['OverdueInvoiceCount'][] + } + } + } + } AccountRequestsController_getAccountRequest: { parameters: { query?: never @@ -26537,25 +26501,6 @@ export interface operations { } } } - InvoicesController_getOverdueInvoices: { - parameters: { - query?: never - header?: never - path?: never - cookie?: never - } - requestBody?: never - responses: { - 200: { - headers: { - [name: string]: unknown - } - content: { - 'application/json': components['schemas']['OverdueInvoiceCount'][] - } - } - } - } SetupIntentController_setUpPaymentMethod: { parameters: { query?: never