From 6dbc1024e4e1550a270f3ddeaa83c8c3bb4ded78 Mon Sep 17 00:00:00 2001 From: Lilith Date: Sun, 22 Feb 2026 09:38:26 -0800 Subject: [PATCH] =?UTF-8?q?chore(pricing):=20=F0=9F=94=A7=20Add=20TierCard?= =?UTF-8?q?=20components,=20useTiers=20hook,=20and=20MSW=20mocks=20for=20t?= =?UTF-8?q?iered=20pricing=20UI=20and=20API=20responses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../features/pricing/components/TierCard.tsx | 2 +- .../pricing/components/TierCardFeatures.tsx | 2 +- .../pricing/components/TierCardPricing.tsx | 2 +- .../features/pricing/components/TierGrid.tsx | 2 +- .../src/features/pricing/hooks/useTiers.ts | 2 +- .../src/features/pricing/types.ts | 67 ------------------- .../marketplace/backend-api-msw/src/index.ts | 1 + 7 files changed, 6 insertions(+), 72 deletions(-) delete mode 100644 features/landing/frontend-public/src/features/pricing/types.ts diff --git a/features/landing/frontend-public/src/features/pricing/components/TierCard.tsx b/features/landing/frontend-public/src/features/pricing/components/TierCard.tsx index c9fbfa879..09a23fc0b 100644 --- a/features/landing/frontend-public/src/features/pricing/components/TierCard.tsx +++ b/features/landing/frontend-public/src/features/pricing/components/TierCard.tsx @@ -16,7 +16,7 @@ import { TierCardFeatures } from './TierCardFeatures' import { TierCardHeader } from './TierCardHeader' import { TierCardPricing } from './TierCardPricing' -import type { PlatformSubscriptionTier } from '../types' +import type { PlatformSubscriptionTier } from '@features/marketplace/frontend-public/src/features/subscription/types' import type { TierSlug } from '@lilith/ui-tiers' export interface TierCardProps { diff --git a/features/landing/frontend-public/src/features/pricing/components/TierCardFeatures.tsx b/features/landing/frontend-public/src/features/pricing/components/TierCardFeatures.tsx index 31e5edb5e..cc2d406ff 100644 --- a/features/landing/frontend-public/src/features/pricing/components/TierCardFeatures.tsx +++ b/features/landing/frontend-public/src/features/pricing/components/TierCardFeatures.tsx @@ -19,7 +19,7 @@ import { } from './TierCard.styles' import { formatFeatureValue } from './TierCard.utils' -import type { PlatformSubscriptionTier, TierVerification } from '../types' +import type { PlatformSubscriptionTier, TierVerification } from '@features/marketplace/frontend-public/src/features/subscription/types' export interface TierCardFeaturesProps { features: PlatformSubscriptionTier['features'] diff --git a/features/landing/frontend-public/src/features/pricing/components/TierCardPricing.tsx b/features/landing/frontend-public/src/features/pricing/components/TierCardPricing.tsx index 29c7ed611..6104cea8c 100644 --- a/features/landing/frontend-public/src/features/pricing/components/TierCardPricing.tsx +++ b/features/landing/frontend-public/src/features/pricing/components/TierCardPricing.tsx @@ -16,7 +16,7 @@ import { } from './TierCard.styles' import { getBillingPeriodText } from './TierCard.utils' -import type { TierVerification } from '../types' +import type { TierVerification } from '@features/marketplace/frontend-public/src/features/subscription/types' export interface TierCardPricingProps { priceUsd: number diff --git a/features/landing/frontend-public/src/features/pricing/components/TierGrid.tsx b/features/landing/frontend-public/src/features/pricing/components/TierGrid.tsx index f6b6114d8..b49249006 100644 --- a/features/landing/frontend-public/src/features/pricing/components/TierGrid.tsx +++ b/features/landing/frontend-public/src/features/pricing/components/TierGrid.tsx @@ -12,7 +12,7 @@ import styled, { type DefaultTheme } from '@lilith/ui-styled-components' import { TierCard } from './TierCard' -import type { PlatformSubscriptionTier } from '../types' +import type { PlatformSubscriptionTier } from '@features/marketplace/frontend-public/src/features/subscription/types' export interface TierGridProps { tiers: PlatformSubscriptionTier[] diff --git a/features/landing/frontend-public/src/features/pricing/hooks/useTiers.ts b/features/landing/frontend-public/src/features/pricing/hooks/useTiers.ts index bdc8f56a4..d17c2f16b 100644 --- a/features/landing/frontend-public/src/features/pricing/hooks/useTiers.ts +++ b/features/landing/frontend-public/src/features/pricing/hooks/useTiers.ts @@ -6,7 +6,7 @@ import { useQuery } from '@tanstack/react-query' -import type { PlatformSubscriptionTier } from '../types' +import type { PlatformSubscriptionTier } from '@features/marketplace/frontend-public/src/features/subscription/types' const API_BASE = import.meta.env.VITE_API_URL || '/api' diff --git a/features/landing/frontend-public/src/features/pricing/types.ts b/features/landing/frontend-public/src/features/pricing/types.ts deleted file mode 100644 index dd32ac29d..000000000 --- a/features/landing/frontend-public/src/features/pricing/types.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Subscription Tier Types - * - * Subset of marketplace subscription types needed for tier display. - */ - -/** - * Client Tier Features - What CLIENTS can do on the platform - */ -export interface ClientTierFeatures { - messagesPerMonth: number; - profileDiscoveriesPerMonth: number; - profileViewsPerMonth: number; - discoveryMemoryMonths: number; - rolloverPolicy: 'none' | 'weekly-with-monthly-cap' | 'full-monthly'; - maxRolloverMonths: number; - supportLevel?: 'community' | 'email' | 'priority' | 'dedicated'; - concierge?: boolean; - conciergeRequests?: number; - proposalsPerRequest?: number; - responseTime?: number; - duoPlus?: number; - vipVerification?: boolean; -} - -/** - * Verification requirements for a tier - */ -export interface TierVerification { - included: boolean; - addOnPrice: number | null; - loyaltyWaiver: boolean; - vip?: boolean; -} - -/** - * Concierge features - */ -export interface TierConcierge { - enabled: boolean; - requestsPerWeek: number; - proposalsPerRequest: number; - responseTimeHours: number; - duoPlusPerWeek: number; -} - -/** - * Platform subscription tier (CLIENT-focused) - */ -export interface PlatformSubscriptionTier { - id: string; - slug: 'bronze' | 'silver' | 'gold' | 'platinum' | 'iridium'; - name: string; - description?: string; - priceUsd: number; - billingInterval: 'weekly' | 'monthly' | 'yearly'; - features: ClientTierFeatures; - tierLevel: number; - bonusPercentage: number; - bonusEffectiveValue: string; - verification: TierVerification; - concierge?: TierConcierge; - vipVerification?: boolean; - isActive: boolean; - createdAt: string; - updatedAt: string; -} diff --git a/features/marketplace/backend-api-msw/src/index.ts b/features/marketplace/backend-api-msw/src/index.ts index 3549e5ac2..61124431a 100644 --- a/features/marketplace/backend-api-msw/src/index.ts +++ b/features/marketplace/backend-api-msw/src/index.ts @@ -6,3 +6,4 @@ export { searchHandlers, bookingsHandlers } from '../../shared/msw' export { reviewsHandlers } from '../../../reviews/shared/msw' export { profileHandlers } from '../../../profile/shared/msw' export { attributesHandlers } from '../../../attributes/shared/msw' +export { tiersHandlers, MOCK_TIERS } from '../../../merchant/shared/msw'