UNPKG

@qonversion/react-native-sdk

Version:

Qonversion provides full in-app purchases infrastructure, so you do not need to build your own server for receipt validation. Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and co

33 lines (29 loc) 1.21 kB
import {EntitlementsCacheLifetime, Environment, LaunchMode} from './dto/enums'; import type {EntitlementsUpdateListener} from './dto/EntitlementsUpdateListener'; class QonversionConfig { readonly projectKey: string; readonly launchMode: LaunchMode; readonly environment: Environment; readonly entitlementsCacheLifetime: EntitlementsCacheLifetime; readonly entitlementsUpdateListener: EntitlementsUpdateListener | undefined; readonly proxyUrl: string | undefined; readonly kidsMode: boolean; constructor( projectKey: string, launchMode: LaunchMode, environment: Environment = Environment.PRODUCTION, entitlementsCacheLifetime: EntitlementsCacheLifetime = EntitlementsCacheLifetime.MONTH, entitlementsUpdateListener: EntitlementsUpdateListener | undefined = undefined, proxyUrl: string | undefined, kidsMode: boolean = false ) { this.projectKey = projectKey; this.launchMode = launchMode; this.environment = environment; this.entitlementsCacheLifetime = entitlementsCacheLifetime; this.entitlementsUpdateListener = entitlementsUpdateListener; this.proxyUrl = proxyUrl; this.kidsMode = kidsMode; } } export default QonversionConfig;