/** * Billing Queries * * Query functions for the Billing Registry. * These operate on the auto-generated BILLING_REGISTRY data. * * @module core/lib/billing/queries */ import { BILLING_REGISTRY, BILLING_MATRIX, BILLING_METADATA, PUBLIC_PLANS } from '@nextsparkjs/registries/billing-registry'; import type { PlanDefinition, FeatureDefinition, LimitDefinition } from './config-types'; export interface FullBillingMatrix { plans: PlanDefinition[]; features: Record; limits: Record; matrix: typeof BILLING_MATRIX; metadata: typeof BILLING_METADATA; } /** * Check if a plan has a specific feature - O(1) */ export declare function planHasFeature(planSlug: string, featureSlug: string): boolean; /** * Get limit value for a plan - O(1) * Returns -1 for unlimited, 0 if not defined */ export declare function getPlanLimit(planSlug: string, limitSlug: string): number; /** * Get all features for a plan - O(n) where n = features */ export declare function getPlanFeatures(planSlug: string): string[]; /** * Get all limits for a plan - O(n) */ export declare function getPlanLimits(planSlug: string): Record; /** * Get full matrix for UI components - O(1) */ export declare function getFullBillingMatrix(): FullBillingMatrix; /** * Get plan by slug - O(n) but plans are typically < 10 */ export declare function getPlan(slug: string): PlanDefinition | undefined; /** * Get public plans (for pricing pages) - O(1) pre-computed */ export declare function getPublicPlans(): readonly PlanDefinition[]; export { BILLING_REGISTRY, BILLING_MATRIX, BILLING_METADATA, PUBLIC_PLANS }; //# sourceMappingURL=queries.d.ts.map