@sudobility/building_blocks 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,11 +88,21 @@ export interface SubscriptionPageFormatters {
88
88
  formatSavePercent: (percent: number) => string;
89
89
  /** Format intro price note */
90
90
  formatIntroNote: (price: string) => string;
91
+ /** Get features for a product by its identifier (required - same as pricing page) */
92
+ getProductFeatures: (productId: string) => string[];
93
+ }
94
+ /** Package ID to entitlement mapping (same as PricingPage) */
95
+ export interface EntitlementMap {
96
+ [packageId: string]: string;
97
+ }
98
+ /** Entitlement to level mapping for comparing plan tiers (same as PricingPage) */
99
+ export interface EntitlementLevels {
100
+ [entitlement: string]: number;
91
101
  }
92
102
  export interface AppSubscriptionsPageProps {
93
103
  /** Subscription context value */
94
104
  subscription: SubscriptionContextValue;
95
- /** Rate limit configuration */
105
+ /** Rate limit configuration (for displaying current usage, not for features) */
96
106
  rateLimitsConfig?: RateLimitsConfigData | null;
97
107
  /** User ID used for subscription (the selected entity's ID when logged in) */
98
108
  subscriptionUserId?: string;
@@ -100,8 +110,10 @@ export interface AppSubscriptionsPageProps {
100
110
  labels: SubscriptionPageLabels;
101
111
  /** Formatter functions for dynamic strings */
102
112
  formatters: SubscriptionPageFormatters;
103
- /** Package ID to entitlement mapping */
104
- packageEntitlementMap?: Record<string, string>;
113
+ /** Package ID to entitlement mapping (same as PricingPage) */
114
+ entitlementMap: EntitlementMap;
115
+ /** Entitlement to level mapping for comparing tiers (same as PricingPage) */
116
+ entitlementLevels: EntitlementLevels;
105
117
  /** Called when purchase succeeds */
106
118
  onPurchaseSuccess?: () => void;
107
119
  /** Called when restore succeeds */
@@ -115,5 +127,6 @@ export interface AppSubscriptionsPageProps {
115
127
  }
116
128
  /**
117
129
  * Page for managing app subscriptions.
130
+ * Uses the same entitlement mapping and features display as AppPricingPage.
118
131
  */
119
- export declare function AppSubscriptionsPage({ subscription, rateLimitsConfig, subscriptionUserId, labels, formatters, packageEntitlementMap, onPurchaseSuccess, onRestoreSuccess, onError, onWarning, onTrack, }: AppSubscriptionsPageProps): import("react/jsx-runtime").JSX.Element;
132
+ export declare function AppSubscriptionsPage({ subscription, rateLimitsConfig, subscriptionUserId, labels, formatters, entitlementMap, entitlementLevels: _entitlementLevels, onPurchaseSuccess, onRestoreSuccess, onError, onWarning, onTrack, }: AppSubscriptionsPageProps): import("react/jsx-runtime").JSX.Element;