chore(pricing): 🔧 Add TierCard components, useTiers hook, and MSW mocks for tiered pricing UI and API responses

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-02-22 09:38:26 -08:00
parent cd8ec76818
commit 6dbc1024e4
7 changed files with 6 additions and 72 deletions

View file

@ -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 {

View file

@ -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']

View file

@ -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

View file

@ -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[]

View file

@ -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'

View file

@ -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;
}

View file

@ -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'