@namiml/web-sdk
Version:
Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing
39 lines (38 loc) • 1.09 kB
TypeScript
import { NamiPurchase } from "./purchase";
import { NamiSKU } from "./sku";
/**
* @type NamiEntitlement
* Represents what features a device has access to in an app.
*/
export type NamiEntitlement = {
/**
* The last known Purchase that unlocked this entitlement. There must be a corresponding
* NamiSKU associated to this NamiPurchase. That NamiSKU must reside in purchasedSKUs.
*/
activePurchases: NamiPurchase[];
/**
* Description of entitlement
*/
desc: string;
/**
* Friendly name of entitlement
*/
name: string;
/**
* Internal ID for use by the Nami SDK
*/
namiId: string;
/**
* NamiSKUs purchased by the user that actually unlock this entitlement
*/
purchasedSkus: NamiSKU[];
/**
* The unique ID of the entitlement defined in the Nami Control Center, use this to refer
* to the system when referencing an entitlement.
*/
referenceId: string;
/**
* The list of possible NamiSKU objects that would unlock this entitlement
*/
relatedSkus: NamiSKU[];
};