expo-iap 3.1.22 → 3.1.23

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/build/index.js CHANGED
@@ -303,7 +303,7 @@ export const requestPurchase = async (args) => {
303
303
  }
304
304
  const payload = {
305
305
  type: canonical === 'in-app' ? 'in-app' : 'subs',
306
- request,
306
+ request: { ios: normalizedRequest },
307
307
  useAlternativeBilling: args.useAlternativeBilling,
308
308
  };
309
309
  const purchase = (await ExpoIapModule.requestPurchase(payload));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,mBAAmB;AACnB,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,0BAA0B,EAC1B,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAyB7C,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAClC,OAAO,EAAC,mBAAmB,EAAqB,MAAM,sBAAsB,CAAC;AAE7E,mBAAmB;AACnB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAE9B,gCAAgC;AAChC,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,oDAAoC,CAAA;IACpC,gDAAgC,CAAA;IAChC,2DAA2C,CAAA;IAC3C,wEAAwD,CAAA;AAC1D,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAwBD,uDAAuD;AACvD,MAAM,CAAC,MAAM,OAAO,GAA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ACd,gBAAgB,EAChB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC","sourcesContent":["// External dependencies\nimport {requireNativeModule} from 'expo-modules-core';\nimport {Platform} from 'react-native';\n\n// Internal modules\nimport ExpoIapModule from './ExpoIapModule';\nimport {\n isProductIOS,\n validateReceiptIOS,\n deepLinkToSubscriptionsIOS,\n syncIOS,\n} from './modules/ios';\nimport {\n isProductAndroid,\n validateReceiptAndroid,\n deepLinkToSubscriptionsAndroid,\n} from './modules/android';\nimport {ExpoIapConsole} from './utils/debug';\n\n// Types\nimport type {\n ActiveSubscription,\n AndroidSubscriptionOfferInput,\n DeepLinkOptions,\n FetchProductsResult,\n MutationField,\n MutationRequestPurchaseArgs,\n MutationValidateReceiptArgs,\n Product,\n ProductQueryType,\n ProductSubscription,\n Purchase,\n PurchaseOptions,\n QueryField,\n RequestPurchasePropsByPlatforms,\n RequestPurchaseAndroidProps,\n RequestPurchaseIosProps,\n RequestSubscriptionPropsByPlatforms,\n RequestSubscriptionAndroidProps,\n RequestSubscriptionIosProps,\n UserChoiceBillingDetails,\n} from './types';\nimport {ErrorCode} from './types';\nimport {createPurchaseError, type PurchaseError} from './utils/errorMapping';\n\n// Export all types\nexport * from './types';\nexport * from './modules/android';\nexport * from './modules/ios';\n\n// Get the native constant value\nexport enum OpenIapEvent {\n PurchaseUpdated = 'purchase-updated',\n PurchaseError = 'purchase-error',\n PromotedProductIOS = 'promoted-product-ios',\n UserChoiceBillingAndroid = 'user-choice-billing-android',\n}\n\ntype ExpoIapEventPayloads = {\n [OpenIapEvent.PurchaseUpdated]: Purchase;\n [OpenIapEvent.PurchaseError]: PurchaseError;\n [OpenIapEvent.PromotedProductIOS]: Product;\n [OpenIapEvent.UserChoiceBillingAndroid]: UserChoiceBillingDetails;\n};\n\ntype ExpoIapEventListener<E extends OpenIapEvent> = (\n payload: ExpoIapEventPayloads[E],\n) => void;\n\ntype ExpoIapEmitter = {\n addListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): {remove: () => void};\n removeListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): void;\n};\n\n// Ensure the emitter has proper EventEmitter interface\nexport const emitter = (ExpoIapModule ||\n requireNativeModule('ExpoIap')) as ExpoIapEmitter;\n\n/**\n * TODO(v3.1.0): Remove legacy 'inapp' alias once downstream apps migrate to 'in-app'.\n */\nexport type ProductTypeInput = ProductQueryType | 'inapp';\n\nconst normalizeProductType = (type?: ProductTypeInput) => {\n if (type === 'inapp') {\n ExpoIapConsole.warn(\n \"'inapp' product type is deprecated and will be removed in v3.1.0. Use 'in-app' instead.\",\n );\n }\n\n if (!type || type === 'inapp' || type === 'in-app') {\n return {\n canonical: 'in-app' as ProductQueryType,\n native: 'in-app' as const,\n };\n }\n if (type === 'subs') {\n return {\n canonical: 'subs' as ProductQueryType,\n native: 'subs' as const,\n };\n }\n if (type === 'all') {\n return {\n canonical: 'all' as ProductQueryType,\n native: 'all' as const,\n };\n }\n throw new Error(`Unsupported product type: ${type}`);\n};\n\nconst normalizePurchasePlatform = (purchase: Purchase): Purchase => {\n const platform = purchase.platform;\n if (typeof platform !== 'string') {\n return purchase;\n }\n\n const lowered = platform.toLowerCase();\n if (lowered === platform || (lowered !== 'ios' && lowered !== 'android')) {\n return purchase;\n }\n\n return {...purchase, platform: lowered};\n};\n\nconst normalizePurchaseArray = (purchases: Purchase[]): Purchase[] =>\n purchases.map((purchase) => normalizePurchasePlatform(purchase));\n\nexport const purchaseUpdatedListener = (\n listener: (event: Purchase) => void,\n) => {\n const wrappedListener = (event: Purchase) => {\n const normalized = normalizePurchasePlatform(event);\n listener(normalized);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseUpdated,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\nexport const purchaseErrorListener = (\n listener: (error: PurchaseError) => void,\n) => {\n const wrappedListener = (error: PurchaseError) => {\n listener(error);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseError,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\n/**\n * iOS-only listener for App Store promoted product events.\n * This fires when a user taps on a promoted product in the App Store.\n *\n * @param listener - Callback function that receives the promoted product details\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = promotedProductListenerIOS((product) => {\n * console.log('Promoted product:', product);\n * // Handle the promoted product\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform iOS\n */\nexport const promotedProductListenerIOS = (\n listener: (product: Product) => void,\n) => {\n if (Platform.OS !== 'ios') {\n ExpoIapConsole.warn(\n 'promotedProductListenerIOS: This listener is only available on iOS',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.PromotedProductIOS, listener);\n};\n\n/**\n * Android-only listener for User Choice Billing events.\n * This fires when a user selects alternative billing instead of Google Play billing\n * in the User Choice Billing dialog (only in 'user-choice' mode).\n *\n * @param listener - Callback function that receives the external transaction token and product IDs\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = userChoiceBillingListenerAndroid((details) => {\n * console.log('User selected alternative billing');\n * console.log('Token:', details.externalTransactionToken);\n * console.log('Products:', details.products);\n *\n * // Process payment in your system, then report token to Google\n * await processPaymentAndReportToken(details);\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform Android\n */\nexport const userChoiceBillingListenerAndroid = (\n listener: (details: UserChoiceBillingDetails) => void,\n) => {\n if (Platform.OS !== 'android') {\n ExpoIapConsole.warn(\n 'userChoiceBillingListenerAndroid: This listener is only available on Android',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.UserChoiceBillingAndroid, listener);\n};\n\nexport const initConnection: MutationField<'initConnection'> = async (config) =>\n ExpoIapModule.initConnection(config ?? null);\n\nexport const endConnection: MutationField<'endConnection'> = async () =>\n ExpoIapModule.endConnection();\n\n/**\n * Fetch products with unified API (v2.7.0+)\n *\n * @param request - Product fetch configuration\n * @param request.skus - Array of product SKUs to fetch\n * @param request.type - Product query type: 'in-app', 'subs', or 'all'\n */\nexport const fetchProducts: QueryField<'fetchProducts'> = async (request) => {\n ExpoIapConsole.debug('fetchProducts called with:', request);\n const {skus, type} = request ?? {};\n\n if (!Array.isArray(skus) || skus.length === 0) {\n throw createPurchaseError({\n message: 'No SKUs provided',\n code: ErrorCode.EmptySkuList,\n });\n }\n\n const {canonical, native} = normalizeProductType(\n type as ProductTypeInput | undefined,\n );\n const skuSet = new Set(skus);\n\n const filterIosItems = (\n items: unknown[],\n ): Product[] | ProductSubscription[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductIOS(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const filterAndroidItems = (\n items: unknown[],\n ): Product[] | ProductSubscription[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductAndroid(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const castResult = (\n items: Product[] | ProductSubscription[],\n ): FetchProductsResult => {\n if (canonical === 'in-app') {\n return items as Product[];\n }\n if (canonical === 'subs') {\n return items as ProductSubscription[];\n }\n return items;\n };\n\n if (Platform.OS === 'ios') {\n const rawItems = await ExpoIapModule.fetchProducts({skus, type: native});\n return castResult(filterIosItems(rawItems));\n }\n\n if (Platform.OS === 'android') {\n const rawItems = await ExpoIapModule.fetchProducts(native, skus);\n return castResult(filterAndroidItems(rawItems));\n }\n\n throw new Error('Unsupported platform');\n};\n\nexport const getAvailablePurchases: QueryField<\n 'getAvailablePurchases'\n> = async (options) => {\n const normalizedOptions: PurchaseOptions = {\n alsoPublishToEventListenerIOS:\n options?.alsoPublishToEventListenerIOS ?? false,\n onlyIncludeActiveItemsIOS: options?.onlyIncludeActiveItemsIOS ?? true,\n };\n\n const resolvePurchases: () => Promise<Purchase[]> =\n Platform.select({\n ios: () =>\n ExpoIapModule.getAvailableItems(\n normalizedOptions.alsoPublishToEventListenerIOS,\n normalizedOptions.onlyIncludeActiveItemsIOS,\n ) as Promise<Purchase[]>,\n android: () => ExpoIapModule.getAvailableItems() as Promise<Purchase[]>,\n }) ?? (() => Promise.resolve([] as Purchase[]));\n\n const purchases = await resolvePurchases();\n return normalizePurchaseArray(purchases as Purchase[]);\n};\n\n/**\n * Get all active subscriptions with detailed information.\n * Uses native OpenIAP module for accurate subscription status and renewal info.\n *\n * On iOS: Returns subscriptions with renewalInfoIOS containing pendingUpgradeProductId,\n * willAutoRenew, autoRenewPreference, and other renewal details.\n *\n * On Android: Filters available purchases to find active subscriptions (fallback implementation).\n *\n * @param subscriptionIds - Optional array of subscription product IDs to filter. If not provided, returns all active subscriptions.\n * @returns Promise resolving to array of active subscriptions with details\n *\n * @example\n * ```typescript\n * // Get all active subscriptions\n * const subs = await getActiveSubscriptions();\n *\n * // Get specific subscriptions\n * const premiumSubs = await getActiveSubscriptions(['premium', 'premium_year']);\n *\n * // Check for pending upgrades (iOS)\n * subs.forEach(sub => {\n * if (sub.renewalInfoIOS?.pendingUpgradeProductId) {\n * console.log(`Upgrade pending to: ${sub.renewalInfoIOS.pendingUpgradeProductId}`);\n * }\n * });\n * ```\n */\nexport const getActiveSubscriptions: QueryField<\n 'getActiveSubscriptions'\n> = async (subscriptionIds) => {\n const result = await ExpoIapModule.getActiveSubscriptions(\n subscriptionIds ?? null,\n );\n return (result ?? []) as ActiveSubscription[];\n};\n\n/**\n * Check if user has any active subscriptions.\n *\n * @param subscriptionIds - Optional array of subscription product IDs to check. If not provided, checks all subscriptions.\n * @returns Promise resolving to true if user has at least one active subscription\n *\n * @example\n * ```typescript\n * // Check any active subscription\n * const hasAny = await hasActiveSubscriptions();\n *\n * // Check specific subscriptions\n * const hasPremium = await hasActiveSubscriptions(['premium', 'premium_year']);\n * ```\n */\nexport const hasActiveSubscriptions: QueryField<\n 'hasActiveSubscriptions'\n> = async (subscriptionIds) => {\n return !!(await ExpoIapModule.hasActiveSubscriptions(\n subscriptionIds ?? null,\n ));\n};\n\nexport const getStorefront: QueryField<'getStorefront'> = async () => {\n if (Platform.OS !== 'ios' && Platform.OS !== 'android') {\n return '';\n }\n return ExpoIapModule.getStorefront();\n};\n\n/**\n * Helper to normalize request props to platform-specific format\n */\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'ios',\n): RequestPurchaseIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'android',\n): RequestPurchaseAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'ios',\n): RequestSubscriptionIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'android',\n): RequestSubscriptionAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request:\n | RequestPurchasePropsByPlatforms\n | RequestSubscriptionPropsByPlatforms,\n platform: 'ios' | 'android',\n) {\n // Platform-specific format - directly return the appropriate platform data\n return platform === 'ios' ? request.ios : request.android;\n}\n\n/**\n * Request a purchase for products or subscriptions.\n *\n * @param requestObj - Purchase request configuration\n * @param requestObj.request - Platform-specific purchase parameters\n * @param requestObj.type - Type of purchase: 'in-app' for products (default) or 'subs' for subscriptions\n *\n * @example\n * ```typescript\n * // Product purchase\n * await requestPurchase({\n * request: {\n * ios: { sku: productId },\n * android: { skus: [productId] }\n * },\n * type: 'in-app'\n * });\n *\n * // Subscription purchase\n * await requestPurchase({\n * request: {\n * ios: { sku: subscriptionId },\n * android: {\n * skus: [subscriptionId],\n * subscriptionOffers: [{ sku: subscriptionId, offerToken: 'token' }]\n * }\n * },\n * type: 'subs'\n * });\n * ```\n */\nexport const requestPurchase: MutationField<'requestPurchase'> = async (\n args,\n) => {\n const {request, type} = args;\n const {canonical, native} = normalizeProductType(type as ProductTypeInput);\n const isInAppPurchase = canonical === 'in-app';\n\n if (Platform.OS === 'ios') {\n const normalizedRequest = normalizeRequestProps(request, 'ios');\n\n if (!normalizedRequest?.sku) {\n throw new Error(\n 'Invalid request for iOS. The `sku` property is required and must be a string.',\n );\n }\n\n if (canonical !== 'in-app' && canonical !== 'subs') {\n throw new Error(`Unsupported product type: ${canonical}`);\n }\n\n const payload: MutationRequestPurchaseArgs = {\n type: canonical === 'in-app' ? 'in-app' : 'subs',\n request,\n useAlternativeBilling: args.useAlternativeBilling,\n };\n\n const purchase = (await ExpoIapModule.requestPurchase(payload)) as\n | Purchase\n | Purchase[]\n | null;\n\n if (Array.isArray(purchase)) {\n return normalizePurchaseArray(purchase);\n }\n\n if (purchase) {\n return normalizePurchasePlatform(purchase);\n }\n\n return canonical === 'subs' ? [] : null;\n }\n\n if (Platform.OS === 'android') {\n if (isInAppPurchase) {\n const normalizedRequest = normalizeRequestProps(\n request as RequestPurchasePropsByPlatforms,\n 'android',\n ) as RequestPurchaseAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Android. The `skus` property is required and must be a non-empty array.',\n );\n }\n\n const {\n skus,\n obfuscatedAccountIdAndroid,\n obfuscatedProfileIdAndroid,\n isOfferPersonalized,\n } = normalizedRequest;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken: undefined,\n replacementMode: -1,\n obfuscatedAccountId: obfuscatedAccountIdAndroid,\n obfuscatedProfileId: obfuscatedProfileIdAndroid,\n offerTokenArr: [],\n isOfferPersonalized: isOfferPersonalized ?? false,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n if (canonical === 'subs') {\n const normalizedRequest = normalizeRequestProps(\n request as RequestSubscriptionPropsByPlatforms,\n 'android',\n ) as RequestSubscriptionAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Android. The `skus` property is required and must be a non-empty array.',\n );\n }\n\n const {\n skus,\n obfuscatedAccountIdAndroid,\n obfuscatedProfileIdAndroid,\n isOfferPersonalized,\n subscriptionOffers,\n replacementModeAndroid,\n purchaseTokenAndroid,\n } = normalizedRequest;\n\n const normalizedOffers = subscriptionOffers ?? [];\n const replacementMode = replacementModeAndroid ?? -1;\n const purchaseToken = purchaseTokenAndroid ?? undefined;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken,\n replacementMode,\n obfuscatedAccountId: obfuscatedAccountIdAndroid,\n obfuscatedProfileId: obfuscatedProfileIdAndroid,\n offerTokenArr: normalizedOffers.map(\n (offer: AndroidSubscriptionOfferInput) => offer.offerToken,\n ),\n subscriptionOffers: normalizedOffers,\n isOfferPersonalized: isOfferPersonalized ?? false,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n throw new Error(\n \"Invalid request for Android: Expected a valid request object with 'skus' array.\",\n );\n }\n\n throw new Error('Platform not supported');\n};\n\nexport const finishTransaction: MutationField<'finishTransaction'> = async ({\n purchase,\n isConsumable = false,\n}) => {\n if (Platform.OS === 'ios') {\n await ExpoIapModule.finishTransaction(purchase, isConsumable);\n return;\n }\n\n if (Platform.OS === 'android') {\n const token = purchase.purchaseToken ?? undefined;\n\n if (!token) {\n throw createPurchaseError({\n message: 'Purchase token is required to finish transaction',\n code: ErrorCode.DeveloperError,\n productId: purchase.productId,\n platform: 'android',\n });\n }\n\n if (isConsumable) {\n await ExpoIapModule.consumePurchaseAndroid(token);\n return;\n }\n\n await ExpoIapModule.acknowledgePurchaseAndroid(token);\n return;\n }\n\n throw new Error('Unsupported Platform');\n};\n\n/**\n * Restore completed transactions (cross-platform behavior)\n *\n * - iOS: perform a lightweight sync to refresh transactions and ignore sync errors,\n * then fetch available purchases to surface restored items to the app.\n * - Android: simply fetch available purchases (restoration happens via query).\n *\n * This helper triggers the refresh flows but does not return the purchases; consumers should\n * call `getAvailablePurchases` or rely on hook state to inspect the latest items.\n */\nexport const restorePurchases: MutationField<'restorePurchases'> = async () => {\n if (Platform.OS === 'ios') {\n await syncIOS().catch(() => undefined);\n }\n\n await getAvailablePurchases({\n alsoPublishToEventListenerIOS: false,\n onlyIncludeActiveItemsIOS: true,\n });\n};\n\n/**\n * Deeplinks to native interface that allows users to manage their subscriptions\n * @param options.skuAndroid - Required for Android to locate specific subscription (ignored on iOS)\n * @param options.packageNameAndroid - Required for Android to identify your app (ignored on iOS)\n *\n * @returns Promise that resolves when the deep link is successfully opened\n *\n * @throws {Error} When called on unsupported platform or when required Android parameters are missing\n *\n * @example\n * import { deepLinkToSubscriptions } from 'expo-iap';\n *\n * // Works on both iOS and Android\n * await deepLinkToSubscriptions({\n * skuAndroid: 'your_subscription_sku',\n * packageNameAndroid: 'com.example.app'\n * });\n */\nexport const deepLinkToSubscriptions: MutationField<\n 'deepLinkToSubscriptions'\n> = async (options) => {\n if (Platform.OS === 'ios') {\n await deepLinkToSubscriptionsIOS();\n return;\n }\n\n if (Platform.OS === 'android') {\n await deepLinkToSubscriptionsAndroid((options as DeepLinkOptions) ?? null);\n return;\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\n/**\n * Internal receipt validation function (NOT RECOMMENDED for production use)\n *\n * WARNING: This function performs client-side validation which is NOT secure.\n * For production apps, always validate receipts on your secure server:\n * - iOS: Send receipt data to Apple's verification endpoint from your server\n * - Android: Use Google Play Developer API with service account credentials\n */\nexport const validateReceipt: MutationField<'validateReceipt'> = async (\n options,\n) => {\n const {sku, androidOptions} = options as MutationValidateReceiptArgs;\n\n if (Platform.OS === 'ios') {\n return validateReceiptIOS({sku});\n }\n\n if (Platform.OS === 'android') {\n if (\n !androidOptions ||\n !androidOptions.packageName ||\n !androidOptions.productToken ||\n !androidOptions.accessToken\n ) {\n throw new Error(\n 'Android validation requires packageName, productToken, and accessToken',\n );\n }\n return validateReceiptAndroid({\n packageName: androidOptions.packageName,\n productId: sku,\n productToken: androidOptions.productToken,\n accessToken: androidOptions.accessToken,\n isSub: androidOptions.isSub ?? undefined,\n });\n }\n\n throw new Error('Platform not supported');\n};\n\nexport * from './useIAP';\nexport {\n ErrorCodeUtils,\n ErrorCodeMapping,\n createPurchaseError,\n createPurchaseErrorFromPlatform,\n} from './utils/errorMapping';\nexport type {\n PurchaseError as ExpoPurchaseError,\n PurchaseErrorProps,\n} from './utils/errorMapping';\nexport {ExpoIapConsole} from './utils/debug';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,mBAAmB;AACnB,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,0BAA0B,EAC1B,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAyB7C,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAClC,OAAO,EAAC,mBAAmB,EAAqB,MAAM,sBAAsB,CAAC;AAE7E,mBAAmB;AACnB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAE9B,gCAAgC;AAChC,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,oDAAoC,CAAA;IACpC,gDAAgC,CAAA;IAChC,2DAA2C,CAAA;IAC3C,wEAAwD,CAAA;AAC1D,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAwBD,uDAAuD;AACvD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,aAAa;IACnC,mBAAmB,CAAC,SAAS,CAAC,CAAmB,CAAC;AAOpD,MA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B,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC","sourcesContent":["// External dependencies\nimport {requireNativeModule} from 'expo-modules-core';\nimport {Platform} from 'react-native';\n\n// Internal modules\nimport ExpoIapModule from './ExpoIapModule';\nimport {\n isProductIOS,\n validateReceiptIOS,\n deepLinkToSubscriptionsIOS,\n syncIOS,\n} from './modules/ios';\nimport {\n isProductAndroid,\n validateReceiptAndroid,\n deepLinkToSubscriptionsAndroid,\n} from './modules/android';\nimport {ExpoIapConsole} from './utils/debug';\n\n// Types\nimport type {\n ActiveSubscription,\n AndroidSubscriptionOfferInput,\n DeepLinkOptions,\n FetchProductsResult,\n MutationField,\n MutationRequestPurchaseArgs,\n MutationValidateReceiptArgs,\n Product,\n ProductQueryType,\n ProductSubscription,\n Purchase,\n PurchaseOptions,\n QueryField,\n RequestPurchasePropsByPlatforms,\n RequestPurchaseAndroidProps,\n RequestPurchaseIosProps,\n RequestSubscriptionPropsByPlatforms,\n RequestSubscriptionAndroidProps,\n RequestSubscriptionIosProps,\n UserChoiceBillingDetails,\n} from './types';\nimport {ErrorCode} from './types';\nimport {createPurchaseError, type PurchaseError} from './utils/errorMapping';\n\n// Export all types\nexport * from './types';\nexport * from './modules/android';\nexport * from './modules/ios';\n\n// Get the native constant value\nexport enum OpenIapEvent {\n PurchaseUpdated = 'purchase-updated',\n PurchaseError = 'purchase-error',\n PromotedProductIOS = 'promoted-product-ios',\n UserChoiceBillingAndroid = 'user-choice-billing-android',\n}\n\ntype ExpoIapEventPayloads = {\n [OpenIapEvent.PurchaseUpdated]: Purchase;\n [OpenIapEvent.PurchaseError]: PurchaseError;\n [OpenIapEvent.PromotedProductIOS]: Product;\n [OpenIapEvent.UserChoiceBillingAndroid]: UserChoiceBillingDetails;\n};\n\ntype ExpoIapEventListener<E extends OpenIapEvent> = (\n payload: ExpoIapEventPayloads[E],\n) => void;\n\ntype ExpoIapEmitter = {\n addListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): {remove: () => void};\n removeListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): void;\n};\n\n// Ensure the emitter has proper EventEmitter interface\nexport const emitter = (ExpoIapModule ||\n requireNativeModule('ExpoIap')) as ExpoIapEmitter;\n\n/**\n * TODO(v3.1.0): Remove legacy 'inapp' alias once downstream apps migrate to 'in-app'.\n */\nexport type ProductTypeInput = ProductQueryType | 'inapp';\n\nconst normalizeProductType = (type?: ProductTypeInput) => {\n if (type === 'inapp') {\n ExpoIapConsole.warn(\n \"'inapp' product type is deprecated and will be removed in v3.1.0. Use 'in-app' instead.\",\n );\n }\n\n if (!type || type === 'inapp' || type === 'in-app') {\n return {\n canonical: 'in-app' as ProductQueryType,\n native: 'in-app' as const,\n };\n }\n if (type === 'subs') {\n return {\n canonical: 'subs' as ProductQueryType,\n native: 'subs' as const,\n };\n }\n if (type === 'all') {\n return {\n canonical: 'all' as ProductQueryType,\n native: 'all' as const,\n };\n }\n throw new Error(`Unsupported product type: ${type}`);\n};\n\nconst normalizePurchasePlatform = (purchase: Purchase): Purchase => {\n const platform = purchase.platform;\n if (typeof platform !== 'string') {\n return purchase;\n }\n\n const lowered = platform.toLowerCase();\n if (lowered === platform || (lowered !== 'ios' && lowered !== 'android')) {\n return purchase;\n }\n\n return {...purchase, platform: lowered};\n};\n\nconst normalizePurchaseArray = (purchases: Purchase[]): Purchase[] =>\n purchases.map((purchase) => normalizePurchasePlatform(purchase));\n\nexport const purchaseUpdatedListener = (\n listener: (event: Purchase) => void,\n) => {\n const wrappedListener = (event: Purchase) => {\n const normalized = normalizePurchasePlatform(event);\n listener(normalized);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseUpdated,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\nexport const purchaseErrorListener = (\n listener: (error: PurchaseError) => void,\n) => {\n const wrappedListener = (error: PurchaseError) => {\n listener(error);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseError,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\n/**\n * iOS-only listener for App Store promoted product events.\n * This fires when a user taps on a promoted product in the App Store.\n *\n * @param listener - Callback function that receives the promoted product details\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = promotedProductListenerIOS((product) => {\n * console.log('Promoted product:', product);\n * // Handle the promoted product\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform iOS\n */\nexport const promotedProductListenerIOS = (\n listener: (product: Product) => void,\n) => {\n if (Platform.OS !== 'ios') {\n ExpoIapConsole.warn(\n 'promotedProductListenerIOS: This listener is only available on iOS',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.PromotedProductIOS, listener);\n};\n\n/**\n * Android-only listener for User Choice Billing events.\n * This fires when a user selects alternative billing instead of Google Play billing\n * in the User Choice Billing dialog (only in 'user-choice' mode).\n *\n * @param listener - Callback function that receives the external transaction token and product IDs\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = userChoiceBillingListenerAndroid((details) => {\n * console.log('User selected alternative billing');\n * console.log('Token:', details.externalTransactionToken);\n * console.log('Products:', details.products);\n *\n * // Process payment in your system, then report token to Google\n * await processPaymentAndReportToken(details);\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform Android\n */\nexport const userChoiceBillingListenerAndroid = (\n listener: (details: UserChoiceBillingDetails) => void,\n) => {\n if (Platform.OS !== 'android') {\n ExpoIapConsole.warn(\n 'userChoiceBillingListenerAndroid: This listener is only available on Android',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.UserChoiceBillingAndroid, listener);\n};\n\nexport const initConnection: MutationField<'initConnection'> = async (config) =>\n ExpoIapModule.initConnection(config ?? null);\n\nexport const endConnection: MutationField<'endConnection'> = async () =>\n ExpoIapModule.endConnection();\n\n/**\n * Fetch products with unified API (v2.7.0+)\n *\n * @param request - Product fetch configuration\n * @param request.skus - Array of product SKUs to fetch\n * @param request.type - Product query type: 'in-app', 'subs', or 'all'\n */\nexport const fetchProducts: QueryField<'fetchProducts'> = async (request) => {\n ExpoIapConsole.debug('fetchProducts called with:', request);\n const {skus, type} = request ?? {};\n\n if (!Array.isArray(skus) || skus.length === 0) {\n throw createPurchaseError({\n message: 'No SKUs provided',\n code: ErrorCode.EmptySkuList,\n });\n }\n\n const {canonical, native} = normalizeProductType(\n type as ProductTypeInput | undefined,\n );\n const skuSet = new Set(skus);\n\n const filterIosItems = (\n items: unknown[],\n ): Product[] | ProductSubscription[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductIOS(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const filterAndroidItems = (\n items: unknown[],\n ): Product[] | ProductSubscription[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductAndroid(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const castResult = (\n items: Product[] | ProductSubscription[],\n ): FetchProductsResult => {\n if (canonical === 'in-app') {\n return items as Product[];\n }\n if (canonical === 'subs') {\n return items as ProductSubscription[];\n }\n return items;\n };\n\n if (Platform.OS === 'ios') {\n const rawItems = await ExpoIapModule.fetchProducts({skus, type: native});\n return castResult(filterIosItems(rawItems));\n }\n\n if (Platform.OS === 'android') {\n const rawItems = await ExpoIapModule.fetchProducts(native, skus);\n return castResult(filterAndroidItems(rawItems));\n }\n\n throw new Error('Unsupported platform');\n};\n\nexport const getAvailablePurchases: QueryField<\n 'getAvailablePurchases'\n> = async (options) => {\n const normalizedOptions: PurchaseOptions = {\n alsoPublishToEventListenerIOS:\n options?.alsoPublishToEventListenerIOS ?? false,\n onlyIncludeActiveItemsIOS: options?.onlyIncludeActiveItemsIOS ?? true,\n };\n\n const resolvePurchases: () => Promise<Purchase[]> =\n Platform.select({\n ios: () =>\n ExpoIapModule.getAvailableItems(\n normalizedOptions.alsoPublishToEventListenerIOS,\n normalizedOptions.onlyIncludeActiveItemsIOS,\n ) as Promise<Purchase[]>,\n android: () => ExpoIapModule.getAvailableItems() as Promise<Purchase[]>,\n }) ?? (() => Promise.resolve([] as Purchase[]));\n\n const purchases = await resolvePurchases();\n return normalizePurchaseArray(purchases as Purchase[]);\n};\n\n/**\n * Get all active subscriptions with detailed information.\n * Uses native OpenIAP module for accurate subscription status and renewal info.\n *\n * On iOS: Returns subscriptions with renewalInfoIOS containing pendingUpgradeProductId,\n * willAutoRenew, autoRenewPreference, and other renewal details.\n *\n * On Android: Filters available purchases to find active subscriptions (fallback implementation).\n *\n * @param subscriptionIds - Optional array of subscription product IDs to filter. If not provided, returns all active subscriptions.\n * @returns Promise resolving to array of active subscriptions with details\n *\n * @example\n * ```typescript\n * // Get all active subscriptions\n * const subs = await getActiveSubscriptions();\n *\n * // Get specific subscriptions\n * const premiumSubs = await getActiveSubscriptions(['premium', 'premium_year']);\n *\n * // Check for pending upgrades (iOS)\n * subs.forEach(sub => {\n * if (sub.renewalInfoIOS?.pendingUpgradeProductId) {\n * console.log(`Upgrade pending to: ${sub.renewalInfoIOS.pendingUpgradeProductId}`);\n * }\n * });\n * ```\n */\nexport const getActiveSubscriptions: QueryField<\n 'getActiveSubscriptions'\n> = async (subscriptionIds) => {\n const result = await ExpoIapModule.getActiveSubscriptions(\n subscriptionIds ?? null,\n );\n return (result ?? []) as ActiveSubscription[];\n};\n\n/**\n * Check if user has any active subscriptions.\n *\n * @param subscriptionIds - Optional array of subscription product IDs to check. If not provided, checks all subscriptions.\n * @returns Promise resolving to true if user has at least one active subscription\n *\n * @example\n * ```typescript\n * // Check any active subscription\n * const hasAny = await hasActiveSubscriptions();\n *\n * // Check specific subscriptions\n * const hasPremium = await hasActiveSubscriptions(['premium', 'premium_year']);\n * ```\n */\nexport const hasActiveSubscriptions: QueryField<\n 'hasActiveSubscriptions'\n> = async (subscriptionIds) => {\n return !!(await ExpoIapModule.hasActiveSubscriptions(\n subscriptionIds ?? null,\n ));\n};\n\nexport const getStorefront: QueryField<'getStorefront'> = async () => {\n if (Platform.OS !== 'ios' && Platform.OS !== 'android') {\n return '';\n }\n return ExpoIapModule.getStorefront();\n};\n\n/**\n * Helper to normalize request props to platform-specific format\n */\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'ios',\n): RequestPurchaseIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'android',\n): RequestPurchaseAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'ios',\n): RequestSubscriptionIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'android',\n): RequestSubscriptionAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request:\n | RequestPurchasePropsByPlatforms\n | RequestSubscriptionPropsByPlatforms,\n platform: 'ios' | 'android',\n) {\n // Platform-specific format - directly return the appropriate platform data\n return platform === 'ios' ? request.ios : request.android;\n}\n\n/**\n * Request a purchase for products or subscriptions.\n *\n * @param requestObj - Purchase request configuration\n * @param requestObj.request - Platform-specific purchase parameters\n * @param requestObj.type - Type of purchase: 'in-app' for products (default) or 'subs' for subscriptions\n *\n * @example\n * ```typescript\n * // Product purchase\n * await requestPurchase({\n * request: {\n * ios: { sku: productId },\n * android: { skus: [productId] }\n * },\n * type: 'in-app'\n * });\n *\n * // Subscription purchase\n * await requestPurchase({\n * request: {\n * ios: { sku: subscriptionId },\n * android: {\n * skus: [subscriptionId],\n * subscriptionOffers: [{ sku: subscriptionId, offerToken: 'token' }]\n * }\n * },\n * type: 'subs'\n * });\n * ```\n */\nexport const requestPurchase: MutationField<'requestPurchase'> = async (\n args,\n) => {\n const {request, type} = args;\n const {canonical, native} = normalizeProductType(type as ProductTypeInput);\n const isInAppPurchase = canonical === 'in-app';\n\n if (Platform.OS === 'ios') {\n const normalizedRequest = normalizeRequestProps(request, 'ios');\n\n if (!normalizedRequest?.sku) {\n throw new Error(\n 'Invalid request for iOS. The `sku` property is required and must be a string.',\n );\n }\n\n if (canonical !== 'in-app' && canonical !== 'subs') {\n throw new Error(`Unsupported product type: ${canonical}`);\n }\n\n const payload: MutationRequestPurchaseArgs = {\n type: canonical === 'in-app' ? 'in-app' : 'subs',\n request: {ios: normalizedRequest},\n useAlternativeBilling: args.useAlternativeBilling,\n };\n\n const purchase = (await ExpoIapModule.requestPurchase(payload)) as\n | Purchase\n | Purchase[]\n | null;\n\n if (Array.isArray(purchase)) {\n return normalizePurchaseArray(purchase);\n }\n\n if (purchase) {\n return normalizePurchasePlatform(purchase);\n }\n\n return canonical === 'subs' ? [] : null;\n }\n\n if (Platform.OS === 'android') {\n if (isInAppPurchase) {\n const normalizedRequest = normalizeRequestProps(\n request as RequestPurchasePropsByPlatforms,\n 'android',\n ) as RequestPurchaseAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Android. The `skus` property is required and must be a non-empty array.',\n );\n }\n\n const {\n skus,\n obfuscatedAccountIdAndroid,\n obfuscatedProfileIdAndroid,\n isOfferPersonalized,\n } = normalizedRequest;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken: undefined,\n replacementMode: -1,\n obfuscatedAccountId: obfuscatedAccountIdAndroid,\n obfuscatedProfileId: obfuscatedProfileIdAndroid,\n offerTokenArr: [],\n isOfferPersonalized: isOfferPersonalized ?? false,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n if (canonical === 'subs') {\n const normalizedRequest = normalizeRequestProps(\n request as RequestSubscriptionPropsByPlatforms,\n 'android',\n ) as RequestSubscriptionAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Android. The `skus` property is required and must be a non-empty array.',\n );\n }\n\n const {\n skus,\n obfuscatedAccountIdAndroid,\n obfuscatedProfileIdAndroid,\n isOfferPersonalized,\n subscriptionOffers,\n replacementModeAndroid,\n purchaseTokenAndroid,\n } = normalizedRequest;\n\n const normalizedOffers = subscriptionOffers ?? [];\n const replacementMode = replacementModeAndroid ?? -1;\n const purchaseToken = purchaseTokenAndroid ?? undefined;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken,\n replacementMode,\n obfuscatedAccountId: obfuscatedAccountIdAndroid,\n obfuscatedProfileId: obfuscatedProfileIdAndroid,\n offerTokenArr: normalizedOffers.map(\n (offer: AndroidSubscriptionOfferInput) => offer.offerToken,\n ),\n subscriptionOffers: normalizedOffers,\n isOfferPersonalized: isOfferPersonalized ?? false,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n throw new Error(\n \"Invalid request for Android: Expected a valid request object with 'skus' array.\",\n );\n }\n\n throw new Error('Platform not supported');\n};\n\nexport const finishTransaction: MutationField<'finishTransaction'> = async ({\n purchase,\n isConsumable = false,\n}) => {\n if (Platform.OS === 'ios') {\n await ExpoIapModule.finishTransaction(purchase, isConsumable);\n return;\n }\n\n if (Platform.OS === 'android') {\n const token = purchase.purchaseToken ?? undefined;\n\n if (!token) {\n throw createPurchaseError({\n message: 'Purchase token is required to finish transaction',\n code: ErrorCode.DeveloperError,\n productId: purchase.productId,\n platform: 'android',\n });\n }\n\n if (isConsumable) {\n await ExpoIapModule.consumePurchaseAndroid(token);\n return;\n }\n\n await ExpoIapModule.acknowledgePurchaseAndroid(token);\n return;\n }\n\n throw new Error('Unsupported Platform');\n};\n\n/**\n * Restore completed transactions (cross-platform behavior)\n *\n * - iOS: perform a lightweight sync to refresh transactions and ignore sync errors,\n * then fetch available purchases to surface restored items to the app.\n * - Android: simply fetch available purchases (restoration happens via query).\n *\n * This helper triggers the refresh flows but does not return the purchases; consumers should\n * call `getAvailablePurchases` or rely on hook state to inspect the latest items.\n */\nexport const restorePurchases: MutationField<'restorePurchases'> = async () => {\n if (Platform.OS === 'ios') {\n await syncIOS().catch(() => undefined);\n }\n\n await getAvailablePurchases({\n alsoPublishToEventListenerIOS: false,\n onlyIncludeActiveItemsIOS: true,\n });\n};\n\n/**\n * Deeplinks to native interface that allows users to manage their subscriptions\n * @param options.skuAndroid - Required for Android to locate specific subscription (ignored on iOS)\n * @param options.packageNameAndroid - Required for Android to identify your app (ignored on iOS)\n *\n * @returns Promise that resolves when the deep link is successfully opened\n *\n * @throws {Error} When called on unsupported platform or when required Android parameters are missing\n *\n * @example\n * import { deepLinkToSubscriptions } from 'expo-iap';\n *\n * // Works on both iOS and Android\n * await deepLinkToSubscriptions({\n * skuAndroid: 'your_subscription_sku',\n * packageNameAndroid: 'com.example.app'\n * });\n */\nexport const deepLinkToSubscriptions: MutationField<\n 'deepLinkToSubscriptions'\n> = async (options) => {\n if (Platform.OS === 'ios') {\n await deepLinkToSubscriptionsIOS();\n return;\n }\n\n if (Platform.OS === 'android') {\n await deepLinkToSubscriptionsAndroid((options as DeepLinkOptions) ?? null);\n return;\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\n/**\n * Internal receipt validation function (NOT RECOMMENDED for production use)\n *\n * WARNING: This function performs client-side validation which is NOT secure.\n * For production apps, always validate receipts on your secure server:\n * - iOS: Send receipt data to Apple's verification endpoint from your server\n * - Android: Use Google Play Developer API with service account credentials\n */\nexport const validateReceipt: MutationField<'validateReceipt'> = async (\n options,\n) => {\n const {sku, androidOptions} = options as MutationValidateReceiptArgs;\n\n if (Platform.OS === 'ios') {\n return validateReceiptIOS({sku});\n }\n\n if (Platform.OS === 'android') {\n if (\n !androidOptions ||\n !androidOptions.packageName ||\n !androidOptions.productToken ||\n !androidOptions.accessToken\n ) {\n throw new Error(\n 'Android validation requires packageName, productToken, and accessToken',\n );\n }\n return validateReceiptAndroid({\n packageName: androidOptions.packageName,\n productId: sku,\n productToken: androidOptions.productToken,\n accessToken: androidOptions.accessToken,\n isSub: androidOptions.isSub ?? undefined,\n });\n }\n\n throw new Error('Platform not supported');\n};\n\nexport * from './useIAP';\nexport {\n ErrorCodeUtils,\n ErrorCodeMapping,\n createPurchaseError,\n createPurchaseErrorFromPlatform,\n} from './utils/errorMapping';\nexport type {\n PurchaseError as ExpoPurchaseError,\n PurchaseErrorProps,\n} from './utils/errorMapping';\nexport {ExpoIapConsole} from './utils/debug';\n"]}
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1761624577860" clover="3.2.0">
3
- <project timestamp="1761624577861" name="All files">
2
+ <coverage generated="1761632810183" clover="3.2.0">
3
+ <project timestamp="1761632810183" name="All files">
4
4
  <metrics statements="457" coveredstatements="429" conditionals="251" coveredconditionals="217" methods="95" coveredmethods="75" elements="803" coveredelements="721" complexity="0" loc="457" ncloc="457" packages="3" files="5" classes="5"/>
5
5
  <package name="src">
6
6
  <metrics statements="196" coveredstatements="190" conditionals="99" coveredconditionals="89" methods="41" coveredmethods="32"/>
@@ -131,7 +131,7 @@
131
131
  <div class='footer quiet pad2 space-top1 center small'>
132
132
  Code coverage generated by
133
133
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
134
- at 2025-10-28T04:09:37.843Z
134
+ at 2025-10-28T06:26:50.167Z
135
135
  </div>
136
136
  <script src="prettify.js"></script>
137
137
  <script>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2025-10-28T04:09:37.843Z
104
+ at 2025-10-28T06:26:50.167Z
105
105
  </div>
106
106
  <script src="../prettify.js"></script>
107
107
  <script>
@@ -1987,7 +1987,7 @@ export const requestPurchase: MutationField&lt;'requestPurchase'&gt; = async (
1987
1987
  &nbsp;
1988
1988
  const payload: MutationRequestPurchaseArgs = {
1989
1989
  type: canonical === 'in-app' ? 'in-app' : 'subs',
1990
- request,
1990
+ request: {ios: normalizedRequest},
1991
1991
  useAlternativeBilling: args.useAlternativeBilling,
1992
1992
  };
1993
1993
  &nbsp;
@@ -2239,7 +2239,7 @@ export {<span class="fstat-no" title="function not covered" >ExpoIapConsole}</sp
2239
2239
  <div class='footer quiet pad2 space-top1 center small'>
2240
2240
  Code coverage generated by
2241
2241
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
2242
- at 2025-10-28T04:09:37.843Z
2242
+ at 2025-10-28T06:26:50.167Z
2243
2243
  </div>
2244
2244
  <script src="../prettify.js"></script>
2245
2245
  <script>
@@ -814,7 +814,7 @@ export const createAlternativeBillingTokenAndroid: MutationField&lt;
814
814
  <div class='footer quiet pad2 space-top1 center small'>
815
815
  Code coverage generated by
816
816
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
817
- at 2025-10-28T04:09:37.843Z
817
+ at 2025-10-28T06:26:50.167Z
818
818
  </div>
819
819
  <script src="../../prettify.js"></script>
820
820
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2025-10-28T04:09:37.843Z
119
+ at 2025-10-28T06:26:50.167Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -1267,7 +1267,7 @@ export const presentExternalPurchaseLinkIOS: MutationField&lt;
1267
1267
  <div class='footer quiet pad2 space-top1 center small'>
1268
1268
  Code coverage generated by
1269
1269
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1270
- at 2025-10-28T04:09:37.843Z
1270
+ at 2025-10-28T06:26:50.167Z
1271
1271
  </div>
1272
1272
  <script src="../../prettify.js"></script>
1273
1273
  <script>
@@ -268,7 +268,7 @@ export const ExpoIapConsole = createConsole();
268
268
  <div class='footer quiet pad2 space-top1 center small'>
269
269
  Code coverage generated by
270
270
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
271
- at 2025-10-28T04:09:37.843Z
271
+ at 2025-10-28T06:26:50.167Z
272
272
  </div>
273
273
  <script src="../../prettify.js"></script>
274
274
  <script>
@@ -1111,7 +1111,7 @@ export function getUserFriendlyErrorMessage(error: ErrorLike): string {
1111
1111
  <div class='footer quiet pad2 space-top1 center small'>
1112
1112
  Code coverage generated by
1113
1113
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1114
- at 2025-10-28T04:09:37.843Z
1114
+ at 2025-10-28T06:26:50.167Z
1115
1115
  </div>
1116
1116
  <script src="../../prettify.js"></script>
1117
1117
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2025-10-28T04:09:37.843Z
119
+ at 2025-10-28T06:26:50.167Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-iap",
3
- "version": "3.1.22",
3
+ "version": "3.1.23",
4
4
  "description": "In App Purchase module in Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
package/src/index.ts CHANGED
@@ -476,7 +476,7 @@ export const requestPurchase: MutationField<'requestPurchase'> = async (
476
476
 
477
477
  const payload: MutationRequestPurchaseArgs = {
478
478
  type: canonical === 'in-app' ? 'in-app' : 'subs',
479
- request,
479
+ request: {ios: normalizedRequest},
480
480
  useAlternativeBilling: args.useAlternativeBilling,
481
481
  };
482
482