@namiml/web-sdk
Version:
Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing
32 lines (31 loc) • 1.09 kB
TypeScript
import { IEntitlements } from "../paywall";
import { AmazonProduct, AppleProduct, GoogleProduct } from "../sku";
import { NamiProductDetails } from "./product";
/**
* @type NamiSKU
* This object represents a specific in-app purchase SKU available on a specific platform.
*
* It contains some general meta-data about specific SKU and associated [ProductDetails] object from
* Google Play Billing.
*
* Note that in certain cases, depending on cached state of the SDK, [ProductDetails] might not
* be fully complete object (potentially generated temporarily with minimum required information)
*/
export type NamiSKU = {
id: string;
name?: string;
skuId: string;
appleProduct?: AppleProduct;
googleProduct?: GoogleProduct;
amazonProduct?: AmazonProduct;
type: NamiSKUType;
promoId?: string | null;
promoToken?: string | null;
productDetails?: NamiProductDetails | null;
entitlements: IEntitlements[];
};
/**
* @type NamiSKUType
* Types of products from Nami
*/
export type NamiSKUType = 'unknown' | 'one_time_purchase' | 'subscription';