react-native-adapty - v3.15.2
    Preparing search index...

    Interface AdaptyMockConfig

    Configuration for mock mode Allows customization of mock data returned by SDK methods

    interface AdaptyMockConfig {
        autoGrantPremium?: boolean;
        onboardings?: Record<string, Partial<AdaptyOnboarding>>;
        paywalls?: Record<string, Partial<AdaptyPaywall>>;
        premiumAccessLevelId?: string;
        products?: Record<string, AdaptyPaywallProduct[]>;
        profile?: Partial<AdaptyProfile>;
    }
    Index

    Properties

    autoGrantPremium?: boolean

    Whether to automatically grant premium access after makePurchase

    true
    
    onboardings?: Record<string, Partial<AdaptyOnboarding>>

    Custom onboarding data by placement ID

    paywalls?: Record<string, Partial<AdaptyPaywall>>

    Custom paywall data by placement ID

    premiumAccessLevelId?: string

    Access level ID to grant after purchase.

    This setting allows you to override the access level granted in mock mode, which is useful for testing specific scenarios.

    Priority order:

    1. config.premiumAccessLevelId (if set) - highest priority, overrides everything
    2. product.accessLevelId (if available and config not set) - uses product's access level
    3. 'premium' (fallback) - default when neither of above is available
    // Override to always grant 'vip' access in tests
    mockConfig: {
    premiumAccessLevelId: 'vip'
    }
    // Use product's accessLevelId (normal behavior)
    mockConfig: {
    // premiumAccessLevelId not set - will use product.accessLevelId
    }
    undefined (uses product.accessLevelId, or 'premium' as final fallback)
    
    products?: Record<string, AdaptyPaywallProduct[]>

    Custom products data by paywall variation ID

    profile?: Partial<AdaptyProfile>

    Custom profile data to return instead of default mock profile