@umituz/react-native-subscription 2.27.134 → 2.27.136

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.27.134",
3
+ "version": "2.27.136",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -6,7 +6,6 @@
6
6
  // Entities
7
7
  export * from "./entities/types";
8
8
 
9
- // Hooks
10
9
  // Hooks
11
10
  export * from "./hooks/useSubscriptionModal";
12
11
  export * from "./hooks/usePaywallActions";
@@ -55,7 +55,7 @@ export const SubscriptionDetailScreen: React.FC<SubscriptionDetailScreenProps> =
55
55
  )}
56
56
  {showCredits && config.credits && (
57
57
  <CreditsList
58
- credits={config.credits as any}
58
+ credits={config.credits}
59
59
  title={config.translations.usageTitle || config.translations.creditsTitle}
60
60
  description={config.translations.creditsResetInfo}
61
61
  remainingLabel={config.translations.remainingLabel}
@@ -29,6 +29,13 @@ export interface UpgradePromptConfig {
29
29
  onUpgrade?: () => void;
30
30
  }
31
31
 
32
+ export interface CreditInfo {
33
+ id: string;
34
+ label: string;
35
+ current: number;
36
+ total: number;
37
+ }
38
+
32
39
  export interface SubscriptionDetailConfig {
33
40
  display: SubscriptionDisplayFlags;
34
41
  statusType: "active" | "expired" | "none" | "canceled";
@@ -36,7 +43,7 @@ export interface SubscriptionDetailConfig {
36
43
  expirationDate?: string;
37
44
  purchaseDate?: string;
38
45
  daysRemaining?: number | null;
39
- credits?: readonly any[];
46
+ credits?: readonly CreditInfo[];
40
47
  translations: SubscriptionDetailTranslations;
41
48
  upgradePrompt?: UpgradePromptConfig;
42
49
  onClose?: () => void;
@@ -40,8 +40,8 @@ export const UpgradePrompt: React.FC<UpgradePromptProps> = ({ title, subtitle, b
40
40
  </View>
41
41
  {benefits && benefits.length > 0 && (
42
42
  <View style={styles.benefitsCard}>
43
- {benefits.map((benefit, index) => (
44
- <View key={index} style={styles.benefitItem}>
43
+ {benefits.map((benefit) => (
44
+ <View key={benefit.text} style={styles.benefitItem}>
45
45
  <View style={styles.benefitIconWrapper}>
46
46
  <AtomicIcon name={benefit.icon || "checkmark-circle-outline"} customSize={16} color="primary" />
47
47
  </View>
package/src/index.ts CHANGED
@@ -2,7 +2,6 @@
2
2
  * React Native Subscription - Public API
3
3
  */
4
4
 
5
- // Domain Layer - Constants & Types (Now in domains/subscription/core)
6
5
  // Domain Layer - Constants & Types
7
6
  export * from "./domains/subscription/core/SubscriptionConstants";
8
7
  export {
@@ -12,14 +11,11 @@ export {
12
11
  } from "./domains/subscription/core/SubscriptionStatus";
13
12
  export type { SubscriptionStatus, StatusResolverInput } from "./domains/subscription/core/SubscriptionStatus";
14
13
 
15
-
16
-
17
-
18
14
  // Application Layer - Ports
19
15
  export type { ISubscriptionRepository } from "./shared/application/ports/ISubscriptionRepository";
20
16
  export type { IRevenueCatService } from "./shared/application/ports/IRevenueCatService";
21
17
 
22
- // Result Pattern (Now in shared/utils)
18
+ // Result Pattern
23
19
  export {
24
20
  success,
25
21
  failure,
@@ -54,19 +50,17 @@ export {
54
50
  isCreditsRepositoryConfigured
55
51
  } from "./domains/credits/infrastructure/CreditsRepositoryManager";
56
52
 
57
- // Presentation Layer - Hooks (Point to the bridge)
58
53
  // Presentation Layer - Hooks
59
54
  export { useAuthAwarePurchase } from "./domains/subscription/presentation/useAuthAwarePurchase";
60
55
  export { useCredits } from "./domains/credits/presentation/useCredits";
61
56
  export { useDeductCredit } from "./domains/credits/presentation/useDeductCredit";
62
57
  export { useFeatureGate } from "./domains/subscription/presentation/useFeatureGate";
63
- export { usePaywallVisibility } from "./domains/subscription/presentation/usePaywallVisibility";
58
+ export { usePaywallVisibility, paywallControl } from "./domains/subscription/presentation/usePaywallVisibility";
64
59
  export { usePremium } from "./domains/subscription/presentation/usePremium";
65
60
  export { useSubscriptionStatus } from "./domains/subscription/presentation/useSubscriptionStatus";
66
61
  export * from "./presentation/hooks/feedback/usePaywallFeedback";
67
62
  export * from "./presentation/hooks/feedback/useFeedbackSubmit";
68
63
 
69
-
70
64
  // Presentation Layer - Components
71
65
  export * from "./domains/subscription/presentation/components/details/PremiumDetailsCard";
72
66
  export * from "./domains/subscription/presentation/components/details/PremiumStatusBadge";
@@ -83,8 +77,6 @@ export type {
83
77
  DeductCreditsResult,
84
78
  } from "./domains/credits/core/Credits";
85
79
 
86
-
87
- // Utils
88
80
  // Utils
89
81
  export * from "./utils/creditMapper";
90
82
  export * from "./utils/packagePeriodUtils";
@@ -97,7 +89,6 @@ export * from "./utils/validation";
97
89
  export * from "./utils/dateUtils";
98
90
  export * from "./utils/appUtils";
99
91
 
100
-
101
92
  // Init Module Factory
102
93
  export {
103
94
  createSubscriptionInitModule,