@namiml/sdk-core 3.4.1-dev.202605281900 → 3.4.1-dev.202605300006

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -96,7 +96,7 @@ const {
96
96
  // version — stamped by scripts/version.sh
97
97
  NAMI_SDK_VERSION = "3.4.1",
98
98
  // full package version including dev suffix — stamped by scripts/version.sh
99
- NAMI_SDK_PACKAGE_VERSION = "3.4.1-dev.202605281900",
99
+ NAMI_SDK_PACKAGE_VERSION = "3.4.1-dev.202605300006",
100
100
  // environments
101
101
  PRODUCTION = "production", DEVELOPMENT = "development",
102
102
  // error messages
@@ -7039,6 +7039,10 @@ var NamiCampaignRuleType;
7039
7039
  NamiCampaignRuleType["UNKNOWN"] = "unknown";
7040
7040
  NamiCampaignRuleType["URL"] = "url";
7041
7041
  })(NamiCampaignRuleType || (NamiCampaignRuleType = {}));
7042
+ // NamiCampaignManagerStatic interface + const proxy live in
7043
+ // `src/managers/campaign.ts`. They must stay out of this file: PaywallState
7044
+ // type-imports from here, and pulling in the manager class triggers a
7045
+ // constructor chain that runs before PaywallState finishes loading. See NAM-1207.
7042
7046
 
7043
7047
  /**
7044
7048
  * Get initial paywalls from storage service.
@@ -8675,12 +8679,12 @@ SessionService.instance = new SessionService();
8675
8679
  * @class NamiPurchaseManager
8676
8680
  * Provides methods for managing all aspects of a purchase in the Nami SDK.
8677
8681
  */
8678
- class NamiPurchaseManager {
8682
+ let NamiPurchaseManager$2 = class NamiPurchaseManager {
8679
8683
  static allPurchases() {
8680
8684
  return [];
8681
8685
  }
8682
- }
8683
- NamiPurchaseManager.instance = new NamiPurchaseManager();
8686
+ };
8687
+ NamiPurchaseManager$2.instance = new NamiPurchaseManager$2();
8684
8688
 
8685
8689
  var en = {
8686
8690
  nami_day: "day",
@@ -11739,7 +11743,7 @@ const createNamiEntitlements = (entitlements) => {
11739
11743
  const namiEntitlements = activeEntitlements();
11740
11744
  if (!entitlements)
11741
11745
  return namiEntitlements;
11742
- NamiPurchaseManager.allPurchases().forEach((namiPurchase) => {
11746
+ NamiPurchaseManager$2.allPurchases().forEach((namiPurchase) => {
11743
11747
  applyEntitlementActivation(namiPurchase);
11744
11748
  });
11745
11749
  const entitlementsToSkus = skuMapFromEntitlements(entitlements);
@@ -12220,7 +12224,7 @@ function isEqual(objA, objB) {
12220
12224
  return isEqual$1(normA, normB);
12221
12225
  }
12222
12226
 
12223
- class NamiProfileManager {
12227
+ let NamiProfileManager$1 = class NamiProfileManager {
12224
12228
  constructor() {
12225
12229
  this.load();
12226
12230
  }
@@ -12293,8 +12297,8 @@ class NamiProfileManager {
12293
12297
  this.logoutLocal();
12294
12298
  await this.logoutRemote();
12295
12299
  }
12296
- }
12297
- NamiProfileManager.instance = new NamiProfileManager();
12300
+ };
12301
+ NamiProfileManager$1.instance = new NamiProfileManager$1();
12298
12302
 
12299
12303
  var _Nami_isInitialized;
12300
12304
  // NamiFlowManager is intentionally NOT imported at top level — it
@@ -12332,13 +12336,13 @@ class Nami {
12332
12336
  __classPrivateFieldSet(Nami.instance, _Nami_isInitialized, false, "f");
12333
12337
  // In-memory singleton state that previously survived reset and
12334
12338
  // bled into the next configure() cycle.
12335
- NamiProfileManager.instance.setExternalId(undefined);
12339
+ NamiProfileManager$1.instance.setExternalId(undefined);
12336
12340
  PaywallState.reset();
12337
12341
  NamiAPI.reset();
12338
12342
  CampaignRuleRepository.instance.reset();
12339
12343
  // Lazy import to avoid a load-order cycle (NamiFlowManager imports
12340
12344
  // back to this module for `Nami.instance.maxLogging`).
12341
- const { NamiFlowManager } = await Promise.resolve().then(function () { return NamiFlowManager$1; });
12345
+ const { NamiFlowManager } = await Promise.resolve().then(function () { return NamiFlowManager$3; });
12342
12346
  NamiFlowManager.reset();
12343
12347
  // Give platform adapters a chance to drop their own state
12344
12348
  // (e.g. Expo's UI adapter holds listener refs from PaywallView).
@@ -12445,20 +12449,6 @@ class Nami {
12445
12449
  _Nami_isInitialized = new WeakMap();
12446
12450
  Nami.instance = new Nami();
12447
12451
 
12448
- var LaunchCampaignError;
12449
- (function (LaunchCampaignError) {
12450
- LaunchCampaignError["DEFAULT_CAMPAIGN_NOT_FOUND"] = "Default campaign not found";
12451
- LaunchCampaignError["LABELED_CAMPAIGN_NOT_FOUND"] = "Labeled campaign not found";
12452
- LaunchCampaignError["CAMPAIGN_DATA_NOT_FOUND"] = "Campaign data not found";
12453
- LaunchCampaignError["PAYWALL_ALREADY_DISPLAYED"] = "Paywall is already being displayed";
12454
- LaunchCampaignError["SDK_NOT_INITIALIZED"] = "SDK has not been initialized";
12455
- LaunchCampaignError["PAYWALL_COULD_NOT_DISPLAY"] = "Failed to display paywall";
12456
- LaunchCampaignError["URL_CAMPAIGN_NOT_FOUND"] = "URL campaign not found";
12457
- LaunchCampaignError["PRODUCT_DATA_NOT_FOUND"] = "Product data not found";
12458
- LaunchCampaignError["PRODUCT_GROUPS_NOT_FOUND"] = "Product groups not found";
12459
- LaunchCampaignError["FLOW_SCREEN_DATA_UNAVILABLE"] = "Flow unavailable due to missing screen data";
12460
- })(LaunchCampaignError || (LaunchCampaignError = {}));
12461
-
12462
12452
  const VALID_STYLES = new Set(['fullscreen', 'sheet', 'compact_sheet', 'modal']);
12463
12453
  function getEffectiveWebStyle(style) {
12464
12454
  if (!style || !VALID_STYLES.has(style))
@@ -12510,6 +12500,20 @@ var NamiPaywallAction;
12510
12500
  NamiPaywallAction["UNKNOWN"] = "UNKNOWN";
12511
12501
  })(NamiPaywallAction || (NamiPaywallAction = {}));
12512
12502
 
12503
+ var LaunchCampaignError;
12504
+ (function (LaunchCampaignError) {
12505
+ LaunchCampaignError["DEFAULT_CAMPAIGN_NOT_FOUND"] = "Default campaign not found";
12506
+ LaunchCampaignError["LABELED_CAMPAIGN_NOT_FOUND"] = "Labeled campaign not found";
12507
+ LaunchCampaignError["CAMPAIGN_DATA_NOT_FOUND"] = "Campaign data not found";
12508
+ LaunchCampaignError["PAYWALL_ALREADY_DISPLAYED"] = "Paywall is already being displayed";
12509
+ LaunchCampaignError["SDK_NOT_INITIALIZED"] = "SDK has not been initialized";
12510
+ LaunchCampaignError["PAYWALL_COULD_NOT_DISPLAY"] = "Failed to display paywall";
12511
+ LaunchCampaignError["URL_CAMPAIGN_NOT_FOUND"] = "URL campaign not found";
12512
+ LaunchCampaignError["PRODUCT_DATA_NOT_FOUND"] = "Product data not found";
12513
+ LaunchCampaignError["PRODUCT_GROUPS_NOT_FOUND"] = "Product groups not found";
12514
+ LaunchCampaignError["FLOW_SCREEN_DATA_UNAVILABLE"] = "Flow unavailable due to missing screen data";
12515
+ })(LaunchCampaignError || (LaunchCampaignError = {}));
12516
+
12513
12517
  const NamiFlowStepType = {
12514
12518
  ENTRY: 'entry',
12515
12519
  SCREEN: 'screen',
@@ -13253,7 +13257,7 @@ var AccountStateAction;
13253
13257
  AccountStateAction["NAMI_DEVICE_ID_CLEARED"] = "nami_device_id_cleared";
13254
13258
  })(AccountStateAction || (AccountStateAction = {}));
13255
13259
 
13256
- class NamiFlowManager {
13260
+ let NamiFlowManager$2 = class NamiFlowManager {
13257
13261
  static get instance() {
13258
13262
  if (!NamiFlowManager._instance) {
13259
13263
  NamiFlowManager._instance = new NamiFlowManager();
@@ -13282,11 +13286,50 @@ class NamiFlowManager {
13282
13286
  i.lastAnimatedFlowProgress = new Map();
13283
13287
  i.navGraphCache = new WeakMap();
13284
13288
  }
13289
+ /**
13290
+ * Registers a handoff step handler and returns an unsubscribe callback.
13291
+ *
13292
+ * The returned callback clears the registered handler only if it is still
13293
+ * the active one (identity-check guard). This protects against React 18
13294
+ * StrictMode dev-mode double-mount where a stale unsubscribe from the
13295
+ * first effect could fire after a second effect has already registered.
13296
+ *
13297
+ * Passing `undefined` clears the current handler immediately (preserved
13298
+ * for backward compatibility with the 3.3.x escape hatch). The returned
13299
+ * callback in that case is a no-op identity-check that will never fire.
13300
+ *
13301
+ * Aligns with the rest of the SDK's register*Handler family: all
13302
+ * NamiPaywallManager / NamiCampaignManager / NamiCustomerManager handler
13303
+ * registration methods return `Callback`. See NAM-1219.
13304
+ */
13285
13305
  static registerStepHandoff(handoffStepHandler) {
13286
13306
  this.instance.handoffStepHandler = handoffStepHandler;
13307
+ const captured = handoffStepHandler;
13308
+ return () => {
13309
+ if (this.instance.handoffStepHandler === captured) {
13310
+ this.instance.handoffStepHandler = undefined;
13311
+ }
13312
+ };
13287
13313
  }
13314
+ /**
13315
+ * Registers an event handler and returns an unsubscribe callback.
13316
+ *
13317
+ * The returned callback clears the registered handler only if it is still
13318
+ * the active one (identity-check guard). See `registerStepHandoff` for the
13319
+ * full rationale.
13320
+ *
13321
+ * Passing `undefined` clears the current handler immediately.
13322
+ *
13323
+ * See NAM-1219.
13324
+ */
13288
13325
  static registerEventHandler(eventHandler) {
13289
13326
  this.instance.eventHandler = eventHandler;
13327
+ const captured = eventHandler;
13328
+ return () => {
13329
+ if (this.instance.eventHandler === captured) {
13330
+ this.instance.eventHandler = undefined;
13331
+ }
13332
+ };
13290
13333
  }
13291
13334
  static resume() {
13292
13335
  const { flowOpen, currentFlow } = NamiFlowManager.instance;
@@ -13563,11 +13606,11 @@ class NamiFlowManager {
13563
13606
  static getCurrentFlowStepAutoAdvanceDelay() {
13564
13607
  return this.instance.getCurrentFlowStepAutoAdvanceDelay();
13565
13608
  }
13566
- }
13609
+ };
13567
13610
 
13568
- var NamiFlowManager$1 = /*#__PURE__*/Object.freeze({
13611
+ var NamiFlowManager$3 = /*#__PURE__*/Object.freeze({
13569
13612
  __proto__: null,
13570
- NamiFlowManager: NamiFlowManager
13613
+ NamiFlowManager: NamiFlowManager$2
13571
13614
  });
13572
13615
 
13573
13616
  const SHOULD_SHOW_LOADING_INDICATOR = false;
@@ -13589,7 +13632,7 @@ const isAsyncLoginLogoutDisabled = () => {
13589
13632
  * @class NamiCustomerManager
13590
13633
  * Provides methods for managing customer-related functionality.
13591
13634
  */
13592
- class NamiCustomerManager {
13635
+ let NamiCustomerManager$2 = class NamiCustomerManager {
13593
13636
  constructor() {
13594
13637
  this.emitter = NamiEventEmitter.getInstance();
13595
13638
  NamiConditionEvaluator.shared.registerNamespaceResolver("UserTags", (identifier) => {
@@ -13616,7 +13659,7 @@ class NamiCustomerManager {
13616
13659
  * @returns {boolean} Returns true if the customer is logged in, false otherwise.
13617
13660
  */
13618
13661
  static isLoggedIn() {
13619
- return NamiProfileManager.instance.isLoggedIn();
13662
+ return NamiProfileManager$1.instance.isLoggedIn();
13620
13663
  }
13621
13664
  /**
13622
13665
  * Returns the external ID of the currently logged in user.
@@ -13627,7 +13670,7 @@ class NamiCustomerManager {
13627
13670
  if (!this.instance.isSDKInitialized) {
13628
13671
  logger.debug(SDK_NOT_INITIALIZED);
13629
13672
  }
13630
- return NamiProfileManager.instance.getExternalId();
13673
+ return NamiProfileManager$1.instance.getExternalId();
13631
13674
  }
13632
13675
  /**
13633
13676
  * Logs in a customer with the specified ID.
@@ -13650,10 +13693,10 @@ class NamiCustomerManager {
13650
13693
  // Default sync/fast path: update local state, notify handlers, and fire
13651
13694
  // lifecycle immediately. Dispatch the underlying API call and entitlement
13652
13695
  // refresh fire-and-forget — failures are logged but do not surface.
13653
- NamiProfileManager.instance.loginLocal(externalId);
13696
+ NamiProfileManager$1.instance.loginLocal(externalId);
13654
13697
  this.invokeStateHandler(AccountStateAction.LOGIN, true);
13655
- if (NamiFlowManager.instance.flowOpen) {
13656
- const currentFlow = NamiFlowManager.instance.currentFlow;
13698
+ if (NamiFlowManager$2.instance.flowOpen) {
13699
+ const currentFlow = NamiFlowManager$2.instance.currentFlow;
13657
13700
  const currentStep = currentFlow?.currentFlowStep;
13658
13701
  if (currentStep) {
13659
13702
  if (Nami.instance.maxLogging) {
@@ -13662,7 +13705,7 @@ class NamiCustomerManager {
13662
13705
  currentFlow.executeLifecycle(currentStep, NamiReservedActions.LOGIN_SUCCESS);
13663
13706
  }
13664
13707
  }
13665
- void NamiProfileManager.instance.loginRemote(externalId).catch((err) => {
13708
+ void NamiProfileManager$1.instance.loginRemote(externalId).catch((err) => {
13666
13709
  logger.error('[NamiCustomerManager] async login API failed', err);
13667
13710
  });
13668
13711
  void EntitlementRepository.instance.fetchActiveEntitlements().catch((err) => {
@@ -13671,11 +13714,11 @@ class NamiCustomerManager {
13671
13714
  return;
13672
13715
  }
13673
13716
  try {
13674
- await NamiProfileManager.instance.login(externalId);
13717
+ await NamiProfileManager$1.instance.login(externalId);
13675
13718
  await EntitlementRepository.instance.fetchActiveEntitlements();
13676
13719
  this.invokeStateHandler(AccountStateAction.LOGIN, true);
13677
- if (NamiFlowManager.instance.flowOpen) {
13678
- const currentFlow = NamiFlowManager.instance.currentFlow;
13720
+ if (NamiFlowManager$2.instance.flowOpen) {
13721
+ const currentFlow = NamiFlowManager$2.instance.currentFlow;
13679
13722
  const currentStep = currentFlow?.currentFlowStep;
13680
13723
  if (currentStep) {
13681
13724
  if (Nami.instance.maxLogging) {
@@ -13687,8 +13730,8 @@ class NamiCustomerManager {
13687
13730
  }
13688
13731
  catch (error) {
13689
13732
  this.invokeStateHandler(AccountStateAction.LOGIN, false, error);
13690
- if (NamiFlowManager.instance.flowOpen) {
13691
- const currentFlow = NamiFlowManager.instance.currentFlow;
13733
+ if (NamiFlowManager$2.instance.flowOpen) {
13734
+ const currentFlow = NamiFlowManager$2.instance.currentFlow;
13692
13735
  const currentStep = currentFlow?.currentFlowStep;
13693
13736
  if (currentStep) {
13694
13737
  if (Nami.instance.maxLogging) {
@@ -13719,10 +13762,10 @@ class NamiCustomerManager {
13719
13762
  // Default sync/fast path: clear local state, notify handlers, and fire
13720
13763
  // lifecycle immediately. Dispatch the underlying API call and entitlement
13721
13764
  // refresh fire-and-forget — failures are logged but do not surface.
13722
- NamiProfileManager.instance.logoutLocal();
13765
+ NamiProfileManager$1.instance.logoutLocal();
13723
13766
  this.invokeStateHandler(AccountStateAction.LOGOUT, true);
13724
- if (NamiFlowManager.instance.flowOpen) {
13725
- const currentFlow = NamiFlowManager.instance.currentFlow;
13767
+ if (NamiFlowManager$2.instance.flowOpen) {
13768
+ const currentFlow = NamiFlowManager$2.instance.currentFlow;
13726
13769
  const currentStep = currentFlow?.currentFlowStep;
13727
13770
  if (currentStep) {
13728
13771
  if (Nami.instance.maxLogging) {
@@ -13731,7 +13774,7 @@ class NamiCustomerManager {
13731
13774
  currentFlow.executeLifecycle(currentStep, NamiReservedActions.LOGOUT_SUCCESS);
13732
13775
  }
13733
13776
  }
13734
- void NamiProfileManager.instance.logoutRemote().catch((err) => {
13777
+ void NamiProfileManager$1.instance.logoutRemote().catch((err) => {
13735
13778
  logger.error('[NamiCustomerManager] async logout API failed', err);
13736
13779
  });
13737
13780
  void EntitlementRepository.instance.fetchActiveEntitlements().catch((err) => {
@@ -13740,11 +13783,11 @@ class NamiCustomerManager {
13740
13783
  return;
13741
13784
  }
13742
13785
  try {
13743
- await NamiProfileManager.instance.logout();
13786
+ await NamiProfileManager$1.instance.logout();
13744
13787
  await EntitlementRepository.instance.fetchActiveEntitlements();
13745
13788
  this.invokeStateHandler(AccountStateAction.LOGOUT, true);
13746
- if (NamiFlowManager.instance.flowOpen) {
13747
- const currentFlow = NamiFlowManager.instance.currentFlow;
13789
+ if (NamiFlowManager$2.instance.flowOpen) {
13790
+ const currentFlow = NamiFlowManager$2.instance.currentFlow;
13748
13791
  const currentStep = currentFlow?.currentFlowStep;
13749
13792
  if (currentStep) {
13750
13793
  currentFlow.executeLifecycle(currentStep, NamiReservedActions.LOGOUT_SUCCESS);
@@ -13753,8 +13796,8 @@ class NamiCustomerManager {
13753
13796
  }
13754
13797
  catch (error) {
13755
13798
  this.invokeStateHandler(AccountStateAction.LOGOUT, false, error);
13756
- if (NamiFlowManager.instance.flowOpen) {
13757
- const currentFlow = NamiFlowManager.instance.currentFlow;
13799
+ if (NamiFlowManager$2.instance.flowOpen) {
13800
+ const currentFlow = NamiFlowManager$2.instance.currentFlow;
13758
13801
  const currentStep = currentFlow?.currentFlowStep;
13759
13802
  if (currentStep) {
13760
13803
  currentFlow.executeLifecycle(currentStep, NamiReservedActions.LOGOUT_FAILURE);
@@ -13863,8 +13906,8 @@ class NamiCustomerManager {
13863
13906
  PaywallState.setCustomerAttribute({ [key]: value });
13864
13907
  logger.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${key}`);
13865
13908
  }
13866
- if (NamiFlowManager.instance.flowOpen) {
13867
- const currentFlow = NamiFlowManager.instance.currentFlow;
13909
+ if (NamiFlowManager$2.instance.flowOpen) {
13910
+ const currentFlow = NamiFlowManager$2.instance.currentFlow;
13868
13911
  if (currentFlow) {
13869
13912
  const currentStep = currentFlow.currentFlowStep;
13870
13913
  if (currentStep) {
@@ -14038,8 +14081,8 @@ class NamiCustomerManager {
14038
14081
  ]);
14039
14082
  }
14040
14083
  }
14041
- }
14042
- NamiCustomerManager.instance = new NamiCustomerManager();
14084
+ };
14085
+ NamiCustomerManager$2.instance = new NamiCustomerManager$2();
14043
14086
 
14044
14087
  class BasicNamiFlow {
14045
14088
  constructor(flowObject = {}) {
@@ -14476,7 +14519,7 @@ class NamiFlow extends BasicNamiFlow {
14476
14519
  if (action.parameters) {
14477
14520
  PaywallState.setUserTags(action.parameters);
14478
14521
  Object.entries(action.parameters).forEach(([key, value]) => {
14479
- NamiCustomerManager.setCustomerAttribute(key, value);
14522
+ NamiCustomerManager$2.setCustomerAttribute(key, value);
14480
14523
  });
14481
14524
  }
14482
14525
  break;
@@ -14623,7 +14666,7 @@ class NamiFlow extends BasicNamiFlow {
14623
14666
  * @class NamiCampaignManager
14624
14667
  * Provides methods for managing all aspects of a campaign.
14625
14668
  */
14626
- class NamiCampaignManager {
14669
+ let NamiCampaignManager$2 = class NamiCampaignManager {
14627
14670
  constructor() {
14628
14671
  this.emitter = NamiEventEmitter.getInstance();
14629
14672
  }
@@ -14853,8 +14896,115 @@ class NamiCampaignManager {
14853
14896
  }
14854
14897
  return { type, value };
14855
14898
  }
14856
- }
14857
- NamiCampaignManager.instance = new NamiCampaignManager();
14899
+ };
14900
+ NamiCampaignManager$2.instance = new NamiCampaignManager$2();
14901
+
14902
+ // Re-export the class itself, typed as the narrow public interface. The
14903
+ // runtime value IS the class (same object identity), so `jest.spyOn(...)`
14904
+ // in tests intercepts the same method that internal callers reach via
14905
+ // direct class import — no method-call indirection. The public `.d.ts`
14906
+ // however only sees the `NamiCampaignManagerStatic` surface: no
14907
+ // `.instance`, no `register()`-internal helpers, no private statics.
14908
+ // Renderer/test code that needs the unrestricted class imports from
14909
+ // `_internal` namespace on `@namiml/sdk-core` (NAM-1217). See NAM-1207.
14910
+ const NamiCampaignManager$1 = NamiCampaignManager$2;
14911
+
14912
+ // Re-export the class itself, typed as the narrow public interface. Same
14913
+ // object identity as the underlying class so jest.spyOn works. See
14914
+ // `src/managers/campaign.ts` and NAM-1207 for the full rationale.
14915
+ const NamiCustomerManager$1 = NamiCustomerManager$2;
14916
+
14917
+ /**
14918
+ * @class NamiEntitlementManager
14919
+ * Contains all methods and objects to work with entitlements in the SDK.
14920
+ */
14921
+ let NamiEntitlementManager$2 = class NamiEntitlementManager {
14922
+ constructor() {
14923
+ this.emitter = NamiEventEmitter.getInstance();
14924
+ }
14925
+ /**
14926
+ * @returns {NamiEntitlement[]} A list of currently active entitlements
14927
+ */
14928
+ static active() {
14929
+ if (!hasPurchaseManagement()) {
14930
+ return createNamiEntitlements();
14931
+ }
14932
+ return activeEntitlements();
14933
+ }
14934
+ /**
14935
+ * Checks if a Nami Control Center defined Entitlement has at least one backing purchase
14936
+ * and it's not expired.
14937
+ *
14938
+ * @param referenceId - entitlement referenceId
14939
+ * @returns {boolean} True if the entitlement is active for given referenceId, false otherwise.
14940
+ */
14941
+ static isEntitlementActive(referenceId) {
14942
+ if (!hasPurchaseManagement("NamiEntitlementManager.isEntitlementActive")) {
14943
+ return false;
14944
+ }
14945
+ return this.active().some((entitlement) => entitlement.referenceId == referenceId);
14946
+ }
14947
+ /**
14948
+ * Asks Nami to fetch the latest active entitlements
14949
+ *
14950
+ * @returns {Promise<NamiEntitlement[]>} A promise that resolves to a list of NamiEntitlement
14951
+ */
14952
+ static async refresh() {
14953
+ if (!this.instance.sdkInitialized) {
14954
+ throw new SDKNotInitializedError();
14955
+ }
14956
+ if (!hasPurchaseManagement("NamiEntitlementManager.refresh")) {
14957
+ return [];
14958
+ }
14959
+ await EntitlementRepository.instance.fetchActiveEntitlements();
14960
+ return activeEntitlements();
14961
+ }
14962
+ /**
14963
+ * When there has been an update received to the active entitlements,
14964
+ * the Nami SDK will provide notification of that event through
14965
+ * this callback with list of active [NamiEntitlement]
14966
+ *
14967
+ * @param {NamiActiveEntitlementsHandler} handler - The callback function that will be invoked when the campaign list is updated.
14968
+ * @returns {Callback} A function that can be called to unregister the handler.
14969
+ */
14970
+ static registerActiveEntitlementsHandler(handler) {
14971
+ if (hasPurchaseManagement("NamiEntitlementManager.registerActiveEntitlementsHandler")) {
14972
+ this.instance.emitter.addListener(AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, handler);
14973
+ return () => {
14974
+ this.instance.emitter.removeListener(AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, handler);
14975
+ };
14976
+ }
14977
+ }
14978
+ /**
14979
+ * Clear any provisional entitlement grants, which are entitlements issued on-device only.
14980
+ * Useful for development and purchase testing. Not recommended to be called in production.
14981
+ */
14982
+ static clearProvisionalEntitlementGrants() {
14983
+ let entitlements = activeEntitlements();
14984
+ entitlements = entitlements.filter((entitlement) => {
14985
+ return entitlement.expires && entitlement.expires > new Date().valueOf();
14986
+ });
14987
+ storageService.setNamiEntitlements(LOCAL_NAMI_ENTITLEMENTS, entitlements);
14988
+ this.instance.emitter.emit(AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED);
14989
+ }
14990
+ /**
14991
+ * Private Instance Methods
14992
+ */
14993
+ get sdkInitialized() {
14994
+ return Nami.instance.isInitialized;
14995
+ }
14996
+ };
14997
+ NamiEntitlementManager$2.instance = new NamiEntitlementManager$2();
14998
+
14999
+ // Re-export the class itself, typed as the narrow public interface. Same
15000
+ // object identity as the underlying class so jest.spyOn works. See
15001
+ // `src/managers/campaign.ts` and NAM-1207.
15002
+ const NamiEntitlementManager$1 = NamiEntitlementManager$2;
15003
+
15004
+ // Re-export the class itself, typed as the narrow public interface. Same
15005
+ // object identity as the underlying class so jest.spyOn works. See
15006
+ // `src/managers/campaign.ts` and NAM-1207.
15007
+ const NamiFlowManager$1 = NamiFlowManager$2;
14858
15008
 
14859
15009
  const postConversion = async (transactionInfo) => {
14860
15010
  if (isAnonymousMode()) {
@@ -14873,7 +15023,7 @@ const postConversion = async (transactionInfo) => {
14873
15023
  * @class NamiPaywallManager
14874
15024
  * Provides methods for managing all aspects of a paywall in the Nami SDK.
14875
15025
  */
14876
- class NamiPaywallManager {
15026
+ let NamiPaywallManager$2 = class NamiPaywallManager {
14877
15027
  constructor() {
14878
15028
  this.emitter = NamiEventEmitter.getInstance();
14879
15029
  }
@@ -14956,14 +15106,14 @@ class NamiPaywallManager {
14956
15106
  static async buySkuComplete(purchase) {
14957
15107
  // clear loading indicator
14958
15108
  PaywallState.setPurchaseInProgress(false);
14959
- if (NamiFlowManager.instance.flowOpen) {
14960
- const flow = NamiFlowManager.instance.currentFlow;
15109
+ if (NamiFlowManager$2.instance.flowOpen) {
15110
+ const flow = NamiFlowManager$2.instance.currentFlow;
14961
15111
  const currentStep = flow?.currentFlowStep;
14962
15112
  if (flow && currentStep) {
14963
15113
  flow.executeLifecycle(currentStep, NamiReservedActions.PURCHASE_SUCCESS);
14964
15114
  }
14965
15115
  }
14966
- if (NamiCustomerManager.inAnonymousMode()) {
15116
+ if (NamiCustomerManager$2.inAnonymousMode()) {
14967
15117
  logger.debug("Skipping purchase validation - anonymous mode");
14968
15118
  return;
14969
15119
  }
@@ -15044,142 +15194,19 @@ class NamiPaywallManager {
15044
15194
  get sdkInitialized() {
15045
15195
  return Nami.instance.isInitialized;
15046
15196
  }
15047
- }
15048
- NamiPaywallManager.instance = new NamiPaywallManager();
15049
- NamiPaywallManager.emitter = NamiEventEmitter.getInstance();
15197
+ };
15198
+ NamiPaywallManager$2.instance = new NamiPaywallManager$2();
15199
+ NamiPaywallManager$2.emitter = NamiEventEmitter.getInstance();
15050
15200
 
15051
- /**
15052
- * @class NamiEntitlementManager
15053
- * Contains all methods and objects to work with entitlements in the SDK.
15054
- */
15055
- class NamiEntitlementManager {
15056
- constructor() {
15057
- this.emitter = NamiEventEmitter.getInstance();
15058
- }
15059
- /**
15060
- * @returns {NamiEntitlement[]} A list of currently active entitlements
15061
- */
15062
- static active() {
15063
- if (!hasPurchaseManagement()) {
15064
- return createNamiEntitlements();
15065
- }
15066
- return activeEntitlements();
15067
- }
15068
- /**
15069
- * Checks if a Nami Control Center defined Entitlement has at least one backing purchase
15070
- * and it's not expired.
15071
- *
15072
- * @param referenceId - entitlement referenceId
15073
- * @returns {boolean} True if the entitlement is active for given referenceId, false otherwise.
15074
- */
15075
- static isEntitlementActive(referenceId) {
15076
- if (!hasPurchaseManagement("NamiEntitlementManager.isEntitlementActive")) {
15077
- return false;
15078
- }
15079
- return this.active().some((entitlement) => entitlement.referenceId == referenceId);
15080
- }
15081
- /**
15082
- * Asks Nami to fetch the latest active entitlements
15083
- *
15084
- * @returns {Promise<NamiEntitlement[]>} A promise that resolves to a list of NamiEntitlement
15085
- */
15086
- static async refresh() {
15087
- if (!this.instance.sdkInitialized) {
15088
- throw new SDKNotInitializedError();
15089
- }
15090
- if (!hasPurchaseManagement("NamiEntitlementManager.refresh")) {
15091
- return [];
15092
- }
15093
- await EntitlementRepository.instance.fetchActiveEntitlements();
15094
- return activeEntitlements();
15095
- }
15096
- /**
15097
- * When there has been an update received to the active entitlements,
15098
- * the Nami SDK will provide notification of that event through
15099
- * this callback with list of active [NamiEntitlement]
15100
- *
15101
- * @param {NamiActiveEntitlementsHandler} handler - The callback function that will be invoked when the campaign list is updated.
15102
- * @returns {Callback} A function that can be called to unregister the handler.
15103
- */
15104
- static registerActiveEntitlementsHandler(handler) {
15105
- if (hasPurchaseManagement("NamiEntitlementManager.registerActiveEntitlementsHandler")) {
15106
- this.instance.emitter.addListener(AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, handler);
15107
- return () => {
15108
- this.instance.emitter.removeListener(AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, handler);
15109
- };
15110
- }
15111
- }
15112
- /**
15113
- * Clear any provisional entitlement grants, which are entitlements issued on-device only.
15114
- * Useful for development and purchase testing. Not recommended to be called in production.
15115
- */
15116
- static clearProvisionalEntitlementGrants() {
15117
- let entitlements = activeEntitlements();
15118
- entitlements = entitlements.filter((entitlement) => {
15119
- return entitlement.expires && entitlement.expires > new Date().valueOf();
15120
- });
15121
- storageService.setNamiEntitlements(LOCAL_NAMI_ENTITLEMENTS, entitlements);
15122
- this.instance.emitter.emit(AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED);
15123
- }
15124
- /**
15125
- * Private Instance Methods
15126
- */
15127
- get sdkInitialized() {
15128
- return Nami.instance.isInitialized;
15129
- }
15130
- }
15131
- NamiEntitlementManager.instance = new NamiEntitlementManager();
15201
+ // Re-export the class itself, typed as the narrow public interface. Same
15202
+ // object identity as the underlying class so jest.spyOn works. See
15203
+ // `src/managers/campaign.ts` and NAM-1207.
15204
+ const NamiPaywallManager$1 = NamiPaywallManager$2;
15132
15205
 
15133
- ({
15134
- /**
15135
- * Registers a handler to be invoked when a flow step triggers a handoff event.
15136
- *
15137
- * This allows you to intercept a handoff step in a Nami Flow and execute custom logic
15138
- *
15139
- * @param handoffStepHandler - A callback function that will be called when a handoff occurs.
15140
- * It receives the `handoffTag` string (identifying the step) and an optional `handoffData`
15141
- * object with additional context. If `undefined`, the current handler is cleared.
15142
- *
15143
- */
15144
- registerStepHandoff: NamiFlowManager.registerStepHandoff.bind(NamiFlowManager),
15145
- /**
15146
- * Registers a handler to be invoked when events are emitted.
15147
- *
15148
- * This enables you to use your own custom event tracking.
15149
- *
15150
- * @param eventHandler - A callback function that will be called when an event occurs.
15151
- * The argument is a key-value object containing event data.
15152
- * If `undefined`, the current handler is cleared
15153
- *
15154
- */
15155
- registerEventHandler: NamiFlowManager.registerEventHandler.bind(NamiFlowManager),
15156
- /**
15157
- * Resumes the Nami Flow after a handoff has been completed.
15158
- *
15159
- * This should be called by once any custom logic associated with
15160
- * a handoff has completed.
15161
- * It signals to continue to the next step in the flow sequence.
15162
- */
15163
- resume: NamiFlowManager.resume.bind(NamiFlowManager),
15164
- /**
15165
- * Finishes the current flow programmatically.
15166
- *
15167
- * This can be used to end the flow at any point, typically after a handoff or custom logic.
15168
- */
15169
- finish: NamiFlowManager.finish.bind(NamiFlowManager),
15170
- /**
15171
- * Pauses the current flow.
15172
- *
15173
- * This can be used to temporarily halt the flow, typically in response to user input or other events.
15174
- */
15175
- pause: NamiFlowManager.pause.bind(NamiFlowManager),
15176
- /**
15177
- * Checks if a flow is currently open.
15178
- *
15179
- * @returns {boolean} - True if a flow is open, false otherwise.
15180
- */
15181
- isFlowOpen: NamiFlowManager.isFlowOpen.bind(NamiFlowManager),
15182
- });
15206
+ // Re-export the class itself, typed as the narrow public interface. Same
15207
+ // object identity as the underlying class so jest.spyOn works. See
15208
+ // `src/managers/campaign.ts` and NAM-1207.
15209
+ const NamiPurchaseManager$1 = NamiPurchaseManager$2;
15183
15210
 
15184
15211
  const BorderMap = {
15185
15212
  upperLeft: 'border-top-left-radius',
@@ -64694,4 +64721,51 @@ function namiBuySKU(skuRefId) {
64694
64721
  return result;
64695
64722
  }
64696
64723
 
64697
- export { ALREADY_CONFIGURED, ANONYMOUS_MODE, ANONYMOUS_MODE_ALREADY_OFF, ANONYMOUS_MODE_ALREADY_ON, ANONYMOUS_MODE_LOGIN_NOT_ALLOWED, ANONYMOUS_UUID, APIError, API_ACTIVE_ENTITLEMENTS, API_CAMPAIGN_RULES, API_CAMPAIGN_SESSION_TIMESTAMP, API_CONFIG, API_MAX_CALLS_LIMIT, API_PAYWALLS, API_PRODUCTS, API_RETRY_DELAY_SEC, API_TIMEOUT_LIMIT, API_VERSION, AUTH_DEVICE, AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, AVAILABLE_CAMPAIGNS_CHANGED, AccountStateAction, AnonymousCDPError, AnonymousLoginError, AnonymousModeAlreadyOffError, AnonymousModeAlreadyOnError, BASE_STAGING_URL, BASE_URL, BASE_URL_PATH, BadRequestError, BasicNamiFlow, BorderMap, BorderSideMap, CAMPAIGN_NOT_AVAILABLE, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEVELOPMENT, DEVICE_API_TIMEOUT_LIMIT, DEVICE_ID_NOT_SET, DEVICE_ID_REQUIRED, DISABLE_ASYNC_LOGIN_LOGOUT, DeviceIDRequiredError, DeviceRepository, EXTENDED_CLIENT_INFO_DELIMITER, EXTENDED_CLIENT_INFO_PREFIX, EXTENDED_PLATFORM, EXTENDED_PLATFORM_VERSION, EXTERNAL_ID_REQUIRED, EntitlementRepository, EntitlementUtils, ExternalIDRequiredError, FLOW_SCREENS_NOT_AVAILABLE, FlowScreensNotAvailableError, HTML_REGEX, INITIAL_APP_CONFIG, INITIAL_CAMPAIGN_RULES, INITIAL_PAYWALLS, INITIAL_PRODUCTS, INITIAL_SESSION_COUNTER_VALUE, INITIAL_SUCCESS, InternalServerError, KEY_SESSION_COUNTER, LIQUID_VARIABLE_REGEX, LOCAL_NAMI_ENTITLEMENTS, LOG_HTTP_REQUESTS, LOG_HTTP_TRAFFIC, LaunchCampaignError, LaunchContextResolver, LogLevel, NAMI_CONFIGURATION, NAMI_CUSTOMER_JOURNEY_STATE, NAMI_LANGUAGE_CODE, NAMI_LAST_IMPRESSION_ID, NAMI_LAUNCH_ID, NAMI_PROFILE, NAMI_PURCHASE_CHANNEL, NAMI_PURCHASE_IMPRESSION_ID, NAMI_SDK_PACKAGE_VERSION, NAMI_SDK_VERSION, NAMI_SESSION_ID, NAMI_STORAGE_KEYS, Nami, NamiAPI, NamiAnimationType, NamiCampaignManager, NamiCampaignRuleType, NamiConditionEvaluator, NamiCustomerManager, NamiEntitlementManager, NamiEventEmitter, NamiFlow, NamiFlowActionFunction, NamiFlowManager, NamiFlowStepType, NamiPaywallAction, NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiProfileManager, NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SessionService, SimpleEventTarget, StorageService, UNABLE_TO_UPDATE_CDP_ID, USE_STAGING_API, VALIDATE_PRODUCT_GROUPS, VAR_REGEX, activateEntitlementByPurchase, activeEntitlements, aggregateScreenreaderText, allCampaigns, allPaywalls, applyEntitlementActivation, audienceSplitPosition, bestUrlCampaignMatch, bigintToUuid, checkAnySkuHasPromoOffer, checkAnySkuHasTrialOffer, coerceBooleanish, convertISO8601PeriodToText, convertLocale, convertOfferToPricingPhase, createNamiEntitlements, currentSku, empty, extractStandardPricingPhases, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isSubscription, isValidISODate, isValidUrl, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseToSemver, postConversion, productDetail, registerPlatformAdapters, registerPurchaseAdapter, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateMinSDKVersion };
64724
+ /**
64725
+ * Source of the `_internal` namespace re-exported from `index.ts` — typed
64726
+ * escape hatch for the underlying manager classes.
64727
+ *
64728
+ * The public surface at `@namiml/sdk-core` (and `@namiml/web-sdk`) exposes each
64729
+ * manager as a narrow const proxy of documented methods only. Renderer code and
64730
+ * tests that need the singleton (`Foo.instance`), private event emitters, or
64731
+ * internal helper statics that aren't part of the documented public API import
64732
+ * the classes via the `_internal` namespace on `@namiml/sdk-core` — which
64733
+ * re-exports the values declared here with their wider class types.
64734
+ *
64735
+ * **Critical bundle behavior.** Every runtime value here is imported from
64736
+ * `'./index'` (the package's root entry). When index.ts re-exports this module
64737
+ * as `export * as _internal from './internal'`, the values flow through the
64738
+ * same module identity as the root entry — no duplication. Adapters registered
64739
+ * via the documented public surface remain visible to code reached through the
64740
+ * `_internal` namespace, because both paths reference the same module-scoped
64741
+ * `_adapters` map in `adapters/index.ts`. See NAM-1207 (PR #340 + PR #342) for
64742
+ * the singleton-split regression history that motivated this indirection, and
64743
+ * NAM-1217 for the move from the `/internal` subpath to a root namespace.
64744
+ *
64745
+ * Not part of the public contract. Method signatures here can change between
64746
+ * minor releases. If you depend on something here as a third-party integrator,
64747
+ * file a ticket asking for a documented public equivalent — that's a signal we
64748
+ * should widen the public surface, not a license to track this entry point.
64749
+ */
64750
+ // Runtime values are the same class identities the root entry holds — cast
64751
+ // widens the type from the narrow public proxy back to the class.
64752
+ const NamiCampaignManager = NamiCampaignManager$1;
64753
+ const NamiCustomerManager = NamiCustomerManager$1;
64754
+ const NamiPaywallManager = NamiPaywallManager$1;
64755
+ const NamiEntitlementManager = NamiEntitlementManager$1;
64756
+ const NamiFlowManager = NamiFlowManager$1;
64757
+ const NamiPurchaseManager = NamiPurchaseManager$1;
64758
+ const NamiProfileManager = NamiProfileManager$1;
64759
+
64760
+ var internal = /*#__PURE__*/Object.freeze({
64761
+ __proto__: null,
64762
+ NamiCampaignManager: NamiCampaignManager,
64763
+ NamiCustomerManager: NamiCustomerManager,
64764
+ NamiEntitlementManager: NamiEntitlementManager,
64765
+ NamiFlowManager: NamiFlowManager,
64766
+ NamiPaywallManager: NamiPaywallManager,
64767
+ NamiProfileManager: NamiProfileManager,
64768
+ NamiPurchaseManager: NamiPurchaseManager
64769
+ });
64770
+
64771
+ export { ALREADY_CONFIGURED, ANONYMOUS_MODE, ANONYMOUS_MODE_ALREADY_OFF, ANONYMOUS_MODE_ALREADY_ON, ANONYMOUS_MODE_LOGIN_NOT_ALLOWED, ANONYMOUS_UUID, APIError, API_ACTIVE_ENTITLEMENTS, API_CAMPAIGN_RULES, API_CAMPAIGN_SESSION_TIMESTAMP, API_CONFIG, API_MAX_CALLS_LIMIT, API_PAYWALLS, API_PRODUCTS, API_RETRY_DELAY_SEC, API_TIMEOUT_LIMIT, API_VERSION, AUTH_DEVICE, AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, AVAILABLE_CAMPAIGNS_CHANGED, AccountStateAction, AnonymousCDPError, AnonymousLoginError, AnonymousModeAlreadyOffError, AnonymousModeAlreadyOnError, BASE_STAGING_URL, BASE_URL, BASE_URL_PATH, BadRequestError, BasicNamiFlow, BorderMap, BorderSideMap, CAMPAIGN_NOT_AVAILABLE, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEVELOPMENT, DEVICE_API_TIMEOUT_LIMIT, DEVICE_ID_NOT_SET, DEVICE_ID_REQUIRED, DISABLE_ASYNC_LOGIN_LOGOUT, DeviceIDRequiredError, DeviceRepository, EXTENDED_CLIENT_INFO_DELIMITER, EXTENDED_CLIENT_INFO_PREFIX, EXTENDED_PLATFORM, EXTENDED_PLATFORM_VERSION, EXTERNAL_ID_REQUIRED, EntitlementRepository, EntitlementUtils, ExternalIDRequiredError, FLOW_SCREENS_NOT_AVAILABLE, FlowScreensNotAvailableError, HTML_REGEX, INITIAL_APP_CONFIG, INITIAL_CAMPAIGN_RULES, INITIAL_PAYWALLS, INITIAL_PRODUCTS, INITIAL_SESSION_COUNTER_VALUE, INITIAL_SUCCESS, InternalServerError, KEY_SESSION_COUNTER, LIQUID_VARIABLE_REGEX, LOCAL_NAMI_ENTITLEMENTS, LOG_HTTP_REQUESTS, LOG_HTTP_TRAFFIC, LaunchCampaignError, LaunchContextResolver, LogLevel, NAMI_CONFIGURATION, NAMI_CUSTOMER_JOURNEY_STATE, NAMI_LANGUAGE_CODE, NAMI_LAST_IMPRESSION_ID, NAMI_LAUNCH_ID, NAMI_PROFILE, NAMI_PURCHASE_CHANNEL, NAMI_PURCHASE_IMPRESSION_ID, NAMI_SDK_PACKAGE_VERSION, NAMI_SDK_VERSION, NAMI_SESSION_ID, NAMI_STORAGE_KEYS, Nami, NamiAPI, NamiAnimationType, NamiCampaignManager$1 as NamiCampaignManager, NamiCampaignRuleType, NamiConditionEvaluator, NamiCustomerManager$1 as NamiCustomerManager, NamiEntitlementManager$1 as NamiEntitlementManager, NamiEventEmitter, NamiFlow, NamiFlowActionFunction, NamiFlowManager$1 as NamiFlowManager, NamiFlowStepType, NamiPaywallAction, NamiPaywallManager$1 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPurchaseManager$1 as NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SessionService, SimpleEventTarget, StorageService, UNABLE_TO_UPDATE_CDP_ID, USE_STAGING_API, VALIDATE_PRODUCT_GROUPS, VAR_REGEX, NamiProfileManager$1 as _NamiProfileManager, internal as _internal, activateEntitlementByPurchase, activeEntitlements, aggregateScreenreaderText, allCampaigns, allPaywalls, applyEntitlementActivation, audienceSplitPosition, bestUrlCampaignMatch, bigintToUuid, checkAnySkuHasPromoOffer, checkAnySkuHasTrialOffer, coerceBooleanish, convertISO8601PeriodToText, convertLocale, convertOfferToPricingPhase, createNamiEntitlements, currentSku, empty, extractStandardPricingPhases, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isSubscription, isValidISODate, isValidUrl, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseToSemver, postConversion, productDetail, registerPlatformAdapters, registerPurchaseAdapter, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateMinSDKVersion };