@umituz/react-native-subscription 2.27.54 → 2.27.56

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.54",
3
+ "version": "2.27.56",
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",
@@ -40,7 +40,8 @@
40
40
  "react": ">=18.2.0",
41
41
  "react-native": ">=0.74.0",
42
42
  "react-native-purchases": ">=7.0.0",
43
- "react-native-safe-area-context": ">=5.0.0"
43
+ "react-native-safe-area-context": ">=5.0.0",
44
+ "zustand": ">=5.0.0"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@expo/vector-icons": "^15.0.3",
@@ -6,11 +6,6 @@
6
6
  import type { SubscriptionStatus } from '../../domain/entities/SubscriptionStatus';
7
7
 
8
8
  export interface ISubscriptionService {
9
- /**
10
- * Get current subscription status
11
- */
12
- getStatus(userId: string): Promise<SubscriptionStatus | null>;
13
-
14
9
  /**
15
10
  * Activate a subscription
16
11
  */
@@ -1,2 +1,2 @@
1
- export * from "./entities";
2
- export * from "./value-objects";
1
+ export * from "./entities/Plan";
2
+ export * from "./value-objects/Config";
@@ -3,7 +3,7 @@
3
3
  * Defines app-specific subscription plans and settings
4
4
  */
5
5
 
6
- import type { Plan } from "../entities";
6
+ import type { Plan } from "../entities/Plan";
7
7
 
8
8
  export interface ConfigTranslations {
9
9
  readonly title: string;
@@ -4,4 +4,4 @@
4
4
  */
5
5
 
6
6
  export * from "./domain";
7
- export * from "./utils";
7
+ export * from "./utils/helpers";
@@ -6,7 +6,7 @@
6
6
  import React from "react";
7
7
  import { View, StyleSheet } from "react-native";
8
8
  import { FeatureItem } from "./FeatureItem";
9
- import type { SubscriptionFeature } from '../entities';
9
+ import type { SubscriptionFeature } from '../entities/types';
10
10
 
11
11
  interface FeatureListProps {
12
12
  features: SubscriptionFeature[];
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import type { ImageSourcePropType } from "react-native";
7
- import type { PaywallTranslations, PaywallLegalUrls, SubscriptionFeature } from "../entities";
7
+ import type { PaywallTranslations, PaywallLegalUrls, SubscriptionFeature } from "../entities/types";
8
8
  import type { PurchaseSource, PackageAllocationMap } from "../../../domain/entities/Credits";
9
9
 
10
10
  /**
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
3
  import { AtomicText, AtomicIcon, useAppDesignTokens } from "@umituz/react-native-design-system";
4
- import type { SubscriptionFeature } from "../entities";
4
+ import type { SubscriptionFeature } from "../entities/types";
5
5
  import { paywallModalStyles as styles } from "./PaywallModal.styles";
6
6
 
7
7
  export const PaywallFeatures: React.FC<{ features: SubscriptionFeature[] }> = ({ features }) => {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { View, TouchableOpacity } from "react-native";
3
3
  import { AtomicText, useAppDesignTokens } from "@umituz/react-native-design-system";
4
- import type { PaywallTranslations, PaywallLegalUrls } from "../entities";
4
+ import type { PaywallTranslations, PaywallLegalUrls } from "../entities/types";
5
5
  import { paywallModalStyles as styles } from "./PaywallModal.styles";
6
6
 
7
7
  interface PaywallFooterProps {
@@ -8,7 +8,7 @@ import { BaseModal, useAppDesignTokens, AtomicText, AtomicIcon, AtomicSpinner }
8
8
  import { Image } from "expo-image";
9
9
  import type { PurchasesPackage } from "react-native-purchases";
10
10
  import { PlanCard } from "./PlanCard";
11
- import type { SubscriptionFeature, PaywallTranslations, PaywallLegalUrls } from "../entities";
11
+ import type { SubscriptionFeature, PaywallTranslations, PaywallLegalUrls } from "../entities/types";
12
12
  import { paywallModalStyles as styles } from "./PaywallModal.styles";
13
13
  import { PaywallFeatures } from "./PaywallFeatures";
14
14
  import { PaywallFooter } from "./PaywallFooter";
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from "react";
2
- import type { PaywallTranslations, PaywallLegalUrls } from "../entities";
2
+ import type { PaywallTranslations, PaywallLegalUrls } from "../entities/types";
3
3
 
4
4
  type TranslationFunction = (key: string) => string;
5
5
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  // Entities
7
- export * from "./entities";
7
+ export * from "./entities/types";
8
8
 
9
9
  // Components
10
10
  export * from "./components";
@@ -55,12 +55,6 @@ export class SubscriptionService implements ISubscriptionService {
55
55
  }
56
56
  }
57
57
 
58
- // Alias for ISubscriptionService interface compliance
59
- async getStatus(userId: string): Promise<SubscriptionStatus | null> {
60
- const status = await this.getSubscriptionStatus(userId);
61
- return status.isPremium ? status : null;
62
- }
63
-
64
58
  async isPremium(userId: string): Promise<boolean> {
65
59
  const status = await this.getSubscriptionStatus(userId);
66
60
  return this.repository.isSubscriptionValid(status);
@@ -9,7 +9,3 @@ export * from "./priceUtils";
9
9
  export * from "./tierUtils";
10
10
  export * from "./types";
11
11
  export * from "./validation";
12
-
13
- // Logger (infrastructure utility re-exported for convenience)
14
- export { Logger, LOG_CATEGORY } from "../infrastructure/utils/Logger";
15
- export type { LogLevel, LogCategory, LogContext } from "../infrastructure/utils/Logger";
@@ -1 +0,0 @@
1
- export * from "./Plan";
@@ -1 +0,0 @@
1
- export * from "./Config";
@@ -1 +0,0 @@
1
- export * from "./helpers";
@@ -1,5 +0,0 @@
1
- /**
2
- * Paywall Entities Index
3
- */
4
-
5
- export * from "./types";