@umituz/react-native-subscription 2.27.75 → 2.27.77
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 +1 -1
- package/src/domains/paywall/components/PaywallContainer.tsx +2 -2
- package/src/domains/paywall/hooks/usePaywallActions.ts +1 -1
- package/src/domains/subscription/infrastructure/handlers/PackageHandler.ts +1 -1
- package/src/domains/subscription/infrastructure/handlers/PurchaseStatusResolver.ts +1 -1
- package/src/domains/subscription/infrastructure/services/CustomerInfoListenerManager.ts +1 -1
- package/src/domains/subscription/infrastructure/services/PurchaseHandler.ts +3 -3
- package/src/domains/subscription/infrastructure/services/RestoreHandler.ts +3 -3
- package/src/domains/subscription/infrastructure/services/RevenueCatInitializer.ts +1 -1
- package/src/domains/subscription/infrastructure/services/ServiceStateManager.ts +1 -1
- package/src/domains/subscription/infrastructure/utils/ApiKeyResolver.ts +1 -1
- package/src/domains/subscription/presentation/useSavedPurchaseAutoExecution.ts +1 -1
- package/src/domains/subscription/presentation/useSubscriptionStatus.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.77",
|
|
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,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import React, { useMemo, useEffect } from "react";
|
|
8
8
|
import { usePaywallVisibility } from "../../../presentation/hooks/usePaywallVisibility";
|
|
9
|
-
import { useSubscriptionPackages } from "
|
|
10
|
-
import { useRevenueCatTrialEligibility } from "
|
|
9
|
+
import { useSubscriptionPackages } from "../../subscription/infrastructure/hooks/useSubscriptionPackages";
|
|
10
|
+
import { useRevenueCatTrialEligibility } from "../../subscription/infrastructure/hooks/useRevenueCatTrialEligibility";
|
|
11
11
|
import { createCreditAmountsFromPackages } from "../../../utils/creditMapper";
|
|
12
12
|
import { PaywallModal, type TrialEligibilityInfo } from "./PaywallModal";
|
|
13
13
|
import { usePaywallActions } from "../hooks/usePaywallActions";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback } from "react";
|
|
2
2
|
import type { PurchasesPackage } from "react-native-purchases";
|
|
3
|
-
import { useRestorePurchase } from "
|
|
3
|
+
import { useRestorePurchase } from "../../subscription/infrastructure/hooks/useRestorePurchase";
|
|
4
4
|
import { useAuthAwarePurchase } from "../../../presentation/hooks/useAuthAwarePurchase";
|
|
5
5
|
import type { PurchaseSource } from "../../credits/core/Credits";
|
|
6
6
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { PurchasesPackage, CustomerInfo } from "react-native-purchases";
|
|
7
7
|
import type { IRevenueCatService } from "../../../../shared/application/ports/IRevenueCatService";
|
|
8
|
-
import { getPremiumEntitlement } from "../../
|
|
8
|
+
import { getPremiumEntitlement } from "../../core/RevenueCatTypes";
|
|
9
9
|
import { PurchaseStatusResolver, type PremiumStatus } from "./PurchaseStatusResolver";
|
|
10
10
|
|
|
11
11
|
export interface RestoreResultInfo {
|
|
@@ -7,7 +7,7 @@ import Purchases, {
|
|
|
7
7
|
type CustomerInfo,
|
|
8
8
|
type CustomerInfoUpdateListener,
|
|
9
9
|
} from "react-native-purchases";
|
|
10
|
-
import type { RevenueCatConfig } from "../../
|
|
10
|
+
import type { RevenueCatConfig } from "../../core/RevenueCatConfig";
|
|
11
11
|
import { syncPremiumStatus } from "../utils/PremiumStatusSyncer";
|
|
12
12
|
import {
|
|
13
13
|
detectRenewal,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Purchases, { type PurchasesPackage } from "react-native-purchases";
|
|
2
2
|
import type { PurchaseResult } from "../../../../shared/application/ports/IRevenueCatService";
|
|
3
|
-
import { RevenueCatPurchaseError, RevenueCatInitializationError } from "../../
|
|
4
|
-
import type { RevenueCatConfig } from "../../
|
|
5
|
-
import { isUserCancelledError, getErrorMessage } from "../../
|
|
3
|
+
import { RevenueCatPurchaseError, RevenueCatInitializationError } from "../../core/RevenueCatError";
|
|
4
|
+
import type { RevenueCatConfig } from "../../core/RevenueCatConfig";
|
|
5
|
+
import { isUserCancelledError, getErrorMessage } from "../../core/RevenueCatTypes";
|
|
6
6
|
import { syncPremiumStatus, notifyPurchaseCompleted } from "../utils/PremiumStatusSyncer";
|
|
7
7
|
import { getSavedPurchase, clearSavedPurchase } from "../../../presentation/hooks/useAuthAwarePurchase";
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Purchases from "react-native-purchases";
|
|
2
2
|
import type { RestoreResult } from "../../../../shared/application/ports/IRevenueCatService";
|
|
3
|
-
import { RevenueCatRestoreError, RevenueCatInitializationError } from "../../
|
|
4
|
-
import type { RevenueCatConfig } from "../../
|
|
5
|
-
import { getErrorMessage } from "../../
|
|
3
|
+
import { RevenueCatRestoreError, RevenueCatInitializationError } from "../../core/RevenueCatError";
|
|
4
|
+
import type { RevenueCatConfig } from "../../core/RevenueCatConfig";
|
|
5
|
+
import { getErrorMessage } from "../../core/RevenueCatTypes";
|
|
6
6
|
import { syncPremiumStatus, notifyRestoreCompleted } from "../utils/PremiumStatusSyncer";
|
|
7
7
|
|
|
8
8
|
export interface RestoreHandlerDeps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Purchases, { LOG_LEVEL, type CustomerInfo, type PurchasesOfferings } from "react-native-purchases";
|
|
2
2
|
import type { InitializeResult } from "../../../../shared/application/ports/IRevenueCatService";
|
|
3
|
-
import type { RevenueCatConfig } from "../../
|
|
3
|
+
import type { RevenueCatConfig } from "../../core/RevenueCatConfig";
|
|
4
4
|
import { resolveApiKey } from "../utils/ApiKeyResolver";
|
|
5
5
|
|
|
6
6
|
export interface InitializerDeps {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@umituz/react-native-auth";
|
|
12
12
|
import { getSavedPurchase, clearSavedPurchase } from "./useAuthAwarePurchase";
|
|
13
13
|
import { usePremium } from "./usePremium";
|
|
14
|
-
import { SubscriptionManager } from "
|
|
14
|
+
import { SubscriptionManager } from "../infrastructure/managers/SubscriptionManager";
|
|
15
15
|
import { usePurchaseLoadingStore } from "../stores";
|
|
16
16
|
|
|
17
17
|
export interface UseSavedPurchaseAutoExecutionParams {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useAuthStore,
|
|
11
11
|
selectUserId,
|
|
12
12
|
} from "@umituz/react-native-auth";
|
|
13
|
-
import { SubscriptionManager } from "
|
|
13
|
+
import { SubscriptionManager } from "../infrastructure/managers/SubscriptionManager";
|
|
14
14
|
|
|
15
15
|
export const subscriptionStatusQueryKeys = {
|
|
16
16
|
all: ["subscriptionStatus"] as const,
|