@umituz/react-native-subscription 2.27.38 → 2.27.39

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.38",
3
+ "version": "2.27.39",
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",
@@ -3,11 +3,10 @@
3
3
  * Handles RevenueCat customer info update listeners with renewal detection
4
4
  */
5
5
 
6
- import {
7
- Purchases,
6
+ import Purchases, {
8
7
  type CustomerInfo,
9
8
  type CustomerInfoUpdateListener,
10
- } from "../utils/PurchasesSDK";
9
+ } from "react-native-purchases";
11
10
  import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
12
11
  import { syncPremiumStatus } from "../utils/PremiumStatusSyncer";
13
12
  import {
@@ -1,4 +1,4 @@
1
- import { Purchases, type PurchasesOffering } from "../utils/PurchasesSDK";
1
+ import Purchases, { type PurchasesOffering } from "react-native-purchases";
2
2
 
3
3
  export interface OfferingsFetcherDeps {
4
4
  isInitialized: () => boolean;
@@ -1,4 +1,4 @@
1
- import { Purchases, type PurchasesPackage } from "../utils/PurchasesSDK";
1
+ import Purchases, { type PurchasesPackage } from "react-native-purchases";
2
2
  import type { PurchaseResult } from "../../application/ports/IRevenueCatService";
3
3
  import { RevenueCatPurchaseError, RevenueCatInitializationError } from "../../domain/errors/RevenueCatError";
4
4
  import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
@@ -1,4 +1,4 @@
1
- import { Purchases } from "../utils/PurchasesSDK";
1
+ import Purchases from "react-native-purchases";
2
2
  import type { RestoreResult } from "../../application/ports/IRevenueCatService";
3
3
  import { RevenueCatRestoreError, RevenueCatInitializationError } from "../../domain/errors/RevenueCatError";
4
4
  import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
@@ -1,4 +1,4 @@
1
- import { Purchases, LOG_LEVEL } from "../utils/PurchasesSDK";
1
+ import Purchases, { LOG_LEVEL } from "react-native-purchases";
2
2
  import type { InitializeResult } from "../../application/ports/IRevenueCatService";
3
3
  import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
4
4
  import { resolveApiKey } from "../utils/ApiKeyResolver";
@@ -3,12 +3,12 @@
3
3
  * Main service class for RevenueCat operations
4
4
  */
5
5
 
6
- import {
7
- Purchases,
8
- type PurchasesOffering,
9
- type PurchasesPackage,
10
- type CustomerInfo,
11
- } from "../utils/PurchasesSDK";
6
+ import Purchases from "react-native-purchases";
7
+ import type {
8
+ PurchasesOffering,
9
+ PurchasesPackage,
10
+ CustomerInfo,
11
+ } from "react-native-purchases";
12
12
  import type {
13
13
  IRevenueCatService,
14
14
  InitializeResult,
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { useEffect, useState, useCallback } from "react";
18
- import { Purchases, type CustomerInfo } from "../../infrastructure/utils/PurchasesSDK";
18
+ import Purchases, { type CustomerInfo } from "react-native-purchases";
19
19
 
20
20
  export interface UseCustomerInfoResult {
21
21
  /** Current CustomerInfo from RevenueCat SDK */
@@ -1,40 +0,0 @@
1
- /**
2
- * Purchases SDK Wrapper
3
- * Handles ESM/CJS interop for react-native-purchases
4
- * All files should import from this module instead of directly from react-native-purchases
5
- */
6
-
7
- import PurchasesModule from "react-native-purchases";
8
- import type {
9
- CustomerInfo,
10
- CustomerInfoUpdateListener,
11
- PurchasesOffering,
12
- PurchasesPackage,
13
- LogHandler,
14
- } from "react-native-purchases";
15
-
16
- // Handle ESM/CJS interop - Metro bundler sometimes wraps default export
17
- type PurchasesType = typeof PurchasesModule;
18
- interface PurchasesModuleWithDefault {
19
- default?: PurchasesType;
20
- }
21
-
22
- const resolvedPurchases: PurchasesType =
23
- (PurchasesModule as unknown as PurchasesModuleWithDefault).default ?? PurchasesModule;
24
-
25
- // Re-export types
26
- export type {
27
- CustomerInfo,
28
- CustomerInfoUpdateListener,
29
- PurchasesOffering,
30
- PurchasesPackage,
31
- LogHandler,
32
- };
33
-
34
- // Re-export LOG_LEVEL enum
35
- export const LOG_LEVEL = resolvedPurchases.LOG_LEVEL;
36
-
37
- // Export resolved Purchases instance
38
- export const Purchases = resolvedPurchases;
39
-
40
- export default Purchases;