import "react-native"; import type { Spec as RoktNativeInterface } from "./NativeRoktWidget"; export declare abstract class Rokt { static initialize(roktTagId: string, appVersion: string, fontFilesMap?: Record): void; static selectPlacements(identifier: string, attributes: Record, placeholders: Record, roktConfig?: IRoktConfig): void; /** * Select shoppable ads for a given identifier. * * Shoppable ads use a full-screen overlay (no embedded placeholders). * Payment extension registration must be done in native AppDelegate code. * * @param identifier - The identifier for the shoppable ads placement * @param attributes - Key-value attributes for the placement * @param roktConfig - Optional configuration for the placement */ static selectShoppableAds(identifier: string, attributes: Record, roktConfig?: IRoktConfig): void; static purchaseFinalized(placementId: string, catalogItemId: string, success: boolean): void; static setEnvironmentToStage(): void; static setEnvironmentToProd(): void; /** * Set a custom session ID for the Rokt SDK. * * @param sessionId - The session ID to set. Must be a non-empty string. */ static setSessionId(sessionId: string): void; /** * Get the current session ID from the Rokt SDK. * * @returns The current session ID, or null if not set. */ static getSessionId(): string | null; } declare module "react-native" { interface NativeModulesStatic { RNRoktWidget: RoktNativeInterface; } } export interface IRoktConfig { readonly colorMode?: ColorMode; readonly cacheConfig?: CacheConfig; } /** * Cache configuration for Rokt SDK */ export declare class CacheConfig { readonly cacheDurationInSeconds?: number | undefined; readonly cacheAttributes?: Record | undefined; /** * @param cacheDurationInSeconds - The duration in seconds for which the Rokt SDK should cache the experience. Default is 90 minutes * @param cacheAttributes - optional attributes to be used as cache key. If null, all the attributes will be used as the cache key */ constructor(cacheDurationInSeconds?: number | undefined, cacheAttributes?: Record | undefined); } declare class RoktConfig implements IRoktConfig { constructor(roktConfig: RoktConfig); } export declare class RoktConfigBuilder implements Partial { readonly colorMode?: ColorMode; readonly cacheConfig?: CacheConfig; withColorMode(value: ColorMode): this & Pick; withCacheConfig(value: CacheConfig): this & Pick; build(this: IRoktConfig): RoktConfig; } export type ColorMode = "light" | "dark" | "system"; export {};