UNPKG

@namiml/web-sdk

Version:

Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing

38 lines (37 loc) 1.23 kB
import { NamiAnonymousCampaign } from "../types/externals/campaign"; import { IPaywall } from "./paywall"; import { PaywallSKU } from "./sku"; export interface IConfig { id: string; capabilities: string[]; marketplace_app_id?: string | null; } export type InitialConfig = { appConfig?: IConfig; platform_config?: IConfig; products?: PaywallSKU[]; paywalls?: IPaywall[]; campaign_rules?: NamiAnonymousCampaign[]; }; export type InitialConfigCompressed = { initial_config: string; }; export declare const isInitialConfigCompressed: (config: InitialConfig | InitialConfigCompressed) => config is InitialConfigCompressed; export type NamiConfigurationState = { sdkInitialized: boolean; configureState: string; }; export type ExtendedPlatformInfo = { platform: string; version: string; }; export declare enum Capabilities { SDK = "sdk", ML = "ml", THIRD_PARTY_ANALYTICS = "third_party_analytics", THIRD_PARTY_TRANSACTIONS = "third_party_transactions", PAYWALL_PERSONALIZATION = "paywall_personalization", ANONYMOUS_MODE_CAPABILITY = "anonymous_allowed", LANGUAGE_MANAGEMENT = "language_management", ENTITLEMENT_MANAGEMENT = "entitlement_management" }