refactor: to projects (#43825)

Use settled project name
This commit is contained in:
Raúl Barroso authored and GitHub committed 2026-03-16 20:47:32 +01:00
1 parent 25120657db
commit 2ba93c5632
6 files changed
+68 -118

No files matched your search

+2 -2
View File
@@ -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,
}
@@ -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 },
@@ -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',
})
@@ -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)
+2
View File
@@ -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'
+50 -105
View File
@@ -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