@umituz/react-native-subscription 2.14.98 → 2.14.100

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.
Files changed (92) hide show
  1. package/README.md +211 -395
  2. package/package.json +1 -1
  3. package/src/application/README.md +46 -225
  4. package/src/application/ports/README.md +42 -97
  5. package/src/domain/README.md +36 -384
  6. package/src/domain/constants/README.md +0 -56
  7. package/src/domain/entities/README.md +43 -169
  8. package/src/domain/errors/README.md +33 -287
  9. package/src/domain/value-objects/README.md +43 -179
  10. package/src/domains/README.md +52 -0
  11. package/src/domains/README.md.bak +274 -0
  12. package/src/domains/config/README.md +93 -383
  13. package/src/domains/config/domain/README.md +37 -0
  14. package/src/domains/config/domain/entities/README.md +41 -0
  15. package/src/domains/paywall/README.md +99 -369
  16. package/src/domains/paywall/components/README.md +34 -178
  17. package/src/domains/paywall/entities/README.md +34 -193
  18. package/src/domains/paywall/hooks/README.md +34 -122
  19. package/src/domains/wallet/README.md +34 -275
  20. package/src/domains/wallet/README.md.bak +209 -0
  21. package/src/domains/wallet/domain/README.md +34 -101
  22. package/src/domains/wallet/domain/entities/README.md +34 -115
  23. package/src/domains/wallet/domain/errors/README.md +34 -151
  24. package/src/domains/wallet/infrastructure/README.md +34 -89
  25. package/src/domains/wallet/presentation/components/README.md +34 -224
  26. package/src/domains/wallet/presentation/hooks/README.md +34 -248
  27. package/src/infrastructure/README.md +37 -496
  28. package/src/infrastructure/mappers/README.md +0 -13
  29. package/src/infrastructure/repositories/README.md +74 -360
  30. package/src/infrastructure/services/README.md +95 -370
  31. package/src/presentation/README.md +123 -408
  32. package/src/presentation/README.md.bak +172 -0
  33. package/src/presentation/components/README.md +151 -179
  34. package/src/presentation/components/README.md.bak +217 -0
  35. package/src/presentation/components/details/CreditRow.md +65 -310
  36. package/src/presentation/components/details/DetailRow.md +63 -255
  37. package/src/presentation/components/details/PremiumDetailsCard.md +65 -238
  38. package/src/presentation/components/details/PremiumStatusBadge.md +64 -239
  39. package/src/presentation/components/details/README.md +97 -447
  40. package/src/presentation/components/feedback/PaywallFeedbackModal.md +63 -287
  41. package/src/presentation/components/feedback/README.md +97 -445
  42. package/src/presentation/components/paywall/PaywallModal.md +66 -416
  43. package/src/presentation/components/paywall/README.md +50 -186
  44. package/src/presentation/components/sections/README.md +97 -466
  45. package/src/presentation/components/sections/SubscriptionSection.md +92 -244
  46. package/src/presentation/hooks/README.md +154 -741
  47. package/src/presentation/hooks/useAuthAwarePurchase.md +58 -325
  48. package/src/presentation/hooks/useAuthGate.md +61 -375
  49. package/src/presentation/hooks/useAuthSubscriptionSync.md +66 -370
  50. package/src/presentation/hooks/useCreditChecker.md +73 -378
  51. package/src/presentation/hooks/useCredits.md +74 -313
  52. package/src/presentation/hooks/useCredits.md.bak +231 -0
  53. package/src/presentation/hooks/useCreditsGate.md +66 -318
  54. package/src/presentation/hooks/useDeductCredit.md +96 -156
  55. package/src/presentation/hooks/useDevTestCallbacks.md +63 -394
  56. package/src/presentation/hooks/useFeatureGate.md +105 -150
  57. package/src/presentation/hooks/useFeatureGate.md.bak +284 -0
  58. package/src/presentation/hooks/useInitializeCredits.md +64 -430
  59. package/src/presentation/hooks/usePaywall.md +61 -306
  60. package/src/presentation/hooks/usePaywallOperations.md +64 -458
  61. package/src/presentation/hooks/usePaywallVisibility.md +67 -316
  62. package/src/presentation/hooks/usePremium.md +84 -226
  63. package/src/presentation/hooks/usePremiumGate.md +60 -395
  64. package/src/presentation/hooks/usePremiumWithCredits.md +64 -401
  65. package/src/presentation/hooks/useSubscription.md +66 -422
  66. package/src/presentation/hooks/useSubscriptionDetails.md +65 -410
  67. package/src/presentation/hooks/useSubscriptionGate.md +80 -164
  68. package/src/presentation/hooks/useSubscriptionSettingsConfig.md +66 -346
  69. package/src/presentation/hooks/useSubscriptionStatus.md +66 -396
  70. package/src/presentation/hooks/useUserTier.md +63 -328
  71. package/src/presentation/hooks/useUserTierWithRepository.md +64 -424
  72. package/src/presentation/screens/README.md +48 -190
  73. package/src/presentation/types/README.md +0 -16
  74. package/src/presentation/utils/README.md +0 -21
  75. package/src/revenuecat/README.md +99 -518
  76. package/src/revenuecat/application/README.md +43 -0
  77. package/src/revenuecat/application/ports/README.md +41 -0
  78. package/src/revenuecat/domain/README.md +42 -141
  79. package/src/revenuecat/domain/constants/README.md +41 -0
  80. package/src/revenuecat/domain/entities/README.md +42 -0
  81. package/src/revenuecat/domain/errors/README.md +47 -191
  82. package/src/revenuecat/domain/types/README.md +41 -0
  83. package/src/revenuecat/domain/value-objects/README.md +41 -0
  84. package/src/revenuecat/infrastructure/README.md +41 -0
  85. package/src/revenuecat/infrastructure/config/README.md +32 -23
  86. package/src/revenuecat/infrastructure/handlers/README.md +41 -0
  87. package/src/revenuecat/infrastructure/managers/README.md +34 -42
  88. package/src/revenuecat/infrastructure/services/README.md +42 -0
  89. package/src/revenuecat/infrastructure/utils/README.md +41 -0
  90. package/src/revenuecat/presentation/README.md +42 -0
  91. package/src/revenuecat/presentation/hooks/README.md +29 -35
  92. package/src/utils/README.md +38 -525
@@ -2,193 +2,51 @@
2
2
 
3
3
  Tam ekran UI bileşenleri ve ekranlar.
4
4
 
5
- ## Bileşenler
6
-
7
- - [SubscriptionDetailScreen](#subscriptiondetailscreen)
8
-
9
- ## SubscriptionDetailScreen
10
-
11
- Abonelik detaylarını gösteren tam ekran bileşeni.
12
-
13
- ### Kullanım
14
-
15
- ```typescript
16
- import { SubscriptionDetailScreen } from '@umituz/react-native-subscription';
17
-
18
- function App() {
19
- return (
20
- <Stack.Screen
21
- name="SubscriptionDetail"
22
- component={SubscriptionDetailScreen}
23
- options={{
24
- title: 'Subscription',
25
- }}
26
- />
27
- );
28
- }
29
- ```
30
-
31
- ### Props
32
-
33
- ```typescript
34
- interface SubscriptionDetailScreenProps {
35
- route: {
36
- key: string;
37
- name: string;
38
- params?: {
39
- userId?: string;
40
- showUpgradeButton?: boolean;
41
- };
42
- };
43
- navigation: any;
44
- }
45
- ```
46
-
47
- ### Özellikler
48
-
49
- - Abonelik durumunu gösterir
50
- - Paket detaylarını görüntüler
51
- - Yönetim butonları sağlar
52
- - Refresh desteği
53
- - Yönetilebilir stil
54
-
55
- ## Ekran Akışları
56
-
57
- ### 1. Settings → Subscription Detail
58
-
59
- ```typescript
60
- function SettingsScreen({ navigation }) {
61
- return (
62
- <View>
63
- <Button
64
- onPress={() => navigation.navigate('SubscriptionDetail')}
65
- title="Manage Subscription"
66
- />
67
- </View>
68
- );
69
- }
70
- ```
71
-
72
- ### 2. Paywall → Subscription Detail
73
-
74
- ```typescript
75
- function PaywallFlow() {
76
- const navigation = useNavigation();
77
-
78
- const handlePurchaseSuccess = () => {
79
- navigation.navigate('SubscriptionDetail');
80
- };
81
-
82
- return (
83
- <PaywallModal onPurchase={handlePurchaseSuccess} />
84
- );
85
- }
86
- ```
87
-
88
- ## Özelleştirme
89
-
90
- ### Custom Header
91
-
92
- ```typescript
93
- <Stack.Screen
94
- name="SubscriptionDetail"
95
- component={SubscriptionDetailScreen}
96
- options={{
97
- title: 'My Subscription',
98
- headerStyle: {
99
- backgroundColor: '#FF6B6B',
100
- },
101
- headerTintColor: '#fff',
102
- headerTitleStyle: {
103
- fontWeight: 'bold',
104
- },
105
- }}
106
- />
107
- ```
108
-
109
- ### Navigation Integrasyonu
110
-
111
- ```typescript
112
- import { createStackNavigator } from '@react-navigation/stack';
113
-
114
- const Stack = createStackNavigator();
115
-
116
- function SubscriptionStack() {
117
- return (
118
- <Stack.Navigator>
119
- <Stack.Screen
120
- name="SubscriptionDetail"
121
- component={SubscriptionDetailScreen}
122
- options={{
123
- title: 'Subscription',
124
- headerRight: () => (
125
- <Button onPress={handleRefresh} title="Refresh" />
126
- ),
127
- }}
128
- />
129
- </Stack.Navigator>
130
- );
131
- }
132
- ```
133
-
134
- ## Örnek Implementasyon
135
-
136
- ```typescript
137
- import React from 'react';
138
- import { createStackNavigator } from '@react-navigation/stack';
139
- import { SubscriptionDetailScreen } from '@umituz/react-native-subscription';
140
-
141
- const Stack = createStackNavigator();
142
-
143
- function App() {
144
- return (
145
- <NavigationContainer>
146
- <Stack.Navigator
147
- screenOptions={{
148
- headerShown: true,
149
- cardStyle: { backgroundColor: '#f5f5f5' },
150
- }}
151
- >
152
- <Stack.Screen
153
- name="Home"
154
- component={HomeScreen}
155
- options={{ title: 'Home' }}
156
- />
157
- <Stack.Screen
158
- name="SubscriptionDetail"
159
- component={SubscriptionDetailScreen}
160
- options={{
161
- title: 'My Subscription',
162
- headerStyle: {
163
- backgroundColor: '#FF6B6B',
164
- },
165
- headerTintColor: '#fff',
166
- }}
167
- />
168
- </Stack.Navigator>
169
- </NavigationContainer>
170
- );
171
- }
172
-
173
- function HomeScreen({ navigation }) {
174
- const { isPremium } = usePremium();
175
-
176
- return (
177
- <View>
178
- <Text>Welcome!</Text>
179
- <Button
180
- onPress={() => navigation.navigate('SubscriptionDetail')}
181
- title="View Subscription"
182
- />
183
- </View>
184
- );
185
- }
186
- ```
187
-
188
- ## Best Practices
189
-
190
- 1. **Navigation**: Screen'i doğru navigation stack'e ekleyin
191
- 2. **Header**: Uygun başlık ve stiller kullanın
192
- 3. **Back Button**: Kullanıcının geri dönmesini sağlayın
193
- 4. **Loading**: Yükleme durumlarını gösterin
194
- 5. **Error**: Hata durumlarını graceful handle edin
5
+ ## Location
6
+
7
+ `src/presentation/screens/`
8
+
9
+ ## Strategy
10
+
11
+ Tam ekran kullanıcı arayüzü bileşenleri ve navigasyon akışlarını içerir. Abonelik detaylarını gösterir ve yönetim işlevleri sağlar.
12
+
13
+ ## Restrictions
14
+
15
+ ### REQUIRED
16
+
17
+ - MUST integrate properly with React Navigation
18
+ - MUST provide appropriate headers and navigation
19
+ - MUST handle loading states gracefully
20
+ - MUST handle error states gracefully
21
+ - MUST support back navigation
22
+ - MUST be responsive across different screen sizes
23
+
24
+ ### PROHIBITED
25
+
26
+ - MUST NOT bypass navigation stack
27
+ - MUST NOT create navigation dead-ends
28
+ - MUST NOT block user from navigating away
29
+ - MUST NOT hardcode navigation routes
30
+
31
+ ### CRITICAL
32
+
33
+ - Always provide clear navigation paths
34
+ - Handle all loading and error states
35
+ - Ensure proper back button functionality
36
+ - Support deep linking when applicable
37
+ - Maintain consistent styling with rest of app
38
+
39
+ ## AI Agent Guidelines
40
+
41
+ When working with screens:
42
+ 1. Navigation - screen'i doğru navigation stack'e ekleyin
43
+ 2. Header - uygun başlık ve stiller kullanın
44
+ 3. Back Button - kullanıcının geri dönmesini sağlayın
45
+ 4. Loading - yükleme durumlarını gösterin
46
+ 5. Error - hata durumlarını graceful handle edin
47
+
48
+ ## Related Documentation
49
+
50
+ - [Presentation Layer](../README.md)
51
+ - [Components](../components/README.md)
52
+ - [Hooks](../hooks/README.md)
@@ -16,22 +16,6 @@ This directory contains all type definitions used by presentation components and
16
16
 
17
17
  ## Key Exports
18
18
 
19
- ```typescript
20
- // Subscription Settings
21
- export type {
22
- SubscriptionSettingsConfig,
23
- SubscriptionSettingsItemConfig,
24
- SubscriptionSettingsTranslations,
25
- } from './SubscriptionSettingsTypes';
26
-
27
- // Paywall
28
- export type {
29
- PaywallConfig,
30
- PaywallTrigger,
31
- PaywallPackage,
32
- } from './PaywallTypes';
33
- ```
34
-
35
19
  ## Related
36
20
 
37
21
  - [Hooks](../hooks/README.md)
@@ -17,35 +17,14 @@ This directory contains utility functions used by presentation components and ho
17
17
 
18
18
  Format ISO date string to localized date string.
19
19
 
20
- ```typescript
21
- formatDate('2024-01-15T10:30:00Z'); // "January 15, 2024"
22
- ```
23
-
24
20
  ### calculateDaysRemaining
25
21
 
26
22
  Calculate days between now and expiration date.
27
23
 
28
- ```typescript
29
- calculateDaysRemaining('2024-02-15T10:30:00Z'); // 31
30
- ```
31
-
32
24
  ### convertPurchasedAt
33
25
 
34
26
  Convert purchasedAt date to ISO string.
35
27
 
36
- ```typescript
37
- convertPurchasedAt(new Date()); // "2024-01-15T10:30:00Z"
38
- ```
39
-
40
- ## Usage
41
-
42
- ```typescript
43
- import { formatDate, calculateDaysRemaining } from '../utils/subscriptionDateUtils';
44
-
45
- const expirationDisplay = formatDate(subscription.expirationDate);
46
- const daysLeft = calculateDaysRemaining(subscription.expirationDate);
47
- ```
48
-
49
28
  ## Related
50
29
 
51
30
  - [Hooks](../hooks/README.md)