/** * near-me-schema — Pricing plan response types * * Shapes returned by `GET /api/v1/near-me/pricing-plans`. Each plan ships its * own tenure variations (monthly / yearly) with pre-computed pricing. The * shape is structurally compatible with the shared pricing UI components so a * single `` / `` renders Near-Me plans too. * * @module near-me-schema/pricing-plan */ import type { NearMePlanId } from './plan-limits.js'; /** Tenure IDs for Near-Me plans (monthly + yearly). */ export type NearMeTenureId = '1m' | '12m'; export declare const NEAR_ME_TENURE_ID: { readonly MONTHLY: "1m"; readonly YEARLY: "12m"; }; /** * One tenure variation of a plan. `basePrice` / `finalPrice` are in whole * rupees (INR); the payment layer converts to paise at checkout * (`Math.round(finalPrice * 100)`) and the UI renders `₹{finalPrice}`. */ export interface NearMeTenureVariation { tenureId: NearMeTenureId; label: string; basePrice: number; /** 0-100. Already factored into `finalPrice`. */ discountPct: number; finalPrice: number; enabled: boolean; razorpayPlanId?: string; } /** * Optional limited-time intro pricing. When `enabled` and the redemption * window is open, the UI overlays a launch-offer badge and uses `price` * instead of the tenure's `finalPrice`. Persists in the pricing-plan DB doc * so promos ship without a code deploy. */ export interface NearMeLaunchOffer { enabled: boolean; price: number; tenure: NearMeTenureId; label: string; badge: string; validUntil?: string; maxRedemptions?: number; redemptionCount: number; oncePerUser: boolean; } /** * One pricing plan as returned by the backend. The frontend reads * `accentColor` / `bgColor` for the plan-card chrome and uses `tenures[]` to * drive the tenure selector. */ export interface NearMePricingPlanResponse { planId: NearMePlanId; name: string; tagline: string; accentColor: string; bgColor: string; /** Highlight as the recommended plan in the picker. */ isPopular: boolean; /** Lower → render first. */ sortOrder: number; /** Per-month equivalent price for the "starting at" line on the carousel card. */ baseMonthlyPrice: number; isActive: boolean; tenures: NearMeTenureVariation[]; launchOffer?: NearMeLaunchOffer; } /** Wrapper for the list endpoint. */ export interface NearMePricingPlansListResult { items: NearMePricingPlanResponse[]; } //# sourceMappingURL=pricing-plan.d.ts.map