/** * near-me-schema — Plan limits configuration * * Single source of truth for feature gating by pricing plan. Backend reads * `NEAR_ME_PLAN_LIMITS` to enforce quotas; frontend reads the same to render * the plan-features matrix. * * 3-tier system, per-ACCOUNT (a subscription covers all of an owner's * listings): Free → Pro → Premium. The lead engine is the lever: Free handles * a capped number of leads per month, then locks; Pro unlocks unlimited leads; * Premium adds featured placement (a discovery sort boost + a badge). * * To add/remove a gated feature: * 1. Add/remove the key in NearMePlanLimits * 2. Set values for each plan in NEAR_ME_PLAN_LIMITS * 3. Backend: gate on getUserNearMeLimits(...)[key] * * @module near-me-schema/plan-limits */ /** The 3 Near-Me pricing plans. */ export type NearMePlanId = 'free' | 'pro' | 'premium'; export declare const NEAR_ME_PLAN_ID: { readonly FREE: "free"; readonly PRO: "pro"; readonly PREMIUM: "premium"; }; /** Numeric limit keys (counters enforced server-side). */ export type NumericFeatureKey = 'monthlyLeadCap'; /** Boolean feature keys (on/off per plan). */ export type BooleanFeatureKey = 'featuredPlacement'; export type FeatureKey = NumericFeatureKey | BooleanFeatureKey; /** * The honest V1 limit set. Everything a *seeker* does (browse, search, save, * enquire) is free and unlimited, so there are no seeker-side caps here. * The paid tiers are purely a *business owner* upgrade. */ export interface NearMePlanLimits { /** * New leads an owner can access per calendar month across ALL their * listings before the rest lock. `-1` = unlimited. The core Free-tier * ceiling and the primary upgrade lever. */ monthlyLeadCap: number; /** * Whether the owner's listings get featured placement — a discovery sort * boost + a "Featured" badge. The core Premium perk. */ featuredPlacement: boolean; } /** Convenience: -1 is the unlimited sentinel. */ export declare const NEAR_ME_UNLIMITED = -1; /** * 3-tier pricing — Free / Pro / Premium (per account). * * Free stays genuinely usable (a small shop operating at low lead volume * never pays); the monthly lead cap is felt by busy businesses, who are the * natural Pro audience. Premium layers featured placement on top of unlimited * leads. Seeker-side actions stay free to keep discovery liquid. */ export declare const NEAR_ME_PLAN_LIMITS: Record; /** * `true` when the plan's value for a numeric limit is unlimited. Use * everywhere instead of comparing to `-1` so the sentinel stays encapsulated. */ export declare function isNearMeUnlimited(value: number): boolean; /** Convenience accessor that returns the limit for the given plan/feature. */ export declare function getNearMePlanLimit(planId: NearMePlanId, key: K): NearMePlanLimits[K]; /** `true` when the plan unlocks the given boolean feature. */ export declare function isNearMeFeatureEnabled(planId: NearMePlanId, key: BooleanFeatureKey): boolean; //# sourceMappingURL=plan-limits.d.ts.map